diff --git a/.github/workflows/build-net6.0.yml b/.github/workflows/build-net6.0.yml deleted file mode 100644 index 983d463bd..000000000 --- a/.github/workflows/build-net6.0.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: .NET Core 6.0 - -on: - push: - branches: - - main - pull_request: - branches: - - main - - sdk-automation/models - - promote/main - workflow_dispatch: {} - -permissions: - contents: read - -jobs: - dotnet6-build-and-unit-test: - name: Build and Test on .NET 6.0 - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ ubuntu-latest, windows-latest ] - - steps: - - uses: actions/checkout@v4 - - - name: Setup .NET 6.0 and .NET 8.0 - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 6.0.x - 8.0.x - - - name: Restore dependencies - run: dotnet restore - - - name: Build (debug) in .NET 6.0 - run: dotnet build --configuration Debug --framework net6.0 --no-restore - - - name: Run unit tests on .NET 6.0 - run: dotnet test --no-build --configuration Debug --framework net6.0 --no-restore Adyen.Test/Adyen.Test.csproj \ No newline at end of file diff --git a/Adyen.IntegrationTest/Adyen.IntegrationTest.csproj b/Adyen.IntegrationTest/Adyen.IntegrationTest.csproj index 7662e15c7..826f66510 100644 --- a/Adyen.IntegrationTest/Adyen.IntegrationTest.csproj +++ b/Adyen.IntegrationTest/Adyen.IntegrationTest.csproj @@ -1,7 +1,7 @@ - net8.0;net6.0 + net8.0 12 enable disable diff --git a/Adyen.IntegrationTest/BaseTest.cs b/Adyen.IntegrationTest/BaseTest.cs deleted file mode 100644 index 1fcb4e960..000000000 --- a/Adyen.IntegrationTest/BaseTest.cs +++ /dev/null @@ -1,272 +0,0 @@ -using System; -using System.Collections.Generic; - -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BinLookup; -using Adyen.Model.Checkout; -using Adyen.Model.Payment; -using Adyen.Service; -using Adyen.Service.Checkout; -using Amount = Adyen.Model.Checkout; -using PaymentRequest = Adyen.Model.Payment.PaymentRequest; -using PaymentResult = Adyen.Model.Payment.PaymentResult; -using Environment = Adyen.Model.Environment; -using ExternalPlatform = Adyen.Model.ApplicationInformation.ExternalPlatform; -using Recurring = Adyen.Model.Payment.Recurring; - -namespace Adyen.IntegrationTest -{ - public class BaseTest - { - public PaymentResult CreatePaymentResult() - { - var client = CreateApiKeyTestClient(); - var payment = new PaymentService(client); - var paymentRequest = CreateFullPaymentRequest(); - var paymentResult = payment.Authorise(paymentRequest); - - return paymentResult; - } - - public async Task CreatePaymentResultAsync() - { - var client = CreateApiKeyTestClient(); - var payment = new PaymentService(client); - var paymentRequest = CreateFullPaymentRequest(); - var paymentResult = await payment.AuthoriseAsync(paymentRequest); - - return paymentResult; - } - - public PaymentResult CreatePaymentResultWithApiKeyAuthentication() - { - var client = CreateApiKeyTestClient(); - var payment = new PaymentService(client); - var paymentRequest = CreateFullPaymentRequest(); - var paymentResult = payment.Authorise(paymentRequest); - - return paymentResult; - } - - public PaymentResult CreatePaymentResultWithIdempotency(string idempotency) - { - var client = CreateApiKeyTestClient(); - var payment = new PaymentService(client); - var paymentRequest = CreateFullPaymentRequest(); - var paymentResult = payment.Authorise(paymentRequest, new RequestOptions{ IdempotencyKey=idempotency}); - - return paymentResult; - } - - public PaymentResult CreatePaymentResultWithRecurring(Recurring.ContractEnum contract) - { - var client = CreateApiKeyTestClient(); - var payment = new PaymentService(client); - var paymentRequest = CreateFullPaymentRequestWithRecurring(contract); - var paymentResult = payment.Authorise(paymentRequest); - - return paymentResult; - } - - - /// - /// Creates a payment and returns the psp result - /// - /// - public string GetTestPspReference() - { - //Do test payment - var paymentResult = CreatePaymentResult(); - //Get the psp referense - var paymentResultPspReference = paymentResult.PspReference; - return paymentResultPspReference; - } - - #region Modification objects - - protected CaptureRequest CreateCaptureTestRequest(string pspReference) - { - var captureRequest = new CaptureRequest - { - MerchantAccount = ClientConstants.MerchantAccount, - ModificationAmount = new Adyen.Model.Payment.Amount("EUR", 150), - Reference = "capture - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference - }; - return captureRequest; - } - - protected CancelOrRefundRequest CreateCancelOrRefundTestRequest(string pspReference) - { - var cancelOrRefundRequest = new CancelOrRefundRequest() - { - MerchantAccount = ClientConstants.MerchantAccount, - Reference = "cancelOrRefund - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference - }; - return cancelOrRefundRequest; - } - - protected RefundRequest CreateRefundTestRequest(string pspReference) - { - var refundRequest = new RefundRequest() - { - MerchantAccount = ClientConstants.MerchantAccount, - ModificationAmount = new Adyen.Model.Payment.Amount("EUR", 150), - Reference = "refund - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference - }; - return refundRequest; - } - - protected CancelRequest CreateCancelTestRequest(string pspReference) - { - var cancelRequest = new CancelRequest() - { - MerchantAccount = ClientConstants.MerchantAccount, - Reference = "cancel - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference - }; - return cancelRequest; - } - protected AdjustAuthorisationRequest CreateAdjustAuthorisationtestRequest(string pspReference) - { - var adjustAuthorisationRequest = new AdjustAuthorisationRequest() - { - MerchantAccount = ClientConstants.MerchantAccount, - ModificationAmount = new Adyen.Model.Payment.Amount("EUR", 150), - Reference = "adjust authorisation - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference - }; - return adjustAuthorisationRequest; - } - - #endregion - - protected Client CreateApiKeyTestClient() - { - var config = new Config() - { - XApiKey = ClientConstants.Xapikey, - Environment = Environment.Test - }; - return new Client(config); - } - - private PaymentRequest CreateFullPaymentRequest() - { - PaymentRequest paymentRequest = new PaymentRequest - { - MerchantAccount = ClientConstants.MerchantAccount, - Amount = new Model.Payment.Amount("EUR", 1500), - Card = CreateTestCard(), - Reference = "payment - " + DateTime.Now.ToString("yyyyMMdd"), - AdditionalData = CreateAdditionalData(), - ApplicationInfo = new Model.Payment.ApplicationInfo() - { - ExternalPlatform = new Model.Payment.ExternalPlatform() - { - Integrator = "test merchant", - Name = "merchant name", - Version = "2.8" - } - } - - }; - paymentRequest.ApplicationInfo.ExternalPlatform = new Model.Payment.ExternalPlatform("test merchant", "merchant name", "2.8"); - return paymentRequest; - } - - private PaymentRequest CreateFullPaymentRequestWithRecurring(Recurring.ContractEnum contract) - { - var paymentRequest = new PaymentRequest - { - MerchantAccount = ClientConstants.MerchantAccount, - Amount = new Model.Payment.Amount("EUR", 1500), - Card = CreateTestCard(), - Reference = "payment - " + DateTime.Now.ToString("yyyyMMdd"), - ShopperReference = "test-1234", - AdditionalData = CreateAdditionalData(), - Recurring = new Recurring { Contract = contract }, - ApplicationInfo = new Model.Payment.ApplicationInfo() - { - ExternalPlatform = new Model.Payment.ExternalPlatform() - { - Integrator = "test merchant", - Name = "merchant name", - Version = "2.8" - } - } - }; - - paymentRequest.ApplicationInfo.ExternalPlatform = new Adyen.Model.Payment.ExternalPlatform("test merchant", "merchant name", "2.8"); - return paymentRequest; - } - - /// - /// Check out payment request - /// - /// - /// - public Model.Checkout.PaymentRequest CreatePaymentRequestCheckout() - { - var amount = new Model.Checkout.Amount("USD", 1000); - var paymentsRequest = new Model.Checkout.PaymentRequest - { - Reference = "Your order number from e2e", - Amount = amount, - ReturnUrl = @"https://your-company.com/...", - MerchantAccount = ClientConstants.MerchantAccount, - }; - var cardDetails = new Model.Checkout.CardDetails() - { - Number = "4111111111111111", - ExpiryMonth = "10", - ExpiryYear = "2020", - HolderName = "John Smith", - Cvc = "737" - }; - paymentsRequest.PaymentMethod = new CheckoutPaymentMethod(cardDetails); - return paymentsRequest; - } - - /// - /// Check out payment IDeal request - /// - /// - /// - public Model.Checkout.PaymentRequest CreatePaymentRequestIDealCheckout() - { - var amount = new Model.Checkout.Amount("EUR", 1000); - var paymentsRequest = new Model.Checkout.PaymentRequest - { - Reference = "Your order number from e2e", - Amount = amount, - PaymentMethod= new Model.Checkout.CheckoutPaymentMethod(new IdealDetails(type: IdealDetails.TypeEnum.Ideal, issuer: "1121")), - ReturnUrl = @"https://your-company.com/...", - MerchantAccount = ClientConstants.MerchantAccount, - }; - - return paymentsRequest; - } - - protected Model.Payment.Card CreateTestCard() - { - return new Model.Payment.Card(number: "4111111111111111", expiryMonth: "03", expiryYear: "2030", cvc: "737", - holderName: "John Smith"); - } - - /// - /// Returns additional data object - /// - /// - private Dictionary CreateAdditionalData() - { - return new Dictionary - { - {"fraudOffset", "0"}, - }; - } - } -} diff --git a/Adyen.IntegrationTest/CancellationTokenTest.cs b/Adyen.IntegrationTest/CancellationTokenTest.cs deleted file mode 100644 index 594f25938..000000000 --- a/Adyen.IntegrationTest/CancellationTokenTest.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.HttpClient; -using Adyen.HttpClient.Interfaces; -using Adyen.Model; -using Adyen.Service.Checkout; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class CancellationTokenTest : BaseTest - { - - [TestMethod] - public void CancellationTokenDelayTest() - { - var client = new Client(new Config()) - { - HttpClient = new MyDelayedClient(new Config(), new System.Net.Http.HttpClient()) - }; - var cancellationTokenSource = new CancellationTokenSource(); - cancellationTokenSource.CancelAfter(1000); - - try - { - var service = new PaymentLinksService(client); - var response = service.GetPaymentLinkAsync("linkId", null, cancellationTokenSource.Token).Result; - } - catch (System.AggregateException e) - { - Assert.AreEqual(e.Message, "One or more errors occurred. (A task was canceled.)"); - } - } - } - - public class MyDelayedClient : IClient - { - private readonly System.Net.Http.HttpClient _httpClient; - - public MyDelayedClient(Config config, System.Net.Http.HttpClient httpClient) - { - _httpClient = httpClient; - } - - public string Request(string endpoint, string json, RequestOptions requestOptions = null, - HttpMethod httpMethod = null) - { - throw new NotImplementedException(); - } - - public async Task RequestAsync(string endpoint, string json, RequestOptions requestOptions = null, - HttpMethod httpMethod = null, CancellationToken cancellationToken = default(CancellationToken)) - { - using var response = await _httpClient.SendAsync( - new HttpRequestMessage(httpMethod, "https://httpstat.us/504?sleep=60000"), cancellationToken); - var responseText = await response.Content.ReadAsStringAsync(cancellationToken); - return responseText; - } - - public void Dispose() - { - _httpClient?.Dispose(); - } - } -} \ No newline at end of file diff --git a/Adyen.IntegrationTest/Checkout/PaymentsServiceIntegrationTest.cs b/Adyen.IntegrationTest/Checkout/PaymentsServiceIntegrationTest.cs new file mode 100644 index 000000000..d452d13fb --- /dev/null +++ b/Adyen.IntegrationTest/Checkout/PaymentsServiceIntegrationTest.cs @@ -0,0 +1,273 @@ +using System.Diagnostics.Tracing; +using Adyen.Checkout.Extensions; +using Adyen.Checkout.Models; +using Adyen.Checkout.Services; +using Adyen.Core.Client; +using Adyen.Core.Client.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using Adyen.Core.Options; +using Microsoft.Extensions.Logging; + +namespace Adyen.IntegrationTest.Checkout +{ + [TestClass] + public class PaymentsServiceIntegrationTest + { + private readonly IPaymentsService _paymentsApiService; + + public PaymentsServiceIntegrationTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureCheckout( + (context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _paymentsApiService = host.Services.GetRequiredService(); + + // Example how to do logging for IPaymentsService and the PaymensServiceEvents. + ILogger logger = host.Services.GetRequiredService>(); + + PaymentsServiceEvents events = host.Services.GetRequiredService(); + + // On /payments + events.OnPayments += (sender, eventArgs) => + { + ApiResponse apiResponse = eventArgs.ApiResponse; + logger.LogInformation("{TotalSeconds,-9} | {Path} | {StatusCode} |", (apiResponse.DownloadedAt - apiResponse.RequestedAt).TotalSeconds, apiResponse.StatusCode, apiResponse.Path); + }; + + // OnError /payments. + events.OnErrorPayments += (sender, eventArgs) => + { + logger.LogError(eventArgs.Exception, "An error occurred after sending the request to the server."); + }; + + } + + [TestMethod] + public async Task Given_Payments_When_CardDetails_Provided_Returns_OK() + { + // Arrange + var request = new PaymentRequest( + amount: new Amount("EUR", 1999), + merchantAccount: "HeapUnderflowECOM", + reference: "reference", + returnUrl: "https://adyen.com/", + paymentMethod: new CheckoutPaymentMethod( + new CardDetails( + type: CardDetails.TypeEnum.Scheme, + encryptedCardNumber: "test_4111111111111111", + encryptedExpiryMonth: "test_03", + encryptedExpiryYear: "test_2030", + encryptedSecurityCode: "test_737", + holderName: "John Smith" + ) + ) + ); + IPaymentsApiResponse response = await _paymentsApiService.PaymentsAsync(request); + + response.TryDeserializeOkResponse(out var result); + Assert.AreEqual(result?.MerchantReference, "reference"); + } + + [TestMethod] + public async Task Given_Payments_When_CardDetails_With_Empty_RequestOptions_Succeeds() + { + // Test when no idempotency key is provided + var request = new PaymentRequest( + amount: new Amount("EUR", 1999), + merchantAccount: "HeapUnderflowECOM", + reference: "ref1-original-request-1", + returnUrl: "https://adyen.com/", + paymentMethod: new CheckoutPaymentMethod( + new CardDetails( + type: CardDetails.TypeEnum.Scheme, + encryptedCardNumber: "test_4111111111111111", + encryptedExpiryMonth: "test_03", + encryptedExpiryYear: "test_2030", + encryptedSecurityCode: "test_737", + holderName: "John Smith" + ) + ) + ); + IPaymentsApiResponse response = await _paymentsApiService.PaymentsAsync(request, new RequestOptions()); + + response.TryDeserializeOkResponse(out PaymentResponse result); + Assert.AreEqual(result?.MerchantReference, "ref1-original-request-1"); + } + + + [TestMethod] + public async Task Given_Payments_When_CardDetails_Without_Idempotency_Key_Provided_Returns_DifferentRefs() + { + // Test when no idempotency key is provided + var request = new PaymentRequest( + amount: new Amount("EUR", 1999), + merchantAccount: "HeapUnderflowECOM", + reference: "ref1-original-request-1", + returnUrl: "https://adyen.com/", + paymentMethod: new CheckoutPaymentMethod( + new CardDetails( + type: CardDetails.TypeEnum.Scheme, + encryptedCardNumber: "test_4111111111111111", + encryptedExpiryMonth: "test_03", + encryptedExpiryYear: "test_2030", + encryptedSecurityCode: "test_737", + holderName: "John Smith" + ) + ) + ); + IPaymentsApiResponse response = await _paymentsApiService.PaymentsAsync(paymentRequest: request); + + response.TryDeserializeOkResponse(out PaymentResponse result); + Assert.AreEqual(result?.MerchantReference, "ref1-original-request-1"); + + + // Test when no idempotency key is provided + var request2 = new PaymentRequest( + amount: new Amount("EUR", 1999), + merchantAccount: "HeapUnderflowECOM", + reference: "ref2-should-be-different", + returnUrl: "https://adyen.com/", + paymentMethod: new CheckoutPaymentMethod( + new CardDetails( + type: CardDetails.TypeEnum.Scheme, + encryptedCardNumber: "test_4111111111111111", + encryptedExpiryMonth: "test_03", + encryptedExpiryYear: "test_2030", + encryptedSecurityCode: "test_737", + holderName: "John Smith" + ) + ) + ); + IPaymentsApiResponse response2 = await _paymentsApiService.PaymentsAsync(paymentRequest: request2); + + response2.TryDeserializeOkResponse(out PaymentResponse result2); + Assert.AreEqual(result2?.MerchantReference, "ref2-should-be-different"); + + // Test when null is explicitly provided. + var request3 = new PaymentRequest( + amount: new Amount("EUR", 1999), + merchantAccount: "HeapUnderflowECOM", + reference: "ref3-should-be-very-different", + returnUrl: "https://adyen.com/", + paymentMethod: new CheckoutPaymentMethod( + new CardDetails( + type: CardDetails.TypeEnum.Scheme, + encryptedCardNumber: "test_4111111111111111", + encryptedExpiryMonth: "test_03", + encryptedExpiryYear: "test_2030", + encryptedSecurityCode: "test_737", + holderName: "John Smith" + ) + ) + ); + IPaymentsApiResponse response3 = await _paymentsApiService.PaymentsAsync(request3); + response3.TryDeserializeOkResponse(out PaymentResponse result3); + Assert.AreEqual(result3?.MerchantReference, "ref3-should-be-very-different"); + } + + [TestMethod] + public void HttpClientBuilderExtensions_Polly_Retry_CircuitBreaker_Timeout_Example() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureCheckout( + (context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }, + httpClientBuilderOptions: (IHttpClientBuilder builder) => + { + builder.AddRetryPolicy(5); + builder.AddCircuitBreakerPolicy(3, TimeSpan.FromSeconds(30)); + builder.AddTimeoutPolicy(TimeSpan.FromMinutes(5)); + }) + .Build(); + } + + [TestMethod] + public void HttpClientBuilderExtensions_Regular_Timeout_Modify_HttpClient_Example() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureCheckout( + (context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }, client => + { + client.Timeout = TimeSpan.FromMinutes(1); + }) + .Build(); + } + + [TestMethod] + public async Task PaymentsServiceEvents_Override_Delegates_Example() + { + // Arrange + IHost host = Host.CreateDefaultBuilder() + .ConfigureCheckout( + (context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + var request = new PaymentRequest( + amount: new Amount("EUR", 1999), + merchantAccount: "HeapUnderflowECOM", + reference: "reference", + returnUrl: "https://adyen.com/", + paymentMethod: new CheckoutPaymentMethod( + new CardDetails( + type: CardDetails.TypeEnum.Scheme, + encryptedCardNumber: "test_4111111111111111", + encryptedExpiryMonth: "test_03", + encryptedExpiryYear: "test_2030", + encryptedSecurityCode: "test_737", + holderName: "John Smith" + ) + ) + ); + + + PaymentsServiceEvents paymentsServiceEvents = host.Services.GetRequiredService(); + IPaymentsService paymentsApiService = host.Services.GetRequiredService(); + + int isCalledOnce = 0; + + // Example override using a delegate: + paymentsServiceEvents.OnPayments += (sender, args) => + { + Console.WriteLine("OnPayments event received - IsSuccessStateCode: " + args.ApiResponse.IsSuccessStatusCode); + isCalledOnce++; + }; + + // Act + await paymentsApiService.PaymentsAsync(request, new RequestOptions().AddIdempotencyKey(Guid.NewGuid().ToString())); + + // Assert + Assert.IsTrue(isCalledOnce == 1); + } + } +} \ No newline at end of file diff --git a/Adyen.IntegrationTest/CheckoutTest.cs b/Adyen.IntegrationTest/CheckoutTest.cs deleted file mode 100644 index 1ca9a9c6f..000000000 --- a/Adyen.IntegrationTest/CheckoutTest.cs +++ /dev/null @@ -1,313 +0,0 @@ - -using Adyen.Model.Checkout; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using Adyen.HttpClient; -using Adyen.Service.Checkout; -using CreateCheckoutSessionRequest = Adyen.Model.Checkout.CreateCheckoutSessionRequest; -using Environment = Adyen.Model.Environment; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class CheckoutTest : BaseTest - { - private Client _client; - private PaymentsService _checkout; - private RecurringService _recurring; - private ModificationsService _modifications; - private PaymentLinksService _paymentLinksService; - private PaymentsService _paymentsService; - private static readonly string MerchantAccount = ClientConstants.MerchantAccount; - - [TestInitialize] - public void Init() - { - _client = CreateApiKeyTestClient(); - _checkout = new PaymentsService(_client); - _recurring = new RecurringService(_client); - _modifications = new ModificationsService(_client); - _paymentLinksService = new PaymentLinksService(_client); - // _classicCheckoutSdkService = new ClassicCheckoutSDKService(_client); - _paymentsService = new PaymentsService(_client); - } - - [TestMethod] - public void PaymentsFlowWithInvalidApiKey() - { - _client.Config.XApiKey = "InvalidKey"; - try - { - var paymentResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - } - catch (HttpClientException ex) - { - Assert.AreEqual(401, ex.Code); - } - } - - [TestMethod] - public void PaymentsFlowWithEmptyApiKey() - { - _client.Config.XApiKey = null; - try - { - var paymentResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - } - catch (HttpClientException ex) - { - Assert.AreEqual(401, ex.Code); - } - } - - [TestMethod] - public void PaymentsFlowWithPartiallyCorrectKeyApiKey() - { - var key = _client.Config.XApiKey; - _client.Config.XApiKey = "1" + key; - try - { - var paymentResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - } - catch (HttpClientException ex) - { - Assert.AreEqual(401, ex.Code); - } - } - - [TestMethod] - public void PaymentsTest() - { - var paymentResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - Assert.IsNotNull(paymentResponse.AdditionalData); - Assert.AreEqual("1111", paymentResponse.AdditionalData["cardSummary"]); - Assert.IsNotNull(paymentResponse.AdditionalData["avsResult"]); - Assert.AreEqual("1 Matches", paymentResponse.AdditionalData["cvcResult"]); - Assert.AreEqual("visa", paymentResponse.AdditionalData["paymentMethod"]); - } - - [TestMethod] - public void PaymentMethodsTest() - { - var amount = new Amount("EUR", 1000); - var paymentMethodsRequest = new PaymentMethodsRequest(merchantAccount: MerchantAccount) - { - CountryCode = "NL", - Amount = amount, - Channel = PaymentMethodsRequest.ChannelEnum.Web - }; - var paymentMethodsResponse = _checkout.PaymentMethods(paymentMethodsRequest); - Assert.IsTrue(paymentMethodsResponse.PaymentMethods.Count != 0); - Assert.IsTrue(!string.IsNullOrEmpty(paymentMethodsResponse.PaymentMethods[0].Name)); - } - - [TestMethod] - public void PaymentWithIdealTest() - { - var paymentResponse = _checkout.Payments(CreatePaymentRequestIDealCheckout()); - var paymentResponseResult = paymentResponse.Action.GetCheckoutRedirectAction(); - Assert.AreEqual(paymentResponse.ResultCode, PaymentResponse.ResultCodeEnum.RedirectShopper); - Assert.AreEqual(paymentResponseResult.PaymentMethodType, "ideal"); - Assert.IsNotNull(paymentResponseResult.Url); - Assert.AreEqual(paymentResponse.ResultCode, PaymentResponse.ResultCodeEnum.RedirectShopper); - } - - [TestMethod] - public void PaymentLinksSuccessTest() - { - var amount = new Amount("EUR", 1000); - var address = new Address(country: "NL", city: "Amsterdam", houseNumberOrName: "11", postalCode: "1234AB", street: "ams"); - var createPaymentLinkRequest = new PaymentLinkRequest(amount: amount, merchantAccount: ClientConstants.MerchantAccount, reference: "Reference") - { - CountryCode = "NL", - ShopperReference = "Unique_shopper_reference", - ShopperEmail = "test@shopperEmail.com", - BillingAddress = address, - DeliveryAddress = address, - ExpiresAt = DateTime.Now.AddHours(4) - }; - var createPaymentLinkResponse = _paymentLinksService.PaymentLinks(createPaymentLinkRequest); - PaymentLinksGetSuccessTest(createPaymentLinkResponse.Id); - PaymentLinksPatchSuccessTest(createPaymentLinkResponse.Id); - Assert.IsNotNull(createPaymentLinkResponse); - Assert.IsNotNull(createPaymentLinkResponse.Url); - Assert.IsNotNull(createPaymentLinkResponse.Amount); - Assert.IsNotNull(createPaymentLinkResponse.Reference); - Assert.IsNotNull(createPaymentLinkResponse.ExpiresAt); - } - - private void PaymentLinksGetSuccessTest(string Id) - { - - var createPaymentLinkResponse = _paymentLinksService.GetPaymentLink(Id); - Assert.IsNotNull(createPaymentLinkResponse); - Assert.IsNotNull(createPaymentLinkResponse.Url); - Assert.IsNotNull(createPaymentLinkResponse.Amount); - Assert.IsNotNull(createPaymentLinkResponse.Reference); - Assert.IsNotNull(createPaymentLinkResponse.ExpiresAt); - } - - private void PaymentLinksPatchSuccessTest(string Id) - { - var updatePaymentLinksRequest = new UpdatePaymentLinkRequest(status: UpdatePaymentLinkRequest.StatusEnum.Expired); - - var createPaymentLinkResponse = _paymentLinksService.UpdatePaymentLink(Id, updatePaymentLinksRequest); - Assert.IsNotNull(createPaymentLinkResponse); - Assert.IsNotNull(createPaymentLinkResponse.Url); - Assert.IsNotNull(createPaymentLinkResponse.Amount); - Assert.IsNotNull(createPaymentLinkResponse.Reference); - Assert.IsNotNull(createPaymentLinkResponse.ExpiresAt); - } - - - /// - /// Test success sessions - /// POST /sessions - /// - [TestMethod] - public void CheckoutSessionSuccessTest() - { - var checkoutSessionRequest = new CreateCheckoutSessionRequest - { - MerchantAccount = ClientConstants.MerchantAccount, - Reference = "TestReference", - ReturnUrl = "http://test-url.com", - Amount = new Amount("EUR", 10000L) - }; - var createCheckoutSessionResponse = _checkout.Sessions(checkoutSessionRequest); - Assert.AreEqual(MerchantAccount, createCheckoutSessionResponse.MerchantAccount); - Assert.AreEqual("TestReference", createCheckoutSessionResponse.Reference); - Assert.AreEqual("http://test-url.com", createCheckoutSessionResponse.ReturnUrl); - Assert.AreEqual("EUR", createCheckoutSessionResponse.Amount.Currency); - Assert.AreEqual("10000", createCheckoutSessionResponse.Amount.Value.ToString()); - Assert.IsNotNull(createCheckoutSessionResponse.SessionData); - } - - /// - /// Test success sessions - /// POST /sessions - /// - [TestMethod] - public void CheckoutSessionSuccessWithClientTest() - { - var config = new Config - { - Environment = Environment.Test, - XApiKey = ClientConstants.Xapikey - }; - - var checkoutSessionRequest = new CreateCheckoutSessionRequest - { - MerchantAccount = ClientConstants.MerchantAccount, - Reference = "TestReference", - ReturnUrl = "http://test-url.com", - Amount = new Amount("EUR", 10000L) - }; - var createCheckoutSessionResponse = _paymentsService.Sessions(checkoutSessionRequest); - Assert.AreEqual(MerchantAccount, createCheckoutSessionResponse.MerchantAccount); - Assert.AreEqual("TestReference", createCheckoutSessionResponse.Reference); - Assert.AreEqual("http://test-url.com", createCheckoutSessionResponse.ReturnUrl); - Assert.AreEqual("EUR", createCheckoutSessionResponse.Amount.Currency); - Assert.AreEqual("10000", createCheckoutSessionResponse.Amount.Value.ToString()); - Assert.IsNotNull(createCheckoutSessionResponse.SessionData); - } - - /// - /// Test success capture - /// POST /payments/{paymentPspReference}/captures - /// - [TestMethod] - public void ModificationsCapturesTest() - { - var paymentsResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - var createPaymentCaptureRequest = new Model.Checkout.PaymentCaptureRequest( - amount: new Model.Checkout.Amount(currency: "EUR", value: 500L), reference: "my_capture_reference", - merchantAccount: MerchantAccount); - var paymentCaptureResource = - _modifications.CaptureAuthorisedPayment(paymentsResponse.PspReference, createPaymentCaptureRequest); - Assert.AreEqual(paymentsResponse.PspReference, paymentCaptureResource.PaymentPspReference); - Assert.AreEqual(paymentCaptureResource.Reference, "my_capture_reference"); - } - - /// - /// Test success payments cancels - /// POST /payments/{paymentPspReference}/cancels - /// - [TestMethod] - public void ModificationsCancelsTest() - { - var paymentsResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - var createPaymentCancelRequest = new Model.Checkout.PaymentCancelRequest(reference: "my_cancel_reference", - merchantAccount: MerchantAccount); - var paymentCancelResource = - _modifications.CancelAuthorisedPaymentByPspReference(paymentsResponse.PspReference, createPaymentCancelRequest); - Assert.AreEqual(paymentsResponse.PspReference, paymentCancelResource.PaymentPspReference); - Assert.AreEqual(paymentCancelResource.Reference, "my_cancel_reference"); - } - - /// - /// Test success payments reversals - /// POST /payments/{paymentPspReference}/reversals - /// - [TestMethod] - public void ModificationReversalsTest() - { - var paymentsResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - var createPaymentReversalRequest = new Model.Checkout.PaymentReversalRequest(reference: "my_reversal_reference", - merchantAccount: MerchantAccount); - var paymentReversalResource = - _modifications.RefundOrCancelPayment(paymentsResponse.PspReference, createPaymentReversalRequest); - Assert.AreEqual(paymentsResponse.PspReference, paymentReversalResource.PaymentPspReference); - Assert.AreEqual(paymentReversalResource.Reference, "my_reversal_reference"); - } - - /// - /// Test success payments reversals - /// POST /payments/{paymentPspReference}/reversals - /// - [TestMethod] - public void ModificationsRefundsTest() - { - var paymentsResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - var createPaymentRefundRequest = new Model.Checkout.PaymentRefundRequest( - amount: new Model.Checkout.Amount(currency: "EUR", value: 500L), reference: "my_refund_reference", - merchantAccount: MerchantAccount); - var paymentRefundResource = - _modifications.RefundCapturedPayment(paymentsResponse.PspReference, createPaymentRefundRequest); - Assert.AreEqual(paymentsResponse.PspReference, paymentRefundResource.PaymentPspReference); - Assert.AreEqual(paymentRefundResource.Reference, "my_refund_reference"); - } - - /// - /// Test success payments cancels - /// POST /payments/{paymentPspReference}/amountUpdates - /// - [TestMethod] - public void ModificationsAmountUpdatesTest() - { - var paymentsResponse = _checkout.Payments(CreatePaymentRequestCheckout()); - var createPaymentAmountUpdateRequest = new Model.Checkout.PaymentAmountUpdateRequest( - amount: new Model.Checkout.Amount(currency: "EUR", value: 500L), reference: "my_updates_reference", - merchantAccount: MerchantAccount); - var paymentAmountUpdateResource = - _modifications.UpdateAuthorisedAmount(paymentsResponse.PspReference, createPaymentAmountUpdateRequest); - Assert.AreEqual(paymentsResponse.PspReference, paymentAmountUpdateResource.PaymentPspReference); - Assert.AreEqual(paymentAmountUpdateResource.Reference, "my_updates_reference"); - } - - /// - /// Test success orders cancel - /// GET /storedPaymentMethods - /// - [TestMethod] - public void GetStoredPaymentMethodsTest() - { - // First execute RecurringTest - var test = new RecurringTest(); - test.TestListRecurringDetails(); - var listStoredPaymentMethodsResponse = _recurring.GetTokensForStoredPaymentDetails("test-1234", ClientConstants.MerchantAccount); - Assert.AreEqual("scheme", listStoredPaymentMethodsResponse.StoredPaymentMethods[0].Type); - Assert.AreEqual(ClientConstants.MerchantAccount, listStoredPaymentMethodsResponse.MerchantAccount); - } - } -} diff --git a/Adyen.IntegrationTest/ClientConstants.cs b/Adyen.IntegrationTest/ClientConstants.cs deleted file mode 100644 index 18ef54efc..000000000 --- a/Adyen.IntegrationTest/ClientConstants.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Adyen.IntegrationTest -{ - public class ClientConstants - { - public static readonly string MerchantAccount = Environment.GetEnvironmentVariable("INTEGRATION_MERCHANT_ACCOUNT"); - public static readonly string Xapikey = Environment.GetEnvironmentVariable("INTEGRATION_X_API_KEY"); - - public static readonly string CaUsername = Environment.GetEnvironmentVariable("INTEGRATION_CA_USERNAME"); - public static readonly string CaPassword = Environment.GetEnvironmentVariable("INTEGRATION_CA_PASSWORD"); - } -} \ No newline at end of file diff --git a/Adyen.IntegrationTest/ErrorTest.cs b/Adyen.IntegrationTest/ErrorTest.cs deleted file mode 100644 index f803087cf..000000000 --- a/Adyen.IntegrationTest/ErrorTest.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.Net.Http; -using Adyen.HttpClient; -using Adyen.Model.Checkout; -using Adyen.Service; -using Adyen.Service.Checkout; - -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Amount = Adyen.Model.Payment.Amount; -using Card = Adyen.Model.Payment.Card; -using Environment = Adyen.Model.Environment; -using PaymentRequest = Adyen.Model.Payment.PaymentRequest; -using Recurring = Adyen.Model.Payment.Recurring; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class ErrorTest : BaseTest - { - private Client _client; - private static readonly string MerchantAccount = ClientConstants.MerchantAccount; - private HttpClientWrapper _httpClientWrapper; - - [TestInitialize] - public void Init() - { - _client = CreateApiKeyTestClient(); - _httpClientWrapper = - new HttpClientWrapper(new Config() { Environment = Environment.Test, XApiKey = ClientConstants.Xapikey }, - new System.Net.Http.HttpClient()); - } - - [TestMethod] - public void TestClassicPaymentErrorHandling() - { - var payments = new PaymentService(_client); - var request = new PaymentRequest { - Amount = new Amount(){ - Value = 1500, - Currency = "EUR" - }, - Card = new Card(){ - Number = "4111111111111111", - ExpiryMonth = "03", - ExpiryYear = "2030", - Cvc = "737", - HolderName = "John Smith" - }, - ShopperEmail = "s.hopper@test.com", - ShopperIP = "61.294.12.12", - ShopperReference = "test-1234", - Recurring = new Recurring() - { - Contract = Recurring.ContractEnum.RECURRING - }, - ShopperInteraction = PaymentRequest.ShopperInteractionEnum.Ecommerce, - MerchantAccount = MerchantAccount - }; - try - { - payments.Authorise(request); - } - catch(HttpClientException ex) - { - Assert.AreEqual(ex.ResponseBody, "{\"status\":422,\"errorCode\":\"130\",\"message\":\"Required field 'reference' is not provided.\",\"errorType\":\"validation\"}"); - } - } - - [TestMethod] - public void TestCheckoutErrorHandling() - { - var payments = new PaymentsService(_client); - var request = new Model.Checkout.PaymentRequest { - Amount = new Model.Checkout.Amount(){ - Value = 1500, - Currency = "EUR" - }, - CountryCode = "NL", - PaymentMethod = new CheckoutPaymentMethod( new ApplePayDetails(type: ApplePayDetails.TypeEnum.Applepay)), - Reference = "123456789", - ShopperReference = "Test-Payment1234", - ReturnUrl = "https://your-company.com/...", - MerchantAccount = MerchantAccount - }; - try - { - payments.Payments(request); - } - catch(HttpClientException ex) - { - Assert.IsTrue(ex.ResponseBody.Contains("{\"status\":422,\"errorCode\":\"14_004\",\"message\":\"Missing payment method details\",\"errorType\":\"validation\"")); - } - } - - [TestMethod] - public void TestManagementInvalidParametersHandling() - { - var request = @"{""merchantId"": """+ MerchantAccount + @""", - ""description"": ""City centre store"", - ""shopperStatement"": ""Springfield Shop"", - ""phoneNumber"": ""+1813702551707653"", - ""reference"": ""Spring_store_2"", - ""address"": { - ""country"": ""US"", - ""line1"": ""200 Main Street"", - ""line2"": ""Building 5A"", - ""line3"": ""Suite 3"", - ""city"": ""Springfield"", - ""stateOrProvince"": ""NY"", - ""postalCode"": ""20250"" - }}"; - try - { - _httpClientWrapper.RequestAsync("https://management-test.adyen.com/v1/stores", request, null, HttpMethod.Post).GetAwaiter().GetResult(); - } - catch (HttpClientException ex) - { - Assert.IsTrue(ex.ResponseBody.Contains(@"""title"":""Invalid parameters"",""status"":422,")); - } - } - - [TestMethod] - public void TestManagementBadRequestHandling() - { - try - { - _httpClientWrapper.RequestAsync("https://management-test.adyen.com/v1/stores", "{}", null, HttpMethod.Post).GetAwaiter().GetResult(); - } - catch (HttpClientException ex) - { - Assert.IsTrue(ex.ResponseBody.Contains(@"""title"":""Bad request"",""status"":400,""detail""")); - } - } - } -} - diff --git a/Adyen.IntegrationTest/MarketPayFundTest.cs b/Adyen.IntegrationTest/MarketPayFundTest.cs deleted file mode 100644 index d4c29bcc5..000000000 --- a/Adyen.IntegrationTest/MarketPayFundTest.cs +++ /dev/null @@ -1,112 +0,0 @@ -using Adyen.Model.MarketPay; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class MarketPayFundTest : BaseTest - { - private Client _client; - private Fund _fund; - - [TestInitialize] - public void Init() - { - _client = new Client(ClientConstants.CaUsername, ClientConstants.CaPassword, Model.Enum.Environment.Test); - _fund = new Fund(_client); - } - - /// - /// test /accountHoldertransactionList - /// - [TestMethod] - public void AccountHoldertransactionListResponseSuccess() - { - var accountHolderTransactionListRequest = new AccountHolderTransactionListRequest(accountHolderCode: "LiableAccountHolderPluginDemoMirakl"); - var accountHolderTransactionListResponse = _fund.AccountHolderTransactionList(accountHolderTransactionListRequest); - Assert.IsNotNull(accountHolderTransactionListResponse.PspReference); - Assert.AreEqual("Success", accountHolderTransactionListResponse.ResultCode); - Assert.AreEqual(3, accountHolderTransactionListResponse.AccountTransactionLists.Count); - } - /// - /// test /accountHolderBalance - /// - [TestMethod] - public void AccountHolderBalanceResponse() - { - var accountHolderBalanceRequest = new AccountHolderBalanceRequest(accountHolderCode: "LiableAccountHolderPluginDemoMirakl"); - var accountHolderBalanceResponse = _fund.AccountHolderBalance(accountHolderBalanceRequest); - Assert.IsNotNull(accountHolderBalanceResponse.PspReference); - Assert.AreEqual("112548519", accountHolderBalanceResponse.BalancePerAccount[0].AccountCode); - Assert.AreEqual("128653506", accountHolderBalanceResponse.BalancePerAccount[1].AccountCode); - Assert.AreEqual("162991090", accountHolderBalanceResponse.BalancePerAccount[2].AccountCode); - } - - /// - /// test /refundNotPaidOutTransfers - /// - [TestMethod] - public void TestRefundNotPaidOutTransfersSuccess() - { - var refundNotPaidOutTransfersRequest = new RefundNotPaidOutTransfersRequest(accountCode: "112548519", accountHolderCode: "LiableAccountHolderPluginDemoMirakl"); - var refundNotPaidOutTransfersResponse = _fund.RefundNotPaidOutTransfers(refundNotPaidOutTransfersRequest); - Assert.IsNotNull(refundNotPaidOutTransfersResponse.PspReference); - Assert.AreEqual("Received", refundNotPaidOutTransfersResponse.ResultCode); - } - - /// - /// test /transferFunds - /// Account holder 138423083 has beneficiary setup. Fund transfer is not allowed. it can - /// - public void TestTransferFundsSuccess() - { - var amount = new Amount("EUR", 1000); - var transferFundsRequest = new TransferFundsRequest(amount: amount, destinationAccountCode: "112548519", merchantReference: "merchantReference", sourceAccountCode: "138423083", transferCode: "SUBSCRIPTION"); - var transferFundsResponse = _fund.TransferFunds(transferFundsRequest); - Assert.IsNotNull( transferFundsResponse.PspReference); - Assert.AreEqual("merchantReference", transferFundsResponse.MerchantReference); - Assert.AreEqual("Received", transferFundsResponse.ResultCode); - } - - /// - /// test /setup beneficiary - /// it can be done only once - /// - public void TestSetupBeneficiary() - { - var setupBeneficiaryRequest = new SetupBeneficiaryRequest(destinationAccountCode: "128653506", merchantReference: "LiableAccountHolderPluginDemoMirakl", sourceAccountCode: "138423083"); - var setupBeneficiaryResponse = _fund.SetupBeneficiary(setupBeneficiaryRequest); - Assert.IsNotNull(setupBeneficiaryResponse.PspReference); - Assert.AreEqual("Received", setupBeneficiaryResponse.ResultCode); - } - - /// - /// test /payoutAccountHolder - /// - [TestMethod] - public void TestPayoutAccountHolderSuccess() - { - var amount = new Amount("EUR", 5700); - var payoutAccountHolderRequest = new PayoutAccountHolderRequest( - accountCode: "128653506", accountHolderCode: "LiableAccountHolderPluginDemoMirakl", amount: amount); - var payoutAccountHolderResponse = _fund.PayoutAccountHolder(payoutAccountHolderRequest); - Assert.IsNotNull(payoutAccountHolderResponse.PspReference); - Assert.AreEqual("Received", payoutAccountHolderResponse.ResultCode); - } - - /// - /// test /refundFundsTransfer - /// - [TestMethod] - public void TestRefundFundsTransferSuccess() - { - var amount = new Amount("EUR", 5700); - var refundFundsTransferRequest = new RefundFundsTransferRequest( - originalReference:"reference", amount: amount); - var payoutAccountHolderResponse = _fund.RefundFundsTransfer(refundFundsTransferRequest); - Assert.IsNotNull(payoutAccountHolderResponse.PspReference); - Assert.AreEqual("Received", payoutAccountHolderResponse.ResultCode); - } - } -} diff --git a/Adyen.IntegrationTest/MarketpayAccountTest.cs b/Adyen.IntegrationTest/MarketpayAccountTest.cs deleted file mode 100644 index 9fdf82168..000000000 --- a/Adyen.IntegrationTest/MarketpayAccountTest.cs +++ /dev/null @@ -1,278 +0,0 @@ -using Adyen.Model.MarketPay; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using Account = Adyen.Service.Account; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class MarketpayAccountTest - { - private Client _client; - private Account _account; - - [TestInitialize] - public void Init() - { - _client = new Client(ClientConstants.CaUsername, ClientConstants.CaPassword, Model.Enum.Environment.Test); - _account = new Account(_client); - } - - /// - /// Test /createAccount API call/ - /// Test /closeAccount API call/ - /// - [TestMethod] - public void TestCreateCloseAccountSuccess() - { - var createAccountRequest = new CreateAccountRequest(accountHolderCode: GenerateUniqueAccountHolder()); - var createAccountResponse = _account.CreateAccount(createAccountRequest); - Assert.IsNotNull(createAccountResponse.PspReference); - Assert.IsNotNull(createAccountResponse.AccountCode); - Assert.IsNotNull(createAccountResponse.AccountHolderCode); - - var closeAccountRequest = new CloseAccountRequest(accountCode: createAccountResponse.AccountCode); - var closeAccountResponse = _account.CloseAccount(closeAccountRequest); - Assert.IsNotNull(closeAccountResponse); - Assert.IsNotNull(closeAccountResponse.PspReference); - } - - /// - /// Test /createAccount API call/ - /// Test /closeAccount API call/ - /// - [TestMethod] - public void TestCreateAccountHolderSuccess() - { - var accountHolderResponse = GetCreateAccountHolderResponse(); - Assert.IsNotNull(accountHolderResponse.PspReference); - Assert.IsNotNull(accountHolderResponse.AccountCode); - Assert.IsNotNull(accountHolderResponse.AccountHolderCode); - var closeAccountRequest = - new CloseAccountHolderRequest(accountHolderCode: accountHolderResponse.AccountHolderCode); - var closeAccountResponse = _account.CloseAccountHolder(closeAccountRequest); - Assert.IsNotNull(closeAccountResponse); - Assert.IsNotNull(closeAccountResponse.PspReference); - } - - /// - /// Test /createAccount API call/ - /// Test /closeAccount API call/ - /// - [TestMethod] - public void TestCreateAccountHolderDeleteBankAccountSuccess() - { - var accountHolderResponse = GetCreateAccountHolderResponse(); - Assert.IsNotNull(accountHolderResponse.PspReference); - Assert.IsNotNull(accountHolderResponse.AccountCode); - Assert.IsNotNull(accountHolderResponse.AccountHolderCode); - - var bankAccountUID = accountHolderResponse.AccountHolderDetails.BankAccountDetails[0].BankAccountUUID; - var bankAccountUIDs = new List {{bankAccountUID}}; - var deletePayoutMethodRequest = new DeleteBankAccountRequest( - accountHolderCode: accountHolderResponse.AccountHolderCode, bankAccountUUIDs: bankAccountUIDs); - var genericResponse = _account.DeleteBankAccount(deletePayoutMethodRequest); - Assert.IsNotNull(genericResponse.PspReference); - - var closeAccountRequest = - new CloseAccountHolderRequest(accountHolderCode: accountHolderResponse.AccountHolderCode); - var closeAccountResponse = _account.CloseAccountHolder(closeAccountRequest); - Assert.IsNotNull(closeAccountResponse); - Assert.IsNotNull(closeAccountResponse.PspReference); - } - - /// - /// Test /getAccountHolder API call/ - /// - [TestMethod] - public void TestGetAccountHolders() - { - var getAccountHolderRequest = new GetAccountHolderRequest(accountHolderCode: "TestAccountHolder01"); - var getAccountHolderResponse = _account.GetAccountHolder(getAccountHolderRequest); - Assert.IsNotNull(getAccountHolderResponse.PspReference); - Assert.IsNotNull(getAccountHolderResponse.AccountHolderCode); - Assert.IsNotNull(getAccountHolderResponse.AccountHolderDetails.Email); - } - - /// - /// Test /getUploadedDocuments API call/ - /// - [TestMethod] - public void TestGetUploadDocumentsSuccess() - { - var getUploadDocumentsRequest = new GetUploadedDocumentsRequest(accountHolderCode: "TestAccountHolder01"); - var getUploadDocumentsResponse = _account.GetUploadedDocuments(getUploadDocumentsRequest); - Assert.IsNotNull(getUploadDocumentsResponse.PspReference); - } - - /// - /// Test /updateAccountHolder API call - /// - [TestMethod] - public void TestUpdateAccountHolderSuccess() - { - var createAccountHolderResponse = GetCreateAccountHolderResponse(); - Thread.Sleep(3000); - var accountHolderDetails = createAccountHolderResponse.AccountHolderDetails; - var updateAccountHolderRequest = new UpdateAccountHolderRequest( - accountHolderCode: createAccountHolderResponse.AccountHolderCode, - accountHolderDetails: accountHolderDetails); - updateAccountHolderRequest.LegalEntity = UpdateAccountHolderRequest.LegalEntityEnum.Business; - var updateAccountHolderResponse = _account.UpdateAccountHolder(updateAccountHolderRequest); - Assert.IsNotNull(updateAccountHolderResponse.PspReference); - Thread.Sleep(3000); - var closeAccountRequest = - new CloseAccountHolderRequest(accountHolderCode: createAccountHolderResponse.AccountHolderCode); - var closeAccountResponse = _account.CloseAccountHolder(closeAccountRequest); - } - - - /// - /// Test /updateAccountHolderState API call - /// - [TestMethod] - public void TestUpdateAccountHolderStateSuccess() - { - var createAccountHolderResponse = GetCreateAccountHolderResponse(); - Thread.Sleep(3000); - var updateAccountHolderStateRequest = new UpdateAccountHolderStateRequest( - accountHolderCode: createAccountHolderResponse.AccountHolderCode, reason: "test reason payout", - stateType: UpdateAccountHolderStateRequest.StateTypeEnum.Payout, disable: false); - var updateAccountHolderStateResponse = _account.UpdateAccountHolderState(updateAccountHolderStateRequest); - Assert.IsNotNull(updateAccountHolderStateResponse.PspReference); - Assert.IsNotNull(updateAccountHolderStateResponse.AccountHolderCode); - Thread.Sleep(3000); - var closeAccountRequest = - new CloseAccountHolderRequest(accountHolderCode: createAccountHolderResponse.AccountHolderCode); - var closeAccountResponse = _account.CloseAccountHolder(closeAccountRequest); - } - - /// - /// Test /deletePayoutMethods API call - /// - [TestMethod] - public void TestDeletePayoutMethodsSuccess() - { - var createAccountHolderResponse = GetCreateAccountHolderResponse(); - Thread.Sleep(3000); - var deletePayoutMethodRequest = new DeletePayoutMethodRequest( - accountHolderCode: createAccountHolderResponse.AccountHolderCode, - payoutMethodCodes: new List() {"6026a526-7863-f943-d8ca-f8fadc47473e"}); - var genericResponse = _account.DeletePayoutMethods(deletePayoutMethodRequest); - Assert.IsNotNull(genericResponse.PspReference); - Thread.Sleep(3000); - var closeAccountRequest = - new CloseAccountHolderRequest(accountHolderCode: createAccountHolderResponse.AccountHolderCode); - var closeAccountResponse = _account.CloseAccountHolder(closeAccountRequest); - } - - /// - /// Test /deletePayoutMethods API call - /// - [TestMethod] - public void TestDeleteShareHolderListsSuccess() - { - var createAccountHolderResponse = GetCreateAccountHolderResponse(); - var shareHolderCode = createAccountHolderResponse.Verification.Shareholders[0].ShareholderCode; - var deleteShareholderRequest = new DeleteShareholderRequest( - accountHolderCode: createAccountHolderResponse.AccountHolderCode, - shareholderCodes: new List {{shareHolderCode}}); - var genericResponse = _account.DeleteShareHolder(deleteShareholderRequest); - Assert.IsNotNull(genericResponse.PspReference); - var closeAccountRequest = - new CloseAccountHolderRequest(accountHolderCode: createAccountHolderResponse.AccountHolderCode); - var closeAccountResponse = _account.CloseAccountHolder(closeAccountRequest); - } - - /// - /// Test /checkoutAccountHolder API call - /// - [TestMethod] - public void TestCheckAccountHolderSuccess() - { - var createAccountHolderResponse = GetCreateAccountHolderResponse(); - Thread.Sleep(5000); - Assert.IsNotNull(createAccountHolderResponse.PspReference); - Assert.IsNotNull(createAccountHolderResponse.AccountCode); - Assert.IsNotNull(createAccountHolderResponse.AccountHolderCode); - var performVerificationRequest = new PerformVerificationRequest( - accountHolderCode: createAccountHolderResponse.AccountHolderCode, - accountStateType: PerformVerificationRequest.AccountStateTypeEnum.Processing, tier: 1); - var genericResponse = _account.CheckAccountholder(performVerificationRequest); - Assert.IsNotNull(genericResponse.PspReference); - var closeAccountRequest = - new CloseAccountHolderRequest(accountHolderCode: createAccountHolderResponse.AccountHolderCode); - var closeAccountResponse = _account.CloseAccountHolder(closeAccountRequest); - Assert.IsNotNull(closeAccountResponse); - Assert.IsNotNull(closeAccountResponse.PspReference); - } - - /// - /// Test /suspendAccountHolder API call/ - /// - [TestMethod] - public void TestSuspendAccountHolderSuccess() - { - var createAccountHolderResponse = GetCreateAccountHolderResponse(); - Thread.Sleep(5000); - var suspendAccountHolderRequest = - new SuspendAccountHolderRequest(accountHolderCode: createAccountHolderResponse.AccountHolderCode); - var suspendAccountHolderResponse = _account.SuspendAccountHolder(suspendAccountHolderRequest); - Assert.IsNotNull(suspendAccountHolderResponse.PspReference); - Thread.Sleep(3000); - var closeAccountRequest = - new CloseAccountHolderRequest(accountHolderCode: createAccountHolderResponse.AccountHolderCode); - var closeAccountResponse = _account.CloseAccountHolder(closeAccountRequest); - } - - private CreateAccountHolderResponse GetCreateAccountHolderResponse() - { - var accountHolderCode = GenerateUniqueAccountHolder(); - var viasAddress = new ViasAddress(country: "NL"); - var bankAccountsDetails = new List - { - { - new BankAccountDetail(bankName: "testBank", iban: "NL64INGB0004053953", countryCode: "NL", - currencyCode: "EUR", ownerCountryCode: "NL", ownerCity: "Amsterdam", - ownerDateOfBirth: "1990-1-1", - ownerHouseNumberOrName: "9", ownerName: "John Smoith", ownerNationality: "NL", - ownerPostalCode: "1010js", ownerStreet: "Delfandplein", primaryAccount: true) - } - }; - var name = new ViasName(firstName: "John", lastName: "Smith", gender: ViasName.GenderEnum.MALE); - var phone = "+31061111111112"; - var personalData = new ViasPersonalData(nationality: "NL", dateOfBirth: "1980-01-01"); - var shareholderContract = new List - { - { - new ShareholderContact(address: viasAddress, email: "test@test.com", name: name, - fullPhoneNumber: phone, - personalData: personalData) - }, - { - new ShareholderContact(address: viasAddress, email: "test1@test1.com", name: name, - fullPhoneNumber: phone, personalData: personalData) - } - }; - var businessDetails = new BusinessDetails(doingBusinessAs: "TestBusiness05", - legalBusinessName: "TestBusiness05", shareholders: shareholderContract, taxId: "NL853416084"); - var accountHolderDetails = new AccountHolderDetails(address: viasAddress, - bankAccountDetails: bankAccountsDetails, businessDetails: businessDetails, email: "test@test.com", - webAddress: "http://test.com"); - var createAccountRequest = new CreateAccountHolderRequest(accountHolderCode: accountHolderCode, - accountHolderDetails: accountHolderDetails); - createAccountRequest.CreateDefaultAccount = true; - - createAccountRequest.LegalEntity = CreateAccountHolderRequest.LegalEntityEnum.Business; - return _account.CreateAccountHolder(createAccountRequest); - } - - private string GenerateUniqueAccountHolder() - { - return string.Format("TestAccountHolder" + Guid.NewGuid().ToString().Substring(0, 6)); - } - } -} \ No newline at end of file diff --git a/Adyen.IntegrationTest/Modificationtest.cs b/Adyen.IntegrationTest/Modificationtest.cs deleted file mode 100644 index 23fec99f7..000000000 --- a/Adyen.IntegrationTest/Modificationtest.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System.Net.Http; -using Adyen.HttpClient; -using Adyen.Model.Payment; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class ModificationTest : BaseTest - { - [TestMethod] - public void TestCaptureSuccess() - { - var paymentResultPspReference = GetTestPspReference(); - //Call authorization test - var client = base.CreateApiKeyTestClient(); - var modification = new PaymentService(client); - //Send capture call with psp refernce - var captureRequest = base.CreateCaptureTestRequest(paymentResultPspReference); - var captureResult = modification.Capture(captureRequest); - Assert.AreEqual(captureResult.Response, ModificationResult.ResponseEnum.CaptureReceived); - } - - [TestMethod] - public void TestCancelOrRefundReceived() - { - var paymentResultPspReference = GetTestPspReference(); - //Call authorization test - var client = base.CreateApiKeyTestClient(); - var modification = new PaymentService(client); - var cancelOrRefundRequest = base.CreateCancelOrRefundTestRequest(pspReference: paymentResultPspReference); - var cancelOrRefundResult = modification.CancelOrRefund(cancelOrRefundRequest); - Assert.AreEqual(cancelOrRefundResult.Response, ModificationResult.ResponseEnum.CancelOrRefundReceived); - } - - [TestMethod] - public void TestRefundReceived() - { - var paymentResultPspReference = GetTestPspReference(); - //Call authorization test - var client = base.CreateApiKeyTestClient(); - var modification = new PaymentService(client); - var refundRequest = base.CreateRefundTestRequest(pspReference: paymentResultPspReference); - var refundResult = modification.Refund(refundRequest); - Assert.AreEqual(refundResult.Response, ModificationResult.ResponseEnum.RefundReceived); - } - - [TestMethod] - public void TestCancelReceived() - { - var paymentResultPspReference = GetTestPspReference(); - //Call authorization test - var client = base.CreateApiKeyTestClient(); - var modification = new PaymentService(client); - var cancelRequest = base.CreateCancelTestRequest(pspReference: paymentResultPspReference); - var refundResult = modification.Cancel(cancelRequest); - Assert.AreEqual(refundResult.Response, ModificationResult.ResponseEnum.CancelReceived); - } - - [TestMethod] - public void TestAdjustAuthorisationReceived() - { - var paymentResultPspReference = GetTestPspReference(); - //Call authorization test - var client = base.CreateApiKeyTestClient(); - var modification = new PaymentService(client); - var adjustAuthorisationtestRequest = base.CreateAdjustAuthorisationtestRequest(pspReference: paymentResultPspReference); - var adjustAuthorisationtestResult = modification.AdjustAuthorisation(adjustAuthorisationtestRequest); - Assert.AreEqual(adjustAuthorisationtestResult.Response, ModificationResult.ResponseEnum.AdjustAuthorisationReceived); - } - - [TestMethod] - public void TestTechnicalCancelReceived() - { - var pspRef = GetTestPspReference(); - var client = base.CreateApiKeyTestClient(); - var modification = new PaymentService(client); - var technicalCancelRequest = new TechnicalCancelRequest() - { - MerchantAccount = ClientConstants.MerchantAccount, - OriginalMerchantReference = pspRef, - Reference = "reference123" - }; - var techCancelResponse = modification.TechnicalCancel(technicalCancelRequest); - Assert.AreEqual(techCancelResponse.Response, ModificationResult.ResponseEnum.TechnicalCancelReceived); - } - - [TestMethod] - public void TestDonationReceived() - { - var pspRef = GetTestPspReference(); - var client = base.CreateApiKeyTestClient(); - var modification = new PaymentService(client); - var donationRequest = new DonationRequest() - { - MerchantAccount = ClientConstants.MerchantAccount, - OriginalReference = pspRef, - Reference = "reference123", - ModificationAmount = new Amount("EUR",1), - DonationAccount = "MyCharity_Giving_TEST" - - }; - try - { - modification.DonateAsync(donationRequest).GetAwaiter().GetResult(); - } - catch (HttpClientException e) - { - Assert.AreEqual(403, e.Code); - } - } - } -} diff --git a/Adyen.IntegrationTest/PaymentTest.cs b/Adyen.IntegrationTest/PaymentTest.cs deleted file mode 100644 index e4c0dcbb9..000000000 --- a/Adyen.IntegrationTest/PaymentTest.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using Adyen.Model.Payment; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.Collections.Generic; -using System.Threading.Tasks; -using Adyen.HttpClient; -using Adyen.Model.StoredValue; -using Environment = Adyen.Model.Environment; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class PaymentTest : BaseTest - { - [TestMethod] - public void BasicAuthenticationAuthoriseSuccessTest() - { - var paymentResult = CreatePaymentResult(); - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.Authorised); - Assert.AreEqual("1111", GetAdditionalData(paymentResult.AdditionalData, "cardSummary")); - Assert.IsNotNull(GetAdditionalData(paymentResult.AdditionalData, "avsResult")); - Assert.AreEqual("1 Matches", GetAdditionalData(paymentResult.AdditionalData, "cvcResult")); - Assert.AreEqual("H167852639363479", GetAdditionalData(paymentResult.AdditionalData, "alias")); - Assert.AreEqual("visa", GetAdditionalData(paymentResult.AdditionalData, "paymentMethodVariant")); - Assert.AreEqual("Default", GetAdditionalData(paymentResult.AdditionalData, "aliasType")); - } - - [TestMethod] - public async Task BasicAuthenticationAuthoriseAsyncSuccessTest() - { - var paymentResult = await CreatePaymentResultAsync(); - - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.Authorised); - Assert.AreEqual("1111", GetAdditionalData(paymentResult.AdditionalData, "cardSummary")); - Assert.IsNotNull(GetAdditionalData(paymentResult.AdditionalData, "avsResult")); - Assert.AreEqual("1 Matches", GetAdditionalData(paymentResult.AdditionalData, "cvcResult")); - Assert.AreEqual("H167852639363479", GetAdditionalData(paymentResult.AdditionalData, "alias")); - Assert.AreEqual("visa", GetAdditionalData(paymentResult.AdditionalData, "paymentMethodVariant")); - Assert.AreEqual("Default", GetAdditionalData(paymentResult.AdditionalData, "aliasType")); - } - - [TestMethod] - public void ApiKeyAuthoriseSuccessTest() - { - var paymentResult = CreatePaymentResultWithApiKeyAuthentication(); - - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.Authorised); - Assert.AreEqual("1111", GetAdditionalData(paymentResult.AdditionalData, "cardSummary")); - Assert.IsNotNull(GetAdditionalData(paymentResult.AdditionalData, "avsResult")); - Assert.AreEqual("1 Matches", GetAdditionalData(paymentResult.AdditionalData, "cvcResult")); - Assert.AreEqual("H167852639363479", GetAdditionalData(paymentResult.AdditionalData, "alias")); - Assert.AreEqual("visa", GetAdditionalData(paymentResult.AdditionalData, "paymentMethodVariant")); - Assert.AreEqual("Default", GetAdditionalData(paymentResult.AdditionalData, "aliasType")); - } - - [TestMethod] - public void ApiIdemptotencyKeySuccessTest() - { - var paymentResult1 = CreatePaymentResultWithIdempotency("AUTH_IDEMPOTENCY_KEY_AUTHOR"); - var paymentResult2 = CreatePaymentResultWithIdempotency("AUTH_IDEMPOTENCY_KEY_AUTHOR"); - Assert.AreEqual(paymentResult1.PspReference, paymentResult2.PspReference); - } - - [TestMethod] - public void StoredValueIssueFailIntegrationTest() - { - var client = new Client(new Config() - { - Environment = Environment.Test, - XApiKey = ClientConstants.Xapikey - }); - var service = new StoredValueService(client); - var ex = Assert.ThrowsException(() => service.Issue(new StoredValueIssueRequest())); - Assert.AreEqual(ex.Code, 422); - } - - [TestMethod] - public void ApiIdemptotencyKeyFailTest() - { - try - { - //This key is used by another Merchant account - var paymentResult1 = CreatePaymentResultWithIdempotency("AUTH_IDEMPOTENCY_KEY_AUTHOR"); - var paymentResult2 = CreatePaymentResultWithIdempotency("AUTH_IDEMPOTENCY_KEY_AUTHOR"); - } - catch (HttpClientException ex) - { - Assert.AreEqual(ex.Code, 403); - } - } - - [TestMethod] - public void AuthenticationResult() - { - var authenticationResultRequest = new AuthenticationResultRequest - { - MerchantAccount = ClientConstants.MerchantAccount, - PspReference = GetTestPspReference() - }; - var client = CreateApiKeyTestClient(); - var payment = new PaymentService(client); - try - { - payment.GetAuthenticationResult(authenticationResultRequest); - } - catch (HttpClientException ex) - { - Assert.AreEqual(422, ex.Code); - } - } - - private string GetAdditionalData(Dictionary additionalData, string assertKey) - { - string result = ""; - if (additionalData.ContainsKey(assertKey)) - { - result = additionalData[assertKey]; - } - return result; - } - } -} diff --git a/Adyen.IntegrationTest/PayoutTest.cs b/Adyen.IntegrationTest/PayoutTest.cs deleted file mode 100644 index f4a8e593a..000000000 --- a/Adyen.IntegrationTest/PayoutTest.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Adyen.Service; -using Adyen.Model.Payout; -using Adyen.Model; -using Adyen.HttpClient; -using Adyen.Service.Payout; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class PayoutTest : BaseTest - { - private Client _client; - private InstantPayoutsService _instantPayoutsService; - private InitializationService _initializationService; - private ReviewingService _reviewingService; - - [TestInitialize] - public void Init() - { - _client = this.CreateApiKeyTestClient(); - _instantPayoutsService = new InstantPayoutsService(_client); - _initializationService = new InitializationService(_client); - _reviewingService = new ReviewingService(_client); - } - - [TestMethod] - public void PayoutSuccessTest() - { - var payoutRequest = CreatePayoutRequest(ClientConstants.MerchantAccount); - var result = _instantPayoutsService.Payout(payoutRequest); - Assert.AreEqual(result.ResultCode, PayoutResponse.ResultCodeEnum.Refused); - } - - - [TestMethod] - public void PayoutErrorMissingMerchantTest() - { - var payoutRequest = CreatePayoutRequest(""); - var ex = Assert.ThrowsException(() => _instantPayoutsService.Payout(payoutRequest)); - Assert.AreEqual(ex.Code, 403); - } - - [TestMethod] - public void PayoutErrorMissingReferenceTest() - { - var payoutRequest = CreatePayoutRequest(ClientConstants.MerchantAccount); - payoutRequest.Reference = ""; - var ex = Assert.ThrowsException(() => _instantPayoutsService.Payout(payoutRequest)); - Assert.AreEqual("{\"status\":422,\"errorCode\":\"130\",\"message\":\"Required field 'reference' is not provided.\",\"errorType\":\"validation\"}",ex.ResponseBody); - Assert.AreEqual(422, ex.Code); - } - - private PayoutRequest CreatePayoutRequest(string merchantAccount) - { - var payoutRequest = new PayoutRequest - { - Amount = new Model.Payout.Amount { Currency = "EUR", Value = 10 }, - Card = new Model.Payout.Card - { - Number = "4111111111111111", - ExpiryMonth = "03", - ExpiryYear = "2030", - HolderName = "John Smith", - Cvc = "737" - }, - MerchantAccount = merchantAccount, - Reference = "Your order number from e2e", - ShopperReference = "reference", - }; - return payoutRequest; - } - } -} diff --git a/Adyen.IntegrationTest/RecurringTest.cs b/Adyen.IntegrationTest/RecurringTest.cs deleted file mode 100644 index 42726c666..000000000 --- a/Adyen.IntegrationTest/RecurringTest.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using Adyen.Model.Recurring; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using System.Linq; -using static Adyen.Model.Recurring.Recurring; - -namespace Adyen.IntegrationTest -{ - [TestClass] - public class RecurringTest : BaseTest - { - - [TestMethod] - public void TestListRecurringDetails() - { - var paymentResult = base.CreatePaymentResultWithRecurring(Model.Payment.Recurring.ContractEnum.RECURRING); - var client = CreateApiKeyTestClient(); - var recurring = new Service.RecurringService(client); - var recurringDetailsRequest = this.CreateRecurringDetailsRequest(); - var recurringDetailsResult = recurring.ListRecurringDetails(recurringDetailsRequest); - var recurringDetail = recurringDetailsResult.Details[0].RecurringDetail; - Assert.AreEqual(recurringDetail.PaymentMethodVariant, "visa"); - } - - [TestMethod] - public void TestDisable() - { - var paymentResult = base.CreatePaymentResultWithRecurring(Model.Payment.Recurring.ContractEnum.ONECLICK); - var client = CreateApiKeyTestClient(); - var recurring = new Service.RecurringService(client); - var disableRequest = this.CreateDisableRequest(); - var disableResult = recurring.Disable(disableRequest); - Assert.AreEqual("[all-details-successfully-disabled]", disableResult.Response); - } - - private RecurringDetailsRequest CreateRecurringDetailsRequest() - { - var request = new RecurringDetailsRequest - { - ShopperReference = "test-1234", - MerchantAccount = ClientConstants.MerchantAccount, - Recurring = new Recurring { Contract = ContractEnum.RECURRING } - }; - return request; - } - - private DisableRequest CreateDisableRequest() - { - var request = new DisableRequest - { - ShopperReference = "test-1234", - MerchantAccount = ClientConstants.MerchantAccount - }; - return request; - } - } -} diff --git a/Adyen.Test/AcsWebhooks/AcsWebhooksTest.cs b/Adyen.Test/AcsWebhooks/AcsWebhooksTest.cs new file mode 100644 index 000000000..820a61934 --- /dev/null +++ b/Adyen.Test/AcsWebhooks/AcsWebhooksTest.cs @@ -0,0 +1,143 @@ +using Adyen.AcsWebhooks.Extensions; +using Adyen.AcsWebhooks.Models; +using Adyen.AcsWebhooks.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using System.Text.Json; +using Adyen.AcsWebhooks.Handlers; + +namespace Adyen.Test.AcsWebhooks +{ + [TestClass] + public class AcsWebhooksTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly IAcsWebhooksHandler _acsWebhooksHandler; + + public AcsWebhooksTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureAcsWebhooks((context, services, config) => + { + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + _acsWebhooksHandler = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_Authentication_Webhook_WHen_OOB_TRIGGER_FL_Returns_Correct_Challenge_Flow() + { + // Arrange + string json = @" +{ + ""data"": { + ""authentication"": { + ""acsTransId"": ""6a4c1709-a42e-4c7f-96c7-1043adacfc97"", + ""challenge"": { + ""flow"": ""OOB_TRIGGER_FL"", + ""lastInteraction"": ""2022-12-22T15:49:03+01:00"" + }, + ""challengeIndicator"": ""01"", + ""createdAt"": ""2022-12-22T15:45:03+01:00"", + ""deviceChannel"": ""app"", + ""dsTransID"": ""a3b86754-444d-46ca-95a2-ada351d3f42c"", + ""exemptionIndicator"": ""lowValue"", + ""inPSD2Scope"": true, + ""messageCategory"": ""payment"", + ""messageVersion"": ""2.2.0"", + ""riskScore"": 0, + ""threeDSServerTransID"": ""6edcc246-23ee-4e94-ac5d-8ae620bea7d9"", + ""transStatus"": ""Y"", + ""type"": ""challenge"" + }, + ""balancePlatform"": ""YOUR_BALANCE_PLATFORM"", + ""id"": ""497f6eca-6276-4993-bfeb-53cbbbba6f08"", + ""paymentInstrumentId"": ""PI3227C223222B5BPCMFXD2XG"", + ""purchase"": { + ""date"": ""2022-12-22T15:49:03+01:00"", + ""merchantName"": ""MyShop"", + ""originalAmount"": { + ""currency"": ""EUR"", + ""value"": 1000 + } + }, + ""status"": ""authenticated"" + }, + ""environment"": ""test"", + ""timestamp"": ""2022-12-22T15:42:03+01:00"", + ""type"": ""balancePlatform.authentication.created"" +}"; + + // Act + AuthenticationNotificationRequest r = _acsWebhooksHandler.DeserializeAuthenticationNotificationRequest(json); + + // Assert + Assert.IsNotNull(r); + Assert.AreEqual(AuthenticationNotificationRequest.TypeEnum.BalancePlatformAuthenticationCreated, r.Type); + Assert.AreEqual("test", r.Environment); + Assert.AreEqual(DateTime.Parse("2022-12-22T15:42:03+01:00"), r.Timestamp); + + Assert.IsNotNull(r.Data); + Assert.AreEqual("497f6eca-6276-4993-bfeb-53cbbbba6f08", r.Data.Id); + Assert.AreEqual("YOUR_BALANCE_PLATFORM", r.Data.BalancePlatform); + Assert.AreEqual("PI3227C223222B5BPCMFXD2XG", r.Data.PaymentInstrumentId); + Assert.AreEqual(AuthenticationNotificationData.StatusEnum.Authenticated, r.Data.Status); + + Assert.IsNotNull(r.Data.Purchase); + Assert.AreEqual("2022-12-22T15:49:03+01:00", r.Data.Purchase.Date); + Assert.AreEqual("MyShop", r.Data.Purchase.MerchantName); + Assert.AreEqual("EUR", r.Data.Purchase.OriginalAmount.Currency); + Assert.AreEqual(1000, r.Data.Purchase.OriginalAmount.Value); + + Assert.IsNotNull(r.Data.Authentication); + Assert.AreEqual("6a4c1709-a42e-4c7f-96c7-1043adacfc97", r.Data.Authentication.AcsTransId); + Assert.AreEqual(AuthenticationInfo.ChallengeIndicatorEnum._01, r.Data.Authentication.ChallengeIndicator); + Assert.AreEqual(DateTime.Parse("2022-12-22T15:45:03+01:00"), r.Data.Authentication.CreatedAt); + Assert.AreEqual(AuthenticationInfo.DeviceChannelEnum.App, r.Data.Authentication.DeviceChannel); + Assert.AreEqual("a3b86754-444d-46ca-95a2-ada351d3f42c", r.Data.Authentication.DsTransID); + Assert.AreEqual(AuthenticationInfo.ExemptionIndicatorEnum.LowValue, r.Data.Authentication.ExemptionIndicator); + Assert.IsTrue(r.Data.Authentication.InPSD2Scope); + Assert.AreEqual(AuthenticationInfo.MessageCategoryEnum.Payment, r.Data.Authentication.MessageCategory); + Assert.AreEqual("2.2.0", r.Data.Authentication.MessageVersion); + Assert.AreEqual(0, r.Data.Authentication.RiskScore); + Assert.AreEqual("6edcc246-23ee-4e94-ac5d-8ae620bea7d9", r.Data.Authentication.ThreeDSServerTransID); + Assert.AreEqual(AuthenticationInfo.TransStatusEnum.Y, r.Data.Authentication.TransStatus); + Assert.AreEqual(AuthenticationInfo.TypeEnum.Challenge, r.Data.Authentication.Type); + + Assert.IsNotNull(r.Data.Authentication.Challenge); + Assert.AreEqual(ChallengeInfo.FlowEnum.OOBTRIGGERFL, r.Data.Authentication.Challenge.Flow); + Assert.AreEqual(DateTime.Parse("2022-12-22T15:49:03+01:00"), r.Data.Authentication.Challenge.LastInteraction); + } + + [TestMethod] + public void Given_AccountHolder_Webhook_When_Required_Fields_Are_Unspecified_Result_Should_Throw_ArgumentException() + { + // Arrange + string json = @"{ ""type"": ""unknowntype"" }"; // No Data, no Environment values (which are required)! + + // Act + // Assert + Assert.Throws(() => + { + _acsWebhooksHandler.DeserializeAuthenticationNotificationRequest(json); + }); + } + + [TestMethod] + public void Given_AccountHolder_Webhook_When_Invalid_Json_Result_Should_Throw_JsonException() + { + // Arrange + string json = "{ invalid,.json; }"; + + // Act + // Assert + Assert.Throws(() => + { + _acsWebhooksHandler.DeserializeAuthenticationNotificationRequest(json); + }); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Adyen.Test.csproj b/Adyen.Test/Adyen.Test.csproj index e88cb526f..996b8188b 100644 --- a/Adyen.Test/Adyen.Test.csproj +++ b/Adyen.Test/Adyen.Test.csproj @@ -1,7 +1,7 @@  - net8.0;net6.0 + net8.0 12 enable disable diff --git a/Adyen.Test/BalanceControl/BalanceControlTest.cs b/Adyen.Test/BalanceControl/BalanceControlTest.cs new file mode 100644 index 000000000..a71c543fa --- /dev/null +++ b/Adyen.Test/BalanceControl/BalanceControlTest.cs @@ -0,0 +1,72 @@ +using Adyen.BalanceControl.Client; +using Adyen.BalanceControl.Extensions; +using Adyen.BalanceControl.Models; +using Adyen.BalanceControl.Services; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +namespace Adyen.Test.BalanceControl +{ + [TestClass] + public class BalanceControlTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public BalanceControlTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalanceControl((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_BalanceControlTransfer_Returns_Correct_Status() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/balance-control-transfer.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.CreatedAt, new DateTime(2022,01, 24)); + Assert.AreEqual(response.Status, BalanceTransferResponse.StatusEnum.Transferred); + } + + [TestMethod] + public async Task Given_IBalanceControlService_When_Live_Url_And_Prefix_Are_Set_Returns_Correct_Live_Url_Endpoint() + { + // Arrange + IHost liveHost = Host.CreateDefaultBuilder() + .ConfigureBalanceControl((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = "your-live-api-key"; + options.Environment = AdyenEnvironment.Live; + options.LiveEndpointUrlPrefix = "prefix"; + }); + }) + .Build(); + + // Act + var balanceControlService = liveHost.Services.GetRequiredService(); + + // Assert + Assert.AreEqual("https://prefix-pal-live.adyenpayments.com/pal/servlet/BalanceControl/v1", balanceControlService.HttpClient.BaseAddress.ToString()); + } + + } +} \ No newline at end of file diff --git a/Adyen.Test/BalanceControlTest.cs b/Adyen.Test/BalanceControlTest.cs deleted file mode 100644 index 64d3e92dd..000000000 --- a/Adyen.Test/BalanceControlTest.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using Adyen.Model.BalanceControl; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class BalanceControlTest : BaseTest - { - [TestMethod] - public void BalanceTransferTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balance-control-transfer.json"); - var service = new BalanceControlService(client); - var response = service.BalanceTransfer(new BalanceTransferRequest()); - Assert.AreEqual(response.CreatedAt, new DateTime(2022,01, 24)); - Assert.AreEqual(response.Status, BalanceTransferResponse.StatusEnum.Transferred); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/BalancePlatform/AccountHolders/AccountHolderTest.cs b/Adyen.Test/BalancePlatform/AccountHolders/AccountHolderTest.cs new file mode 100644 index 000000000..3e31dd17f --- /dev/null +++ b/Adyen.Test/BalancePlatform/AccountHolders/AccountHolderTest.cs @@ -0,0 +1,100 @@ +using System.Text.Json; +using Adyen.BalancePlatform.Client; +using Adyen.BalancePlatform.Extensions; +using Adyen.BalancePlatform.Models; +using Adyen.BalancePlatform.Services; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.BalancePlatform.AccountHolders +{ + [TestClass] + public class AccountHolderTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public AccountHolderTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + + [TestMethod] + public async Task Given_AccountHolder_When_Unknown_Enum_Then_Result_Deserialize_To_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/AccountHolderWithUnknownEnum.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(response); + Assert.IsNull(response.Status); + } + + [TestMethod] + public async Task Given_AccountHolder_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/AccountHolder.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Status, AccountHolder.StatusEnum.Active); + Assert.AreEqual(response.Id, "AH32272223222B5CM4MWJ892H"); + } + + [TestMethod] + public async Task Given_PaginatedBalanceAccountsResponse_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/PaginatedAccountHoldersResponse.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Arrange + Assert.AreEqual(response.AccountHolders[0].Id, "AH32272223222B5GFSNSXFFL9"); + Assert.AreEqual(response.AccountHolders[0].Status, AccountHolder.StatusEnum.Active); + } + + [TestMethod] + public async Task Given_IAccountHolderService_When_Live_Url_And_Prefix_Are_Set_Returns_Correct_Live_Url_Endpoint_And_No_Prefix() + { + // Arrange + IHost liveHost = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = "your-live-api-key"; + options.Environment = AdyenEnvironment.Live; + options.LiveEndpointUrlPrefix = "prefix"; + }); + }) + .Build(); + + // Act + var accountHoldersService = liveHost.Services.GetRequiredService(); + + // Assert + Assert.AreEqual("https://balanceplatform-api-live.adyen.com/bcl/v2", accountHoldersService.HttpClient.BaseAddress.ToString()); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/BalancePlatform/BalanceAccounts/BalanceAccountTest.cs b/Adyen.Test/BalancePlatform/BalanceAccounts/BalanceAccountTest.cs new file mode 100644 index 000000000..2c24c10b5 --- /dev/null +++ b/Adyen.Test/BalancePlatform/BalanceAccounts/BalanceAccountTest.cs @@ -0,0 +1,108 @@ +using System.Text.Json; +using Adyen.BalancePlatform.Client; +using Adyen.BalancePlatform.Extensions; +using Adyen.BalancePlatform.Models; +using Adyen.BalancePlatform.Services; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.BalancePlatform.BalanceAccounts +{ + [TestClass] + public class BalanceAccountTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public BalanceAccountTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_BalanceAccounts_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/BalanceAccount.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Status, BalanceAccount.StatusEnum.Active); + Assert.AreEqual(response.Id, "BA3227C223222H5J4DCGQ9V9L"); + } + + [TestMethod] + public async Task Given_SweepConfigurationV2_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/SweepConfiguration.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Status, SweepConfigurationV2.StatusEnum.Active); + Assert.AreEqual(response.Type, SweepConfigurationV2.TypeEnum.Pull); + Assert.AreEqual(response.Id, "SWPC4227C224555B5FTD2NT2JV4WN5"); + } + + [TestMethod] + public async Task Given_BalanceSweepConfigurationsResponse_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/BalanceSweepConfigurationsResponse.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Sweeps[0].Status, SweepConfigurationV2.StatusEnum.Active); + Assert.AreEqual(response.Sweeps[0].Id, "SWPC4227C224555B5FTD2NT2JV4WN5"); + Assert.AreEqual(response.Sweeps[0].Schedule.Type, SweepSchedule.TypeEnum.Daily); + } + + [TestMethod] + public async Task Given_UpdateSweepConfigurationV2_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/SweepConfiguration.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Status, SweepConfigurationV2.StatusEnum.Active); + Assert.AreEqual(response.Type, SweepConfigurationV2.TypeEnum.Pull); + Assert.AreEqual(response.Id, "SWPC4227C224555B5FTD2NT2JV4WN5"); + } + + [TestMethod] + public async Task Given_Deserialize_When_PaginatedPaymentInstrumentsResponse_Returns_Correct_Object() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/PaginatedPaymentInstrumentsResponse.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.PaymentInstruments[0].Status, PaymentInstrument.StatusEnum.Active); + Assert.AreEqual(response.PaymentInstruments[0].Id, "PI32272223222B59M5TM658DT"); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/BalancePlatform/BalancePlatformTest.cs b/Adyen.Test/BalancePlatform/BalancePlatformTest.cs new file mode 100644 index 000000000..e3056971a --- /dev/null +++ b/Adyen.Test/BalancePlatform/BalancePlatformTest.cs @@ -0,0 +1,61 @@ +using System.Text.Json; +using Adyen.BalancePlatform.Client; +using Adyen.BalancePlatform.Extensions; +using Adyen.BalancePlatform.Models; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.BalancePlatform +{ + [TestClass] + public class BalancePlatformTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public BalancePlatformTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_BalancePlatform_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/BalancePlatform.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Status, "Active"); + Assert.AreEqual(response.Id, "YOUR_BALANCE_PLATFORM"); + } + + [TestMethod] + public async Task Given_PaginatedAccountHoldersResponse_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/PaginatedBalanceAccountsResponse.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("BA32272223222B5CTDNB66W2Z", response.BalanceAccounts[0].Id); + Assert.AreEqual(BalanceAccountBase.StatusEnum.Active, response.BalanceAccounts[1].Status); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/BalancePlatform/PaymentInstrumentGroups/PaymentInstrumentGroupTest.cs b/Adyen.Test/BalancePlatform/PaymentInstrumentGroups/PaymentInstrumentGroupTest.cs new file mode 100644 index 000000000..f7cc1f109 --- /dev/null +++ b/Adyen.Test/BalancePlatform/PaymentInstrumentGroups/PaymentInstrumentGroupTest.cs @@ -0,0 +1,63 @@ +using System.Text.Json; +using Adyen.BalancePlatform.Client; +using Adyen.BalancePlatform.Extensions; +using Adyen.BalancePlatform.Models; +using Adyen.BalancePlatform.Services; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.BalancePlatform.PaymentInstrumentGroups +{ + [TestClass] + public class PaymentInstrumentGroupTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public PaymentInstrumentGroupTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_PaymentInstrumentGroup_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/PaymentInstrumentGroup.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Id, "PG3227C223222B5CMD3FJFKGZ"); + Assert.AreEqual(response.BalancePlatform, "YOUR_BALANCE_PLATFORM"); + } + + [TestMethod] + public async Task Given_TransactionRulesResponse_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/TransactionRulesResponse.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Arrange + Assert.AreEqual(response.TransactionRules[0].Type, TransactionRule.TypeEnum.Velocity); + Assert.AreEqual(response.TransactionRules[0].Id, "TR3227C223222C5GXR3XP596N"); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/BalancePlatform/PaymentInstruments/PaymentInstrumentTest.cs b/Adyen.Test/BalancePlatform/PaymentInstruments/PaymentInstrumentTest.cs new file mode 100644 index 000000000..2e8ccd257 --- /dev/null +++ b/Adyen.Test/BalancePlatform/PaymentInstruments/PaymentInstrumentTest.cs @@ -0,0 +1,49 @@ +using System.Text.Json; +using Adyen.BalancePlatform.Client; +using Adyen.BalancePlatform.Extensions; +using Adyen.BalancePlatform.Models; +using Adyen.BalancePlatform.Services; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.BalancePlatform.PaymentInstruments +{ + [TestClass] + public class PaymentInstrumentTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public PaymentInstrumentTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_PaymentInstrument_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/PaymentInstrument.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.BalanceAccountId, "BA3227C223222B5CTBLR8BWJB"); + Assert.AreEqual(response.Type, PaymentInstrument.TypeEnum.BankAccount); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/BalancePlatform/TransactionRules/TransactionRuleTest.cs b/Adyen.Test/BalancePlatform/TransactionRules/TransactionRuleTest.cs new file mode 100644 index 000000000..82b13cf91 --- /dev/null +++ b/Adyen.Test/BalancePlatform/TransactionRules/TransactionRuleTest.cs @@ -0,0 +1,112 @@ +using System.Text.Json; +using Adyen.BalancePlatform.Client; +using Adyen.BalancePlatform.Extensions; +using Adyen.BalancePlatform.Models; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.BalancePlatform.TransactionRules +{ + [TestClass] + public class TransactionRuleTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public TransactionRuleTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_TransactionRule_Serialize_Correctly() + { + // Arrange + var target = new TransactionRule( + description: "Allow only point-of-sale transactions", + reference: "YOUR_REFERENCE_4F7346", + entityKey: new TransactionRuleEntityKey(entityType: "paymentInstrument", entityReference: "PI3227C223222B5BPCMFXD2XG"), + status: TransactionRule.StatusEnum.Active, + interval: new TransactionRuleInterval("perTransaction"), + ruleRestrictions: new TransactionRuleRestrictions( + processingTypes: new ProcessingTypesRestriction( + operation: "noneMatch", + value: new List + { + ProcessingTypesRestriction.ValueEnum.Pos, + ProcessingTypesRestriction.ValueEnum.Ecommerce + }) + ), + type: "blockList" + ); + + // Act + string result = JsonSerializer.Serialize(target, _jsonSerializerOptionsProvider.Options); + + // Assert + JsonDocument jsonDoc = JsonDocument.Parse(result); + JsonElement root = jsonDoc.RootElement; + + Assert.AreEqual("Allow only point-of-sale transactions", root.GetProperty("description").GetString()); + Assert.AreEqual("YOUR_REFERENCE_4F7346", root.GetProperty("reference").GetString()); + + JsonElement entityKey = root.GetProperty("entityKey"); + Assert.AreEqual("paymentInstrument", entityKey.GetProperty("entityType").GetString()); + Assert.AreEqual("PI3227C223222B5BPCMFXD2XG", entityKey.GetProperty("entityReference").GetString()); + Assert.AreEqual("active", root.GetProperty("status").GetString()); + + JsonElement interval = root.GetProperty("interval"); + Assert.AreEqual("perTransaction", interval.GetProperty("type").GetString()); + + JsonElement processingTypes = root.GetProperty("ruleRestrictions").GetProperty("processingTypes"); + Assert.AreEqual("noneMatch", processingTypes.GetProperty("operation").GetString()); + + JsonElement.ArrayEnumerator values = processingTypes.GetProperty("value").EnumerateArray(); + Assert.IsTrue(values.Any(v => v.GetString() == "pos") && values.Any(v => v.GetString() == "ecommerce")); + Assert.AreEqual("blockList", root.GetProperty("type").GetString()); + } + + [TestMethod] + public async Task Given_TransactionRule_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/TransactionRule.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.EntityKey.EntityReference, "PI3227C223222B5BPCMFXD2XG"); + Assert.AreEqual(response.EntityKey.EntityType, "paymentInstrument"); + Assert.AreEqual(response.Interval.Type, TransactionRuleInterval.TypeEnum.PerTransaction); + Assert.AreEqual(response.RuleRestrictions.ProcessingTypes.Operation, "noneMatch"); + } + + [TestMethod] + public async Task Given_TransactionRuleResponse_Deserialize_Correctly() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/TransactionRuleResponse.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.TransactionRule.Id, "TR32272223222B5GFSGFLFCHM"); + Assert.AreEqual(response.TransactionRule.Interval.Type, TransactionRuleInterval.TypeEnum.PerTransaction); + Assert.AreEqual(response.TransactionRule.RuleRestrictions.ProcessingTypes.Operation, "noneMatch"); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/BalancePlatform/TransferLimits/TransferLimitsBalanceAccountLevelTest.cs b/Adyen.Test/BalancePlatform/TransferLimits/TransferLimitsBalanceAccountLevelTest.cs new file mode 100644 index 000000000..f745e6e50 --- /dev/null +++ b/Adyen.Test/BalancePlatform/TransferLimits/TransferLimitsBalanceAccountLevelTest.cs @@ -0,0 +1,88 @@ +using System.Text.Json; +using Adyen.BalancePlatform.Client; +using Adyen.BalancePlatform.Extensions; +using Adyen.BalancePlatform.Models; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.BalancePlatform.TransferLimits +{ + [TestClass] + public class TransferLimitsBalanceAccountLevelTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public TransferLimitsBalanceAccountLevelTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public void GetTransferLimitDeserializes() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/balanceplatform/TransferLimit.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(10000, response.Amount.Value); + Assert.AreEqual("EUR", response.Amount.Currency); + Assert.AreEqual("TRLI00000000000000000000000001", response.Id); + Assert.AreEqual(Scope.PerTransaction, response.Scope); + Assert.AreEqual("Your reference for the transfer limit", response.Reference); + Assert.AreEqual(ScaStatus.Pending, response.ScaInformation.Status); + Assert.AreEqual(LimitStatus.PendingSCA, response.LimitStatus); + Assert.AreEqual(TransferType.All, response.TransferType); + } + + [TestMethod] + public void GetTransferLimitsListDeserializes() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/balanceplatform/TransferLimits.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(2, response.TransferLimits.Count); + + Assert.AreEqual(10000, response.TransferLimits[0].Amount.Value); + Assert.AreEqual("EUR", response.TransferLimits[0].Amount.Currency); + Assert.AreEqual("TRLI00000000000000000000000001", response.TransferLimits[0].Id); + Assert.AreEqual(Scope.PerTransaction, response.TransferLimits[0].Scope); + Assert.AreEqual("Your reference for the transfer limit", response.TransferLimits[0].Reference); + Assert.AreEqual(ScaExemption.InitialLimit, response.TransferLimits[0].ScaInformation.Exemption); + Assert.AreEqual(ScaStatus.NotPerformed, response.TransferLimits[0].ScaInformation.Status); + Assert.AreEqual(LimitStatus.Active, response.TransferLimits[0].LimitStatus); + Assert.AreEqual(TransferType.Instant, response.TransferLimits[0].TransferType); + + Assert.AreEqual(20000, response.TransferLimits[1].Amount.Value); + Assert.AreEqual("EUR", response.TransferLimits[1].Amount.Currency); + Assert.AreEqual("TRLI00000000000000000000000002", response.TransferLimits[1].Id); + Assert.AreEqual(Scope.PerTransaction, response.TransferLimits[1].Scope); + Assert.AreEqual("Your reference for the transfer limit", response.TransferLimits[1].Reference); + Assert.AreEqual(ScaExemption.InitialLimit, response.TransferLimits[1].ScaInformation.Exemption); + Assert.AreEqual(ScaStatus.NotPerformed, response.TransferLimits[1].ScaInformation.Status); + Assert.AreEqual(LimitStatus.Active, response.TransferLimits[1].LimitStatus); + Assert.AreEqual(TransferType.All, response.TransferLimits[1].TransferType); + } + } +} diff --git a/Adyen.Test/BalancePlatform/TransferLimits/TransferLimitsBalancePlatformLevelTest.cs b/Adyen.Test/BalancePlatform/TransferLimits/TransferLimitsBalancePlatformLevelTest.cs new file mode 100644 index 000000000..00fdbe218 --- /dev/null +++ b/Adyen.Test/BalancePlatform/TransferLimits/TransferLimitsBalancePlatformLevelTest.cs @@ -0,0 +1,125 @@ +using System.Net; +using System.Text.Json; +using Adyen.BalancePlatform.Client; +using Adyen.BalancePlatform.Extensions; +using Adyen.BalancePlatform.Models; +using Adyen.BalancePlatform.Services; +using Adyen.Core.Options; +using Adyen.LegalEntityManagement.Services; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.BalancePlatform.TransferLimits +{ + [TestClass] + public class TransferLimitsBalancePlatformLevelTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly ITransferLimitsBalanceAccountLevelService _transferLimitsBalanceAccountLevelService; + + + public TransferLimitsBalancePlatformLevelTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + _transferLimitsBalanceAccountLevelService = Substitute.For(); + + } + + [TestMethod] + public void GetTransferLimitDeserializes() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/balanceplatform/TransferLimit.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(10000, response.Amount.Value); + Assert.AreEqual("EUR", response.Amount.Currency); + Assert.AreEqual("TRLI00000000000000000000000001", response.Id); + Assert.AreEqual(Scope.PerTransaction, response.Scope); + Assert.AreEqual("Your reference for the transfer limit", response.Reference); + Assert.AreEqual(ScaStatus.Pending, response.ScaInformation.Status); + Assert.AreEqual(LimitStatus.PendingSCA, response.LimitStatus); + Assert.AreEqual(TransferType.All, response.TransferType); + } + + [TestMethod] + public void GetTransferLimitsListDeserializes() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/balanceplatform/TransferLimits.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(2, response.TransferLimits.Count); + + Assert.AreEqual(10000, response.TransferLimits[0].Amount.Value); + Assert.AreEqual("EUR", response.TransferLimits[0].Amount.Currency); + Assert.AreEqual("TRLI00000000000000000000000001", response.TransferLimits[0].Id); + Assert.AreEqual(Scope.PerTransaction, response.TransferLimits[0].Scope); + Assert.AreEqual("Your reference for the transfer limit", response.TransferLimits[0].Reference); + Assert.AreEqual(ScaExemption.InitialLimit, response.TransferLimits[0].ScaInformation.Exemption); + Assert.AreEqual(ScaStatus.NotPerformed, response.TransferLimits[0].ScaInformation.Status); + Assert.AreEqual(LimitStatus.Active, response.TransferLimits[0].LimitStatus); + Assert.AreEqual(TransferType.Instant, response.TransferLimits[0].TransferType); + + Assert.AreEqual(20000, response.TransferLimits[1].Amount.Value); + Assert.AreEqual("EUR", response.TransferLimits[1].Amount.Currency); + Assert.AreEqual("TRLI00000000000000000000000002", response.TransferLimits[1].Id); + Assert.AreEqual(Scope.PerTransaction, response.TransferLimits[1].Scope); + Assert.AreEqual("Your reference for the transfer limit", response.TransferLimits[1].Reference); + Assert.AreEqual(ScaExemption.InitialLimit, response.TransferLimits[1].ScaInformation.Exemption); + Assert.AreEqual(ScaStatus.NotPerformed, response.TransferLimits[1].ScaInformation.Status); + Assert.AreEqual(LimitStatus.Active, response.TransferLimits[1].LimitStatus); + Assert.AreEqual(TransferType.All, response.TransferLimits[1].TransferType); + } + + /// + /// Test GetLegalEntity + /// + [TestMethod] + public async Task GetSpecificTransferLimitAsync() + { + string json = TestUtilities.GetTestFileContent("mocks/balanceplatform/TransferLimit.json"); + + _transferLimitsBalanceAccountLevelService.GetSpecificTransferLimitAsync(Arg.Any(), Arg.Any()) + .Returns( + Task.FromResult( + new TransferLimitsBalanceAccountLevelService.GetSpecificTransferLimitApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage(), + json, + "/balanceAccounts/BA1234567890/transferLimits/TRLI00000000000000000000000001", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + IGetSpecificTransferLimitApiResponse response = await _transferLimitsBalanceAccountLevelService.GetSpecificTransferLimitAsync("BA1234567890","TRLI00000000000000000000000001"); + + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + Assert.AreEqual("TRLI00000000000000000000000001", response.Ok().Id); + } + + } +} diff --git a/Adyen.Test/BalancePlatformTest.cs b/Adyen.Test/BalancePlatformTest.cs deleted file mode 100644 index 012033c19..000000000 --- a/Adyen.Test/BalancePlatformTest.cs +++ /dev/null @@ -1,449 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using Adyen.Model.BalancePlatform; -using Adyen.Service.BalancePlatform; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using NSubstitute; - -namespace Adyen.Test -{ - [TestClass] - public class BalancePlatformTest : BaseTest - { - #region AccountHolders - - /// - /// Test GetAccountHoldersId - /// - [TestMethod] - public void GetAccountHoldersIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/AccountHolder.json"); - var service = new AccountHoldersService(client); - - var response = service.GetAccountHolder("AH32272223222B5CM4MWJ892H"); - Assert.AreEqual(response.Status, AccountHolder.StatusEnum.Active); - Assert.AreEqual(response.Id, "AH32272223222B5CM4MWJ892H"); - } - - /// - /// Test PostAccountHolders - /// - [TestMethod] - public void PostAccountHoldersTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/AccountHolder.json"); - var service = new AccountHoldersService(client); - var accountHolder = new AccountHolderInfo() - { - BalancePlatform = "balance" - }; - var response = service.CreateAccountHolder(accountHolder); - Assert.AreEqual(response.Status, AccountHolder.StatusEnum.Active); - Assert.AreEqual(response.Id, "AH32272223222B5CM4MWJ892H"); - } - - /// - /// Test PatchAccountHoldersId - /// - [TestMethod] - public void PatchAccountHoldersIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/AccountHolder.json"); - var service = new AccountHoldersService(client); - var accountHolder = new AccountHolderUpdateRequest() - { - BalancePlatform = "balance" - }; - var response = service.UpdateAccountHolder("AH32272223222B5CM4MWJ892H", accountHolder); - Assert.AreEqual(response.Status, AccountHolder.StatusEnum.Active); - Assert.AreEqual(response.Id, "AH32272223222B5CM4MWJ892H"); - } - - /// - /// Test GetAccountHoldersIdBalanceAccountsAsync - /// - [TestMethod] - public void GetAccountHoldersIdBalanceAccountsAsyncTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/PaginatedBalanceAccountsResponse.json"); - var service = new AccountHoldersService(client); - - var response = service.GetAllBalanceAccountsOfAccountHolderAsync("id", offset: 1, limit: 3).Result; - Assert.AreEqual("BA32272223222B59K6ZXHBFN6", response.BalanceAccounts[0].Id); - Assert.AreEqual(BalanceAccountBase.StatusEnum.Closed, response.BalanceAccounts[1].Status); - ClientInterfaceSubstitute.Received() - .RequestAsync( - "https://balanceplatform-api-test.adyen.com/bcl/v2/accountHolders/id/balanceAccounts?offset=1&limit=3", - null, null, HttpMethod.Get, default); - } - - /// - /// Test GetAccountHoldersId with additional attributes does not throw - /// - [TestMethod] - public void GetAccountHoldersIdWithAdditionalAttributesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/AccountHolderAdditionalAttribute.json"); - var service = new AccountHoldersService(client); - - // Test that no exception is thrown when calling GetAccountHolder - try - { - var response = service.GetAccountHolder("AH32272223222B5CM4MWJ892H"); - Assert.IsNotNull(response); - } - catch (Exception ex) - { - Assert.Fail($"Expected no exception, but got: {ex}"); - } - } - - #endregion - - #region BalanceAccounts - - /// - /// Test GetBalanceAccountsId - /// - [TestMethod] - public void GetBalanceAccountsIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/BalanceAccount.json"); - var service = new BalanceAccountsService(client); - - var response = service.GetBalanceAccount("AH32272223222B5CM4MWJ892H"); - Assert.AreEqual(response.Status, BalanceAccount.StatusEnum.Active); - Assert.AreEqual(response.Id, "BA3227C223222B5BLP6JQC3FD"); - } - - /// - /// Test GetBalanceAccountsId - /// - [TestMethod] - public void PostBalanceAccountsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/BalanceAccount.json"); - var service = new BalanceAccountsService(client); - var balanceAccountInfo = new BalanceAccountInfo() - { - AccountHolderId = "accountHolderId" - }; - var response = service.CreateBalanceAccount(balanceAccountInfo); - Assert.AreEqual(response.Status, BalanceAccount.StatusEnum.Active); - Assert.AreEqual(response.Id, "BA3227C223222B5BLP6JQC3FD"); - } - - /// - /// Test PatchBalanceAccountsIdAsync - /// - [TestMethod] - public void PatchBalanceAccountsIdAsyncTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/BalanceAccount.json"); - var service = new BalanceAccountsService(client); - var response = service.UpdateBalanceAccountAsync("BA3227C223222B5BLP6JQC3FD", new BalanceAccountUpdateRequest()).Result; - Assert.AreEqual(response.Status, BalanceAccount.StatusEnum.Active); - Assert.AreEqual(response.Id, "BA3227C223222B5BLP6JQC3FD"); - } - - /// - /// Test PostBalanceAccountsBalanceAccountIdSweeps - /// - [TestMethod] - public void PostBalanceAccountsBalanceAccountIdSweepsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/SweepConfiguration.json"); - var service = new BalanceAccountsService(client); - - var response = service.CreateSweep("1245yhgeswkrw", new CreateSweepConfigurationV2()); - Assert.AreEqual(response.Status, SweepConfigurationV2.StatusEnum.Active); - Assert.AreEqual(response.Type, SweepConfigurationV2.TypeEnum.Pull); - } - - /// - /// Test GetBalanceAccountsBalanceAccountIdSweeps - /// - [TestMethod] - public void GetBalanceAccountsBalanceAccountIdSweepsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/BalanceSweepConfigurationsResponse.json"); - var service = new BalanceAccountsService(client); - - var response = service.GetAllSweepsForBalanceAccount("balanceAccountId"); - Assert.AreEqual(response.Sweeps[0].Status, SweepConfigurationV2.StatusEnum.Active); - Assert.AreEqual(response.Sweeps[0].Id, "SWPC4227C224555B5FTD2NT2JV4WN5"); - var schedule = response.Sweeps[0].Schedule.Type; - Assert.AreEqual(schedule, SweepSchedule.TypeEnum.Daily); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://balanceplatform-api-test.adyen.com/bcl/v2/balanceAccounts/balanceAccountId/sweeps", - null, - null, HttpMethod.Get, new CancellationToken()); - } - - /// - /// Test PatchBalanceAccountsBalanceAccountIdSweepsSweepId - /// - [TestMethod] - public void PatchBalanceAccountsBalanceAccountIdSweepsSweepIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/SweepConfiguration.json"); - var service = new BalanceAccountsService(client); - - var response = service.UpdateSweep("balanceID", "sweepId",new UpdateSweepConfigurationV2()); - Assert.AreEqual(response.Status, SweepConfigurationV2.StatusEnum.Active); - Assert.AreEqual(response.Type, SweepConfigurationV2.TypeEnum.Pull); - } - - /// - /// Test DeleteBalanceAccountsBalanceAccountIdSweepsSweepId - /// - [TestMethod] - public void DeleteBalanceAccountsBalanceAccountIdSweepsSweepIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/SweepConfiguration.json"); - var service = new BalanceAccountsService(client); - service.DeleteSweep("balanceID", "sweepId"); - } - - /// - /// Test PatchBalanceAccountsBalanceAccountIdSweepsSweepId - /// - [TestMethod] - public void GetBalanceAccountsIdPaymentInstrumentsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/PaginatedPaymentInstrumentsResponse.json"); - var service = new BalanceAccountsService(client); - - var response = service.GetPaymentInstrumentsLinkedToBalanceAccount("balanceID"); - Assert.AreEqual(response.PaymentInstruments[0].Status, PaymentInstrument.StatusEnum.Active); - Assert.AreEqual(response.PaymentInstruments[0].Id, "PI32272223222B59M5TM658DT"); - } - #endregion - - #region General - - /// - /// Test GetBalancePlatformsId - /// - [TestMethod] - public void GetBalancePlatformsIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/BalancePlatform.json"); - var service = new PlatformService(client); - - var response = service.GetBalancePlatform("uniqueIdentifier"); - Assert.AreEqual(response.Status, "Active"); - Assert.AreEqual(response.Id, "YOUR_BALANCE_PLATFORM"); - } - - /// - /// Test GetBalancePlatformsIdAccountHolders - /// - [TestMethod] - public void GetBalancePlatformsIdAccountHoldersTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/PaginatedAccountHoldersResponse.json"); - var service = new PlatformService(client); - - var response = service.GetAllAccountHoldersUnderBalancePlatform("uniqueIdentifier"); - Assert.AreEqual(response.AccountHolders[0].Id, "AH32272223222B59DDWSCCMP7"); - Assert.AreEqual(response.AccountHolders[0].Status, AccountHolder.StatusEnum.Active); - } - - #endregion - - #region PaymentInstrumentGroups - - /// - /// Test GetPaymentInstrumentGroupsId - /// - [TestMethod] - public void GetPaymentInstrumentGroupsIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/PaymentInstrumentGroup.json"); - var service = new PaymentInstrumentGroupsService(client); - - var response = service.GetPaymentInstrumentGroup("uniqueIdentifier"); - Assert.AreEqual(response.Id, "PG3227C223222B5CMD3FJFKGZ"); - Assert.AreEqual(response.BalancePlatform, "YOUR_BALANCE_PLATFORM"); - } - - /// - /// Test PostPaymentInstrumentGroups - /// - [TestMethod] - public void PostPaymentInstrumentGroupsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/PaymentInstrumentGroup.json"); - var service = new PaymentInstrumentGroupsService(client); - - var response = service.CreatePaymentInstrumentGroup(new PaymentInstrumentGroupInfo()); - Assert.AreEqual(response.Id, "PG3227C223222B5CMD3FJFKGZ"); - Assert.AreEqual(response.BalancePlatform, "YOUR_BALANCE_PLATFORM"); - } - - /// - /// Test GetPaymentInstrumentGroupsIdTransactionRules - /// - [TestMethod] - public void GetPaymentInstrumentGroupsIdTransactionRulesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/TransactionRulesResponse.json"); - var service = new PaymentInstrumentGroupsService(client); - - var response = service.GetAllTransactionRulesForPaymentInstrumentGroup("id"); - Assert.AreEqual(response.TransactionRules[0].Type, TransactionRule.TypeEnum.Velocity); - Assert.AreEqual(response.TransactionRules[0].Id, "TR32272223222B5CMDGMC9F4F"); - } - - #endregion - - #region PaymenInstruments - - /// - /// Test GetPaymentInstrumentGroupsId - /// - [TestMethod] - public void PostPaymentInstrumentsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/PaymentInstrument.json"); - var service = new PaymentInstrumentsService(client); - - var response = service.CreatePaymentInstrument(new PaymentInstrumentInfo()); - Assert.AreEqual(response.BalanceAccountId, "BA3227C223222B5CTBLR8BWJB"); - Assert.AreEqual(response.Type, PaymentInstrument.TypeEnum.BankAccount); - } - - /// - /// Test PatchPaymentInstrumentsId - /// - [TestMethod] - public void PatchPaymentInstrumentsIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/PaymentInstrument.json"); - var service = new PaymentInstrumentsService(client); - - var response = service.UpdatePaymentInstrument("id", new PaymentInstrumentUpdateRequest()); - Assert.AreEqual(response.BalanceAccountId, "BA3227C223222B5CTBLR8BWJB"); - Assert.AreEqual(response.Type, UpdatePaymentInstrument.TypeEnum.BankAccount); - } - - /// - /// Test GetPaymentInstrumentsId - /// - [TestMethod] - public void GetPaymentInstrumentsIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/PaymentInstrument.json"); - var service = new PaymentInstrumentsService(client); - - var response = service.GetPaymentInstrument("id"); - Assert.AreEqual(response.BalanceAccountId, "BA3227C223222B5CTBLR8BWJB"); - Assert.AreEqual(response.Type, PaymentInstrument.TypeEnum.BankAccount); - } - - /// - /// Test GetPaymentInstrumentsIdTransactionRules - /// - [TestMethod] - public void GetPaymentInstrumentsIdTransactionRulesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/TransactionRulesResponse.json"); - var service = new PaymentInstrumentsService(client); - - var response = service.GetAllTransactionRulesForPaymentInstrument("id"); - Assert.AreEqual(response.TransactionRules[0].Id, "TR32272223222B5CMDGMC9F4F"); - Assert.AreEqual(response.TransactionRules[0].Type, TransactionRule.TypeEnum.Velocity); - } - - #endregion - - #region TransactionRules - - /// - /// Test PostTransactionRules - /// - [TestMethod] - public void PostTransactionRulesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/TransactionRule.json"); - var service = new TransactionRulesService(client); - - var response = service.CreateTransactionRule(new TransactionRuleInfo()); - Assert.AreEqual(response.EntityKey.EntityReference, "PI3227C223222B5BPCMFXD2XG"); - Assert.AreEqual(response.EntityKey.EntityType, "paymentInstrument"); - Assert.AreEqual(response.Interval.Type, TransactionRuleInterval.TypeEnum.PerTransaction); - } - - /// - /// Test PatchTransactionRulesTransactionRuleId - /// - [TestMethod] - public void PatchTransactionRulesTransactionRuleIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/TransactionRule.json"); - var service = new TransactionRulesService(client); - - var response = service.UpdateTransactionRule("transactionRuleId", new TransactionRuleInfo()); - Assert.AreEqual(response.EntityKey.EntityReference, "PI3227C223222B5BPCMFXD2XG"); - Assert.AreEqual(response.EntityKey.EntityType, "paymentInstrument"); - Assert.AreEqual(response.Interval.Type, TransactionRuleInterval.TypeEnum.PerTransaction); - } - - /// - /// Test GetTransactionRulesTransactionRuleId - /// - [TestMethod] - public void GetTransactionRulesTransactionRuleIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/TransactionRuleResponse.json"); - var service = new TransactionRulesService(client); - - var response = service.GetTransactionRule("transactionRuleId"); - Assert.AreEqual(response.TransactionRule.Id, "TR32272223222B5CMD3V73HXG"); - Assert.AreEqual(response.TransactionRule.Interval.Type, TransactionRuleInterval.TypeEnum.Monthly); - } - - /// - /// Test DeleteTransactionRulesTransactionRuleId - /// - [TestMethod] - public void DeleteTransactionRulesTransactionRuleIdTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/TransactionRuleResponse.json"); - var service = new TransactionRulesService(client); - var response = service.DeleteTransactionRule("transactionRuleId"); - - } - #endregion - - #region BankAccountValidation - /// - /// Test /validateBankAccountIdentification - /// - [TestMethod] - public void ValidateBankAccountTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/balanceplatform/TransactionRuleResponse.json"); - var service = new BankAccountValidationService(client); - var bankAccountIdentificationValidationRequest = new BankAccountIdentificationValidationRequest - { - AccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification( - new CZLocalAccountIdentification - { - AccountNumber = "123456789", - BankCode = "bankCode", - Type = CZLocalAccountIdentification.TypeEnum.CzLocal - }) - }; - service.ValidateBankAccountIdentification(bankAccountIdentificationValidationRequest); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://balanceplatform-api-test.adyen.com/bcl/v2/validateBankAccountIdentification", - Arg.Any(), - null, HttpMethod.Post, new CancellationToken()); - } - #endregion - } -} \ No newline at end of file diff --git a/Adyen.Test/BalancePlatformWebhookHandlerTest.cs b/Adyen.Test/BalancePlatformWebhookHandlerTest.cs new file mode 100644 index 000000000..e7a08d13e --- /dev/null +++ b/Adyen.Test/BalancePlatformWebhookHandlerTest.cs @@ -0,0 +1,504 @@ +// using System; +// using System.Text.Json; +// using Adyen.AcsWebhooks.Extensions; +// using Adyen.AcsWebhooks.Handlers; +// using Adyen.ConfigurationWebhooks.Client; +// using Adyen.ConfigurationWebhooks.Handlers; +// using Adyen.Model.AcsWebhooks; +// using Adyen.Model.ConfigurationWebhooks; +// using Adyen.Model.NegativeBalanceWarningWebhooks; +// using Adyen.Model.ReportWebhooks; +// using Adyen.Model.TransactionWebhooks; +// using Adyen.Webhooks; +// using Microsoft.Extensions.DependencyInjection; +// using Microsoft.Extensions.Hosting; +// using Microsoft.VisualStudio.TestTools.UnitTesting; +// using Newtonsoft.Json; +// using CapabilityProblemEntity = Adyen.Model.ConfigurationWebhooks.CapabilityProblemEntity; +// +// namespace Adyen.Test.ConfigurationWebhooks +// { +// [TestClass] +// public class ConfigurationWebhookHandlerTest +// { +// private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; +// private readonly IConfigurationWebhooksHandler _configurationWebhooksHandler; +// +// public ConfigurationWebhookHandlerTest() +// { +// IHost host = Host.CreateDefaultBuilder() +// .ConfigureAcsWebhooks((context, services, config) => +// { +// }) +// .Build(); +// +// _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); +// _configurationWebhooksHandler = host.Services.GetRequiredService(); +// } +// +// +// [TestMethod] +// +// public void Test_BalancePlatform_AccountHolderUpdated_LEM_V3() +// { +// // Note: We're using double-quotes here as some descriptions in the JSON payload contain single quotes ' +// // Assert +// const string jsonPayload = @" +// { +// ""data"": { +// ""balancePlatform"": ""YOUR_BALANCE_PLATFORM"", +// ""accountHolder"": { +// ""legalEntityId"": ""LE00000000000000000001"", +// ""reference"": ""YOUR_REFERENCE-2412C"", +// ""capabilities"": { +// ""sendToTransferInstrument"": { +// ""enabled"": true, +// ""requested"": true, +// ""allowed"": false, +// ""problems"": [ +// { +// ""entity"": { +// ""id"": ""LE00000000000000000001"", +// ""type"": ""LegalEntity"" +// }, +// ""verificationErrors"": [ +// { +// ""code"": ""2_902"", +// ""message"": ""Terms Of Service forms are not accepted."", +// ""remediatingActions"": [ +// { +// ""code"": ""2_902"", +// ""message"": ""Accept TOS"" +// } +// ], +// ""type"": ""invalidInput"" +// } +// ] +// }, +// { +// ""entity"": { +// ""id"": ""SE00000000000000000001"", +// ""type"": ""BankAccount"" +// }, +// ""verificationErrors"": [ +// { +// ""code"": ""2_8037"", +// ""message"": ""'bankStatement' was missing."", +// ""remediatingActions"": [ +// { +// ""code"": ""1_703"", +// ""message"": ""Upload a bank statement"" +// } +// ], +// ""type"": ""dataMissing"" +// } +// ] +// }, +// { +// ""entity"": { +// ""id"": ""SE00000000000000000002"", +// ""type"": ""BankAccount"" +// }, +// ""verificationErrors"": [ +// { +// ""code"": ""2_8037"", +// ""message"": ""'bankStatement' was missing."", +// ""remediatingActions"": [ +// { +// ""code"": ""1_703"", +// ""message"": ""Upload a bank statement"" +// } +// ], +// ""type"": ""dataMissing"" +// } +// ] +// }, +// { +// ""entity"": { +// ""id"": ""LE00000000000000000001"", +// ""type"": ""LegalEntity"" +// }, +// ""verificationErrors"": [ +// { +// ""code"": ""2_8189"", +// ""message"": ""'UBO through control' was missing."", +// ""remediatingActions"": [ +// { +// ""code"": ""2_151"", +// ""message"": ""Add 'organization.entityAssociations' of type 'uboThroughControl' to legal entity"" +// } +// ], +// ""type"": ""dataMissing"" +// }, +// { +// ""code"": ""1_50"", +// ""message"": ""Organization details couldn't be verified"", +// ""subErrors"": [ +// { +// ""code"": ""1_5016"", +// ""message"": ""The tax ID number couldn't be verified"", +// ""remediatingActions"": [ +// { +// ""code"": ""1_500"", +// ""message"": ""Update organization details"" +// }, +// { +// ""code"": ""1_501"", +// ""message"": ""Upload a registration document"" +// } +// ], +// ""type"": ""invalidInput"" +// } +// ], +// ""type"": ""invalidInput"" +// }, +// { +// ""code"": ""2_8067"", +// ""message"": ""'Signatory' was missing."", +// ""remediatingActions"": [ +// { +// ""code"": ""2_124"", +// ""message"": ""Add 'organization.entityAssociations' of type 'signatory' to legal entity"" +// } +// ], +// ""type"": ""dataMissing"" +// } +// ] +// } +// ], +// ""transferInstruments"": [ +// { +// ""enabled"": true, +// ""requested"": true, +// ""allowed"": false, +// ""id"": ""SE00000000000000000001"", +// ""verificationStatus"": ""pending"" +// }, +// { +// ""enabled"": true, +// ""requested"": true, +// ""allowed"": false, +// ""id"": ""SE00000000000000000002"", +// ""verificationStatus"": ""pending"" +// } +// ], +// ""verificationStatus"": ""pending"" +// } +// }, +// ""id"": ""AH00000000000000000001"", +// ""status"": ""active"" +// } +// }, +// ""environment"": ""live"", +// ""timestamp"": ""2024-12-15T15:42:03+01:00"", +// ""type"": ""balancePlatform.accountHolder.updated"" +// }"; +// +// _balancePlatformWebhookHandler.GetAccountHolderNotificationRequest(jsonPayload, out AccountHolderNotificationRequest accountHolderUpdatedWebhook); +// +// Assert.IsNotNull(accountHolderUpdatedWebhook); +// Assert.AreEqual(accountHolderUpdatedWebhook.Type, AccountHolderNotificationRequest.TypeEnum.Updated); +// Assert.AreEqual("YOUR_BALANCE_PLATFORM", accountHolderUpdatedWebhook.Data.BalancePlatform); +// Assert.AreEqual("AH00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.Id); +// Assert.AreEqual("LE00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.LegalEntityId); +// Assert.AreEqual("YOUR_REFERENCE-2412C", accountHolderUpdatedWebhook.Data.AccountHolder.Reference); +// Assert.AreEqual(AccountHolder.StatusEnum.Active, accountHolderUpdatedWebhook.Data.AccountHolder.Status); +// Assert.IsTrue(accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities.TryGetValue("sendToTransferInstrument", out AccountHolderCapability capabilitiesData)); +// Assert.AreEqual(true, capabilitiesData.Enabled); +// Assert.AreEqual(true, capabilitiesData.Requested); +// Assert.AreEqual(false, capabilitiesData.Allowed); +// Assert.AreEqual(AccountHolderCapability.VerificationStatusEnum.Pending, capabilitiesData.VerificationStatus); +// Assert.AreEqual(4, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems.Count); +// Assert.AreEqual("LE00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].Entity.Id); +// Assert.AreEqual(CapabilityProblemEntity.TypeEnum.LegalEntity, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].Entity.Type); +// Assert.AreEqual("2_902", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].VerificationErrors[0].Code); +// Assert.AreEqual("Terms Of Service forms are not accepted.", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].VerificationErrors[0].Message); +// Assert.AreEqual("Accept TOS", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].VerificationErrors[0].RemediatingActions[0].Message); +// Assert.AreEqual("SE00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].Entity.Id); +// Assert.AreEqual(CapabilityProblemEntity.TypeEnum.BankAccount, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].Entity.Type); +// Assert.AreEqual("2_8037", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].VerificationErrors[0].Code); +// Assert.AreEqual("'bankStatement' was missing.", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].VerificationErrors[0].Message); +// Assert.AreEqual("Upload a bank statement", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].VerificationErrors[0].RemediatingActions[0].Message); +// Assert.AreEqual("SE00000000000000000002", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].Entity.Id); +// Assert.AreEqual(CapabilityProblemEntity.TypeEnum.BankAccount, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].Entity.Type); +// Assert.AreEqual("2_8037", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].VerificationErrors[0].Code); +// Assert.AreEqual("'bankStatement' was missing.", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].VerificationErrors[0].Message); +// Assert.AreEqual("Upload a bank statement", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].VerificationErrors[0].RemediatingActions[0].Message); +// Assert.AreEqual("LE00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].Entity.Id); +// Assert.AreEqual(CapabilityProblemEntity.TypeEnum.LegalEntity, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].Entity.Type); +// Assert.AreEqual("2_8189", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].VerificationErrors[0].Code); +// Assert.AreEqual("'UBO through control' was missing.", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].VerificationErrors[0].Message); +// Assert.AreEqual("Add 'organization.entityAssociations' of type 'uboThroughControl' to legal entity", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].VerificationErrors[0].RemediatingActions[0].Message); +// Assert.AreEqual("live", accountHolderUpdatedWebhook.Environment); +// Assert.AreEqual(DateTime.Parse("2024-12-15T15:42:03+01:00"), accountHolderUpdatedWebhook.Timestamp); +// } +// +// [TestMethod] +// public void Test_POC_Integration() +// { +// string jsonPayload = @" +// { +// 'data': { +// 'balancePlatform': 'YOUR_BALANCE_PLATFORM', +// 'accountHolder': { +// 'contactDetails': { +// 'address': { +// 'country': 'NL', +// 'houseNumberOrName': '274', +// 'postalCode': '1020CD', +// 'street': 'Brannan Street' +// }, +// 'email': 's.hopper@example.com', +// 'phone': { +// 'number': '+315551231234', +// 'type': 'Mobile' +// } +// }, +// 'description': 'S.Hopper - Staff 123', +// 'id': 'AH00000000000000000000001', +// 'status': 'Active' +// } +// }, +// 'environment': 'test', +// 'type': 'balancePlatform.accountHolder.created' +// }"; +// +// var handler = new BalancePlatformWebhookHandler(); +// var response = handler.GetGenericBalancePlatformWebhook(jsonPayload); +// try +// { +// if (response.GetType() == typeof(AccountHolderNotificationRequest)) +// { +// var accountHolderNotificationRequest = (AccountHolderNotificationRequest)response; +// Assert.AreEqual(accountHolderNotificationRequest.Environment, "test"); +// } +// +// if (response.GetType() == typeof(BalanceAccountNotificationRequest)) +// { +// var balanceAccountNotificationRequest = (BalanceAccountNotificationRequest)response; +// Assert.Fail(balanceAccountNotificationRequest.Data.BalancePlatform); +// } +// } +// catch (System.Exception e) +// { +// Assert.Fail(); +// throw new System.Exception(e.ToString()); +// } +// } +// +// [TestMethod] +// public void Test_TransactionWebhook_V4() +// { +// // Arrange +// const string jsonPayload = @" +// { +// 'data': { +// 'id': 'EVJN42272224222B5JB8BRC84N686ZEUR', +// 'amount': { +// 'value': 7000, +// 'currency': 'EUR' +// }, +// 'status': 'booked', +// 'transfer': { +// 'id': 'JN4227222422265', +// 'reference': 'Split_item_1', +// }, +// 'valueDate': '2023-03-01T00:00:00+02:00', +// 'bookingDate': '2023-02-28T13:30:20+02:00', +// 'creationDate': '2023-02-28T13:30:05+02:00', +// 'accountHolder': { +// 'id': 'AH00000000000000000000001', +// 'description': 'Your description for the account holder', +// 'reference': 'Your reference for the account holder' +// }, +// 'balanceAccount': { +// 'id': 'BA00000000000000000000001', +// 'description': 'Your description for the balance account', +// 'reference': 'Your reference for the balance account' +// }, +// 'balancePlatform': 'YOUR_BALANCE_PLATFORM' +// }, +// 'type': 'balancePlatform.transaction.created', +// 'environment': 'test' +// }"; +// Assert.IsFalse(_balancePlatformWebhookHandler.GetPaymentNotificationRequest(jsonPayload, out var _)); +// +// // Act +// _balancePlatformWebhookHandler.GetTransactionNotificationRequestV4(jsonPayload, out TransactionNotificationRequestV4 target); +// +// // Assert +// Assert.IsNotNull(target); +// Assert.AreEqual(TransactionNotificationRequestV4.TypeEnum.BalancePlatformTransactionCreated, target.Type); +// Assert.AreEqual(Transaction.StatusEnum.Booked, target.Data.Status); +// Assert.AreEqual("BA00000000000000000000001", target.Data.BalanceAccount.Id); +// Assert.IsTrue(target.Data.ValueDate.Equals(DateTime.Parse("2023-03-01T00:00:00+02:00"))); +// Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); +// Assert.AreEqual("AH00000000000000000000001", target.Data.AccountHolder.Id); +// Assert.AreEqual("Your description for the account holder", target.Data.AccountHolder.Description); +// Assert.AreEqual("Your reference for the account holder", target.Data.AccountHolder.Reference); +// Assert.AreEqual("JN4227222422265", target.Data.Transfer.Id); +// Assert.AreEqual("Split_item_1", target.Data.Transfer.Reference); +// Assert.AreEqual(DateTime.Parse("2023-02-28T13:30:05+02:00"), target.Data.CreationDate); +// Assert.AreEqual(DateTime.Parse("2023-02-28T13:30:20+02:00"), target.Data.BookingDate); +// Assert.AreEqual(7000, target.Data.Amount.Value); +// Assert.AreEqual("EUR", target.Data.Amount.Currency); +// Assert.AreEqual("test", target.Environment); +// } +// +// [TestMethod] +// public void Test_ReportCreatedWebhook() +// { +// // Arrange +// const string jsonPayload = @" +// { +// 'data': { +// 'balancePlatform': 'YOUR_BALANCE_PLATFORM', +// 'creationDate': '2024-07-02T02:01:08+02:00', +// 'id': 'balanceplatform_accounting_report_2024_07_01.csv', +// 'downloadUrl': 'https://balanceplatform-test.adyen.com/balanceplatform/.../.../.../balanceplatform_accounting_report_2024_07_01.csv', +// 'fileName': 'balanceplatform_accounting_report_2024_07_01.csv', +// 'reportType': 'balanceplatform_accounting_report' +// }, +// 'environment': 'test', +// 'timestamp': '2024-07-02T02:01:05+02:00', +// 'type': 'balancePlatform.report.created' +// }"; +// +// // Act +// _balancePlatformWebhookHandler.GetReportNotificationRequest(jsonPayload, out ReportNotificationRequest target); +// +// // Assert +// Assert.IsNotNull(target); +// Assert.AreEqual(target.Type, ReportNotificationRequest.TypeEnum.BalancePlatformReportCreated); +// Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); +// Assert.AreEqual("balanceplatform_accounting_report_2024_07_01.csv", target.Data.Id); +// Assert.AreEqual("balanceplatform_accounting_report_2024_07_01.csv", target.Data.FileName); +// Assert.AreEqual("balanceplatform_accounting_report", target.Data.ReportType); +// Assert.AreEqual(DateTime.Parse("2024-07-02T02:01:08+02:00"), target.Data.CreationDate); +// Assert.AreEqual("https://balanceplatform-test.adyen.com/balanceplatform/.../.../.../balanceplatform_accounting_report_2024_07_01.csv", target.Data.DownloadUrl); +// Assert.AreEqual("test", target.Environment); +// Assert.AreEqual(DateTime.Parse("2024-07-02T02:01:05+02:00"), target.Timestamp); +// } +// +// [TestMethod] +// public void Test_AuthenticationCreatedWebhook() +// { +// // Arrange +// const string jsonPayload = @" +// { +// 'data': { +// 'authentication': { +// 'acsTransId': '6a4c1709-a42e-4c7f-96c7-1043adacfc97', +// 'challenge': { +// 'flow': 'OOB_TRIGGER_FL', +// 'lastInteraction': '2022-12-22T15:49:03+01:00' +// }, +// 'challengeIndicator': '01', +// 'createdAt': '2022-12-22T15:45:03+01:00', +// 'deviceChannel': 'app', +// 'dsTransID': 'a3b86754-444d-46ca-95a2-ada351d3f42c', +// 'exemptionIndicator': 'lowValue', +// 'inPSD2Scope': true, +// 'messageCategory': 'payment', +// 'messageVersion': '2.2.0', +// 'riskScore': 0, +// 'threeDSServerTransID': '6edcc246-23ee-4e94-ac5d-8ae620bea7d9', +// 'transStatus': 'Y', +// 'type': 'challenge' +// }, +// 'balancePlatform': 'YOUR_BALANCE_PLATFORM', +// 'id': '497f6eca-6276-4993-bfeb-53cbbbba6f08', +// 'paymentInstrumentId': 'PI3227C223222B5BPCMFXD2XG', +// 'purchase': { +// 'date': '2022-12-22T15:49:03+01:00', +// 'merchantName': 'MyShop', +// 'originalAmount': { +// 'currency': 'EUR', +// 'value': 1000 +// } +// }, +// 'status': 'authenticated' +// }, +// 'environment': 'test', +// 'timestamp': '2022-12-22T15:42:03+01:00', +// 'type': 'balancePlatform.authentication.created' +// }"; +// +// // Act +// _balancePlatformWebhookHandler.GetAuthenticationNotificationRequest(jsonPayload, out AuthenticationNotificationRequest target); +// +// // Assert +// Assert.IsNotNull(target); +// Assert.AreEqual(target.Type, AuthenticationNotificationRequest.TypeEnum.BalancePlatformAuthenticationCreated); +// Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); +// Assert.AreEqual("497f6eca-6276-4993-bfeb-53cbbbba6f08", target.Data.Id); +// Assert.AreEqual("PI3227C223222B5BPCMFXD2XG", target.Data.PaymentInstrumentId); +// Assert.AreEqual(AuthenticationNotificationData.StatusEnum.Authenticated, target.Data.Status); +// Assert.AreEqual("MyShop", target.Data.Purchase.MerchantName); +// Assert.AreEqual("2022-12-22T15:49:03+01:00", target.Data.Purchase.Date); +// Assert.AreEqual("EUR", target.Data.Purchase.OriginalAmount.Currency); +// Assert.AreEqual(1000, target.Data.Purchase.OriginalAmount.Value); +// Assert.AreEqual(DateTime.Parse("2022-12-22T15:45:03+01:00"), target.Data.Authentication.CreatedAt); +// Assert.AreEqual(AuthenticationInfo.DeviceChannelEnum.App, target.Data.Authentication.DeviceChannel); +// Assert.AreEqual(ChallengeInfo.FlowEnum.OOBTRIGGERFL, target.Data.Authentication.Challenge.Flow); +// Assert.AreEqual(DateTime.Parse("2022-12-22T15:49:03+01:00"), target.Data.Authentication.Challenge.LastInteraction); +// Assert.AreEqual(AuthenticationInfo.ChallengeIndicatorEnum._01, target.Data.Authentication.ChallengeIndicator); +// Assert.AreEqual(AuthenticationInfo.ExemptionIndicatorEnum.LowValue, target.Data.Authentication.ExemptionIndicator); +// Assert.AreEqual(true, target.Data.Authentication.InPSD2Scope); +// Assert.AreEqual(AuthenticationInfo.MessageCategoryEnum.Payment, target.Data.Authentication.MessageCategory); +// Assert.AreEqual("2.2.0", target.Data.Authentication.MessageVersion); +// Assert.AreEqual(0, target.Data.Authentication.RiskScore); +// Assert.AreEqual("6edcc246-23ee-4e94-ac5d-8ae620bea7d9", target.Data.Authentication.ThreeDSServerTransID); +// Assert.AreEqual(AuthenticationInfo.TransStatusEnum.Y, target.Data.Authentication.TransStatus); +// Assert.AreEqual("test", target.Environment); +// Assert.AreEqual(DateTime.Parse("2022-12-22T15:42:03+01:00"), target.Timestamp); +// } +// +// [TestMethod] +// public void Test_NegativeBalanceCompensationWarningWebhook() +// { +// // Arrange +// const string jsonPayload = @" +// { +// 'data': { +// 'balancePlatform': 'YOUR_BALANCE_PLATFORM', +// 'creationDate': '2024-07-02T02:01:08+02:00', +// 'id': 'BA00000000000000000001', +// 'accountHolder': { +// 'description': 'Description for the account holder.', +// 'reference': 'YOUR_REFERENCE', +// 'id': 'AH00000000000000000001' +// }, +// 'amount': { +// 'currency': 'EUR', +// 'value': -145050 +// }, +// 'liableBalanceAccountId': 'BA11111111111111111111', +// 'negativeBalanceSince': '2024-10-19T00:33:13+02:00', +// 'scheduledCompensationAt': '2024-12-01T01:00:00+01:00' +// }, +// 'environment': 'test', +// 'timestamp': '2024-10-22T00:00:00+02:00', +// 'type': 'balancePlatform.negativeBalanceCompensationWarning.scheduled' +// }"; +// +// // Act +// _balancePlatformWebhookHandler.GetNegativeBalanceCompensationWarningNotificationRequest(jsonPayload, out NegativeBalanceCompensationWarningNotificationRequest target); +// +// // Assert +// Assert.IsNotNull(target); +// Assert.AreEqual(NegativeBalanceCompensationWarningNotificationRequest.TypeEnum.BalancePlatformNegativeBalanceCompensationWarningScheduled, target.Type); +// Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); +// Assert.AreEqual(DateTime.Parse("2024-07-02T02:01:08+02:00"), target.Data.CreationDate); +// Assert.AreEqual("BA00000000000000000001", target.Data.Id); +// Assert.AreEqual("YOUR_REFERENCE", target.Data.AccountHolder.Reference); +// Assert.AreEqual("EUR", target.Data.Amount.Currency); +// Assert.AreEqual(-145050, target.Data.Amount.Value); +// Assert.AreEqual("BA11111111111111111111", target.Data.LiableBalanceAccountId); +// Assert.AreEqual(DateTime.Parse("2024-10-19T00:33:13+02:00"), target.Data.NegativeBalanceSince); +// Assert.AreEqual(DateTime.Parse("2024-12-01T01:00:00+01:00"), target.Data.ScheduledCompensationAt); +// Assert.AreEqual("test", target.Environment); +// Assert.AreEqual(DateTime.Parse("2024-10-22T00:00:00+02:00"), target.Timestamp); +// } +// } +// } \ No newline at end of file diff --git a/Adyen.Test/BaseTest.cs b/Adyen.Test/BaseTest.cs deleted file mode 100644 index f9e195846..000000000 --- a/Adyen.Test/BaseTest.cs +++ /dev/null @@ -1,439 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net.Http; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Constants; -using Adyen.HttpClient.Interfaces; -using Adyen.Model; -using Adyen.Model.TerminalApi; -using Adyen.Model.Payment; -using Adyen.Service; -using NSubstitute; -using Amount = Adyen.Model.Checkout; -using Environment = System.Environment; -using PaymentResult = Adyen.Model.Payment.PaymentResult; - -namespace Adyen.Test -{ - public class BaseTest - { - private protected IClient ClientInterfaceSubstitute; - - #region Payment request - /// - /// Payment with basic authentication - /// - /// - /// - protected PaymentResult CreatePaymentResultFromFile(string fileName) - { - var client = CreateMockTestClientApiKeyBasedRequestAsync(fileName); - var payment = new PaymentService(client); - var paymentRequest = MockPaymentData.CreateFullPaymentRequest(); - var paymentResult = payment.Authorise(paymentRequest); - return paymentResult; - } - - protected PaymentResult CreatePaymentApiKeyBasedResultFromFile(string fileName) - { - var client = CreateMockTestClientApiKeyBasedRequestAsync(fileName); - var payment = new PaymentService(client); - var paymentRequest = MockPaymentData.CreateFullPaymentRequest(); - - var paymentResult = payment.Authorise(paymentRequest); - return paymentResult; - } - #endregion - - #region Modification objects - - protected CaptureRequest CreateCaptureTestRequest(string pspReference) - { - var captureRequest = new CaptureRequest - { - MerchantAccount = "MerchantAccount", - ModificationAmount = new Model.Payment.Amount("EUR", 150), - Reference = "capture - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference, - AdditionalData = new Dictionary {{"authorisationType", "PreAuth"}} - }; - return captureRequest; - } - - - protected CancelOrRefundRequest CreateCancelOrRefundTestRequest(string pspReference) - { - var cancelOrRefundRequest = new CancelOrRefundRequest - { - MerchantAccount = "MerchantAccount", - Reference = "cancelOrRefund - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference - }; - return cancelOrRefundRequest; - } - - protected RefundRequest CreateRefundTestRequest(string pspReference) - { - var refundRequest = new RefundRequest - { - MerchantAccount = "MerchantAccount", - ModificationAmount = new Model.Payment.Amount("EUR", 150), - Reference = "refund - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference - }; - return refundRequest; - } - - protected CancelRequest CreateCancelTestRequest(string pspReference) - { - var cancelRequest = new CancelRequest - { - MerchantAccount = "MerchantAccount", - Reference = "cancel - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference - }; - return cancelRequest; - } - - protected AdjustAuthorisationRequest CreateAdjustAuthorisationRequest(string pspReference) - { - var adjustAuthorisationRequest = new AdjustAuthorisationRequest - { - MerchantAccount = "MerchantAccount", - ModificationAmount = new Model.Payment.Amount("EUR", 150), - Reference = "adjustAuthorisationRequest - " + DateTime.Now.ToString("yyyyMMdd"), - OriginalReference = pspReference, - }; - return adjustAuthorisationRequest; - } - #endregion - - #region Checkout - /// - /// Check out payment request - /// - /// - /// - public Model.Checkout.PaymentRequest CreatePaymentRequestCheckout() - { - var amount = new Model.Checkout.Amount("USD", 1000); - var paymentsRequest = new Model.Checkout.PaymentRequest - { - Reference = "Your order number ", - ReturnUrl = @"https://your-company.com/...", - MerchantAccount = "MerchantAccount", - CaptureDelayHours = 0 - }; - var cardDetails = new Amount.CardDetails - { - Number = "4111111111111111", - ExpiryMonth = "10", - ExpiryYear = "2020", - HolderName = "John Smith" - }; - paymentsRequest.Amount = amount; - paymentsRequest.PaymentMethod = new Amount.CheckoutPaymentMethod(cardDetails); - paymentsRequest.ApplicationInfo = new Model.Checkout.ApplicationInfo(adyenLibrary: new Amount.CommonField()); - return paymentsRequest; - } - - - /// - /// 3DS2 payments request - /// - /// - public Model.Checkout.PaymentRequest CreatePaymentRequest3DS2() - { - var amount = new Model.Checkout.Amount("USD", 1000); - var paymentsRequest = new Model.Checkout.PaymentRequest - { - Reference = "Your order number ", - Amount = amount, - ReturnUrl = @"https://your-company.com/...", - MerchantAccount = "MerchantAccount", - Channel = Model.Checkout.PaymentRequest.ChannelEnum.Web - }; - var cardDetails = new Amount.CardDetails - { - Number = "4111111111111111", - ExpiryMonth = "10", - ExpiryYear = "2020", - HolderName = "John Smith" - }; - paymentsRequest.PaymentMethod = new Amount.CheckoutPaymentMethod(cardDetails); - return paymentsRequest; - } - - /// - ///Checkout Details request - /// - /// Returns a sample PaymentsDetailsRequest object with test data - protected Amount.PaymentDetailsRequest CreateDetailsRequest() - { - var paymentData = "Ab02b4c0!BQABAgCJN1wRZuGJmq8dMncmypvknj9s7l5Tj..."; - var details = new Amount.PaymentCompletionDetails - { - MD= "sdfsdfsdf...", - PaReq = "sdfsdfsdf..." - }; - var paymentsDetailsRequest = new Amount.PaymentDetailsRequest(details: details, paymentData: paymentData); - - return paymentsDetailsRequest; - } - - /// - /// Checkout paymentMethodsRequest - /// - /// - protected Amount.PaymentMethodsRequest CreatePaymentMethodRequest(string merchantAccount) - { - return new Amount.PaymentMethodsRequest(merchantAccount: merchantAccount); - } - - #endregion - - /// - /// Creates mock test client without any response - /// - /// IClient implementation - protected Client CreateMockForAdyenClientTest(Config config) - { - //Create a mock interface - ClientInterfaceSubstitute = Substitute.For(); - - ClientInterfaceSubstitute.RequestAsync(Arg.Any(), - Arg.Any(), Arg.Any(), Arg.Any(), - Arg.Any()).Returns(Task.FromResult("")); - - var clientMock = new Client(config) - { - HttpClient = ClientInterfaceSubstitute, - Config = config - }; - return clientMock; - } - - /// - /// Creates mock test client - /// - /// The file that is returned - /// IClient implementation - protected Client CreateMockTestClientRequest(string fileName) - { - var mockPath = GetMockFilePath(fileName); - var response = MockFileToString(mockPath); - - ClientInterfaceSubstitute = Substitute.For(); - - ClientInterfaceSubstitute.RequestAsync(Arg.Any(), - Arg.Any(), Arg.Any(), Arg.Any(), - Arg.Any()).Returns(response); - - var config = new Config - { - Environment = Model.Environment.Test - }; - var clientMock = new Client(config) - { - HttpClient = ClientInterfaceSubstitute, - Config = new Config - { - Username = "Username", - Password = "Password", - ApplicationName = "Appname" - } - }; - return clientMock; - } - - /// - /// Creates mock test client - /// - /// The file that is returned - /// IClient implementation - protected Client CreateMockTestClientApiKeyBasedRequestAsync(string fileName) - { - var mockPath = GetMockFilePath(fileName); - var response = MockFileToString(mockPath); - //Create a mock interface - ClientInterfaceSubstitute = Substitute.For(); - - ClientInterfaceSubstitute.RequestAsync(Arg.Any(), - Arg.Any(), Arg.Any(), Arg.Any(), - Arg.Any()).Returns(response); - var config = new Config - { - Environment = Model.Environment.Test - }; - var clientMock = new Client(config) - { - HttpClient = ClientInterfaceSubstitute, - Config = new Config - { - Username = "Username", - Password = "Password", - ApplicationName = "Appname" - } - }; - return clientMock; - } - - /// - /// Creates async mock test client - /// - /// The file that is returned - /// IClient implementation - protected Client CreateAsyncMockTestClientApiKeyBasedRequest(string fileName) - { - var mockPath = GetMockFilePath(fileName); - var response = MockFileToString(mockPath); - - var configWithApiKey = new Config - { - Environment = Model.Environment.Test, - XApiKey = "AQEyhmfxK....LAG84XwzP5pSpVd" - }; - - ClientInterfaceSubstitute = Substitute.For(); - - ClientInterfaceSubstitute.RequestAsync(Arg.Any(), - Arg.Any(), Arg.Any(), Arg.Any(), - Arg.Any()).Returns(response); - - var config = new Config - { - Environment = Model.Environment.Test - }; - var clientMock = new Client(config) - { - HttpClient = ClientInterfaceSubstitute, - Config = configWithApiKey - }; - return clientMock; - } - - /// - /// Creates mock test client for POS cloud. In case of cloud api the xapi should be included - /// - /// The file that is returned - /// IClient implementation - protected Client CreateMockTestClientPosCloudApiRequest(string fileName) - { - var config = new Config { CloudApiEndPoint = ClientConfig.CloudApiEndPointTest }; - var mockPath = GetMockFilePath(fileName); - var response = MockFileToString(mockPath); - - //Create a mock interface - ClientInterfaceSubstitute = Substitute.For(); - - ClientInterfaceSubstitute.Request(Arg.Any(), - Arg.Any(), Arg.Any(), Arg.Any()).Returns(response); - - ClientInterfaceSubstitute.RequestAsync(Arg.Any(), - Arg.Any(), Arg.Any(), Arg.Any()).Returns(Task.FromResult(response)); - - var anyConfig = new Config - { - Environment = Model.Environment.Test - }; - var clientMock = new Client(anyConfig) - { - HttpClient = ClientInterfaceSubstitute, - Config = config - }; - return clientMock; - } - - /// - /// Creates mock test client for terminal api. - /// - /// The file that is returned - /// IClient implementation - protected Client CreateMockTestClientPosLocalApiRequest(string fileName) - { - var config = new Config - { - Environment = Model.Environment.Test, - LocalTerminalApiEndpoint = @"https://_terminal_:8443/nexo/" - }; - var mockPath = GetMockFilePath(fileName); - var response = MockFileToString(mockPath); - //Create a mock interface - ClientInterfaceSubstitute = Substitute.For(); - - ClientInterfaceSubstitute.Request(Arg.Any(), - Arg.Any(), Arg.Any(), Arg.Any()).Returns(response); - - ClientInterfaceSubstitute.RequestAsync(Arg.Any(), - Arg.Any(), Arg.Any(), Arg.Any()).Returns(Task.FromResult(response)); - - - var anyConfig = new Config - { - Environment = Model.Environment.Test - }; - var clientMock = new Client(anyConfig) - { - HttpClient = ClientInterfaceSubstitute, - Config = config - }; - return clientMock; - } - - protected string MockFileToString(string fileName) - { - string text = ""; - - if (String.IsNullOrEmpty(fileName)) - { - return text; - } - try - { - using (var streamReader = new StreamReader(fileName, Encoding.UTF8)) - { - text = streamReader.ReadToEnd(); - } - } - catch (Exception exception) - { - throw exception; - } - - return text; - } - - /// - /// Create dummy Nexo message header - /// - /// - protected MessageHeader MockNexoMessageHeaderRequest() - { - var header = new MessageHeader - { - MessageType = MessageType.Request, - MessageClass = MessageClassType.Service, - MessageCategory = MessageCategoryType.Payment, - SaleID = "POSSystemID12345", - POIID = "MX915-284251016", - - ServiceID = (new Random()).Next(1, 9999).ToString() - }; - return header; - } - - protected static string GetMockFilePath(string fileName) - { - if (string.IsNullOrEmpty(fileName)) - { - return ""; - } - var projectPath = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName; - var mockPath = Path.Combine(projectPath, fileName); - return mockPath; - } - } -} diff --git a/Adyen.Test/BinLookup/BinLookupTest.cs b/Adyen.Test/BinLookup/BinLookupTest.cs new file mode 100644 index 000000000..335b68430 --- /dev/null +++ b/Adyen.Test/BinLookup/BinLookupTest.cs @@ -0,0 +1,82 @@ +using System.Text.Json; +using Adyen.BinLookup.Client; +using Adyen.BinLookup.Extensions; +using Adyen.BinLookup.Models; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.BinLookup +{ + [TestClass] + public class BinLookupTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public BinLookupTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureBinLookup((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_ThreeDSAvailabilityResponse_Result_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/binlookup/get3dsavailability-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("F013371337", response.DsPublicKeys[0].DirectoryServerId); + Assert.AreEqual("visa", response.DsPublicKeys[0].Brand); + Assert.AreEqual("411111111111", response.ThreeDS2CardRangeDetails[0].StartRange); + Assert.AreEqual("411111111111", response.ThreeDS2CardRangeDetails[0].EndRange); + Assert.AreEqual("2.1.0", response.ThreeDS2CardRangeDetails[0].ThreeDS2Versions.FirstOrDefault()); + Assert.AreEqual("https://pal-test.adyen.com/threeds2simulator/acs/startMethod.shtml", response.ThreeDS2CardRangeDetails[0].ThreeDSMethodURL); + Assert.IsTrue(response.ThreeDS1Supported); + Assert.IsTrue(response.ThreeDS2supported); + } + + [TestMethod] + public async Task Given_Deserialize_When_CostEstimateResponse_Result_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/binlookup/getcostestimate-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("1111", response.CardBin.Summary); + Assert.AreEqual("Unsupported", response.ResultCode); + } + + [TestMethod] + public async Task Given_Serialize_When_CostEstimateRequest_ShopperInteractionEnums_Result_Should_Return_Correct_String() + { + // Arrange + // Act + string ecommerce = JsonSerializer.Serialize(CostEstimateRequest.ShopperInteractionEnum.Ecommerce, _jsonSerializerOptionsProvider.Options); + string contAuth = JsonSerializer.Serialize(CostEstimateRequest.ShopperInteractionEnum.ContAuth, _jsonSerializerOptionsProvider.Options); + string moto = JsonSerializer.Serialize(CostEstimateRequest.ShopperInteractionEnum.Moto, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(@"""Ecommerce""", ecommerce); + Assert.AreEqual(@"""ContAuth""", contAuth); + Assert.AreEqual(@"""Moto""", moto); + } + } +} diff --git a/Adyen.Test/BinLookupTest.cs b/Adyen.Test/BinLookupTest.cs deleted file mode 100644 index 59d8e4bc8..000000000 --- a/Adyen.Test/BinLookupTest.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System.Linq; -using Adyen.Model.BinLookup; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class BinLookupTest : BaseTest - { - [TestMethod] - public void Get3dsAvailabilitySuccessMockedTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/binlookup/get3dsavailability-success.json"); - var binLookup = new BinLookupService(client); - var threeDsAvailabilityRequest = new ThreeDSAvailabilityRequest - { - MerchantAccount = "merchantAccount", - CardNumber = "4111111111111111" - }; - var threeDsAvailabilityResponse = binLookup.Get3dsAvailability(threeDsAvailabilityRequest); - Assert.AreEqual("F013371337", threeDsAvailabilityResponse.DsPublicKeys[0].DirectoryServerId); - Assert.AreEqual("visa", threeDsAvailabilityResponse.DsPublicKeys[0].Brand); - Assert.AreEqual("411111111111", threeDsAvailabilityResponse.ThreeDS2CardRangeDetails[0].StartRange); - Assert.AreEqual("411111111111", threeDsAvailabilityResponse.ThreeDS2CardRangeDetails[0].EndRange); - Assert.AreEqual("2.1.0", threeDsAvailabilityResponse.ThreeDS2CardRangeDetails[0].ThreeDS2Versions.FirstOrDefault()); - Assert.AreEqual("https://pal-test.adyen.com/threeds2simulator/acs/startMethod.shtml", threeDsAvailabilityResponse.ThreeDS2CardRangeDetails[0].ThreeDSMethodURL); - Assert.AreEqual(true, threeDsAvailabilityResponse.ThreeDS1Supported); - Assert.AreEqual(true, threeDsAvailabilityResponse.ThreeDS2supported); - } - - [TestMethod] - public void GetCostEstimateSuccessMockedTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/binlookup/getcostestimate-success.json"); - var binLookup = new BinLookupService(client); - var costEstimateRequest = new CostEstimateRequest(); - var amount = new Amount - { - Currency = "EUR", - Value = 1000 - }; - costEstimateRequest.Amount = amount; - var costEstimateAssumptions = new CostEstimateAssumptions - { - AssumeLevel3Data = true, - Assume3DSecureAuthenticated = true - }; - costEstimateRequest.Assumptions = costEstimateAssumptions; - costEstimateRequest.CardNumber = "4111111111111111"; - costEstimateRequest.MerchantAccount = "merchantAccount"; - var merchantDetails = new MerchantDetails - { - CountryCode = "NL", - Mcc = "7411", - EnrolledIn3DSecure = true - }; - costEstimateRequest.MerchantDetails = (merchantDetails); - costEstimateRequest.ShopperInteraction = CostEstimateRequest.ShopperInteractionEnum.Ecommerce; - var costEstimateResponse = binLookup.GetCostEstimate(costEstimateRequest); - Assert.AreEqual("1111", costEstimateResponse.CardBin.Summary); - Assert.AreEqual("Unsupported", costEstimateResponse.ResultCode); - } - - [TestMethod] - public void GetCostEstimateSuccessGenerateShopperInteractionFromEnum() - { - var ecommerce = Util.JsonOperation.SerializeRequest(CostEstimateRequest.ShopperInteractionEnum.Ecommerce); - var contAuth = Util.JsonOperation.SerializeRequest(CostEstimateRequest.ShopperInteractionEnum.ContAuth); - var moto = Util.JsonOperation.SerializeRequest(CostEstimateRequest.ShopperInteractionEnum.Moto); - Assert.AreEqual("\"Ecommerce\"", ecommerce); - Assert.AreEqual("\"ContAuth\"", contAuth); - Assert.AreEqual("\"Moto\"", moto); - } - } -} diff --git a/Adyen.Test/Checkout/ApiTokenTest.cs b/Adyen.Test/Checkout/ApiTokenTest.cs new file mode 100644 index 000000000..fe586c60b --- /dev/null +++ b/Adyen.Test/Checkout/ApiTokenTest.cs @@ -0,0 +1,53 @@ +using Adyen.Checkout.Extensions; +using Adyen.BalancePlatform.Extensions; +using Adyen.Core.Auth; +using Adyen.Core.Options; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Checkout +{ + [TestClass] + public class ApiKeyTokenTest + { + [TestMethod] + public async Task Given_Multiple_Api_Tokens_When_Injected_Then_Correct_TokenProvider_Is_Used_To_Provide_Correct_ApiKeyToken() + { + // Arrange + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = "adyen-api-key"; + options.Environment = AdyenEnvironment.Test; + }); + }) + .ConfigureBalancePlatform((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = "balanceplatform-adyen-api-key"; + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + // Act + ITokenProvider balancePlatformApiKey = testHost.Services.GetRequiredService>(); + ITokenProvider checkoutApiKey = testHost.Services.GetRequiredService>(); + + using var balancePlatformMessage = new HttpRequestMessage(HttpMethod.Get, "/dummy/endpoint"); + balancePlatformApiKey.Get().AddTokenToHttpRequestMessageHeader(balancePlatformMessage); + + using var checkoutMessage = new HttpRequestMessage(HttpMethod.Get, "/dummy/endpoint"); + checkoutApiKey.Get().AddTokenToHttpRequestMessageHeader(checkoutMessage); + + // Assert + Assert.AreEqual(balancePlatformMessage.Headers.First().Value.First(), "balanceplatform-adyen-api-key"); + Assert.AreEqual(checkoutMessage.Headers.First().Value.First(), "adyen-api-key"); + } + + } +} \ No newline at end of file diff --git a/Adyen.Test/Checkout/CheckoutTest.cs b/Adyen.Test/Checkout/CheckoutTest.cs new file mode 100644 index 000000000..ece797cef --- /dev/null +++ b/Adyen.Test/Checkout/CheckoutTest.cs @@ -0,0 +1,457 @@ +using Adyen.Core.Options; +using Adyen.Checkout.Extensions; +using Adyen.Checkout.Models; +using Adyen.Checkout.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using System.Text.Json; + +namespace Adyen.Test.Checkout +{ + [TestClass] + public class CheckoutTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public CheckoutTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + } + + [TestMethod] + public void Given_Deserialize_When_Payment_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/payments-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("8535296650153317", response.PspReference); + Assert.AreEqual(PaymentResponse.ResultCodeEnum.Authorised, response.ResultCode); + Assert.IsNotNull(response.AdditionalData); + Assert.AreEqual(9, response.AdditionalData.Count); + Assert.AreEqual("8/2018", response.AdditionalData["expiryDate"]); + Assert.AreEqual("GREEN", response.AdditionalData["fraudResultType"]); + Assert.AreEqual("411111", response.AdditionalData["cardBin"]); + Assert.AreEqual("1111", response.AdditionalData["cardSummary"]); + Assert.AreEqual("false", response.AdditionalData["fraudManualReview"]); + Assert.AreEqual("Default", response.AdditionalData["aliasType"]); + Assert.AreEqual("H167852639363479", response.AdditionalData["alias"]); + Assert.AreEqual("visa", response.AdditionalData["cardPaymentMethod"]); + Assert.AreEqual("NL", response.AdditionalData["cardIssuingCountry"]); + } + + [TestMethod] + public void Given_Deserialize_When_Payment3DS2_CheckoutThreeDS2Action_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/payments-3DS2-IdentifyShopper.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentResponse.ResultCodeEnum.IdentifyShopper, response.ResultCode); + Assert.AreEqual("threeDS2", response.Action.CheckoutThreeDS2Action.Type.ToString()); + Assert.IsNotNull(response.Action.CheckoutThreeDS2Action.PaymentData); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentError_Result_ServiceError_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/payments-error-invalid-data-422.json"); + + // Act + var serviceErrorResponse = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNull(serviceErrorResponse.PspReference); + Assert.AreEqual("Reference Missing", serviceErrorResponse.Message); + Assert.AreEqual("validation", serviceErrorResponse.ErrorType); + Assert.AreEqual("130", serviceErrorResponse.ErrorCode); + Assert.AreEqual(422, serviceErrorResponse.Status); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentDetailsResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentsdetails-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("8515232733321252", response.PspReference); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentDetailsActionResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentsdetails-action-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("8515232733321252", response.PspReference); + Assert.AreEqual(PaymentDetailsResponse.ResultCodeEnum.Authorised, response.ResultCode); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentMethods_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentmethods-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.PaymentMethods.Count, 32); + Assert.IsNotNull(response.PaymentMethods[12].Issuers); + Assert.AreEqual(response.PaymentMethods[12].Issuers[0].Id, "66"); + Assert.AreEqual(response.PaymentMethods[12].Issuers[0].Name, "Bank Nowy BFG S.A."); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentMethods__Result_Brands_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentmethods-brands-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(7, response.PaymentMethods.Count); + Assert.AreEqual(5, response.PaymentMethods[0].Brands.Count); + Assert.AreEqual("visa", response.PaymentMethods[0].Brands[0]); + Assert.AreEqual("mc", response.PaymentMethods[0].Brands[1]); + Assert.AreEqual("amex", response.PaymentMethods[0].Brands[2]); + Assert.AreEqual("bcmc", response.PaymentMethods[0].Brands[3]); + Assert.AreEqual("maestro", response.PaymentMethods[0].Brands[4]); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentMethods_Result_Without_Brands_Is_Exactly_50() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentmethods-without-brands-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.PaymentMethods.Count, 50); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentLinks_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/payment-links-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("your-id", response.Id); + Assert.AreEqual(PaymentLinkResponse.StatusEnum.Active, response.Status); + Assert.AreEqual("https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=YW1vdW50TWlub3JW...JRA", response.Url); + Assert.AreEqual(new DateTimeOffset(2019, 12, 17, 10, 05, 29, TimeSpan.Zero), response.ExpiresAt); + Assert.AreEqual("YOUR_ORDER_NUMBER", response.Reference); + Assert.AreEqual(1250, response.Amount.Value); + Assert.AreEqual("BRL", response.Amount.Currency); + } + + [TestMethod] + public void Given_Deserialize_When_Payments_PayPal_Result_CheckoutSDKAction_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/payments-success-paypal.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(response.Action.CheckoutSDKAction); + Assert.AreEqual("EC-42N19135GM6949000", response.Action.CheckoutSDKAction.SdkData["orderID"]); + Assert.AreEqual("Ab02b4c0!BQABAgARb1TvUJa4nwS0Z1nOmxoYfD9+z...", response.Action.CheckoutSDKAction.PaymentData); + Assert.AreEqual("paypal", response.Action.CheckoutSDKAction.PaymentMethodType); + } + + [TestMethod] + public void Given_Deserialize_When_ApplePayDetails_Result_Is_Not_Null() + { + // Arrange + string json = "{\"type\": \"applepay\",\"applePayToken\": \"VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU...\"}"; + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual( ApplePayDetails.TypeEnum.Applepay, response.Type); + Assert.AreEqual("VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU...", response.ApplePayToken); + } + + [TestMethod] + public void Given_Deserialize_When_ApplePayDetails_With_Unknown_Value_Result_Is_Not_Null() + { + // Arrange + string json = "{\"type\": \"applepay\",\"someValue\": \"notInSpec\",\"applePayToken\": \"VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU...\"}"; + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(ApplePayDetails.TypeEnum.Applepay, response.Type); + Assert.AreEqual("VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU...", response.ApplePayToken); + } + + [TestMethod] + public void Given_Deserialize_When_PayWithGoogleDetails_Returns_Not_Null() + { + // Arrange + string json = "{\"type\": \"paywithgoogle\",\"someValue\": \"notInSpec\",\"googlePayToken\": \"==Payload as retrieved from Google Pay response==\"}"; + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PayWithGoogleDetails.TypeEnum.Paywithgoogle, response.Type); + Assert.AreEqual(response.GooglePayToken, "==Payload as retrieved from Google Pay response=="); + } + + [TestMethod] + public void Given_Deserialize_When_BlikCode_Result_Is_Not_Null() + { + // Arrange + string json = "{\"type\":\"blik\",\"blikCode\":\"blikCode\"}"; + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(BlikDetails.TypeEnum.Blik, response.Type); + Assert.AreEqual("blikCode", response.BlikCode); + } + + [TestMethod] + public void Given_Deserialize_When_DragonpayDetails_Result_Is_Not_Null() + { + // Arrange + string json = "{\"issuer\":\"issuer\",\"shopperEmail\":\"test@adyen.com\",\"type\":\"dragonpay_ebanking\"}"; + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(DragonpayDetails.TypeEnum.DragonpayEbanking, result.Type); + Assert.AreEqual("issuer", result.Issuer); + Assert.AreEqual("test@adyen.com", result.ShopperEmail); + } + + [TestMethod] + public void Given_Deserialize_When_AfterPayDetails_Result_Is_Not_Null() + { + // Arrange + string json = @" +{ + ""resultCode"":""RedirectShopper"", + ""action"":{ + ""paymentMethodType"":""afterpaytouch"", + ""method"":""GET"", + ""url"":""https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=..."", + ""type"":""redirect"" + } +}"; + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentResponse.ResultCodeEnum.RedirectShopper, result.ResultCode); + Assert.AreEqual("afterpaytouch", result.Action.CheckoutRedirectAction.PaymentMethodType); + Assert.AreEqual(CheckoutRedirectAction.TypeEnum.Redirect, result.Action.CheckoutRedirectAction.Type); + Assert.AreEqual("https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=...", result.Action.CheckoutRedirectAction.Url); + Assert.AreEqual("GET", result.Action.CheckoutRedirectAction.Method); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResponse_3DS_ChallengeShopper_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentResponse-3DS-ChallengeShopper.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(CheckoutThreeDS2Action.TypeEnum.ThreeDS2, response.Action.CheckoutThreeDS2Action.Type); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentMethodsResponse_StoredPaymentMethods_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentmethods-storedpaymentmethods.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(4, response.StoredPaymentMethods.Count); + Assert.AreEqual("NL32ABNA0515071439", response.StoredPaymentMethods[0].Iban); + Assert.AreEqual("Adyen", response.StoredPaymentMethods[0].OwnerName); + Assert.AreEqual("sepadirectdebit", response.StoredPaymentMethods[0].Type); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResponse_3DS2_IdentifyShopper_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentResponse-3DS2-Action.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentResponse.ResultCodeEnum.IdentifyShopper, response.ResultCode); + Assert.AreEqual(CheckoutThreeDS2Action.TypeEnum.ThreeDS2, response.Action.CheckoutThreeDS2Action.Type); + } + + [TestMethod] + public void Given_Serialize_When_CheckoutSessionRequest_Result_Contains_DateOnly_And_DateTimeOffset() + { + // Arrange + CreateCheckoutSessionRequest checkoutSessionRequest = new CreateCheckoutSessionRequest( + merchantAccount: "TestMerchant", + reference: "TestReference", + returnUrl: "http://test-url.com", + amount: new Amount("EUR", 10000L), + dateOfBirth: new DateOnly(1998, 1, 1), + expiresAt: new DateTimeOffset(2023, 4, 1, 1, 1, 1, TimeSpan.Zero) + ); + + // Act + string target = JsonSerializer.Serialize(checkoutSessionRequest, _jsonSerializerOptionsProvider.Options); + + + // Assert + using var jsonDoc = JsonDocument.Parse(target); + JsonElement root = jsonDoc.RootElement; + + Assert.AreEqual("TestMerchant", root.GetProperty("merchantAccount").GetString()); + Assert.AreEqual("TestReference", root.GetProperty("reference").GetString()); + Assert.AreEqual("http://test-url.com", root.GetProperty("returnUrl").GetString()); + Assert.AreEqual("1998-01-01", root.GetProperty("dateOfBirth").GetString()); + Assert.AreEqual("2023-04-01T01:01:01.0000000+00:00", root.GetProperty("expiresAt").GetString()); + // does not serialise null fields + Assert.IsFalse(target.Contains(":null")); + Assert.IsFalse(target.Contains("threeDSAuthenticationOnly")); + } + + [TestMethod] + public void Given_Serialize_When_CheckoutSessionRequest_Is_Filled_Result_Returns_No_Null_Values() + { + // Arrange + CreateCheckoutSessionRequest checkoutSessionRequest = new CreateCheckoutSessionRequest( + merchantAccount: "TestMerchant", + reference: "TestReference", + returnUrl: "http://test-url.com", + amount: new Amount("EUR", 10000L), + dateOfBirth: new DateOnly(1998, 1, 1), + expiresAt: new DateTimeOffset(2023, 4, 1, 1, 1, 1, TimeSpan.Zero) + ); + + // Act + string target = JsonSerializer.Serialize(checkoutSessionRequest, _jsonSerializerOptionsProvider.Options); + + + // Assert + using var jsonDoc = JsonDocument.Parse(target); + JsonElement root = jsonDoc.RootElement; + + // Ensure that no elements contain null + foreach (JsonProperty property in root.EnumerateObject()) + { + Assert.AreNotEqual(JsonValueKind.Null, property.Value.ValueKind, $"Property {property.Name} is null"); + } + } + + [TestMethod] + public void Given_Deserialize_When_PaymentMethodsBalance_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/paymentmethods-balance-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(BalanceCheckResponse.ResultCodeEnum.Success, response.ResultCode); + Assert.AreEqual("EUR", response.Balance.Currency); + Assert.AreEqual("2500", response.Balance.Value.ToString()); + } + + [TestMethod] + public void Given_Deserialize_When_CreateOrderResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/orders-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(CreateOrderResponse.ResultCodeEnum.Success, response.ResultCode); + Assert.AreEqual("8515930288670953", response.PspReference); + Assert.AreEqual("Ab02b4c0!BQABAgBqxSuFhuXUF7IvIRvSw5bDPHN...", response.OrderData); + Assert.AreEqual("EUR", response.RemainingAmount.Currency); + Assert.AreEqual("2500", response.RemainingAmount.Value.ToString()); + } + + [TestMethod] + public void Given_Deserialize_When_CancelOrderResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/orders-cancel-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("Received", response.ResultCode.ToString()); + Assert.AreEqual("8515931182066678", response.PspReference); + } + + [TestMethod] + public void Given_Deserialize_When_GetStoredPaymentMethods_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/get-storedPaymentMethod-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("string", response.StoredPaymentMethods[0].Type); + Assert.AreEqual("merchantAccount", response.MerchantAccount); + } + } +} diff --git a/Adyen.Test/Checkout/DonationsTest.cs b/Adyen.Test/Checkout/DonationsTest.cs new file mode 100644 index 000000000..41cc3398f --- /dev/null +++ b/Adyen.Test/Checkout/DonationsTest.cs @@ -0,0 +1,46 @@ +using Adyen.Core.Options; +using Adyen.Checkout.Extensions; +using Adyen.Checkout.Models; +using Adyen.Checkout.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using System.Text.Json; + +namespace Adyen.Test.Checkout +{ + [TestClass] + public class DonationsTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public DonationsTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + } + + [TestMethod] + public void Given_Deserialize_When_Donations_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/donations-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(DonationPaymentResponse.StatusEnum.Completed, response.Status); + Assert.AreEqual("10720de4-7c5d-4a17-9161-fa4abdcaa5c4", response.Reference); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Checkout/ModificationTest.cs b/Adyen.Test/Checkout/ModificationTest.cs new file mode 100644 index 000000000..15b30d7de --- /dev/null +++ b/Adyen.Test/Checkout/ModificationTest.cs @@ -0,0 +1,116 @@ +using Adyen.Core.Options; +using Adyen.Checkout.Extensions; +using Adyen.Checkout.Models; +using Adyen.Checkout.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using System.Text.Json; + +namespace Adyen.Test.Checkout +{ + [TestClass] + public class ModificationTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public ModificationTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentCaptureResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/captures-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentCaptureResponse.StatusEnum.Received, response.Status); + Assert.AreEqual("my_reference", response.Reference); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentCancelResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/cancels-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentCancelResponse.StatusEnum.Received, response.Status); + Assert.AreEqual("my_reference", response.Reference); + } + + [TestMethod] + public void Given_Deserialize_When_StandalonePaymentCancelResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/standalone-cancels-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(StandalonePaymentCancelResponse.StatusEnum.Received, response.Status); + Assert.AreEqual("861633338418518C", response.PspReference); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentRefundResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/refunds-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentRefundResponse.StatusEnum.Received, response.Status); + Assert.AreEqual("my_reference", response.Reference); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentReversalResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/reversals-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentReversalResponse.StatusEnum.Received, response.Status); + Assert.AreEqual("my_reference", response.Reference); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentAmountUpdateResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/reversals-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentAmountUpdateResponse.StatusEnum.Received, response.Status); + Assert.AreEqual("my_reference", response.Reference); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Checkout/PaymentsTest.cs b/Adyen.Test/Checkout/PaymentsTest.cs new file mode 100644 index 000000000..e4a13e62c --- /dev/null +++ b/Adyen.Test/Checkout/PaymentsTest.cs @@ -0,0 +1,642 @@ +using System.Net; +using Adyen.Core.Options; +using Adyen.Checkout.Extensions; +using Adyen.Checkout.Models; +using Adyen.Checkout.Services; +using Adyen.Checkout.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using System.Text; +using System.Text.Json; +using Adyen.Core; +using Adyen.Core.Client; +using NSubstitute; + +namespace Adyen.Test.Checkout +{ + [TestClass] + public class PaymentsTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly IPaymentsService _paymentsService; + + public PaymentsTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + _paymentsService = Substitute.For(); + } + + [TestMethod] + public async Task Given_PaymentMethodsResponse_When_Deserialized_Then_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/payment-methods-response.json"); + // Act + PaymentMethodsResponse result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(result.PaymentMethods); + Assert.IsNull(result.StoredPaymentMethods); + Assert.AreEqual(29, result.PaymentMethods.Count); + } + + [TestMethod] + public async Task Given_CreateCheckoutSessionRequest_When_Serialize_Long__Result_Contains_Zeros() + { + // Arrange + CreateCheckoutSessionRequest checkoutSessionRequest = new CreateCheckoutSessionRequest( + amount: new Amount("EUR", 10000L), + merchantAccount: "merchantAccount", + reference: "TestReference", + returnUrl: "http://test-url.com", + channel: CreateCheckoutSessionRequest.ChannelEnum.Web, + countryCode: "NL", + lineItems: new List() { + new LineItem(quantity: 1, amountIncludingTax: 5000, description: "description1", amountExcludingTax: 0), + new LineItem(quantity: 1, amountIncludingTax: 5000, description: "description2", taxAmount: 0) + } + ); + + // Act + string result = JsonSerializer.Serialize(checkoutSessionRequest, _jsonSerializerOptionsProvider.Options); + + // Assert + using JsonDocument json = JsonDocument.Parse(result); + JsonElement lineItems = json.RootElement.GetProperty("lineItems"); + + lineItems[0].TryGetProperty("amountExcludingTax", out JsonElement amountExcludingTax); + lineItems[1].TryGetProperty("taxAmount", out JsonElement taxAmount); + + Assert.AreEqual(0, amountExcludingTax.GetInt32()); + Assert.AreEqual(0, taxAmount.GetInt32()); + } + + [TestMethod] + public async Task Given_CreateCheckoutSessionResponse_When_Deserialize_Returns_Not_Null() + { + // Arrange + string json = @"{""mode"": ""embedded"",""amount"": {""currency"": ""EUR"",""value"": 10000},""expiresAt"": ""2023-04-06T17:11:15+02:00"",""id"": ""CS0068299CB8DA273A"",""merchantAccount"": ""TestMerchantAccount"",""reference"": ""TestReference"",""returnUrl"": ""http://test-url.com"",""sessionData"": ""Ab02b4c0!BQABAgBoacRJuRbNM/typUKATopkZ3V+cINm0WTAvwl9uQJ2e8I00P2KFemlwp4nb1bOqqYh1zx48gDAHt0QDs2JTiQIqDQRizqopLFRk/wAJHFoCuam/GvOHflg9vwS3caHbkBToIolxcYcJoJheIN9o1fGmNIHZb9VrWfiKsXMgmYsSUifenayS2tkKCTquF7vguaAwk7q5ES1GDwzP/J2mChJGH04jGrVL4szPHGmznr897wIcFQyBSZe4Uifqoe0fpiIxZLNWadLMya6SnvQYNAQL1V6ti+7F4wHHyLwHWTCua993sttue70TE4918EV80HcAWx0LE1+uW6J5KBHCKdYNi9ESlGSZreRwLCpdNbmumB6MlyHZlz2umLiw0ZZJAEpdrwXA2NiyHzJDKDKfbAhd8uoTSACrbgwbrAXI1cvb1WjiOQjLn9MVW++fuJCq6vIeX+rUKMeltBAHMeBZyC54ndAucw9nS03uyckjphunE4tl4WTT475VkfUiyJCTT3S2IOVYS9V9M8pMQ1/GlDVNCLBJJfrYlVXoC8VX68QW1HERkhNYQbTgLQ9kI3cDeMP5d4TuUL3XR2Q6sNiOMdIPGDYQ9QFKFdOE3OQ5X9wxUYbX6j88wR2gRGJcS5agqFHOR1ZTNrjumOYrEkjL8ehFXEs/KluhURllfi0POUPGAwlUWBjDCZcKaeeR0kASnsia2V5IjoiQUYwQUFBMTAzQ0E1MzdFQUVEODdDMjRERDUzOTA5QjgwQTc4QTkyM0UzODIzRDY4REFDQzk0QjlGRjgzMDVEQyJ9E0Gs1T0RaO7NluuXP59fegcW6SQKq4BhC3ZzEKPm1vJuwAJ2gZUaicaXbRPW3IyadavKRlfGdFeAYt2B3ik8fGiK3ZkKU0CrZ0qL0IO5rrWrOg74HMnpxRAn1RhAHRHfGEk67FFPNjr0aLBJXSia7xZWiyKA+i4QU63roY2sxMI/q41mvJjRUz0rPKT3SbVDt1Of7K7BP8cmiboBkWexFBD/mkJyMOpYAOoFp/tKOUHTWZYcc1GpbyV1jInXVfEUhHROYCtS4p/xwF6DdT3bI0+HRU35/xNBTZH2yJN55u9i42Vb0ddCyhzOLZYQ3JVgglty6hLgVeQzuN4b2MoalhfTl11HsElJT1kB0mznVX8CL7UMTUp/2uSgL8DN6kB4owEZ45nWRxIR/2sCidMJ1tnSI1uSqkeqXRf1vat5qPq+BzpYE0Urn2ZZEmgJyb2u0ZLn2x1tfJyPtv+hqBoT7iqJ224dSbuB4HMT49YtcheUtR0jnrImJXm+M1TeIjWB3XWOScrNV8sWEJMAiIU="",""shopperLocale"": ""en-US""}"; + + // Act + CreateCheckoutSessionResponse response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(response.Id); + } + + [TestMethod] + public async Task Given_Serialize_When_DeviceRenderOptions_Returns_MultiSelect_And_OtherHtml() + { + // Arrange + DeviceRenderOptions deviceRenderOptions = new DeviceRenderOptions + { + SdkInterface = DeviceRenderOptions.SdkInterfaceEnum.Native, + SdkUiType = new List() + { + DeviceRenderOptions.SdkUiTypeEnum.MultiSelect, + DeviceRenderOptions.SdkUiTypeEnum.OtherHtml + } + }; + + // Act + string result = JsonSerializer.Serialize(deviceRenderOptions, _jsonSerializerOptionsProvider.Options); + + // Assert + using JsonDocument json = JsonDocument.Parse(result); + JsonElement root = json.RootElement; + + JsonElement sdkInterface = root.GetProperty("sdkInterface"); + Assert.AreEqual("native", sdkInterface.GetString()); + + JsonElement sdkUiTypes = root.GetProperty("sdkUiType"); + Assert.AreEqual("multiSelect", sdkUiTypes[0].GetString()); + Assert.AreEqual("otherHtml", sdkUiTypes[1].GetString()); + } + + [TestMethod] + public async Task Given_Byte_Array_When_Serialize_Returns_Not_Null() + { + // Arrange + byte[] plainTextBytes = Encoding.ASCII.GetBytes("Bytes-To-Be-Encoded"); + string base64String = System.Convert.ToBase64String(plainTextBytes); + byte[] base64Bytes = Encoding.ASCII.GetBytes(base64String); + var threeDSecure = new ThreeDSecureData + { + Cavv = base64Bytes, + Xid = base64Bytes + }; + + // Act + string jsonRequest = JsonSerializer.Serialize(threeDSecure, _jsonSerializerOptionsProvider.Options); + + // Assert + string json = "{\"cavv\":\"Qnl0ZXMtVG8tQmUtRW5jb2RlZA==\",\"xid\":\"Qnl0ZXMtVG8tQmUtRW5jb2RlZA==\"}"; + Assert.AreEqual(json, jsonRequest); + } + + [TestMethod] + public async Task Given_Byte_Array_When_Deserialize_Result_ThreeDSecureData_Should_Deserialize_Correctly() + { + // Arrange + string json = "{\"cavv\":\"Qnl0ZXMtVG8tQmUtRW5jb2RlZA==\",\"xid\":\"Qnl0ZXMtVG8tQmUtRW5jb2RlZA==\"}"; + + // Act + ThreeDSecureData jsonRequest = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + string xid = Encoding.ASCII.GetString(jsonRequest.Xid); + string cavv = Encoding.ASCII.GetString(jsonRequest.Cavv); + string jsonElementBase64 = "Qnl0ZXMtVG8tQmUtRW5jb2RlZA=="; + Assert.AreEqual(jsonElementBase64, xid); + Assert.AreEqual(jsonElementBase64, cavv); + } + + [TestMethod] + public async Task Given_ConfigureCheckout_When_Timeout_Is_Provided_Then_Timeout_Is_Set() + { + // Arrange + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }, client => + { + client.Timeout = TimeSpan.FromSeconds(42); + }) + .Build(); + + // Act + var httpClient = testHost.Services.GetService().HttpClient; + + // Assert + Assert.AreEqual(httpClient.Timeout, TimeSpan.FromSeconds(42)); + } + + [TestMethod] + public async Task Given_Empty_ConfigureCheckout_When_No_AdyenOptions_Provided_Then_IPaymentService_Should_Throw_InvalidOperationException() + { + // Arrange + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + // Empty + }) + .Build(); + + // Act + // Assert + Assert.Throws(() => + { + // No ApiKey provided, cannot instantiate the ApiKeyToken object + testHost.Services.GetRequiredService(); + }); + } + + [TestMethod] + public async Task Given_IPaymentsService_When_Live_Url_And_Prefix_Are_Set_Returns_Correct_Live_Url_Endpoint_And_No_Prefix() + { + // Arrange + IHost liveHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = "your-live-api-key"; + options.Environment = AdyenEnvironment.Live; + options.LiveEndpointUrlPrefix = "prefix"; + }); + }) + .Build(); + + // Act + var paymentsService = liveHost.Services.GetRequiredService(); + + // Assert + Assert.AreEqual("https://prefix-checkout-live.adyenpayments.com/checkout/v71", paymentsService.HttpClient.BaseAddress.ToString()); + } + + [TestMethod] + public async Task Given_IPaymentsService_When_Test_Url_Returns_Correct_Test_Url_Endpoint_And_No_Prefix() + { + // Arrange + IHost liveHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + // Act + var paymentsService = liveHost.Services.GetRequiredService(); + + // Assert + Assert.AreEqual("https://checkout-test.adyen.com/v71", paymentsService.HttpClient.BaseAddress.ToString()); + } + + [TestMethod] + public async Task Given_IPaymentsService_When_Live_Url_And_Prefix_Not_Set_Throws_InvalidOperationException() + { + // Arrange + IHost liveHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.AdyenApiKey = "your-live-api-key"; + options.Environment = AdyenEnvironment.Live; + }); + }) + .Build(); + + // Act + // Assert + Assert.ThrowsException(() => + { + liveHost.Services.GetRequiredService(); + }); + } + + [TestMethod] + public async Task Given_ConfigureCheckout_When_Live_Url_And_Prefix_Not_Set_Throws_InvalidOperationException() + { + // Arrange + IHost liveHost = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Live; + }); + }) + .Build(); + + // Act + // Assert + Assert.Throws(() => + liveHost.Services.GetRequiredService() + ); + + Assert.Throws(() => + liveHost.Services.GetRequiredService() + ); + + Assert.Throws(() => + liveHost.Services.GetRequiredService() + ); + + Assert.Throws(() => + liveHost.Services.GetRequiredService() + ); + + Assert.Throws(() => + liveHost.Services.GetRequiredService() + ); + + Assert.Throws(() => + liveHost.Services.GetRequiredService() + ); + + Assert.Throws(() => + liveHost.Services.GetRequiredService() + ); + } + + [TestMethod] + public async Task Given_Serialize_When_PaymentRequest_AccountInfo_Is_Set_To_Null_Explicitly_Result_Is_Null() + { + // Arrange + var cardDetails = new CardDetails + { + Type = CardDetails.TypeEnum.Card + }; + + var accountInfoNullObject = new PaymentRequest( + merchantAccount: "YOUR_MERCHANT_ACCOUNT", + amount: new Amount("EUR", 1000), reference: "ACH test", + paymentMethod: new CheckoutPaymentMethod(cardDetails), + shopperIP: "192.0.2.1", + channel: PaymentRequest.ChannelEnum.Web, origin: "https://your-company.com", + returnUrl: "https://your-company.com/checkout?shopperOrder=12xy..", + accountInfo: null // Set `AccountInfo` explicitly to null + ); + + + var accountInfoNotPresentObject = new PaymentRequest( + merchantAccount: "YOUR_MERCHANT_ACCOUNT", + amount: new Amount("EUR", 1000), reference: "ACH test", + paymentMethod: new CheckoutPaymentMethod(cardDetails), + shopperIP: "192.0.2.1", + channel: PaymentRequest.ChannelEnum.Web, origin: "https://your-company.com", + returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." + //accountInfo: ... // AccountInfo (key) is not present + ); + + // Act + string accountInfoNullSerializedObject = JsonSerializer.Serialize(accountInfoNullObject, _jsonSerializerOptionsProvider.Options); + string accountInfoNotPresentSerializedObject = JsonSerializer.Serialize(accountInfoNotPresentObject, _jsonSerializerOptionsProvider.Options); + using var accountInfoNull = JsonDocument.Parse(accountInfoNullSerializedObject); + using var accountInfoNotPresent = JsonDocument.Parse(accountInfoNotPresentSerializedObject); + + // Assert + // AccountInfo is set, so the key `accountInfo` should have the value of { "accountInfo": null } + Assert.AreEqual(null, accountInfoNull.RootElement.GetProperty("accountInfo").GetString()); + + // AccountInfo is not set, so the key `accountInfo` should not be present in the serialized result. + Assert.IsFalse(accountInfoNotPresent.RootElement.TryGetProperty("accountInfo", out _)); + } + + [TestMethod] + public async Task Given_Serialize_When_PaymentMethod_Is_AchDetails_Result_Is_Not_Null() + { + // Arrange + var achDetails = new AchDetails + { + Type = AchDetails.TypeEnum.Ach, + BankAccountNumber = "1234567", + BankLocationId = "1234567", + EncryptedBankAccountNumber = "1234asdfg", + OwnerName = "John Smith" + }; + + var paymentRequest = new PaymentRequest( + merchantAccount: "YOUR_MERCHANT_ACCOUNT", + amount: new Amount("EUR", 1000), reference: "ACH test", + paymentMethod: new CheckoutPaymentMethod(achDetails), + shopperIP: "192.0.2.1", + channel: PaymentRequest.ChannelEnum.Web, origin: "https://your-company.com", + returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." + ); + + // Act + string serialized = JsonSerializer.Serialize(paymentRequest, _jsonSerializerOptionsProvider.Options); + using var jsonDoc = JsonDocument.Parse(serialized); + + // Assert + Assert.AreEqual("ach", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("type").GetString()); + Assert.AreEqual("1234567", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("bankAccountNumber").GetString()); + Assert.AreEqual("1234567", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("bankLocationId").GetString()); + Assert.AreEqual("1234asdfg", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("encryptedBankAccountNumber").GetString()); + Assert.AreEqual("John Smith", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("ownerName").GetString()); + + Assert.AreEqual("YOUR_MERCHANT_ACCOUNT", jsonDoc.RootElement.GetProperty("merchantAccount").GetString()); + Assert.AreEqual("ACH test", jsonDoc.RootElement.GetProperty("reference").GetString()); + Assert.AreEqual("https://your-company.com/checkout?shopperOrder=12xy..", jsonDoc.RootElement.GetProperty("returnUrl").GetString()); + } + + [TestMethod] + public async Task Given_Serialize_When_PaymentMethod_Is_ApplePayDetails_Result_Is_Not_Null() + { + // Arrange + var applePay = new ApplePayDetails( + type: ApplePayDetails.TypeEnum.Applepay, + applePayToken: "VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU..." + ); + + var paymentRequest = new PaymentRequest( + merchantAccount: "YOUR_MERCHANT_ACCOUNT", + amount: new Amount("EUR", 1000), + reference: "apple pay test", + paymentMethod: new CheckoutPaymentMethod(applePay), + returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.." + ); + + // Act + string serialized = JsonSerializer.Serialize(paymentRequest, _jsonSerializerOptionsProvider.Options); + using var jsonDoc = JsonDocument.Parse(serialized); + + // Assert + Assert.AreEqual("applepay", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("type").GetString()); + Assert.AreEqual("VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU...", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("applePayToken").GetString()); + + Assert.AreEqual("YOUR_MERCHANT_ACCOUNT", jsonDoc.RootElement.GetProperty("merchantAccount").GetString()); + Assert.AreEqual("apple pay test", jsonDoc.RootElement.GetProperty("reference").GetString()); + Assert.AreEqual("https://your-company.com/checkout?shopperOrder=12xy..", jsonDoc.RootElement.GetProperty("returnUrl").GetString()); + } + + [TestMethod] + public async Task Given_Serialize_When_PaymentMethod_Is_GooglePayDetails_Result_Is_Not_Null() + { + // Arrange + var paymentRequest = new PaymentRequest( + merchantAccount: "YOUR_MERCHANT_ACCOUNT", + amount: new Amount("EUR", 1000), + reference: "google pay test", + paymentMethod: new CheckoutPaymentMethod( + new GooglePayDetails( + type: GooglePayDetails.TypeEnum.Googlepay, + googlePayToken: "==Payload as retrieved from Google Pay response==", + fundingSource: GooglePayDetails.FundingSourceEnum.Debit + ) + ), + returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.."); + + // Act + string serialized = JsonSerializer.Serialize(paymentRequest, _jsonSerializerOptionsProvider.Options); + using var jsonDoc = JsonDocument.Parse(serialized); + + // Assert + Assert.AreEqual("googlepay", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("type").GetString()); + Assert.AreEqual("==Payload as retrieved from Google Pay response==", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("googlePayToken").GetString()); + Assert.AreEqual("debit", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("fundingSource").GetString()); + + Assert.AreEqual("YOUR_MERCHANT_ACCOUNT", jsonDoc.RootElement.GetProperty("merchantAccount").GetString()); + Assert.AreEqual("google pay test", jsonDoc.RootElement.GetProperty("reference").GetString()); + Assert.AreEqual("https://your-company.com/checkout?shopperOrder=12xy..", jsonDoc.RootElement.GetProperty("returnUrl").GetString()); + } + + [TestMethod] + public async Task Given_Serialize_When_PaymentMethod_Is_iDEAL_Result_Is_Not_Null() + { + // Arrange + var paymentRequest = new PaymentRequest( + merchantAccount: "YOUR_MERCHANT_ACCOUNT", + amount: new Amount("EUR", 1000), + reference: "ideal test", + paymentMethod: new CheckoutPaymentMethod(new IdealDetails( + type: IdealDetails.TypeEnum.Ideal, + issuer: "1121") + ), + returnUrl: "https://your-company.com/checkout?shopperOrder=12xy.."); + + // Act + string serialized = JsonSerializer.Serialize(paymentRequest, _jsonSerializerOptionsProvider.Options); + using var jsonDoc = JsonDocument.Parse(serialized); + + // Assert + Assert.AreEqual("ideal", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("type").GetString()); + Assert.AreEqual("YOUR_MERCHANT_ACCOUNT", jsonDoc.RootElement.GetProperty("merchantAccount").GetString()); + Assert.AreEqual("ideal test", jsonDoc.RootElement.GetProperty("reference").GetString()); + Assert.AreEqual("https://your-company.com/checkout?shopperOrder=12xy..", jsonDoc.RootElement.GetProperty("returnUrl").GetString()); + Assert.IsFalse(jsonDoc.RootElement.TryGetProperty("accountInfo", out _)); // null + } + + [TestMethod] + public async Task Given_Serialize_When_PaymentMethod_Is_BacsDirectDebitDetails_Result_Is_Not_Null() + { + // Arrange + var paymentRequest = new PaymentRequest + { + MerchantAccount = "YOUR_MERCHANT_ACCOUNT", + Amount = new Amount("GBP", 1000), + Reference = "bacs direct debit test", + PaymentMethod = new CheckoutPaymentMethod(new BacsDirectDebitDetails + { + Type = BacsDirectDebitDetails.TypeEnum.DirectdebitGB, + BankAccountNumber = "NL0123456789", + BankLocationId = "121000358", + HolderName = "John Smith" + }), + ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." + }; + + // Act + string serialized = JsonSerializer.Serialize(paymentRequest, _jsonSerializerOptionsProvider.Options); + using var jsonDoc = JsonDocument.Parse(serialized); + + // Assert + JsonElement element = jsonDoc.RootElement.GetProperty("paymentMethod"); + Assert.AreEqual("directdebit_GB", element.GetProperty("type").GetString()); + Assert.AreEqual("NL0123456789", element.GetProperty("bankAccountNumber").GetString()); + Assert.AreEqual("121000358", element.GetProperty("bankLocationId").GetString()); + Assert.AreEqual("John Smith", element.GetProperty("holderName").GetString()); + + Assert.AreEqual("YOUR_MERCHANT_ACCOUNT", jsonDoc.RootElement.GetProperty("merchantAccount").GetString()); + Assert.AreEqual("bacs direct debit test", jsonDoc.RootElement.GetProperty("reference").GetString()); + Assert.AreEqual("https://your-company.com/checkout?shopperOrder=12xy..", jsonDoc.RootElement.GetProperty("returnUrl").GetString()); + } + + [TestMethod] + public async Task Given_Serialize_When_PaymentMethod_Is_PayPalDetails_Result_Is_Not_Null() + { + // Arrange + var paymentRequest = new PaymentRequest + { + MerchantAccount = "YOUR_MERCHANT_ACCOUNT", + Amount = new Amount("USD", 1000), + Reference = "paypal test", + PaymentMethod = new CheckoutPaymentMethod(new PayPalDetails + { + Type = PayPalDetails.TypeEnum.Paypal, + Subtype = PayPalDetails.SubtypeEnum.Sdk, + StoredPaymentMethodId = "2345654212345432345" + }), + ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." + }; + + // Act + string serialized = JsonSerializer.Serialize(paymentRequest, _jsonSerializerOptionsProvider.Options); + using var jsonDoc = JsonDocument.Parse(serialized); + + // Assert + JsonElement element = jsonDoc.RootElement.GetProperty("paymentMethod"); + + Assert.AreEqual("paypal", element.GetProperty("type").GetString()); + Assert.AreEqual("sdk", element.GetProperty("subtype").GetString()); + } + + [TestMethod] + public async Task Given_Serialize_When_PaymentMethod_Is_ZipDetails_Result_Is_Not_Null() + { + // Arrange + var paymentRequest = new PaymentRequest + { + MerchantAccount = "YOUR_MERCHANT_ACCOUNT", + Amount = new Amount("USD", 1000), + Reference = "zip test", + PaymentMethod = new CheckoutPaymentMethod(new ZipDetails + { + Type = ZipDetails.TypeEnum.Zip + }), + ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy..", + }; + + // Act + string serialized = JsonSerializer.Serialize(paymentRequest, _jsonSerializerOptionsProvider.Options); + using var jsonDoc = JsonDocument.Parse(serialized); + + // Assert + Assert.AreEqual("zip", jsonDoc.RootElement.GetProperty("paymentMethod").GetProperty("type").GetString()); + Assert.AreEqual("YOUR_MERCHANT_ACCOUNT", jsonDoc.RootElement.GetProperty("merchantAccount").GetString()); + Assert.AreEqual("zip test", jsonDoc.RootElement.GetProperty("reference").GetString()); + Assert.AreEqual("https://your-company.com/checkout?shopperOrder=12xy..", jsonDoc.RootElement.GetProperty("returnUrl").GetString()); + } + + // test oneOf deserialization in CheckoutPaymentRequest + [TestMethod] + public async Task Given_Deserialize_When_PaymentRequest_OneOf_Then_Result_Is_PaymentRequestIdeal() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/payment-request-ideal.json"); + + // Act + PaymentRequest result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Act + Assert.IsNotNull(result.PaymentMethod); + Assert.IsNotNull(result.PaymentMethod.IdealDetails); + Assert.AreEqual(IdealDetails.TypeEnum.Ideal, result.PaymentMethod.IdealDetails.Type); + } + + [TestMethod] + public async Task SessionsAsyncTest() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/sessions-success.json"); + + var createCheckoutSessionRequest = new CreateCheckoutSessionRequest( + amount: new Amount("EUR", 10000L), + merchantAccount: "TestMerchantAccount", + reference: "TestReference", + returnUrl: "http://test-url.com", + channel: CreateCheckoutSessionRequest.ChannelEnum.Web, + countryCode: "NL" + ); + + _paymentsService.SessionsAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new PaymentsService.SessionsApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.Created }, + json, + "/sessions", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + ISessionsApiResponse response = await _paymentsService.SessionsAsync(createCheckoutSessionRequest, new RequestOptions().AddIdempotencyKey("idempotencyKey")); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.Created, response.StatusCode); + Assert.IsTrue(response.IsCreated); + CreateCheckoutSessionResponse sessionResponse = response.Created(); + Assert.IsNotNull(sessionResponse); + Assert.AreEqual("CS0068299CB8DA273A", sessionResponse.Id); + } + + } + +} \ No newline at end of file diff --git a/Adyen.Test/Checkout/UtilityServiceTest.cs b/Adyen.Test/Checkout/UtilityServiceTest.cs new file mode 100644 index 000000000..b4aca2758 --- /dev/null +++ b/Adyen.Test/Checkout/UtilityServiceTest.cs @@ -0,0 +1,79 @@ +using Adyen.Checkout.Extensions; +using Adyen.Checkout.Models; +using Adyen.Checkout.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using Adyen.Core.Options; +using System.Text.Json; + +namespace Adyen.Test.Checkout +{ + [TestClass] + public class UtilityServiceTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public UtilityServiceTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureCheckout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_UtilityResponse_For_OriginKeys_Returns_Success() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkoututility/originkeys-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4xLmNvbQ.UEwIBmW9-c_uXo5wSEr2w8Hz8hVIpujXPHjpcEse3xI", response.OriginKeys["https://www.your-domain1.com"]); + } + + [TestMethod] + public void Given_Deserialize_When_CardDetailsResponse_Returns_Not_Null() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/checkout/card-details-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsFalse(response.IsCardCommercial); + Assert.AreEqual("CREDIT", response.FundingSource); + Assert.AreEqual("FR", response.IssuingCountryCode); + + Assert.AreEqual("visa", response.Brands[0].Type); + Assert.IsTrue(response.Brands[0].Supported); + + Assert.AreEqual("cartebancaire", response.Brands[1].Type); + Assert.IsFalse(response.Brands[1].Supported); + } + + [TestMethod] + public void Given_Deserialize_When_ApplePaySessionResponse_Result_Is_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/checkout/apple-pay-sessions-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("eyJ2Z...340278gdflkaswer", response.Data); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/CheckoutTest.cs b/Adyen.Test/CheckoutTest.cs deleted file mode 100644 index ccdb78961..000000000 --- a/Adyen.Test/CheckoutTest.cs +++ /dev/null @@ -1,1090 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.HttpClient.Interfaces; -using Adyen.Model; -using Adyen.Model.Checkout; -using Adyen.Service.Checkout; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using NSubstitute; -using static Adyen.Model.Checkout.PaymentResponse; -using ApplicationInfo = Adyen.Model.ApplicationInformation.ApplicationInfo; -using Environment = Adyen.Model.Environment; -using IRecurringService = Adyen.Service.Checkout.IRecurringService; -using RecurringService = Adyen.Service.Checkout.RecurringService; - -namespace Adyen.Test -{ - [TestClass] - public class CheckoutTest : BaseTest - { - /// - /// Tests successful checkout client Test URL generation. - /// - [TestMethod] - public void CheckoutEndpointTestEnvironmentSuccessTest() - { - var client = CreateMockForAdyenClientTest(new Config()); - client.SetEnvironment(Environment.Test, "companyUrl"); - var checkout = new PaymentsService(client); - checkout.PaymentsAsync(new PaymentRequest()).GetAwaiter(); - - ClientInterfaceSubstitute.Received().RequestAsync("https://checkout-test.adyen.com/v71/payments", - Arg.Any(), null, new HttpMethod("POST"), default); - } - - /// - /// Tests successful checkout client Live URL generation. - /// - [TestMethod] - public void CheckoutEndpointLiveEnvironmentSuccessTest() - { - var client = CreateMockForAdyenClientTest(new Config()); - client.SetEnvironment(Environment.Live, "companyUrl"); - var checkout = new PaymentsService(client); - checkout.PaymentsAsync(new PaymentRequest()).GetAwaiter(); - - ClientInterfaceSubstitute.Received().RequestAsync( - "https://companyUrl-checkout-live.adyenpayments.com/checkout/v71/payments", - Arg.Any(), null, new HttpMethod("POST"), Arg.Any()); - } - - /// - /// Tests unsuccessful checkout client Live URL generation. - /// - [TestMethod] - public void CheckoutEndpointLiveErrorTest() - { - var config = new Config(); - var client = new Client(config); - client.SetEnvironment(Environment.Live, null); - Assert.ThrowsException(() => new PaymentsService(client)); - } - - /// - /// Tests unsuccessful checkout client Live URL generation. - /// - [TestMethod] - public void CheckoutEndpointLiveWithBasicAuthErrorTest() - { - var client = new Client(new Config() - { - Username = "ws_*******", - Password = "*******", - Environment = Environment.Live - - }); - Assert.ThrowsException( - () => new PaymentsService(client)); - } - - /// - /// Tests successful checkout client Live URL generation with basic auth. - /// - [TestMethod] - public void CheckoutEndpointLiveWithBasicAuthTest() - { - var client = CreateMockForAdyenClientTest( - new Config - { - Username = "ws_*******", - Password = "******", - Environment = Environment.Live, - LiveEndpointUrlPrefix = "live-url" - }); - var checkout = new PaymentsService(client); - checkout.PaymentsAsync(new PaymentRequest()).GetAwaiter(); - ClientInterfaceSubstitute.Received().RequestAsync("https://live-url-checkout-live.adyenpayments.com/checkout/v71/payments", - Arg.Any(), null, new HttpMethod("POST"), default); - } - - /// - /// Tests successful checkout client Live URL generation with API key. - /// - [TestMethod] - public void CheckoutEndpointLiveWithAPIKeyTest() - { - var client = CreateMockForAdyenClientTest( - new Config - { - XApiKey = "xapikey", - Environment = Environment.Live, - LiveEndpointUrlPrefix = "live-url" - }); - var checkout = new PaymentsService(client); - checkout.PaymentsAsync(new PaymentRequest()).GetAwaiter(); - ClientInterfaceSubstitute.Received().RequestAsync("https://live-url-checkout-live.adyenpayments.com/checkout/v71/payments", - Arg.Any(), null, new HttpMethod("POST"), Arg.Any()); - } - - /// - /// Test success flow for - /// POST /payments - /// - [TestMethod] - public void PaymentsAdditionalDataParsingTest() - { - var paymentRequest = CreatePaymentRequestCheckout(); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/payments-success.json"); - var checkout = new PaymentsService(client); - var paymentResponse = checkout.Payments(paymentRequest); - Assert.AreEqual("8535296650153317", paymentResponse.PspReference); - Assert.AreEqual(ResultCodeEnum.Authorised, paymentResponse.ResultCode); - Assert.IsNotNull(paymentResponse.AdditionalData); - Assert.AreEqual(9, paymentResponse.AdditionalData.Count); - Assert.AreEqual("8/2018", paymentResponse.AdditionalData["expiryDate"]); - Assert.AreEqual("GREEN", paymentResponse.AdditionalData["fraudResultType"]); - Assert.AreEqual("411111", paymentResponse.AdditionalData["cardBin"]); - Assert.AreEqual("1111", paymentResponse.AdditionalData["cardSummary"]); - Assert.AreEqual("false", paymentResponse.AdditionalData["fraudManualReview"]); - Assert.AreEqual("Default", paymentResponse.AdditionalData["aliasType"]); - Assert.AreEqual("H167852639363479", paymentResponse.AdditionalData["alias"]); - Assert.AreEqual("visa", paymentResponse.AdditionalData["cardPaymentMethod"]); - Assert.AreEqual("NL", paymentResponse.AdditionalData["cardIssuingCountry"]); - } - - /// - /// Test success flow for async - /// POST /payments - /// - [TestMethod] - public async Task PaymentsAsyncAdditionalDataParsingTest() - { - var paymentRequest = CreatePaymentRequestCheckout(); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/payments-success.json"); - var checkout = new PaymentsService(client); - var paymentResponse = await checkout.PaymentsAsync(paymentRequest); - Assert.AreEqual("8535296650153317", paymentResponse.PspReference); - Assert.AreEqual(ResultCodeEnum.Authorised, paymentResponse.ResultCode); - Assert.IsNotNull(paymentResponse.AdditionalData); - Assert.AreEqual(9, paymentResponse.AdditionalData.Count); - Assert.AreEqual("8/2018", paymentResponse.AdditionalData["expiryDate"]); - Assert.AreEqual("GREEN", paymentResponse.AdditionalData["fraudResultType"]); - Assert.AreEqual("411111", paymentResponse.AdditionalData["cardBin"]); - Assert.AreEqual("1111", paymentResponse.AdditionalData["cardSummary"]); - Assert.AreEqual("false", paymentResponse.AdditionalData["fraudManualReview"]); - Assert.AreEqual("Default", paymentResponse.AdditionalData["aliasType"]); - Assert.AreEqual("H167852639363479", paymentResponse.AdditionalData["alias"]); - Assert.AreEqual("visa", paymentResponse.AdditionalData["cardPaymentMethod"]); - Assert.AreEqual("NL", paymentResponse.AdditionalData["cardIssuingCountry"]); - } - - /// - /// Test success flow for 3DS2 - /// POST /payments - /// - [TestMethod] - public void Payments3DS2Test() - { - var payment3DS2Request = CreatePaymentRequest3DS2(); - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/payments-3DS2-IdentifyShopper.json"); - var checkout = new PaymentsService(client); - var paymentResponse = checkout.Payments(payment3DS2Request); - Assert.AreEqual(paymentResponse.ResultCode, ResultCodeEnum.IdentifyShopper); - Assert.AreEqual(paymentResponse.Action.GetCheckoutThreeDS2Action().Type.ToString(), "ThreeDS2"); - Assert.IsNotNull(paymentResponse.Action.GetCheckoutThreeDS2Action().PaymentData); - } - - /// - /// Test error flow for - /// POST /payments - /// - [TestMethod] - public void PaymentsErrorTest() - { - var paymentMethodsRequest = CreatePaymentRequestCheckout(); - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/payments-error-invalid-data-422.json"); - var checkout = new PaymentsService(client); - var paymentResponse = checkout.Payments(paymentMethodsRequest); - Assert.IsNull(paymentResponse.PspReference); - } - - /// - /// Test success flow for - /// POST /payments/details - /// - [TestMethod] - public void PaymentDetailsTest() - { - var detailsRequest = CreateDetailsRequest(); - detailsRequest.Details = - new PaymentCompletionDetails( - payload: "Ab02b4c0!BQABAgBQn96RxfJHpp2RXhqQBuhQFWgE...gfGHb4IZSP4IpoCC2==RXhqQBuhQ"); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentsdetails-success.json"); - var checkout = new PaymentsService(client); - var paymentResponse = checkout.PaymentsDetails(detailsRequest); - Assert.AreEqual("8515232733321252", paymentResponse.PspReference); - } - - /// - /// Test success flow for async - /// POST /payments/details - /// - [TestMethod] - public async Task PaymentDetailsAsyncTest() - { - var detailsRequest = CreateDetailsRequest(); - detailsRequest.Details = - new PaymentCompletionDetails( - payload: "Ab02b4c0!BQABAgBQn96RxfJHpp2RXhqQBuhQFWgE...gfGHb4IZSP4IpoCC2==RXhqQBuhQ"); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentsdetails-success.json"); - var checkout = new PaymentsService(client); - var paymentResponse = await checkout.PaymentsDetailsAsync(detailsRequest); - Assert.AreEqual("8515232733321252", paymentResponse.PspReference); - } - - /// - /// Test error flow for - /// POST /payments/details - /// - [TestMethod] - public void PaymentDetailsErrorTest() - { - var detailsRequest = CreateDetailsRequest(); - detailsRequest.Details = - new PaymentCompletionDetails( - payload: "Ab02b4c0!BQABAgBQn96RxfJHpp2RXhqQBuhQFWgE...gfGHb4IZSP4IpoCC2==RXhqQBuhQ"); - var client = - CreateMockTestClientApiKeyBasedRequestAsync( - "mocks/checkout/paymentsdetails-error-invalid-data-422.json"); - var checkout = new PaymentsService(client); - var paymentResponse = checkout.PaymentsDetails(detailsRequest); - Assert.IsNull(paymentResponse.ResultCode); - } - - /// - /// Test success deserialization for - /// POST /payments/details - /// - [TestMethod] - public void PaymentDetailsResponseDeserializeTest() - { - var detailsRequest = CreateDetailsRequest(); - detailsRequest.Details = - new PaymentCompletionDetails( - payload: "Ab02b4c0!BQABAgBQn96RxfJHpp2RXhqQBuhQFWgE...gfGHb4IZSP4IpoCC2==RXhqQBuhQ"); - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentsdetails-action-success.json"); - var checkout = new PaymentsService(client); - var paymentResponse = checkout.PaymentsDetails(detailsRequest); - Assert.AreEqual(paymentResponse.PspReference, "8515232733321252"); - Assert.AreEqual(paymentResponse.ResultCode, PaymentDetailsResponse.ResultCodeEnum.Authorised); - } - - /// - /// Test success flow for - /// POST /paymentMethods - /// - [TestMethod] - public void PaymentMethodsTest() - { - var paymentMethodsRequest = CreatePaymentMethodRequest("YourMerchantAccount"); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentmethods-success.json"); - var checkout = new PaymentsService(client); - var paymentMethodsResponse = checkout.PaymentMethods(paymentMethodsRequest); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods.Count, 32); - } - - /// - /// Test success flow for - /// POST /paymentMethods - /// - [TestMethod] - public void PaymentMethodsIssuersTest() - { - var paymentMethodsRequest = CreatePaymentMethodRequest("YourMerchantAccount"); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentmethods-success.json"); - var checkout = new PaymentsService(client); - var paymentMethodsResponse = checkout.PaymentMethods(paymentMethodsRequest); - Assert.IsNotNull(paymentMethodsResponse.PaymentMethods[12].Issuers); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods[12].Issuers[0].Id, "66"); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods[12].Issuers[0].Name, "Bank Nowy BFG S.A."); - } - - /// - /// Test success flow for - /// POST /paymentMethods - /// - [TestMethod] - public void PaymentMethodsStoreValueTest() - { - var paymentMethodsRequest = CreatePaymentMethodRequest("YourMerchantAccount"); - paymentMethodsRequest.Store = "MerchantStore"; - Assert.AreEqual(paymentMethodsRequest.Store, "MerchantStore"); - } - - /// - /// Test success flow for async - /// POST /paymentMethods - /// - [TestMethod] - public async Task PaymentMethodsAsyncTest() - { - var paymentMethodsRequest = CreatePaymentMethodRequest("YourMerchantAccount"); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentmethods-success.json"); - var checkout = new PaymentsService(client); - var paymentMethodsResponse = await checkout.PaymentMethodsAsync(paymentMethodsRequest); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods.Count, 32); - } - - /// - /// Test error flow for - /// POST /paymentMethods - /// - [TestMethod] - public void PaymentMethodsErrorTest() - { - var paymentMethodsRequest = CreatePaymentMethodRequest("YourMerchantAccount"); - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentmethods-error-forbidden-403.json"); - var checkout = new PaymentsService(client); - var paymentMethodsResponse = checkout.PaymentMethods(paymentMethodsRequest); - Assert.IsNull(paymentMethodsResponse.PaymentMethods); - } - - /// - /// Test success flow including brands check for - /// POST /paymentMethods - /// - [TestMethod] - public void PaymentMethodsWithBrandsTest() - { - var paymentMethodsRequest = CreatePaymentMethodRequest("YourMerchantAccount"); - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentmethods-brands-success.json"); - var checkout = new PaymentsService(client); - var paymentMethodsResponse = checkout.PaymentMethods(paymentMethodsRequest); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods.Count, 7); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods[0].Brands.Count, 5); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods[0].Brands[0], "visa"); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods[0].Brands[1], "mc"); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods[0].Brands[2], "amex"); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods[0].Brands[3], "bcmc"); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods[0].Brands[4], "maestro"); - } - - /// - /// Test flow without including brands check for - /// POST /paymentMethods - /// - [TestMethod] - public void PaymentMethodsWithoutBrandsTest() - { - var paymentMethodsRequest = CreatePaymentMethodRequest("YourMerchantAccount"); - var client = - CreateMockTestClientApiKeyBasedRequestAsync( - "mocks/checkout/paymentmethods-without-brands-success.json"); - var checkout = new PaymentsService(client); - var paymentMethodsResponse = checkout.PaymentMethods(paymentMethodsRequest); - Assert.AreEqual(paymentMethodsResponse.PaymentMethods.Count, 50); - } - - [TestMethod] - public void ApplicationInfoTest() - { - ApplicationInfo applicationInfo = new ApplicationInfo(); - Assert.AreEqual(applicationInfo.AdyenLibrary.Name, Constants.ClientConfig.LibName); - Assert.AreEqual(applicationInfo.AdyenLibrary.Version, Constants.ClientConfig.LibVersion); - } - - [Ignore] // The adyen library info will not be added anymore by default, let's investigate if we should. - [TestMethod] - public void PaymentRequestApplicationInfoTest() - { - var paymentRequest = CreatePaymentRequestCheckout(); - var name = paymentRequest.ApplicationInfo.AdyenLibrary.Name; - var version = paymentRequest.ApplicationInfo.AdyenLibrary.Version; - Assert.AreEqual(version, Constants.ClientConfig.LibVersion); - Assert.AreEqual(name, Constants.ClientConfig.LibName); - } - - [TestMethod] - public void PaymentRequestAppInfoExternalTest() - { - var externalPlatform = new ExternalPlatform(); - var merchantApplication = new CommonField(); - externalPlatform.Integrator = "TestExternalPlatformIntegration"; - externalPlatform.Name = "TestExternalPlatformName"; - externalPlatform.Version = "TestExternalPlatformVersion"; - merchantApplication.Name = "MerchantApplicationName"; - merchantApplication.Version = "MerchantApplicationVersion"; - var paymentRequest = CreatePaymentRequestCheckout(); - paymentRequest.ApplicationInfo = new Model.Checkout.ApplicationInfo - { - ExternalPlatform = externalPlatform, - MerchantApplication = merchantApplication - }; - Assert.AreEqual(paymentRequest.ApplicationInfo.ExternalPlatform.Integrator, - "TestExternalPlatformIntegration"); - Assert.AreEqual(paymentRequest.ApplicationInfo.ExternalPlatform.Name, "TestExternalPlatformName"); - Assert.AreEqual(paymentRequest.ApplicationInfo.ExternalPlatform.Version, "TestExternalPlatformVersion"); - Assert.AreEqual(paymentRequest.ApplicationInfo.MerchantApplication.Name, "MerchantApplicationName"); - Assert.AreEqual(paymentRequest.ApplicationInfo.MerchantApplication.Version, "MerchantApplicationVersion"); - } - - - [TestMethod] - public void PaymentsOriginTest() - { - var paymentMethodsRequest = CreatePaymentRequestCheckout(); - paymentMethodsRequest.Origin = "https://localhost:8080"; - Assert.AreEqual(paymentMethodsRequest.Origin, "https://localhost:8080"); - } - - /// - /// Test CreatePaymentLinkRequest - /// POST /payments/result - /// - [TestMethod] - public void CreatePaymentLinkSuccess() - { - var createPaymentLinkRequest = new PaymentLinkRequest(store: "TheDemoStore", - amount: new Amount(currency: "EUR", 1000), merchantAccount: "MerchantAccount", reference: "reference"); - Assert.AreEqual(createPaymentLinkRequest.Store, "TheDemoStore"); - } - - /// - /// Test success flow for - /// POST /payments/result - /// - [TestMethod] - public void PaymentLinksSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/payment-links-success.json"); - var checkout = new PaymentLinksService(client); - var createPaymentLinkRequest = new PaymentLinkRequest(amount: new Amount(currency: "EUR", 1000), - merchantAccount: "MerchantAccount", reference: "YOUR_ORDER_NUMBER"); - var paymentLinksResponse = checkout.PaymentLinks(createPaymentLinkRequest); - Assert.AreEqual(paymentLinksResponse.Url, - "https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=YW1vdW50TWlub3JW...JRA"); - Assert.AreEqual(paymentLinksResponse.ExpiresAt, new DateTime(2019,12,17,10,05,29)); - Assert.AreEqual(paymentLinksResponse.Reference, "YOUR_ORDER_NUMBER"); - Assert.IsNotNull(paymentLinksResponse.Amount); - } - - /// - /// Test success flow for creation of a payment link with recurring payment - /// POST /paymentLinks - /// - [TestMethod] - public void CreateRecurringPaymentLinkSuccessTest() - { - var client = - CreateMockTestClientApiKeyBasedRequestAsync( - "mocks/checkout/paymentlinks-recurring-payment-success.json"); - var checkout = new PaymentLinksService(client); - - var createPaymentLinkRequest = new PaymentLinkRequest(amount: new Amount(currency: "EUR", 100), - merchantAccount: "MerchantAccount", reference: "REFERENCE_NUMBER") - { - CountryCode = "GR", - ShopperLocale = "GR", - ShopperReference = "ShopperReference", - StorePaymentMethodMode = PaymentLinkRequest.StorePaymentMethodModeEnum.Enabled, - RecurringProcessingModel = PaymentLinkRequest.RecurringProcessingModelEnum.Subscription - }; - - var paymentLinksResponse = checkout.PaymentLinks(createPaymentLinkRequest); - - Assert.AreEqual(createPaymentLinkRequest.Reference, paymentLinksResponse.Reference); - Assert.AreEqual( - "https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=YW1vdW50TWlub3JW...JRA", - paymentLinksResponse.Url); - Assert.AreEqual(createPaymentLinkRequest.Amount.Currency, paymentLinksResponse.Amount.Currency); - Assert.AreEqual(createPaymentLinkRequest.Amount.Value, paymentLinksResponse.Amount.Value); - } - - /// - /// Test success flow for multibanco - /// Post /payments - /// - [Ignore] - [TestMethod] - public void MultibancoPaymentSuccessMockedTest() - { - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentsresult-multibanco-success.json"); - var checkout = new PaymentsService(client); - var paymentRequest = CreatePaymentRequestCheckout(); - var paymentResponse = checkout.Payments(paymentRequest); - var paymentResponseAction = paymentResponse.Action.GetCheckoutVoucherAction(); - Assert.AreEqual(paymentResponseAction.PaymentMethodType, "multibanco"); - Assert.AreEqual(paymentResponseAction.ExpiresAt, "01/12/2020 09:37:49"); - Assert.AreEqual(paymentResponseAction.Reference, "501 422 944"); - Assert.AreEqual(paymentResponseAction.Entity, "12101"); - } - - /// - /// Test RiskData - Clientdata flow for - /// POST /payments - /// - [TestMethod] - public void PaymentClientdataParsingTest() - { - var paymentRequest = CreatePaymentRequestCheckout(); - var riskdata = new RiskData - { - ClientData = "IOfW3k9G2PvXFu2j" - }; - paymentRequest.RiskData = riskdata; - Assert.AreEqual(paymentRequest.RiskData.ClientData, "IOfW3k9G2PvXFu2j"); - } - - /// - /// Test success flow for paypal - /// Post /payments - /// - [TestMethod] - public void PaypalPaymentSuccessTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/payments-success-paypal.json"); - var checkout = new PaymentsService(client); - var paymentRequest = CreatePaymentRequestCheckout(); - var paymentResponse = checkout.Payments(paymentRequest); - var result = paymentResponse.Action.GetCheckoutSDKAction(); - Assert.IsNotNull(result); - Assert.AreEqual("EC-42N19135GM6949000", result.SdkData["orderID"]); - Assert.AreEqual("Ab02b4c0!BQABAgARb1TvUJa4nwS0Z1nOmxoYfD9+z...", result.PaymentData); - Assert.AreEqual("paypal", result.PaymentMethodType); - } - - [TestMethod] - public void ApplePayDetailsDeserializationTest() - { - var json = "{\"type\": \"applepay\",\"applePayToken\": \"VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU...\"}"; - var result = CheckoutPaymentMethod.FromJson(json); - Assert.IsInstanceOfType(result.ActualInstance); - Assert.AreEqual(result.GetApplePayDetails().Type, ApplePayDetails.TypeEnum.Applepay); - } - - [TestMethod] - public void CheckoutPaymentMethodDeserializationWithUnknownValuesTest() - { - var json = "{\"type\": \"applepay\",\"someValue\": \"notInSpec\",\"applePayToken\": \"VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU...\"}"; - var result = CheckoutPaymentMethod.FromJson(json); - var json2 = "{\"type\": \"paywithgoogle\",\"someValue\": \"notInSpec\",\"googlePayToken\": \"==Payload as retrieved from Google Pay response==\"}"; - var result2 = CheckoutPaymentMethod.FromJson(json2); - Assert.IsInstanceOfType(result.ActualInstance); - Assert.IsInstanceOfType(result2.ActualInstance); - Assert.AreEqual(result2.GetPayWithGoogleDetails().GooglePayToken, "==Payload as retrieved from Google Pay response=="); - } - - [TestMethod] - public void BlikDetailsDeserializationTest() - { - var json = "{\"type\":\"blik\",\"blikCode\":\"blikCode\"}"; - var result = JsonConvert.DeserializeObject(json); - Assert.IsInstanceOfType(result); - Assert.AreEqual(result.Type, BlikDetails.TypeEnum.Blik); - } - - [TestMethod] - public void DragonpayDetailsDeserializationTest() - { - var json = - "{\"issuer\":\"issuer\",\"shopperEmail\":\"test@test.com\",\"type\":\"dragonpay_ebanking\"}"; - var result = Util.JsonOperation.Deserialize(json); - Assert.IsInstanceOfType(result); - Assert.AreEqual(result.Type, DragonpayDetails.TypeEnum.Ebanking); - } - - [TestMethod] - public void AfterPayDetailsDeserializationTest() - { - var json = @"{ - 'resultCode':'RedirectShopper', - 'action':{ - 'paymentMethodType':'afterpaytouch', - 'method':'GET', - 'url':'https://checkoutshopper-test.adyen.com/checkoutshopper/checkoutPaymentRedirect?redirectData=...', - 'type':'redirect' - } - }"; - var result = JsonConvert.DeserializeObject(json); - Assert.IsInstanceOfType(result.Action.GetCheckoutRedirectAction()); - Assert.AreEqual(result.Action.GetCheckoutRedirectAction().PaymentMethodType, "afterpaytouch"); - } - - [TestMethod] - public void AfterPayDetailsSerializationTest() - { - var json = @"{ - 'paymentMethod':{ - 'type':'afterpaytouch' - }, - 'amount':{ - 'value':1000, - 'currency':'AUD' - }, - 'shopperName':{ - 'firstName':'Simon', - 'lastName':'Hopper' - }, - 'shopperEmail':'s.hopper@example.com', - 'shopperReference':'YOUR_UNIQUE_SHOPPER_ID', - 'reference':'YOUR_ORDER_REFERENCE', - 'merchantAccount':'YOUR_MERCHANT_ACCOUNT', - 'returnUrl':'https://your-company.com/checkout?shopperOrder=12xy..', - 'countryCode':'AU', - 'telephoneNumber':'+61 2 8520 3890', - 'billingAddress':{ - 'city':'Sydney', - 'country':'AU', - 'houseNumberOrName':'123', - 'postalCode':'2000', - 'stateOrProvince':'NSW', - 'street':'Happy Street' - }, - 'deliveryAddress':{ - 'city':'Sydney', - 'country':'AU', - 'houseNumberOrName':'123', - 'postalCode':'2000', - 'stateOrProvince':'NSW', - 'street':'Happy Street' - }, - 'lineItems':[ - { - 'description':'Shoes', - 'quantity':'1', - 'amountIncludingTax':'400', - 'amountExcludingTax': '331', - 'taxAmount': '69', - 'id':'Item #1' - }, - { - 'description':'Socks', - 'quantity':'2', - 'amountIncludingTax':'300', - 'amountExcludingTax': '248', - 'taxAmount': '52', - 'id':'Item #2' - } - ] - }"; - - var result = JsonConvert.DeserializeObject(json); - Assert.IsInstanceOfType(result.PaymentMethod.GetAfterpayDetails()); - Assert.AreEqual(result.PaymentMethod.GetAfterpayDetails().Type, AfterpayDetails.TypeEnum.Afterpaytouch); - } - - /// - /// Test toJson() that includes the type in the action - /// - [TestMethod] - public void PaymentsResponseToJsonTest() - { - var paymentRequest = CreatePaymentRequestCheckout(); - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentResponse-3DS-ChallengeShopper.json"); - var checkout = new PaymentsService(client); - var paymentResponse = checkout.Payments(paymentRequest); - var paymentResponseToJson = paymentResponse.ToJson(); - var jObject = JObject.Parse(paymentResponseToJson); - Assert.AreEqual(jObject["action"]["type"], "threeDS2"); - } - - [TestMethod] - public void StoredPaymentMethodsTest() - { - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentmethods-storedpaymentmethods.json"); - var checkout = new PaymentsService(client); - var paymentMethodsRequest = new PaymentMethodsRequest(merchantAccount: "TestMerchant"); - var paymentMethodsResponse = checkout.PaymentMethods(paymentMethodsRequest); - Assert.AreEqual(4, paymentMethodsResponse.StoredPaymentMethods.Count); - Assert.AreEqual("NL32ABNA0515071439", paymentMethodsResponse.StoredPaymentMethods[0].Iban); - Assert.AreEqual("Adyen", paymentMethodsResponse.StoredPaymentMethods[0].OwnerName); - Assert.AreEqual("sepadirectdebit", paymentMethodsResponse.StoredPaymentMethods[0].Type); - } - - /// - /// Test if the fraud result are properly deseriazed - /// POST /payments - /// - [TestMethod] - public void ThreeDS2Test() - { - var paymentRequest = CreatePaymentRequestCheckout(); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentResponse-3DS2-Action.json"); - var checkout = new PaymentsService(client); - var paymentResponse = checkout.Payments(paymentRequest); - var paymentResponseThreeDs2Action = paymentResponse.Action.GetCheckoutThreeDS2Action(); - Assert.AreEqual(ResultCodeEnum.IdentifyShopper, paymentResponse.ResultCode); - Assert.AreEqual(CheckoutThreeDS2Action.TypeEnum.ThreeDS2, paymentResponseThreeDs2Action.Type); - } - - [TestMethod] - public void CheckoutLocalDateSerializationTest() - { - var checkoutSessionRequest = new CreateCheckoutSessionRequest - { - MerchantAccount = "merchant", - Reference = "TestReference", - ReturnUrl = "http://test-url.com", - Amount = new Amount("EUR", 10000L), - DateOfBirth = new DateTime(1998, 1, 1, 1, 1, 1), - ExpiresAt = new DateTime(2023, 4, 1, 1, 1, 1) - }; - // Create a DateTime object with minutes and seconds and verify it gets omitted - Assert.IsTrue(checkoutSessionRequest.ToJson().Contains("1998-01-01")); - // Opposite; check that it keeps full ISO string for other Date parameters - Assert.IsTrue(checkoutSessionRequest.ToJson().Contains("2023-04-01T01:01:01")); - } - - /// - /// Test success sessions - /// POST /sessions - /// - [TestMethod] - public void CheckoutSessionSuccessTest() - { - var checkoutSessionRequest = new CreateCheckoutSessionRequest - { - MerchantAccount = "TestMerchant", - Reference = "TestReference", - ReturnUrl = "http://test-url.com", - Amount = new Amount("EUR", 10000L), - Store = "My Store" - }; - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/sessions-success.json"); - var checkout = new PaymentsService(client); - var checkoutSessionResponse = checkout.Sessions(checkoutSessionRequest); - Assert.AreEqual("TestMerchant", checkoutSessionResponse.MerchantAccount); - Assert.AreEqual("TestReference", checkoutSessionResponse.Reference); - Assert.AreEqual("http://test-url.com", checkoutSessionResponse.ReturnUrl); - Assert.AreEqual("EUR", checkoutSessionResponse.Amount.Currency); - Assert.AreEqual("1000", checkoutSessionResponse.Amount.Value.ToString()); - Assert.AreEqual("My Store", checkoutSessionResponse.Store); - - } - - /// - /// Test success orders - /// POST /paymentMethods/balance - /// - [TestMethod] - public void CheckoutPaymentMethodsBalanceSuccessTest() - { - var checkoutBalanceCheckRequest = new BalanceCheckRequest - (amount: new Amount("EUR", 10000L), - merchantAccount: "TestMerchant", - reference: "TestReference", - paymentMethod: new Dictionary - { - { "type", "givex" }, - { "number", "4126491073027401" }, - { "cvc", "737" } - }); - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/paymentmethods-balance-success.json"); - var checkout = new OrdersService(client); - var checkoutBalanceCheckResponse = checkout.GetBalanceOfGiftCard(checkoutBalanceCheckRequest); - Assert.AreEqual(BalanceCheckResponse.ResultCodeEnum.Success, - checkoutBalanceCheckResponse.ResultCode); - Assert.AreEqual("EUR", checkoutBalanceCheckResponse.Balance.Currency); - Assert.AreEqual("2500", checkoutBalanceCheckResponse.Balance.Value.ToString()); - } - - /// - /// Test success orders - /// POST /orders - /// - [TestMethod] - public void CheckoutOrderSuccessTest() - { - var checkoutCreateOrderRequest = new CreateOrderRequest - (amount: new Amount("EUR", 10000L), - merchantAccount: "TestMerchant", - reference: "TestReference"); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/orders-success.json"); - var checkout = new OrdersService(client); - var checkoutOrdersResponse = checkout.Orders(checkoutCreateOrderRequest); - Assert.AreEqual(CreateOrderResponse.ResultCodeEnum.Success, checkoutOrdersResponse.ResultCode); - Assert.AreEqual("8515930288670953", checkoutOrdersResponse.PspReference); - Assert.AreEqual("Ab02b4c0!BQABAgBqxSuFhuXUF7IvIRvSw5bDPHN...", checkoutOrdersResponse.OrderData); - Assert.AreEqual("EUR", checkoutOrdersResponse.RemainingAmount.Currency); - Assert.AreEqual("2500", checkoutOrdersResponse.RemainingAmount.Value.ToString()); - } - - /// - /// Test success orders cancel - /// POST /orders/cancel - /// - [TestMethod] - public void CheckoutOrdersCancelSuccessTest() - { - var checkoutCancelOrderRequest = new CancelOrderRequest - (merchantAccount: "TestMerchant", - order: new EncryptedOrderData(orderData: "823fh892f8f18f4...148f13f9f3f", pspReference: "8815517812932012")); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/orders-cancel-success.json"); - var checkout = new OrdersService(client); - var checkoutOrdersCancelResponse = checkout.CancelOrder(checkoutCancelOrderRequest); - Assert.AreEqual("Received", checkoutOrdersCancelResponse.ResultCode.ToString()); - Assert.AreEqual("8515931182066678", checkoutOrdersCancelResponse.PspReference); - } - - /// - /// Test success orders cancel - /// GET /storedPaymentMethods - /// - [TestMethod] - public void GetStoredPaymentMethodsTest() - { - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/get-storedPaymentMethod-success.json"); - var checkout = new RecurringService(client); - var listStoredPaymentMethodsResponse = - checkout.GetTokensForStoredPaymentDetails("shopperRef", "merchantAccount"); - Assert.AreEqual("string", listStoredPaymentMethodsResponse.StoredPaymentMethods[0].Type); - Assert.AreEqual("merchantAccount", listStoredPaymentMethodsResponse.MerchantAccount); - } - - /// - /// Test success orders cancel - /// GET /storedPaymentMethods - /// - [TestMethod] - public void DeleteStoredPaymentMethodsTest() - { - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/get-storedPaymentMethod-success.json"); - var checkout = new RecurringService(client); - checkout.DeleteTokenForStoredPaymentDetails("recurringId","shopperRef", "merchantAccount"); - } - - #region Modification endpoints tests - - /// - /// Test success capture - /// POST /payments/{paymentPspReference}/captures - /// - [TestMethod] - public void PaymentsCapturesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/captures-success.json"); - var checkout = new ModificationsService(client); - var createPaymentCaptureRequest = new PaymentCaptureRequest(amount: new Amount("EUR", 1000L), - merchantAccount: "test_merchant_account"); - var paymentCaptureResource = checkout.CaptureAuthorisedPayment("12321A", createPaymentCaptureRequest); - Assert.AreEqual(PaymentCaptureResponse.StatusEnum.Received, paymentCaptureResource.Status); - Assert.AreEqual("my_reference", paymentCaptureResource.Reference); - } - - /// - /// Test success payments cancels - /// POST /payments/{paymentPspReference}/cancels - /// - [TestMethod] - public void PaymentsCancelsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/cancels-success.json"); - var checkout = new ModificationsService(client); - var createPaymentCancelRequest = new PaymentCancelRequest(merchantAccount: "test_merchant_account"); - var paymentCancelResource = - checkout.CancelAuthorisedPaymentByPspReference("12321A", createPaymentCancelRequest); - Assert.AreEqual(PaymentCancelResponse.StatusEnum.Received, paymentCancelResource.Status); - Assert.AreEqual("my_reference", paymentCancelResource.Reference); - } - - /// - /// Test success cancels - /// POST /cancels - /// - [TestMethod] - public void CancelsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/standalone-cancels-success.json"); - var checkout = new ModificationsService(client); - var createStandalonePaymentCancelRequest = - new StandalonePaymentCancelRequest(merchantAccount: "test_merchant_account"); - var standalonePaymentCancelResource = - checkout.CancelAuthorisedPayment(createStandalonePaymentCancelRequest); - Assert.AreEqual(StandalonePaymentCancelResponse.StatusEnum.Received, - standalonePaymentCancelResource.Status); - Assert.AreEqual("861633338418518C", standalonePaymentCancelResource.PspReference); - } - - /// - /// Test success payments refunds - /// POST /payments/{paymentPspReference}/refunds - /// - [TestMethod] - public void TestPaymentsRefunds() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/refunds-success.json"); - var checkout = new ModificationsService(client); - var createPaymentRefundRequest = new PaymentRefundRequest(amount: new Amount("EUR", 1000L), - merchantAccount: "test_merchant_account"); - var paymentRefundResource = checkout.RefundCapturedPayment("12321A", createPaymentRefundRequest); - Assert.AreEqual(PaymentRefundResponse.StatusEnum.Received, paymentRefundResource.Status); - Assert.AreEqual("my_reference", paymentRefundResource.Reference); - } - - /// - /// Test success payments reversals - /// POST /payments/{paymentPspReference}/reversals - /// - [TestMethod] - public void PaymentsReversalsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/reversals-success.json"); - var checkout = new ModificationsService(client); - var createPaymentReversalRequest = - new PaymentReversalRequest(merchantAccount: "test_merchant_account"); - var paymentReversalResource = checkout.RefundOrCancelPayment("12321A", createPaymentReversalRequest); - Assert.AreEqual(PaymentReversalResponse.StatusEnum.Received, paymentReversalResource.Status); - Assert.AreEqual("my_reference", paymentReversalResource.Reference); - } - - /// - /// Test success payments cancels - /// POST /payments/{paymentPspReference}/amountUpdates - /// - [TestMethod] - public void PaymentsAmountUpdatesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/amount-updates-success.json"); - var checkout = new ModificationsService(client); - var createPaymentAmountUpdateRequest = new PaymentAmountUpdateRequest( - amount: new Amount("EUR", 1000L), - merchantAccount: "test_merchant_account"); - var paymentAmountUpdateResource = - checkout.UpdateAuthorisedAmount("12321A", createPaymentAmountUpdateRequest); - Assert.AreEqual(PaymentAmountUpdateResponse.StatusEnum.Received, paymentAmountUpdateResource.Status); - Assert.AreEqual("my_reference", paymentAmountUpdateResource.Reference); - } - - /// - /// Test success donations - /// POST /donations - /// - [TestMethod] - public void DonationsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/donations-success.json"); - var checkout = new DonationsService(client); - var paymentDonationRequest = - new DonationPaymentRequest( - merchantAccount: "test_merchant_account", - amount: new Amount("USD", 5), - donationAccount: "Charity_TEST", - paymentMethod: new DonationPaymentMethod(new CardDonations()), - reference: "179761FE-1913-4226-9F43-E475DE634BBA", - returnUrl: "https://your-company.com/..."); - var donationResponse = checkout.Donations(paymentDonationRequest); - Assert.AreEqual(DonationPaymentResponse.StatusEnum.Completed, - donationResponse.Status); - Assert.AreEqual("10720de4-7c5d-4a17-9161-fa4abdcaa5c4", donationResponse.Reference); - } - - /// - /// Test success donations - /// POST /donations - /// - [TestMethod] - public void CardDetailsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/card-details-success.json"); - var checkout = new PaymentsService(client); - var cardDetailRequest = - new CardDetailsRequest - { - MerchantAccount = "TestMerchant", - CardNumber = "1234567890", - CountryCode = "NL" - }; - var cardDetailResponse = checkout.CardDetails(cardDetailRequest); - Assert.AreEqual("visa", cardDetailResponse.Brands[0].Type); - Assert.AreEqual("cartebancaire", cardDetailResponse.Brands[1].Type); - } - - /// - /// Test success donations - /// POST /donations - /// - [TestMethod] - public void ApplePaySessionsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/apple-pay-sessions-success.json"); - var checkout = new UtilityService(client); - var applePaySessionRequest = new ApplePaySessionRequest() - { - DisplayName = "YOUR_MERCHANT_NAME", - DomainName = "domainName", - MerchantIdentifier = "234tvsadh34fsghlker3..w35sgfs" - - }; - var applePayResponse = checkout.GetApplePaySessionAsync(applePaySessionRequest).Result; - Assert.AreEqual("eyJ2Z...340278gdflkaswer", applePayResponse.Data); - } - - #endregion - - /// - /// Test success orders cancel - /// GET /storedPaymentMethods - /// - [TestMethod] - public void CheckoutServiceInterfaceTest() - { - var client = - CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkout/get-storedPaymentMethod-success.json"); - var checkout = new MyRecurringService(client); - checkout.DeleteTokenForStoredPaymentDetails("shopperRef", "merchantAccount"); - } - } - - // Implementation to test the Recurring Service Interface - public class MyRecurringService : IRecurringService - { - private readonly IClient _client; - public MyRecurringService(Client client) - { - _client = client.HttpClient; - } - - public void DeleteTokenForStoredPaymentDetails(string recurringId, string shopperReference = default, - string merchantAccount = default, RequestOptions requestOptions = default) - { - var response = _client.Request("", "json", requestOptions, HttpMethod.Delete); - } - - public Task DeleteTokenForStoredPaymentDetailsAsync(string recurringId, string shopperReference = default, - string merchantAccount = default, RequestOptions requestOptions = default, - CancellationToken cancellationToken = default) - { - throw new NotImplementedException(); - } - - public ListStoredPaymentMethodsResponse GetTokensForStoredPaymentDetails(string shopperReference = default, - string merchantAccount = default, RequestOptions requestOptions = default) - { - throw new NotImplementedException(); - } - - public Task GetTokensForStoredPaymentDetailsAsync(string shopperReference = default, string merchantAccount = default, - RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - throw new NotImplementedException(); - } - - public StoredPaymentMethodResource StoredPaymentMethods(StoredPaymentMethodRequest storedPaymentMethodRequest = default, - RequestOptions requestOptions = default) - { - throw new NotImplementedException(); - } - - public Task StoredPaymentMethodsAsync(StoredPaymentMethodRequest storedPaymentMethodRequest = default, - RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - throw new NotImplementedException(); - } - } -} diff --git a/Adyen.Test/CheckoutUtilityTest.cs b/Adyen.Test/CheckoutUtilityTest.cs deleted file mode 100644 index 70515889c..000000000 --- a/Adyen.Test/CheckoutUtilityTest.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; -using Adyen.Model.Checkout; -using Adyen.Service.Checkout; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class CheckoutUtilityTest : BaseTest - { - /// - /// Test success flow for - ///POST /originKeys - /// - [TestMethod] - public void OriginKeysSuccessTest() - { - var checkoutUtilityRequest = new UtilityRequest(originDomains: new List { "www.test.com", "https://www.your-domain2.com" }); - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/checkoututility/originkeys-success.json"); - var _checkout = new UtilityService(client); - var originKeysResponse = _checkout.OriginKeys(checkoutUtilityRequest); - Assert.AreEqual("pub.v2.7814286629520534.aHR0cHM6Ly93d3cueW91ci1kb21haW4xLmNvbQ.UEwIBmW9-c_uXo5wSEr2w8Hz8hVIpujXPHjpcEse3xI", originKeysResponse.OriginKeys["https://www.your-domain1.com"]); - } - } -} diff --git a/Adyen.Test/Core/Auth/TokenProviderTest.cs b/Adyen.Test/Core/Auth/TokenProviderTest.cs new file mode 100644 index 000000000..db8862722 --- /dev/null +++ b/Adyen.Test/Core/Auth/TokenProviderTest.cs @@ -0,0 +1,49 @@ +using Adyen.Core.Auth; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Core.Auth +{ + [TestClass] + public class TokenProviderTest + { + internal sealed class TestToken : TokenBase + { + public string Value { get; } + + internal TestToken(string value) + { + Value = value; + } + } + + [TestMethod] + public async Task Given_TokenProviderWithToken_When_GetCalled_Then_SameInstanceAndValueAreReturned() + { + // Arrange + var token = new TestToken("apikey"); + var provider = new TokenProvider(token); + + // Act + var result = provider.Get(); + + // Assert + Assert.AreSame(token, result); + Assert.AreEqual("apikey", result.Value); + } + + [TestMethod] + public async Task Given_TokenProvider_When_GetCalledMultipleTimes_Then_SameInstanceReturnedEachTime() + { + // Arrange + var token = new TestToken("apikey"); + var provider = new TokenProvider(token); + + // Act + var first = provider.Get(); + var second = provider.Get(); + + // Assert + Assert.AreSame(first, second); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Core/Client/ApiResponseTest.cs b/Adyen.Test/Core/Client/ApiResponseTest.cs new file mode 100644 index 000000000..d89d88f50 --- /dev/null +++ b/Adyen.Test/Core/Client/ApiResponseTest.cs @@ -0,0 +1,173 @@ +using System; +using System.IO; +using System.Net; +using System.Net.Http; +using System.Text.Json; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Adyen.Core.Client; + +namespace Adyen.Test.Core.Client +{ + [TestClass] + public class ApiResponseTests + { + private HttpRequestMessage CreateRequest(string? uri = "https://adyen.com") + => new HttpRequestMessage(HttpMethod.Get, uri); + + private HttpResponseMessage CreateResponse(HttpStatusCode statusCode, string reasonPhrase = "") + => new HttpResponseMessage(statusCode) + { + ReasonPhrase = reasonPhrase + }; + + [TestMethod] + [DataRow(HttpStatusCode.OK, true)] + [DataRow(HttpStatusCode.Created, true)] + [DataRow(HttpStatusCode.Accepted, true)] + [DataRow(HttpStatusCode.BadRequest, false)] + [DataRow(HttpStatusCode.Unauthorized, false)] + [DataRow(HttpStatusCode.Forbidden, false)] + [DataRow(HttpStatusCode.NotFound, false)] + [DataRow(HttpStatusCode.TooManyRequests, false)] + [DataRow(HttpStatusCode.UnprocessableEntity, false)] + [DataRow(HttpStatusCode.InternalServerError, false)] + public async Task Given_ApiResponse_When_SuccessStatusCode_Then_Result_ShouldMatchHttpResponseMessage(HttpStatusCode code, bool expected) + { + // Arrange + // Act + var response = new ApiResponse(CreateRequest(), CreateResponse(code), "", "/", DateTime.UtcNow, new JsonSerializerOptions()); + // Assert + Assert.AreEqual(expected, response.IsSuccessStatusCode); + } + + [TestMethod] + public async Task Given_ApiResponse_When_Properties_Are_Set_Then_Object_Should_Return_Correct_Values() + { + // Arrange + var request = CreateRequest("https://adyen.com/"); + + // Act + var responseMessage = CreateResponse(HttpStatusCode.Accepted, "Accepted"); + var apiResponse = new ApiResponse(request, responseMessage, "{\"key\":\"value\"}", "/path", DateTime.UtcNow, new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(responseMessage.StatusCode, apiResponse.StatusCode); + Assert.AreEqual(responseMessage.ReasonPhrase, apiResponse.ReasonPhrase); + Assert.AreEqual(request.RequestUri, apiResponse.RequestUri); + Assert.AreEqual("/path", apiResponse.Path); + Assert.IsNotNull(apiResponse.Headers); + Assert.AreEqual("{\"key\":\"value\"}", apiResponse.RawContent); + Assert.IsNull(apiResponse.ContentStream); + } + + [TestMethod] + public async Task Given_ApiResponse_When_ContentStream_Is_Set_Then_Return_ContentStream_And_Empty_RawContent() + { + // Arrange + var request = CreateRequest(); + var responseMessage = CreateResponse(HttpStatusCode.OK); + + // Act + var stream = new MemoryStream(new byte[] { 1, 2, 3 }); + var apiResponse = new ApiResponse(request, responseMessage, stream, "/stream", DateTime.UtcNow, new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(stream, apiResponse.ContentStream); + Assert.AreEqual(string.Empty, apiResponse.RawContent); + } + + private class TestApiResponse : ApiResponse, + IOk, ICreated, IAccepted, + IBadRequest, IUnauthorized, IForbidden, ITooManyRequests, INotFound, IUnprocessableContent, IInternalServerError + { + public TestApiResponse(HttpRequestMessage message, HttpResponseMessage response, string raw, string path, DateTime requested, JsonSerializerOptions opts) + : base(message, response, raw, path, requested, opts) { } + + private T DeserializeRaw() => JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions)!; + + public T Ok() => DeserializeRaw(); + public bool TryDeserializeOkResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T Created() => DeserializeRaw(); + public bool TryDeserializeCreatedResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T Accepted() => DeserializeRaw(); + public bool TryDeserializeAcceptedResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T BadRequest() => DeserializeRaw(); + public bool TryDeserializeBadRequestResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T Unauthorized() => DeserializeRaw(); + public bool TryDeserializeUnauthorizedResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T Forbidden() => DeserializeRaw(); + public bool TryDeserializeForbiddenResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T TooManyRequests() => DeserializeRaw(); + public bool TryDeserializeTooManyRequestsResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T NotFound() => DeserializeRaw(); + public bool TryDeserializeNotFoundResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T UnprocessableContent() => DeserializeRaw(); + public bool TryDeserializeUnprocessableContentResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + + public T InternalServerError() => DeserializeRaw(); + public bool TryDeserializeInternalServerErrorResponse(out T? result) { result = string.IsNullOrEmpty(RawContent) ? default : DeserializeRaw(); return result != null; } + } + + private record TestModel(string Foo); + + [TestMethod] + public async Task Given_ApiResponse_When_TypedResponses_Then_Deserialize_Correctly() + { + // Arrange + var model = new TestModel("adyen"); + + // Act + string json = JsonSerializer.Serialize(model, new JsonSerializerOptions()); + var response = new TestApiResponse(CreateRequest(), CreateResponse(HttpStatusCode.OK), json, "/path", DateTime.UtcNow, new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(model, response.Ok()); + Assert.IsTrue(response.TryDeserializeOkResponse(out var okResult)); + Assert.AreEqual(model, okResult); + + Assert.AreEqual(model, response.Created()); + Assert.IsTrue(response.TryDeserializeCreatedResponse(out var createdResult)); + Assert.AreEqual(model, createdResult); + + Assert.AreEqual(model, response.Accepted()); + Assert.IsTrue(response.TryDeserializeAcceptedResponse(out var acceptedResult)); + Assert.AreEqual(model, acceptedResult); + + Assert.AreEqual(model, response.BadRequest()); + Assert.IsTrue(response.TryDeserializeBadRequestResponse(out var badResult)); + Assert.AreEqual(model, badResult); + + Assert.AreEqual(model, response.Unauthorized()); + Assert.IsTrue(response.TryDeserializeUnauthorizedResponse(out var unAuthResult)); + Assert.AreEqual(model, unAuthResult); + + Assert.AreEqual(model, response.Forbidden()); + Assert.IsTrue(response.TryDeserializeForbiddenResponse(out var forbiddenResult)); + Assert.AreEqual(model, forbiddenResult); + + Assert.AreEqual(model, response.TooManyRequests()); + Assert.IsTrue(response.TryDeserializeTooManyRequestsResponse(out var tooManyResult)); + Assert.AreEqual(model, tooManyResult); + + Assert.AreEqual(model, response.NotFound()); + Assert.IsTrue(response.TryDeserializeNotFoundResponse(out var notFoundResult)); + Assert.AreEqual(model, notFoundResult); + + Assert.AreEqual(model, response.UnprocessableContent()); + Assert.IsTrue(response.TryDeserializeUnprocessableContentResponse(out var unprocessableResult)); + Assert.AreEqual(model, unprocessableResult); + + Assert.AreEqual(model, response.InternalServerError()); + Assert.IsTrue(response.TryDeserializeInternalServerErrorResponse(out var internalResult)); + Assert.AreEqual(model, internalResult); + } + } +} diff --git a/Adyen.Test/Core/Client/HttpRequestMessageExtensions.cs b/Adyen.Test/Core/Client/HttpRequestMessageExtensions.cs new file mode 100644 index 000000000..a7652c36e --- /dev/null +++ b/Adyen.Test/Core/Client/HttpRequestMessageExtensions.cs @@ -0,0 +1,95 @@ +using Adyen.Core.Client.Extensions; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Core.Client +{ + [TestClass] + public class HttpRequestMessageExtensionsTest + { + [TestMethod] + public void Given_AddUserAgentToHeaders_When_ApplicationName_Is_Null_Returns_adyen_dotnet_api_library_And_AdyenLibraryVersion() + { + // Arrange + HttpRequestMessageExtensions.ApplicationName = null; + var request = new HttpRequestMessage(); + + // Act + request.AddUserAgentToHeaders(); + + // Assert + string target = request.Headers.GetValues("UserAgent").First(); + Assert.AreEqual($"adyen-dotnet-api-library/{HttpRequestMessageExtensions.AdyenLibraryVersion}", target); + } + + [TestMethod] + public void Given_AddUserAgentToHeaders_When_ApplicationName_Is_Set_Returns_MyApp_adyen_dotnet_api_library_And_AdyenLibraryVersion() + { + // Arrange + var request = new HttpRequestMessage(); + HttpRequestMessageExtensions.ApplicationName = "MyApp"; + + // Act + request.AddUserAgentToHeaders(); + + // Assert + string target = request.Headers.GetValues("UserAgent").First(); + Assert.AreEqual($"MyApp adyen-dotnet-api-library/{HttpRequestMessageExtensions.AdyenLibraryVersion}", target); + } + + [TestMethod] + public void Given_AddLibraryNameToHeader_When_Provided_Returns_adyen_dotnet_api_library() + { + // Arrange + HttpRequestMessageExtensions.ApplicationName = null; + var request = new HttpRequestMessage(); + + // Act + request.AddLibraryNameToHeader(); + + // Assert + string target = request.Headers.GetValues("adyen-library-name").First(); + Assert.AreEqual("adyen-dotnet-api-library", target); + } + + [TestMethod] + public void Given_AddLibraryNameToHeader_When_Provided_Returns_AdyenLibraryVersion() + { + // Arrange + HttpRequestMessageExtensions.ApplicationName = null; + var request = new HttpRequestMessage(); + + // Act + request.AddLibraryVersionToHeader(); + + // Assert + string target = request.Headers.GetValues("adyen-library-version").First(); + Assert.AreEqual(HttpRequestMessageExtensions.AdyenLibraryVersion, target); + } + + [TestMethod] + public void Given_AddUserAgentToHeaders_When_Called_MultipleTimes_Should_Not_Throw_Any_Exceptions() + { + // Arrange + HttpRequestMessageExtensions.ApplicationName = null; + var request = new HttpRequestMessage(); + + // Act + // Assert + try + { + request.AddUserAgentToHeaders(); + request.AddUserAgentToHeaders(); + + request.AddLibraryNameToHeader(); + request.AddLibraryNameToHeader(); + + request.AddLibraryVersionToHeader(); + request.AddLibraryVersionToHeader(); + } + catch (Exception e) + { + Assert.Fail(); + } + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Core/Client/UrlBuilderExtensionsTest.cs b/Adyen.Test/Core/Client/UrlBuilderExtensionsTest.cs new file mode 100644 index 000000000..aeadc3c3a --- /dev/null +++ b/Adyen.Test/Core/Client/UrlBuilderExtensionsTest.cs @@ -0,0 +1,154 @@ +using Adyen.Core.Client; +using Adyen.Core.Options; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Core.Client +{ + [TestClass] + public class UrlBuilderExtensionsTest + { + #region Checkout && POS-SDK + [TestMethod] + public async Task Given_ConstructHostUrl_When_Environment_Is_Live_Then_CheckoutUrl_Contains_Prefix_And_Live_String() + { + // Arrange + AdyenOptions adyenOptions = new AdyenOptions() + { + Environment = AdyenEnvironment.Live, + LiveEndpointUrlPrefix = "prefix", + }; + + // Act + string target = UrlBuilderExtensions.ConstructHostUrl(adyenOptions, "https://checkout-test.adyen.com/v71"); + + // Assert + Assert.AreEqual("https://prefix-checkout-live.adyenpayments.com/checkout/v71", target); + } + + [TestMethod] + public async Task Given_ConstructHostUrl_When_Environment_Is_Live_And_No_Prefix_For_Checkout_Throws_InvalidOperationException() + { + // Arrange + AdyenOptions adyenOptions = new AdyenOptions() + { + Environment = AdyenEnvironment.Live, + LiveEndpointUrlPrefix = null + }; + + // Act + // Assert + Assert.Throws(() => UrlBuilderExtensions.ConstructHostUrl(adyenOptions, "https://checkout-test.adyen.com/v71")); + } + + #endregion + + [TestMethod] + public async Task Given_ConstructHostUrl_When_Environment_Is_Live_Then_Checkout_POS_SDK_Contains_Prefix_And_Live_String_Without_Checkout() + { + // Arrange + AdyenOptions adyenOptions = new AdyenOptions() + { + Environment = AdyenEnvironment.Live, + LiveEndpointUrlPrefix = "prefix", + }; + + // Act + string target = UrlBuilderExtensions.ConstructHostUrl(adyenOptions, "https://checkout-test.adyen.com/checkout/possdk/v68"); + + // Assert + Assert.AreEqual("https://prefix-checkout-live.adyenpayments.com/checkout/possdk/v68", target); + } + + + #region Pal + [TestMethod] + public async Task Given_ConstructHostUrl_When_Environment_Is_Live_Then_PalUrl_Contains_Prefix_And_Live_String() + { + // Arrange + AdyenOptions adyenOptions = new AdyenOptions() + { + Environment = AdyenEnvironment.Live, + LiveEndpointUrlPrefix = "prefix", + }; + + // Act + string target = UrlBuilderExtensions.ConstructHostUrl(adyenOptions, "https://pal-test.adyen.com/pal/servlet/Payment/v68"); + + // Assert + Assert.AreEqual("https://prefix-pal-live.adyenpayments.com/pal/servlet/Payment/v68", target); + } + + [TestMethod] + public async Task Given_ConstructHostUrl_When_Environment_Is_Live_And_No_Prefix_For_Pal_Throws_InvalidOperationException() + { + // Arrange + AdyenOptions adyenOptions = new AdyenOptions() + { + Environment = AdyenEnvironment.Live, + LiveEndpointUrlPrefix = null + }; + + // Act + // Assert + Assert.Throws(() => UrlBuilderExtensions.ConstructHostUrl(adyenOptions, "https://pal-test.adyen.com/pal/servlet/Payment/v68")); + } + + #endregion + + + #region SessionAuthentication + [TestMethod] + public async Task Given_ConstructHostUrl_When_Environment_Is_Live_Then_SessionAuthentication_Url_Contains_Prefix_And_Live_String() + { + // Arrange + AdyenOptions adyenOptions = new AdyenOptions() + { + Environment = AdyenEnvironment.Live, + LiveEndpointUrlPrefix = "prefix", + }; + + // Act + string target = UrlBuilderExtensions.ConstructHostUrl(adyenOptions, "https://test.adyen.com/authe/api/v1"); + + // Assert + Assert.AreEqual("https://authe-live.adyen.com/authe/api/v1", target); + } + + #endregion + + [TestMethod] + public async Task Given_ConstructHostUrl_When_Environment_Is_Test_And_Prefix_Given_Then_Url_Does_Not_Contain_Prefix() + { + // Arrange + AdyenOptions adyenOptions = new AdyenOptions() + { + Environment = AdyenEnvironment.Test, + LiveEndpointUrlPrefix = "prefix", + }; + + // Act + string target = UrlBuilderExtensions.ConstructHostUrl(adyenOptions, "https://test.adyen.com"); + + // Assert + Assert.IsFalse(target.Contains("prefix")); + } + + [TestMethod] + public async Task Given_ConstructHostUrl_When_Environment_Is_Live_And_No_Prefix_Does_Not_Throw_InvalidOperationException_And_Contains_String_Value_Test() + { + // Arrange + AdyenOptions adyenOptions = new AdyenOptions() + { + Environment = AdyenEnvironment.Live, + LiveEndpointUrlPrefix = null + }; + + // Act + string target = UrlBuilderExtensions.ConstructHostUrl(adyenOptions, "https://test.adyen.com/"); + + // Assert + Assert.IsTrue(target.Contains("test")); + } + + } +} \ No newline at end of file diff --git a/Adyen.Test/Core/Converters/ByteArrayTest.cs b/Adyen.Test/Core/Converters/ByteArrayTest.cs new file mode 100644 index 000000000..542775b8e --- /dev/null +++ b/Adyen.Test/Core/Converters/ByteArrayTest.cs @@ -0,0 +1,114 @@ +using System.Text; +using System.Text.Json; +using Adyen.Core.Converters; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Core.Converters +{ + [TestClass] + public class ByteArrayTest + { + private readonly ByteArrayConverter _converter = new ByteArrayConverter(); + + [TestMethod] + public void Given_ByteArray_When_Write_Then_Result_Should_Write_UTF8_String() + { + // Arrange + byte[] bytes = Encoding.UTF8.GetBytes("adyen"); + using var stream = new MemoryStream(); + using var writer = new Utf8JsonWriter(stream); + + // Act + _converter.Write(writer, bytes, new JsonSerializerOptions()); + writer.Flush(); + string target = Encoding.UTF8.GetString(stream.ToArray()); + + // Assert + Assert.AreEqual("\"adyen\"", target); + } + + [TestMethod] + public void Given_ByteArray_Null_When_Write_Then_Result_Returns_Null() + { + // Arrange + using var stream = new MemoryStream(); + using var writer = new Utf8JsonWriter(stream); + + // Act + _converter.Write(writer, null, new JsonSerializerOptions()); + writer.Flush(); + string json = Encoding.UTF8.GetString(stream.ToArray()); + + // Assert + Assert.AreEqual("null", json); + } + + [TestMethod] + public void Given_Json_When_Read_And_Decoded_Then_Should_Return_ByteArray() + { + // Arrange + string json = "\"adyen\""; + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(json)); + reader.Read(); + + // Act + byte[] result = _converter.Read(ref reader, typeof(byte[]), new JsonSerializerOptions()); + string decoded = Encoding.UTF8.GetString(result); + + // Assert + Assert.AreEqual("adyen", decoded); + } + + [TestMethod] + public void Given_Json_Null_When_Read_Then_Returns_Null() + { + // Arrange + string json = "null"; + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(json)); + reader.Read(); + + // Act + byte[] result = _converter.Read(ref reader, typeof(byte[]), new JsonSerializerOptions()); + + // Assert + Assert.IsNull(result); + } + + [TestMethod] + public void Given_ByteArray_When_Write_And_Read_Then_Result_Returns_Original_Bytes() + { + // Arrange + byte[] original = Encoding.UTF8.GetBytes("adyen"); + using var stream = new MemoryStream(); + using var writer = new Utf8JsonWriter(stream); + + _converter.Write(writer, original, new JsonSerializerOptions()); + writer.Flush(); + string json = Encoding.UTF8.GetString(stream.ToArray()); + + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(json)); + reader.Read(); + + // Act + byte[] result = _converter.Read(ref reader, typeof(byte[]), new JsonSerializerOptions()); + + // Assert + CollectionAssert.AreEqual(original, result); + } + + [TestMethod] + public void Given_EmptyString_When_Read_Then_ShouldReturnEmptyByteArray() + { + // Arrange + string json = "\"\""; + Utf8JsonReader reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(json)); + reader.Read(); + + // Act + byte[] result = _converter.Read(ref reader, typeof(byte[]), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(Array.Empty(), result); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Core/Converters/DateOnlyJsonConverterTest.cs b/Adyen.Test/Core/Converters/DateOnlyJsonConverterTest.cs new file mode 100644 index 000000000..1c7013897 --- /dev/null +++ b/Adyen.Test/Core/Converters/DateOnlyJsonConverterTest.cs @@ -0,0 +1,105 @@ +using System.Text.Json; +using Adyen.Core.Converters; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Core.Converters +{ + [TestClass] + public class DateOnlyJsonConverterTests + { + private readonly DateOnlyJsonConverter _converter = new DateOnlyJsonConverter(); + + [TestMethod] + public void Given_DateWithDashes_yyyy_MM_dd_When_Read_Then_ReturnsCorrectDate() + { + // Arrange + string json = "\"2025-12-25\""; + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + + // Act + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(new DateOnly(2025, 12, 25), result); + } + + [TestMethod] + public void Given_Date_yyyyMMdd_When_Read_Then_ReturnsCorrectDate() + { + // Arrange + string json = "\"20251225\""; + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + + // Act + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(new DateOnly(2025, 12, 25), result); + } + + [TestMethod] + public void Given_WrongFormatDateOnlyString_When_Read_Then_ThrowsNotSupportedException() + { + // Arrange + string json = "\"25-12-2025\""; // Incorrect format dd-MM-yyyy + + // Act + // Assert + Assert.ThrowsException(() => + { + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + }); + } + [TestMethod] + public void Given_InvalidDateOnlyString_When_Read_Then_ThrowsJsonException() + { + // Arrange + string json = "invalid-date"; + + // Act + // Assert + Assert.Throws(() => + { + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + }); + } + + [TestMethod] + public void Given_NullToken_When_Read_Then_ThrowsNotSupportedException() + { + // Arrange + string json = "null"; + + // Act + // Assert + Assert.ThrowsException(() => { + Utf8JsonReader reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + }); + } + + [TestMethod] + public void Given_DateOnlyValue_When_Write_Then_WritesCorrectDateOnlyValue() + { + // Arrange + var date = new DateOnly(2025, 12, 25); + using var stream = new MemoryStream(); + using var writer = new Utf8JsonWriter(stream); + + // Act + _converter.Write(writer, date, new JsonSerializerOptions()); + writer.Flush(); + string json = System.Text.Encoding.UTF8.GetString(stream.ToArray()); + + // Assert + Assert.AreEqual("\"2025-12-25\"", json); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Core/Converters/DateOnlyNullableJsonConverterTest.cs b/Adyen.Test/Core/Converters/DateOnlyNullableJsonConverterTest.cs new file mode 100644 index 000000000..8f75f6470 --- /dev/null +++ b/Adyen.Test/Core/Converters/DateOnlyNullableJsonConverterTest.cs @@ -0,0 +1,106 @@ +using System.Text.Json; +using Adyen.Core.Converters; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Core.Converters +{ + [TestClass] + public class DateOnlyNullableJsonConverterTest + { + private readonly DateOnlyNullableJsonConverter _converter = new DateOnlyNullableJsonConverter(); + + [TestMethod] + public void Given_DateWithDashes_yyyy_MM_dd_When_Read_Then_ReturnsCorrectDate() + { + // Arrange + string json = "\"2025-12-25\""; + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + + // Act + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(new DateOnly(2025, 12, 25), result); + } + + [TestMethod] + public void Given_Date_yyyyMMdd_When_Read_Then_ReturnsCorrectDate() + { + // Arrange + string json = "\"20251225\""; + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + + // Act + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(new DateOnly(2025, 12, 25), result); + } + + [TestMethod] + public void Given_WrongFormatDateOnlyString_When_Read_Then_ThrowsNotSupportedException() + { + // Arrange + string json = "\"25-12-2025\""; // Incorrect format dd-MM-yyyy + + // Act + // Assert + Assert.ThrowsException(() => + { + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + }); + } + + [TestMethod] + public void Given_InvalidDateOnlyString_When_Read_Then_ThrowsJsonException() + { + // Arrange + string json = "invalid-date"; + + // Act + // Assert + Assert.Throws(() => + { + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + }); + } + + [TestMethod] + public void Given_NullToken_When_Read_Then_ThrowsNotSupportedException() + { + // Arrange + string json = "null"; + + // Act + Utf8JsonReader reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateOnly), new JsonSerializerOptions()); + + // Assert + Assert.IsNull(result); + } + + [TestMethod] + public void Given_DateOnlyValue_When_Write_Then_WritesCorrectDateOnlyValue() + { + // Arrange + DateOnly? dateOnly = null; + using var stream = new MemoryStream(); + using var writer = new Utf8JsonWriter(stream); + + // Act + _converter.Write(writer, dateOnly, new JsonSerializerOptions()); + writer.Flush(); + string json = System.Text.Encoding.UTF8.GetString(stream.ToArray()); + + // Assert + Assert.AreEqual("null", json); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Core/Converters/DateTimeJsonConverterTest.cs b/Adyen.Test/Core/Converters/DateTimeJsonConverterTest.cs new file mode 100644 index 000000000..68938e00c --- /dev/null +++ b/Adyen.Test/Core/Converters/DateTimeJsonConverterTest.cs @@ -0,0 +1,76 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Text.Json; +using Adyen.Core.Converters; + +namespace Adyen.Test.Core.Converters +{ + [TestClass] + public class DateTimeJsonConverterTest + { + private readonly DateTimeJsonConverter _converter = new DateTimeJsonConverter(); + + [TestMethod] + public void Given_ValidDateTimeWithFraction_When_Read_Then_ReturnsCorrectDateTime() + { + // Arrange + string json = "\"2025-12-25T14:30:15.1234567Z\""; + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + + // Act + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateTime), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(DateTime.Parse("2025-12-25T14:30:15.1234567Z").ToUniversalTime(), result); + } + + [TestMethod] + public void Given_ValidDateTimeWithoutFraction_When_Read_Then_ReturnsCorrectDateTime() + { + // Arrange + string json = "\"2025-12-25T14:30:15Z\""; + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + + // Act + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateTime), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(DateTime.Parse("2025-12-25T14:30:15Z").ToUniversalTime(), result); + } + + [TestMethod] + public void Given_InvalidDateTime_When_Read_Then_ThrowsNotSupportedException() + { + // Arrange + string json = "\"invalid-datetime\""; + + // Act + // Assert + Assert.ThrowsException(() => + { + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + _converter.Read(ref reader, typeof(DateTime), new JsonSerializerOptions()); + }); + } + + [TestMethod] + public void Given_DateTimeValue_When_Write_Then_WritesCorrectJson() + { + // Arrange + var dateTime = new DateTime(2025, 12, 25, 14, 30, 15, 123, DateTimeKind.Utc).AddTicks(4567); + + // Act + using var stream = new MemoryStream(); + using var writer = new Utf8JsonWriter(stream); + _converter.Write(writer, dateTime, new JsonSerializerOptions()); + writer.Flush(); + string json = System.Text.Encoding.UTF8.GetString(stream.ToArray()); + + // Assert + Assert.AreEqual($"\"{dateTime.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", System.Globalization.CultureInfo.InvariantCulture)}\"", json); + } + } +} diff --git a/Adyen.Test/Core/Converters/DateTimeNullableJsonConverterTest.cs b/Adyen.Test/Core/Converters/DateTimeNullableJsonConverterTest.cs new file mode 100644 index 000000000..a116094e8 --- /dev/null +++ b/Adyen.Test/Core/Converters/DateTimeNullableJsonConverterTest.cs @@ -0,0 +1,111 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Globalization; +using System.Text; +using System.Text.Json; +using Adyen.Core.Converters; + +namespace Adyen.Test.Core.Converters +{ + [TestClass] + public class DateTimeNullableJsonConverterTests + { + private readonly DateTimeNullableJsonConverter _converter = new(); + + [TestMethod] + public void Given_ValidDateTimeWithFraction_When_Read_Then_ReturnsCorrectDateTime() + { + // Arrange + string json = "\"2025-12-25T14:30:15.1234567Z\""; + + // Act + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateTime?), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(DateTime.Parse("2025-12-25T14:30:15.1234567Z").ToUniversalTime(), result); + } + + [TestMethod] + public void Given_ValidDateTimeWithoutFraction_When_Read_Then_ReturnsCorrectDateTime() + { + // Arrange + string json = "\"2025-12-25T14:30:15Z\""; + + // Act + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(json)); + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateTime?), new JsonSerializerOptions()); + + // Assert + Assert.AreEqual(DateTime.Parse("2025-12-25T14:30:15Z").ToUniversalTime(), result); + } + + [TestMethod] + public void Given_NullJson_When_Read_Then_ReturnsNull() + { + // Arrange + string json = "null"; + + // Act + var reader = new Utf8JsonReader(Encoding.UTF8.GetBytes(json)); + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateTime?), new JsonSerializerOptions()); + + // Assert + Assert.IsNull(result); + } + + [TestMethod] + public void Given_InvalidDateTime_When_Read_Then_Returns_Null() + { + // Arrange + string json = "\"invalid-datetime\""; + + // Act + var reader = new Utf8JsonReader(System.Text.Encoding.UTF8.GetBytes(json)); + reader.Read(); + var result = _converter.Read(ref reader, typeof(DateTime?), new JsonSerializerOptions()); + + // Assert + Assert.IsNull(result); + } + + [TestMethod] + public void Given_DateTimeValue_When_Write_Then_WritesCorrectJson() + { + // Arrange + var dateTime = new DateTime(2025, 12, 25, 14, 30, 15, 123, DateTimeKind.Utc).AddTicks(4567); + + // Act + using var stream = new System.IO.MemoryStream(); + using var writer = new Utf8JsonWriter(stream); + + _converter.Write(writer, dateTime, new JsonSerializerOptions()); + writer.Flush(); + string json = Encoding.UTF8.GetString(stream.ToArray()); + + // Assert + Assert.AreEqual($"\"{dateTime.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", CultureInfo.InvariantCulture)}\"", json); + } + + [TestMethod] + public void Given_NullDateTime_When_Write_Then_WritesNullJson() + { + // Arrange + DateTime? dateTime = null; + + // Act + using var stream = new System.IO.MemoryStream(); + using var writer = new Utf8JsonWriter(stream); + + _converter.Write(writer, dateTime, new JsonSerializerOptions()); + writer.Flush(); + string json = Encoding.UTF8.GetString(stream.ToArray()); + + // Assert + Assert.AreEqual("null", json); + } + } +} diff --git a/Adyen.Test/Core/IEnumTest.cs b/Adyen.Test/Core/IEnumTest.cs new file mode 100644 index 000000000..7002b1950 --- /dev/null +++ b/Adyen.Test/Core/IEnumTest.cs @@ -0,0 +1,359 @@ +using System.Text.Json; +using System.Text.Json.Serialization; +using Adyen.Core; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Core +{ + [TestClass] + public class IEnumTest + { + [TestMethod] + public async Task Given_Enums_When_Equal_Returns_Correct_True() + { + ExampleEnum? nullEnum = null; + + Assert.AreEqual(nullEnum, nullEnum); + Assert.AreEqual(ExampleEnum.A, ExampleEnum.A); + Assert.AreEqual(ExampleEnum.B, ExampleEnum.B); + } + + [TestMethod] + public async Task Given_Enums_When_NotEqual_Returns_Correct_False() + { + ExampleEnum? nullEnum = null; + + Assert.AreNotEqual(ExampleEnum.A, ExampleEnum.B); + Assert.AreNotEqual(ExampleEnum.B, nullEnum); + Assert.AreNotEqual(ExampleEnum.A, nullEnum); + } + + [TestMethod] + public async Task Given_ImplicitConversion_When_Initialized_Then_Returns_Correct_Values() + { + ExampleEnum? resultA = "a"; + ExampleEnum? resultB = "b"; + + Assert.AreEqual(ExampleEnum.A, resultA); + Assert.AreEqual(ExampleEnum.B, resultB); + } + + [TestMethod] + public async Task Given_ImplicitConversion_When_Null_Then_Returns_Null() + { + ExampleEnum? input = null; + string? result = input; + + Assert.IsNull(result); + } + + [TestMethod] + public async Task Given_ToString_When_Called_Then_Returns_Correct_Value() + { + Assert.AreEqual("a", ExampleEnum.A.ToString()); + Assert.AreEqual("b", ExampleEnum.B.ToString()); + } + + [TestMethod] + public async Task Given_FromStringOrDefault_When_Enum_Not_In_List_Then_Returns_Null() + { + ExampleEnum result = ExampleEnum.FromStringOrDefault("this-is-not-a-valid-enum"); + + Assert.IsNull(result); + } + + [TestMethod] + public async Task Given_Equals_When_ComparingCaseInsensitive_Then_Returns_True() + { + ExampleEnum result = ExampleEnum.A; + + Assert.IsTrue(result.Equals(ExampleEnum.A)); + Assert.IsFalse(result.Equals(ExampleEnum.B)); + } + + [TestMethod] + public async Task Given_FromStringOrDefault_When_InvalidString_Then_Returns_Null() + { + Assert.IsNull(ExampleEnum.FromStringOrDefault("this-is-not-a-valid-enum")); + } + + [TestMethod] + public async Task Given_EqualityOperator_When_ComparingValues_Then_Returns_Correct_Values() + { + ExampleEnum target = ExampleEnum.A; + ExampleEnum otherA = ExampleEnum.A; + ExampleEnum otherB = ExampleEnum.B; + + Assert.IsTrue(target == otherA); + Assert.IsFalse(target == otherB); + Assert.IsTrue(target != otherB); + Assert.IsFalse(target != otherA); + } + + [TestMethod] + public async Task Given_FromStringOrDefault_When_ValidStrings_Then_Returns_Correct_Enum() + { + Assert.AreEqual(ExampleEnum.A, ExampleEnum.FromStringOrDefault("a")); + Assert.AreEqual(ExampleEnum.B, ExampleEnum.FromStringOrDefault("b")); + } + + [TestMethod] + public async Task Given_ToJsonValue_When_KnownEnum_Then_Returns_String() + { + Assert.AreEqual("a", ExampleEnum.ToJsonValue(ExampleEnum.A)); + Assert.AreEqual("b", ExampleEnum.ToJsonValue(ExampleEnum.B)); + } + + [TestMethod] + public async Task Given_ToJsonValue_When_Null_Then_Returns_Null() + { + Assert.IsNull(ExampleEnum.ToJsonValue(null)); + } + + [TestMethod] + public async Task Given_ToJsonValue_When_CustomEnum_Then_Returns_Null() + { + ExampleEnum custom = ExampleEnum.FromStringOrDefault("this-is-not-a-valid-enum"); + Assert.IsNull(ExampleEnum.ToJsonValue(custom)); + } + + [TestMethod] + public async Task Given_JsonSerialization_When_KnownEnum_Then_Serialize_and_Deserialize_Correctly() + { + JsonSerializerOptions options = new JsonSerializerOptions(); + options.Converters.Add(new ExampleEnum.ExampleJsonConverter()); + + string serializedA = JsonSerializer.Serialize(ExampleEnum.A, options); + string serializedB = JsonSerializer.Serialize(ExampleEnum.B, options); + + Assert.AreEqual("\"a\"", serializedA); + Assert.AreEqual("\"b\"", serializedB); + + ExampleEnum? deserializedA = JsonSerializer.Deserialize(serializedA, options); + ExampleEnum? deserializedB = JsonSerializer.Deserialize(serializedB, options); + + Assert.AreEqual(ExampleEnum.A, deserializedA); + Assert.AreEqual(ExampleEnum.B, deserializedB); + } + + [TestMethod] + public async Task Given_JsonSerialization_When_EnumNotInList_Then_Returns_Null() + { + var options = new JsonSerializerOptions(); + options.Converters.Add(new ExampleEnum.ExampleJsonConverter()); + + ExampleEnum? value = ExampleEnum.FromStringOrDefault("not-in-list"); + string serialized = JsonSerializer.Serialize(value, options); + Assert.AreEqual("null", serialized); + + ExampleEnum? deserialized = JsonSerializer.Deserialize(serialized, options); + Assert.AreEqual(null, deserialized); + } + + [TestMethod] + public async Task Given_JsonSerialization_When_Null_Value_Then_Serialize_And_Deserialize_Correctly() + { + var options = new JsonSerializerOptions(); + options.Converters.Add(new ExampleEnum.ExampleJsonConverter()); + + ExampleEnum? value = null; + string serialized = JsonSerializer.Serialize(value, options); + Assert.AreEqual("null", serialized); + + ExampleEnum? deserialized = JsonSerializer.Deserialize("null", options); + Assert.IsNull(deserialized); + } + + + #region Arrange ExampleModelResponse for testing (an example) model deserialization + + [TestMethod] + public async Task Given_JsonDeserialization_When_ExampleEnum_Is_Null_Then_Deserialize_Correctly_And_Not_Throw_Exception() + { + // Arrange + string json = @" +{ + ""exampleEnum"": null +}"; + var options = new JsonSerializerOptions(); + options.Converters.Add(new ExampleEnum.ExampleJsonConverter()); + options.Converters.Add(new ExampleModelResponse.ExampleModelResponseJsonConverter()); + + // Act + ExampleModelResponse result = JsonSerializer.Deserialize(json, options); + + // Assert + Assert.IsNull(result.ExampleEnum); + } + + [TestMethod] + public async Task Given_JsonDeserialization_When_ExampleEnum_Is_A_Then_Deserialize_Correctly_To_A() + { + // Arrange + string json = @" +{ + ""exampleEnum"": ""a"" +}"; + var options = new JsonSerializerOptions(); + options.Converters.Add(new ExampleEnum.ExampleJsonConverter()); + options.Converters.Add(new ExampleModelResponse.ExampleModelResponseJsonConverter()); + + // Act + ExampleModelResponse result = JsonSerializer.Deserialize(json, options); + + // Assert + Assert.AreEqual(ExampleEnum.A, result.ExampleEnum); + } + + internal class ExampleModelResponse + { + /// + /// The optional enum to test. + /// + [JsonPropertyName("exampleEnum")] + public ExampleEnum? ExampleEnum + { + get { return this._ExampleEnumOption; } + set { this._ExampleEnumOption = new(value); } + } + + /// + /// Used to track if an optional field is set. If so, set the . + /// + [JsonIgnore] + public Option _ExampleEnumOption { get; private set; } + + [JsonConstructor] + public ExampleModelResponse(Option exampleEnum) + { + this._ExampleEnumOption = exampleEnum; + } + + internal class ExampleModelResponseJsonConverter : JsonConverter + { + public override ExampleModelResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option exampleEnum = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? jsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (jsonPropertyName) + { + case "exampleEnum": + exampleEnum = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + default: + break; + } + } + } + + return new ExampleModelResponse(exampleEnum); + } + + public override void Write(Utf8JsonWriter writer, ExampleModelResponse response, JsonSerializerOptions jsonSerializerOptions) + { + writer.WritePropertyName("exampleEnum"); + JsonSerializer.Serialize(writer, response.ExampleEnum, jsonSerializerOptions); + } + } + } + + #endregion + } + + #region Arrange ExampleEnum for testing + + [JsonConverter(typeof(ExampleJsonConverter))] + internal class ExampleEnum : IEnum + { + public string? Value { get; set; } + + /// + /// ExampleEnum.A: a + /// + public static readonly ExampleEnum A = new("a"); + + /// + /// ExampleEnum.B: b + /// + public static readonly ExampleEnum B = new("b"); + + private ExampleEnum(string? value) + { + Value = value; + } + + public static implicit operator ExampleEnum?(string? value) => value == null ? null : new ExampleEnum(value); + + public static implicit operator string?(ExampleEnum? option) => option?.Value; + + public override string ToString() => Value ?? string.Empty; + + public override bool Equals(object? obj) => obj is ExampleEnum other && string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + + public override int GetHashCode() => Value?.GetHashCode() ?? 0; + + public static bool operator ==(ExampleEnum? left, ExampleEnum? right) => + string.Equals(left?.Value, right?.Value, StringComparison.OrdinalIgnoreCase); + + public static bool operator !=(ExampleEnum? left, ExampleEnum? right) => + !string.Equals(left?.Value, right?.Value, StringComparison.OrdinalIgnoreCase); + + public static ExampleEnum? FromStringOrDefault(string value) + { + return value switch { + "a" => ExampleEnum.A, + "b" => ExampleEnum.B, + _ => null, + }; + } + + public static string? ToJsonValue(ExampleEnum? value) + { + if (value == null) + return null; + + if (value == ExampleEnum.A) + return "a"; + + if (value == ExampleEnum.B) + return "b"; + + return null; + } + + public class ExampleJsonConverter : JsonConverter + { + public override ExampleEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions jsonOptions) + { + string str = reader.GetString(); + return str == null ? null : ExampleEnum.FromStringOrDefault(str) ?? new ExampleEnum(str); + } + + public override void Write(Utf8JsonWriter writer, ExampleEnum value, JsonSerializerOptions jsonOptions) + { + writer.WriteStringValue(ExampleEnum.ToJsonValue(value)); + } + } + } + #endregion +} \ No newline at end of file diff --git a/Adyen.Test/Core/Utilities/HmacValidatorUtilityTest.cs b/Adyen.Test/Core/Utilities/HmacValidatorUtilityTest.cs new file mode 100644 index 000000000..a8027f630 --- /dev/null +++ b/Adyen.Test/Core/Utilities/HmacValidatorUtilityTest.cs @@ -0,0 +1,103 @@ +using System.Text; +using Adyen.Core.Utilities; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Core.Utilities +{ + [TestClass] + public class HmacValidatorUtilityTest + { + private const string _targetPayload = "{\"test\":\"value\"}"; + private const string _hmacKey = "00112233445566778899AABBCCDDEEFF"; + + /// + /// Helper function that computes expected HMAC. + /// + private string ComputeExpectedHmac(string payload, string hexKey) + { + byte[] key = new byte[hexKey.Length / 2]; + for (int i = 0; i < hexKey.Length; i += 2) + { + key[i / 2] = Convert.ToByte(hexKey.Substring(i, 2), 16); + } + + byte[] data = Encoding.UTF8.GetBytes(payload); + using var hmac = new System.Security.Cryptography.HMACSHA256(key); + var raw = hmac.ComputeHash(data); + return Convert.ToBase64String(raw); + } + + + [TestMethod] + public void Given_GenerateBase64Sha256HmacSignature_When_Hmac_Provided_Returns_Correct_Signature() + { + // Arrange + string expected = ComputeExpectedHmac(_targetPayload, _hmacKey); + + // Act + string actual = HmacValidatorUtility.GenerateBase64Sha256HmacSignature(_targetPayload, _hmacKey); + + // Assert + Assert.AreEqual(expected, actual); + } + + [TestMethod] + public void Given_GenerateBase64Sha256HmacSignature__When_Odd_Length_HmacKey_Returns_Correct_Signature() + { + // Arrange + string paddedKey = "ABC0"; // Expected padded version + string expected = ComputeExpectedHmac(_targetPayload, paddedKey); + + // Act + string actual = HmacValidatorUtility.GenerateBase64Sha256HmacSignature(_targetPayload, "ABC"); // Will be padded to "ABC0" + + // Assert + Assert.AreEqual(expected, actual); + } + + + [TestMethod] + public void Given_IsHmacSignatureValid_When_Signature_Is_NotEqual_Returns_False() + { + // Arrange + string invalidSignature = "InvalidSignature123=="; + + // Act + // Assert + Assert.IsFalse(HmacValidatorUtility.IsHmacSignatureValid(invalidSignature, _hmacKey, _targetPayload)); + } + + + [TestMethod] + public void TestBalancePlatformHmac() + { + // Arrange + string notification = + "{\"data\":{\"balancePlatform\":\"Integration_tools_test\",\"accountId\":\"BA32272223222H5HVKTBK4MLB\",\"sweep\":{\"id\":\"SWPC42272223222H5HVKV6H8C64DP5\",\"schedule\":{\"type\":\"balance\"},\"status\":\"active\",\"targetAmount\":{\"currency\":\"EUR\",\"value\":0},\"triggerAmount\":{\"currency\":\"EUR\",\"value\":0},\"type\":\"pull\",\"counterparty\":{\"balanceAccountId\":\"BA3227C223222H5HVKT3H9WLC\"},\"currency\":\"EUR\"}},\"environment\":\"test\",\"type\":\"balancePlatform.balanceAccountSweep.updated\"}"; + string hmacKey = "D7DD5BA6146493707BF0BE7496F6404EC7A63616B7158EC927B9F54BB436765F"; + string hmacSignature = "9Qz9S/0xpar1klkniKdshxpAhRKbiSAewPpWoxKefQA="; + + // Act + bool isValidSignature = HmacValidatorUtility.IsHmacSignatureValid(hmacSignature, hmacKey, notification); + + // Assert + Assert.IsTrue(isValidSignature); + } + + [TestMethod] + public void Given_GenerateBase64Sha256HmacSignature_When_BalancePlatform_Webhook_Returns_Correct_Signature() + { + // Arrange + string notification = + "{\"data\":{\"balancePlatform\":\"Integration_tools_test\",\"accountId\":\"BA32272223222H5HVKTBK4MLB\",\"sweep\":{\"id\":\"SWPC42272223222H5HVKV6H8C64DP5\",\"schedule\":{\"type\":\"balance\"},\"status\":\"active\",\"targetAmount\":{\"currency\":\"EUR\",\"value\":0},\"triggerAmount\":{\"currency\":\"EUR\",\"value\":0},\"type\":\"pull\",\"counterparty\":{\"balanceAccountId\":\"BA3227C223222H5HVKT3H9WLC\"},\"currency\":\"EUR\"}},\"environment\":\"test\",\"type\":\"balancePlatform.balanceAccountSweep.updated\"}"; + string hmacKey = "D7DD5BA6146493707BF0BE7496F6404EC7A63616B7158EC927B9F54BB436765F"; + string expectedHmacSignature = "9Qz9S/0xpar1klkniKdshxpAhRKbiSAewPpWoxKefQA="; + + // Act + string generatedHmacSignature = HmacValidatorUtility.GenerateBase64Sha256HmacSignature(notification, hmacKey); + + // Assert + Assert.AreEqual(expectedHmacSignature, generatedHmacSignature); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/DataProtection/DataProtectionTest.cs b/Adyen.Test/DataProtection/DataProtectionTest.cs new file mode 100644 index 000000000..d120b20e2 --- /dev/null +++ b/Adyen.Test/DataProtection/DataProtectionTest.cs @@ -0,0 +1,41 @@ +using Adyen.Core.Options; +using Adyen.DataProtection.Client; +using Adyen.DataProtection.Models; +using Adyen.DataProtection.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +namespace Adyen.Test.DataProtection +{ + [TestClass] + public class DataProtectionTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public DataProtectionTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureDataProtection((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_SubjectErasureResponse_Returns_Not_Null_And_Correct_Enum() + { + string json = TestUtilities.GetTestFileContent("mocks/data-protection-response.json"); + + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + Assert.AreEqual(response.Result, SubjectErasureResponse.ResultEnum.ACTIVERECURRINGTOKENEXISTS); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/DataProtectionTest.cs b/Adyen.Test/DataProtectionTest.cs deleted file mode 100644 index 84d5eca6f..000000000 --- a/Adyen.Test/DataProtectionTest.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Adyen.Model.DataProtection; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class DataProtectionTest : BaseTest - { - [TestMethod] - public void TestRequestSubjectErasure() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/data-protection-response.json"); - var service = new DataProtectionService(client); - var response = service.RequestSubjectErasure(new SubjectErasureByPspReferenceRequest()); - Assert.AreEqual(response.Result, SubjectErasureResponse.ResultEnum.ACTIVERECURRINGTOKENEXISTS); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/Disputes/DisputesTest.cs b/Adyen.Test/Disputes/DisputesTest.cs new file mode 100644 index 000000000..9bcff9e7c --- /dev/null +++ b/Adyen.Test/Disputes/DisputesTest.cs @@ -0,0 +1,106 @@ +using System.Text.Json; +using Adyen.Core.Options; +using Adyen.Disputes.Client; +using Adyen.Disputes.Extensions; +using Adyen.Disputes.Models; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.Disputes +{ + [TestClass] + public class DisputesTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public DisputesTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureDisputes((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_AcceptDispute_Returns_Success() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/disputes/accept-dispute.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsTrue(response.DisputeServiceResult.Success); + } + + [TestMethod] + public async Task Given_Deserialize_DefendDispute_Returns_Success() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/disputes/defend-dispute.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsTrue(response.DisputeServiceResult.Success); + } + + [TestMethod] + public async Task Given_Deserialize_DeleteDefenseDocumentResponse_Returns_Success() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/disputes/delete-dispute.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsTrue(response.DisputeServiceResult.Success); + } + + [TestMethod] + public async Task Given_Deserialize_DefenseReasonsResponse_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/disputes/retrieve-applicable-defense-reasons.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsTrue(response.DisputeServiceResult.Success); + Assert.IsTrue(response.DefenseReasons.Count!=0); + Assert.AreEqual(response.DefenseReasons[0].DefenseDocumentTypes[0].DefenseDocumentTypeCode, "TIDorInvoice"); + Assert.IsFalse(response.DefenseReasons[0].DefenseDocumentTypes[0].Available); + Assert.AreEqual(response.DefenseReasons[0].DefenseDocumentTypes[0].RequirementLevel, "Optional"); + Assert.AreEqual(response.DefenseReasons[0].DefenseDocumentTypes[1].DefenseDocumentTypeCode, "GoodsNotReturned"); + Assert.IsFalse(response.DefenseReasons[0].DefenseDocumentTypes[1].Available); + Assert.AreEqual(response.DefenseReasons[0].DefenseDocumentTypes[1].RequirementLevel, "Required"); + Assert.AreEqual(response.DefenseReasons[0].DefenseReasonCode, "GoodsNotReturned"); + Assert.IsFalse(response.DefenseReasons[0].Satisfied); + } + + [TestMethod] + public async Task Given_Deserialize_SupplyDefenceDocumentResponse_Returns_Success() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/disputes/supply-dispute-defense-document.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsTrue(response.DisputeServiceResult.Success); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/DisputesTest.cs b/Adyen.Test/DisputesTest.cs deleted file mode 100644 index e7cf1594c..000000000 --- a/Adyen.Test/DisputesTest.cs +++ /dev/null @@ -1,64 +0,0 @@ -using Adyen.Model.Disputes; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class DisputesTest: BaseTest - { - [TestMethod] - public void AcceptDisputesSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/disputes/accept-disputes.json"); - var disputes = new DisputesService(client); - var response = disputes.AcceptDispute(new AcceptDisputeRequest()); - Assert.IsTrue(response.DisputeServiceResult.Success); - } - - [TestMethod] - public void DefendDisputesSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/disputes/defend-dispute.json"); - var disputes = new DisputesService(client); - var response = disputes.DefendDispute(new DefendDisputeRequest()); - Assert.IsTrue(response.DisputeServiceResult.Success); - } - - [TestMethod] - public void DeleteDisputesSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/disputes/delete-dispute.json"); - var disputes = new DisputesService(client); - var response = disputes.DeleteDisputeDefenseDocument(new DeleteDefenseDocumentRequest()); - Assert.IsTrue(response.DisputeServiceResult.Success); - } - - [TestMethod] - public void RetrieveApplicableDefenseReasonsSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/disputes/retrieve-appicable-defense-reasons.json"); - var disputes = new DisputesService(client); - var response = disputes.RetrieveApplicableDefenseReasons(new DefenseReasonsRequest()); - Assert.IsTrue(response.DisputeServiceResult.Success); - Assert.IsTrue(response.DefenseReasons.Count!=0); - Assert.AreEqual(response.DefenseReasons[0].DefenseDocumentTypes[0].DefenseDocumentTypeCode, "TIDorInvoice"); - Assert.IsFalse(response.DefenseReasons[0].DefenseDocumentTypes[0].Available); - Assert.AreEqual(response.DefenseReasons[0].DefenseDocumentTypes[0].RequirementLevel, "Optional"); - Assert.AreEqual(response.DefenseReasons[0].DefenseDocumentTypes[1].DefenseDocumentTypeCode, "GoodsNotReturned"); - Assert.IsFalse(response.DefenseReasons[0].DefenseDocumentTypes[1].Available); - Assert.AreEqual(response.DefenseReasons[0].DefenseDocumentTypes[1].RequirementLevel, "Required"); - Assert.AreEqual(response.DefenseReasons[0].DefenseReasonCode, "GoodsNotReturned"); - Assert.IsFalse(response.DefenseReasons[0].Satisfied); - } - - [TestMethod] - public void SupplyDisputesDefenceDocumentSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/disputes/supply-dispute-defense-document.json"); - var disputes = new DisputesService(client); - var response = disputes.SupplyDefenseDocument(new SupplyDefenseDocumentRequest()); - Assert.IsTrue(response.DisputeServiceResult.Success); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/ExtensionsTest.cs b/Adyen.Test/ExtensionsTest.cs deleted file mode 100644 index defc01802..000000000 --- a/Adyen.Test/ExtensionsTest.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Collections.Generic; -using System.Net.Http; -using Adyen.Model.BalanceControl; -using Adyen.Model.Checkout; -using Adyen.Service; -using Adyen.Service.BalancePlatform; -using Adyen.Service.Checkout; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using NSubstitute; -using Environment = Adyen.Model.Environment; - -namespace Adyen.Test -{ - [TestClass] - public class ExtensionsTest : BaseTest - { - private Client _client; - - [TestInitialize] - public void Init() - { - _client = CreateMockTestClientApiKeyBasedRequestAsync(""); - _client.Config.Environment = Environment.Live; - _client.Config.LiveEndpointUrlPrefix = "prefix"; - } - - [TestMethod] - public void TestDeviceRenderOptionsObjectListToString() - { - var deviceRenderOptions = new DeviceRenderOptions - { - SdkInterface = DeviceRenderOptions.SdkInterfaceEnum.Native, - SdkUiType = new List - { DeviceRenderOptions.SdkUiTypeEnum.MultiSelect, DeviceRenderOptions.SdkUiTypeEnum.OtherHtml } - }; - var expected = "\"multiSelect\""; - Assert.IsTrue(deviceRenderOptions.ToJson().Contains(expected)); - } - - [TestMethod] - public void TestPalLiveEndPoint() - { - var service = new BalanceControlService(_client); - service.BalanceTransfer(new BalanceTransferRequest()); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://prefix-pal-live.adyenpayments.com/pal/servlet/BalanceControl/v1/balanceTransfer", - "{}", null, HttpMethod.Post, default); - } - - [TestMethod] - public void TestCheckoutLiveEndPoint() - { - var service = new DonationsService(_client); - service.Donations(new DonationPaymentRequest()); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://prefix-checkout-live.adyenpayments.com/checkout/v71/donations", - Arg.Any(), null, HttpMethod.Post, default); - } - - [TestMethod] - public void TestBclLiveEndPoint() - { - var service = new AccountHoldersService(_client); - service.GetAllBalanceAccountsOfAccountHolder("id", offset: 3, limit: 5); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://balanceplatform-api-live.adyen.com/bcl/v2/accountHolders/id/balanceAccounts?offset=3&limit=5", - null, null, HttpMethod.Get, default); - } - } -} diff --git a/Adyen.Test/GrantsTest.cs b/Adyen.Test/GrantsTest.cs deleted file mode 100644 index 3728fcc48..000000000 --- a/Adyen.Test/GrantsTest.cs +++ /dev/null @@ -1,22 +0,0 @@ - -using Adyen.Model.Transfers; -using Adyen.Service.Transfers; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - public class GrantsTest : BaseTest - { - [TestMethod] - public void StoredValueIssueTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/grants/post-grants-success.json"); - var service = new CapitalService(client); - var response = service.RequestGrantPayout(new CapitalGrantInfo()); - Assert.AreEqual(response.Id, "CG00000000000000000000001"); - Assert.AreEqual(response.GrantAccountId, "CG00000000000000000000001"); - Assert.AreEqual(response.Status, CapitalGrant.StatusEnum.Pending); - Assert.IsNotNull(response.Balances); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/HttpClientWrapperTest.cs b/Adyen.Test/HttpClientWrapperTest.cs deleted file mode 100644 index 0704beec8..000000000 --- a/Adyen.Test/HttpClientWrapperTest.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Adyen.HttpClient; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class HttpClientWrapperTest : BaseTest - { - [TestMethod] - public void EmptyRequestBodyPostTest() - { - var configWithApiKey = new Config - { - Environment = Model.Environment.Test, - XApiKey = "AQEyhmfxK....LAG84XwzP5pSpVd" - }; - var mockHttpMessageHandler = new MockHttpMessageHandler("{}", System.Net.HttpStatusCode.OK); - var httpClient = new System.Net.Http.HttpClient(mockHttpMessageHandler); - var httpClientWrapper = new HttpClientWrapper(configWithApiKey, httpClient); - var _ = httpClientWrapper.Request("https://test.com/testpath", null, null, HttpMethod.Post); - Assert.AreEqual("{}", mockHttpMessageHandler.Input); - } - - } -} \ No newline at end of file diff --git a/Adyen.Test/LegalEntityManagement/BusinessLines/BusinessLineTest.cs b/Adyen.Test/LegalEntityManagement/BusinessLines/BusinessLineTest.cs new file mode 100644 index 000000000..3ec95bbd9 --- /dev/null +++ b/Adyen.Test/LegalEntityManagement/BusinessLines/BusinessLineTest.cs @@ -0,0 +1,49 @@ +using System.Text.Json; +using Adyen.Core.Options; +using Adyen.LegalEntityManagement.Client; +using Adyen.LegalEntityManagement.Extensions; +using Adyen.LegalEntityManagement.Models; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace Adyen.Test.LegalEntityManagement.BusinessLines +{ + [TestClass] + public class BusinessLineTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public BusinessLineTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureLegalEntityManagement((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + } + + /// + /// Test DeserializeBusinessLine + /// + [TestMethod] + public void DeserializeBusinessLine() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/BusinessLine.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(result); + } + + + } +} diff --git a/Adyen.Test/LegalEntityManagement/Documents/DocumentTest.cs b/Adyen.Test/LegalEntityManagement/Documents/DocumentTest.cs new file mode 100644 index 000000000..6d86f1257 --- /dev/null +++ b/Adyen.Test/LegalEntityManagement/Documents/DocumentTest.cs @@ -0,0 +1,157 @@ +using System.Net; +using System.Text.Json; +using Adyen.Core; +using Adyen.Core.Client; +using Adyen.Core.Options; +using Adyen.LegalEntityManagement.Extensions; +using Adyen.LegalEntityManagement.Models; +using Adyen.LegalEntityManagement.Services; +using Adyen.LegalEntityManagement.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging.Abstractions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.LegalEntityManagement.Documents +{ + [TestClass] + public class DocumentTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly IDocumentsService _documentsService; + + public DocumentTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureLegalEntityManagement((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + _documentsService = Substitute.For(); + } + + /// + /// Test deserializeDocument + /// + [TestMethod] + public async Task DeserializeDocument() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/Document.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(result); + } + + /// + /// Test UpdateDocument + /// + [TestMethod] + public async Task UpdateDocument() + { + + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/Document.json"); + var document = new Document + { + Attachment = new Attachment() + }; + + _documentsService.UpdateDocumentAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new DocumentsService.UpdateDocumentApiResponse( + NullLogger.Instance, + new HttpRequestMessage(), + new HttpResponseMessage(), + json, + "/documents/DOC01234", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + IUpdateDocumentApiResponse response = await _documentsService.UpdateDocumentAsync("DOC01234", null, new RequestOptions(), CancellationToken.None); + + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + Assert.AreEqual(Document.TypeEnum.DriversLicense, response.Ok().Type); + } + + /// + /// Test UploadDocumentForVerificationChecksAsync + /// + [TestMethod] + public async Task UploadDocumentForVerificationChecksAsyncTest() + { + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/Document.json"); + var document = new Document + { + Attachment = new Attachment() + }; + _documentsService.UploadDocumentForVerificationChecksAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new DocumentsService.UploadDocumentForVerificationChecksApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage(), + json, + "/documents", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + IUploadDocumentForVerificationChecksApiResponse response = await _documentsService.UploadDocumentForVerificationChecksAsync(new Option(document), new RequestOptions().AddxRequestedVerificationCodeHeader("xRequestedVerificationCode"), CancellationToken.None); + + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + Assert.AreEqual(Document.TypeEnum.DriversLicense, response.Ok().Type); + } + + /// + /// Test DeleteDocumentAsync + /// + [TestMethod] + public async Task DeleteDocumentAsyncTest() + { + var documentId = "DOC01234"; + _documentsService.DeleteDocumentAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new DocumentsService.DeleteDocumentApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.NoContent }, + "", // Empty content for 204 No Content + $"/documents/{documentId}", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + IDeleteDocumentApiResponse response = await _documentsService.DeleteDocumentAsync(documentId); + + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.NoContent, response.StatusCode); + Assert.IsTrue(response.IsNoContent); + } + + } +} diff --git a/Adyen.Test/LegalEntityManagement/HostedOnboarding/HostedOnboardingTest.cs b/Adyen.Test/LegalEntityManagement/HostedOnboarding/HostedOnboardingTest.cs new file mode 100644 index 000000000..44d18f2e5 --- /dev/null +++ b/Adyen.Test/LegalEntityManagement/HostedOnboarding/HostedOnboardingTest.cs @@ -0,0 +1,140 @@ +using System.Net; +using Adyen.Core; +using Adyen.Core.Client; +using Adyen.Core.Options; +using Adyen.LegalEntityManagement.Client; +using Adyen.LegalEntityManagement.Extensions; +using Adyen.LegalEntityManagement.Models; +using Adyen.LegalEntityManagement.Services; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.LegalEntityManagement.HostedOnboarding +{ + [TestClass] + public class HostedOnboardingTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly IHostedOnboardingService _hostedOnboardingService; + + public HostedOnboardingTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureLegalEntityManagement((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + _hostedOnboardingService = Substitute.For(); + } + + [TestMethod] + public async Task GetLinkToAdyenHostedOnboardingPageAsyncTest() + { + // Arrange + var json = "{\"url\":\"https://test.adyen.com/checkout/123\",\"expiresAt\":\"2025-12-31T23:59:59Z\"}"; + var legalEntityId = "LE12345"; + var onboardingLinkInfo = new OnboardingLinkInfo(); + + _hostedOnboardingService.GetLinkToAdyenhostedOnboardingPageAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new HostedOnboardingService.GetLinkToAdyenhostedOnboardingPageApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/onboardingLinks", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _hostedOnboardingService.GetLinkToAdyenhostedOnboardingPageAsync(legalEntityId, new Option(onboardingLinkInfo), null, CancellationToken.None); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var onboardingLink = response.Ok(); + Assert.IsNotNull(onboardingLink); + Assert.AreEqual("https://test.adyen.com/checkout/123", onboardingLink.Url); + } + + [TestMethod] + public async Task GetOnboardingLinkThemeAsyncTest() + { + // Arrange + var json = "{\"createdAt\":\"2022-10-31T01:30:00+01:00\",\"description\":\"string\",\"id\":\"SE322KT223222D5FJ7TJN2986\",\"properties\":{\"sample\":\"string\"},\"updatedAt\":\"2022-10-31T01:30:00+01:00\"}"; + var themeId = "SE322KT223222D5FJ7TJN2986"; + + _hostedOnboardingService.GetOnboardingLinkThemeAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new HostedOnboardingService.GetOnboardingLinkThemeApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/themes/{themeId}", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _hostedOnboardingService.GetOnboardingLinkThemeAsync(themeId); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var onboardingTheme = response.Ok(); + Assert.IsNotNull(onboardingTheme); + Assert.AreEqual(themeId, onboardingTheme.Id); + } + + [TestMethod] + public async Task ListHostedOnboardingPageThemesAsyncTest() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/OnboardingThemes.json"); + + _hostedOnboardingService.ListHostedOnboardingPageThemesAsync( + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new HostedOnboardingService.ListHostedOnboardingPageThemesApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + "/themes", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _hostedOnboardingService.ListHostedOnboardingPageThemesAsync(); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var onboardingThemes = response.Ok(); + Assert.IsNotNull(onboardingThemes); + Assert.AreEqual(1, onboardingThemes.Themes.Count); + Assert.AreEqual("SE322KT223222D5FJ7TJN2986", onboardingThemes.Themes[0].Id); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/LegalEntityManagement/LegalEntities/LegalEntityTest.cs b/Adyen.Test/LegalEntityManagement/LegalEntities/LegalEntityTest.cs new file mode 100644 index 000000000..5d1e5067b --- /dev/null +++ b/Adyen.Test/LegalEntityManagement/LegalEntities/LegalEntityTest.cs @@ -0,0 +1,101 @@ +using System.Net; +using System.Text.Json; +using Adyen.Core; +using Adyen.Core.Options; +using Adyen.LegalEntityManagement.Client; +using Adyen.LegalEntityManagement.Extensions; +using Adyen.LegalEntityManagement.Models; +using Adyen.LegalEntityManagement.Services; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.LegalEntityManagement.LegalEntities +{ + [TestClass] + public class LegalEntityTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly ILegalEntitiesService _legalEntitiesService; + + public LegalEntityTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureLegalEntityManagement((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + _legalEntitiesService = Substitute.For(); + + } + + /// + /// Test DeserializeLegalEntity + /// + [TestMethod] + public async Task DeserializeLegalEntity() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/LegalEntity.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(result); + Assert.AreEqual("LE322JV223222D5GG42KN6869", result.Id); + } + + /// + /// Test DeserializeLegalEntityBusinessLines + /// + [TestMethod] + public async Task DeserializeLegalEntityBusinessLines() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/LegalEntityBusinessLines.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(result); + Assert.AreEqual(2, result.VarBusinessLines.Count); + } + + /// + /// Test GetLegalEntity + /// + [TestMethod] + public async Task GetLegalEntity() + { + string json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/LegalEntity.json"); + + _legalEntitiesService.GetLegalEntityAsync(Arg.Any()) + .Returns( + Task.FromResult( + new LegalEntitiesService.GetLegalEntityApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage(), + json, + "/documents/DOC01234", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + IGetLegalEntityApiResponse response = await _legalEntitiesService.GetLegalEntityAsync("LE322JV223222D5GG42KN6869"); + + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + Assert.AreEqual("LE322JV223222D5GG42KN6869", response.Ok().Id); + } + + } +} diff --git a/Adyen.Test/LegalEntityManagement/PCIQuestionnaires/PCIQuestionnairesTest.cs b/Adyen.Test/LegalEntityManagement/PCIQuestionnaires/PCIQuestionnairesTest.cs new file mode 100644 index 000000000..f22283aec --- /dev/null +++ b/Adyen.Test/LegalEntityManagement/PCIQuestionnaires/PCIQuestionnairesTest.cs @@ -0,0 +1,217 @@ +using System.Net; +using Adyen.Core; +using Adyen.Core.Client; +using Adyen.Core.Options; +using Adyen.LegalEntityManagement.Client; +using Adyen.LegalEntityManagement.Extensions; +using Adyen.LegalEntityManagement.Models; +using Adyen.LegalEntityManagement.Services; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.LegalEntityManagement.PCIQuestionnaires +{ + [TestClass] + public class PCIQuestionnairesTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly IPCIQuestionnairesService _pciQuestionnairesService; + + public PCIQuestionnairesTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureLegalEntityManagement((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + _pciQuestionnairesService = Substitute.For(); + } + + [TestMethod] + public async Task CalculatePciStatusOfLegalEntityAsyncTest() + { + // Arrange + var json = "{\"signingRequired\": true}"; + var legalEntityId = "LE123"; + var request = new CalculatePciStatusRequest(); + + _pciQuestionnairesService.CalculatePciStatusOfLegalEntityAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new PCIQuestionnairesService.CalculatePciStatusOfLegalEntityApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/pciQuestionnaires/signingRequired", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _pciQuestionnairesService.CalculatePciStatusOfLegalEntityAsync(legalEntityId, new Option(request)); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.IsTrue(result.SigningRequired); + } + + [TestMethod] + public async Task GeneratePciQuestionnaireAsyncTest() + { + // Arrange + var json = "{\n \"content\": \"JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBv+f/ub0j6JPRX+E3EmC==\",\n \"language\": \"fr\",\n \"pciTemplateReferences\": [\n \"PCIT-T7KC6VGL\",\n \"PCIT-PKB6DKS4\"\n ]\n}"; + var legalEntityId = "LE123"; + var request = new GeneratePciDescriptionRequest(); + + _pciQuestionnairesService.GeneratePciQuestionnaireAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new PCIQuestionnairesService.GeneratePciQuestionnaireApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/pciQuestionnaires/generatePciTemplates", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _pciQuestionnairesService.GeneratePciQuestionnaireAsync(legalEntityId, new Option(request)); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.AreEqual("fr", result.Language); + Assert.AreEqual(2, result.PciTemplateReferences.Count); + } + + [TestMethod] + public async Task GetPciQuestionnaireAsyncTest() + { + // Arrange + var json = "{\n \"content\": \"JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBv+f/ub0j6JPRX+E3EmC==\",\n \"createdAt\": \"2023-03-02T17:54:19.538365Z\",\n \"id\": \"PCID422GZ22322565HHMH48CW63CPH\",\n \"validUntil\": \"2024-03-01T17:54:19.538365Z\"\n}"; + var legalEntityId = "LE123"; + var pciId = "PCI123"; + + _pciQuestionnairesService.GetPciQuestionnaireAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new PCIQuestionnairesService.GetPciQuestionnaireApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/pciQuestionnaires/{pciId}", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _pciQuestionnairesService.GetPciQuestionnaireAsync(legalEntityId, pciId); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.AreEqual("PCID422GZ22322565HHMH48CW63CPH", result.Id); + } + + [TestMethod] + public async Task GetPciQuestionnaireDetailsAsyncTest() + { + // Arrange + var json = "{\n \"data\": [\n {\n \"createdAt\": \"2023-03-02T17:54:19.538365Z\",\n \"id\": \"PCID422GZ22322565HHMH48CW63CPH\",\n \"validUntil\": \"2024-03-01T17:54:19.538365Z\"\n },\n {\n \"createdAt\": \"2023-03-02T17:54:19.538365Z\",\n \"id\": \"PCID422GZ22322565HHMH49CW75Z9H\",\n \"validUntil\": \"2024-03-01T17:54:19.538365Z\"\n }\n ]\n}"; + var legalEntityId = "LE123"; + + _pciQuestionnairesService.GetPciQuestionnaireDetailsAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new PCIQuestionnairesService.GetPciQuestionnaireDetailsApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/pciQuestionnaires", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _pciQuestionnairesService.GetPciQuestionnaireDetailsAsync(legalEntityId); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.IsNotNull(result.Data); + Assert.AreEqual(2, result.Data.Count); + } + + [TestMethod] + public async Task SignPciQuestionnaireAsyncTest() + { + // Arrange + var json = "{\n \"pciQuestionnaireIds\": [\n \"PCID422GZ22322565HHMH48CW63CPH\",\n \"PCID422GZ22322565HHMH49CW75Z9H\"\n ]\n}"; + var legalEntityId = "LE123"; + var request = new PciSigningRequest(); + + _pciQuestionnairesService.SignPciQuestionnaireAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new PCIQuestionnairesService.SignPciQuestionnaireApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/pciQuestionnaires/signPciTemplates", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _pciQuestionnairesService.SignPciQuestionnaireAsync(legalEntityId, new Option(request)); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.AreEqual(2, result.PciQuestionnaireIds.Count); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/LegalEntityManagement/TermsOfService/TermsOfServiceTest.cs b/Adyen.Test/LegalEntityManagement/TermsOfService/TermsOfServiceTest.cs new file mode 100644 index 000000000..5bdc75f02 --- /dev/null +++ b/Adyen.Test/LegalEntityManagement/TermsOfService/TermsOfServiceTest.cs @@ -0,0 +1,216 @@ +using System.Net; +using Adyen.Core; +using Adyen.Core.Client; +using Adyen.Core.Options; +using Adyen.LegalEntityManagement.Client; +using Adyen.LegalEntityManagement.Extensions; +using Adyen.LegalEntityManagement.Models; +using Adyen.LegalEntityManagement.Services; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.LegalEntityManagement.TermsOfService +{ + [TestClass] + public class TermsOfServiceTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly ITermsOfServiceService _termsOfServiceService; + + public TermsOfServiceTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureLegalEntityManagement((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + _termsOfServiceService = Substitute.For(); + } + + [TestMethod] + public async Task AcceptTermsOfServiceAsyncTest() + { + // Arrange + var json = "{\"id\":\"TOS123\",\"type\":\"adyenIssuing\",\"acceptedBy\":\"user\",\"acceptedFor\":\"LE123\"}"; + var legalEntityId = "LE123"; + var tosDocumentId = "TOSDOC123"; + var request = new AcceptTermsOfServiceRequest(); + + _termsOfServiceService.AcceptTermsOfServiceAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TermsOfServiceService.AcceptTermsOfServiceApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/termsOfService/{tosDocumentId}", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _termsOfServiceService.AcceptTermsOfServiceAsync(legalEntityId, tosDocumentId, new Option(request)); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.AreEqual("TOS123", result.Id); + } + + [TestMethod] + public async Task GetAcceptedTermsOfServiceDocumentAsyncTest() + { + // Arrange + var json = "{\"id\":\"LE123\", \"document\":\"document-content\"}"; + var legalEntityId = "LE123"; + var tosAcceptanceRef = "TOSREF123"; + + _termsOfServiceService.GetAcceptedTermsOfServiceDocumentAsync( + Arg.Any(), + Arg.Any(), + Arg.Any>(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TermsOfServiceService.GetAcceptedTermsOfServiceDocumentApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/acceptedTermsOfServiceDocument/{tosAcceptanceRef}", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _termsOfServiceService.GetAcceptedTermsOfServiceDocumentAsync(legalEntityId, tosAcceptanceRef, "JSON"); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.AreEqual("LE123", result.Id); + } + + [TestMethod] + public async Task GetTermsOfServiceDocumentAsyncTest() + { + // Arrange + var json = "{\"id\":\"LE123\", \"document\":\"document-content\"}"; + var legalEntityId = "LE123"; + var request = new GetTermsOfServiceDocumentRequest(); + + _termsOfServiceService.GetTermsOfServiceDocumentAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TermsOfServiceService.GetTermsOfServiceDocumentApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/termsOfService", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _termsOfServiceService.GetTermsOfServiceDocumentAsync(legalEntityId, new Option(request)); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.AreEqual("LE123", result.Id); + } + + [TestMethod] + public async Task GetTermsOfServiceInformationForLegalEntityAsyncTest() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/TermsOfServiceStatus.json"); + var legalEntityId = "LE123"; + + _termsOfServiceService.GetTermsOfServiceInformationForLegalEntityAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TermsOfServiceService.GetTermsOfServiceInformationForLegalEntityApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/termsOfServiceAcceptanceInfos", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _termsOfServiceService.GetTermsOfServiceInformationForLegalEntityAsync(legalEntityId); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.AreEqual(1, result.Data.Count); + } + + [TestMethod] + public async Task GetTermsOfServiceStatusAsyncTest() + { + // Arrange + var json = "{\"termsOfServiceTypes\":[\"adyenIssuing\"]}"; + var legalEntityId = "LE123"; + + _termsOfServiceService.GetTermsOfServiceStatusAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TermsOfServiceService.GetTermsOfServiceStatusApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/legalEntities/{legalEntityId}/termsOfServiceStatus", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = await _termsOfServiceService.GetTermsOfServiceStatusAsync(legalEntityId); + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var result = response.Ok(); + Assert.IsNotNull(result); + Assert.AreEqual(1, response.Ok().TermsOfServiceTypes.Count); + } + } +} diff --git a/Adyen.Test/LegalEntityManagement/TransferInstruments/TransferInstrumentsTest.cs b/Adyen.Test/LegalEntityManagement/TransferInstruments/TransferInstrumentsTest.cs new file mode 100644 index 000000000..e22c3fddd --- /dev/null +++ b/Adyen.Test/LegalEntityManagement/TransferInstruments/TransferInstrumentsTest.cs @@ -0,0 +1,173 @@ +using System.Net; +using Adyen.Core; +using Adyen.Core.Client; +using Adyen.Core.Options; +using Adyen.LegalEntityManagement.Client; +using Adyen.LegalEntityManagement.Extensions; +using Adyen.LegalEntityManagement.Models; +using Adyen.LegalEntityManagement.Services; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using NSubstitute; + +namespace Adyen.Test.LegalEntityManagement.TransferInstruments +{ + [TestClass] + public class TransferInstrumentsTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + private readonly ITransferInstrumentsService _transferInstrumentsService; + + public TransferInstrumentsTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureLegalEntityManagement((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + _transferInstrumentsService = Substitute.For(); + } + + [TestMethod] + public void CreateTransferInstrumentAsyncTest() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/TransferInstrument.json"); + var transferInstrumentInfo = new TransferInstrumentInfo(); + + _transferInstrumentsService.CreateTransferInstrumentAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TransferInstrumentsService.CreateTransferInstrumentApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + "/transferInstruments", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = _transferInstrumentsService.CreateTransferInstrumentAsync(new Option(transferInstrumentInfo), new RequestOptions().AddxRequestedVerificationCodeHeader("x-requested-verification-code"), CancellationToken.None).Result; + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var transferInstrument = response.Ok(); + Assert.IsNotNull(transferInstrument); + Assert.AreEqual("SE576BH223222F5GJVKHH6BDT", transferInstrument.Id); + Assert.AreEqual("LE322KH223222D5GG4C9J83RN", transferInstrument.LegalEntityId); + } + + [TestMethod] + public void GetTransferInstrumentAsyncTest() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/TransferInstrument.json"); + var transferInstrumentId = "SE576BH223222F5GJVKHH6BDT"; + + _transferInstrumentsService.GetTransferInstrumentAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TransferInstrumentsService.GetTransferInstrumentApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/transferInstruments/{transferInstrumentId}", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = _transferInstrumentsService.GetTransferInstrumentAsync(transferInstrumentId, new RequestOptions(), CancellationToken.None).Result; + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var transferInstrument = response.Ok(); + Assert.IsNotNull(transferInstrument); + Assert.AreEqual(transferInstrumentId, transferInstrument.Id); + } + + [TestMethod] + public void UpdateTransferInstrumentAsyncTest() + { + // Arrange + var json = TestUtilities.GetTestFileContent("mocks/legalentitymanagement/TransferInstrument.json"); + var transferInstrumentId = "SE576BH223222F5GJVKHH6BDT"; + var transferInstrumentInfo = new TransferInstrumentInfo(); + + _transferInstrumentsService.UpdateTransferInstrumentAsync( + Arg.Any(), + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TransferInstrumentsService.UpdateTransferInstrumentApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.OK }, + json, + $"/transferInstruments/{transferInstrumentId}", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = _transferInstrumentsService.UpdateTransferInstrumentAsync(transferInstrumentId, new Option(transferInstrumentInfo), new RequestOptions().AddxRequestedVerificationCodeHeader("x-requested-verification-code"), CancellationToken.None).Result; + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + var transferInstrument = response.Ok(); + Assert.IsNotNull(transferInstrument); + Assert.AreEqual(transferInstrumentId, transferInstrument.Id); + } + + [TestMethod] + public void DeleteTransferInstrumentAsyncTest() + { + // Arrange + var transferInstrumentId = "SE576BH223222F5GJVKHH6BDT"; + + _transferInstrumentsService.DeleteTransferInstrumentAsync( + Arg.Any(), + Arg.Any(), + Arg.Any()) + .Returns( + Task.FromResult( + new TransferInstrumentsService.DeleteTransferInstrumentApiResponse( + Substitute.For>(), + new HttpRequestMessage(), + new HttpResponseMessage { StatusCode = HttpStatusCode.NoContent }, + "", + $"/transferInstruments/{transferInstrumentId}", + DateTime.UtcNow, + _jsonSerializerOptionsProvider.Options) + )); + + // Act + var response = _transferInstrumentsService.DeleteTransferInstrumentAsync(transferInstrumentId).Result; + + // Assert + Assert.IsNotNull(response); + Assert.AreEqual(HttpStatusCode.NoContent, response.StatusCode); + Assert.IsTrue(response.IsNoContent); + } + } +} diff --git a/Adyen.Test/LegalEntityManagementTest.cs b/Adyen.Test/LegalEntityManagementTest.cs deleted file mode 100644 index 7bbeab3e2..000000000 --- a/Adyen.Test/LegalEntityManagementTest.cs +++ /dev/null @@ -1,179 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Text; -using Adyen.Model.LegalEntityManagement; -using Adyen.Service.LegalEntityManagement; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using NSubstitute; - -namespace Adyen.Test -{ - [TestClass] - public class LegalEntityManagementTest : BaseTest - { - #region Document - /// - /// Test createDocument - /// - [TestMethod] - public void CreateDocument() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/Document.json"); - var service = new DocumentsService(client); - var document = new Document - { - Attachment = new Attachment() - }; - var response = service.UploadDocumentForVerificationChecks(document); - Assert.AreEqual(Encoding.ASCII.GetString(response.Attachments[0].Content), "This is a string"); - Assert.AreEqual(response.Id, "SE322KT223222D5FJ7TJN2986"); - } - - /// - /// Test createDocument - /// - [TestMethod] - public void UpdateDocument() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/Document.json"); - var service = new DocumentsService(client); - var document = new Document - { - Attachment = new Attachment() - }; - var response = service.UpdateDocument("SE322KT223222D5FJ7TJN2986",document); - Assert.AreEqual(Encoding.ASCII.GetString(response.Attachments[0].Content), "This is a string"); - Assert.AreEqual(response.Id, "SE322KT223222D5FJ7TJN2986"); - - } - - /// - /// Test deleteDocument - /// - [TestMethod] - public void DeleteDocumentTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/Document.json"); - var service = new DocumentsService(client); - service.DeleteDocument("SE322KT223222D5FJ7TJN2986"); - - } - #endregion - - #region TransferInstruments - /// - /// Test createTransferInstruments - /// - [TestMethod] - public void CreateTransferInstrumentsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/TransferInstrument.json"); - var service = new TransferInstrumentsService(client); - var transferInstrumentInfo = new TransferInstrumentInfo - { - LegalEntityId = "", - Type = TransferInstrumentInfo.TypeEnum.BankAccount - }; - var response = service.CreateTransferInstrument(transferInstrumentInfo); - Assert.AreEqual(response.LegalEntityId, "LE322KH223222D5GG4C9J83RN"); - Assert.AreEqual(response.Id, "SE576BH223222F5GJVKHH6BDT"); - } - /// - /// Test updateTransferInstruments - /// - [TestMethod] - public void UpdateTransferInstrumentsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/TransferInstrument.json"); - var service = new TransferInstrumentsService(client); - var transferInstrumentInfo = new TransferInstrumentInfo - { - LegalEntityId = "", - Type = TransferInstrumentInfo.TypeEnum.BankAccount - }; - var task = service.UpdateTransferInstrumentAsync("SE576BH223222F5GJVKHH6BDT", transferInstrumentInfo); - var response = task.Result; - Assert.AreEqual(response.LegalEntityId, "LE322KH223222D5GG4C9J83RN"); - Assert.AreEqual(response.Id, "SE576BH223222F5GJVKHH6BDT"); - } - #endregion - - #region HostedOnboarding - /// - /// Test hostedOnboarding - /// - [TestMethod] - public void ListThemesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/OnboardingThemes.json"); - var service = new HostedOnboardingService(client); - var task = service.ListHostedOnboardingPageThemesAsync(); - var response = task.Result; - Assert.AreEqual(response.Themes[0].Id, "SE322KT223222D5FJ7TJN2986"); - Assert.AreEqual(response.Themes[0].CreatedAt, DateTime.Parse("2022-10-31T01:30:00+01:00")); - } - #endregion - - #region LegalEntities - /// - /// Test update LegalEntities - /// - [TestMethod] - public void UpdateLegalEntitiesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/LegalEntity.json"); - var service = new LegalEntitiesService(client); - var legalEntityInfo = new LegalEntityInfo - { - Organization = new Organization(), - Type = LegalEntityInfo.TypeEnum.Individual, - EntityAssociations = new List(), - SoleProprietorship = new SoleProprietorship() - }; - var response = service.UpdateLegalEntity("LE322JV223222D5GG42KN6869", legalEntityInfo); - Assert.AreEqual(response.Id, "LE322JV223222D5GG42KN6869"); - Assert.AreEqual(response.Type, LegalEntity.TypeEnum.Individual); - } - #endregion - - #region LegalEntities - /// - /// Test update BusinessLines - /// - [TestMethod] - public void UpdateBusinessLinesTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/BusinessLine.json"); - var service = new BusinessLinesService(client); - var businessLine = new BusinessLineInfoUpdate - { - IndustryCode = "124rrdfer", - SourceOfFunds = new SourceOfFunds() - }; - var response = service.UpdateBusinessLine("SE322KT223222D5FJ7TJN2986", businessLine); - Assert.AreEqual(response.Id, "SE322KT223222D5FJ7TJN2986"); - Assert.AreEqual(response.IndustryCode, "55"); - } - #endregion - - #region TermsOfService - /// - /// Test get TermsOfService Status - /// - [TestMethod] - public void GetTermsOfServiceStatus() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/legalentitymanagement/TermsOfServiceStatus.json"); - var service = new TermsOfServiceService(client); - var response = service.GetTermsOfServiceInformationForLegalEntity("id123"); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://kyc-test.adyen.com/lem/v4/legalEntities/id123/termsOfServiceAcceptanceInfos", - null, - null, - new HttpMethod("GET"), default); - Assert.AreEqual(response.Data[0].Type, TermsOfServiceAcceptanceInfo.TypeEnum.AdyenIssuing); - } - #endregion - } -} diff --git a/Adyen.Test/Management/ManagementTest.cs b/Adyen.Test/Management/ManagementTest.cs new file mode 100644 index 000000000..5e22a69d9 --- /dev/null +++ b/Adyen.Test/Management/ManagementTest.cs @@ -0,0 +1,113 @@ +using Adyen.Core.Options; +using Adyen.Management.Client; +using Adyen.Management.Extensions; +using Adyen.Management.Models; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +namespace Adyen.Test.Management +{ + [TestClass] + public class ManagementTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public ManagementTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigureManagement((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_MeApiCredential_Result_Return_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/management/me.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("S2-6262224667", response.Id); + Assert.IsTrue(response.Active); + Assert.AreEqual("Management API - Users read and write", response.Roles[0]); + } + + [TestMethod] + public async Task Given_Deserialize_When_ListMerchantResponse_Returns_Correct_Data() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/management/list-merchant-accounts.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(22, response.ItemsTotal); + Assert.AreEqual("YOUR_MERCHANT_ACCOUNT_1", response.Data[0].Id); + } + + [TestMethod] + public async Task Given_Deserialize_When_UpdateResource_Returns_Data_String() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/management/logo.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("BASE-64_ENCODED_STRING_FROM_THE_REQUEST", response.Data); + } + + [TestMethod] + public async Task Given_Deserialize_When_ListTerminalsResponse_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/management/list-terminals.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(2, response.Data.Count); + Assert.AreEqual("V400m-080020970", response.Data.First(o => o.SerialNumber == "080-020-970").Id); + } + + [TestMethod] + public void Given_Serialize_When_TerminalSettings_Includes_Null_Surcharge() + { + // Arrange + TerminalSettings terminalSettings = new TerminalSettings( + localization: new Localization("it"), + surcharge: null + ); + + // Act + string target = JsonSerializer.Serialize(terminalSettings, _jsonSerializerOptionsProvider.Options); + + // Assert + using var jsonDoc = JsonDocument.Parse(target); + JsonElement root = jsonDoc.RootElement; + + Assert.IsNotNull(terminalSettings.Localization); + JsonElement localizationElement = root.GetProperty("localization"); + Assert.AreEqual("it", localizationElement.GetProperty("language").GetString()); + + // must include surcharge as null + Assert.IsTrue(target.Contains("\"surcharge\":null")); + // must not include gratuities + Assert.IsFalse(target.Contains("gratuities")); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/ManagementTest.cs b/Adyen.Test/ManagementTest.cs deleted file mode 100644 index 010c79ba1..000000000 --- a/Adyen.Test/ManagementTest.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Linq; -using System.Net.Http; -using System.Threading.Tasks; -using Adyen.Model.Management; -using Adyen.Service.Management; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using NSubstitute; - -namespace Adyen.Test -{ - [TestClass] - public class ManagementTest : BaseTest - { - [TestMethod] - public void Me() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/management/me.json"); - var service = new MyAPICredentialService(client); - - var response = service.GetApiCredentialDetails(); - - Assert.AreEqual("S2-6262224667", response.Id); - Assert.IsTrue(response.Active); - Assert.AreEqual("Management API - Users read and write", response.Roles[0]); - } - - [TestMethod] - public void ListMerchantAccounts() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/management/list-merchant-accounts.json"); - var service = new AccountCompanyLevelService(client); - - var response = service.ListMerchantAccounts("ABC123", 1, 10); - - Assert.AreEqual(22, response.ItemsTotal); - Assert.AreEqual("YOUR_MERCHANT_ACCOUNT_1", response.Data[0].Id); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://management-test.adyen.com/v3/companies/ABC123/merchants?pageNumber=1&pageSize=10", null, null, - HttpMethod.Get, default); - } - - [TestMethod] - public async Task UpdateResource() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/management/logo.json"); - var service = new TerminalSettingsCompanyLevelService(client); - - var logo = await service.UpdateTerminalLogoAsync("123ABC", "E355", new Logo("base64")); - - Assert.AreEqual("BASE-64_ENCODED_STRING_FROM_THE_REQUEST", logo.Data); - await ClientInterfaceSubstitute.Received().RequestAsync( - "https://management-test.adyen.com/v3/companies/123ABC/terminalLogos?model=E355", - Arg.Any(), - null, - new HttpMethod("PATCH"), default); - } - - [TestMethod] - public void ListTerminals() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/management/list-terminals.json"); - var service = new TerminalsTerminalLevelService(client); - - var terminals = service.ListTerminals(searchQuery: "ABC OR 123", pageSize: 2); - - Assert.AreEqual(2, terminals.Data.Count); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://management-test.adyen.com/v3/terminals?searchQuery=ABC+OR+123&pageSize=2", - null, null, new HttpMethod("GET"), default); - var terminal = - from o in terminals.Data - where o.SerialNumber == "080-020-970" - select o; - Assert.AreEqual("V400m-080020970", terminal.First().Id); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/ManagementWebhookHandlerTest.cs b/Adyen.Test/ManagementWebhookHandlerTest.cs new file mode 100644 index 000000000..0c891d80f --- /dev/null +++ b/Adyen.Test/ManagementWebhookHandlerTest.cs @@ -0,0 +1,124 @@ +// using System; +// using Adyen.Model.ManagementWebhooks; +// using Adyen.Webhooks; +// using Microsoft.VisualStudio.TestTools.UnitTesting; +// +// namespace Adyen.Test.WebhooksTests +// { +// [TestClass] +// public class ManagementWebhookHandlerTest : BaseTest +// { +// private readonly ManagementWebhookHandler _managementWebhookHandler = new ManagementWebhookHandler(); +// +// [TestMethod] +// public void Test_Management_Webhook_PaymentMethodCreated() +// { +// // Arrange +// const string jsonPayload = @" +// { +// 'createdAt': '2022-01-24T14:59:11+01:00', +// 'data': { +// 'id': 'PM3224R223224K5FH4M2K9B86', +// 'merchantId': 'MERCHANT_ACCOUNT', +// 'status': 'SUCCESS', +// 'storeId': 'ST322LJ223223K5F4SQNR9XL5', +// 'type': 'visa' +// }, +// 'environment': 'test', +// 'type': 'paymentMethod.created' +// }"; +// // Act +// _managementWebhookHandler.GetPaymentMethodCreatedNotificationRequest(jsonPayload, out PaymentMethodCreatedNotificationRequest paymentMethodCreatedWebhook); +// +// // Assert +// Assert.IsNotNull(paymentMethodCreatedWebhook); +// Assert.AreEqual(PaymentMethodCreatedNotificationRequest.TypeEnum.PaymentMethodCreated, paymentMethodCreatedWebhook.Type); +// Assert.AreEqual(paymentMethodCreatedWebhook.Data.Id, "PM3224R223224K5FH4M2K9B86"); +// Assert.AreEqual(paymentMethodCreatedWebhook.Data.MerchantId, "MERCHANT_ACCOUNT"); +// Assert.AreEqual(paymentMethodCreatedWebhook.Data.Status, MidServiceNotificationData.StatusEnum.Success); +// Assert.AreEqual(paymentMethodCreatedWebhook.Data.StoreId, "ST322LJ223223K5F4SQNR9XL5"); +// Assert.AreEqual(paymentMethodCreatedWebhook.Data.Type, "visa"); +// Assert.AreEqual(DateTime.Parse("2022-01-24T14:59:11+01:00"), paymentMethodCreatedWebhook.CreatedAt); +// Assert.AreEqual("test", paymentMethodCreatedWebhook.Environment); +// } +// +// [TestMethod] +// public void Test_Management_Webhook_MerchantUpdated() +// { +// // Arrange +// const string jsonPayload = @" +// { +// 'type': 'merchant.updated', +// 'environment': 'test', +// 'createdAt': '2022-09-20T13:42:31+02:00', +// 'data': { +// 'capabilities': { +// 'receivePayments': { +// 'allowed': true, +// 'requested': true, +// 'requestedLevel': 'notApplicable', +// 'verificationStatus': 'valid' +// } +// }, +// 'legalEntityId': 'LE322KH223222F5GNNW694PZN', +// 'merchantId': 'YOUR_MERCHANT_ID', +// 'status': 'PreActive' +// } +// }"; +// // Act +// _managementWebhookHandler.GetMerchantUpdatedNotificationRequest(jsonPayload, out MerchantUpdatedNotificationRequest target); +// +// // Assert +// Assert.IsNotNull(target); +// Assert.AreEqual(target.Type, MerchantUpdatedNotificationRequest.TypeEnum.MerchantUpdated); +// Assert.AreEqual("LE322KH223222F5GNNW694PZN", target.Data.LegalEntityId); +// Assert.AreEqual("YOUR_MERCHANT_ID", target.Data.MerchantId); +// Assert.AreEqual("PreActive", target.Data.Status); +// Assert.AreEqual(DateTime.Parse("2022-09-20T13:42:31+02:00"), target.CreatedAt); +// Assert.AreEqual("test", target.Environment); +// +// Assert.IsTrue(target.Data.Capabilities.TryGetValue("receivePayments", out AccountCapabilityData accountCapabilityData)); +// Assert.AreEqual(true, accountCapabilityData.Requested); +// Assert.AreEqual("notApplicable", accountCapabilityData.RequestedLevel); +// } +// +// [TestMethod] +// public void Test_Management_Webhook_MerchantCreated() +// { +// // Arrange +// const string jsonPayload = @" +// { +// 'type': 'merchant.created', +// 'environment': 'test', +// 'createdAt': '2022-08-12T10:50:01+02:00', +// 'data': { +// 'capabilities': { +// 'sendToTransferInstrument': { +// 'requested': true, +// 'requestedLevel': 'notApplicable' +// } +// }, +// 'companyId': 'YOUR_COMPANY_ID', +// 'merchantId': 'MC3224X22322535GH8D537TJR', +// 'status': 'PreActive' +// } +// }"; +// Assert.IsFalse(_managementWebhookHandler.GetMerchantUpdatedNotificationRequest(jsonPayload, out _)); +// +// // Act +// _managementWebhookHandler.GetMerchantCreatedNotificationRequest(jsonPayload, out MerchantCreatedNotificationRequest target); +// +// // Assert +// Assert.IsNotNull(target); +// Assert.AreEqual(MerchantCreatedNotificationRequest.TypeEnum.MerchantCreated, target.Type); +// Assert.AreEqual("test", target.Environment); +// Assert.AreEqual("YOUR_COMPANY_ID", target.Data.CompanyId); +// Assert.AreEqual("MC3224X22322535GH8D537TJR", target.Data.MerchantId); +// Assert.AreEqual("PreActive", target.Data.Status); +// Assert.AreEqual(DateTime.Parse("2022-08-12T10:50:01+02:00"), target.CreatedAt); +// Assert.IsTrue(target.Data.Capabilities.TryGetValue("sendToTransferInstrument", out AccountCapabilityData data)); +// Assert.AreEqual("notApplicable", data.RequestedLevel); +// Assert.AreEqual(true, data.Requested); +// } +// } +// } \ No newline at end of file diff --git a/Adyen.Test/MockOpenInvoicePayment.cs b/Adyen.Test/MockOpenInvoicePayment.cs deleted file mode 100644 index 36549db78..000000000 --- a/Adyen.Test/MockOpenInvoicePayment.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using Adyen.Model.Payment; - -namespace Adyen.Test -{ - public class MockOpenInvoicePayment - { - public static PaymentRequest CreateOpenInvoicePaymentRequest() - { - - DateTime dateOfBirth = DateTime.Parse("1970-07-10"); - - PaymentRequest paymentRequest = MockPaymentData.CreateFullPaymentRequest(); - - // Set Shopper Data - paymentRequest.ShopperEmail = "youremail@email.com"; - paymentRequest.DateOfBirth = dateOfBirth; - paymentRequest.TelephoneNumber = "0612345678"; - paymentRequest.ShopperReference = "4"; - - // Set Shopper Info - Name shopperName = new Name - { - FirstName = "Testperson-nl", - LastName = "Approved" - }; - paymentRequest.ShopperName = shopperName; - - // Set Billing and Delivery address - Address address = new Address - { - City = "Gravenhage", - Country = "NL", - HouseNumberOrName = "1", - PostalCode = "2521VA", - StateOrProvince = "Zuid-Holland", - Street = "Neherkade" - }; - paymentRequest.DeliveryAddress = address; - paymentRequest.BillingAddress = address; - - // Use OpenInvoice Provider (klarna, ratepay) - paymentRequest.SelectedBrand = "klarna"; - - long itemAmount = long.Parse("9000"); - long itemVatAmount = long.Parse("1000"); - long itemVatPercentage = long.Parse("1000"); - - List invoiceLines = new List(); - - // invoiceLine1 - AdditionalDataOpenInvoice invoiceLine = new AdditionalDataOpenInvoice - { - OpeninvoicedataLineItemNrCurrencyCode = ("EUR"), - OpeninvoicedataLineItemNrDescription = ("Test product"), - OpeninvoicedataLineItemNrItemVatAmount = ("1000"), - OpeninvoicedataLineItemNrItemAmount = (itemAmount).ToString(), - OpeninvoicedataLineItemNrItemVatPercentage = (itemVatPercentage).ToString(), - OpeninvoicedataLineItemNrNumberOfItems = (1).ToString(), - OpeninvoicedataLineItemNrItemId = ("1234") - }; - - // invoiceLine2 - // invoiceLine1 - AdditionalDataOpenInvoice invoiceLine2 = new AdditionalDataOpenInvoice - { - OpeninvoicedataLineItemNrCurrencyCode = ("EUR"), - OpeninvoicedataLineItemNrDescription = ("Test product2"), - OpeninvoicedataLineItemNrItemVatAmount = (itemVatAmount).ToString(), - OpeninvoicedataLineItemNrItemAmount = (itemAmount).ToString(), - OpeninvoicedataLineItemNrItemVatPercentage = (itemVatPercentage).ToString(), - OpeninvoicedataLineItemNrNumberOfItems = (1).ToString(), - OpeninvoicedataLineItemNrItemId = ("456") - }; - - invoiceLines.Add(invoiceLine); - invoiceLines.Add(invoiceLine2); - - /*paymentRequest.AdditionalData(invoiceLines);*/ - - return paymentRequest; - } - - } -} diff --git a/Adyen.Test/MockPaymentData.cs b/Adyen.Test/MockPaymentData.cs deleted file mode 100644 index 687c0ef98..000000000 --- a/Adyen.Test/MockPaymentData.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using Adyen.Constants; -using Adyen.Model.Payment; -using Environment = Adyen.Model.Environment; - -namespace Adyen.Test -{ - internal class MockPaymentData - { - #region Mock payment data - - public static Config CreateConfigApiKeyBasedMock() - { - return new Config - { - Environment = Environment.Test, - XApiKey = "AQEyhmfxK....LAG84XwzP5pSpVd"//mock api key - }; - } - - public static PaymentRequest CreateFullPaymentRequest() - { - var paymentRequest = new PaymentRequest - { - ApplicationInfo = new ApplicationInfo - { - AdyenLibrary = new CommonField(name: ClientConfig.LibName, version: ClientConfig.LibVersion) - }, - MerchantAccount = "MerchantAccount", - Amount = new Amount("EUR", 1500), - Card = CreateTestCard(), - Reference = "payment - " + DateTime.Now.ToString("yyyyMMdd"), - AdditionalData = CreateAdditionalData() - }; - return paymentRequest; - } - - public static PaymentRequest3ds2 CreateFullPaymentRequest3DS2() - { - var paymentRequest = new PaymentRequest3ds2 - { - MerchantAccount = "MerchantAccount", - Amount = new Amount("EUR", 1500), - Reference = "payment - " + DateTime.Now.ToString("yyyyMMdd"), - AdditionalData = CreateAdditionalData(), - ThreeDS2RequestData = new ThreeDS2RequestData(threeDSCompInd: "Y", - deviceChannel: "browser"), - BrowserInfo = CreateMockBrowserInfo(), - }; - return paymentRequest; - } - - public static PaymentRequest CreateFullPaymentRequestWithShopperInteraction(PaymentRequest.ShopperInteractionEnum shopperInteraction) - { - var paymentRequest = CreateFullPaymentRequest(); - paymentRequest.ShopperInteraction = shopperInteraction; - return paymentRequest; - } - - protected static Dictionary CreateAdditionalData() - { - return new Dictionary - { - { "liabilityShift", "true"}, - { "fraudResultType", "GREEN"}, - { "authCode", "43733"}, - { "avsResult", "4 AVS not supported for this card type"} - }; - } - - public static PaymentRequest3d CreateFullPaymentRequest3D() - { - var paymentRequest = new PaymentRequest3d - { - ApplicationInfo = new ApplicationInfo - { - AdyenLibrary = new CommonField(name: ClientConfig.LibName, version: ClientConfig.LibVersion) - }, - MerchantAccount = "MerchantAccount", - BrowserInfo = CreateMockBrowserInfo(), - Reference = "payment - " + DateTime.Now.ToString("yyyyMMdd"), - CaptureDelayHours = 0 - }; - return paymentRequest; - } - - - public static BrowserInfo CreateMockBrowserInfo() - { - return new BrowserInfo - { - UserAgent = "User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36", - AcceptHeader = "*/*" - }; - } - - public static Card CreateTestCard() - { - return new Card(number: "4111111111111111", expiryMonth: "08", expiryYear: "2018", cvc: "737", holderName: "John Smith"); - } - - public static Card CreateTestCard3D() - { - return new Card(number: "5212345678901234", expiryMonth: "08", expiryYear: "2018", cvc: "737", holderName: "John Smith"); - } - - public static string GetTestPspReferenceMocked() - { - return "8514836072314693"; - } - #endregion - } -} diff --git a/Adyen.Test/ModificationTest.cs b/Adyen.Test/ModificationTest.cs deleted file mode 100644 index b1864bd42..000000000 --- a/Adyen.Test/ModificationTest.cs +++ /dev/null @@ -1,128 +0,0 @@ -using Adyen.Model.Payment; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class ModificationTest : BaseTest - { - [TestMethod] - public void TestCaptureMockedSuccess() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - //Call authorization test - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/capture-success.json"); - var modification = new PaymentService(client); - //Send capture call with psp refernce - var captureRequest = CreateCaptureTestRequest(paymentResultPspReference); - var captureResult = modification.Capture(captureRequest); - Assert.AreEqual(captureResult.Response, ModificationResult.ResponseEnum.CaptureReceived); - Assert.AreEqual(captureRequest.AdditionalData["authorisationType"],"PreAuth"); - } - - [TestMethod] - public void TestCancelOrRefundReceivedMocked() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - //Call authorization test - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/cancelOrRefund-received.json"); - var modification = new PaymentService(client); - var cancelOrRefundRequest = CreateCancelOrRefundTestRequest(pspReference: paymentResultPspReference); - var cancelOrRefundResult = modification.CancelOrRefund(cancelOrRefundRequest); - Assert.AreEqual(cancelOrRefundResult.Response, ModificationResult.ResponseEnum.CancelOrRefundReceived); - } - - [TestMethod] - public void TestRefundReceivedMocked() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - //Call authorization test - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/refund-received.json"); - var modification = new PaymentService(client); - var refundRequest = CreateRefundTestRequest(pspReference: paymentResultPspReference); - var refundResult = modification.Refund(refundRequest); - Assert.AreEqual(refundResult.Response, ModificationResult.ResponseEnum.RefundReceived); - } - - [TestMethod] - public void TestCancelReceivedMocked() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - //Call authorization test - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/cancel-received.json"); - var modification = new PaymentService(client); - var cancelRequest = CreateCancelTestRequest(pspReference: paymentResultPspReference); - var cancelResult = modification.Cancel(cancelRequest); - Assert.AreEqual(cancelResult.Response, ModificationResult.ResponseEnum.CancelReceived); - } - - [TestMethod] - public void TestAdjustAuthorisationReceivedMocked() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - //Call authorization test - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/adjustAuthorisation-received.json"); - var modification = new PaymentService(client); - var authorisationRequest = CreateAdjustAuthorisationRequest(pspReference: paymentResultPspReference); - var adjustAuthorisationResult = modification.AdjustAuthorisation(authorisationRequest); - Assert.AreEqual(adjustAuthorisationResult.Response, ModificationResult.ResponseEnum.AdjustAuthorisationReceived); - Assert.AreEqual(adjustAuthorisationResult.PspReference, "853569123456789D"); - Assert.AreEqual(adjustAuthorisationResult.AdditionalData["merchantReference"], "payment - 20190901"); - } - - [TestMethod] - public void TestCaptureRequest() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - var captureRequest = CreateCaptureTestRequest(paymentResultPspReference); - Assert.IsNotNull(captureRequest.AdditionalData); - } - - [TestMethod] - public void TestCancelOrRefundRequest() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - var cancelOrRefundRequest = CreateCancelOrRefundTestRequest(pspReference: paymentResultPspReference); - Assert.IsNull(cancelOrRefundRequest.AdditionalData); - Assert.AreEqual(cancelOrRefundRequest.MerchantAccount, "MerchantAccount"); - } - - [TestMethod] - public void TestRefundRequest() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - var refundRequest = CreateRefundTestRequest(pspReference: paymentResultPspReference); - Assert.IsNull(refundRequest.AdditionalData); - Assert.AreEqual(refundRequest.MerchantAccount, "MerchantAccount"); - } - - [TestMethod] - public void TestAdjustAuthorisationRequest() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - var authorisationRequest = CreateAdjustAuthorisationRequest(pspReference: paymentResultPspReference); - Assert.IsNull(authorisationRequest.AdditionalData); - Assert.AreEqual(authorisationRequest.ModificationAmount, new Amount("EUR",150)); - } - - [TestMethod] - public void TestCancelRequest() - { - var paymentResultPspReference = MockPaymentData.GetTestPspReferenceMocked(); - var cancelRequest = CreateCancelTestRequest(pspReference: paymentResultPspReference); - Assert.IsNull(cancelRequest.AdditionalData); - Assert.AreEqual(cancelRequest.MerchantAccount, "MerchantAccount"); - } - - [TestMethod] - public void TestPendingRefundReceived() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/voidPendingRefund-received.json"); - var modification = new PaymentService(client); - var voidPendingRefundRequest = new VoidPendingRefundRequest(); - var modificationResult = modification.VoidPendingRefund(voidPendingRefundRequest); - Assert.AreEqual(modificationResult.Response, ModificationResult.ResponseEnum.VoidPendingRefundReceived); - } - } -} diff --git a/Adyen.Test/Payment/ModificationTest.cs b/Adyen.Test/Payment/ModificationTest.cs new file mode 100644 index 000000000..6e70f9a10 --- /dev/null +++ b/Adyen.Test/Payment/ModificationTest.cs @@ -0,0 +1,119 @@ +using Adyen.Core.Options; +using Adyen.Payment.Extensions; +using Adyen.Payment.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using System.Text.Json; +using Adyen.Constants; +using Adyen.Core; +using Adyen.Payment.Models; + +namespace Adyen.Test.Payment +{ + /// + /// ClassicPayments - Modification. + /// + [TestClass] + public class ModificationTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public ModificationTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigurePayment((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + } + + [TestMethod] + public void Given_Deserialize_When_ModificationResult_Result_Is_CaptureReceived() + { + //Assert.AreEqual(json.Contains(AdditionalData["authorisationType"],"PreAuth"); + + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/capture-success.json"); + + // Act + var captureResult = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(captureResult.Response, ModificationResult.ResponseEnum.CaptureReceived); + } + + [TestMethod] + public void Given_Deserialize_When_ModificationResult_Result_Is_CancelOrRefundReceived() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/cancelOrRefund-received.json"); + + // Act + var cancelOrRefundResult = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(cancelOrRefundResult.Response, ModificationResult.ResponseEnum.CancelOrRefundReceived); + } + + [TestMethod] + public void Given_Deserialize_When_ModificationResult_Result_Is_RefundReceived() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/refund-received.json"); + + // Act + var refundResult = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(refundResult.Response, ModificationResult.ResponseEnum.RefundReceived); + } + + [TestMethod] + public void Given_Deserialize_When_ModificationResult_Result_Is_CancelReceived() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/cancel-received.json"); + + // Act + var cancelResult = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(cancelResult.Response, ModificationResult.ResponseEnum.CancelReceived); + } + + [TestMethod] + public void Given_Deserialize_When_ModificationResult_Result_Is_AdjustAuthorisationReceived() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/adjustAuthorisation-received.json"); + + // Act + var adjustAuthorisationResult = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(adjustAuthorisationResult.Response, ModificationResult.ResponseEnum.AdjustAuthorisationReceived); + Assert.AreEqual(adjustAuthorisationResult.PspReference, "853569123456789D"); + Assert.AreEqual(adjustAuthorisationResult.AdditionalData["merchantReference"], "payment - 20190901"); + } + + [TestMethod] + public void Given_Deserialize_When_ModificationResult_Result_Is_VoidPendingRefundReceived() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/voidPendingRefund-received.json"); + + // Act + var modificationResult = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(modificationResult.Response, ModificationResult.ResponseEnum.VoidPendingRefundReceived); + } + } +} diff --git a/Adyen.Test/Payment/PaymentTest.cs b/Adyen.Test/Payment/PaymentTest.cs new file mode 100644 index 000000000..b436efe2c --- /dev/null +++ b/Adyen.Test/Payment/PaymentTest.cs @@ -0,0 +1,379 @@ +using Adyen.Core.Options; +using Adyen.Payment.Extensions; +using Adyen.Payment.Client; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using System.Text.Json; +using Adyen.Constants; +using Adyen.Payment.Models; + +namespace Adyen.Test.Payment +{ + /// + /// Classic Payments - Payment. + /// + [TestClass] + public class PaymentTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public PaymentTest() + { + IHost testHost = Host.CreateDefaultBuilder() + .ConfigurePayment((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = testHost.Services.GetRequiredService(); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResult_Result_Is_Authorised() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/authorise-success.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(result.ResultCode, PaymentResult.ResultCodeEnum.Authorised); + Assert.AreEqual("411111", GetAdditionalData(result.AdditionalData, "cardBin")); + Assert.AreEqual("43733", GetAdditionalData(result.AdditionalData, "authCode")); + Assert.AreEqual("4 AVS not supported for this card type", GetAdditionalData(result.AdditionalData, "avsResult")); + Assert.AreEqual("1 Matches", GetAdditionalData(result.AdditionalData, "cvcResult")); + Assert.AreEqual("visa", GetAdditionalData(result.AdditionalData, "paymentMethod")); + } + + + [TestMethod] + public void Given_Deserialize_When_PaymentResult_3D_Result_Is_Authorise_Success() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/authorise-success-3d.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(result.Md); + Assert.IsNotNull(result.IssuerUrl); + Assert.IsNotNull(result.PaRequest); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResult_3DS_IdentifyShopper_Result_Is_IdentifyShopper() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/threedsecure2/authorise-response-identifyshopper.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(result.ResultCode, PaymentResult.ResultCodeEnum.IdentifyShopper); + Assert.IsNotNull(result.PspReference); + Assert.AreEqual("74044f6c-7d79-4dd1-9859-3b2879a32fb0", GetAdditionalData(result.AdditionalData, "threeds2.threeDSServerTransID")); + Assert.AreEqual(@"https://pal-test.adyen.com/threeds2simulator/acs/startMethod.shtml", GetAdditionalData(result.AdditionalData, "threeds2.threeDSMethodURL")); + Assert.AreEqual("[token]", GetAdditionalData(result.AdditionalData, "threeds2.threeDS2Token")); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResult_3DS2_ChallengeShopper_Result_Is_ChallengerShopper() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/threedsecure2/authorise3ds2-response-challengeshopper.json"); + + // Act + var paymentResult = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.ChallengeShopper); + Assert.IsNotNull(paymentResult.PspReference); + + Assert.AreEqual("C", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.transStatus")); + Assert.AreEqual("Y", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsChallengeMandated")); + Assert.AreEqual("https://pal-test.adyen.com/threeds2simulator/acs/challenge.shtml", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsURL")); + Assert.AreEqual("74044f6c-7d79-4dd1-9859-3b2879a32fb1", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.threeDSServerTransID")); + Assert.AreEqual("01", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.authenticationType")); + Assert.AreEqual("2.1.0", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.messageVersion")); + Assert.AreEqual("[token]", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2Token")); + Assert.AreEqual("ba961c4b-33f2-4830-3141-744b8586aeb0", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsTransID")); + Assert.AreEqual("ADYEN-ACS-SIMULATOR", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsReferenceNumber")); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResult_Authorise_3DS2_Result_Is_Authorised() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/threedsecure2/authorise3ds2-success.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(result.ResultCode, PaymentResult.ResultCodeEnum.Authorised); + Assert.IsNotNull(result.PspReference); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResult_Authorise_3D_Result_Is_Authorised() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/authorise3d-success.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(result.ResultCode, PaymentResult.ResultCodeEnum.Authorised); + Assert.IsNotNull(result.PspReference); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResult_CVC_Declined_Result_Is_Refused() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/authorise-error-cvc-declined.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentResult.ResultCodeEnum.Refused, result.ResultCode); + } + + [TestMethod] + public void Given_Deserialize_When_PaymentResult_CSE_Result_Is_Authorised() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/authorise-success-cse.json"); + + // Act + var result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(PaymentResult.ResultCodeEnum.Authorised, result.ResultCode); + } + + [TestMethod] + public void Given_CreatePaymentRequest_When_AdyenLibraryName_And_AdyenLibraryVersion_Are_Set_Returns_ApplicationInfo() + { + // Arrange + // Act + var paymentRequest = MockPaymentData.CreateFullPaymentRequest(); + + // Assert + Assert.IsNotNull(paymentRequest.ApplicationInfo); + Assert.AreEqual(paymentRequest.ApplicationInfo.AdyenLibrary.Name, Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName); + Assert.AreEqual(paymentRequest.ApplicationInfo.AdyenLibrary.Version, Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion); + } + + [TestMethod] + public void Given_CreatePaymentRequest3D_When_AdyenLibraryName_And_AdyenLibraryVersion_Are_Set_Returns_ApplicationInfo() + { + // Arrange + // Act + PaymentRequest3d paymentRequest = MockPaymentData.CreateFullPaymentRequest3D(); + + // Assert + Assert.IsNotNull(paymentRequest.ApplicationInfo); + Assert.AreEqual(paymentRequest.ApplicationInfo.AdyenLibrary.Name, Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName); + Assert.AreEqual(paymentRequest.ApplicationInfo.AdyenLibrary.Version, Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion); + } + + [TestMethod] + public void Given_Serialize_When_PaymentRequest3D_With_CaptureDelaysHours_And_FraudOffSet_Result_Should_Contain_0() + { + // Arrange + var paymentRequest = MockPaymentData.CreateFullPaymentRequest3D(); + + // Act + string target = JsonSerializer.Serialize(paymentRequest); + + // Assert + using var jsonDoc = JsonDocument.Parse(target); + JsonElement root = jsonDoc.RootElement; + Assert.AreEqual(0, root.GetProperty("captureDelayHours").GetInt32()); + Assert.AreEqual(0, root.GetProperty("fraudOffset").GetInt32()); + } + + [TestMethod] + public void Given_Deserialize_When_AuthenticationResultResponse_Result_3DS1_Success_And_3DS2_Is_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/authentication-result-success-3ds1.json"); + + // Act + var authenticationResultResponse = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Arrange + Assert.IsNotNull(authenticationResultResponse); + Assert.IsNotNull(authenticationResultResponse.ThreeDS1Result); + Assert.IsNull(authenticationResultResponse.ThreeDS2Result); + } + + [TestMethod] + public void Given_Deserialize_When_AuthenticationResultResponse_Result_3DS2_Is_Success_And_3DS1_Is_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/authentication-result-success-3ds2.json"); + + // Act + var authenticationResultResponse = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(authenticationResultResponse); + Assert.IsNull(authenticationResultResponse.ThreeDS1Result); + Assert.IsNotNull(authenticationResultResponse.ThreeDS2Result); + } + + [TestMethod] + public void Given_Deserialize_When_AuthenticationResultResponse_Result_ThreeDSServerTransId_And_Ds_TransID_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/ThreeDS2Result.json"); + + // Act + var threeDs2Result = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(threeDs2Result); + Assert.AreEqual("f04ec32b-f46b-46ef-9ccd-44be42fb0d7e", threeDs2Result.ThreeDS2Result.ThreeDSServerTransID); + Assert.AreEqual("80a16fa0-4eea-43c9-8de5-b0470d09d14d", threeDs2Result.ThreeDS2Result.DsTransID); + } + + [TestMethod] + public void Given_Serialize_When_PaymentRequest_With_ShopperInteraction_Moto_Result_Should_Be_Moto() + { + // Arrange + var paymentRequest = MockPaymentData.CreateFullPaymentRequestWithShopperInteraction(PaymentRequest.ShopperInteractionEnum.Moto); + + // Act + string target = JsonSerializer.Serialize(paymentRequest); + + // Assert + using var jsonDoc = JsonDocument.Parse(target); + JsonElement root = jsonDoc.RootElement; + Assert.AreEqual("Moto", root.GetProperty("shopperInteraction").GetString()); + } + + [TestMethod] + public void Given_Serialize_When_PaymentRequest_With_ShopperInteraction_Result_Should_Be_Null() + { + // Arrange + var paymentRequest = MockPaymentData.CreateFullPaymentRequestWithShopperInteraction(null); + + // Act + string target = JsonSerializer.Serialize(paymentRequest); + + // Assert + using var jsonDoc = JsonDocument.Parse(target); + JsonElement root = jsonDoc.RootElement; + Assert.IsNull(root.GetProperty("shopperInteraction").GetString()); + } + + private string GetAdditionalData(Dictionary additionalData, string assertKey) + { + string result = ""; + if (additionalData.ContainsKey(assertKey)) + { + result = additionalData[assertKey]; + } + return result; + } + } + + internal class MockPaymentData + { + #region Mock payment data + + public static PaymentRequest CreateFullPaymentRequest() + { + PaymentRequest paymentRequest = new PaymentRequest( + applicationInfo: new ApplicationInfo(adyenLibrary: new CommonField(name: Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName, version: Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion)), + merchantAccount: "MerchantAccount", + amount: new Amount("EUR", 1500), card: CreateTestCard(), + reference: "payment - " + DateTime.Now.ToString("yyyyMMdd"), + additionalData: CreateAdditionalData()); + return paymentRequest; + } + + public static PaymentRequest3ds2 CreateFullPaymentRequest3DS2() + { + PaymentRequest3ds2 paymentRequest = new PaymentRequest3ds2( + amount: new Amount("EUR", 1500), + merchantAccount: "MerchantAccount", + reference: "payment - " + DateTime.Now.ToString("yyyyMMdd"), + additionalData: CreateAdditionalData(), + threeDS2RequestData: new ThreeDS2RequestData(threeDSCompInd: "Y", + deviceChannel: "browser"), + browserInfo: CreateMockBrowserInfo() ); + return paymentRequest; + } + + public static PaymentRequest CreateFullPaymentRequestWithShopperInteraction(PaymentRequest.ShopperInteractionEnum shopperInteraction) + { + PaymentRequest paymentRequest = CreateFullPaymentRequest(); + paymentRequest.ShopperInteraction = shopperInteraction; + return paymentRequest; + } + + protected static Dictionary CreateAdditionalData() + { + return new Dictionary + { + { "liabilityShift", "true"}, + { "fraudResultType", "GREEN"}, + { "authCode", "43733"}, + { "avsResult", "4 AVS not supported for this card type"} + }; + } + + public static PaymentRequest3d CreateFullPaymentRequest3D() + { + PaymentRequest3d paymentRequest = new PaymentRequest3d( + md: "md", + merchantAccount: "MerchantAccount", + paResponse: "paResponse", + applicationInfo: new ApplicationInfo(adyenLibrary: new CommonField(name: Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName, version: Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion)), + browserInfo: CreateMockBrowserInfo(), + reference: "payment - " + DateTime.Now.ToString("yyyyMMdd"), + captureDelayHours: 0, + fraudOffset: 0); + return paymentRequest; + } + + + public static BrowserInfo CreateMockBrowserInfo() + { + return new BrowserInfo + { + UserAgent = "User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36", + AcceptHeader = "*/*" + }; + } + + public static Card CreateTestCard() + { + return new Card(number: "4111111111111111", expiryMonth: "08", expiryYear: "2018", cvc: "737", holderName: "John Smith"); + } + + public static Card CreateTestCard3D() + { + return new Card(number: "5212345678901234", expiryMonth: "08", expiryYear: "2018", cvc: "737", holderName: "John Smith"); + } + + public static string GetTestPspReferenceMocked() + { + return "8514836072314693"; + } + #endregion + } +} diff --git a/Adyen.Test/PaymentMethodDetailsTest.cs b/Adyen.Test/PaymentMethodDetailsTest.cs deleted file mode 100644 index 2612d880d..000000000 --- a/Adyen.Test/PaymentMethodDetailsTest.cs +++ /dev/null @@ -1,180 +0,0 @@ -using Adyen.Model.Checkout; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class PaymentMethodDetailsTest - { - [TestMethod] - public void TestAchPaymentMethod() - { - var achDetails = new AchDetails - { - BankAccountNumber = "1234567", - BankLocationId = "1234567", - EncryptedBankAccountNumber = "1234asdfg", - OwnerName = "John Smith" - }; - var paymentRequest = new PaymentRequest - { - MerchantAccount = "YOUR_MERCHANT_ACCOUNT", - Amount = new Amount("EUR", 1000), - Reference = "ACH test", - PaymentMethod = new CheckoutPaymentMethod(achDetails), - ShopperIP = "192.0.2.1", - Channel = PaymentRequest.ChannelEnum.Web, - Origin = "https://your-company.com", - ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy..", - - }; - var paymentMethodDetails = paymentRequest.PaymentMethod.GetAchDetails(); - Assert.AreEqual(paymentMethodDetails.Type, AchDetails.TypeEnum.Ach); - Assert.AreEqual(paymentMethodDetails.BankAccountNumber, "1234567"); - Assert.AreEqual(paymentMethodDetails.BankLocationId, "1234567"); - Assert.AreEqual(paymentMethodDetails.EncryptedBankAccountNumber, "1234asdfg"); - Assert.AreEqual(paymentMethodDetails.OwnerName, "John Smith"); - Assert.AreEqual(paymentRequest.MerchantAccount, "YOUR_MERCHANT_ACCOUNT"); - Assert.AreEqual(paymentRequest.Reference, "ACH test"); - Assert.AreEqual(paymentRequest.ReturnUrl, "https://your-company.com/checkout?shopperOrder=12xy.."); - } - - - [TestMethod] - public void TestApplePayPaymentMethod() - { - var applePay = new ApplePayDetails - { - ApplePayToken = "VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU..." - }; - var paymentRequest = new PaymentRequest - { - MerchantAccount = "YOUR_MERCHANT_ACCOUNT", - Amount = new Amount("EUR", 1000), - Reference = "apple pay test", - PaymentMethod = new CheckoutPaymentMethod(applePay), - ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." - }; - var paymentMethodDetails = paymentRequest.PaymentMethod.GetApplePayDetails(); - Assert.AreEqual(paymentMethodDetails.Type, ApplePayDetails.TypeEnum.Applepay); - Assert.AreEqual(paymentMethodDetails.ApplePayToken, "VNRWtuNlNEWkRCSm1xWndjMDFFbktkQU..."); - Assert.AreEqual(paymentRequest.MerchantAccount, "YOUR_MERCHANT_ACCOUNT"); - Assert.AreEqual(paymentRequest.Reference, "apple pay test"); - Assert.AreEqual(paymentRequest.ReturnUrl, "https://your-company.com/checkout?shopperOrder=12xy.."); - } - - [TestMethod] - public void TestGooglePayPaymentMethod() - { - var paymentRequest = new PaymentRequest - { - MerchantAccount = "YOUR_MERCHANT_ACCOUNT", - Amount = new Amount("EUR", 1000), - Reference = "google pay test", - PaymentMethod = new CheckoutPaymentMethod(new GooglePayDetails - { - GooglePayToken = "==Payload as retrieved from Google Pay response==", - FundingSource = GooglePayDetails.FundingSourceEnum.Debit - }), - ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." - }; - var paymentMethodDetails = (GooglePayDetails)paymentRequest.PaymentMethod.ActualInstance; - Assert.AreEqual(paymentMethodDetails.Type, GooglePayDetails.TypeEnum.Googlepay); - Assert.AreEqual(paymentMethodDetails.GooglePayToken, "==Payload as retrieved from Google Pay response=="); - Assert.AreEqual(paymentMethodDetails.FundingSource, GooglePayDetails.FundingSourceEnum.Debit); - Assert.AreEqual(paymentRequest.MerchantAccount, "YOUR_MERCHANT_ACCOUNT"); - Assert.AreEqual(paymentRequest.Reference, "google pay test"); - Assert.AreEqual(paymentRequest.ReturnUrl, "https://your-company.com/checkout?shopperOrder=12xy.."); - } - - [TestMethod] - public void TestIdealPaymentMethod() - { - - var paymentRequest = new PaymentRequest - { - MerchantAccount = "YOUR_MERCHANT_ACCOUNT", - Amount = new Amount("EUR", 1000), - Reference = "ideal test", - PaymentMethod = new CheckoutPaymentMethod(new IdealDetails - { - Issuer = "1121" - }), - ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." - }; - var paymentMethodDetails = paymentRequest.PaymentMethod.GetIdealDetails(); - Assert.AreEqual(paymentMethodDetails.Type, IdealDetails.TypeEnum.Ideal); - Assert.AreEqual(paymentRequest.MerchantAccount, "YOUR_MERCHANT_ACCOUNT"); - Assert.AreEqual(paymentRequest.Reference, "ideal test"); - Assert.AreEqual(paymentRequest.ReturnUrl, "https://your-company.com/checkout?shopperOrder=12xy.."); - } - - [TestMethod] - public void TestBacsDirectDebitDetails() - { - var paymentRequest = new PaymentRequest - { - MerchantAccount = "YOUR_MERCHANT_ACCOUNT", - Amount = new Amount("GBP", 1000), - Reference = "bacs direct debit test", - PaymentMethod = new CheckoutPaymentMethod(new BacsDirectDebitDetails - { - BankAccountNumber = "NL0123456789", - BankLocationId = "121000358", - HolderName = "John Smith" - }), - ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." - }; - var paymentMethodDetails = paymentRequest.PaymentMethod.GetBacsDirectDebitDetails(); - Assert.AreEqual(paymentMethodDetails.Type, BacsDirectDebitDetails.TypeEnum.DirectdebitGB); - Assert.AreEqual(paymentMethodDetails.BankAccountNumber, "NL0123456789"); - Assert.AreEqual(paymentMethodDetails.BankLocationId, "121000358"); - Assert.AreEqual(paymentMethodDetails.HolderName, "John Smith"); - Assert.AreEqual(paymentRequest.MerchantAccount, "YOUR_MERCHANT_ACCOUNT"); - Assert.AreEqual(paymentRequest.Reference, "bacs direct debit test"); - Assert.AreEqual(paymentRequest.ReturnUrl, "https://your-company.com/checkout?shopperOrder=12xy.."); - } - - - [TestMethod] - public void TestPaypalSuccess() - { - var paymentRequest = new PaymentRequest - { - MerchantAccount = "YOUR_MERCHANT_ACCOUNT", - Amount = new Amount("USD", 1000), - Reference = "paypal test", - PaymentMethod = new CheckoutPaymentMethod( new PayPalDetails - { - Subtype = PayPalDetails.SubtypeEnum.Sdk, - StoredPaymentMethodId = "2345654212345432345" - }), - ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy.." - }; - var paymentMethodDetails = (PayPalDetails)paymentRequest.PaymentMethod.ActualInstance; - Assert.AreEqual(paymentMethodDetails.Type, PayPalDetails.TypeEnum.Paypal); - Assert.AreEqual(paymentMethodDetails.Subtype, PayPalDetails.SubtypeEnum.Sdk); - } - - [TestMethod] - public void TestZipSuccess() - { - var paymentRequest = new PaymentRequest - { - MerchantAccount = "YOUR_MERCHANT_ACCOUNT", - Amount = new Amount("USD", 1000), - Reference = "zip test", - PaymentMethod = new CheckoutPaymentMethod(new ZipDetails - { - Type = ZipDetails.TypeEnum.Zip - }), - ReturnUrl = "https://your-company.com/checkout?shopperOrder=12xy..", - }; - var paymentMethodDetails = (ZipDetails)paymentRequest.PaymentMethod.ActualInstance; - Assert.AreEqual(paymentMethodDetails.Type, ZipDetails.TypeEnum.Zip); - Assert.AreEqual(paymentRequest.MerchantAccount, "YOUR_MERCHANT_ACCOUNT"); - Assert.AreEqual(paymentRequest.Reference, "zip test"); - Assert.AreEqual(paymentRequest.ReturnUrl, "https://your-company.com/checkout?shopperOrder=12xy.."); - } - } -} diff --git a/Adyen.Test/PaymentTest.cs b/Adyen.Test/PaymentTest.cs deleted file mode 100644 index 0e2ea1b7c..000000000 --- a/Adyen.Test/PaymentTest.cs +++ /dev/null @@ -1,207 +0,0 @@ -using System.Collections.Generic; -using Adyen.Constants; -using Adyen.Model.Payment; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class PaymentTest : BaseTest - { - [TestMethod] - public void TestAuthoriseBasicAuthenticationSuccessMockedResponse() - { - var paymentResult = CreatePaymentResultFromFile("mocks/authorise-success.json"); - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.Authorised); - Assert.AreEqual("411111", GetAdditionalData(paymentResult.AdditionalData, "cardBin")); - Assert.AreEqual("43733", GetAdditionalData(paymentResult.AdditionalData, "authCode")); - Assert.AreEqual("4 AVS not supported for this card type", GetAdditionalData(paymentResult.AdditionalData, "avsResult")); - Assert.AreEqual("1 Matches", GetAdditionalData(paymentResult.AdditionalData, "cvcResult")); - Assert.AreEqual("visa", GetAdditionalData(paymentResult.AdditionalData, "paymentMethod")); - } - - [TestMethod] - public void TestAuthoriseApiKeyBasedSuccessMockedResponse() - { - var paymentResult = CreatePaymentApiKeyBasedResultFromFile("mocks/authorise-success.json"); - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.Authorised); - Assert.AreEqual("411111", GetAdditionalData(paymentResult.AdditionalData, "cardBin")); - Assert.AreEqual("43733", GetAdditionalData(paymentResult.AdditionalData, "authCode")); - Assert.AreEqual("4 AVS not supported for this card type", GetAdditionalData(paymentResult.AdditionalData, "avsResult")); - Assert.AreEqual("1 Matches", GetAdditionalData(paymentResult.AdditionalData, "cvcResult")); - Assert.AreEqual("visa", GetAdditionalData(paymentResult.AdditionalData, "paymentMethod")); - } - - [TestMethod] - public void TestAuthoriseSuccess3DMocked() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/authorise-success-3d.json"); - var payment = new PaymentService(client); - var paymentRequest = MockPaymentData.CreateFullPaymentRequest(); - var paymentResult = payment.Authorise(paymentRequest); - Assert.IsNotNull(paymentResult.Md); - Assert.IsNotNull(paymentResult.IssuerUrl); - Assert.IsNotNull(paymentResult.PaRequest); - } - - [TestMethod] - public void TestAuthorise3DS2IdentifyShopperMocked() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/threedsecure2/authorise-response-identifyshopper.json"); - var payment = new PaymentService(client); - var paymentRequest = MockPaymentData.CreateFullPaymentRequest3DS2(); - var paymentResult = payment.Authorise3ds2(paymentRequest); - - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.IdentifyShopper); - Assert.IsNotNull(paymentResult.PspReference); - - Assert.AreEqual("74044f6c-7d79-4dd1-9859-3b2879a32fb0", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDSServerTransID")); - Assert.AreEqual(@"https://pal-test.adyen.com/threeds2simulator/acs/startMethod.shtml", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDSMethodURL")); - Assert.AreEqual("[token]", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2Token")); - } - - [TestMethod] - public void TestAuthorise3DS2ChallengeShopperMocked() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/threedsecure2/authorise3ds2-response-challengeshopper.json"); - var payment = new PaymentService(client); - var paymentRequest = MockPaymentData.CreateFullPaymentRequest3DS2(); - var paymentResult = payment.Authorise3ds2(paymentRequest); - - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.ChallengeShopper); - Assert.IsNotNull(paymentResult.PspReference); - - Assert.AreEqual("C", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.transStatus")); - Assert.AreEqual("Y", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsChallengeMandated")); - Assert.AreEqual("https://pal-test.adyen.com/threeds2simulator/acs/challenge.shtml", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsURL")); - Assert.AreEqual("74044f6c-7d79-4dd1-9859-3b2879a32fb1", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.threeDSServerTransID")); - Assert.AreEqual("01", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.authenticationType")); - Assert.AreEqual("2.1.0", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.messageVersion")); - Assert.AreEqual("[token]", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2Token")); - Assert.AreEqual("ba961c4b-33f2-4830-3141-744b8586aeb0", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsTransID")); - Assert.AreEqual("ADYEN-ACS-SIMULATOR", GetAdditionalData(paymentResult.AdditionalData, "threeds2.threeDS2ResponseData.acsReferenceNumber")); - } - - [TestMethod] - public void TestAuthorise3DS2SuccessMocked() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/threedsecure2/authorise3ds2-success.json"); - var payment = new PaymentService(client); - var paymentRequest = MockPaymentData.CreateFullPaymentRequest3DS2(); - var paymentResult = payment.Authorise3ds2(paymentRequest); - - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.Authorised); - Assert.IsNotNull(paymentResult.PspReference); - } - - [TestMethod] - public void TestAuthorise3DSuccessMocked() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/authorise3d-success.json"); - var payment = new PaymentService(client); - var paymentRequest = MockPaymentData.CreateFullPaymentRequest3D(); - var paymentResult = payment.Authorise3d(paymentRequest); - Assert.AreEqual(paymentResult.ResultCode, PaymentResult.ResultCodeEnum.Authorised); - Assert.IsNotNull(paymentResult.PspReference); - } - - [TestMethod] - public void TestAuthoriseErrorCvcDeclinedMocked() - { - var paymentResult = CreatePaymentResultFromFile("mocks/authorise-error-cvc-declined.json"); - Assert.AreEqual(PaymentResult.ResultCodeEnum.Refused, paymentResult.ResultCode); - } - - [TestMethod] - public void TestAuthoriseCseSuccessMocked() - { - var paymentResult = CreatePaymentResultFromFile("mocks/authorise-success-cse.json"); - Assert.AreEqual(PaymentResult.ResultCodeEnum.Authorised, paymentResult.ResultCode); - } - [Ignore] // Fix this test -> not sure how to add additionalDataOpenInvoice class to paymentrequest - [TestMethod] - public void TestOpenInvoice() - { - var client = CreateMockTestClientRequest("mocks/authorise-success-klarna.json"); - var payment = new PaymentService(client); - var paymentRequest = MockOpenInvoicePayment.CreateOpenInvoicePaymentRequest(); - var paymentResult = payment.Authorise(paymentRequest); - Assert.AreEqual("2374421290", paymentResult.AdditionalData["additionalData.acquirerReference"]); - Assert.AreEqual("klarna", paymentResult.AdditionalData["paymentMethodVariant"]); - } - - [TestMethod] - public void TestPaymentRequestApplicationInfo() - { - var paymentRequest = MockPaymentData.CreateFullPaymentRequest(); - Assert.IsNotNull(paymentRequest.ApplicationInfo); - Assert.AreEqual(paymentRequest.ApplicationInfo.AdyenLibrary.Name, ClientConfig.LibName); - Assert.AreEqual(paymentRequest.ApplicationInfo.AdyenLibrary.Version, ClientConfig.LibVersion); - } - - [TestMethod] - public void TestPaymentRequest3DApplicationInfo() - { - var paymentRequest = MockPaymentData.CreateFullPaymentRequest3D(); - Assert.IsNotNull(paymentRequest.ApplicationInfo); - Assert.AreEqual(paymentRequest.ApplicationInfo.AdyenLibrary.Name, ClientConfig.LibName); - Assert.AreEqual(paymentRequest.ApplicationInfo.AdyenLibrary.Version, ClientConfig.LibVersion); - } - - [TestMethod] - public void TestCaptureDelaySerialization() - { - var paymentRequest = MockPaymentData.CreateFullPaymentRequest3D(); - string jsonString = paymentRequest.ToJson(); - Assert.IsTrue(jsonString.Contains("\"captureDelayHours\": 0,")); - Assert.IsFalse(jsonString.Contains("\"fraudOffset\": 0")); - } - - [TestMethod] - public void TestAuthenticationResult3ds1Success() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/authentication-result-success-3ds1.json"); - var payment = new PaymentService(client); - var authenticationResultRequest = new AuthenticationResultRequest(); - var authenticationResultResponse = payment.GetAuthenticationResult(authenticationResultRequest); - Assert.IsNotNull(authenticationResultResponse); - Assert.IsNotNull(authenticationResultResponse.ThreeDS1Result); - Assert.IsNull(authenticationResultResponse.ThreeDS2Result); - } - - [TestMethod] - public void TestAuthenticationResult3ds2Success() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/authentication-result-success-3ds2.json"); - var payment = new PaymentService(client); - var authenticationResultRequest = new AuthenticationResultRequest(); - var authenticationResultResponse = payment.GetAuthenticationResult(authenticationResultRequest); - Assert.IsNotNull(authenticationResultResponse); - Assert.IsNull(authenticationResultResponse.ThreeDS1Result); - Assert.IsNotNull(authenticationResultResponse.ThreeDS2Result); - } - - [TestMethod] - public void TestRetrieve3ds2ResultSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/ThreeDS2Result.json"); - var payment = new PaymentService(client); - var authenticationResultRequest = new AuthenticationResultRequest(); - var ThreeDSTwoResult = payment.GetAuthenticationResult(authenticationResultRequest); - Assert.AreEqual("f04ec32b-f46b-46ef-9ccd-44be42fb0d7e", ThreeDSTwoResult.ThreeDS2Result.ThreeDSServerTransID); - Assert.AreEqual("80a16fa0-4eea-43c9-8de5-b0470d09d14d", ThreeDSTwoResult.ThreeDS2Result.DsTransID); - Assert.IsNotNull(ThreeDSTwoResult); - } - - private string GetAdditionalData(Dictionary additionalData, string assertKey) - { - string result = ""; - if (additionalData.ContainsKey(assertKey)) - { - result = additionalData[assertKey]; - } - return result; - } - } -} diff --git a/Adyen.Test/PaymentsApp/PaymentsAppServiceTest.cs b/Adyen.Test/PaymentsApp/PaymentsAppServiceTest.cs new file mode 100644 index 000000000..3553dd343 --- /dev/null +++ b/Adyen.Test/PaymentsApp/PaymentsAppServiceTest.cs @@ -0,0 +1,80 @@ +using Adyen.Core.Options; +using Adyen.PaymentsApp.Client; +using Adyen.PaymentsApp.Models; +using Adyen.PaymentsApp.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; +using Adyen.PaymentsApp.Services; + +namespace Adyen.Test.PaymentsApp +{ + [TestClass] + public class PaymentsAppTest + { + [TestMethod] + public async Task Given_PaymentsAppService_When_Initialized_Result_Should_Return_Management_Test_Url() + { + // Arrange + // Act + IHost testHost = Host.CreateDefaultBuilder() + .ConfigurePaymentsApp((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + var paymentsAppService = testHost.Services.GetRequiredService(); + + // Assert + Assert.AreEqual("https://management-test.adyen.com/v1", paymentsAppService.HttpClient.BaseAddress.ToString()); + } + + [TestMethod] + public void Given_PaymentsAppService_When_Initialized_Result_Should_Return_Management_Live_Url() + { + // Arrange + // Act + IHost testHost = Host.CreateDefaultBuilder() + .ConfigurePaymentsApp((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Live; + }); + }) + .Build(); + + var paymentsAppService = testHost.Services.GetRequiredService(); + + // Assert + Assert.AreEqual("https://management-live.adyen.com/v1", paymentsAppService.HttpClient.BaseAddress.ToString()); + } + + [TestMethod] + public void Given_PaymentsAppService_When_Initialized_Result_Should_Return_Management_Live_Url_And_No_Prefix() + { + // Arrange + // Act + IHost testHost = Host.CreateDefaultBuilder() + .ConfigurePaymentsApp((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Live; + options.LiveEndpointUrlPrefix = "prefix"; + }); + }) + .Build(); + + var paymentsAppService = testHost.Services.GetRequiredService(); + + // Assert + Assert.AreEqual("https://management-live.adyen.com/v1", paymentsAppService.HttpClient.BaseAddress.ToString()); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/PaymentsAppServiceTest.cs b/Adyen.Test/PaymentsAppServiceTest.cs deleted file mode 100644 index b9b412296..000000000 --- a/Adyen.Test/PaymentsAppServiceTest.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Net.Http; -using Adyen.Model; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using NSubstitute; -using Environment = Adyen.Model.Environment; - -namespace Adyen.Test -{ - [TestClass] - public class PaymentsAppServiceTest : BaseTest - { - [TestMethod] - public void PaymentsAppServiceTESTUrlTest() - { - var client = CreateMockForAdyenClientTest(new Config()); - client.SetEnvironment(Environment.Test, "companyUrl"); - var checkout = new PaymentsAppService(client); - checkout.RevokePaymentsAppAsync("{merchantId}", "{installationId}").GetAwaiter(); - - ClientInterfaceSubstitute.Received().RequestAsync("https://management-test.adyen.com/v1/merchants/{merchantId}/paymentsApps/{installationId}/revoke", - Arg.Any(), null, new HttpMethod("POST"), default); - } - - [TestMethod] - public void PaymentsAppServiceLIVEUrlTest() - { - var client = CreateMockForAdyenClientTest(new Config()); - client.SetEnvironment(Environment.Live, "companyUrl"); - var checkout = new PaymentsAppService(client); - checkout.RevokePaymentsAppAsync("{merchantId}", "{installationId}").GetAwaiter(); - - ClientInterfaceSubstitute.Received().RequestAsync("https://management-live.adyen.com/v1/merchants/{merchantId}/paymentsApps/{installationId}/revoke", - Arg.Any(), null, new HttpMethod("POST"), default); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/Payout/PayoutTest.cs b/Adyen.Test/Payout/PayoutTest.cs new file mode 100644 index 000000000..ac764d4c0 --- /dev/null +++ b/Adyen.Test/Payout/PayoutTest.cs @@ -0,0 +1,122 @@ +using Adyen.Core.Options; +using Adyen.Payout.Client; +using Adyen.Payout.Models; +using Adyen.Payout.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +namespace Adyen.Test +{ + [TestClass] + public class PayoutTest : BaseTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public PayoutTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigurePayout((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_StoreDetailAndSubmitThirdParty_Returns_Not_Null() + { + // Arrange + string client = TestUtilities.GetTestFileContent("mocks/payout/storeDetailAndSubmitThirdParty-success.json"); + + // Act + var response = JsonSerializer.Deserialize(client, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("[payout-submit-received]", response.ResultCode); + Assert.AreEqual("8515131751004933", response.PspReference); + Assert.AreEqual("GREEN", response.AdditionalData["fraudResultType"]); + Assert.AreEqual("false", response.AdditionalData["fraudManualReview"]); + } + + [TestMethod] + public async Task Given_Deserialize_When_StoreDetail_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/payout/storeDetail-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("Success", response.ResultCode); + Assert.AreEqual("8515136787207087", response.PspReference); + Assert.AreEqual("8415088571022720", response.RecurringDetailReference); + } + + [TestMethod] + public async Task Given_Deserialize_When_ConfirmThirdParty_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/payout/modifyResponse-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("[payout-confirm-received]", response.Response); + Assert.AreEqual("8815131762537886", response.PspReference); + } + + [TestMethod] + public async Task Given_Deserialize_When_SubmitThirdParty_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/payout/submitResponse-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("[payout-submit-received]", response.ResultCode); + Assert.AreEqual("8815131768219992", response.PspReference); + Assert.AreEqual("GREEN", response.AdditionalData["fraudResultType"]); + Assert.AreEqual("false", response.AdditionalData["fraudManualReview"]); + } + + [TestMethod] + public async Task Given_Deserialize_When_DeclineThirdParty_ModifyResponse_Then_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/payout/modifyResponse-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("[payout-confirm-received]", response.Response); + Assert.AreEqual("8815131762537886", response.PspReference); + } + + [TestMethod] + public async Task PayoutSuccessTest() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/payout/payout-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("8814689190961342", response.PspReference); + Assert.AreEqual("12345", response.AuthCode); + } + } +} + diff --git a/Adyen.Test/PayoutTest.cs b/Adyen.Test/PayoutTest.cs deleted file mode 100644 index 08ed3c12e..000000000 --- a/Adyen.Test/PayoutTest.cs +++ /dev/null @@ -1,88 +0,0 @@ -using Adyen.Model.Payout; -using Adyen.Service.Payout; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class PayoutTest : BaseTest - { - [TestMethod] - public void StoreDetailAndSubmitThirdPartySuccessTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/payout/storeDetailAndSubmitThirdParty-success.json"); - var payout = new InitializationService(client); - - var request = new StoreDetailAndSubmitRequest(); - var result = payout.StoreDetailAndSubmitThirdParty(request); - - Assert.AreEqual("[payout-submit-received]", result.ResultCode); - Assert.AreEqual("8515131751004933", result.PspReference); - Assert.AreEqual("GREEN", result.AdditionalData["fraudResultType"]); - Assert.AreEqual("false", result.AdditionalData["fraudManualReview"]); - } - - [TestMethod] - public void StoreDetailSuccessTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/payout/storeDetail-success.json"); - var payout = new InitializationService(client); - - var request = new StoreDetailRequest(); - var result = payout.StoreDetail(request); - - Assert.AreEqual("Success", result.ResultCode); - Assert.AreEqual("8515136787207087", result.PspReference); - Assert.AreEqual("8415088571022720", result.RecurringDetailReference); - } - - [TestMethod] - public void ConfirmThirdPartySuccessTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/payout/modifyResponse-success.json"); - var payout = new ReviewingService(client); - - var request = new ModifyRequest(); - var result = payout.ConfirmThirdParty(request); - - Assert.AreEqual("[payout-confirm-received]", result.Response); - Assert.AreEqual("8815131762537886", result.PspReference); - } - - [TestMethod] - public void SubmitThirdPartySuccessTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/payout/submitResponse-success.json"); - var payout = new InitializationService(client); - var request = new SubmitRequest(); - var result = payout.SubmitThirdParty(request); - Assert.AreEqual("[payout-submit-received]", result.ResultCode); - Assert.AreEqual("8815131768219992", result.PspReference); - Assert.AreEqual("GREEN", result.AdditionalData["fraudResultType"]); - Assert.AreEqual("false", result.AdditionalData["fraudManualReview"]); - } - - [TestMethod] - public void DeclineThirdPartySuccessTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/payout/modifyResponse-success.json"); - var payout = new ReviewingService(client); - var request = new ModifyRequest(); - var result = payout.DeclineThirdParty(request); - Assert.AreEqual("[payout-confirm-received]", result.Response); - Assert.AreEqual("8815131762537886", result.PspReference); - } - - [TestMethod] - public void PayoutSuccessTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/payout/payout-success.json"); - var payout = new InstantPayoutsService(client); - var request = new PayoutRequest(); - var result = payout.Payout(request); - Assert.AreEqual("8814689190961342", result.PspReference); - Assert.AreEqual("12345", result.AuthCode); - } - } -} - diff --git a/Adyen.Test/PosMobile/PosMobileTest.cs b/Adyen.Test/PosMobile/PosMobileTest.cs new file mode 100644 index 000000000..a47c88fac --- /dev/null +++ b/Adyen.Test/PosMobile/PosMobileTest.cs @@ -0,0 +1,45 @@ +using Adyen.Core.Options; +using Adyen.PosMobile.Models; +using Adyen.PosMobile.Client; +using Adyen.PosMobile.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +namespace Adyen.Test.PosMobile +{ + [TestClass] + public class PosMobileTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public PosMobileTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigurePosMobile((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_CreateSessionResponse_Returns_Correct_Id() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/posmobile/create-session.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Id, "CS451F2AB1ED897A94"); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/PosMobileTest.cs b/Adyen.Test/PosMobileTest.cs deleted file mode 100644 index fb038a8e8..000000000 --- a/Adyen.Test/PosMobileTest.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Net.Http; -using Adyen.Model.PosMobile; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using NSubstitute; -using Environment = Adyen.Model.Environment; - -namespace Adyen.Test -{ - [TestClass] - public class PosMobileTest : BaseTest - { - [TestMethod] - public void TestPosMobileCreateSession() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/posmobile/create-session.json"); - client.Config.Environment = Environment.Live; - client.Config.LiveEndpointUrlPrefix = "prefix"; - var service = new PosMobileService(client); - var response = service.CreateCommunicationSession(new CreateSessionRequest()); - Assert.AreEqual(response.Id, "CS451F2AB1ED897A94"); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://prefix-checkout-live.adyenpayments.com/checkout/possdk/v68/sessions", - Arg.Any(), null, new HttpMethod("POST"), default); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/PosTerminalManagementTest.cs b/Adyen.Test/PosTerminalManagementTest.cs deleted file mode 100644 index 6dc9c511b..000000000 --- a/Adyen.Test/PosTerminalManagementTest.cs +++ /dev/null @@ -1,131 +0,0 @@ -using System.Collections.Generic; -using Adyen.Model.PosTerminalManagement; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class PosTerminalManagementTest : BaseTest - { - /// - /// Test post /findTerminals - /// - [TestMethod] - public void FindTerminalSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/pos-terminal-management/find-terminals-success.json"); - var posTerminalManagement = new PosTerminalManagementService(client); - var findTerminalRequest = new FindTerminalRequest - { - Terminal = "V400m-123456789" - }; - var findTerminalResponse = posTerminalManagement.FindTerminal(findTerminalRequest); - Assert.AreEqual(findTerminalResponse.Terminal, "V400m-123456789"); - Assert.AreEqual(findTerminalResponse.CompanyAccount, "TestCompany"); - Assert.AreEqual(findTerminalResponse.MerchantAccount, "TestMerchant"); - Assert.AreEqual(findTerminalResponse.Store, "MyStore"); - Assert.AreEqual(findTerminalResponse.MerchantInventory, false); - } - /// - /// Test post /assignTerminals - /// - [TestMethod] - public void AssignTerminalsSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/pos-terminal-management/assing-terminals-success.json"); - var posTerminalManagement = new PosTerminalManagementService(client); - var assignTerminalsRequest = new AssignTerminalsRequest - { - MerchantAccount = "TestMerchant", - CompanyAccount = "TestMerchantAccount", - MerchantInventory = true, - Terminals = new List { "P400Plus-123456789" } - }; - var assignTerminalsResponse = posTerminalManagement.AssignTerminals(assignTerminalsRequest); - Assert.AreEqual(assignTerminalsResponse.Results["V400m-123456789"], "ActionScheduled"); - Assert.AreEqual(assignTerminalsResponse.Results["P400Plus-123456789"], "Done"); - } - - /// - /// Test post /getTerminalsUnderAccountResponse - /// - [TestMethod] - public void GetTerminalsUnderAccountSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/pos-terminal-management/get-terminals-under-account-success.json"); - var posTerminalManagement = new PosTerminalManagementService(client); - var getTerminalsUnderAccountRequest = new GetTerminalsUnderAccountRequest - { - CompanyAccount = "TestCompany", - }; - var getTerminalsUnderAccountResponse = posTerminalManagement.GetTerminalsUnderAccount(getTerminalsUnderAccountRequest); - Assert.AreEqual(getTerminalsUnderAccountResponse.CompanyAccount, "TestCompany"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[0]._MerchantAccount, "TestMerchantPOS_EU"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[1]._MerchantAccount, "TestMerchantPOS_US"); - Assert.AreEqual(getTerminalsUnderAccountResponse.InventoryTerminals[0], "V400m-123456789"); - Assert.AreEqual(getTerminalsUnderAccountResponse.InventoryTerminals[1], "P400Plus-123456789"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[0]._MerchantAccount, "TestMerchantPOS_EU"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[0].InventoryTerminals[0], "M400-123456789"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[0].InventoryTerminals[1], "VX820-123456789"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[0].InStoreTerminals[0], "E355-123456789"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[0].InStoreTerminals[1], "V240mPlus-123456789"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[0].Stores[0]._Store, "TestStore"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[0].Stores[0].InStoreTerminals[0], "MX925-123456789"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[1].InStoreTerminals[0], "VX820-123456789"); - Assert.AreEqual(getTerminalsUnderAccountResponse.MerchantAccounts[1].InStoreTerminals[1], "VX690-123456789"); - } - - /// - /// Test post /getTerminalDetails - /// - [TestMethod] - public void GetTerminalDetailsSuccess() - { - var client = - CreateMockTestClientApiKeyBasedRequestAsync( - "mocks/pos-terminal-management/get-terminals-details-success.json"); - var posTerminalManagement = new PosTerminalManagementService(client); - var getTerminalDetailsRequest = new GetTerminalDetailsRequest - { - Terminal = "P400Plus-275479597", - }; - var getTerminalDetailsResponse = - posTerminalManagement.GetTerminalDetails(getTerminalDetailsRequest); - Assert.AreEqual(getTerminalDetailsResponse.CompanyAccount, "YOUR_COMPANY_ACCOUNT"); - Assert.AreEqual(getTerminalDetailsResponse.MerchantAccount, "YOUR_MERCHANT_ACCOUNT"); - Assert.AreEqual(getTerminalDetailsResponse.MerchantInventory, false); - Assert.AreEqual(getTerminalDetailsResponse.Terminal, "P400Plus-275479597"); - Assert.AreEqual(getTerminalDetailsResponse.DeviceModel, "P400Plus"); - Assert.AreEqual(getTerminalDetailsResponse.SerialNumber, "275-479-597"); - Assert.AreEqual(getTerminalDetailsResponse.PermanentTerminalId, "12000000"); - Assert.AreEqual(getTerminalDetailsResponse.FirmwareVersion, "Verifone_VOS 1.50.7"); - Assert.AreEqual(getTerminalDetailsResponse.TerminalStatus, GetTerminalDetailsResponse.TerminalStatusEnum.ReAssignToInventoryPending); - Assert.AreEqual(getTerminalDetailsResponse.Country, "NETHERLANDS"); - Assert.AreEqual(getTerminalDetailsResponse.DhcpEnabled, false); - } - - /// - /// Test post /getStoresUnderAccount - /// - [TestMethod] - public void GetStoresUnderAccountSuccess() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync( - "mocks/pos-terminal-management/get-stores-under-account-success.json"); - var posTerminalManagement = new PosTerminalManagementService(client); - var getStoresUnderAccountSuccessRequest = new GetStoresUnderAccountRequest - { - CompanyAccount = "MockCompanyAccount", - MerchantAccount = "TestMerchantAccount", - }; - var getStoresUnderAccountSuccessResponse = - posTerminalManagement.GetStoresUnderAccount(getStoresUnderAccountSuccessRequest); - Assert.AreEqual(getStoresUnderAccountSuccessResponse.Stores[0].MerchantAccountCode, "YOUR_MERCHANT_ACCOUNT"); - Assert.AreEqual(getStoresUnderAccountSuccessResponse.Stores[0]._Store, "YOUR_STORE"); - Assert.AreEqual(getStoresUnderAccountSuccessResponse.Stores[0].Description, "YOUR_STORE"); - Assert.AreEqual(getStoresUnderAccountSuccessResponse.Stores[0].Status, "Active"); - - } - } -} diff --git a/Adyen.Test/ReadmeTest.cs b/Adyen.Test/ReadmeTest.cs deleted file mode 100644 index 414c693b9..000000000 --- a/Adyen.Test/ReadmeTest.cs +++ /dev/null @@ -1,43 +0,0 @@ -using Adyen; -using Adyen.Model.Checkout; -using Adyen.Service.Checkout; -using Environment = Adyen.Model.Environment; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class ReadmeTest - { - //Only test if compiles properly. It is not an integration test - [TestMethod] - public void PaymentTest() - { - var config = new Config() - { - XApiKey = "your-api-key", - Environment = Environment.Test - }; - var client = new Client(config); - var paymentsService = new PaymentsService(client); - var amount = new Model.Checkout.Amount("USD", 1000); - var cardDetails = new CardDetails - { - EncryptedCardNumber = "test_4111111111111111", - EncryptedSecurityCode = "test_737", - EncryptedExpiryMonth = "test_03", - EncryptedExpiryYear = "test_2030", - HolderName = "John Smith", - Type = CardDetails.TypeEnum.Card - }; - var paymentsRequest = new Model.Checkout.PaymentRequest - { - Reference = "Your order number ", - ReturnUrl = @"https://your-company.com/...", - MerchantAccount = "your-merchant-account", - Amount = amount, - PaymentMethod = new CheckoutPaymentMethod(cardDetails) - }; - } - } -} \ No newline at end of file diff --git a/Adyen.Test/Recurring/RecurringTest.cs b/Adyen.Test/Recurring/RecurringTest.cs new file mode 100644 index 000000000..c642b98df --- /dev/null +++ b/Adyen.Test/Recurring/RecurringTest.cs @@ -0,0 +1,126 @@ +using Adyen.Core.Options; +using Adyen.Recurring.Client; +using Adyen.Recurring.Models; +using Adyen.Recurring.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +namespace Adyen.Test.Recurring +{ + [TestClass] + public class RecurringTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public RecurringTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureRecurring((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_ListRecurringDetails_Result_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/recurring/listRecurringDetails-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(3L, response.Details.Count); + + Assert.AreEqual("BFXCHLC5L6KXWD82", response.Details[0].RecurringDetail.RecurringDetailReference); + Assert.AreEqual("K652534298119846", response.Details[0].RecurringDetail.Alias); + Assert.AreEqual("0002", response.Details[0].RecurringDetail.Card.Number); + + Assert.AreEqual("JW6RTP5PL6KXWD82", response.Details[1].RecurringDetail.RecurringDetailReference); + Assert.AreEqual("Wirecard", response.Details[1].RecurringDetail.Bank.BankName); + Assert.AreEqual("sepadirectdebit", response.Details[1].RecurringDetail.Variant); + } + + [TestMethod] + public async Task Given_Deserialize_When_Disable_Result_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/recurring/disable-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("[detail-successfully-disabled]", response.Response); + } + + [TestMethod] + public async Task Given_Deserialize_When_NotifyShopper_Result_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/recurring/notifyShopper-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("Example displayed reference", response.DisplayedReference); + Assert.AreEqual("8516167336214570", response.PspReference); + Assert.AreEqual("Request processed successfully", response.Message); + Assert.AreEqual("Example reference", response.Reference); + Assert.AreEqual("Success", response.ResultCode); + Assert.AreEqual("IA0F7500002462", response.ShopperNotificationReference); + } + + [TestMethod] + public async Task Given_Deserialize_When_CreatePermit_Result_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/recurring/createPermit-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("string", response.PspReference); + Assert.AreEqual(1, response.PermitResultList.Count); + } + + [TestMethod] + public async Task Given_Deserialize_When_DisablePermit_Result_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/recurring/disablePermit-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("string", response.PspReference); + Assert.AreEqual("disabled",response.Status); + } + + [TestMethod] + public async Task Given_Deserialize_When_ScheduleAccountUpdater_Result_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/recurring/scheduleAccountUpdater-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual("string", response.PspReference); + Assert.AreEqual("string", response.Result); + } + } +} diff --git a/Adyen.Test/RecurringTest.cs b/Adyen.Test/RecurringTest.cs deleted file mode 100644 index 101fc6fa2..000000000 --- a/Adyen.Test/RecurringTest.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System.Threading.Tasks; -using Adyen.Model.Recurring; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class RecurringTest : BaseTest - { - - [TestMethod] - public void TestListRecurringDetails() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/recurring/listRecurringDetails-success.json"); - var recurring = new Service.RecurringService(client); - var recurringDetailsRequest = CreateRecurringDetailsRequest(); - var recurringDetailsResult = recurring.ListRecurringDetails(recurringDetailsRequest); - Assert.AreEqual(3L, recurringDetailsResult.Details.Count); - var recurringDetail = recurringDetailsResult.Details[0].RecurringDetail; - - Assert.AreEqual("BFXCHLC5L6KXWD82", recurringDetail.RecurringDetailReference); - Assert.AreEqual("K652534298119846", recurringDetail.Alias); - Assert.AreEqual("0002", recurringDetail.Card.Number); - } - - [TestMethod] - public async Task TestListRecurringDetailsAsync() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/recurring/listRecurringDetails-success.json"); - var recurring = new Service.RecurringService(client); - var recurringDetailsRequest = CreateRecurringDetailsRequest(); - var recurringDetailsResult = await recurring.ListRecurringDetailsAsync(recurringDetailsRequest); - Assert.AreEqual(3L, recurringDetailsResult.Details.Count); - var recurringDetail = recurringDetailsResult.Details[1].RecurringDetail; - Assert.AreEqual("JW6RTP5PL6KXWD82", recurringDetail.RecurringDetailReference); - Assert.AreEqual("Wirecard", recurringDetail.Bank.BankName); - Assert.AreEqual("sepadirectdebit", recurringDetail.Variant); - } - - [TestMethod] - public void TestDisable() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/recurring/disable-success.json"); - var recurring = new Service.RecurringService(client); - var disableRequest = CreateDisableRequest(); - var disableResult = recurring.Disable(disableRequest); - Assert.AreEqual("[detail-successfully-disabled]", disableResult.Response); - } - - [TestMethod] - public async Task TestDisableAsync() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/recurring/disable-success.json"); - var recurring = new Service.RecurringService(client); - var disableRequest = CreateDisableRequest(); - var disableResult = await recurring.DisableAsync(disableRequest); - Assert.AreEqual("[detail-successfully-disabled]", disableResult.Response); - } - - [TestMethod] - public void NotifyShopperTest() - { - Client client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/recurring/notifyShopper-success.json"); - var recurring = new Service.RecurringService(client); - NotifyShopperRequest request = CreateNotifyShopperRequest(); - NotifyShopperResult result = recurring.NotifyShopper(request); - Assert.IsNotNull(result); - Assert.AreEqual("Example displayed reference", result.DisplayedReference); - Assert.AreEqual("8516167336214570", result.PspReference); - Assert.AreEqual("Request processed successfully", result.Message); - Assert.AreEqual("Example reference", result.Reference); - Assert.AreEqual("Success", result.ResultCode); - Assert.AreEqual("IA0F7500002462", result.ShopperNotificationReference); - } - - [TestMethod] - public void CreatePermitTest() - { - Client client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/recurring/createPermit-success.json"); - var recurring = new Service.RecurringService(client); - var createPermitResult = recurring.CreatePermit(new CreatePermitRequest()); - Assert.IsNotNull(createPermitResult); - Assert.AreEqual("string", createPermitResult.PspReference); - Assert.AreEqual(1,createPermitResult.PermitResultList.Count); - } - - [TestMethod] - public void DisablePermitTest() - { - Client client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/recurring/disablePermit-success.json"); - var recurring = new Service.RecurringService(client); - var disablePermitResult = recurring.DisablePermit(new DisablePermitRequest()); - Assert.IsNotNull(disablePermitResult); - Assert.AreEqual("string", disablePermitResult.PspReference); - Assert.AreEqual("disabled",disablePermitResult.Status); - } - - [TestMethod] - public void ScheduleAccountUpdaterTest() - { - Client client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/recurring/scheduleAccountUpdater-success.json"); - var recurring = new Service.RecurringService(client); - var scheduleAccountUpdaterResult = recurring.ScheduleAccountUpdater(new ScheduleAccountUpdaterRequest()); - Assert.IsNotNull(scheduleAccountUpdaterResult); - Assert.AreEqual("string", scheduleAccountUpdaterResult.PspReference); - Assert.AreEqual("string",scheduleAccountUpdaterResult.Result); - } - - private RecurringDetailsRequest CreateRecurringDetailsRequest() - { - var request = new RecurringDetailsRequest - { - ShopperReference = "test-123", - MerchantAccount = "DotNetAlexandros", - Recurring = new Recurring(Recurring.ContractEnum.RECURRING) - }; - return request; - } - - private DisableRequest CreateDisableRequest() - { - var request = new DisableRequest - { - ShopperReference = "test-123", - MerchantAccount = "DotNetAlexandros" - }; - return request; - } - - private NotifyShopperRequest CreateNotifyShopperRequest() - { - return new NotifyShopperRequest - { - MerchantAccount = "TestMerchant", - RecurringDetailReference = "8316158654144897", - Reference = "Example reference", - ShopperReference = "1234567", - BillingDate = "2021-03-31", - DisplayedReference = "Example displayed reference" - }; - } - } -} diff --git a/Adyen.Test/SerializerTest.cs b/Adyen.Test/SerializerTest.cs deleted file mode 100644 index 26819b1c5..000000000 --- a/Adyen.Test/SerializerTest.cs +++ /dev/null @@ -1,255 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Adyen.ApiSerialization; -using Adyen.Constants; -using Adyen.Model.Checkout; -using Adyen.Model.Terminal; -using Adyen.Model.TerminalApi; -using Adyen.Model.TerminalApi.Message; -using Adyen.Security; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using ApplicationInfo = Adyen.Model.ApplicationInformation.ApplicationInfo; -using CommonField = Adyen.Model.ApplicationInformation.CommonField; -using PaymentRequest = Adyen.Model.TerminalApi.PaymentRequest; -using PaymentResponse = Adyen.Model.TerminalApi.PaymentResponse; - -namespace Adyen.Test -{ - [TestClass] - public class SerializerTest - { - [TestMethod] - public void SerializeByteArrayTest() - { - var plainTextBytes = Encoding.ASCII.GetBytes("Bytes-To-Be-Encoded"); - string base64String = System.Convert.ToBase64String(plainTextBytes); - var base64Bytes = Encoding.ASCII.GetBytes(base64String); - var threeDSecure = new ThreeDSecureData - { - Cavv = base64Bytes, - Xid = base64Bytes - }; - var jsonRequest = Util.JsonOperation.SerializeRequest(threeDSecure); - var json = "{\"cavv\":\"Qnl0ZXMtVG8tQmUtRW5jb2RlZA==\",\"xid\":\"Qnl0ZXMtVG8tQmUtRW5jb2RlZA==\"}"; - Assert.AreEqual(json, jsonRequest); - } - - [TestMethod] - public void DeserializeByteArrayTest() - { - var json = "{\"cavv\":\"Qnl0ZXMtVG8tQmUtRW5jb2RlZA==\",\"xid\":\"Qnl0ZXMtVG8tQmUtRW5jb2RlZA==\"}"; - var jsonRequest = Util.JsonOperation.Deserialize(json); - var xid = Encoding.ASCII.GetString(jsonRequest.Xid); - var cavv = Encoding.ASCII.GetString(jsonRequest.Cavv); - var jsonElementBase64 = "Qnl0ZXMtVG8tQmUtRW5jb2RlZA=="; - Assert.AreEqual(jsonElementBase64, xid); - Assert.AreEqual(jsonElementBase64, cavv); - } - - [TestMethod] - public void EnumSerializerTest() - { - var saleToPoiMessageSerializer = new SaleToPoiMessageSerializer(); - var saleToMessageOnLine = saleToPoiMessageSerializer.Deserialize(GetSaleToPoiMessage("OnlinePin")); - var saleToMessageOnline = saleToPoiMessageSerializer.Deserialize(GetSaleToPoiMessage("OnLinePin")); - var paymentResponseOnLine = (PaymentResponse)saleToMessageOnLine.MessagePayload; - var paymentResponseOnline = (PaymentResponse)saleToMessageOnline.MessagePayload; - Assert.AreEqual(paymentResponseOnline.PaymentResult.AuthenticationMethod[0], AuthenticationMethodType.OnLinePIN); - Assert.AreEqual(paymentResponseOnLine.PaymentResult.AuthenticationMethod[0], AuthenticationMethodType.OnLinePIN); - } - - [TestMethod] - public void CheckoutLongSerializationTest() - { - var checkoutSessionRequest = new CreateCheckoutSessionRequest - { - MerchantAccount = "merchantAccount", - Reference = "TestReference", - ReturnUrl = "http://test-url.com", - Amount = new Model.Checkout.Amount("EUR", 10000L), - Channel = CreateCheckoutSessionRequest.ChannelEnum.Web, - CountryCode = "NL", - LineItems = new List() - { - new LineItem(quantity: 1, amountIncludingTax: 5000, description: "description1", - amountExcludingTax: 0), - new LineItem(quantity: 1, amountIncludingTax: 5000, description: "description2", taxAmount: 0) - } - }.ToJson(); - // Assert that Long parameters set to zero are actually serialised (just like Int) - Assert.IsTrue(checkoutSessionRequest.Contains("amountExcludingTax\": 0,")); - Assert.IsTrue(checkoutSessionRequest.Contains("taxAmount\": 0")); - } - - [TestMethod] - public void CheckoutSessionResponseCheckForIdTest() - { - var sessionResponse = @"{""mode"": ""embedded"",""amount"": {""currency"": ""EUR"",""value"": 10000},""expiresAt"": ""2023-04-06T17:11:15+02:00"",""id"": ""CS0068299CB8DA273A"",""merchantAccount"": ""TestMerchantAccount"",""reference"": ""TestReference"",""returnUrl"": ""http://test-url.com"",""sessionData"": ""Ab02b4c0!BQABAgBoacRJuRbNM/typUKATopkZ3V+cINm0WTAvwl9uQJ2e8I00P2KFemlwp4nb1bOqqYh1zx48gDAHt0QDs2JTiQIqDQRizqopLFRk/wAJHFoCuam/GvOHflg9vwS3caHbkBToIolxcYcJoJheIN9o1fGmNIHZb9VrWfiKsXMgmYsSUifenayS2tkKCTquF7vguaAwk7q5ES1GDwzP/J2mChJGH04jGrVL4szPHGmznr897wIcFQyBSZe4Uifqoe0fpiIxZLNWadLMya6SnvQYNAQL1V6ti+7F4wHHyLwHWTCua993sttue70TE4918EV80HcAWx0LE1+uW6J5KBHCKdYNi9ESlGSZreRwLCpdNbmumB6MlyHZlz2umLiw0ZZJAEpdrwXA2NiyHzJDKDKfbAhd8uoTSACrbgwbrAXI1cvb1WjiOQjLn9MVW++fuJCq6vIeX+rUKMeltBAHMeBZyC54ndAucw9nS03uyckjphunE4tl4WTT475VkfUiyJCTT3S2IOVYS9V9M8pMQ1/GlDVNCLBJJfrYlVXoC8VX68QW1HERkhNYQbTgLQ9kI3cDeMP5d4TuUL3XR2Q6sNiOMdIPGDYQ9QFKFdOE3OQ5X9wxUYbX6j88wR2gRGJcS5agqFHOR1ZTNrjumOYrEkjL8ehFXEs/KluhURllfi0POUPGAwlUWBjDCZcKaeeR0kASnsia2V5IjoiQUYwQUFBMTAzQ0E1MzdFQUVEODdDMjRERDUzOTA5QjgwQTc4QTkyM0UzODIzRDY4REFDQzk0QjlGRjgzMDVEQyJ9E0Gs1T0RaO7NluuXP59fegcW6SQKq4BhC3ZzEKPm1vJuwAJ2gZUaicaXbRPW3IyadavKRlfGdFeAYt2B3ik8fGiK3ZkKU0CrZ0qL0IO5rrWrOg74HMnpxRAn1RhAHRHfGEk67FFPNjr0aLBJXSia7xZWiyKA+i4QU63roY2sxMI/q41mvJjRUz0rPKT3SbVDt1Of7K7BP8cmiboBkWexFBD/mkJyMOpYAOoFp/tKOUHTWZYcc1GpbyV1jInXVfEUhHROYCtS4p/xwF6DdT3bI0+HRU35/xNBTZH2yJN55u9i42Vb0ddCyhzOLZYQ3JVgglty6hLgVeQzuN4b2MoalhfTl11HsElJT1kB0mznVX8CL7UMTUp/2uSgL8DN6kB4owEZ45nWRxIR/2sCidMJ1tnSI1uSqkeqXRf1vat5qPq+BzpYE0Urn2ZZEmgJyb2u0ZLn2x1tfJyPtv+hqBoT7iqJ224dSbuB4HMT49YtcheUtR0jnrImJXm+M1TeIjWB3XWOScrNV8sWEJMAiIU="",""shopperLocale"": ""en-US""}"; - // Assert that readonly parameters like ID are actually deserialised and can be serialised again. - var deserializedResponse = JsonConvert.DeserializeObject(sessionResponse); - Assert.IsNotNull(deserializedResponse.Id); - Assert.IsTrue(deserializedResponse.ToJson().Contains("\"id\": \"CS0068299CB8DA273A\",")); - } - - [TestMethod] - public void SaleToPoiMessageSerializationTest() - { - SaleToPOIRequest saleToPoiMessage = CreatePosPaymentRequest(); - string serialized = SerializeSaleToPoiMessage(saleToPoiMessage); - Assert.AreEqual(serialized, ExpectedSaleToPoiMessageJson); - } - - [TestMethod] - public void SaleToPoiMessageWithUpdatedJsonConvertDefaultSettingsSerializationTest() - { - SaleToPOIRequest saleToPoiMessage = CreatePosPaymentRequest(); - - JsonConvert.DefaultSettings = () => new JsonSerializerSettings - { - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy() - } - }; - - string serialized = SerializeSaleToPoiMessage(saleToPoiMessage); - try - { - Assert.AreEqual(serialized, ExpectedSaleToPoiMessageJson); - } - finally - { - JsonConvert.DefaultSettings = null; - } - } - - [TestMethod] - public void SaleToPoiMessageSecuredSerializationTest() - { - SaleToPOIRequest saleToPoiMessage = CreatePosPaymentRequest(); - string serialized = SerializeSaleToPoiMessageSecured(saleToPoiMessage); - Assert.AreEqual(serialized, ExpectedSaleToPoiMessageSecuredJson); - } - - [TestMethod] - public void SaleToPoiMessageSecuredWithUpdatedJsonConvertDefaultSettingsSerializationTest() - { - SaleToPOIRequest saleToPoiMessage = CreatePosPaymentRequest(); - - JsonConvert.DefaultSettings = () => new JsonSerializerSettings - { - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy() - } - }; - - try - { - string serialized = SerializeSaleToPoiMessageSecured(saleToPoiMessage); - - Assert.AreEqual(serialized, ExpectedSaleToPoiMessageSecuredJson); - } - finally - { - JsonConvert.DefaultSettings = null; - } - } - - private static string GetSaleToPoiMessage(string online) - { - return "{\"SaleToPOIResponse\": {\"PaymentResponse\": {\"POIData\": {},\"PaymentResult\": {\"AuthenticationMethod\": [\"" + online + "\"],\"PaymentAcquirerData\": {\"AcquirerPOIID\": \"MX925-260390740\",\"MerchantID\": \"PME_POS\"},\"PaymentType\": \"Normal\"},\"Response\": {\"Result\": \"Success\"}},\"MessageHeader\": {\"ProtocolVersion\": \"3.0\",\"SaleID\": \"Appie\",\"MessageClass\": \"Service\",\"MessageCategory\": \"Payment\",\"ServiceID\": \"20095135\",\"POIID\": \"MX925-260390740\",\"MessageType\": \"Response\"}}}"; - } - - private static string SerializeSaleToPoiMessage(SaleToPOIMessage saleToPoiMessage) - { - var saleToPoiMessageSerializer = new SaleToPoiMessageSerializer(); - return saleToPoiMessageSerializer.Serialize(saleToPoiMessage); - } - - private static string SerializeSaleToPoiMessageSecured(SaleToPOIMessage saleToPoiMessage) - { - var saleToPoiMessageSerializer = new SaleToPoiMessageSerializer(); - var serializedSaleToPoiMessage = saleToPoiMessageSerializer.Serialize(saleToPoiMessage); - - var encryptionCredentialDetails = new EncryptionCredentialDetails - { - AdyenCryptoVersion = 1, - KeyVersion = 1, - KeyIdentifier = "CryptoKeyIdentifier12345", - Password = "p@ssw0rd123456" - }; - var messageSecuredEncryptor = new SaleToPoiMessageSecuredEncryptor(); - var saleToPoiMessageSecured = messageSecuredEncryptor.Encrypt( - serializedSaleToPoiMessage, - saleToPoiMessage.MessageHeader, - encryptionCredentialDetails); - - // Clear SecurityTrailer.Nonce and NexoBlob as they are randomly generated every run - saleToPoiMessageSecured.NexoBlob = null; - saleToPoiMessageSecured.SecurityTrailer.Nonce = null; - - return saleToPoiMessageSerializer.Serialize(saleToPoiMessageSecured); - } - - /// - /// Returns a POS Payment Request for our serialization tests. - /// Hardcode the version so that we can test the hardcoded hmac (after encryption) and SaleToAcquirerData: - /// and can be - /// . - /// - private static SaleToPOIRequest CreatePosPaymentRequest() - { - ApplicationInfo applicationInfo = new ApplicationInfo(); - applicationInfo.AdyenLibrary.Version = "26.1.0"; - - return new SaleToPOIRequest - { - MessageHeader = new MessageHeader - { - MessageType = MessageType.Request, - MessageClass = MessageClassType.Service, - MessageCategory = MessageCategoryType.Payment, - SaleID = "POSSystemID12345", - POIID = "MX915-284251016", - ServiceID = "12345678" - }, - MessagePayload = new PaymentRequest - { - SaleData = new SaleData - { - SaleToAcquirerData = new SaleToAcquirerData() - { - ApplicationInfo = applicationInfo - }, - SaleTransactionID = new TransactionIdentification - { - TransactionID = "PosAuth", - TimeStamp = new DateTime(2025, 1, 1) - }, - TokenRequestedType = TokenRequestedType.Customer, - }, - PaymentTransaction = new PaymentTransaction - { - AmountsReq = new AmountsReq - { - Currency = "EUR", - RequestedAmount = 10100 - } - }, - PaymentData = new PaymentData - { - PaymentType = PaymentType.Normal - } - } - }; - } - - private static string ExpectedSaleToPoiMessageJson => @"{""SaleToPOIRequest"":{""MessageHeader"":{""MessageClass"":""Service"",""MessageCategory"":""Payment"",""MessageType"":""Request"",""ServiceID"":""12345678"",""SaleID"":""POSSystemID12345"",""POIID"":""MX915-284251016"",""ProtocolVersion"":""3.0""},""PaymentRequest"":{""SaleData"":{""SaleTransactionID"":{""TransactionID"":""PosAuth"",""TimeStamp"":""2025-01-01T00:00:00""},""SaleToAcquirerData"":""eyJhcHBsaWNhdGlvbkluZm8iOnsiYWR5ZW5MaWJyYXJ5Ijp7Im5hbWUiOiJhZHllbi1kb3RuZXQtYXBpLWxpYnJhcnkiLCJ2ZXJzaW9uIjoiMjYuMS4wIn19fQ=="",""TokenRequestedType"":""Customer""},""PaymentTransaction"":{""AmountsReq"":{""Currency"":""EUR"",""RequestedAmount"":10100.0}},""PaymentData"":{""PaymentType"":""Normal""}}}}"; - - private static string ExpectedSaleToPoiMessageSecuredJson => @"{""SaleToPOIRequest"":{""MessageHeader"":{""MessageClass"":""Service"",""MessageCategory"":""Payment"",""MessageType"":""Request"",""ServiceID"":""12345678"",""SaleID"":""POSSystemID12345"",""POIID"":""MX915-284251016"",""ProtocolVersion"":""3.0""},""NexoBlob"":null,""SecurityTrailer"":{""AdyenCryptoVersion"":1,""KeyIdentifier"":""CryptoKeyIdentifier12345"",""KeyVersion"":1,""Hmac"":""mBUD3BeMrloo5aPlwUCFIa87YW8hY9/i3AcrOa2qbhk=""}}}"; - } -} diff --git a/Adyen.Test/StoredValue/StoredValueTest.cs b/Adyen.Test/StoredValue/StoredValueTest.cs new file mode 100644 index 000000000..95a9f4286 --- /dev/null +++ b/Adyen.Test/StoredValue/StoredValueTest.cs @@ -0,0 +1,116 @@ +using Adyen.Core.Options; +using Adyen.StoredValue.Client; +using Adyen.StoredValue.Models; +using Adyen.StoredValue.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +namespace Adyen.Test.StoredValue +{ + [TestClass] + public class StoredValueTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public StoredValueTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureStoredValue((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_StoredValueIssue_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/storedvalue/issue-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.ResultCode, StoredValueIssueResponse.ResultCodeEnum.Success); + Assert.AreEqual(response.AuthCode, "authCode"); + } + + [TestMethod] + public async Task Given_Deserialize_When_ChangeStatus_StoredValueStatusChange_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/storedvalue/changeStatus-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.ResultCode, StoredValueStatusChangeResponse.ResultCodeEnum.Refused); + Assert.AreEqual(response.AuthCode, "authCode"); + } + + [TestMethod] + public async Task Given_Deserialize_When_StoredValueLoad_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/storedvalue/load-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.ResultCode, StoredValueLoadResponse.ResultCodeEnum.Success); + Assert.AreEqual(response.AuthCode, "authCode"); + } + + [TestMethod] + public async Task Given_Deserialize_When_StoredValueBalanceCheck_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/storedvalue/checkBalance-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.ResultCode, StoredValueBalanceCheckResponse.ResultCodeEnum.Success); + Assert.AreEqual(response.CurrentBalance.Value, 0); + } + + [TestMethod] + public async Task Given_Deserialize_When_StoredValueBalanceMerge_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/storedvalue/mergeBalance-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.ResultCode, StoredValueBalanceMergeResponse.ResultCodeEnum.Success); + Assert.AreEqual(response.CurrentBalance.Value, 0); + } + + [TestMethod] + public async Task Given_Deserialize_When_StoredValueVoid_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/storedvalue/mergeBalance-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.ResultCode, StoredValueVoidResponse.ResultCodeEnum.Success); + Assert.AreEqual(response.CurrentBalance.Value, 0); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/StoredValueTest.cs b/Adyen.Test/StoredValueTest.cs deleted file mode 100644 index cb0f0e3d3..000000000 --- a/Adyen.Test/StoredValueTest.cs +++ /dev/null @@ -1,70 +0,0 @@ -using Adyen.Model.StoredValue; -using Adyen.Service; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test -{ - [TestClass] - public class StoredValueTest : BaseTest - { - [TestMethod] - public void StoredValueIssueTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/storedvalue/issue-success.json"); - var service = new StoredValueService(client); - var response = service.Issue(new StoredValueIssueRequest()); - Assert.AreEqual(response.ResultCode, StoredValueIssueResponse.ResultCodeEnum.Success); - Assert.AreEqual(response.AuthCode, "authCode"); - } - - [TestMethod] - public void StoredValueChangeStatusTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/storedvalue/changeStatus-success.json"); - var service = new StoredValueService(client); - var response = service.ChangeStatus(new StoredValueStatusChangeRequest()); - Assert.AreEqual(response.ResultCode, StoredValueStatusChangeResponse.ResultCodeEnum.Refused); - Assert.AreEqual(response.AuthCode, "authCode"); - } - - [TestMethod] - public void StoredValueLoadTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/storedvalue/load-success.json"); - var service = new StoredValueService(client); - var response = service.Load(new StoredValueLoadRequest()); - Assert.AreEqual(response.ResultCode, StoredValueLoadResponse.ResultCodeEnum.Success); - Assert.AreEqual(response.AuthCode, "authCode"); - } - - [TestMethod] - public void StoredValueCheckBalanceTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/storedvalue/checkBalance-success.json"); - var service = new StoredValueService(client); - var response = service.CheckBalance(new StoredValueBalanceCheckRequest()); - Assert.AreEqual(response.ResultCode, StoredValueBalanceCheckResponse.ResultCodeEnum.Success); - Assert.AreEqual(response.CurrentBalance.Value, 0); - } - - [TestMethod] - public void StoredValueMergeBalanceTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/storedvalue/mergeBalance-success.json"); - var service = new StoredValueService(client); - var response = service.MergeBalance(new StoredValueBalanceMergeRequest()); - Assert.AreEqual(response.ResultCode, StoredValueBalanceMergeResponse.ResultCodeEnum.Success); - Assert.AreEqual(response.CurrentBalance.Value, 0); - } - - [TestMethod] - public void StoredValueVoidTransactionTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/storedvalue/mergeBalance-success.json"); - var service = new StoredValueService(client); - var response = service.VoidTransactionAsync(new StoredValueVoidRequest()).Result; - Assert.AreEqual(response.ResultCode, StoredValueVoidResponse.ResultCodeEnum.Success); - Assert.AreEqual(response.CurrentBalance.Value, 0); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/TerminalApi/BaseTest.cs b/Adyen.Test/TerminalApi/BaseTest.cs new file mode 100644 index 000000000..7c1911280 --- /dev/null +++ b/Adyen.Test/TerminalApi/BaseTest.cs @@ -0,0 +1,413 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Net.Http; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Adyen.Constants; +using Adyen.HttpClient.Interfaces; +using Adyen.Model; +using Adyen.Model.TerminalApi; +using Adyen.Model.Payment; +using Adyen.Service; +using NSubstitute; +using Amount = Adyen.Model.Checkout; +using Environment = System.Environment; +using PaymentResult = Adyen.Model.Payment.PaymentResult; + +namespace Adyen.Test +{ + public class BaseTest + { + private protected IClient ClientInterfaceSubstitute; + + #region Modification objects + + protected CaptureRequest CreateCaptureTestRequest(string pspReference) + { + var captureRequest = new CaptureRequest + { + MerchantAccount = "MerchantAccount", + ModificationAmount = new Model.Payment.Amount("EUR", 150), + Reference = "capture - " + DateTime.Now.ToString("yyyyMMdd"), + OriginalReference = pspReference, + AdditionalData = new Dictionary {{"authorisationType", "PreAuth"}} + }; + return captureRequest; + } + + + protected CancelOrRefundRequest CreateCancelOrRefundTestRequest(string pspReference) + { + var cancelOrRefundRequest = new CancelOrRefundRequest + { + MerchantAccount = "MerchantAccount", + Reference = "cancelOrRefund - " + DateTime.Now.ToString("yyyyMMdd"), + OriginalReference = pspReference + }; + return cancelOrRefundRequest; + } + + protected RefundRequest CreateRefundTestRequest(string pspReference) + { + var refundRequest = new RefundRequest + { + MerchantAccount = "MerchantAccount", + ModificationAmount = new Model.Payment.Amount("EUR", 150), + Reference = "refund - " + DateTime.Now.ToString("yyyyMMdd"), + OriginalReference = pspReference + }; + return refundRequest; + } + + protected CancelRequest CreateCancelTestRequest(string pspReference) + { + var cancelRequest = new CancelRequest + { + MerchantAccount = "MerchantAccount", + Reference = "cancel - " + DateTime.Now.ToString("yyyyMMdd"), + OriginalReference = pspReference + }; + return cancelRequest; + } + + protected AdjustAuthorisationRequest CreateAdjustAuthorisationRequest(string pspReference) + { + var adjustAuthorisationRequest = new AdjustAuthorisationRequest + { + MerchantAccount = "MerchantAccount", + ModificationAmount = new Model.Payment.Amount("EUR", 150), + Reference = "adjustAuthorisationRequest - " + DateTime.Now.ToString("yyyyMMdd"), + OriginalReference = pspReference, + }; + return adjustAuthorisationRequest; + } + #endregion + + #region Checkout + /// + /// Check out payment request + /// + /// + /// + public Model.Checkout.PaymentRequest CreatePaymentRequestCheckout() + { + var amount = new Model.Checkout.Amount("USD", 1000); + var paymentsRequest = new Model.Checkout.PaymentRequest + { + Reference = "Your order number ", + ReturnUrl = @"https://your-company.com/...", + MerchantAccount = "MerchantAccount", + CaptureDelayHours = 0 + }; + var cardDetails = new Amount.CardDetails + { + Number = "4111111111111111", + ExpiryMonth = "10", + ExpiryYear = "2020", + HolderName = "John Smith" + }; + paymentsRequest.Amount = amount; + paymentsRequest.PaymentMethod = new Amount.CheckoutPaymentMethod(cardDetails); + paymentsRequest.ApplicationInfo = new Model.Checkout.ApplicationInfo(adyenLibrary: new Amount.CommonField()); + return paymentsRequest; + } + + + /// + /// 3DS2 payments request + /// + /// + public Model.Checkout.PaymentRequest CreatePaymentRequest3DS2() + { + var amount = new Model.Checkout.Amount("USD", 1000); + var paymentsRequest = new Model.Checkout.PaymentRequest + { + Reference = "Your order number ", + Amount = amount, + ReturnUrl = @"https://your-company.com/...", + MerchantAccount = "MerchantAccount", + Channel = Model.Checkout.PaymentRequest.ChannelEnum.Web + }; + var cardDetails = new Amount.CardDetails + { + Number = "4111111111111111", + ExpiryMonth = "10", + ExpiryYear = "2020", + HolderName = "John Smith" + }; + paymentsRequest.PaymentMethod = new Amount.CheckoutPaymentMethod(cardDetails); + return paymentsRequest; + } + + /// + ///Checkout Details request + /// + /// Returns a sample PaymentsDetailsRequest object with test data + protected Amount.PaymentDetailsRequest CreateDetailsRequest() + { + var paymentData = "Ab02b4c0!BQABAgCJN1wRZuGJmq8dMncmypvknj9s7l5Tj..."; + var details = new Amount.PaymentCompletionDetails + { + MD= "sdfsdfsdf...", + PaReq = "sdfsdfsdf..." + }; + var paymentsDetailsRequest = new Amount.PaymentDetailsRequest(details: details, paymentData: paymentData); + + return paymentsDetailsRequest; + } + + /// + /// Checkout paymentMethodsRequest + /// + /// + protected Amount.PaymentMethodsRequest CreatePaymentMethodRequest(string merchantAccount) + { + return new Amount.PaymentMethodsRequest(merchantAccount: merchantAccount); + } + + #endregion + + /// + /// Creates mock test client without any response + /// + /// IClient implementation + protected Client CreateMockForAdyenClientTest(Config config) + { + //Create a mock interface + ClientInterfaceSubstitute = Substitute.For(); + + ClientInterfaceSubstitute.RequestAsync(Arg.Any(), + Arg.Any(), Arg.Any(), Arg.Any(), + Arg.Any()).Returns(Task.FromResult("")); + + var clientMock = new Client(config) + { + HttpClient = ClientInterfaceSubstitute, + Config = config + }; + return clientMock; + } + + /// + /// Creates mock test client + /// + /// The file that is returned + /// IClient implementation + protected Client CreateMockTestClientRequest(string fileName) + { + var mockPath = GetMockFilePath(fileName); + var response = MockFileToString(mockPath); + + ClientInterfaceSubstitute = Substitute.For(); + + ClientInterfaceSubstitute.RequestAsync(Arg.Any(), + Arg.Any(), Arg.Any(), Arg.Any(), + Arg.Any()).Returns(response); + + var config = new Config + { + Environment = Model.Environment.Test + }; + var clientMock = new Client(config) + { + HttpClient = ClientInterfaceSubstitute, + Config = new Config + { + Username = "Username", + Password = "Password", + ApplicationName = "Appname" + } + }; + return clientMock; + } + + /// + /// Creates mock test client + /// + /// The file that is returned + /// IClient implementation + protected Client CreateMockTestClientApiKeyBasedRequestAsync(string fileName) + { + var mockPath = GetMockFilePath(fileName); + var response = MockFileToString(mockPath); + //Create a mock interface + ClientInterfaceSubstitute = Substitute.For(); + + ClientInterfaceSubstitute.RequestAsync(Arg.Any(), + Arg.Any(), Arg.Any(), Arg.Any(), + Arg.Any()).Returns(response); + var config = new Config + { + Environment = Model.Environment.Test + }; + var clientMock = new Client(config) + { + HttpClient = ClientInterfaceSubstitute, + Config = new Config + { + Username = "Username", + Password = "Password", + ApplicationName = "Appname" + } + }; + return clientMock; + } + + /// + /// Creates async mock test client + /// + /// The file that is returned + /// IClient implementation + protected Client CreateAsyncMockTestClientApiKeyBasedRequest(string fileName) + { + var mockPath = GetMockFilePath(fileName); + var response = MockFileToString(mockPath); + + var configWithApiKey = new Config + { + Environment = Model.Environment.Test, + XApiKey = "AQEyhmfxK....LAG84XwzP5pSpVd" + }; + + ClientInterfaceSubstitute = Substitute.For(); + + ClientInterfaceSubstitute.RequestAsync(Arg.Any(), + Arg.Any(), Arg.Any(), Arg.Any(), + Arg.Any()).Returns(response); + + var config = new Config + { + Environment = Model.Environment.Test + }; + var clientMock = new Client(config) + { + HttpClient = ClientInterfaceSubstitute, + Config = configWithApiKey + }; + return clientMock; + } + + /// + /// Creates mock test client for POS cloud. In case of cloud api the xapi should be included + /// + /// The file that is returned + /// IClient implementation + protected Client CreateMockTestClientPosCloudApiRequest(string fileName) + { + var config = new Config { CloudApiEndPoint = ClientConfig.CloudApiEndPointTest }; + var mockPath = GetMockFilePath(fileName); + var response = MockFileToString(mockPath); + + //Create a mock interface + ClientInterfaceSubstitute = Substitute.For(); + + ClientInterfaceSubstitute.Request(Arg.Any(), + Arg.Any(), Arg.Any(), Arg.Any()).Returns(response); + + ClientInterfaceSubstitute.RequestAsync(Arg.Any(), + Arg.Any(), Arg.Any(), Arg.Any()).Returns(Task.FromResult(response)); + + var anyConfig = new Config + { + Environment = Model.Environment.Test + }; + var clientMock = new Client(anyConfig) + { + HttpClient = ClientInterfaceSubstitute, + Config = config + }; + return clientMock; + } + + /// + /// Creates mock test client for terminal api. + /// + /// The file that is returned + /// IClient implementation + protected Client CreateMockTestClientPosLocalApiRequest(string fileName) + { + var config = new Config + { + Environment = Model.Environment.Test, + LocalTerminalApiEndpoint = @"https://_terminal_:8443/nexo/" + }; + var mockPath = GetMockFilePath(fileName); + var response = MockFileToString(mockPath); + //Create a mock interface + ClientInterfaceSubstitute = Substitute.For(); + + ClientInterfaceSubstitute.Request(Arg.Any(), + Arg.Any(), Arg.Any(), Arg.Any()).Returns(response); + + ClientInterfaceSubstitute.RequestAsync(Arg.Any(), + Arg.Any(), Arg.Any(), Arg.Any()).Returns(Task.FromResult(response)); + + + var anyConfig = new Config + { + Environment = Model.Environment.Test + }; + var clientMock = new Client(anyConfig) + { + HttpClient = ClientInterfaceSubstitute, + Config = config + }; + return clientMock; + } + + protected string MockFileToString(string fileName) + { + string text = ""; + + if (String.IsNullOrEmpty(fileName)) + { + return text; + } + try + { + using (var streamReader = new StreamReader(fileName, Encoding.UTF8)) + { + text = streamReader.ReadToEnd(); + } + } + catch (Exception exception) + { + throw exception; + } + + return text; + } + + /// + /// Create dummy Nexo message header + /// + /// + protected MessageHeader MockNexoMessageHeaderRequest() + { + var header = new MessageHeader + { + MessageType = MessageType.Request, + MessageClass = MessageClassType.Service, + MessageCategory = MessageCategoryType.Payment, + SaleID = "POSSystemID12345", + POIID = "MX915-284251016", + + ServiceID = (new Random()).Next(1, 9999).ToString() + }; + return header; + } + + protected static string GetMockFilePath(string fileName) + { + if (string.IsNullOrEmpty(fileName)) + { + return ""; + } + var projectPath = Directory.GetParent(Environment.CurrentDirectory).Parent.Parent.FullName; + var mockPath = Path.Combine(projectPath, fileName); + return mockPath; + } + } +} diff --git a/Adyen.Test/ClientTest.cs b/Adyen.Test/TerminalApi/ClientTest.cs similarity index 96% rename from Adyen.Test/ClientTest.cs rename to Adyen.Test/TerminalApi/ClientTest.cs index 99a712e62..a592d91e0 100644 --- a/Adyen.Test/ClientTest.cs +++ b/Adyen.Test/TerminalApi/ClientTest.cs @@ -32,14 +32,14 @@ public void TestSetEnvironment() Assert.AreEqual("https://terminal-api-test.adyen.com", client.Config.CloudApiEndPoint); } - Client testClient; + Client _testClient; String logLine; [TestInitialize] public void TestSetup() { - testClient = new Client(new Config()); - testClient.LogCallback += new Client.CallbackLogHandler((message) => { + _testClient = new Client(new Config()); + _testClient.LogCallback += new Client.CallbackLogHandler((message) => { logLine = message; }); @@ -47,7 +47,7 @@ public void TestSetup() [TestMethod] public void TestLogLine() { - testClient.LogLine("testMessage"); + _testClient.LogLine("testMessage"); Assert.AreEqual("testMessage", logLine); } diff --git a/Adyen.Test/DeserializerTest.cs b/Adyen.Test/TerminalApi/DeserializerTest.cs similarity index 100% rename from Adyen.Test/DeserializerTest.cs rename to Adyen.Test/TerminalApi/DeserializerTest.cs diff --git a/Adyen.Test/HeaderRequestTest.cs b/Adyen.Test/TerminalApi/HeaderRequestTest.cs similarity index 90% rename from Adyen.Test/HeaderRequestTest.cs rename to Adyen.Test/TerminalApi/HeaderRequestTest.cs index 5b9282498..ac8b1cf7f 100644 --- a/Adyen.Test/HeaderRequestTest.cs +++ b/Adyen.Test/TerminalApi/HeaderRequestTest.cs @@ -1,6 +1,7 @@ using System.Linq; using System.Net.Http; using Adyen.Constants; +using Adyen.Core.Client.Extensions; using Adyen.HttpClient; using Adyen.Model; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -165,7 +166,7 @@ public void UserAgentPresentWhenApplicationNameIsProvidedTest() var client = new HttpClientWrapper(config, new System.Net.Http.HttpClient()); HttpRequestMessage httpWebRequest = client.GetHttpRequestMessage(_endpoint, "requestBody", null, null); - Assert.AreEqual(httpWebRequest.Headers.GetValues("UserAgent").FirstOrDefault(), $"YourApplicationName {ClientConfig.LibName}/{ClientConfig.LibVersion}"); + Assert.AreEqual(httpWebRequest.Headers.GetValues("UserAgent").FirstOrDefault(), $"YourApplicationName {HttpRequestMessageExtensions.AdyenLibraryName}/{HttpRequestMessageExtensions.AdyenLibraryVersion}"); } [TestMethod] @@ -181,7 +182,7 @@ public void UserAgentPresentWhenApplicationNameIsNotProvidedTest() var client = new HttpClientWrapper(config, new System.Net.Http.HttpClient()); HttpRequestMessage httpWebRequest = client.GetHttpRequestMessage(_endpoint, "requestBody", null, null); - Assert.AreEqual(httpWebRequest.Headers.GetValues("UserAgent").FirstOrDefault(), $"{ClientConfig.LibName}/{ClientConfig.LibVersion}"); + Assert.AreEqual(httpWebRequest.Headers.GetValues("UserAgent").FirstOrDefault(), $"{HttpRequestMessageExtensions.AdyenLibraryName}/{HttpRequestMessageExtensions.AdyenLibraryVersion}"); } [TestMethod] @@ -197,10 +198,10 @@ public void LibraryAnalysisConstantsInHeaderTest() var client = new HttpClientWrapper(config, new System.Net.Http.HttpClient()); HttpRequestMessage httpWebRequest = client.GetHttpRequestMessage(_endpoint, "requestBody", null, null); - Assert.IsNotNull(httpWebRequest.Headers.GetValues(ApiConstants.AdyenLibraryName)); - Assert.AreEqual(ClientConfig.LibName, httpWebRequest.Headers.GetValues(ApiConstants.AdyenLibraryName).FirstOrDefault()); - Assert.IsNotNull(httpWebRequest.Headers.GetValues(ApiConstants.AdyenLibraryVersion)); - Assert.AreEqual(ClientConfig.LibVersion, httpWebRequest.Headers.GetValues(ApiConstants.AdyenLibraryVersion).FirstOrDefault()); + Assert.IsNotNull(httpWebRequest.Headers.GetValues("adyen-library-name")); + Assert.AreEqual(HttpRequestMessageExtensions.AdyenLibraryName, httpWebRequest.Headers.GetValues("adyen-library-name").FirstOrDefault()); + Assert.IsNotNull(httpWebRequest.Headers.GetValues("adyen-library-version")); + Assert.AreEqual(HttpRequestMessageExtensions.AdyenLibraryVersion, httpWebRequest.Headers.GetValues("adyen-library-version").FirstOrDefault()); } } } diff --git a/Adyen.Test/MockPosApiRequest.cs b/Adyen.Test/TerminalApi/MockPosApiRequest.cs similarity index 100% rename from Adyen.Test/MockPosApiRequest.cs rename to Adyen.Test/TerminalApi/MockPosApiRequest.cs diff --git a/Adyen.Test/NotificationDecryptionTest.cs b/Adyen.Test/TerminalApi/NotificationDecryptionTest.cs similarity index 100% rename from Adyen.Test/NotificationDecryptionTest.cs rename to Adyen.Test/TerminalApi/NotificationDecryptionTest.cs diff --git a/Adyen.Test/ProxyTest.cs b/Adyen.Test/TerminalApi/ProxyTest.cs similarity index 100% rename from Adyen.Test/ProxyTest.cs rename to Adyen.Test/TerminalApi/ProxyTest.cs diff --git a/Adyen.Test/RegionTest.cs b/Adyen.Test/TerminalApi/RegionTest.cs similarity index 100% rename from Adyen.Test/RegionTest.cs rename to Adyen.Test/TerminalApi/RegionTest.cs diff --git a/Adyen.Test/Terminal/SaleToAcquirerDataTest.cs b/Adyen.Test/TerminalApi/SaleToAcquirerDataTest.cs similarity index 98% rename from Adyen.Test/Terminal/SaleToAcquirerDataTest.cs rename to Adyen.Test/TerminalApi/SaleToAcquirerDataTest.cs index dea0b56fd..4c7248eb6 100644 --- a/Adyen.Test/Terminal/SaleToAcquirerDataTest.cs +++ b/Adyen.Test/TerminalApi/SaleToAcquirerDataTest.cs @@ -15,13 +15,13 @@ public class SaleToAcquirerDataTest { private readonly string json = "{\"metadata\":{\"key\":\"value\"},\"shopperEmail\":\"myemail@mail.com\",\"shopperReference\":\"13164308\",\"recurringProcessingModel\":\"Subscription\",\"recurringContract\":\"RECURRING,ONECLICK\",\"shopperStatement\":\"YOUR SHOPPER STATEMENT\",\"recurringDetailName\":\"VALUE\",\"recurringTokenService\":\"VALUE\",\"store\":\"store value\",\"scc\":null,\"merchantAccount\":\"merchantAccount\",\"currency\":\"EUR\",\"applicationInfo\":{\"adyenLibrary\":{\"name\":\"adyen-dotnet-api-library\",\"version\":\"" + - ClientConfig.LibVersion + + Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion + "\"},\"externalPlatform\":{\"integrator\":\"externalPlatformIntegrator\",\"name\":\"externalPlatformName\",\"version\":\"2.0.0\"},\"merchantDevice\":{\"os\":\"merchantDeviceOS\",\"osVersion\":\"10.12.6\",\"reference\":\"4c32759faaa7\"}},\"tenderOption\":\"ReceiptHandler,AllowPartialAuthorisation,AskGratuity\",\"authorisationType\":\"PreAuth\",\"additionalData\":{\"key.key\":\"value\",\"key.keyTwo\":\"value2\"}}"; private readonly string splitJson = "{\"metadata\":{\"key\":\"value\"},\"shopperEmail\":\"myemail@mail.com\",\"shopperReference\":\"13164308\",\"recurringProcessingModel\":\"Subscription\",\"recurringContract\":\"RECURRING,ONECLICK\",\"shopperStatement\":\"YOUR SHOPPER STATEMENT\",\"recurringDetailName\":\"VALUE\",\"recurringTokenService\":\"VALUE\",\"store\":\"store value\",\"scc\":null,\"merchantAccount\":\"merchantAccount\",\"currency\":\"EUR\",\"applicationInfo\":{\"adyenLibrary\":{\"name\":\"adyen-dotnet-api-library\",\"version\":\"" + - ClientConfig.LibVersion + + Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion + "\"},\"externalPlatform\":{\"integrator\":\"externalPlatformIntegrator\",\"name\":\"externalPlatformName\",\"version\":\"2.0.0\"},\"merchantDevice\":{\"os\":\"merchantDeviceOS\",\"osVersion\":\"10.12.6\",\"reference\":\"4c32759faaa7\"}},\"tenderOption\":\"ReceiptHandler,AllowPartialAuthorisation,AskGratuity\",\"authorisationType\":\"PreAuth\"," + "\"additionalData\":{\"key.key\":\"value\",\"key.keyTwo\":\"value2\",\"split.api\":\"1\",\"split.nrOfItems\":\"3\",\"split.totalAmount\":\"62000\",\"split.currencyCode\":\"EUR\",\"split.item1.amount\":\"60000\",\"split.item1.type\":\"BalanceAccount\",\"split.item1.account\":\"BA00000000000000000000001\",\"split.item1.reference\":\"reference_split_1\",\"split.item1.description\":\"description_split_1\",\"split.item2.amount\":\"2000\",\"split.item2.type\":\"Commission\",\"split.item2.reference\":\"reference_commission\",\"split.item2.description\":\"description_commission\",\"split.item3.type\":\"PaymentFee\",\"split.item3.account\":\"BA00000000000000000000001\",\"split.item3.reference\":\"reference_PaymentFee\",\"split.item3.description\":\"description_PaymentFee\"}}"; diff --git a/Adyen.Test/Terminal/SplitTest.cs b/Adyen.Test/TerminalApi/SplitTest.cs similarity index 100% rename from Adyen.Test/Terminal/SplitTest.cs rename to Adyen.Test/TerminalApi/SplitTest.cs diff --git a/Adyen.Test/TerminalApiAsyncServiceTest.cs b/Adyen.Test/TerminalApi/TerminalApiAsyncServiceTest.cs similarity index 100% rename from Adyen.Test/TerminalApiAsyncServiceTest.cs rename to Adyen.Test/TerminalApi/TerminalApiAsyncServiceTest.cs diff --git a/Adyen.Test/TerminalApiCloudRequestTest.cs b/Adyen.Test/TerminalApi/TerminalApiCloudRequestTest.cs similarity index 100% rename from Adyen.Test/TerminalApiCloudRequestTest.cs rename to Adyen.Test/TerminalApi/TerminalApiCloudRequestTest.cs diff --git a/Adyen.Test/TerminalApiInputTest.cs b/Adyen.Test/TerminalApi/TerminalApiInputTest.cs similarity index 100% rename from Adyen.Test/TerminalApiInputTest.cs rename to Adyen.Test/TerminalApi/TerminalApiInputTest.cs diff --git a/Adyen.Test/TerminalApiLocalServiceTest.cs b/Adyen.Test/TerminalApi/TerminalApiLocalServiceTest.cs similarity index 100% rename from Adyen.Test/TerminalApiLocalServiceTest.cs rename to Adyen.Test/TerminalApi/TerminalApiLocalServiceTest.cs diff --git a/Adyen.Test/TerminalApiPosRequestTest.cs b/Adyen.Test/TerminalApi/TerminalApiPosRequestTest.cs similarity index 100% rename from Adyen.Test/TerminalApiPosRequestTest.cs rename to Adyen.Test/TerminalApi/TerminalApiPosRequestTest.cs diff --git a/Adyen.Test/TerminalApiPosSecurityTest.cs b/Adyen.Test/TerminalApi/TerminalApiPosSecurityTest.cs similarity index 100% rename from Adyen.Test/TerminalApiPosSecurityTest.cs rename to Adyen.Test/TerminalApi/TerminalApiPosSecurityTest.cs diff --git a/Adyen.Test/TerminalApi/TerminalApiSerializerTest.cs b/Adyen.Test/TerminalApi/TerminalApiSerializerTest.cs new file mode 100644 index 000000000..86e9264d7 --- /dev/null +++ b/Adyen.Test/TerminalApi/TerminalApiSerializerTest.cs @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Adyen.ApiSerialization; +using Adyen.Constants; +using Adyen.Model.Terminal; +using Adyen.Model.TerminalApi; +using Adyen.Model.TerminalApi.Message; +using Adyen.Security; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using ApplicationInfo = Adyen.Model.ApplicationInformation.ApplicationInfo; +using CommonField = Adyen.Model.ApplicationInformation.CommonField; +using PaymentRequest = Adyen.Model.TerminalApi.PaymentRequest; +using PaymentResponse = Adyen.Model.TerminalApi.PaymentResponse; + +namespace Adyen.Test +{ + [TestClass] + public class SerializerTest + { + [TestMethod] + public void EnumSerializerTest() + { + var saleToPoiMessageSerializer = new SaleToPoiMessageSerializer(); + var saleToMessageOnLine = saleToPoiMessageSerializer.Deserialize(GetSaleToPoiMessage("OnlinePin")); + var saleToMessageOnline = saleToPoiMessageSerializer.Deserialize(GetSaleToPoiMessage("OnLinePin")); + var paymentResponseOnLine = (PaymentResponse)saleToMessageOnLine.MessagePayload; + var paymentResponseOnline = (PaymentResponse)saleToMessageOnline.MessagePayload; + Assert.AreEqual(paymentResponseOnline.PaymentResult.AuthenticationMethod[0], AuthenticationMethodType.OnLinePIN); + Assert.AreEqual(paymentResponseOnLine.PaymentResult.AuthenticationMethod[0], AuthenticationMethodType.OnLinePIN); + } + + [TestMethod] + public void SaleToPoiMessageSerializationTest() + { + SaleToPOIRequest saleToPoiMessage = CreatePosPaymentRequest(); + string serialized = SerializeSaleToPoiMessage(saleToPoiMessage); + Assert.AreEqual(serialized, ExpectedSaleToPoiMessageJson); + } + + [TestMethod] + public void SaleToPoiMessageWithUpdatedJsonConvertDefaultSettingsSerializationTest() + { + SaleToPOIRequest saleToPoiMessage = CreatePosPaymentRequest(); + + JsonConvert.DefaultSettings = () => new JsonSerializerSettings + { + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy() + } + }; + + string serialized = SerializeSaleToPoiMessage(saleToPoiMessage); + try + { + Assert.AreEqual(serialized, ExpectedSaleToPoiMessageJson); + } + finally + { + JsonConvert.DefaultSettings = null; + } + } + + [TestMethod] + public void SaleToPoiMessageSecuredSerializationTest() + { + SaleToPOIRequest saleToPoiMessage = CreatePosPaymentRequest(); + string serialized = SerializeSaleToPoiMessageSecured(saleToPoiMessage); + Assert.AreEqual(serialized, ExpectedSaleToPoiMessageSecuredJson); + } + + [TestMethod] + public void SaleToPoiMessageSecuredWithUpdatedJsonConvertDefaultSettingsSerializationTest() + { + SaleToPOIRequest saleToPoiMessage = CreatePosPaymentRequest(); + + JsonConvert.DefaultSettings = () => new JsonSerializerSettings + { + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy() + } + }; + + try + { + string serialized = SerializeSaleToPoiMessageSecured(saleToPoiMessage); + + Assert.AreEqual(serialized, ExpectedSaleToPoiMessageSecuredJson); + } + finally + { + JsonConvert.DefaultSettings = null; + } + } + + private static string GetSaleToPoiMessage(string online) + { + return "{\"SaleToPOIResponse\": {\"PaymentResponse\": {\"POIData\": {},\"PaymentResult\": {\"AuthenticationMethod\": [\"" + online + "\"],\"PaymentAcquirerData\": {\"AcquirerPOIID\": \"MX925-260390740\",\"MerchantID\": \"PME_POS\"},\"PaymentType\": \"Normal\"},\"Response\": {\"Result\": \"Success\"}},\"MessageHeader\": {\"ProtocolVersion\": \"3.0\",\"SaleID\": \"Appie\",\"MessageClass\": \"Service\",\"MessageCategory\": \"Payment\",\"ServiceID\": \"20095135\",\"POIID\": \"MX925-260390740\",\"MessageType\": \"Response\"}}}"; + } + + private static string SerializeSaleToPoiMessage(SaleToPOIMessage saleToPoiMessage) + { + var saleToPoiMessageSerializer = new SaleToPoiMessageSerializer(); + return saleToPoiMessageSerializer.Serialize(saleToPoiMessage); + } + + private static string SerializeSaleToPoiMessageSecured(SaleToPOIMessage saleToPoiMessage) + { + var saleToPoiMessageSerializer = new SaleToPoiMessageSerializer(); + var serializedSaleToPoiMessage = saleToPoiMessageSerializer.Serialize(saleToPoiMessage); + + var encryptionCredentialDetails = new EncryptionCredentialDetails + { + AdyenCryptoVersion = 1, + KeyVersion = 1, + KeyIdentifier = "CryptoKeyIdentifier12345", + Password = "p@ssw0rd123456" + }; + var messageSecuredEncryptor = new SaleToPoiMessageSecuredEncryptor(); + var saleToPoiMessageSecured = messageSecuredEncryptor.Encrypt( + serializedSaleToPoiMessage, + saleToPoiMessage.MessageHeader, + encryptionCredentialDetails); + + // Clear SecurityTrailer.Nonce and NexoBlob as they are randomly generated every run + saleToPoiMessageSecured.NexoBlob = null; + saleToPoiMessageSecured.SecurityTrailer.Nonce = null; + + return saleToPoiMessageSerializer.Serialize(saleToPoiMessageSecured); + } + + /// + /// Returns a POS Payment Request for our serialization tests. + /// Hardcode the version so that we can test the hardcoded hmac (after encryption) and SaleToAcquirerData: + /// and can be + /// . + /// + private static SaleToPOIRequest CreatePosPaymentRequest() + { + ApplicationInfo applicationInfo = new ApplicationInfo(); + applicationInfo.AdyenLibrary.Version = "26.1.0"; + + return new SaleToPOIRequest + { + MessageHeader = new MessageHeader + { + MessageType = MessageType.Request, + MessageClass = MessageClassType.Service, + MessageCategory = MessageCategoryType.Payment, + SaleID = "POSSystemID12345", + POIID = "MX915-284251016", + ServiceID = "12345678" + }, + MessagePayload = new PaymentRequest + { + SaleData = new SaleData + { + SaleToAcquirerData = new SaleToAcquirerData() + { + ApplicationInfo = applicationInfo + }, + SaleTransactionID = new TransactionIdentification + { + TransactionID = "PosAuth", + TimeStamp = new DateTime(2025, 1, 1) + }, + TokenRequestedType = TokenRequestedType.Customer, + }, + PaymentTransaction = new PaymentTransaction + { + AmountsReq = new AmountsReq + { + Currency = "EUR", + RequestedAmount = 10100 + } + }, + PaymentData = new PaymentData + { + PaymentType = PaymentType.Normal + } + } + }; + } + + private static string ExpectedSaleToPoiMessageJson => @"{""SaleToPOIRequest"":{""MessageHeader"":{""MessageClass"":""Service"",""MessageCategory"":""Payment"",""MessageType"":""Request"",""ServiceID"":""12345678"",""SaleID"":""POSSystemID12345"",""POIID"":""MX915-284251016"",""ProtocolVersion"":""3.0""},""PaymentRequest"":{""SaleData"":{""SaleTransactionID"":{""TransactionID"":""PosAuth"",""TimeStamp"":""2025-01-01T00:00:00""},""SaleToAcquirerData"":""eyJhcHBsaWNhdGlvbkluZm8iOnsiYWR5ZW5MaWJyYXJ5Ijp7Im5hbWUiOiJhZHllbi1kb3RuZXQtYXBpLWxpYnJhcnkiLCJ2ZXJzaW9uIjoiMjYuMS4wIn19fQ=="",""TokenRequestedType"":""Customer""},""PaymentTransaction"":{""AmountsReq"":{""Currency"":""EUR"",""RequestedAmount"":10100.0}},""PaymentData"":{""PaymentType"":""Normal""}}}}"; + + private static string ExpectedSaleToPoiMessageSecuredJson => @"{""SaleToPOIRequest"":{""MessageHeader"":{""MessageClass"":""Service"",""MessageCategory"":""Payment"",""MessageType"":""Request"",""ServiceID"":""12345678"",""SaleID"":""POSSystemID12345"",""POIID"":""MX915-284251016"",""ProtocolVersion"":""3.0""},""NexoBlob"":null,""SecurityTrailer"":{""AdyenCryptoVersion"":1,""KeyIdentifier"":""CryptoKeyIdentifier12345"",""KeyVersion"":1,""Hmac"":""mBUD3BeMrloo5aPlwUCFIa87YW8hY9/i3AcrOa2qbhk=""}}}"; + } +} diff --git a/Adyen.Test/TerminalApiSyncServiceTest.cs b/Adyen.Test/TerminalApi/TerminalApiSyncServiceTest.cs similarity index 100% rename from Adyen.Test/TerminalApiSyncServiceTest.cs rename to Adyen.Test/TerminalApi/TerminalApiSyncServiceTest.cs diff --git a/Adyen.Test/TerminalCommonNameValidatorTest.cs b/Adyen.Test/TerminalApi/TerminalCommonNameValidatorTest.cs similarity index 100% rename from Adyen.Test/TerminalCommonNameValidatorTest.cs rename to Adyen.Test/TerminalApi/TerminalCommonNameValidatorTest.cs diff --git a/Adyen.Test/TestUtilities.cs b/Adyen.Test/TestUtilities.cs new file mode 100644 index 000000000..26d4a3748 --- /dev/null +++ b/Adyen.Test/TestUtilities.cs @@ -0,0 +1,18 @@ +namespace Adyen.Test +{ + internal static class TestUtilities + { + /// + /// Utility function, used to read (mock json) files. + /// + /// The relative file to the file. + /// The file contents in string. + public static string GetTestFileContent(string relativePath) + { + string rootPath = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../")); + string absolutePath = Path.Combine(rootPath, relativePath); + + return File.ReadAllText(absolutePath); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/TransferWebhooks/TransferWebhooksTest.cs b/Adyen.Test/TransferWebhooks/TransferWebhooksTest.cs new file mode 100644 index 000000000..73d21c340 --- /dev/null +++ b/Adyen.Test/TransferWebhooks/TransferWebhooksTest.cs @@ -0,0 +1,173 @@ +using Adyen.TransferWebhooks.Client; +using Adyen.TransferWebhooks.Extensions; +using Adyen.TransferWebhooks.Models; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.Extensions.Hosting; +using System.Text.Json; + +namespace Adyen.Test.TransferWebhooks +{ + [TestClass] + public class TransferWebhooksTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public TransferWebhooksTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureTransferWebhooks((context, services, config) => + { + + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_Transfer_Webhook_Notification_Of_Chargeback_Returns_Not_Null() + { + // Arrange + string json = @" +{ + ""data"": { + ""balancePlatform"": ""YOUR_BALANCE_PLATFORM"", + ""creationDate"": ""2025-06-02T13:46:27+02:00"", + ""id"": ""01234"", + ""accountHolder"": { + ""description"": ""The Account Holder"", + ""id"": ""AH1234567890"" + }, + ""amount"": { + ""currency"": ""EUR"", + ""value"": 22700 + }, + ""balanceAccount"": { + ""description"": ""The Liable Balance Account"", + ""id"": ""BA1234567890"" + }, + ""category"": ""platformPayment"", + ""categoryData"": { + ""modificationMerchantReference"": """", + ""modificationPspReference"": ""ZX1234567890"", + ""paymentMerchantReference"": ""pv-test"", + ""platformPaymentType"": ""Remainder"", + ""pspPaymentReference"": ""PSP01234"", + ""type"": ""platformPayment"" + }, + ""description"": ""Remainder Fee for pv-test"", + ""direction"": ""incoming"", + ""reason"": ""approved"", + ""reference"": """", + ""status"": ""authorised"", + ""type"": ""capture"", + ""balances"": [ + { + ""currency"": ""EUR"", + ""received"": 0, + ""reserved"": 22700 + } + ], + ""eventId"": ""EV1234567890"", + ""events"": [ + { + ""bookingDate"": ""2025-06-02T13:46:27+02:00"", + ""id"": ""EV1234567890"", + ""mutations"": [ + { + ""currency"": ""EUR"", + ""received"": 22700 + } + ], + ""status"": ""received"", + ""type"": ""accounting"" + }, + { + ""bookingDate"": ""2025-06-02T13:46:27+02:00"", + ""id"": ""EV1234567890-2"", + ""mutations"": [ + { + ""currency"": ""EUR"", + ""received"": -22700, + ""reserved"": 22700 + } + ], + ""status"": ""authorised"", + ""type"": ""accounting"" + } + ], + ""sequenceNumber"": 2 + }, + ""environment"": ""test"", + ""timestamp"": ""2025-06-02T11:46:28.635Z"", + ""type"": ""balancePlatform.transfer.updated"" +} +"; + // Act + TransferNotificationRequest r = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.IsNotNull(r); + Assert.AreEqual("test", r.Environment); + Assert.AreEqual(TransferNotificationRequest.TypeEnum.BalancePlatformTransferUpdated, r.Type); + + Assert.AreEqual("YOUR_BALANCE_PLATFORM", r.Data.BalancePlatform); + Assert.AreEqual(DateTimeOffset.Parse("2025-06-02T13:46:27+02:00"), r.Data.CreationDate); + Assert.AreEqual("01234", r.Data.Id); + + Assert.AreEqual("The Account Holder", r.Data.AccountHolder.Description); + Assert.AreEqual("AH1234567890", r.Data.AccountHolder.Id); + + Assert.AreEqual("EUR", r.Data.Amount.Currency); + Assert.AreEqual(22700, r.Data.Amount.Value); + Assert.IsNotNull(r.Data.BalanceAccount); + Assert.AreEqual("The Liable Balance Account", r.Data.BalanceAccount.Description); + Assert.AreEqual("BA1234567890", r.Data.BalanceAccount.Id); + Assert.AreEqual(TransferData.CategoryEnum.PlatformPayment, r.Data.Category); + + Assert.AreEqual("", r.Data.CategoryData.PlatformPayment.ModificationMerchantReference); + Assert.AreEqual("ZX1234567890", r.Data.CategoryData.PlatformPayment.ModificationPspReference); + Assert.AreEqual("pv-test", r.Data.CategoryData.PlatformPayment.PaymentMerchantReference); + Assert.AreEqual(PlatformPayment.PlatformPaymentTypeEnum.Remainder, r.Data.CategoryData.PlatformPayment.PlatformPaymentType); + Assert.AreEqual("PSP01234", r.Data.CategoryData.PlatformPayment.PspPaymentReference); + Assert.AreEqual("Remainder Fee for pv-test", r.Data.Description); + Assert.AreEqual(TransferData.DirectionEnum.Incoming, r.Data.Direction); + Assert.AreEqual(TransferData.ReasonEnum.Approved, r.Data.Reason); + Assert.AreEqual("", r.Data.Reference); + Assert.AreEqual(TransferData.StatusEnum.Authorised, r.Data.Status); + Assert.AreEqual(TransferData.TypeEnum.Capture, r.Data.Type); + + Assert.AreEqual(1, r.Data.Balances.Count); + Assert.AreEqual("EUR", r.Data.Balances[0].Currency); + Assert.AreEqual(0, r.Data.Balances[0].Received); + Assert.AreEqual(22700, r.Data.Balances[0].Reserved); + Assert.AreEqual("EV1234567890", r.Data.EventId); + + Assert.AreEqual(2, r.Data.Events.Count); + + Assert.AreEqual(DateTimeOffset.Parse("2025-06-02T13:46:27+02:00"), r.Data.Events[0].BookingDate); + Assert.AreEqual("EV1234567890", r.Data.Events[0].Id); + Assert.AreEqual(TransferEvent.StatusEnum.Received, r.Data.Events[0].Status); + Assert.AreEqual(TransferEvent.TypeEnum.Accounting, r.Data.Events[0].Type); + + Assert.AreEqual(1, r.Data.Events[0].Mutations.Count); + Assert.AreEqual("EUR", r.Data.Events[0].Mutations[0].Currency); + Assert.AreEqual(22700, r.Data.Events[0].Mutations[0].Received); + + Assert.AreEqual(DateTimeOffset.Parse("2025-06-02T13:46:27+02:00"), r.Data.Events[1].BookingDate); + Assert.AreEqual("EV1234567890-2", r.Data.Events[1].Id); + Assert.AreEqual(TransferEvent.StatusEnum.Authorised, r.Data.Events[1].Status); + Assert.AreEqual(TransferEvent.TypeEnum.Accounting, r.Data.Events[1].Type); + + Assert.IsNotNull(r.Data.Events[1].Mutations); + Assert.AreEqual(1, r.Data.Events[1].Mutations.Count); + Assert.AreEqual("EUR", r.Data.Events[1].Mutations[0].Currency); + Assert.AreEqual(-22700, r.Data.Events[1].Mutations[0].Received); + Assert.AreEqual(22700, r.Data.Events[1].Mutations[0].Reserved); + + Assert.AreEqual(2, r.Data.SequenceNumber); + Assert.AreEqual(DateTimeOffset.Parse("2025-06-02T11:46:28.635Z"), r.Timestamp); + } + } +} \ No newline at end of file diff --git a/Adyen.Test/Transfers/TransfersTest.cs b/Adyen.Test/Transfers/TransfersTest.cs new file mode 100644 index 000000000..a3f6e51d9 --- /dev/null +++ b/Adyen.Test/Transfers/TransfersTest.cs @@ -0,0 +1,93 @@ +using Adyen.Core.Options; +using Adyen.Transfers.Models; +using Adyen.Transfers.Client; +using Adyen.Transfers.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +namespace Adyen.Test.Transfers +{ + [TestClass] + public class TransfersTest + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public TransfersTest() + { + IHost host = Host.CreateDefaultBuilder() + .ConfigureTransfers((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + + [TestMethod] + public async Task Given_Deserialize_When_TransactionSearchResponse_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/transfers/get-all-transactions.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Links.Next.Href, "https://balanceplatform-api-test.adyen.com/btl/v4/transactions?balancePlatform=TestBalancePlatform&createdUntil=2023-08-20T13%3A07%3A40Z&createdSince=2023-08-10T10%3A50%3A40Z&cursor=S2B-c0p1N0tdN0l6RGhYK1YpM0lgOTUyMDlLXElyKE9LMCtyaFEuMj1NMHgidCsrJi1ZNnhqXCtqVi5JPGpRK1F2fCFqWzU33JTojSVNJc1J1VXhncS10QDd6JX9FQFl5Zn0uNyUvSXJNQTo"); + } + + [TestMethod] + public async Task Given_Deserialize_When_TransferTransaction_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/transfers/get-transaction.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Status, Transaction.StatusEnum.Booked); + Assert.AreEqual(response.Transfer.Id, "48TYZO5ZVURJ2FCW"); + } + + [TestMethod] + public async Task Given_Deserialize_When_Transfer_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/transfers/transfer-funds.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Status, Transfer.StatusEnum.Authorised); + Assert.AreEqual(response.Category, Transfer.CategoryEnum.Bank); + } + + #region Grants + + [TestMethod] + public async Task Given_Deserialize_When_CapitalGrant_Returns_Not_Null() + { + // Arrange + string json = TestUtilities.GetTestFileContent("mocks/grants/post-grants-success.json"); + + // Act + var response = JsonSerializer.Deserialize(json, _jsonSerializerOptionsProvider.Options); + + // Assert + Assert.AreEqual(response.Id, "GR00000000000000000000001"); + Assert.AreEqual(response.GrantAccountId, "CG00000000000000000000001"); + Assert.AreEqual(response.Status, CapitalGrant.StatusEnum.Pending); + Assert.IsNotNull(response.Balances); + } + + #endregion + } +} \ No newline at end of file diff --git a/Adyen.Test/TransfersTest.cs b/Adyen.Test/TransfersTest.cs deleted file mode 100644 index 8656af648..000000000 --- a/Adyen.Test/TransfersTest.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Net.Http; -using System.Threading; -using Adyen.Model; -using Adyen.Model.Transfers; -using Adyen.Service.Transfers; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using NSubstitute; - -namespace Adyen.Test -{ - [TestClass] - public class TransfersTest : BaseTest - { - [TestMethod] - public void GetAllTransactionsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/transfers/get-all-transactions.json"); - var service = new TransactionsService(client); - var response = service.GetAllTransactions(new DateTime(), new DateTime(), balancePlatform:"balance", accountHolderId:"id"); - ClientInterfaceSubstitute.Received().RequestAsync( - "https://balanceplatform-api-test.adyen.com/btl/v4/transactions?balancePlatform=balance&accountHolderId=id&createdSince=0001-01-01T00%3a00%3a00Z&createdUntil=0001-01-01T00%3a00%3a00Z", - null, null, HttpMethod.Get, CancellationToken.None); - Assert.AreEqual(response.Links.Next.Href, "https://balanceplatform-api-test.adyen.com/btl/v2/transactions?balancePlatform=Bastronaut&createdUntil=2022-03-21T00%3A00%3A00Z&createdSince=2022-03-11T00%3A00%3A00Z&limit=3&cursor=S2B-TSAjOkIrYlIlbjdqe0RreHRyM32lKRSxubXBHRkhHL2E32XitQQz5SfzpucD5HbHwpM1p6NDR1eXVQLFF6MmY33J32sobDxQYT90MHIud1hwLnd6JitcX32xJ"); - } - - [TestMethod] - public void GetSpecificTransactionTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/transfers/get-transaction.json"); - var service = new TransactionsService(client); - var response = service.GetTransaction("id"); - Assert.AreEqual(response.Status, Transaction.StatusEnum.Booked); - Assert.AreEqual(response.Transfer.Id, "48TYZO5ZVURJ2FCW"); - } - - [TestMethod] - public void PostTransferFundsTest() - { - var client = CreateMockTestClientApiKeyBasedRequestAsync("mocks/transfers/transfer-funds.json"); - var service = new TransfersService(client); - var response = service.TransferFunds(new TransferInfo()); - Assert.AreEqual(response.Status, Transfer.StatusEnum.Authorised); - Assert.AreEqual(response.Category, Transfer.CategoryEnum.Bank); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/UtilTest.cs b/Adyen.Test/UtilTest.cs deleted file mode 100644 index 8bea2e2cb..000000000 --- a/Adyen.Test/UtilTest.cs +++ /dev/null @@ -1,212 +0,0 @@ -using System.Collections.Generic; -using Adyen.Model.Notification; -using Adyen.Model.Payment; -using Adyen.Util; -using Adyen.Util.TerminalApi; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Newtonsoft.Json; - -namespace Adyen.Test -{ - [TestClass] - public class UtilTest : BaseTest - { - [TestMethod] - public void TestHmac() - { - var data = "countryCode:currencyCode:merchantAccount:merchantReference:paymentAmount:sessionValidity:skinCode:NL:EUR:MagentoMerchantTest2:TEST-PAYMENT-2017-02-01-14\\:02\\:05:199:2017-02-02T14\\:02\\:05+01\\:00:PKz2KML1"; - var hmacKey = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00"; - var hmacValidator = new HmacValidator(); - var hmacSignature = hmacValidator.CalculateHmac(data, hmacKey); - Assert.IsTrue(string.Equals(hmacSignature, "34oR8T1whkQWTv9P+SzKyp8zhusf9n0dpqrm9nsqSJs=")); - } - - [TestMethod] - public void TestBalancePlatformHmac() - { - var notification = - "{\"data\":{\"balancePlatform\":\"Integration_tools_test\",\"accountId\":\"BA32272223222H5HVKTBK4MLB\",\"sweep\":{\"id\":\"SWPC42272223222H5HVKV6H8C64DP5\",\"schedule\":{\"type\":\"balance\"},\"status\":\"active\",\"targetAmount\":{\"currency\":\"EUR\",\"value\":0},\"triggerAmount\":{\"currency\":\"EUR\",\"value\":0},\"type\":\"pull\",\"counterparty\":{\"balanceAccountId\":\"BA3227C223222H5HVKT3H9WLC\"},\"currency\":\"EUR\"}},\"environment\":\"test\",\"type\":\"balancePlatform.balanceAccountSweep.updated\"}"; - var hmacKey = "D7DD5BA6146493707BF0BE7496F6404EC7A63616B7158EC927B9F54BB436765F"; - var hmacSignature = "9Qz9S/0xpar1klkniKdshxpAhRKbiSAewPpWoxKefQA="; - var hmacValidator = new HmacValidator(); - bool response = hmacValidator.IsValidWebhook(hmacSignature, hmacKey, notification); - Assert.IsTrue(response); - } - - [TestMethod] - public void TestSerializationShopperInteractionDefaultIsZero() - { - var paymentRequest = MockPaymentData.CreateFullPaymentRequestWithShopperInteraction(default); - var serializedPaymentRequest = paymentRequest.ToJson(); - Assert.IsTrue(serializedPaymentRequest.Contains("\"shopperInteraction\": 0,")); - } - - [TestMethod] - public void TestNotificationRequestItemHmac() - { - var hmacKey = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00"; - var expectedSign = "ipnxGCaUZ4l8TUW75a71/ghd2Fe5ffvX0pV4TLTntIc="; - var additionalData = new Dictionary - { - { "hmacSignature", expectedSign } - }; - var notificationRequestItem = new NotificationRequestItem - { - PspReference = "pspReference", - OriginalReference = "originalReference", - MerchantAccountCode = "merchantAccount", - MerchantReference = "reference", - Amount = new Model.Checkout.Amount("EUR", 1000), - EventCode = "EVENT", - Success = true, - AdditionalData = additionalData - }; - var hmacValidator = new HmacValidator(); - var data = hmacValidator.GetDataToSign(notificationRequestItem); - Assert.AreEqual("pspReference:originalReference:merchantAccount:reference:1000:EUR:EVENT:true", data); - var encrypted = hmacValidator.CalculateHmac(notificationRequestItem, hmacKey); - Assert.AreEqual(expectedSign, encrypted); - Assert.IsTrue(hmacValidator.IsValidHmac(notificationRequestItem, hmacKey)); - notificationRequestItem.AdditionalData["hmacSignature"] = "notValidSign"; - Assert.IsFalse(hmacValidator.IsValidHmac(notificationRequestItem, hmacKey)); - } - - [TestMethod] - public void TestHmacCalculationNotificationRequestWithSpecialChars() - { - string hmacKey = "66B61474A0AA3736BA8789EDC6D6CD9EBA0C4F414A554E32A407F849C045C69D"; - var mockPath = GetMockFilePath("mocks/notification-response-refund-fail.json"); - var response = MockFileToString(mockPath); - var hmacValidator = new HmacValidator(); - var notificationRequest = JsonOperation.Deserialize(response); - var notificationItem = notificationRequest.NotificationItemContainers[0].NotificationItem; - var isValidHmac = hmacValidator.IsValidHmac(notificationItem, hmacKey); - Assert.IsTrue(isValidHmac); - } - - [TestMethod] - public void TestSerializationShopperInteractionMoto() - { - var paymentRequest = MockPaymentData.CreateFullPaymentRequestWithShopperInteraction(PaymentRequest.ShopperInteractionEnum.Moto); - var serializedPaymentRequest = JsonOperation.SerializeRequest(paymentRequest); - StringAssert.Contains(serializedPaymentRequest, nameof(PaymentRequest.ShopperInteractionEnum.Moto)); - } - - [TestMethod] - public void TestNullHmacValidator() - { - var hmacValidator = new HmacValidator(); - var notificationRequestItem = new NotificationRequestItem - { - PspReference = "pspReference", - OriginalReference = "originalReference", - MerchantAccountCode = "merchantAccount", - MerchantReference = "reference", - Amount = new Model.Checkout.Amount("EUR", 1000), - EventCode = "EVENT", - Success = true, - AdditionalData = null - }; - var isValidHmacAdditionalDataNull = hmacValidator.IsValidHmac(notificationRequestItem, "hmacKey"); - Assert.IsFalse(isValidHmacAdditionalDataNull); - notificationRequestItem.AdditionalData = new Dictionary(); - var isValidHmacAdditionalDataEmpty = hmacValidator.IsValidHmac(notificationRequestItem, "hmacKey"); - Assert.IsFalse(isValidHmacAdditionalDataEmpty); - } - - [TestMethod] - public void TestColonAndBackslashHmacValidator() - { - var hmacValidator = new HmacValidator(); - var jsonNotification = @"{ - 'additionalData': { - 'acquirerCode': 'TestPmmAcquirer', - 'acquirerReference': 'J8DXDJ2PV6P', - 'authCode': '052095', - 'avsResult': '5 No AVS data provided', - 'avsResultRaw': '5', - 'cardSummary': '1111', - 'checkout.cardAddedBrand': 'visa', - 'cvcResult': '1 Matches', - 'cvcResultRaw': 'M', - 'expiryDate': '03/2030', - 'hmacSignature': 'CZErGCNQaSsxbaQfZaJlakqo7KPP+mIa8a+wx3yNs9A=', - 'paymentMethod': 'visa', - 'refusalReasonRaw': 'AUTHORISED', - 'retry.attempt1.acquirer': 'TestPmmAcquirer', - 'retry.attempt1.acquirerAccount': 'TestPmmAcquirerAccount', - 'retry.attempt1.avsResultRaw': '5', - 'retry.attempt1.rawResponse': 'AUTHORISED', - 'retry.attempt1.responseCode': 'Approved', - 'retry.attempt1.scaExemptionRequested': 'lowValue', - 'scaExemptionRequested': 'lowValue' - }, - 'amount': { - 'currency': 'EUR', - 'value': 1000 - }, - 'eventCode': 'AUTHORISATION', - 'eventDate': '2023-01-10T13:42:29+01:00', - 'merchantAccountCode': 'AntoniStroinski', - 'merchantReference': '\\:/\\/slashes are fun', - 'operations': [ - 'CANCEL', - 'CAPTURE', - 'REFUND' - ], - 'paymentMethod': 'visa', - 'pspReference': 'ZVWN7D3WSMK2WN82', - 'reason': '052095:1111:03/2030', - 'success': 'true' - }"; - var notificationRequestItem = JsonConvert.DeserializeObject(jsonNotification); - var isValidHmac = hmacValidator.IsValidHmac(notificationRequestItem, "74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174"); - Assert.IsTrue(isValidHmac); - } - - [TestMethod] - public void TestCardAcquisitionAdditionalResponse() - { - string jsonString = @"{ - ""additionalData"": { - ""PaymentAccountReference"": ""Yv6zs1234567890ASDFGHJKL"", - ""alias"": ""G12345678"", - ""aliasType"": ""Default"", - ""applicationLabel"": ""ASDFGHJKL"", - ""applicationPreferredName"": ""ASDFGHJKL"", - ""backendGiftcardIndicator"": ""false"", - ""cardBin"": ""4111111"", - ""cardHolderName"": ""John Smith"" - }, - ""message"": ""CARD_ACQ_COMPLETED"", - ""store"": ""NL"" - }"; - string responseBased64 = "ewoiYWRkaXRpb25hbERhdGEiOnsKICJQYXltZW50QWNjb3VudFJlZmVyZW5jZSI6Ill2NnpzMTIzNDU2Nzg5MEFTREZHSEpLTCIsCiJhbGlhcyI6IkcxMjM0NTY3OCIsCiJhbGlhc1R5cGUiOiJEZWZhdWx0IiwKImFwcGxpY2F0aW9uTGFiZWwiOiJBU0RGR0hKS0wiLAoiYXBwbGljYXRpb25QcmVmZXJyZWROYW1lIjoiQVNERkdISktMIiwKICJiYWNrZW5kR2lmdGNhcmRJbmRpY2F0b3IiOiJmYWxzZSIsCiJjYXJkQmluIjoiNDExMTExMSIsCiJjYXJkSG9sZGVyTmFtZSI6IkpvaG4gU21pdGgiCgp9LAoibWVzc2FnZSI6IkNBUkRfQUNRX0NPTVBMRVRFRCIsCiJzdG9yZSI6Ik5MIgp9"; - var additionalResponse = CardAcquisitionUtil.AdditionalResponse(responseBased64); - Assert.AreEqual(additionalResponse.Message,"CARD_ACQ_COMPLETED"); - Assert.AreEqual(additionalResponse.Store,"NL"); - Assert.AreEqual(additionalResponse.AdditionalData["PaymentAccountReference"],"Yv6zs1234567890ASDFGHJKL"); - Assert.AreEqual(additionalResponse.AdditionalData["alias"],"G12345678"); - Assert.AreEqual(additionalResponse.AdditionalData["aliasType"],"Default"); - Assert.AreEqual(additionalResponse.AdditionalData["applicationLabel"],"ASDFGHJKL"); - Assert.AreEqual(additionalResponse.AdditionalData["applicationPreferredName"],"ASDFGHJKL"); - Assert.AreEqual(additionalResponse.AdditionalData["backendGiftcardIndicator"],"false"); - Assert.AreEqual(additionalResponse.AdditionalData["cardHolderName"],"John Smith"); - Assert.AreEqual(additionalResponse.AdditionalData["cardBin"],"4111111"); - - var additionalResponseFromJson = CardAcquisitionUtil.AdditionalResponse(jsonString); - Assert.AreEqual(additionalResponseFromJson.Message,"CARD_ACQ_COMPLETED"); - Assert.AreEqual(additionalResponseFromJson.Store,"NL"); - Assert.AreEqual(additionalResponseFromJson.AdditionalData["PaymentAccountReference"],"Yv6zs1234567890ASDFGHJKL"); - Assert.AreEqual(additionalResponseFromJson.AdditionalData["alias"],"G12345678"); - Assert.AreEqual(additionalResponseFromJson.AdditionalData["aliasType"],"Default"); - Assert.AreEqual(additionalResponseFromJson.AdditionalData["applicationLabel"],"ASDFGHJKL"); - Assert.AreEqual(additionalResponseFromJson.AdditionalData["applicationPreferredName"],"ASDFGHJKL"); - Assert.AreEqual(additionalResponseFromJson.AdditionalData["backendGiftcardIndicator"],"false"); - Assert.AreEqual(additionalResponseFromJson.AdditionalData["cardHolderName"],"John Smith"); - Assert.AreEqual(additionalResponseFromJson.AdditionalData["cardBin"],"4111111"); - - } - - } -} diff --git a/Adyen.Test/Webhooks/HmacValidatorTest.cs b/Adyen.Test/Webhooks/HmacValidatorTest.cs new file mode 100644 index 000000000..4e89c2bc6 --- /dev/null +++ b/Adyen.Test/Webhooks/HmacValidatorTest.cs @@ -0,0 +1,181 @@ +using Adyen.Util; +using Adyen.Webhooks; +using Adyen.Webhooks.Models; +using Adyen.Util.TerminalApi; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using Newtonsoft.Json; + +namespace Adyen.Test.Webhooks +{ + [TestClass] + public class HmacValidatorTest : BaseTest + { + [TestMethod] + public void TestHmac() + { + string data = "countryCode:currencyCode:merchantAccount:merchantReference:paymentAmount:sessionValidity:skinCode:NL:EUR:MagentoMerchantTest2:TEST-PAYMENT-2017-02-01-14\\:02\\:05:199:2017-02-02T14\\:02\\:05+01\\:00:PKz2KML1"; + string hmacKey = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00"; + var hmacValidator = new HmacValidator(); + string hmacSignature = hmacValidator.CalculateHmac(data, hmacKey); + Assert.IsTrue(string.Equals(hmacSignature, "34oR8T1whkQWTv9P+SzKyp8zhusf9n0dpqrm9nsqSJs=")); + } + + [TestMethod] + public void TestNotificationRequestItemHmac() + { + string hmacKey = "DFB1EB5485895CFA84146406857104ABB4CBCABDC8AAF103A624C8F6A3EAAB00"; + string expectedSign = "ipnxGCaUZ4l8TUW75a71/ghd2Fe5ffvX0pV4TLTntIc="; + var additionalData = new Dictionary + { + { "hmacSignature", expectedSign } + }; + var notificationRequestItem = new NotificationRequestItem + { + PspReference = "pspReference", + OriginalReference = "originalReference", + MerchantAccountCode = "merchantAccount", + MerchantReference = "reference", + Amount = new Amount("EUR", 1000), + EventCode = "EVENT", + Success = true, + AdditionalData = additionalData + }; + var hmacValidator = new HmacValidator(); + string data = hmacValidator.GetDataToSign(notificationRequestItem); + Assert.AreEqual("pspReference:originalReference:merchantAccount:reference:1000:EUR:EVENT:true", data); + string encrypted = hmacValidator.CalculateHmac(notificationRequestItem, hmacKey); + Assert.AreEqual(expectedSign, encrypted); + Assert.IsTrue(hmacValidator.IsValidHmac(notificationRequestItem, hmacKey)); + notificationRequestItem.AdditionalData["hmacSignature"] = "notValidSign"; + Assert.IsFalse(hmacValidator.IsValidHmac(notificationRequestItem, hmacKey)); + } + + [TestMethod] + public void TestHmacCalculationNotificationRequestWithSpecialChars() + { + string hmacKey = "66B61474A0AA3736BA8789EDC6D6CD9EBA0C4F414A554E32A407F849C045C69D"; + string mockPath = GetMockFilePath("mocks/notification-response-refund-fail.json"); + string response = MockFileToString(mockPath); + var hmacValidator = new HmacValidator(); + NotificationRequest notificationRequest = JsonConvert.DeserializeObject(response); + NotificationRequestItem notificationItem = notificationRequest.NotificationItemContainers[0].NotificationItem; + bool isValidHmac = hmacValidator.IsValidHmac(notificationItem, hmacKey); + Assert.IsTrue(isValidHmac); + } + + [TestMethod] + public void TestNullHmacValidator() + { + var hmacValidator = new HmacValidator(); + var notificationRequestItem = new NotificationRequestItem + { + PspReference = "pspReference", + OriginalReference = "originalReference", + MerchantAccountCode = "merchantAccount", + MerchantReference = "reference", + Amount = new Amount("EUR", 1000), + EventCode = "EVENT", + Success = true, + AdditionalData = null + }; + bool isValidHmacAdditionalDataNull = hmacValidator.IsValidHmac(notificationRequestItem, "hmacKey"); + Assert.IsFalse(isValidHmacAdditionalDataNull); + notificationRequestItem.AdditionalData = new Dictionary(); + bool isValidHmacAdditionalDataEmpty = hmacValidator.IsValidHmac(notificationRequestItem, "hmacKey"); + Assert.IsFalse(isValidHmacAdditionalDataEmpty); + } + + [TestMethod] + public void TestColonAndBackslashHmacValidator() + { + var hmacValidator = new HmacValidator(); + string jsonNotification = @"{ + 'additionalData': { + 'acquirerCode': 'TestPmmAcquirer', + 'acquirerReference': 'J8DXDJ2PV6P', + 'authCode': '052095', + 'avsResult': '5 No AVS data provided', + 'avsResultRaw': '5', + 'cardSummary': '1111', + 'checkout.cardAddedBrand': 'visa', + 'cvcResult': '1 Matches', + 'cvcResultRaw': 'M', + 'expiryDate': '03/2030', + 'hmacSignature': 'CZErGCNQaSsxbaQfZaJlakqo7KPP+mIa8a+wx3yNs9A=', + 'paymentMethod': 'visa', + 'refusalReasonRaw': 'AUTHORISED', + 'retry.attempt1.acquirer': 'TestPmmAcquirer', + 'retry.attempt1.acquirerAccount': 'TestPmmAcquirerAccount', + 'retry.attempt1.avsResultRaw': '5', + 'retry.attempt1.rawResponse': 'AUTHORISED', + 'retry.attempt1.responseCode': 'Approved', + 'retry.attempt1.scaExemptionRequested': 'lowValue', + 'scaExemptionRequested': 'lowValue' + }, + 'amount': { + 'currency': 'EUR', + 'value': 1000 + }, + 'eventCode': 'AUTHORISATION', + 'eventDate': '2023-01-10T13:42:29+01:00', + 'merchantAccountCode': 'AntoniStroinski', + 'merchantReference': '\\:/\\/slashes are fun', + 'operations': [ + 'CANCEL', + 'CAPTURE', + 'REFUND' + ], + 'paymentMethod': 'visa', + 'pspReference': 'ZVWN7D3WSMK2WN82', + 'reason': '052095:1111:03/2030', + 'success': 'true' + }"; + NotificationRequestItem notificationRequestItem = JsonConvert.DeserializeObject(jsonNotification); + bool isValidHmac = hmacValidator.IsValidHmac(notificationRequestItem, "74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174"); + Assert.IsTrue(isValidHmac); + } + + [TestMethod] + public void TestCardAcquisitionAdditionalResponse() + { + string jsonString = @"{ + ""additionalData"": { + ""PaymentAccountReference"": ""Yv6zs1234567890ASDFGHJKL"", + ""alias"": ""G12345678"", + ""aliasType"": ""Default"", + ""applicationLabel"": ""ASDFGHJKL"", + ""applicationPreferredName"": ""ASDFGHJKL"", + ""backendGiftcardIndicator"": ""false"", + ""cardBin"": ""4111111"", + ""cardHolderName"": ""John Smith"" + }, + ""message"": ""CARD_ACQ_COMPLETED"", + ""store"": ""NL"" + }"; + string responseBased64 = "ewoiYWRkaXRpb25hbERhdGEiOnsKICJQYXltZW50QWNjb3VudFJlZmVyZW5jZSI6Ill2NnpzMTIzNDU2Nzg5MEFTREZHSEpLTCIsCiJhbGlhcyI6IkcxMjM0NTY3OCIsCiJhbGlhc1R5cGUiOiJEZWZhdWx0IiwKImFwcGxpY2F0aW9uTGFiZWwiOiJBU0RGR0hKS0wiLAoiYXBwbGljYXRpb25QcmVmZXJyZWROYW1lIjoiQVNERkdISktMIiwKICJiYWNrZW5kR2lmdGNhcmRJbmRpY2F0b3IiOiJmYWxzZSIsCiJjYXJkQmluIjoiNDExMTExMSIsCiJjYXJkSG9sZGVyTmFtZSI6IkpvaG4gU21pdGgiCgp9LAoibWVzc2FnZSI6IkNBUkRfQUNRX0NPTVBMRVRFRCIsCiJzdG9yZSI6Ik5MIgp9"; + AdditionalResponse additionalResponse = CardAcquisitionUtil.AdditionalResponse(responseBased64); + Assert.AreEqual(additionalResponse.Message,"CARD_ACQ_COMPLETED"); + Assert.AreEqual(additionalResponse.Store,"NL"); + Assert.AreEqual(additionalResponse.AdditionalData["PaymentAccountReference"],"Yv6zs1234567890ASDFGHJKL"); + Assert.AreEqual(additionalResponse.AdditionalData["alias"],"G12345678"); + Assert.AreEqual(additionalResponse.AdditionalData["aliasType"],"Default"); + Assert.AreEqual(additionalResponse.AdditionalData["applicationLabel"],"ASDFGHJKL"); + Assert.AreEqual(additionalResponse.AdditionalData["applicationPreferredName"],"ASDFGHJKL"); + Assert.AreEqual(additionalResponse.AdditionalData["backendGiftcardIndicator"],"false"); + Assert.AreEqual(additionalResponse.AdditionalData["cardHolderName"],"John Smith"); + Assert.AreEqual(additionalResponse.AdditionalData["cardBin"],"4111111"); + + AdditionalResponse additionalResponseFromJson = CardAcquisitionUtil.AdditionalResponse(jsonString); + Assert.AreEqual(additionalResponseFromJson.Message,"CARD_ACQ_COMPLETED"); + Assert.AreEqual(additionalResponseFromJson.Store,"NL"); + Assert.AreEqual(additionalResponseFromJson.AdditionalData["PaymentAccountReference"],"Yv6zs1234567890ASDFGHJKL"); + Assert.AreEqual(additionalResponseFromJson.AdditionalData["alias"],"G12345678"); + Assert.AreEqual(additionalResponseFromJson.AdditionalData["aliasType"],"Default"); + Assert.AreEqual(additionalResponseFromJson.AdditionalData["applicationLabel"],"ASDFGHJKL"); + Assert.AreEqual(additionalResponseFromJson.AdditionalData["applicationPreferredName"],"ASDFGHJKL"); + Assert.AreEqual(additionalResponseFromJson.AdditionalData["backendGiftcardIndicator"],"false"); + Assert.AreEqual(additionalResponseFromJson.AdditionalData["cardHolderName"],"John Smith"); + Assert.AreEqual(additionalResponseFromJson.AdditionalData["cardBin"],"4111111"); + } + } +} diff --git a/Adyen.Test/WebhooksTests/WebhookHandlerTest.cs b/Adyen.Test/Webhooks/WebhookHandlerTest.cs similarity index 99% rename from Adyen.Test/WebhooksTests/WebhookHandlerTest.cs rename to Adyen.Test/Webhooks/WebhookHandlerTest.cs index 0b60812e3..c87451d9c 100644 --- a/Adyen.Test/WebhooksTests/WebhookHandlerTest.cs +++ b/Adyen.Test/Webhooks/WebhookHandlerTest.cs @@ -7,7 +7,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Adyen.Test.WebhooksTests +namespace Adyen.Test.Webhooks { [TestClass] public class WebhookHandlerTest : BaseTest diff --git a/Adyen.Test/WebhooksTests/BalancePlatformWebhookHandlerTest.cs b/Adyen.Test/WebhooksTests/BalancePlatformWebhookHandlerTest.cs deleted file mode 100644 index 4f23c9517..000000000 --- a/Adyen.Test/WebhooksTests/BalancePlatformWebhookHandlerTest.cs +++ /dev/null @@ -1,551 +0,0 @@ -using System; -using Adyen.Model.AcsWebhooks; -using Adyen.Model.ConfigurationWebhooks; -using Adyen.Model.NegativeBalanceWarningWebhooks; -using Adyen.Model.ReportWebhooks; -using Adyen.Model.TransactionWebhooks; -using Adyen.Webhooks; -using Microsoft.VisualStudio.TestTools.UnitTesting; -using Newtonsoft.Json; -using CapabilityProblemEntity = Adyen.Model.ConfigurationWebhooks.CapabilityProblemEntity; - -namespace Adyen.Test.WebhooksTests -{ - [TestClass] - public class BalancePlatformWebhookHandlerTest : BaseTest - { - private readonly BalancePlatformWebhookHandler _balancePlatformWebhookHandler = new BalancePlatformWebhookHandler(); - - [TestMethod] - [DataRow("balancePlatform.accountHolder.created", AccountHolderNotificationRequest.TypeEnum.Created)] - [DataRow("balancePlatform.accountHolder.updated", AccountHolderNotificationRequest.TypeEnum.Updated)] - public void Given_AccountHolder_Webhook_When_Type_Is_Provided_Result_Should_Deserialize(string type, AccountHolderNotificationRequest.TypeEnum expected) - { - // Arrange - string jsonPayload = @" -{ - 'data': { - 'balancePlatform': 'YOUR_BALANCE_PLATFORM', - 'accountHolder': { - 'contactDetails': { - 'address': { - 'country': 'NL', - 'houseNumberOrName': '274', - 'postalCode': '1020CD', - 'street': 'Brannan Street' - }, - 'email': 's.hopper@example.com', - 'phone': { - 'number': '+315551231234', - 'type': 'Mobile' - } - }, - 'description': 'S.Hopper - Staff 123', - 'id': 'AH00000000000000000000001', - 'status': 'Active' - } - }, - 'environment': 'test', - 'type': '" + type + "'" + -"}"; - // Act - _balancePlatformWebhookHandler.GetAccountHolderNotificationRequest(jsonPayload, out AccountHolderNotificationRequest target); - - // Assert - Assert.IsNotNull(target); - Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); - Assert.AreEqual("NL", target.Data.AccountHolder.ContactDetails.Address.Country); - Assert.AreEqual("274", target.Data.AccountHolder.ContactDetails.Address.HouseNumberOrName); - Assert.AreEqual("1020CD", target.Data.AccountHolder.ContactDetails.Address.PostalCode); - Assert.AreEqual("Brannan Street", target.Data.AccountHolder.ContactDetails.Address.Street); - Assert.AreEqual("s.hopper@example.com", target.Data.AccountHolder.ContactDetails.Email); - Assert.AreEqual("+315551231234", target.Data.AccountHolder.ContactDetails.Phone.Number); - Assert.AreEqual(Phone.TypeEnum.Mobile, target.Data.AccountHolder.ContactDetails.Phone.Type); - Assert.AreEqual("S.Hopper - Staff 123", target.Data.AccountHolder.Description); - Assert.AreEqual("AH00000000000000000000001", target.Data.AccountHolder.Id); - Assert.AreEqual(AccountHolder.StatusEnum.Active, target.Data.AccountHolder.Status); - Assert.AreEqual("test", target.Environment); - Assert.AreEqual(expected, target.Type); - } - - [TestMethod] - public void Given_AccountHolder_Webhook_When_Type_Is_Unknown_Result_Should_Be_Null() - { - string jsonPayload = @"{ 'type': 'unknowntype' }"; - bool response = _balancePlatformWebhookHandler.GetAccountHolderNotificationRequest(jsonPayload, out AccountHolderNotificationRequest target); - Assert.IsFalse(response); - Assert.IsNull(target); - } - - [TestMethod] - public void Given_AccountHolder_Webhook_When_Invalid_Json_Result_Should_Throw_JsonReaderException() - { - string jsonPayload = "{ invalid,.json; }"; - Assert.ThrowsException(() => _balancePlatformWebhookHandler.GetAccountHolderNotificationRequest(jsonPayload, out var _)); - } - - [TestMethod] - - public void Test_BalancePlatform_AccountHolderUpdated_LEM_V3() - { - // Note: We're using double-quotes here as some descriptions in the JSON payload contain single quotes ' - // Assert - const string jsonPayload = @" -{ - ""data"": { - ""balancePlatform"": ""YOUR_BALANCE_PLATFORM"", - ""accountHolder"": { - ""legalEntityId"": ""LE00000000000000000001"", - ""reference"": ""YOUR_REFERENCE-2412C"", - ""capabilities"": { - ""sendToTransferInstrument"": { - ""enabled"": true, - ""requested"": true, - ""allowed"": false, - ""problems"": [ - { - ""entity"": { - ""id"": ""LE00000000000000000001"", - ""type"": ""LegalEntity"" - }, - ""verificationErrors"": [ - { - ""code"": ""2_902"", - ""message"": ""Terms Of Service forms are not accepted."", - ""remediatingActions"": [ - { - ""code"": ""2_902"", - ""message"": ""Accept TOS"" - } - ], - ""type"": ""invalidInput"" - } - ] - }, - { - ""entity"": { - ""id"": ""SE00000000000000000001"", - ""type"": ""BankAccount"" - }, - ""verificationErrors"": [ - { - ""code"": ""2_8037"", - ""message"": ""'bankStatement' was missing."", - ""remediatingActions"": [ - { - ""code"": ""1_703"", - ""message"": ""Upload a bank statement"" - } - ], - ""type"": ""dataMissing"" - } - ] - }, - { - ""entity"": { - ""id"": ""SE00000000000000000002"", - ""type"": ""BankAccount"" - }, - ""verificationErrors"": [ - { - ""code"": ""2_8037"", - ""message"": ""'bankStatement' was missing."", - ""remediatingActions"": [ - { - ""code"": ""1_703"", - ""message"": ""Upload a bank statement"" - } - ], - ""type"": ""dataMissing"" - } - ] - }, - { - ""entity"": { - ""id"": ""LE00000000000000000001"", - ""type"": ""LegalEntity"" - }, - ""verificationErrors"": [ - { - ""code"": ""2_8189"", - ""message"": ""'UBO through control' was missing."", - ""remediatingActions"": [ - { - ""code"": ""2_151"", - ""message"": ""Add 'organization.entityAssociations' of type 'uboThroughControl' to legal entity"" - } - ], - ""type"": ""dataMissing"" - }, - { - ""code"": ""1_50"", - ""message"": ""Organization details couldn't be verified"", - ""subErrors"": [ - { - ""code"": ""1_5016"", - ""message"": ""The tax ID number couldn't be verified"", - ""remediatingActions"": [ - { - ""code"": ""1_500"", - ""message"": ""Update organization details"" - }, - { - ""code"": ""1_501"", - ""message"": ""Upload a registration document"" - } - ], - ""type"": ""invalidInput"" - } - ], - ""type"": ""invalidInput"" - }, - { - ""code"": ""2_8067"", - ""message"": ""'Signatory' was missing."", - ""remediatingActions"": [ - { - ""code"": ""2_124"", - ""message"": ""Add 'organization.entityAssociations' of type 'signatory' to legal entity"" - } - ], - ""type"": ""dataMissing"" - } - ] - } - ], - ""transferInstruments"": [ - { - ""enabled"": true, - ""requested"": true, - ""allowed"": false, - ""id"": ""SE00000000000000000001"", - ""verificationStatus"": ""pending"" - }, - { - ""enabled"": true, - ""requested"": true, - ""allowed"": false, - ""id"": ""SE00000000000000000002"", - ""verificationStatus"": ""pending"" - } - ], - ""verificationStatus"": ""pending"" - } - }, - ""id"": ""AH00000000000000000001"", - ""status"": ""active"" - } - }, - ""environment"": ""live"", - ""timestamp"": ""2024-12-15T15:42:03+01:00"", - ""type"": ""balancePlatform.accountHolder.updated"" -}"; - - _balancePlatformWebhookHandler.GetAccountHolderNotificationRequest(jsonPayload, out AccountHolderNotificationRequest accountHolderUpdatedWebhook); - - Assert.IsNotNull(accountHolderUpdatedWebhook); - Assert.AreEqual(accountHolderUpdatedWebhook.Type, AccountHolderNotificationRequest.TypeEnum.Updated); - Assert.AreEqual("YOUR_BALANCE_PLATFORM", accountHolderUpdatedWebhook.Data.BalancePlatform); - Assert.AreEqual("AH00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.Id); - Assert.AreEqual("LE00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.LegalEntityId); - Assert.AreEqual("YOUR_REFERENCE-2412C", accountHolderUpdatedWebhook.Data.AccountHolder.Reference); - Assert.AreEqual(AccountHolder.StatusEnum.Active, accountHolderUpdatedWebhook.Data.AccountHolder.Status); - Assert.IsTrue(accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities.TryGetValue("sendToTransferInstrument", out AccountHolderCapability capabilitiesData)); - Assert.AreEqual(true, capabilitiesData.Enabled); - Assert.AreEqual(true, capabilitiesData.Requested); - Assert.AreEqual(false, capabilitiesData.Allowed); - Assert.AreEqual(AccountHolderCapability.VerificationStatusEnum.Pending, capabilitiesData.VerificationStatus); - Assert.AreEqual(4, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems.Count); - Assert.AreEqual("LE00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].Entity.Id); - Assert.AreEqual(CapabilityProblemEntity.TypeEnum.LegalEntity, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].Entity.Type); - Assert.AreEqual("2_902", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].VerificationErrors[0].Code); - Assert.AreEqual("Terms Of Service forms are not accepted.", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].VerificationErrors[0].Message); - Assert.AreEqual("Accept TOS", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[0].VerificationErrors[0].RemediatingActions[0].Message); - Assert.AreEqual("SE00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].Entity.Id); - Assert.AreEqual(CapabilityProblemEntity.TypeEnum.BankAccount, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].Entity.Type); - Assert.AreEqual("2_8037", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].VerificationErrors[0].Code); - Assert.AreEqual("'bankStatement' was missing.", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].VerificationErrors[0].Message); - Assert.AreEqual("Upload a bank statement", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[1].VerificationErrors[0].RemediatingActions[0].Message); - Assert.AreEqual("SE00000000000000000002", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].Entity.Id); - Assert.AreEqual(CapabilityProblemEntity.TypeEnum.BankAccount, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].Entity.Type); - Assert.AreEqual("2_8037", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].VerificationErrors[0].Code); - Assert.AreEqual("'bankStatement' was missing.", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].VerificationErrors[0].Message); - Assert.AreEqual("Upload a bank statement", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[2].VerificationErrors[0].RemediatingActions[0].Message); - Assert.AreEqual("LE00000000000000000001", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].Entity.Id); - Assert.AreEqual(CapabilityProblemEntity.TypeEnum.LegalEntity, accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].Entity.Type); - Assert.AreEqual("2_8189", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].VerificationErrors[0].Code); - Assert.AreEqual("'UBO through control' was missing.", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].VerificationErrors[0].Message); - Assert.AreEqual("Add 'organization.entityAssociations' of type 'uboThroughControl' to legal entity", accountHolderUpdatedWebhook.Data.AccountHolder.Capabilities["sendToTransferInstrument"].Problems[3].VerificationErrors[0].RemediatingActions[0].Message); - Assert.AreEqual("live", accountHolderUpdatedWebhook.Environment); - Assert.AreEqual(DateTime.Parse("2024-12-15T15:42:03+01:00"), accountHolderUpdatedWebhook.Timestamp); - } - - [TestMethod] - public void Test_POC_Integration() - { - string jsonPayload = @" -{ - 'data': { - 'balancePlatform': 'YOUR_BALANCE_PLATFORM', - 'accountHolder': { - 'contactDetails': { - 'address': { - 'country': 'NL', - 'houseNumberOrName': '274', - 'postalCode': '1020CD', - 'street': 'Brannan Street' - }, - 'email': 's.hopper@example.com', - 'phone': { - 'number': '+315551231234', - 'type': 'Mobile' - } - }, - 'description': 'S.Hopper - Staff 123', - 'id': 'AH00000000000000000000001', - 'status': 'Active' - } - }, - 'environment': 'test', - 'type': 'balancePlatform.accountHolder.created' -}"; - - var handler = new BalancePlatformWebhookHandler(); - var response = handler.GetGenericBalancePlatformWebhook(jsonPayload); - try - { - if (response.GetType() == typeof(AccountHolderNotificationRequest)) - { - var accountHolderNotificationRequest = (AccountHolderNotificationRequest)response; - Assert.AreEqual(accountHolderNotificationRequest.Environment, "test"); - } - - if (response.GetType() == typeof(BalanceAccountNotificationRequest)) - { - var balanceAccountNotificationRequest = (BalanceAccountNotificationRequest)response; - Assert.Fail(balanceAccountNotificationRequest.Data.BalancePlatform); - } - } - catch (System.Exception e) - { - Assert.Fail(); - throw new System.Exception(e.ToString()); - } - } - - [TestMethod] - public void Test_TransactionWebhook_V4() - { - // Arrange - const string jsonPayload = @" -{ - 'data': { - 'id': 'EVJN42272224222B5JB8BRC84N686ZEUR', - 'amount': { - 'value': 7000, - 'currency': 'EUR' - }, - 'status': 'booked', - 'transfer': { - 'id': 'JN4227222422265', - 'reference': 'Split_item_1', - }, - 'valueDate': '2023-03-01T00:00:00+02:00', - 'bookingDate': '2023-02-28T13:30:20+02:00', - 'creationDate': '2023-02-28T13:30:05+02:00', - 'accountHolder': { - 'id': 'AH00000000000000000000001', - 'description': 'Your description for the account holder', - 'reference': 'Your reference for the account holder' - }, - 'balanceAccount': { - 'id': 'BA00000000000000000000001', - 'description': 'Your description for the balance account', - 'reference': 'Your reference for the balance account' - }, - 'balancePlatform': 'YOUR_BALANCE_PLATFORM' - }, - 'type': 'balancePlatform.transaction.created', - 'environment': 'test' -}"; - Assert.IsFalse(_balancePlatformWebhookHandler.GetPaymentNotificationRequest(jsonPayload, out var _)); - - // Act - _balancePlatformWebhookHandler.GetTransactionNotificationRequestV4(jsonPayload, out TransactionNotificationRequestV4 target); - - // Assert - Assert.IsNotNull(target); - Assert.AreEqual(TransactionNotificationRequestV4.TypeEnum.BalancePlatformTransactionCreated, target.Type); - Assert.AreEqual(Transaction.StatusEnum.Booked, target.Data.Status); - Assert.AreEqual("BA00000000000000000000001", target.Data.BalanceAccount.Id); - Assert.IsTrue(target.Data.ValueDate.Equals(DateTime.Parse("2023-03-01T00:00:00+02:00"))); - Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); - Assert.AreEqual("AH00000000000000000000001", target.Data.AccountHolder.Id); - Assert.AreEqual("Your description for the account holder", target.Data.AccountHolder.Description); - Assert.AreEqual("Your reference for the account holder", target.Data.AccountHolder.Reference); - Assert.AreEqual("JN4227222422265", target.Data.Transfer.Id); - Assert.AreEqual("Split_item_1", target.Data.Transfer.Reference); - Assert.AreEqual(DateTime.Parse("2023-02-28T13:30:05+02:00"), target.Data.CreationDate); - Assert.AreEqual(DateTime.Parse("2023-02-28T13:30:20+02:00"), target.Data.BookingDate); - Assert.AreEqual(7000, target.Data.Amount.Value); - Assert.AreEqual("EUR", target.Data.Amount.Currency); - Assert.AreEqual("test", target.Environment); - } - - [TestMethod] - public void Test_ReportCreatedWebhook() - { - // Arrange - const string jsonPayload = @" -{ - 'data': { - 'balancePlatform': 'YOUR_BALANCE_PLATFORM', - 'creationDate': '2024-07-02T02:01:08+02:00', - 'id': 'balanceplatform_accounting_report_2024_07_01.csv', - 'downloadUrl': 'https://balanceplatform-test.adyen.com/balanceplatform/.../.../.../balanceplatform_accounting_report_2024_07_01.csv', - 'fileName': 'balanceplatform_accounting_report_2024_07_01.csv', - 'reportType': 'balanceplatform_accounting_report' - }, - 'environment': 'test', - 'timestamp': '2024-07-02T02:01:05+02:00', - 'type': 'balancePlatform.report.created' -}"; - - // Act - _balancePlatformWebhookHandler.GetReportNotificationRequest(jsonPayload, out ReportNotificationRequest target); - - // Assert - Assert.IsNotNull(target); - Assert.AreEqual(target.Type, ReportNotificationRequest.TypeEnum.BalancePlatformReportCreated); - Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); - Assert.AreEqual("balanceplatform_accounting_report_2024_07_01.csv", target.Data.Id); - Assert.AreEqual("balanceplatform_accounting_report_2024_07_01.csv", target.Data.FileName); - Assert.AreEqual("balanceplatform_accounting_report", target.Data.ReportType); - Assert.AreEqual(DateTime.Parse("2024-07-02T02:01:08+02:00"), target.Data.CreationDate); - Assert.AreEqual("https://balanceplatform-test.adyen.com/balanceplatform/.../.../.../balanceplatform_accounting_report_2024_07_01.csv", target.Data.DownloadUrl); - Assert.AreEqual("test", target.Environment); - Assert.AreEqual(DateTime.Parse("2024-07-02T02:01:05+02:00"), target.Timestamp); - } - - [TestMethod] - public void Test_AuthenticationCreatedWebhook() - { - // Arrange - const string jsonPayload = @" -{ - 'data': { - 'authentication': { - 'acsTransId': '6a4c1709-a42e-4c7f-96c7-1043adacfc97', - 'challenge': { - 'flow': 'OOB_TRIGGER_FL', - 'lastInteraction': '2022-12-22T15:49:03+01:00' - }, - 'challengeIndicator': '01', - 'createdAt': '2022-12-22T15:45:03+01:00', - 'deviceChannel': 'app', - 'dsTransID': 'a3b86754-444d-46ca-95a2-ada351d3f42c', - 'exemptionIndicator': 'lowValue', - 'inPSD2Scope': true, - 'messageCategory': 'payment', - 'messageVersion': '2.2.0', - 'riskScore': 0, - 'threeDSServerTransID': '6edcc246-23ee-4e94-ac5d-8ae620bea7d9', - 'transStatus': 'Y', - 'type': 'challenge' - }, - 'balancePlatform': 'YOUR_BALANCE_PLATFORM', - 'id': '497f6eca-6276-4993-bfeb-53cbbbba6f08', - 'paymentInstrumentId': 'PI3227C223222B5BPCMFXD2XG', - 'purchase': { - 'date': '2022-12-22T15:49:03+01:00', - 'merchantName': 'MyShop', - 'originalAmount': { - 'currency': 'EUR', - 'value': 1000 - } - }, - 'status': 'authenticated' - }, - 'environment': 'test', - 'timestamp': '2022-12-22T15:42:03+01:00', - 'type': 'balancePlatform.authentication.created' -}"; - - // Act - _balancePlatformWebhookHandler.GetAuthenticationNotificationRequest(jsonPayload, out AuthenticationNotificationRequest target); - - // Assert - Assert.IsNotNull(target); - Assert.AreEqual(target.Type, AuthenticationNotificationRequest.TypeEnum.BalancePlatformAuthenticationCreated); - Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); - Assert.AreEqual("497f6eca-6276-4993-bfeb-53cbbbba6f08", target.Data.Id); - Assert.AreEqual("PI3227C223222B5BPCMFXD2XG", target.Data.PaymentInstrumentId); - Assert.AreEqual(AuthenticationNotificationData.StatusEnum.Authenticated, target.Data.Status); - Assert.AreEqual("MyShop", target.Data.Purchase.MerchantName); - Assert.AreEqual("2022-12-22T15:49:03+01:00", target.Data.Purchase.Date); - Assert.AreEqual("EUR", target.Data.Purchase.OriginalAmount.Currency); - Assert.AreEqual(1000, target.Data.Purchase.OriginalAmount.Value); - Assert.AreEqual(DateTime.Parse("2022-12-22T15:45:03+01:00"), target.Data.Authentication.CreatedAt); - Assert.AreEqual(AuthenticationInfo.DeviceChannelEnum.App, target.Data.Authentication.DeviceChannel); - Assert.AreEqual(ChallengeInfo.FlowEnum.OOBTRIGGERFL, target.Data.Authentication.Challenge.Flow); - Assert.AreEqual(DateTime.Parse("2022-12-22T15:49:03+01:00"), target.Data.Authentication.Challenge.LastInteraction); - Assert.AreEqual(AuthenticationInfo.ChallengeIndicatorEnum._01, target.Data.Authentication.ChallengeIndicator); - Assert.AreEqual(AuthenticationInfo.ExemptionIndicatorEnum.LowValue, target.Data.Authentication.ExemptionIndicator); - Assert.AreEqual(true, target.Data.Authentication.InPSD2Scope); - Assert.AreEqual(AuthenticationInfo.MessageCategoryEnum.Payment, target.Data.Authentication.MessageCategory); - Assert.AreEqual("2.2.0", target.Data.Authentication.MessageVersion); - Assert.AreEqual(0, target.Data.Authentication.RiskScore); - Assert.AreEqual("6edcc246-23ee-4e94-ac5d-8ae620bea7d9", target.Data.Authentication.ThreeDSServerTransID); - Assert.AreEqual(AuthenticationInfo.TransStatusEnum.Y, target.Data.Authentication.TransStatus); - Assert.AreEqual("test", target.Environment); - Assert.AreEqual(DateTime.Parse("2022-12-22T15:42:03+01:00"), target.Timestamp); - } - - [TestMethod] - public void Test_NegativeBalanceCompensationWarningWebhook() - { - // Arrange - const string jsonPayload = @" -{ - 'data': { - 'balancePlatform': 'YOUR_BALANCE_PLATFORM', - 'creationDate': '2024-07-02T02:01:08+02:00', - 'id': 'BA00000000000000000001', - 'accountHolder': { - 'description': 'Description for the account holder.', - 'reference': 'YOUR_REFERENCE', - 'id': 'AH00000000000000000001' - }, - 'amount': { - 'currency': 'EUR', - 'value': -145050 - }, - 'liableBalanceAccountId': 'BA11111111111111111111', - 'negativeBalanceSince': '2024-10-19T00:33:13+02:00', - 'scheduledCompensationAt': '2024-12-01T01:00:00+01:00' - }, - 'environment': 'test', - 'timestamp': '2024-10-22T00:00:00+02:00', - 'type': 'balancePlatform.negativeBalanceCompensationWarning.scheduled' -}"; - - // Act - _balancePlatformWebhookHandler.GetNegativeBalanceCompensationWarningNotificationRequest(jsonPayload, out NegativeBalanceCompensationWarningNotificationRequest target); - - // Assert - Assert.IsNotNull(target); - Assert.AreEqual(NegativeBalanceCompensationWarningNotificationRequest.TypeEnum.BalancePlatformNegativeBalanceCompensationWarningScheduled, target.Type); - Assert.AreEqual("YOUR_BALANCE_PLATFORM", target.Data.BalancePlatform); - Assert.AreEqual(DateTime.Parse("2024-07-02T02:01:08+02:00"), target.Data.CreationDate); - Assert.AreEqual("BA00000000000000000001", target.Data.Id); - Assert.AreEqual("YOUR_REFERENCE", target.Data.AccountHolder.Reference); - Assert.AreEqual("EUR", target.Data.Amount.Currency); - Assert.AreEqual(-145050, target.Data.Amount.Value); - Assert.AreEqual("BA11111111111111111111", target.Data.LiableBalanceAccountId); - Assert.AreEqual(DateTime.Parse("2024-10-19T00:33:13+02:00"), target.Data.NegativeBalanceSince); - Assert.AreEqual(DateTime.Parse("2024-12-01T01:00:00+01:00"), target.Data.ScheduledCompensationAt); - Assert.AreEqual("test", target.Environment); - Assert.AreEqual(DateTime.Parse("2024-10-22T00:00:00+02:00"), target.Timestamp); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/WebhooksTests/ManagementWebhookHandlerTest.cs b/Adyen.Test/WebhooksTests/ManagementWebhookHandlerTest.cs deleted file mode 100644 index 2e7d4d78b..000000000 --- a/Adyen.Test/WebhooksTests/ManagementWebhookHandlerTest.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using Adyen.Model.ManagementWebhooks; -using Adyen.Webhooks; -using Microsoft.VisualStudio.TestTools.UnitTesting; - -namespace Adyen.Test.WebhooksTests -{ - [TestClass] - public class ManagementWebhookHandlerTest : BaseTest - { - private readonly ManagementWebhookHandler _managementWebhookHandler = new ManagementWebhookHandler(); - - [TestMethod] - public void Test_Management_Webhook_PaymentMethodCreated() - { - // Arrange - const string jsonPayload = @" -{ - 'createdAt': '2022-01-24T14:59:11+01:00', - 'data': { - 'id': 'PM3224R223224K5FH4M2K9B86', - 'merchantId': 'MERCHANT_ACCOUNT', - 'status': 'SUCCESS', - 'storeId': 'ST322LJ223223K5F4SQNR9XL5', - 'type': 'visa' - }, - 'environment': 'test', - 'type': 'paymentMethod.created' -}"; - // Act - _managementWebhookHandler.GetPaymentMethodCreatedNotificationRequest(jsonPayload, out PaymentMethodCreatedNotificationRequest paymentMethodCreatedWebhook); - - // Assert - Assert.IsNotNull(paymentMethodCreatedWebhook); - Assert.AreEqual(PaymentMethodCreatedNotificationRequest.TypeEnum.PaymentMethodCreated, paymentMethodCreatedWebhook.Type); - Assert.AreEqual(paymentMethodCreatedWebhook.Data.Id, "PM3224R223224K5FH4M2K9B86"); - Assert.AreEqual(paymentMethodCreatedWebhook.Data.MerchantId, "MERCHANT_ACCOUNT"); - Assert.AreEqual(paymentMethodCreatedWebhook.Data.Status, MidServiceNotificationData.StatusEnum.Success); - Assert.AreEqual(paymentMethodCreatedWebhook.Data.StoreId, "ST322LJ223223K5F4SQNR9XL5"); - Assert.AreEqual(paymentMethodCreatedWebhook.Data.Type, "visa"); - Assert.AreEqual(DateTime.Parse("2022-01-24T14:59:11+01:00"), paymentMethodCreatedWebhook.CreatedAt); - Assert.AreEqual("test", paymentMethodCreatedWebhook.Environment); - } - - [TestMethod] - public void Test_Management_Webhook_MerchantUpdated() - { - // Arrange - const string jsonPayload = @" -{ - 'type': 'merchant.updated', - 'environment': 'test', - 'createdAt': '2022-09-20T13:42:31+02:00', - 'data': { - 'capabilities': { - 'receivePayments': { - 'allowed': true, - 'requested': true, - 'requestedLevel': 'notApplicable', - 'verificationStatus': 'valid' - } - }, - 'legalEntityId': 'LE322KH223222F5GNNW694PZN', - 'merchantId': 'YOUR_MERCHANT_ID', - 'status': 'PreActive' - } -}"; - // Act - _managementWebhookHandler.GetMerchantUpdatedNotificationRequest(jsonPayload, out MerchantUpdatedNotificationRequest target); - - // Assert - Assert.IsNotNull(target); - Assert.AreEqual(target.Type, MerchantUpdatedNotificationRequest.TypeEnum.MerchantUpdated); - Assert.AreEqual("LE322KH223222F5GNNW694PZN", target.Data.LegalEntityId); - Assert.AreEqual("YOUR_MERCHANT_ID", target.Data.MerchantId); - Assert.AreEqual("PreActive", target.Data.Status); - Assert.AreEqual(DateTime.Parse("2022-09-20T13:42:31+02:00"), target.CreatedAt); - Assert.AreEqual("test", target.Environment); - - Assert.IsTrue(target.Data.Capabilities.TryGetValue("receivePayments", out AccountCapabilityData accountCapabilityData)); - Assert.AreEqual(true, accountCapabilityData.Requested); - Assert.AreEqual("notApplicable", accountCapabilityData.RequestedLevel); - } - - [TestMethod] - public void Test_Management_Webhook_MerchantCreated() - { - // Arrange - const string jsonPayload = @" -{ - 'type': 'merchant.created', - 'environment': 'test', - 'createdAt': '2022-08-12T10:50:01+02:00', - 'data': { - 'capabilities': { - 'sendToTransferInstrument': { - 'requested': true, - 'requestedLevel': 'notApplicable' - } - }, - 'companyId': 'YOUR_COMPANY_ID', - 'merchantId': 'MC3224X22322535GH8D537TJR', - 'status': 'PreActive' - } -}"; - Assert.IsFalse(_managementWebhookHandler.GetMerchantUpdatedNotificationRequest(jsonPayload, out _)); - - // Act - _managementWebhookHandler.GetMerchantCreatedNotificationRequest(jsonPayload, out MerchantCreatedNotificationRequest target); - - // Assert - Assert.IsNotNull(target); - Assert.AreEqual(MerchantCreatedNotificationRequest.TypeEnum.MerchantCreated, target.Type); - Assert.AreEqual("test", target.Environment); - Assert.AreEqual("YOUR_COMPANY_ID", target.Data.CompanyId); - Assert.AreEqual("MC3224X22322535GH8D537TJR", target.Data.MerchantId); - Assert.AreEqual("PreActive", target.Data.Status); - Assert.AreEqual(DateTime.Parse("2022-08-12T10:50:01+02:00"), target.CreatedAt); - Assert.IsTrue(target.Data.Capabilities.TryGetValue("sendToTransferInstrument", out AccountCapabilityData data)); - Assert.AreEqual("notApplicable", data.RequestedLevel); - Assert.AreEqual(true, data.Requested); - } - } -} \ No newline at end of file diff --git a/Adyen.Test/mockHttpClient.cs b/Adyen.Test/mockHttpClient.cs deleted file mode 100644 index 978a21c89..000000000 --- a/Adyen.Test/mockHttpClient.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Net; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; - -public class MockHttpMessageHandler : HttpMessageHandler -{ - private readonly string _response; - private readonly HttpStatusCode _statusCode; - - public string Input { get; private set; } - public int NumberOfCalls { get; private set; } - - public MockHttpMessageHandler(string response, HttpStatusCode statusCode) - { - _response = response; - _statusCode = statusCode; - } - - protected override async Task SendAsync(HttpRequestMessage request, - CancellationToken cancellationToken) - { - NumberOfCalls++; - if (request.Content != null) // Could be a GET-request without a body - { - Input = await request.Content.ReadAsStringAsync(); - } - return new HttpResponseMessage - { - StatusCode = _statusCode, - Content = new StringContent(_response) - }; - } -} \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/AccountHolder.json b/Adyen.Test/mocks/balanceplatform/AccountHolder.json index 8c75be5a9..4f8c64960 100644 --- a/Adyen.Test/mocks/balanceplatform/AccountHolder.json +++ b/Adyen.Test/mocks/balanceplatform/AccountHolder.json @@ -11,9 +11,10 @@ "email": "s.hopper@example.com", "phone": { "number": "+315551231234", - "type": "Mobile" + "type": "mobile" } }, + "legalEntityId": "LE322JV223222D5GG42KN6869", "description": "S.Hopper - Staff 123", "id": "AH32272223222B5CM4MWJ892H", "status": "active" diff --git a/Adyen.Test/mocks/balanceplatform/AccountHolderAdditionalAttribute.json b/Adyen.Test/mocks/balanceplatform/AccountHolderAdditionalAttribute.json deleted file mode 100644 index d9ce3797c..000000000 --- a/Adyen.Test/mocks/balanceplatform/AccountHolderAdditionalAttribute.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "balancePlatform": "BalandePlatformExample", - "contactDetails": { - "address": { - "city": "Amsterdam", - "country": "NL", - "houseNumberOrName": "274", - "postalCode": "1020CD", - "street": "Brannan Street" - }, - "email": "s.hopper@example.com", - "phone": { - "number": "+315551231234", - "type": "Mobile" - } - }, - "description": "S.Hopper - Staff 123", - "id": "AH32272223222B5CM4MWJ892H", - "status": "active", - "additionalAttribute": "something" -} \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/AccountHolderWithUnknownEnum.json b/Adyen.Test/mocks/balanceplatform/AccountHolderWithUnknownEnum.json new file mode 100644 index 000000000..a16376ddc --- /dev/null +++ b/Adyen.Test/mocks/balanceplatform/AccountHolderWithUnknownEnum.json @@ -0,0 +1,21 @@ +{ + "balancePlatform": "BalandePlatformExample", + "contactDetails": { + "address": { + "city": "Amsterdam", + "country": "NL", + "houseNumberOrName": "274", + "postalCode": "1020CD", + "street": "Brannan Street" + }, + "email": "s.hopper@example.com", + "phone": { + "number": "+315551231234", + "type": "mobile" + } + }, + "legalEntityId": "LE322JV223222D5GG42KN6869", + "description": "S.Hopper - Staff 123", + "id": "AH32272223222B5CM4MWJ892H", + "status": "unknown-enum" +} \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/BalanceAccount.json b/Adyen.Test/mocks/balanceplatform/BalanceAccount.json index 5e7d9ba9e..f36f0a1bb 100644 --- a/Adyen.Test/mocks/balanceplatform/BalanceAccount.json +++ b/Adyen.Test/mocks/balanceplatform/BalanceAccount.json @@ -1,6 +1,8 @@ { - "accountHolderId": "AH32272223222B59K6RTQBFNZ", + "accountHolderId": "AH32272223222C5GXTD343TKP", "defaultCurrencyCode": "EUR", + "description": "S.Hopper - Main balance account", + "timeZone": "Europe/Amsterdam", "balances": [ { "available": 0, @@ -9,6 +11,6 @@ "reserved": 0 } ], - "id": "BA3227C223222B5BLP6JQC3FD", - "status": "Active" + "id": "BA3227C223222H5J4DCGQ9V9L", + "status": "active" } \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/PaginatedAccountHoldersResponse.json b/Adyen.Test/mocks/balanceplatform/PaginatedAccountHoldersResponse.json index 4b65c66f5..be1201a7c 100644 --- a/Adyen.Test/mocks/balanceplatform/PaginatedAccountHoldersResponse.json +++ b/Adyen.Test/mocks/balanceplatform/PaginatedAccountHoldersResponse.json @@ -1,34 +1,27 @@ { "accountHolders": [ { - "contactDetails": { - "address": { - "city": "Amsterdam", - "country": "NL", - "houseNumberOrName": "6", - "postalCode": "12336750", - "street": "Simon Carmiggeltstraat" - } - }, - "description": "J. Doe", - "id": "AH32272223222B59DDWSCCMP7", - "status": "Active" + "description": "Test-305", + "legalEntityId": "LE3227C223222D5D8S5S33M4M", + "reference": "LegalEntity internal error test", + "id": "AH32272223222B5GFSNSXFFL9", + "status": "active" }, { - "contactDetails": { - "address": { - "city": "Amsterdam", - "country": "NL", - "houseNumberOrName": "11", - "postalCode": "12336750", - "street": "Simon Carmiggeltstraat" - } - }, - "description": "S. Hopper", - "id": "AH32272223222B59DJ7QBCMPN", - "status": "Active" + "description": "Test-751", + "legalEntityId": "LE3227C223222D5D8S5TT3SRX", + "reference": "LegalEntity internal error test", + "id": "AH32272223222B5GFSNVGFFM7", + "status": "active" + }, + { + "description": "Explorer Holder", + "legalEntityId": "LE3227C223222D5D8S5TT3SRX", + "reference": "Account from the Explorer Holder", + "id": "AH32272223222B5GFWNRFFVR6", + "status": "active" } ], - "hasNext": "true", - "hasPrevious": "false" + "hasNext": true, + "hasPrevious": true } \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/PaginatedBalanceAccountsResponse.json b/Adyen.Test/mocks/balanceplatform/PaginatedBalanceAccountsResponse.json index 58706682f..fb1bc8842 100644 --- a/Adyen.Test/mocks/balanceplatform/PaginatedBalanceAccountsResponse.json +++ b/Adyen.Test/mocks/balanceplatform/PaginatedBalanceAccountsResponse.json @@ -1,22 +1,31 @@ { "balanceAccounts": [ { - "accountHolderId": "AH32272223222B59K6ZKBBFNQ", + "accountHolderId": "AH32272223222B5CTBMZT6W2V", "defaultCurrencyCode": "EUR", - "id": "BA32272223222B59K6ZXHBFN6", - "status": "Active" + "description": "S. Hopper - Main Account", + "reference": "YOUR_REFERENCE-X173L", + "timeZone": "Europe/Amsterdam", + "id": "BA32272223222B5CTDNB66W2Z", + "status": "active" }, { - "accountHolderId": "AH32272223222B59K6ZKBBFNQ", + "accountHolderId": "AH32272223222B5CTBMZT6W2V", "defaultCurrencyCode": "EUR", - "id": "BA32272223222B59K72CKBFNJ", - "status": "closed" + "description": "S. Hopper - Main Account", + "reference": "YOUR_REFERENCE-X173L", + "timeZone": "Europe/Amsterdam", + "id": "BA32272223222B5CTDQPM6W2H", + "status": "active" }, { - "accountHolderId": "AH32272223222B59K6ZKBBFNQ", + "accountHolderId": "AH32272223222B5CTBMZT6W2V", "defaultCurrencyCode": "EUR", - "id": "BA32272223222B5BRR27B2M7G", - "status": "Active" + "description": "S. Hopper - Main Account", + "reference": "YOUR_REFERENCE-X173L", + "timeZone": "Europe/Amsterdam", + "id": "BA32272223222B5CVF5J63LMW", + "status": "active" } ], "hasNext": true, diff --git a/Adyen.Test/mocks/balanceplatform/PaginatedPaymentInstrumentsResponse.json b/Adyen.Test/mocks/balanceplatform/PaginatedPaymentInstrumentsResponse.json index 23bf0add2..585cfdc6d 100644 --- a/Adyen.Test/mocks/balanceplatform/PaginatedPaymentInstrumentsResponse.json +++ b/Adyen.Test/mocks/balanceplatform/PaginatedPaymentInstrumentsResponse.json @@ -1,13 +1,14 @@ { - "hasNext": "true", - "hasPrevious": "false", + "hasNext": true, + "hasPrevious": false, "paymentInstruments": [ { "balanceAccountId": "BA32272223222B59CZ3T52DKZ", "issuingCountryCode": "GB", - "status": "Active", + "status": "active", "type": "card", "card": { + "brand": "mc", "brandVariant": "mc", "cardholderName": "name", "formFactor": "virtual", @@ -24,9 +25,10 @@ { "balanceAccountId": "BA32272223222B59CZ3T52DKZ", "issuingCountryCode": "GB", - "status": "Active", + "status": "active", "type": "card", "card": { + "brand": "mc", "brandVariant": "mc", "cardholderName": "name", "formFactor": "virtual", diff --git a/Adyen.Test/mocks/balanceplatform/PaymentInstrument.json b/Adyen.Test/mocks/balanceplatform/PaymentInstrument.json index ab6c7493e..48984ca79 100644 --- a/Adyen.Test/mocks/balanceplatform/PaymentInstrument.json +++ b/Adyen.Test/mocks/balanceplatform/PaymentInstrument.json @@ -1,6 +1,13 @@ { + "balanceAccountId": "BA3227C223222B5CTBLR8BWJB", + "issuingCountryCode": "NL", + "status": "active", "type": "bankAccount", "description": "YOUR_DESCRIPTION", - "balanceAccountId": "BA3227C223222B5CTBLR8BWJB", - "issuingCountryCode": "NL" + "bankAccount": { + "formFactor": "physical", + "type": "iban", + "iban": "NL20ADYB2017000035" + }, + "id": "PI322LJ223222B5DJS7CD9LWL" } \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/SweepConfiguration.json b/Adyen.Test/mocks/balanceplatform/SweepConfiguration.json index 719d05edc..f27b44936 100644 --- a/Adyen.Test/mocks/balanceplatform/SweepConfiguration.json +++ b/Adyen.Test/mocks/balanceplatform/SweepConfiguration.json @@ -1,4 +1,5 @@ { + "id": "SWPC4227C224555B5FTD2NT2JV4WN5", "counterparty": { "merchantAccount": "YOUR_MERCHANT_ACCOUNT" }, diff --git a/Adyen.Test/mocks/balanceplatform/TransactionRuleResponse.json b/Adyen.Test/mocks/balanceplatform/TransactionRuleResponse.json index 8477e3717..fa6007f21 100644 --- a/Adyen.Test/mocks/balanceplatform/TransactionRuleResponse.json +++ b/Adyen.Test/mocks/balanceplatform/TransactionRuleResponse.json @@ -1,15 +1,28 @@ { "transactionRule": { - "description": "Allow 5 transactions per month", + "description": "Only allow point-of-sale transactions", + "entityKey": { + "entityReference": "PI3227C223222B5FN65FN5NS9", + "entityType": "paymentInstrument" + }, "interval": { - "type": "monthly" + "timeZone": "UTC", + "type": "perTransaction" + }, + "outcomeType": "hardBlock", + "reference": "YOUR_REFERENCE_4F7346", + "requestType": "authorization", + "ruleRestrictions": { + "processingTypes": { + "operation": "noneMatch", + "value": [ + "pos" + ] + } }, - "maxTransactions": 5, - "paymentInstrumentId": "PI3227C223222B59KGTXP884R", - "reference": "myRule12345", - "startDate": "2021-01-25T12:46:35", + "startDate": "2022-08-02T16:07:00.851374+02:00", "status": "active", - "type": "velocity", - "id": "TR32272223222B5CMD3V73HXG" + "type": "blockList", + "id": "TR32272223222B5GFSGFLFCHM" } } \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/TransactionRulesResponse.json b/Adyen.Test/mocks/balanceplatform/TransactionRulesResponse.json index 89b977c5f..57b77005a 100644 --- a/Adyen.Test/mocks/balanceplatform/TransactionRulesResponse.json +++ b/Adyen.Test/mocks/balanceplatform/TransactionRulesResponse.json @@ -1,33 +1,66 @@ { "transactionRules": [ { - "description": "Allow 5 transactions per month", + "aggregationLevel": "paymentInstrument", + "description": "Up to 1000 EUR per card for the last 12 hours", + "entityKey": { + "entityReference": "PG3227C223222C5GXR3M5592Q", + "entityType": "paymentInstrumentGroup" + }, "interval": { - "type": "monthly" + "duration": { + "unit": "hours", + "value": 12 + }, + "timeZone": "UTC", + "type": "sliding" }, - "maxTransactions": 5, - "paymentInstrumentGroupId": "PG3227C223222B5CMD3FJFKGZ", - "reference": "myRule12345", - "startDate": "2021-01-25T12:46:35", - "status": "active", + "outcomeType": "hardBlock", + "reference": "YOUR_REFERENCE_2918A", + "requestType": "authorization", + "ruleRestrictions": { + "totalAmount": { + "operation": "greaterThan", + "value": { + "currency": "EUR", + "value": 100000 + } + } + }, + "status": "inactive", "type": "velocity", - "id": "TR32272223222B5CMDGMC9F4F" + "id": "TR3227C223222C5GXR3XP596N" }, { - "amount": { - "currency": "EUR", - "value": 10000 + "aggregationLevel": "paymentInstrument", + "description": "NL only", + "entityKey": { + "entityReference": "PG3227C223222C5GXR3M5592Q", + "entityType": "paymentInstrumentGroup" }, - "description": "Allow up to 100 EUR per month", "interval": { - "type": "monthly" + "duration": { + "unit": "hours", + "value": 12 + }, + "timeZone": "UTC", + "type": "sliding" + }, + "outcomeType": "hardBlock", + "reference": "myRule12345", + "requestType": "authorization", + "ruleRestrictions": { + "totalAmount": { + "operation": "greaterThan", + "value": { + "currency": "EUR", + "value": 100000 + } + } }, - "paymentInstrumentGroupId": "PG3227C223222B5CMD3FJFKGZ", - "reference": "myRule16378", - "startDate": "2021-01-25T12:46:35", - "status": "active", + "status": "inactive", "type": "velocity", - "id": "TR32272223222B5CMDGT89F4F" + "id": "TR3227C223222C5GXR3WC595H" } ] } \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/TransferLimit.json b/Adyen.Test/mocks/balanceplatform/TransferLimit.json new file mode 100644 index 000000000..65dd9a775 --- /dev/null +++ b/Adyen.Test/mocks/balanceplatform/TransferLimit.json @@ -0,0 +1,16 @@ +{ + "amount": { + "value": 10000, + "currency": "EUR" + }, + "id": "TRLI00000000000000000000000001", + "scope": "perTransaction", + "reference": "Your reference for the transfer limit", + "scaInformation": { + "status": "pending" + }, + "startsAt": "2025-08-15T06:36:20+01:00", + "endsAt": "2026-08-13T23:00:00+01:00", + "limitStatus": "pendingSCA", + "transferType": "all" +} \ No newline at end of file diff --git a/Adyen.Test/mocks/balanceplatform/TransferLimits.json b/Adyen.Test/mocks/balanceplatform/TransferLimits.json new file mode 100644 index 000000000..16b055e4c --- /dev/null +++ b/Adyen.Test/mocks/balanceplatform/TransferLimits.json @@ -0,0 +1,38 @@ +{ + "transferLimits": [ + { + "amount": { + "value": 10000, + "currency": "EUR" + }, + "id": "TRLI00000000000000000000000001", + "endsAt": "2026-08-13T23:00:00+01:00", + "scope": "perTransaction", + "reference": "Your reference for the transfer limit", + "scaInformation": { + "exemption": "initialLimit", + "status": "notPerformed" + }, + "startsAt": "2025-08-13T23:00:00+01:00", + "limitStatus": "active", + "transferType": "instant" + }, + { + "amount": { + "value": 20000, + "currency": "EUR" + }, + "id": "TRLI00000000000000000000000002", + "endsAt": "2026-08-13T23:00:00+01:00", + "scope": "perTransaction", + "reference": "Your reference for the transfer limit", + "scaInformation": { + "exemption": "initialLimit", + "status": "notPerformed" + }, + "startsAt": "2025-08-13T23:00:00+01:00", + "limitStatus": "active", + "transferType": "all" + } + ] +} \ No newline at end of file diff --git a/Adyen.Test/mocks/checkout/card-details-success.json b/Adyen.Test/mocks/checkout/card-details-success.json index 5945d09d7..697b8abfa 100644 --- a/Adyen.Test/mocks/checkout/card-details-success.json +++ b/Adyen.Test/mocks/checkout/card-details-success.json @@ -2,11 +2,14 @@ "brands": [ { "type": "visa", - "supported": "true" + "supported": true }, { "type": "cartebancaire", - "supported": "true" + "supported": false } - ] + ], + "fundingSource": "CREDIT", + "isCardCommercial": false, + "issuingCountryCode": "FR" } \ No newline at end of file diff --git a/Adyen.Test/mocks/checkout/payment-links-success.json b/Adyen.Test/mocks/checkout/payment-links-success.json index 2787a6788..ebf4be12c 100644 --- a/Adyen.Test/mocks/checkout/payment-links-success.json +++ b/Adyen.Test/mocks/checkout/payment-links-success.json @@ -1,4 +1,6 @@ { + "id": "your-id", + "status": "active", "amount": { "currency": "BRL", "value": 1250 diff --git a/Adyen.Test/mocks/checkout/payment-methods-response.json b/Adyen.Test/mocks/checkout/payment-methods-response.json new file mode 100644 index 000000000..693ce5251 --- /dev/null +++ b/Adyen.Test/mocks/checkout/payment-methods-response.json @@ -0,0 +1,151 @@ +{ + "paymentMethods": [ + { + "name": "AliPay", + "type": "alipay" + }, + { + "brands": [ + "cartebancaire", + "amex", + "mc", + "visa" + ], + "configuration": { + "mcDpaId": "6d41d4d6-45b1-42c3-a5d0-a28c0e69d4b1_dpa2", + "visaSrcInitiatorId": "B9SECVKIQX2SOBQ6J9X721dVBBKHhJJl1nxxVbemHGn5oB6S8", + "mcSrcClientId": "6d41d4d6-45b1-42c3-a5d0-a28c0e69d4b1", + "visaSrciDpaId": "8e6e347c-254e-863f-0e6a-196bf2d9df02" + }, + "name": "Cards", + "type": "scheme" + }, + { + "configuration": { + "merchantId": "000000000202326", + "merchantName": "TestMerchantAccount" + }, + "name": "Apple Pay", + "type": "applepay" + }, + { + "name": "Payconiq by Bancontact", + "type": "bcmc_mobile" + }, + { + "name": "Boleto Bancario", + "type": "boletobancario" + }, + { + "name": "Online bank transfer.", + "type": "directEbanking" + }, + { + "name": "DOKU", + "type": "doku" + }, + { + "name": "DOKU wallet", + "type": "doku_wallet" + }, + { + "brand": "***************", + "name": "Generic GiftCard", + "type": "giftcard" + }, + { + "brand": "*****", + "name": "Givex", + "type": "giftcard" + }, + { + "name": "GoPay Wallet", + "type": "gopay_wallet" + }, + { + "name": "GrabPay", + "type": "grabpay_SG" + }, + { + "issuers": [ + { + "id": "************", + "name": "*****" + } + ], + "name": "iDEAL", + "type": "ideal" + }, + { + "name": "Korea–issued cards", + "type": "kcp_creditcard" + }, + { + "name": "Pay later with Klarna.", + "type": "klarna" + }, + { + "name": "Pay over time with Klarna.", + "type": "klarna_account" + }, + { + "name": "Pay now with Klarna.", + "type": "klarna_paynow" + }, + { + "name": "MB WAY", + "type": "mbway" + }, + { + "name": "MobilePay", + "type": "mobilepay" + }, + { + "configuration": { + "merchantId": "50", + "gatewayMerchantId": "TestMerchantAccount" + }, + "name": "Google Pay", + "type": "paywithgoogle" + }, + { + "name": "pix", + "type": "pix" + }, + { + "name": "SEPA Direct Debit", + "type": "sepadirectdebit" + }, + { + "brand": "***", + "name": "SVS", + "type": "giftcard" + }, + { + "name": "UPI Collect", + "type": "upi_collect" + }, + { + "name": "UPI Intent", + "type": "upi_intent" + }, + { + "name": "UPI QR", + "type": "upi_qr" + }, + { + "brand": "*********", + "name": "Valuelink", + "type": "giftcard" + }, + { + "name": "Vipps", + "type": "vipps" + }, + { + "brand": "***********", + "name": "VVV Giftcard", + "type": "giftcard" + } + ] +} diff --git a/Adyen.Test/mocks/checkout/payment-request-ideal.json b/Adyen.Test/mocks/checkout/payment-request-ideal.json new file mode 100644 index 000000000..dbe8e74f6 --- /dev/null +++ b/Adyen.Test/mocks/checkout/payment-request-ideal.json @@ -0,0 +1,12 @@ +{ + "amount":{ + "currency":"EUR", + "value":1000 + }, + "merchantAccount":"myMerchantAccount", + "paymentMethod":{ + "type":"ideal" + }, + "reference":"merchantReference", + "returnUrl":"https://your-company.com/.." +} \ No newline at end of file diff --git a/Adyen.Test/mocks/checkout/paymentlinks-recurring-payment-success.json b/Adyen.Test/mocks/checkout/paymentlinks-recurring-payment-success.json deleted file mode 100644 index 628896bea..000000000 --- a/Adyen.Test/mocks/checkout/paymentlinks-recurring-payment-success.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "amount": { - "currency": "EUR", - "value": 100 - }, - "expiresAt": "2020-10-28T12:00:00Z", - "reference": "REFERENCE_NUMBER", - "url": "https://checkoutshopper-test.adyen.com/checkoutshopper/payByLink.shtml?d=YW1vdW50TWlub3JW...JRA", - "merchantAccount": "YOUR_MERCHANT_ACCOUNT" -} \ No newline at end of file diff --git a/Adyen.Test/mocks/checkout/paymentmethods-error-forbidden-403.json b/Adyen.Test/mocks/checkout/paymentmethods-error-forbidden-403.json deleted file mode 100644 index 28afc9887..000000000 --- a/Adyen.Test/mocks/checkout/paymentmethods-error-forbidden-403.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "status": 403, - "errorCode": "901", - "message": "Invalid Merchant Account", - "errorType": "security" -} \ No newline at end of file diff --git a/Adyen.Test/mocks/checkout/payments-success.json b/Adyen.Test/mocks/checkout/payments-success.json index 0deff7d1a..25b34868f 100644 --- a/Adyen.Test/mocks/checkout/payments-success.json +++ b/Adyen.Test/mocks/checkout/payments-success.json @@ -14,81 +14,34 @@ "accountScore": 25, "results": [ { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 2, - "name": "CardChunkUsage" - } + "accountScore": 0, + "checkId": 2, + "name": "CardChunkUsage" }, { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 3, - "name": "PaymentDetailUsage" - } + "accountScore": 0, + "checkId": 3, + "name": "PaymentDetailUsage" }, { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 4, - "name": "HolderNameUsage" - } + "accountScore": 0, + "checkId": 4, + "name": "HolderNameUsage" }, { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 1, - "name": "PaymentDetailRefCheck" - } + "accountScore": 0, + "checkId": 1, + "name": "PaymentDetailRefCheck" }, { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 13, - "name": "IssuerRefCheck" - } + "accountScore": 0, + "checkId": 13, + "name": "IssuerRefCheck" }, { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 15, - "name": "IssuingCountryReferral" - } - }, - { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 27, - "name": "PmOwnerRefCheck" - } - }, - { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 10, - "name": "HolderNameContainsNumber" - } - }, - { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 11, - "name": "HolderNameIsOneWord" - } - }, - { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 82, - "name": "CustomFieldCheck" - } - }, - { - "FraudCheckResult": { - "accountScore": 0, - "checkId": 25, - "name": "CVCAuthResultCheck" - } + "accountScore": 0, + "checkId": 15, + "name": "IssuingCountryReferral" } ] }, diff --git a/Adyen.Test/mocks/checkout/paymentsdetails-error-invalid-data-422.json b/Adyen.Test/mocks/checkout/paymentsdetails-error-invalid-data-422.json deleted file mode 100644 index ce814f1ef..000000000 --- a/Adyen.Test/mocks/checkout/paymentsdetails-error-invalid-data-422.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "status": 422, - "errorCode": "101", - "message": "Invalid card number", - "errorType": "validation" -} \ No newline at end of file diff --git a/Adyen.Test/mocks/checkout/paymentsresult-multibanco-success.json b/Adyen.Test/mocks/checkout/paymentsresult-multibanco-success.json deleted file mode 100644 index 5e2c9d09c..000000000 --- a/Adyen.Test/mocks/checkout/paymentsresult-multibanco-success.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "resultCode": "PresentToShopper", - "action": { - "paymentMethodType": "multibanco", - "type": "voucher", - "entity": "12101", - "expiresAt": "2020-01-12T09:37:49", - "initialAmount": { - "currency": "EUR", - "value": 1000 - }, - "merchantName": "YOUR_MERCHANT", - "merchantReference": "YOUR_ORDER_NUMBER", - "reference": "501 422 944", - "totalAmount": { - "currency": "EUR", - "value": 1000 - }, - "action": "voucher" - } -} \ No newline at end of file diff --git a/Adyen.Test/mocks/checkout/sessions-success.json b/Adyen.Test/mocks/checkout/sessions-success.json index 18c21d05a..71f040e8e 100644 --- a/Adyen.Test/mocks/checkout/sessions-success.json +++ b/Adyen.Test/mocks/checkout/sessions-success.json @@ -1,5 +1,5 @@ { - "id": "session-test-id", + "id": "CS0068299CB8DA273A", "amount": { "currency": "EUR", "value": 1000 diff --git a/Adyen.Test/mocks/disputes/accept-disputes.json b/Adyen.Test/mocks/disputes/accept-dispute.json similarity index 100% rename from Adyen.Test/mocks/disputes/accept-disputes.json rename to Adyen.Test/mocks/disputes/accept-dispute.json diff --git a/Adyen.Test/mocks/disputes/retrieve-appicable-defense-reasons.json b/Adyen.Test/mocks/disputes/retrieve-applicable-defense-reasons.json similarity index 100% rename from Adyen.Test/mocks/disputes/retrieve-appicable-defense-reasons.json rename to Adyen.Test/mocks/disputes/retrieve-applicable-defense-reasons.json diff --git a/Adyen.Test/mocks/legalentitymanagement/BusinessLine.json b/Adyen.Test/mocks/legalentitymanagement/BusinessLine.json index 1efce18e2..174f7f3e2 100644 --- a/Adyen.Test/mocks/legalentitymanagement/BusinessLine.json +++ b/Adyen.Test/mocks/legalentitymanagement/BusinessLine.json @@ -1,16 +1,17 @@ { - "capability": "issueBankAccount", - "industryCode": "55", - "legalEntityId": "LE322JV223222D5FZ9N74BSGM", + "service": "banking", + "industryCode": "4531", + "legalEntityId": "LE00000000000000000000001", "sourceOfFunds": { - "adyenProcessedFunds": "false", + "adyenProcessedFunds": false, "description": "Funds from my flower shop business", "type": "business" }, "webData": [ { - "webAddress": "https://www.adyen.com" + "webAddress": "https://www.adyen.com", + "webAddressId": "SE322JV223222J5H8V87B3DHN" } ], - "id": "SE322KT223222D5FJ7TJN2986" + "id": "SE322KH223222F5GV2SQ924F6" } \ No newline at end of file diff --git a/Adyen.Test/mocks/legalentitymanagement/LegalEntity.json b/Adyen.Test/mocks/legalentitymanagement/LegalEntity.json index 8139d64ee..b47b5f1c7 100644 --- a/Adyen.Test/mocks/legalentitymanagement/LegalEntity.json +++ b/Adyen.Test/mocks/legalentitymanagement/LegalEntity.json @@ -1,127 +1,68 @@ { - "documentDetails": [{ - "active": false, - "fileName": "string", - "id": "string" - }], - "documents": [{ "id": "string" }], - "entityAssociations": [{ - "associatorId": "string", - "entityType": "string", - "jobTitle": "string", - "legalEntityId": "string", - "name": "string", - "type": "signatory" - }], - "id": "LE322JV223222D5GG42KN6869", - "individual": { - "birthData": { "dateOfBirth": "string" }, - "email": "string", - "identificationData": { - "expiryDate": "string", - "issuerCountry": "string", - "issuerState": "string", - "nationalIdExempt": false, - "number": "string", - "type": "nationalIdNumber" + "capabilities": { + "sendToTransferInstrument": { + "allowed": false, + "requested": true, + "transferInstruments": [ + { + "allowed": false, + "id": "SE322KH223222F5GXZFNM3BGP", + "requested": true, + "verificationStatus": "pending" + } + ], + "verificationStatus": "pending" }, - "name": { - "firstName": "string", - "infix": "string", - "lastName": "string" + "receivePayments": { + "allowed": false, + "requested": true, + "verificationStatus": "pending" }, - "nationality": "string", - "phone": { - "number": "string", - "type": "string" + "sendToBalanceAccount": { + "allowed": false, + "requested": true, + "verificationStatus": "pending" }, - "residentialAddress": { - "city": "string", - "country": "string", - "postalCode": "string", - "stateOrProvince": "string", - "street": "string", - "street2": "string" + "receiveFromPlatformPayments": { + "allowed": false, + "requested": true, + "verificationStatus": "pending" }, - "taxInformation": [{ - "country": "string", - "number": "string", - "type": "string" - }], - "webData": { "webAddress": "string" } + "receiveFromBalanceAccount": { + "allowed": false, + "requested": true, + "verificationStatus": "pending" + } }, - "organization": { - "description": "string", - "doingBusinessAs": "string", - "email": "string", - "legalName": "string", - "phone": { - "number": "string", - "type": "string" - }, - "principalPlaceOfBusiness": { - "city": "string", - "country": "string", - "postalCode": "string", - "stateOrProvince": "string", - "street": "string", - "street2": "string" - }, - "registeredAddress": { - "city": "string", - "country": "string", - "postalCode": "string", - "stateOrProvince": "string", - "street": "string", - "street2": "string" - }, - "registrationNumber": "string", - "stockData": { - "marketIdentifier": "string", - "stockNumber": "string", - "tickerSymbol": "string" - }, - "taxInformation": [{ - "country": "string", - "number": "string", - "type": "string" - }], - "taxReportingClassification": { - "businessType": "other", - "financialInstitutionNumber": "string", - "mainSourceOfIncome": "businessOperation", - "type": "nonFinancialNonReportable" + "individual": { + "email": "s.hopper@example.com", + "birthData": { + "dateOfBirth": "1990-06-21" }, - "type": "associationIncorporated", - "vatAbsenceReason": "industryExemption", - "vatNumber": "string", - "webData": { "webAddress": "string" } - }, - "reference": "string", - "soleProprietorship": { - "countryOfGoverningLaw": "string", - "doingBusinessAs": "string", - "name": "string", - "principalPlaceOfBusiness": { - "city": "string", - "country": "string", - "postalCode": "string", - "stateOrProvince": "string", - "street": "string", - "street2": "string" + "name": { + "firstName": "Simone", + "lastName": "Hopper" }, - "registeredAddress": { - "city": "string", - "country": "string", - "postalCode": "string", - "stateOrProvince": "string", - "street": "string", - "street2": "string" + "phone": { + "number": "+31858888138", + "phoneCountryCode": "NL", + "type": "mobile" }, - "registrationNumber": "string", - "vatAbsenceReason": "industryExemption", - "vatNumber": "string" + "residentialAddress": { + "city": "Amsterdam", + "country": "NL", + "postalCode": "1011DJ", + "street": "Simon Carmiggeltstraat 6 - 50", + "street2": "274" + } }, - "transferInstruments": [{ "id": "string" }], - "type": "individual" + "type": "individual", + "id": "LE322JV223222D5GG42KN6869", + "transferInstruments": [ + { + "id": "SE322KH223222F5GXZFNM3BGP", + "accountIdentifier": "NL**ABNA******0123", + "trustedSource": false + } + ] } \ No newline at end of file diff --git a/Adyen.Test/mocks/legalentitymanagement/LegalEntityBusinessLines.json b/Adyen.Test/mocks/legalentitymanagement/LegalEntityBusinessLines.json new file mode 100644 index 000000000..646cd344f --- /dev/null +++ b/Adyen.Test/mocks/legalentitymanagement/LegalEntityBusinessLines.json @@ -0,0 +1,37 @@ +{ + "businessLines": [ + { + "service": "banking", + "industryCode": "55", + "legalEntityId": "LE00000000000000000000001", + "sourceOfFunds": { + "adyenProcessedFunds": false, + "description": "Funds from my flower shop business", + "type": "business" + }, + "webData": [ + { + "webAddress": "https://www.adyen.com", + "webAddressId": "SE577HA334222K5H8V87B3BPU" + } + ], + "id": "SE322JV223222F5GVGMLNB83F" + }, + { + "service": "paymentProcessing", + "industryCode": "339E", + "legalEntityId": "LE00000000000000000000001", + "salesChannels": [ + "eCommerce", + "ecomMoto" + ], + "webData": [ + { + "webAddress": "https://yoururl.com", + "webAddressId": "SE908HJ723222F5GVGPNR55YH" + } + ], + "id": "SE322JV223222F5GVGPNRB9GJ" + } + ] +} \ No newline at end of file diff --git a/Adyen.Test/mocks/management/list-terminals.json b/Adyen.Test/mocks/management/list-terminals.json index 9f50ff321..3625f6f40 100644 --- a/Adyen.Test/mocks/management/list-terminals.json +++ b/Adyen.Test/mocks/management/list-terminals.json @@ -1,4 +1,20 @@ { + "_links": { + "first": { + "href": "https://management-test.adyen.com/v3/terminals?pageNumber=1&pageSize=20" + }, + "last": { + "href": "https://management-test.adyen.com/v3/terminals?pageNumber=1&pageSize=20" + }, + "next": { + "href": "https://management-test.adyen.com/v3/terminals?pageNumber=1&pageSize=20" + }, + "self": { + "href": "https://management-test.adyen.com/v3/terminals?pageNumber=0&pageSize=20" + } + }, + "itemsTotal": 1, + "pagesTotal": 1, "data": [ { "id": "S1F2-000150183300032", diff --git a/Adyen.Test/mocks/pos-terminal-management/assing-terminals-success.json b/Adyen.Test/mocks/pos-terminal-management/assigning-terminals-success.json similarity index 100% rename from Adyen.Test/mocks/pos-terminal-management/assing-terminals-success.json rename to Adyen.Test/mocks/pos-terminal-management/assigning-terminals-success.json diff --git a/Adyen.Test/mocks/pos-terminal-management/get-terminals-details-success.json b/Adyen.Test/mocks/pos-terminal-management/get-terminal-details-success.json similarity index 100% rename from Adyen.Test/mocks/pos-terminal-management/get-terminals-details-success.json rename to Adyen.Test/mocks/pos-terminal-management/get-terminal-details-success.json diff --git a/Adyen.Test/mocks/transfers/get-all-transactions.json b/Adyen.Test/mocks/transfers/get-all-transactions.json index b55e6c2e7..c253e2bed 100644 --- a/Adyen.Test/mocks/transfers/get-all-transactions.json +++ b/Adyen.Test/mocks/transfers/get-all-transactions.json @@ -1,72 +1,109 @@ { "data": [ { - "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-10T14:51:20+02:00", + "id": "EVJN42272224222B5JB8BRC84N686ZEUR", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" + }, "amount": { - "currency": "EUR", - "value": -9 + "currency": "USD", + "value": -1000 }, - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", - "balancePlatform": "YOUR_BALANCE_PLATFORM", - "bookingDate": "2022-03-11T11:21:24+01:00", - "category": "internal", - "createdAt": "2022-03-11T11:21:24+01:00", - "id": "1VVF0D5U66PIUIVP", - "instructedAmount": { - "currency": "EUR", - "value": -9 - }, - "reference": "REFERENCE_46e8c40e", + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-10T14:51:33+02:00", + "eventId": "EVJN42272224222B5JB8BRC84N686Z", "status": "booked", - "transferId": "1VVF0D5U66PIUIVP", - "type": "fee", - "valueDate": "2022-03-11T11:21:24+01:00" + "transfer": { + "id": "3JNC3O5ZVFLLGV4B", + "reference": "Your internal reference for the transfer" + }, + "valueDate": "2023-08-10T14:51:20+02:00" }, { - "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-10T15:34:31+02:00", + "id": "EVJN4227C224222B5JB8G3Q89N2NB6EUR", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" + }, "amount": { - "currency": "EUR", - "value": -46 + "currency": "USD", + "value": 123 }, - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", - "balancePlatform": "YOUR_BALANCE_PLATFORM", - "bookingDate": "2022-03-12T14:22:52+01:00", - "category": "internal", - "createdAt": "2022-03-12T14:22:52+01:00", - "id": "1WEPGD5U6MS1CFK3", - "instructedAmount": { - "currency": "EUR", - "value": -46 - }, - "reference": "YOUR_REFERENCE", + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-10T15:34:40+02:00", + "eventId": "EVJN4227C224222B5JB8G3Q89N2NB6", "status": "booked", - "transferId": "1WEPGD5U6MS1CFK3", - "type": "fee", - "valueDate": "2022-03-12T14:22:52+01:00" + "transfer": { + "id": "48POO45ZVG11166J", + "reference": "Your internal reference for the transfer" + }, + "valueDate": "2023-08-10T15:34:31+02:00" }, { - "accountHolderId": "AHA1B2C3D4E5F6G7H8I9J0", + "balancePlatform": "YOUR_BALANCE_PLATFORM", + "creationDate": "2023-08-11T13:45:46+02:00", + "id": "EVJN4227C224222B5JBD3XHF8P3L8GUSD", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" + }, "amount": { - "currency": "EUR", - "value": -8 + "currency": "USD", + "value": -10000 + }, + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" }, - "balanceAccountId": "BAB8B2C3D4E5F6G7H8D9J6GD4", + "bookingDate": "2023-08-11T13:45:57+02:00", + "eventId": "EVJN4227C224222B5JBD3XHF8P3L8G", + "status": "booked", + "transfer": { + "id": "48RTTW5ZVT8KU9DV", + "reference": "my-reference" + }, + "valueDate": "2023-08-11T13:45:46+02:00" + }, + { "balancePlatform": "YOUR_BALANCE_PLATFORM", - "bookingDate": "2022-03-14T21:00:48+01:00", - "createdAt": "2022-03-14T15:00:00+01:00", - "description": "YOUR_DESCRIPTION_2", - "id": "2QP32A5U7IWC5WKG", - "instructedAmount": { - "currency": "EUR", - "value": -8 + "creationDate": "2023-08-11T13:45:51+02:00", + "id": "EVJN42272224222B5JBD3XJGHF4J26USD", + "accountHolder": { + "description": "Your description for the account holder", + "id": "AH00000000000000000000001" + }, + "amount": { + "currency": "USD", + "value": 1000 }, + "balanceAccount": { + "description": "Your description for the account holder", + "id": "BA00000000000000000000001" + }, + "bookingDate": "2023-08-11T13:45:58+02:00", + "eventId": "EVJN42272224222B5JBD3XJGHF4J26", "status": "booked", - "valueDate": "2022-03-14T21:00:48+01:00" + "transfer": { + "id": "48TYZO5ZVT8M1K47", + "reference": "my-reference" + }, + "valueDate": "2023-08-11T13:45:51+02:00" } ], "_links": { "next": { - "href": "https://balanceplatform-api-test.adyen.com/btl/v2/transactions?balancePlatform=Bastronaut&createdUntil=2022-03-21T00%3A00%3A00Z&createdSince=2022-03-11T00%3A00%3A00Z&limit=3&cursor=S2B-TSAjOkIrYlIlbjdqe0RreHRyM32lKRSxubXBHRkhHL2E32XitQQz5SfzpucD5HbHwpM1p6NDR1eXVQLFF6MmY33J32sobDxQYT90MHIud1hwLnd6JitcX32xJ" + "href": "https://balanceplatform-api-test.adyen.com/btl/v4/transactions?balancePlatform=TestBalancePlatform&createdUntil=2023-08-20T13%3A07%3A40Z&createdSince=2023-08-10T10%3A50%3A40Z&cursor=S2B-c0p1N0tdN0l6RGhYK1YpM0lgOTUyMDlLXElyKE9LMCtyaFEuMj1NMHgidCsrJi1ZNnhqXCtqVi5JPGpRK1F2fCFqWzU33JTojSVNJc1J1VXhncS10QDd6JX9FQFl5Zn0uNyUvSXJNQTo" } } } \ No newline at end of file diff --git a/Adyen/Adyen.csproj b/Adyen/Adyen.csproj index 2e1e4f54c..deeff46a8 100644 --- a/Adyen/Adyen.csproj +++ b/Adyen/Adyen.csproj @@ -1,7 +1,7 @@  - net8.0;net6.0;net462;netstandard2.0 + net8.0 12 enable disable @@ -36,10 +36,13 @@ - + + + - + + diff --git a/Adyen/Constants/ApiConstants.cs b/Adyen/Constants/ApiConstants.cs deleted file mode 100644 index ce75cf190..000000000 --- a/Adyen/Constants/ApiConstants.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Adyen.Constants -{ - public class ApiConstants - { - public const string AdyenLibraryName = "adyen-library-name"; - public const string AdyenLibraryVersion = "adyen-library-version"; - } -} diff --git a/Adyen/Constants/ClientConfig.cs b/Adyen/Constants/ClientConfig.cs deleted file mode 100644 index adc8f2341..000000000 --- a/Adyen/Constants/ClientConfig.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Adyen.Constants -{ - public class ClientConfig - { - //Test cloud api endpoints - public const string CloudApiEndPointTest = "https://terminal-api-test.adyen.com"; - - //Live cloud api endpoints - public const string CloudApiEndPointEULive = "https://terminal-api-live.adyen.com"; - public const string CloudApiEndPointAULive = "https://terminal-api-live-au.adyen.com"; - public const string CloudApiEndPointUSLive = "https://terminal-api-live-us.adyen.com"; - public const string CloudApiEndPointAPSELive = "https://terminal-api-live-apse.adyen.com"; - - public const string UserAgentSuffix = "adyen-dotnet-api-library/"; - public const string NexoProtocolVersion = "3.0"; - - public const string LibName = "adyen-dotnet-api-library"; - public const string LibVersion = "32.2.1"; - } -} diff --git a/Adyen/Core/Auth/TokenBase.cs b/Adyen/Core/Auth/TokenBase.cs new file mode 100644 index 000000000..a0afd072c --- /dev/null +++ b/Adyen/Core/Auth/TokenBase.cs @@ -0,0 +1,20 @@ +#nullable enable + +using System; + +namespace Adyen.Core.Auth +{ + /// + /// The base class for all auth tokens. + /// + public abstract class TokenBase + { + /// + /// The constructor for the TokenBase object, used by . + /// + protected TokenBase() + { + + } + } +} \ No newline at end of file diff --git a/Adyen/Core/Auth/TokenProvider.cs b/Adyen/Core/Auth/TokenProvider.cs new file mode 100644 index 000000000..745cca691 --- /dev/null +++ b/Adyen/Core/Auth/TokenProvider.cs @@ -0,0 +1,42 @@ +namespace Adyen.Core.Auth +{ + /// + /// An interface for providing tokens in a generic way. + /// + /// + public interface ITokenProvider where TTokenBase : TokenBase + { + /// + /// Retrieves the stored token. + /// + /// + TTokenBase Get(); + } + + /// + /// A class which will provide tokens from type . + /// + /// + public class TokenProvider : ITokenProvider where TTokenBase : TokenBase + { + private readonly TTokenBase _token; + + /// + /// Initializes a token with type . + /// + /// + public TokenProvider(TTokenBase token) + { + _token = token; + } + + /// + /// Retrieves the stored token. + /// + /// + public TTokenBase Get() + { + return _token; + } + } +} \ No newline at end of file diff --git a/Adyen/Core/Client/ApiException.cs b/Adyen/Core/Client/ApiException.cs new file mode 100644 index 000000000..23a732bc9 --- /dev/null +++ b/Adyen/Core/Client/ApiException.cs @@ -0,0 +1,40 @@ +#nullable enable + +using System; + +namespace Adyen.Core.Client +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// The reason the api request failed + /// + public string? ReasonPhrase { get; } + + /// + /// The HttpStatusCode + /// + public System.Net.HttpStatusCode StatusCode { get; } + + /// + /// The raw data returned by the API + /// + public string RawContent { get; } + + /// + /// Construct the ApiException from parts of the response + /// + /// Reason for ApiException + /// + /// Raw content + public ApiException(string? reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent) : base(reasonPhrase ?? rawContent) + { + ReasonPhrase = reasonPhrase; + StatusCode = statusCode; + RawContent = rawContent; + } + } +} diff --git a/Adyen/Core/Client/ApiFactory.cs b/Adyen/Core/Client/ApiFactory.cs new file mode 100644 index 000000000..2c073ba34 --- /dev/null +++ b/Adyen/Core/Client/ApiFactory.cs @@ -0,0 +1,48 @@ +using System; +using Microsoft.Extensions.DependencyInjection; + +namespace Adyen.Core.Client +{ + /// + /// The factory interface for creating the services that can communicate with the Adyen APIs. + /// + public interface IApiFactory + { + /// + /// A method to create an IApi of type IResult + /// + /// + /// + IResult Create() where IResult : IAdyenApiService; + } + + /// + /// The implementation of . + /// + public class ApiFactory : IApiFactory + { + /// + /// The service provider + /// + public IServiceProvider Services { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiFactory(IServiceProvider services) + { + Services = services; + } + + /// + /// A method to create an IApi of type IResult + /// + /// + /// + public IResult Create() where IResult : IAdyenApiService + { + return Services.GetRequiredService(); + } + } +} \ No newline at end of file diff --git a/Adyen/Core/Client/ApiResponse.cs b/Adyen/Core/Client/ApiResponse.cs new file mode 100644 index 000000000..1eb24e24b --- /dev/null +++ b/Adyen/Core/Client/ApiResponse.cs @@ -0,0 +1,371 @@ +#nullable enable +using System; +using System.Diagnostics.CodeAnalysis; +using System.Net; + +namespace Adyen.Core.Client +{ + /// + /// Provides a non-generic contract for the ApiResponse wrapper. + /// + public partial interface IApiResponse + { + /// + /// The IsSuccessStatusCode from the API response. + /// + bool IsSuccessStatusCode { get; } + + /// + /// Gets the status code (). + /// + /// The status code. + HttpStatusCode StatusCode { get; } + + /// + /// The raw content of this response. + /// + string RawContent { get; } + + /// + /// The raw binary stream (only set for binary responses). + /// + System.IO.Stream? ContentStream { get; } + + /// + /// The DateTime when the request was retrieved. + /// + DateTime DownloadedAt { get; } + + /// + /// The headers contained in the API response. + /// + System.Net.Http.Headers.HttpResponseHeaders Headers { get; } + + /// + /// The path used when making the request. + /// + string Path { get; } + + /// + /// The reason phrase contained in the API response. + /// + string? ReasonPhrase { get; } + + /// + /// The DateTime when the request was sent. + /// + DateTime RequestedAt { get; } + + /// + /// The Uri used when making the request. + /// + Uri? RequestUri { get; } + } + + /// + /// API Response + /// + public partial class ApiResponse : IApiResponse + { + /// + /// Gets the status code (HTTP status code). + /// + /// The status code. + public HttpStatusCode StatusCode { get; } + + /// + /// The raw data. + /// + public string RawContent { get; protected set; } + + /// + /// The raw binary stream (only set for binary responses). + /// + public System.IO.Stream? ContentStream { get; protected set; } + + /// + /// The IsSuccessStatusCode from the API response. + /// + public bool IsSuccessStatusCode { get; } + + /// + /// The reason phrase contained in the API response. + /// + public string? ReasonPhrase { get; } + + /// + /// The headers contained in the API response. + /// + public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } + + /// + /// The DateTime (default: UtcNow) when the request was retrieved. + /// + public DateTime DownloadedAt { get; } = DateTime.UtcNow; + + /// + /// The DateTime when the request was sent. + /// + public DateTime RequestedAt { get; } + + /// + /// The path used when making the request. + /// + public string Path { get; } + + /// + /// The used when making the request. + /// + public Uri? RequestUri { get; } + + /// + /// The . + /// + protected System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + /// + /// Construct the response using an HttpResponseMessage. + /// + /// . + /// + /// The raw data. + /// The path used when making the request. + /// The when the request was sent. + /// The . + public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) + { + StatusCode = httpResponseMessage.StatusCode; + Headers = httpResponseMessage.Headers; + IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; + ReasonPhrase = httpResponseMessage.ReasonPhrase; + RawContent = rawContent; + Path = path; + RequestUri = httpRequestMessage.RequestUri; + RequestedAt = requestedAt; + _jsonSerializerOptions = jsonSerializerOptions; + } + + /// + /// Construct the response using the . + /// + /// . + /// . + /// The raw binary stream (only set for binary responses). + /// The path used when making the request. + /// The DateTime.UtcNow when the request was sent. + /// The . + public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, System.IO.Stream contentStream, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) + { + StatusCode = httpResponseMessage.StatusCode; + Headers = httpResponseMessage.Headers; + IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; + ReasonPhrase = httpResponseMessage.ReasonPhrase; + ContentStream = contentStream; + RawContent = string.Empty; + Path = path; + RequestUri = httpRequestMessage.RequestUri; + RequestedAt = requestedAt; + _jsonSerializerOptions = jsonSerializerOptions; + } + } + + /// + /// An interface for responses of type BadRequest. + /// + /// + public interface IBadRequest : IApiResponse + { + /// + /// Deserializes the response if the response is BadRequest. + /// + /// + TType BadRequest(); + + /// + /// Returns true if the response is BadRequest and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeBadRequestResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type TooManyRequests. + /// + /// + public interface ITooManyRequests : IApiResponse + { + /// + /// Deserializes the response if the response is TooManyRequests. + /// + /// + TType TooManyRequests(); + + /// + /// Returns true if the response is TooManyRequests and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeTooManyRequestsResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type Unauthorized. + /// + /// + public interface IUnauthorized : IApiResponse + { + /// + /// Deserializes the response if the response is Unauthorized. + /// + /// + TType Unauthorized(); + + /// + /// Returns true if the response is Unauthorized and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeUnauthorizedResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type Forbidden. + /// + /// + public interface IForbidden : IApiResponse + { + /// + /// Deserializes the response if the response is Forbidden. + /// + /// + TType Forbidden(); + + /// + /// Returns true if the response is Forbidden and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeForbiddenResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type Ok. + /// + /// + public interface IOk : IApiResponse + { + /// + /// Deserializes the response if the response is Ok. + /// + /// + TType Ok(); + + /// + /// Returns true if the response is Ok and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeOkResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type UnprocessableContent. + /// + /// + public interface IUnprocessableContent : IApiResponse + { + /// + /// Deserializes the response if the response is UnprocessableContent. + /// + /// + TType UnprocessableContent(); + + /// + /// Returns true if the response is UnprocessableContent and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeUnprocessableContentResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type InternalServerError. + /// + /// + public interface IInternalServerError : IApiResponse + { + /// + /// Deserializes the response if the response is InternalServerError. + /// + /// + TType InternalServerError(); + + /// + /// Returns true if the response is InternalServerError and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeInternalServerErrorResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type Created. + /// + /// + public interface ICreated : IApiResponse + { + /// + /// Deserializes the response if the response is Created. + /// + /// + TType Created(); + + /// + /// Returns true if the response is Created and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeCreatedResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type Accepted. + /// + /// + public interface IAccepted : IApiResponse + { + /// + /// Deserializes the response if the response is Accepted. + /// + /// + TType Accepted(); + + /// + /// Returns true if the response is Accepted and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeAcceptedResponse([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type NotFound. + /// + /// + public interface INotFound : IApiResponse + { + /// + /// Deserializes the response if the response is NotFound. + /// + /// + TType NotFound(); + + /// + /// Returns true if the response is NotFound and the deserialized response is not null. + /// + /// + /// + bool TryDeserializeNotFoundResponse([NotNullWhen(true)]out TType? result); + } +} diff --git a/Adyen/Core/Client/ApiResponseEventArgs.cs b/Adyen/Core/Client/ApiResponseEventArgs.cs new file mode 100644 index 000000000..7f6d48f23 --- /dev/null +++ b/Adyen/Core/Client/ApiResponseEventArgs.cs @@ -0,0 +1,24 @@ +using System; + +namespace Adyen.Core.Client +{ + /// + /// This class is used for wrapping the . + /// + public class ApiResponseEventArgs : EventArgs + { + /// + /// The . + /// + public ApiResponse ApiResponse { get; } + + /// + /// The constructed from the Adyen . + /// + /// . + public ApiResponseEventArgs(ApiResponse apiResponse) + { + ApiResponse = apiResponse; + } + } +} diff --git a/Adyen/Core/Client/ExceptionEventArgs.cs b/Adyen/Core/Client/ExceptionEventArgs.cs new file mode 100644 index 000000000..1cbfc25fa --- /dev/null +++ b/Adyen/Core/Client/ExceptionEventArgs.cs @@ -0,0 +1,24 @@ +using System; + +namespace Adyen.Core.Client +{ + /// + /// Useful for tracking server health + /// + public class ExceptionEventArgs : EventArgs + { + /// + /// The ApiResponse exception + /// + public Exception Exception { get; } + + /// + /// The ExceptionEventArgs + /// + /// + public ExceptionEventArgs(Exception exception) + { + Exception = exception; + } + } +} diff --git a/Adyen/Core/Client/Extensions/HttpClientBuilderExtensions.cs b/Adyen/Core/Client/Extensions/HttpClientBuilderExtensions.cs new file mode 100644 index 000000000..bc5187d30 --- /dev/null +++ b/Adyen/Core/Client/Extensions/HttpClientBuilderExtensions.cs @@ -0,0 +1,68 @@ +#nullable enable + +using System; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection; +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly; + +namespace Adyen.Core.Client.Extensions +{ + /// + /// Extension methods for IHttpClientBuilder + /// + public static class HttpClientBuilderExtensions + { + /// + /// Adds a Polly retry policy to your clients. + /// + /// . + /// The number of retries. + /// . + public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder httpClient, int numberOfRetries) + { + httpClient.AddPolicyHandler(RetryPolicy(numberOfRetries)); + return httpClient; + } + + private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int numberOfRetries) + => HttpPolicyExtensions + .HandleTransientHttpError() + .Or() + .RetryAsync(numberOfRetries); + + /// + /// Adds a Polly timeout policy to your clients. + /// Use this when you need resilient policies (using the ) and want to combine this with a retry & circuit breaker. + /// + /// . + /// . + /// . + public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder httpClient, TimeSpan timeout) + { + httpClient.AddPolicyHandler(TimeoutPolicy(timeout)); + return httpClient; + } + + private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) + => Policy.TimeoutAsync(timeout); + + /// + /// Adds a Polly circuit breaker to your clients. + /// + /// . + /// Example: if set to 3 - if 3 consecutive request fail, Polly will 'open' the circuit for the duration of and fail all incoming requests. After that, the circuit will be 'half-open'. + /// . + /// . + public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder httpClient, int numberOfEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + { + httpClient.AddTransientHttpErrorPolicy(policyBuilder => CircuitBreakerPolicy(policyBuilder, numberOfEventsAllowedBeforeBreaking, durationOfBreak)); + return httpClient; + } + + private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( + PolicyBuilder policyBuilder, int numberOfEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + => policyBuilder.CircuitBreakerAsync(numberOfEventsAllowedBeforeBreaking, durationOfBreak); + } +} diff --git a/Adyen/Core/Client/Extensions/HttpRequestMessageExtensions.cs b/Adyen/Core/Client/Extensions/HttpRequestMessageExtensions.cs new file mode 100644 index 000000000..815a00ac7 --- /dev/null +++ b/Adyen/Core/Client/Extensions/HttpRequestMessageExtensions.cs @@ -0,0 +1,63 @@ +namespace Adyen.Core.Client.Extensions +{ + /// + /// Extension function that adds custom headers and UserAgent to the . + /// + public static class HttpRequestMessageExtensions + { + /// + /// The name of the application. + /// + public static string ApplicationName { get; set; } + + /// + /// Name of this library. This will be sent as a part of the headers. + /// + public const string AdyenLibraryName = "adyen-dotnet-api-library"; + + /// + /// Version of this library. + /// + public const string AdyenLibraryVersion = "32.2.1"; // Updated by release-automation-action + + /// + /// Adds the UserAgent to the headers of the object. + /// + /// . + /// . + public static HttpRequestMessage AddUserAgentToHeaders(this HttpRequestMessage httpRequestMessage) + { + // Add application name if set. + if (!string.IsNullOrWhiteSpace(ApplicationName)) + { + httpRequestMessage.Headers.Add("UserAgent", $"{ApplicationName} {AdyenLibraryName}/{AdyenLibraryVersion}"); + return httpRequestMessage; + } + + httpRequestMessage.Headers.Add("UserAgent", $"{AdyenLibraryName}/{AdyenLibraryVersion}"); + return httpRequestMessage; + } + + /// + /// Adds the to the headers of the object. + /// + /// . + /// . + public static HttpRequestMessage AddLibraryNameToHeader(this HttpRequestMessage httpRequestMessage) + { + httpRequestMessage.Headers.Add("adyen-library-name", AdyenLibraryName); + return httpRequestMessage; + } + + /// + /// Adds the to the headers of the object. + /// + /// . + /// . + public static HttpRequestMessage AddLibraryVersionToHeader(this HttpRequestMessage httpRequestMessage) + { + httpRequestMessage.Headers.Add("adyen-library-version", AdyenLibraryVersion); + return httpRequestMessage; + } + } +} \ No newline at end of file diff --git a/Adyen/Core/Client/IAdyenApiService.cs b/Adyen/Core/Client/IAdyenApiService.cs new file mode 100644 index 000000000..ca6e164d6 --- /dev/null +++ b/Adyen/Core/Client/IAdyenApiService.cs @@ -0,0 +1,13 @@ +namespace Adyen.Core.Client +{ + /// + /// Interface for interacting with any Adyen API using . + /// + public interface IAdyenApiService + { + /// + /// The object, best practice: instantiate and manage object using the . + /// + System.Net.Http.HttpClient HttpClient { get; } + } +} \ No newline at end of file diff --git a/Adyen/Core/Client/RequestOptions.cs b/Adyen/Core/Client/RequestOptions.cs new file mode 100644 index 000000000..8c61091cb --- /dev/null +++ b/Adyen/Core/Client/RequestOptions.cs @@ -0,0 +1,75 @@ +#nullable enable + +namespace Adyen.Core.Client +{ + public class RequestOptions + { + /// + /// Dictionary containing the optional header values. If set, these values will be sent in the HttpRequest when is called. + /// + public IDictionary Headers { get; private set; } = new Dictionary(); + + + #region Helper functions to append headers to the Headers dictionary. + + /// + /// Add the "IdempotencyKey" to the headers with the given value. + /// The Adyen API supports idempotency, allowing you to retry a request multiple times while only performing the action once. + /// This helps avoid unwanted duplication in case of failures and retries. + /// + /// The value of the IdempotencyKey. + /// . + public RequestOptions AddIdempotencyKey(string idempotencyKey) + { + this.Headers.Add("Idempotency-Key", idempotencyKey); + return this; + } + + /// + /// Adds additional custom headers with the given keys and values. + /// + /// The values. + /// . + public RequestOptions AddAdditionalHeaders(IDictionary additionalHeaders) + { + foreach (KeyValuePair kvp in additionalHeaders) + this.Headers.Add(kvp.Key, kvp.Value); + return this; + } + + /// + /// Adds the "WWW-Authenticate" to the headers with the given value. Used in the Configuration and Transfers API. + /// + /// The value of WWW-Authenticate. + /// . + public RequestOptions AddWWWAuthenticateHeader(string wwwAuthenticate) + { + this.Headers.Add("WWW-Authenticate", wwwAuthenticate); + return this; + } + + /// + /// Adds the "x-requested-verification-code" to the headers with the given value. Used in the LegalEntityManagement API. + /// + /// The value of x-requested-verification-code. + /// . + public RequestOptions AddxRequestedVerificationCodeHeader(string xRequestedVerificationCodeHeader) + { + this.Headers.Add("x-requested-verification-code", xRequestedVerificationCodeHeader); + return this; + } + + #endregion + + /// + /// Adds all key-value-pairs from to the header. + /// + /// + public System.Net.Http.HttpRequestMessage AddHeadersToHttpRequestMessage(System.Net.Http.HttpRequestMessage httpRequestMessage) + { + foreach (KeyValuePair header in this.Headers) + httpRequestMessage.Headers.Add(header.Key, header.Value); + return httpRequestMessage; + } + } +} \ No newline at end of file diff --git a/Adyen/Core/Client/UrlBuilderExtensions.cs b/Adyen/Core/Client/UrlBuilderExtensions.cs new file mode 100644 index 000000000..37885f81a --- /dev/null +++ b/Adyen/Core/Client/UrlBuilderExtensions.cs @@ -0,0 +1,80 @@ +using Adyen.Core.Options; + +namespace Adyen.Core.Client +{ + /// + /// Helper utility functions to construct the Adyen live-urls for our APIs. + /// + public static class UrlBuilderExtensions + { + /// + /// Constructs the Host URL based on the selected , used to populate the `HttpClient.BaseAddress`. + /// + /// . + /// The base URL of the API. + /// String containing the Host URL. + /// + public static string ConstructHostUrl(AdyenOptions adyenOptions, string baseUrl) + { + if (adyenOptions.Environment == AdyenEnvironment.Live) + return ConstructLiveUrl(adyenOptions.LiveEndpointUrlPrefix, baseUrl); + + // Some Adyen OpenApi Specifications use the live-url, instead of the test-url, this line replaces "-live" with "-test". + // If you need to override this URL, you can do so by replacing the BASE_URL in ClientUtils.cs. + if (adyenOptions.Environment == AdyenEnvironment.Test) + return baseUrl.Replace("-live", "-test"); + + throw new ArgumentOutOfRangeException(adyenOptions.Environment.ToString()); + } + + /// + /// Construct LIVE BaseUrl, add the liveEndpointUrlPrefix it's the Checkout API or the Classic Payment API. + /// This helper function can be removed when all URLs (test & live) are included in the Adyen OpenApi Specifications: https://github.com/Adyen/adyen-openapi. + /// + /// The Live endpoint url prefix. + /// The base URL of the API. + /// String containing the LIVE URL. + /// + public static string ConstructLiveUrl(string liveEndpointUrlPrefix, string url) + { + // Change base url for Live environment + if (url.Contains("pal-")) // Payment API prefix + { + if (liveEndpointUrlPrefix == null) + { + throw new InvalidOperationException("LiveEndpointUrlPrefix is null - please configure your AdyenOptions.LiveEndpointUrlPrefix"); + } + + url = url.Replace("https://pal-test.adyen.com/pal/servlet/", + "https://" + liveEndpointUrlPrefix + "-pal-live.adyenpayments.com/pal/servlet/"); + } + else if (url.Contains("checkout-")) // Checkout API prefix + { + if (liveEndpointUrlPrefix == null) + { + throw new InvalidOperationException("LiveEndpointUrlPrefix is null - please configure your AdyenOptions.LiveEndpointUrlPrefix"); + } + + if (url.Contains("possdk")) + { + url = url.Replace("https://checkout-test.adyen.com/", + "https://" + liveEndpointUrlPrefix + "-checkout-live.adyenpayments.com/"); + } + else + { + url = url.Replace("https://checkout-test.adyen.com/", + "https://" + liveEndpointUrlPrefix + "-checkout-live.adyenpayments.com/checkout/"); + } + } + else if (url.Contains("https://test.adyen.com/authe/api/")) // SessionAuthentication + { + url = url.Replace("https://test.adyen.com/authe/api/", + "https://authe-live.adyen.com/authe/api/"); + } + + // If no prefix is required, we replace "test" -> "live" + url = url.Replace("-test", "-live"); + return url; + } + } +} \ No newline at end of file diff --git a/Adyen/Core/Converters/ByteArrayConverter.cs b/Adyen/Core/Converters/ByteArrayConverter.cs new file mode 100644 index 000000000..0b1ba4071 --- /dev/null +++ b/Adyen/Core/Converters/ByteArrayConverter.cs @@ -0,0 +1,45 @@ +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Adyen.Core.Converters +{ + /// + /// JsonConverter for byte arrays. + /// + public class ByteArrayConverter : JsonConverter + { + /// + /// Reads a byte array during deserialization. + /// + /// . + /// . + /// . + /// Byte array. + public override byte[] Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString(); + return Encoding.UTF8.GetBytes(value); + } + + /// + /// Writes a byte array during serialization. + /// + /// . + /// . + /// . + public override void Write(Utf8JsonWriter writer, byte[] value, JsonSerializerOptions options) + { + if (value == null) + { + writer.WriteNullValue(); + return; + } + + writer.WriteStringValue(Encoding.UTF8.GetString(value)); + } + } +} \ No newline at end of file diff --git a/Adyen/Core/Converters/DateOnlyJsonConverter.cs b/Adyen/Core/Converters/DateOnlyJsonConverter.cs new file mode 100644 index 000000000..523644b08 --- /dev/null +++ b/Adyen/Core/Converters/DateOnlyJsonConverter.cs @@ -0,0 +1,52 @@ +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Adyen.Core.Converters +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateOnlyJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date. + /// + public static string[] Formats { get; } = { + "yyyy'-'MM'-'dd", + "yyyyMMdd" + + }; + + /// + /// Returns a from the Json object. + /// + /// . + /// . + /// . + /// . + public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString()!; + + foreach(string format in Formats) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the to the . + /// + /// . + /// . + /// . + public override void Write(Utf8JsonWriter writer, DateOnly dateOnly, JsonSerializerOptions options) => + writer.WriteStringValue(dateOnly.ToString("yyyy'-'MM'-'dd", CultureInfo.InvariantCulture)); + } +} diff --git a/Adyen/Core/Converters/DateOnlyNullableJsonConverter.cs b/Adyen/Core/Converters/DateOnlyNullableJsonConverter.cs new file mode 100644 index 000000000..91ddb3b49 --- /dev/null +++ b/Adyen/Core/Converters/DateOnlyNullableJsonConverter.cs @@ -0,0 +1,57 @@ +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Adyen.Core.Converters +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateOnlyNullableJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date. + /// + public static string[] Formats { get; } = { + "yyyy'-'MM'-'dd", + "yyyyMMdd" + + }; + + /// + /// Returns a nullable from the Json object. + /// + /// . + /// . + /// . + /// . + public override DateOnly? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString()!; + + foreach(string format in Formats) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out DateOnly result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the to the . + /// + /// . + /// . + /// . + public override void Write(Utf8JsonWriter writer, DateOnly? dateOnly, JsonSerializerOptions options) + { + if (dateOnly == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateOnly.Value.ToString("yyyy'-'MM'-'dd", CultureInfo.InvariantCulture)); + } + } +} diff --git a/Adyen/Core/Converters/DateTimeJsonConverter.cs b/Adyen/Core/Converters/DateTimeJsonConverter.cs new file mode 100644 index 000000000..43a758362 --- /dev/null +++ b/Adyen/Core/Converters/DateTimeJsonConverter.cs @@ -0,0 +1,66 @@ +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Adyen.Core.Converters +{ + /// + /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date. + /// + public static string[] Formats { get; } = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + + }; + + /// + /// Returns a from the Json object. + /// + /// . + /// . + /// . + /// . + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString()!; + + foreach(string format in Formats) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the to the . + /// + /// . + /// . + /// . + public override void Write(Utf8JsonWriter writer, DateTime dateTime, JsonSerializerOptions options) => + writer.WriteStringValue(dateTime.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", CultureInfo.InvariantCulture)); + } +} diff --git a/Adyen/Core/Converters/DateTimeNullableJsonConverter.cs b/Adyen/Core/Converters/DateTimeNullableJsonConverter.cs new file mode 100644 index 000000000..abfa0c099 --- /dev/null +++ b/Adyen/Core/Converters/DateTimeNullableJsonConverter.cs @@ -0,0 +1,71 @@ +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Adyen.Core.Converters +{ + /// + /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeNullableJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date. + /// + public static string[] Formats { get; } = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + + }; + + /// + /// Returns a nullable from the Json object. + /// + /// . + /// . + /// . + /// . + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString()!; + + foreach(string format in Formats) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + return null; + } + + /// + /// Writes the to the . + /// + /// . + /// . + /// . + public override void Write(Utf8JsonWriter writer, DateTime? dateTime, JsonSerializerOptions options) + { + if (dateTime == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateTime.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", CultureInfo.InvariantCulture)); + } + } +} diff --git a/Adyen/Core/IEnum.cs b/Adyen/Core/IEnum.cs new file mode 100644 index 000000000..11055cb53 --- /dev/null +++ b/Adyen/Core/IEnum.cs @@ -0,0 +1,11 @@ +namespace Adyen.Core +{ + /// + /// Interface for defining enums. + /// This interface is used to make enums forward-compatible. + /// + public interface IEnum + { + string? Value { get; set; } + } +} \ No newline at end of file diff --git a/Adyen/Core/Option.cs b/Adyen/Core/Option.cs new file mode 100644 index 000000000..407cd4532 --- /dev/null +++ b/Adyen/Core/Option.cs @@ -0,0 +1,48 @@ +#nullable enable + + +namespace Adyen.Core +{ + /// + /// A wrapper for operation parameters which are not required. + /// + public struct Option + { + /// + /// The value to send to the server. + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server. + /// + internal bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required. + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + /// + /// Implicitly converts this option to the contained type. + /// + /// + /// + /// . + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option. + /// + /// . + /// + /// Option of . + public static implicit operator Option(TType value) => new Option(value); + + } +} \ No newline at end of file diff --git a/Adyen/Core/Options/AdyenEnvironment.cs b/Adyen/Core/Options/AdyenEnvironment.cs new file mode 100644 index 000000000..6d98e4fe0 --- /dev/null +++ b/Adyen/Core/Options/AdyenEnvironment.cs @@ -0,0 +1,12 @@ +namespace Adyen.Core.Options +{ + /// + /// The Adyen Environment. + /// Changing this value affects the ClientUtils.BASE_URL where your API requests are sent. + /// + public enum AdyenEnvironment + { + Test, + Live + } +} \ No newline at end of file diff --git a/Adyen/Core/Options/AdyenOptions.cs b/Adyen/Core/Options/AdyenOptions.cs new file mode 100644 index 000000000..3c7e257cd --- /dev/null +++ b/Adyen/Core/Options/AdyenOptions.cs @@ -0,0 +1,36 @@ +namespace Adyen.Core.Options +{ + /// + /// Stores the variables used to communicate with the Adyen platforms. + /// + public class AdyenOptions + { + /// + /// The Adyen Environment. + /// + public AdyenEnvironment Environment { get; set; } = AdyenEnvironment.Test; + + /// + /// Used in the LIVE environment only. + /// This prefix is appended to HttpClient.BaseAddress when is set to `AdyenEnvironment.Live` + /// See: https://docs.adyen.com/development-resources/live-endpoints/ + /// + public string LiveEndpointUrlPrefix { get; set; } + + /// + /// The `ADYEN_API_KEY` is an Adyen API authentication token that must be included in the HTTP request header and allows your application to securely communicate with the Adyen APIs. + /// Guide on how to obtain the `ADYEN_API_KEY` + /// 1. For Digital/ECOM & In-Person Payments, visit: https://docs.adyen.com/development-resources/api-credentials/#generate-api-key to get your API Key. + /// 2. For Platforms & Financial Services, visit: https://docs.adyen.com/adyen-for-platforms-model to get started. + /// + public string AdyenApiKey { get; set; } + + /// + /// The `ADYEN_HMAC_KEY` is used to verify the incoming HMAC signature from incoming webhooks. + /// To protect your server from unauthorised webhook events, Adyen recommends that you use Hash-based message authentication code HMAC signatures for our webhooks. + /// Each webhook event will include a signature calculated using a secret `ADYEN_HMAC_KEY` key and the payload from the webhook. + /// By verifying this signature, you confirm that the webhook was sent by Adyen, and was not modified during transmission. + /// + public string AdyenHmacKey { get; set; } + } +} \ No newline at end of file diff --git a/Adyen/Core/Utilities/HmacValidatorUtility.cs b/Adyen/Core/Utilities/HmacValidatorUtility.cs new file mode 100644 index 000000000..0a44ed2b0 --- /dev/null +++ b/Adyen/Core/Utilities/HmacValidatorUtility.cs @@ -0,0 +1,86 @@ +using System.Security.Cryptography; +using System.Text; + +namespace Adyen.Core.Utilities +{ + /// + /// Utility class to help verify hmac signatures from incoming webhooks. + /// + public static class HmacValidatorUtility + { + /// + /// Generates the Base64 encoded signature using the HMAC algorithm with the SHA256 hashing function. + /// + /// The JSON payload. + /// The secret ADYEN_HMAC_KEY, retrieved from the Adyen Customer Area. + /// The HMAC string for the payload. + /// + public static string GenerateBase64Sha256HmacSignature(string payload, string hmacKey) + { + byte[] key = ConvertHexadecimalToBytes(hmacKey); + byte[] data = Encoding.UTF8.GetBytes(payload); + + try + { + using (HMACSHA256 hmac = new HMACSHA256(key)) + { + // Compute the hmac on input data bytes + byte[] rawHmac = hmac.ComputeHash(data); + + // Base64-encode the hmac + return Convert.ToBase64String(rawHmac); + } + } + catch (Exception e) + { + throw new Exception("Failed to generate HMAC signature: " + e.Message, e); + } + } + + /// + /// Converts a hexadecimal into a byte array. + /// + /// The hexadecimal string. + /// An array of bytes that repesents the hexadecimalString. + private static byte[] ConvertHexadecimalToBytes(string hexadecimalString) + { + if ((hexadecimalString.Length % 2) == 1) + { + hexadecimalString += '0'; + } + + byte[] bytes = new byte[hexadecimalString.Length / 2]; + for (int i = 0; i < hexadecimalString.Length; i += 2) + { + bytes[i / 2] = Convert.ToByte(hexadecimalString.Substring(i, 2), 16); + } + + return bytes; + } + + /// + /// Validates a balance platform and management webhook payload with the given and . + /// + /// The HMAC signature, retrieved from the request header. + /// The HMAC key, retrieved from the Adyen Customer Area. + /// The webhook JSON payload. + /// A return value indicates the HMAC validation succeeded. + public static bool IsHmacSignatureValid(string hmacSignature, string hmacKey, string payload) + { + string signature = GenerateBase64Sha256HmacSignature(payload, hmacKey); + return TimeSafeEquals(Encoding.UTF8.GetBytes(hmacSignature), Encoding.UTF8.GetBytes(signature)); + } + + /// + /// This method compares two bytestrings in constant time based on length of shortest bytestring to prevent timing attacks. + /// + /// True if there's a difference. + private static bool TimeSafeEquals(byte[] a, byte[] b) + { + uint diff = (uint)a.Length ^ (uint)b.Length; + for (int i = 0; i < a.Length && i < b.Length; i++) { diff |= (uint)(a[i] ^ b[i]); } + return diff == 0; + } + } +} + diff --git a/Adyen/Model/AcsWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/AcsWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index ee8c595a4..000000000 --- a/Adyen/Model/AcsWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/AcsWebhooks/Amount.cs b/Adyen/Model/AcsWebhooks/Amount.cs deleted file mode 100644 index daeca719b..000000000 --- a/Adyen/Model/AcsWebhooks/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/AuthenticationDecision.cs b/Adyen/Model/AcsWebhooks/AuthenticationDecision.cs deleted file mode 100644 index d3f38734f..000000000 --- a/Adyen/Model/AcsWebhooks/AuthenticationDecision.cs +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// AuthenticationDecision - /// - [DataContract(Name = "AuthenticationDecision")] - public partial class AuthenticationDecision : IEquatable, IValidatableObject - { - /// - /// The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). - /// - /// The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Proceed for value: proceed - /// - [EnumMember(Value = "proceed")] - Proceed = 1, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 2 - - } - - - /// - /// The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). - /// - /// The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AuthenticationDecision() { } - /// - /// Initializes a new instance of the class. - /// - /// The status of the authentication. Possible values: * **refused** * **proceed** For more information, refer to [Authenticate cardholders using the Authentication SDK](https://docs.adyen.com/issuing/3d-secure/oob-auth-sdk/authenticate-cardholders/). (required). - public AuthenticationDecision(StatusEnum status = default(StatusEnum)) - { - this.Status = status; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AuthenticationDecision {\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AuthenticationDecision); - } - - /// - /// Returns true if AuthenticationDecision instances are equal - /// - /// Instance of AuthenticationDecision to be compared - /// Boolean - public bool Equals(AuthenticationDecision input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/AuthenticationInfo.cs b/Adyen/Model/AcsWebhooks/AuthenticationInfo.cs deleted file mode 100644 index 88429e1cb..000000000 --- a/Adyen/Model/AcsWebhooks/AuthenticationInfo.cs +++ /dev/null @@ -1,810 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// AuthenticationInfo - /// - [DataContract(Name = "AuthenticationInfo")] - public partial class AuthenticationInfo : IEquatable, IValidatableObject - { - /// - /// Specifies a preference for receiving a challenge. Possible values: * **01**: No preference * **02**: No challenge requested * **03**: Challenge requested (preference) * **04**: Challenge requested (mandate) * **05**: No challenge requested (transactional risk analysis is already performed) * **07**: No challenge requested (SCA is already performed) * **08**: No challenge requested (trusted beneficiaries exemption of no challenge required) * **09**: Challenge requested (trusted beneficiaries prompt requested if challenge required) * **80**: No challenge requested (secure corporate payment with Mastercard) * **82**: No challenge requested (secure corporate payment with Visa) - /// - /// Specifies a preference for receiving a challenge. Possible values: * **01**: No preference * **02**: No challenge requested * **03**: Challenge requested (preference) * **04**: Challenge requested (mandate) * **05**: No challenge requested (transactional risk analysis is already performed) * **07**: No challenge requested (SCA is already performed) * **08**: No challenge requested (trusted beneficiaries exemption of no challenge required) * **09**: Challenge requested (trusted beneficiaries prompt requested if challenge required) * **80**: No challenge requested (secure corporate payment with Mastercard) * **82**: No challenge requested (secure corporate payment with Visa) - [JsonConverter(typeof(StringEnumConverter))] - public enum ChallengeIndicatorEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _07 for value: 07 - /// - [EnumMember(Value = "07")] - _07 = 6, - - /// - /// Enum _08 for value: 08 - /// - [EnumMember(Value = "08")] - _08 = 7, - - /// - /// Enum _09 for value: 09 - /// - [EnumMember(Value = "09")] - _09 = 8, - - /// - /// Enum _80 for value: 80 - /// - [EnumMember(Value = "80")] - _80 = 9, - - /// - /// Enum _82 for value: 82 - /// - [EnumMember(Value = "82")] - _82 = 10 - - } - - - /// - /// Specifies a preference for receiving a challenge. Possible values: * **01**: No preference * **02**: No challenge requested * **03**: Challenge requested (preference) * **04**: Challenge requested (mandate) * **05**: No challenge requested (transactional risk analysis is already performed) * **07**: No challenge requested (SCA is already performed) * **08**: No challenge requested (trusted beneficiaries exemption of no challenge required) * **09**: Challenge requested (trusted beneficiaries prompt requested if challenge required) * **80**: No challenge requested (secure corporate payment with Mastercard) * **82**: No challenge requested (secure corporate payment with Visa) - /// - /// Specifies a preference for receiving a challenge. Possible values: * **01**: No preference * **02**: No challenge requested * **03**: Challenge requested (preference) * **04**: Challenge requested (mandate) * **05**: No challenge requested (transactional risk analysis is already performed) * **07**: No challenge requested (SCA is already performed) * **08**: No challenge requested (trusted beneficiaries exemption of no challenge required) * **09**: Challenge requested (trusted beneficiaries prompt requested if challenge required) * **80**: No challenge requested (secure corporate payment with Mastercard) * **82**: No challenge requested (secure corporate payment with Visa) - [DataMember(Name = "challengeIndicator", IsRequired = false, EmitDefaultValue = false)] - public ChallengeIndicatorEnum ChallengeIndicator { get; set; } - /// - /// Indicates the type of channel interface being used to initiate the transaction. Possible values: * **app** * **browser** * **3DSRequestorInitiated** (initiated by a merchant when the cardholder is not available) - /// - /// Indicates the type of channel interface being used to initiate the transaction. Possible values: * **app** * **browser** * **3DSRequestorInitiated** (initiated by a merchant when the cardholder is not available) - [JsonConverter(typeof(StringEnumConverter))] - public enum DeviceChannelEnum - { - /// - /// Enum App for value: app - /// - [EnumMember(Value = "app")] - App = 1, - - /// - /// Enum Browser for value: browser - /// - [EnumMember(Value = "browser")] - Browser = 2, - - /// - /// Enum ThreeDSRequestorInitiated for value: ThreeDSRequestorInitiated - /// - [EnumMember(Value = "ThreeDSRequestorInitiated")] - ThreeDSRequestorInitiated = 3 - - } - - - /// - /// Indicates the type of channel interface being used to initiate the transaction. Possible values: * **app** * **browser** * **3DSRequestorInitiated** (initiated by a merchant when the cardholder is not available) - /// - /// Indicates the type of channel interface being used to initiate the transaction. Possible values: * **app** * **browser** * **3DSRequestorInitiated** (initiated by a merchant when the cardholder is not available) - [DataMember(Name = "deviceChannel", IsRequired = false, EmitDefaultValue = false)] - public DeviceChannelEnum DeviceChannel { get; set; } - /// - /// Indicates the exemption type that was applied to the authentication by the issuer, if exemption applied. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** * **acquirerExemption** * **noExemptionApplied** * **visaDAFExemption** - /// - /// Indicates the exemption type that was applied to the authentication by the issuer, if exemption applied. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** * **acquirerExemption** * **noExemptionApplied** * **visaDAFExemption** - [JsonConverter(typeof(StringEnumConverter))] - public enum ExemptionIndicatorEnum - { - /// - /// Enum LowValue for value: lowValue - /// - [EnumMember(Value = "lowValue")] - LowValue = 1, - - /// - /// Enum SecureCorporate for value: secureCorporate - /// - [EnumMember(Value = "secureCorporate")] - SecureCorporate = 2, - - /// - /// Enum TrustedBeneficiary for value: trustedBeneficiary - /// - [EnumMember(Value = "trustedBeneficiary")] - TrustedBeneficiary = 3, - - /// - /// Enum TransactionRiskAnalysis for value: transactionRiskAnalysis - /// - [EnumMember(Value = "transactionRiskAnalysis")] - TransactionRiskAnalysis = 4, - - /// - /// Enum AcquirerExemption for value: acquirerExemption - /// - [EnumMember(Value = "acquirerExemption")] - AcquirerExemption = 5, - - /// - /// Enum NoExemptionApplied for value: noExemptionApplied - /// - [EnumMember(Value = "noExemptionApplied")] - NoExemptionApplied = 6, - - /// - /// Enum VisaDAFExemption for value: visaDAFExemption - /// - [EnumMember(Value = "visaDAFExemption")] - VisaDAFExemption = 7 - - } - - - /// - /// Indicates the exemption type that was applied to the authentication by the issuer, if exemption applied. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** * **acquirerExemption** * **noExemptionApplied** * **visaDAFExemption** - /// - /// Indicates the exemption type that was applied to the authentication by the issuer, if exemption applied. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** * **acquirerExemption** * **noExemptionApplied** * **visaDAFExemption** - [DataMember(Name = "exemptionIndicator", EmitDefaultValue = false)] - public ExemptionIndicatorEnum? ExemptionIndicator { get; set; } - /// - /// Identifies the category of the message for a specific use case. Possible values: * **payment** * **nonPayment** - /// - /// Identifies the category of the message for a specific use case. Possible values: * **payment** * **nonPayment** - [JsonConverter(typeof(StringEnumConverter))] - public enum MessageCategoryEnum - { - /// - /// Enum Payment for value: payment - /// - [EnumMember(Value = "payment")] - Payment = 1, - - /// - /// Enum NonPayment for value: nonPayment - /// - [EnumMember(Value = "nonPayment")] - NonPayment = 2 - - } - - - /// - /// Identifies the category of the message for a specific use case. Possible values: * **payment** * **nonPayment** - /// - /// Identifies the category of the message for a specific use case. Possible values: * **payment** * **nonPayment** - [DataMember(Name = "messageCategory", IsRequired = false, EmitDefaultValue = false)] - public MessageCategoryEnum MessageCategory { get; set; } - /// - /// The `transStatus` value as defined in the 3D Secure 2 specification. Possible values: * **Y**: Authentication / Account verification successful. * **N**: Not Authenticated / Account not verified. Transaction denied. * **U**: Authentication / Account verification could not be performed. * **I**: Informational Only / 3D Secure Requestor challenge preference acknowledged. * **R**: Authentication / Account verification rejected by the Issuer. - /// - /// The `transStatus` value as defined in the 3D Secure 2 specification. Possible values: * **Y**: Authentication / Account verification successful. * **N**: Not Authenticated / Account not verified. Transaction denied. * **U**: Authentication / Account verification could not be performed. * **I**: Informational Only / 3D Secure Requestor challenge preference acknowledged. * **R**: Authentication / Account verification rejected by the Issuer. - [JsonConverter(typeof(StringEnumConverter))] - public enum TransStatusEnum - { - /// - /// Enum Y for value: Y - /// - [EnumMember(Value = "Y")] - Y = 1, - - /// - /// Enum N for value: N - /// - [EnumMember(Value = "N")] - N = 2, - - /// - /// Enum R for value: R - /// - [EnumMember(Value = "R")] - R = 3, - - /// - /// Enum I for value: I - /// - [EnumMember(Value = "I")] - I = 4, - - /// - /// Enum U for value: U - /// - [EnumMember(Value = "U")] - U = 5 - - } - - - /// - /// The `transStatus` value as defined in the 3D Secure 2 specification. Possible values: * **Y**: Authentication / Account verification successful. * **N**: Not Authenticated / Account not verified. Transaction denied. * **U**: Authentication / Account verification could not be performed. * **I**: Informational Only / 3D Secure Requestor challenge preference acknowledged. * **R**: Authentication / Account verification rejected by the Issuer. - /// - /// The `transStatus` value as defined in the 3D Secure 2 specification. Possible values: * **Y**: Authentication / Account verification successful. * **N**: Not Authenticated / Account not verified. Transaction denied. * **U**: Authentication / Account verification could not be performed. * **I**: Informational Only / 3D Secure Requestor challenge preference acknowledged. * **R**: Authentication / Account verification rejected by the Issuer. - [DataMember(Name = "transStatus", IsRequired = false, EmitDefaultValue = false)] - public TransStatusEnum TransStatus { get; set; } - /// - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - /// - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - [JsonConverter(typeof(StringEnumConverter))] - public enum TransStatusReasonEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 6, - - /// - /// Enum _07 for value: 07 - /// - [EnumMember(Value = "07")] - _07 = 7, - - /// - /// Enum _08 for value: 08 - /// - [EnumMember(Value = "08")] - _08 = 8, - - /// - /// Enum _09 for value: 09 - /// - [EnumMember(Value = "09")] - _09 = 9, - - /// - /// Enum _10 for value: 10 - /// - [EnumMember(Value = "10")] - _10 = 10, - - /// - /// Enum _11 for value: 11 - /// - [EnumMember(Value = "11")] - _11 = 11, - - /// - /// Enum _12 for value: 12 - /// - [EnumMember(Value = "12")] - _12 = 12, - - /// - /// Enum _13 for value: 13 - /// - [EnumMember(Value = "13")] - _13 = 13, - - /// - /// Enum _14 for value: 14 - /// - [EnumMember(Value = "14")] - _14 = 14, - - /// - /// Enum _15 for value: 15 - /// - [EnumMember(Value = "15")] - _15 = 15, - - /// - /// Enum _16 for value: 16 - /// - [EnumMember(Value = "16")] - _16 = 16, - - /// - /// Enum _17 for value: 17 - /// - [EnumMember(Value = "17")] - _17 = 17, - - /// - /// Enum _18 for value: 18 - /// - [EnumMember(Value = "18")] - _18 = 18, - - /// - /// Enum _19 for value: 19 - /// - [EnumMember(Value = "19")] - _19 = 19, - - /// - /// Enum _20 for value: 20 - /// - [EnumMember(Value = "20")] - _20 = 20, - - /// - /// Enum _21 for value: 21 - /// - [EnumMember(Value = "21")] - _21 = 21, - - /// - /// Enum _22 for value: 22 - /// - [EnumMember(Value = "22")] - _22 = 22, - - /// - /// Enum _23 for value: 23 - /// - [EnumMember(Value = "23")] - _23 = 23, - - /// - /// Enum _24 for value: 24 - /// - [EnumMember(Value = "24")] - _24 = 24, - - /// - /// Enum _25 for value: 25 - /// - [EnumMember(Value = "25")] - _25 = 25, - - /// - /// Enum _26 for value: 26 - /// - [EnumMember(Value = "26")] - _26 = 26, - - /// - /// Enum _80 for value: 80 - /// - [EnumMember(Value = "80")] - _80 = 27, - - /// - /// Enum _81 for value: 81 - /// - [EnumMember(Value = "81")] - _81 = 28, - - /// - /// Enum _82 for value: 82 - /// - [EnumMember(Value = "82")] - _82 = 29, - - /// - /// Enum _83 for value: 83 - /// - [EnumMember(Value = "83")] - _83 = 30, - - /// - /// Enum _84 for value: 84 - /// - [EnumMember(Value = "84")] - _84 = 31, - - /// - /// Enum _85 for value: 85 - /// - [EnumMember(Value = "85")] - _85 = 32, - - /// - /// Enum _86 for value: 86 - /// - [EnumMember(Value = "86")] - _86 = 33, - - /// - /// Enum _87 for value: 87 - /// - [EnumMember(Value = "87")] - _87 = 34, - - /// - /// Enum _88 for value: 88 - /// - [EnumMember(Value = "88")] - _88 = 35 - - } - - - /// - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - /// - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - [DataMember(Name = "transStatusReason", EmitDefaultValue = false)] - public TransStatusReasonEnum? TransStatusReason { get; set; } - /// - /// The type of authentication performed. Possible values: * **frictionless** * **challenge** - /// - /// The type of authentication performed. Possible values: * **frictionless** * **challenge** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Frictionless for value: frictionless - /// - [EnumMember(Value = "frictionless")] - Frictionless = 1, - - /// - /// Enum Challenge for value: challenge - /// - [EnumMember(Value = "challenge")] - Challenge = 2 - - } - - - /// - /// The type of authentication performed. Possible values: * **frictionless** * **challenge** - /// - /// The type of authentication performed. Possible values: * **frictionless** * **challenge** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AuthenticationInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Universally unique transaction identifier assigned by the Access Control Server (ACS) to identify a single transaction. (required). - /// challenge. - /// Specifies a preference for receiving a challenge. Possible values: * **01**: No preference * **02**: No challenge requested * **03**: Challenge requested (preference) * **04**: Challenge requested (mandate) * **05**: No challenge requested (transactional risk analysis is already performed) * **07**: No challenge requested (SCA is already performed) * **08**: No challenge requested (trusted beneficiaries exemption of no challenge required) * **09**: Challenge requested (trusted beneficiaries prompt requested if challenge required) * **80**: No challenge requested (secure corporate payment with Mastercard) * **82**: No challenge requested (secure corporate payment with Visa) (required). - /// Date and time in UTC of the cardholder authentication. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. (required). - /// Indicates the type of channel interface being used to initiate the transaction. Possible values: * **app** * **browser** * **3DSRequestorInitiated** (initiated by a merchant when the cardholder is not available) (required). - /// Universally unique transaction identifier assigned by the DS (card scheme) to identify a single transaction. (required). - /// Indicates the exemption type that was applied to the authentication by the issuer, if exemption applied. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** * **acquirerExemption** * **noExemptionApplied** * **visaDAFExemption** . - /// Indicates if the purchase was in the PSD2 scope. (required). - /// Identifies the category of the message for a specific use case. Possible values: * **payment** * **nonPayment** (required). - /// The `messageVersion` value as defined in the 3D Secure 2 specification. (required). - /// Risk score calculated from the transaction rules.. - /// The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. (required). - /// The `transStatus` value as defined in the 3D Secure 2 specification. Possible values: * **Y**: Authentication / Account verification successful. * **N**: Not Authenticated / Account not verified. Transaction denied. * **U**: Authentication / Account verification could not be performed. * **I**: Informational Only / 3D Secure Requestor challenge preference acknowledged. * **R**: Authentication / Account verification rejected by the Issuer. (required). - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values).. - /// The type of authentication performed. Possible values: * **frictionless** * **challenge** (required). - public AuthenticationInfo(string acsTransId = default(string), ChallengeInfo challenge = default(ChallengeInfo), ChallengeIndicatorEnum challengeIndicator = default(ChallengeIndicatorEnum), DateTime createdAt = default(DateTime), DeviceChannelEnum deviceChannel = default(DeviceChannelEnum), string dsTransID = default(string), ExemptionIndicatorEnum? exemptionIndicator = default(ExemptionIndicatorEnum?), bool? inPSD2Scope = default(bool?), MessageCategoryEnum messageCategory = default(MessageCategoryEnum), string messageVersion = default(string), int? riskScore = default(int?), string threeDSServerTransID = default(string), TransStatusEnum transStatus = default(TransStatusEnum), TransStatusReasonEnum? transStatusReason = default(TransStatusReasonEnum?), TypeEnum type = default(TypeEnum)) - { - this.AcsTransId = acsTransId; - this.ChallengeIndicator = challengeIndicator; - this.CreatedAt = createdAt; - this.DeviceChannel = deviceChannel; - this.DsTransID = dsTransID; - this.InPSD2Scope = inPSD2Scope; - this.MessageCategory = messageCategory; - this.MessageVersion = messageVersion; - this.ThreeDSServerTransID = threeDSServerTransID; - this.TransStatus = transStatus; - this.Type = type; - this.Challenge = challenge; - this.ExemptionIndicator = exemptionIndicator; - this.RiskScore = riskScore; - this.TransStatusReason = transStatusReason; - } - - /// - /// Universally unique transaction identifier assigned by the Access Control Server (ACS) to identify a single transaction. - /// - /// Universally unique transaction identifier assigned by the Access Control Server (ACS) to identify a single transaction. - [DataMember(Name = "acsTransId", IsRequired = false, EmitDefaultValue = false)] - public string AcsTransId { get; set; } - - /// - /// Gets or Sets Challenge - /// - [DataMember(Name = "challenge", EmitDefaultValue = false)] - public ChallengeInfo Challenge { get; set; } - - /// - /// Date and time in UTC of the cardholder authentication. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - /// - /// Date and time in UTC of the cardholder authentication. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Universally unique transaction identifier assigned by the DS (card scheme) to identify a single transaction. - /// - /// Universally unique transaction identifier assigned by the DS (card scheme) to identify a single transaction. - [DataMember(Name = "dsTransID", IsRequired = false, EmitDefaultValue = false)] - public string DsTransID { get; set; } - - /// - /// Indicates if the purchase was in the PSD2 scope. - /// - /// Indicates if the purchase was in the PSD2 scope. - [DataMember(Name = "inPSD2Scope", IsRequired = false, EmitDefaultValue = false)] - public bool? InPSD2Scope { get; set; } - - /// - /// The `messageVersion` value as defined in the 3D Secure 2 specification. - /// - /// The `messageVersion` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "messageVersion", IsRequired = false, EmitDefaultValue = false)] - public string MessageVersion { get; set; } - - /// - /// Risk score calculated from the transaction rules. - /// - /// Risk score calculated from the transaction rules. - [DataMember(Name = "riskScore", EmitDefaultValue = false)] - public int? RiskScore { get; set; } - - /// - /// The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. - /// - /// The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "threeDSServerTransID", IsRequired = false, EmitDefaultValue = false)] - public string ThreeDSServerTransID { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AuthenticationInfo {\n"); - sb.Append(" AcsTransId: ").Append(AcsTransId).Append("\n"); - sb.Append(" Challenge: ").Append(Challenge).Append("\n"); - sb.Append(" ChallengeIndicator: ").Append(ChallengeIndicator).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" DeviceChannel: ").Append(DeviceChannel).Append("\n"); - sb.Append(" DsTransID: ").Append(DsTransID).Append("\n"); - sb.Append(" ExemptionIndicator: ").Append(ExemptionIndicator).Append("\n"); - sb.Append(" InPSD2Scope: ").Append(InPSD2Scope).Append("\n"); - sb.Append(" MessageCategory: ").Append(MessageCategory).Append("\n"); - sb.Append(" MessageVersion: ").Append(MessageVersion).Append("\n"); - sb.Append(" RiskScore: ").Append(RiskScore).Append("\n"); - sb.Append(" ThreeDSServerTransID: ").Append(ThreeDSServerTransID).Append("\n"); - sb.Append(" TransStatus: ").Append(TransStatus).Append("\n"); - sb.Append(" TransStatusReason: ").Append(TransStatusReason).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AuthenticationInfo); - } - - /// - /// Returns true if AuthenticationInfo instances are equal - /// - /// Instance of AuthenticationInfo to be compared - /// Boolean - public bool Equals(AuthenticationInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AcsTransId == input.AcsTransId || - (this.AcsTransId != null && - this.AcsTransId.Equals(input.AcsTransId)) - ) && - ( - this.Challenge == input.Challenge || - (this.Challenge != null && - this.Challenge.Equals(input.Challenge)) - ) && - ( - this.ChallengeIndicator == input.ChallengeIndicator || - this.ChallengeIndicator.Equals(input.ChallengeIndicator) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.DeviceChannel == input.DeviceChannel || - this.DeviceChannel.Equals(input.DeviceChannel) - ) && - ( - this.DsTransID == input.DsTransID || - (this.DsTransID != null && - this.DsTransID.Equals(input.DsTransID)) - ) && - ( - this.ExemptionIndicator == input.ExemptionIndicator || - this.ExemptionIndicator.Equals(input.ExemptionIndicator) - ) && - ( - this.InPSD2Scope == input.InPSD2Scope || - this.InPSD2Scope.Equals(input.InPSD2Scope) - ) && - ( - this.MessageCategory == input.MessageCategory || - this.MessageCategory.Equals(input.MessageCategory) - ) && - ( - this.MessageVersion == input.MessageVersion || - (this.MessageVersion != null && - this.MessageVersion.Equals(input.MessageVersion)) - ) && - ( - this.RiskScore == input.RiskScore || - this.RiskScore.Equals(input.RiskScore) - ) && - ( - this.ThreeDSServerTransID == input.ThreeDSServerTransID || - (this.ThreeDSServerTransID != null && - this.ThreeDSServerTransID.Equals(input.ThreeDSServerTransID)) - ) && - ( - this.TransStatus == input.TransStatus || - this.TransStatus.Equals(input.TransStatus) - ) && - ( - this.TransStatusReason == input.TransStatusReason || - this.TransStatusReason.Equals(input.TransStatusReason) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcsTransId != null) - { - hashCode = (hashCode * 59) + this.AcsTransId.GetHashCode(); - } - if (this.Challenge != null) - { - hashCode = (hashCode * 59) + this.Challenge.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ChallengeIndicator.GetHashCode(); - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DeviceChannel.GetHashCode(); - if (this.DsTransID != null) - { - hashCode = (hashCode * 59) + this.DsTransID.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExemptionIndicator.GetHashCode(); - hashCode = (hashCode * 59) + this.InPSD2Scope.GetHashCode(); - hashCode = (hashCode * 59) + this.MessageCategory.GetHashCode(); - if (this.MessageVersion != null) - { - hashCode = (hashCode * 59) + this.MessageVersion.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RiskScore.GetHashCode(); - if (this.ThreeDSServerTransID != null) - { - hashCode = (hashCode * 59) + this.ThreeDSServerTransID.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TransStatus.GetHashCode(); - hashCode = (hashCode * 59) + this.TransStatusReason.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.cs b/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.cs deleted file mode 100644 index dbb25c08a..000000000 --- a/Adyen/Model/AcsWebhooks/AuthenticationNotificationData.cs +++ /dev/null @@ -1,250 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// AuthenticationNotificationData - /// - [DataContract(Name = "AuthenticationNotificationData")] - public partial class AuthenticationNotificationData : IEquatable, IValidatableObject - { - /// - /// Outcome of the authentication. Allowed values: * authenticated * rejected * error - /// - /// Outcome of the authentication. Allowed values: * authenticated * rejected * error - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Authenticated for value: authenticated - /// - [EnumMember(Value = "authenticated")] - Authenticated = 1, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 2, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 3 - - } - - - /// - /// Outcome of the authentication. Allowed values: * authenticated * rejected * error - /// - /// Outcome of the authentication. Allowed values: * authenticated * rejected * error - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AuthenticationNotificationData() { } - /// - /// Initializes a new instance of the class. - /// - /// authentication (required). - /// The unique identifier of the balance platform.. - /// The unique identifier of the authentication. (required). - /// The unique identifier of the payment instrument that was used for the authentication. (required). - /// purchase (required). - /// Outcome of the authentication. Allowed values: * authenticated * rejected * error (required). - public AuthenticationNotificationData(AuthenticationInfo authentication = default(AuthenticationInfo), string balancePlatform = default(string), string id = default(string), string paymentInstrumentId = default(string), PurchaseInfo purchase = default(PurchaseInfo), StatusEnum status = default(StatusEnum)) - { - this.Authentication = authentication; - this.Id = id; - this.PaymentInstrumentId = paymentInstrumentId; - this.Purchase = purchase; - this.Status = status; - this.BalancePlatform = balancePlatform; - } - - /// - /// Gets or Sets Authentication - /// - [DataMember(Name = "authentication", IsRequired = false, EmitDefaultValue = false)] - public AuthenticationInfo Authentication { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The unique identifier of the authentication. - /// - /// The unique identifier of the authentication. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the payment instrument that was used for the authentication. - /// - /// The unique identifier of the payment instrument that was used for the authentication. - [DataMember(Name = "paymentInstrumentId", IsRequired = false, EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Gets or Sets Purchase - /// - [DataMember(Name = "purchase", IsRequired = false, EmitDefaultValue = false)] - public PurchaseInfo Purchase { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AuthenticationNotificationData {\n"); - sb.Append(" Authentication: ").Append(Authentication).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Purchase: ").Append(Purchase).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AuthenticationNotificationData); - } - - /// - /// Returns true if AuthenticationNotificationData instances are equal - /// - /// Instance of AuthenticationNotificationData to be compared - /// Boolean - public bool Equals(AuthenticationNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.Authentication == input.Authentication || - (this.Authentication != null && - this.Authentication.Equals(input.Authentication)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Purchase == input.Purchase || - (this.Purchase != null && - this.Purchase.Equals(input.Purchase)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Authentication != null) - { - hashCode = (hashCode * 59) + this.Authentication.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - if (this.Purchase != null) - { - hashCode = (hashCode * 59) + this.Purchase.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.cs b/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.cs deleted file mode 100644 index c541d209c..000000000 --- a/Adyen/Model/AcsWebhooks/AuthenticationNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// AuthenticationNotificationRequest - /// - [DataContract(Name = "AuthenticationNotificationRequest")] - public partial class AuthenticationNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BalancePlatformAuthenticationCreated for value: balancePlatform.authentication.created - /// - [EnumMember(Value = "balancePlatform.authentication.created")] - BalancePlatformAuthenticationCreated = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AuthenticationNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of notification. (required). - public AuthenticationNotificationRequest(AuthenticationNotificationData data = default(AuthenticationNotificationData), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public AuthenticationNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AuthenticationNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AuthenticationNotificationRequest); - } - - /// - /// Returns true if AuthenticationNotificationRequest instances are equal - /// - /// Instance of AuthenticationNotificationRequest to be compared - /// Boolean - public bool Equals(AuthenticationNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.cs b/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.cs deleted file mode 100644 index 1d24000b9..000000000 --- a/Adyen/Model/AcsWebhooks/BalancePlatformNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// BalancePlatformNotificationResponse - /// - [DataContract(Name = "BalancePlatformNotificationResponse")] - public partial class BalancePlatformNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).. - public BalancePlatformNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalancePlatformNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalancePlatformNotificationResponse); - } - - /// - /// Returns true if BalancePlatformNotificationResponse instances are equal - /// - /// Instance of BalancePlatformNotificationResponse to be compared - /// Boolean - public bool Equals(BalancePlatformNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/ChallengeInfo.cs b/Adyen/Model/AcsWebhooks/ChallengeInfo.cs deleted file mode 100644 index 4519190b7..000000000 --- a/Adyen/Model/AcsWebhooks/ChallengeInfo.cs +++ /dev/null @@ -1,303 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// ChallengeInfo - /// - [DataContract(Name = "ChallengeInfo")] - public partial class ChallengeInfo : IEquatable, IValidatableObject - { - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. - [JsonConverter(typeof(StringEnumConverter))] - public enum ChallengeCancelEnum - { - /// - /// Enum _00 for value: 00 - /// - [EnumMember(Value = "00")] - _00 = 1, - - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 2, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 3, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 4, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 5, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 6, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 7, - - /// - /// Enum _07 for value: 07 - /// - [EnumMember(Value = "07")] - _07 = 8, - - /// - /// Enum _08 for value: 08 - /// - [EnumMember(Value = "08")] - _08 = 9 - - } - - - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK. - [DataMember(Name = "challengeCancel", EmitDefaultValue = false)] - public ChallengeCancelEnum? ChallengeCancel { get; set; } - /// - /// The flow used in the challenge. Possible values: * **PWD_OTP_PHONE_FL**: one-time password (OTP) flow via SMS * **PWD_OTP_EMAIL_FL**: one-time password (OTP) flow via email * **OOB_TRIGGER_FL**: out-of-band (OOB) flow - /// - /// The flow used in the challenge. Possible values: * **PWD_OTP_PHONE_FL**: one-time password (OTP) flow via SMS * **PWD_OTP_EMAIL_FL**: one-time password (OTP) flow via email * **OOB_TRIGGER_FL**: out-of-band (OOB) flow - [JsonConverter(typeof(StringEnumConverter))] - public enum FlowEnum - { - /// - /// Enum PWDOTPPHONEFL for value: PWD_OTP_PHONE_FL - /// - [EnumMember(Value = "PWD_OTP_PHONE_FL")] - PWDOTPPHONEFL = 1, - - /// - /// Enum PWDOTPEMAILFL for value: PWD_OTP_EMAIL_FL - /// - [EnumMember(Value = "PWD_OTP_EMAIL_FL")] - PWDOTPEMAILFL = 2, - - /// - /// Enum OOBTRIGGERFL for value: OOB_TRIGGER_FL - /// - [EnumMember(Value = "OOB_TRIGGER_FL")] - OOBTRIGGERFL = 3 - - } - - - /// - /// The flow used in the challenge. Possible values: * **PWD_OTP_PHONE_FL**: one-time password (OTP) flow via SMS * **PWD_OTP_EMAIL_FL**: one-time password (OTP) flow via email * **OOB_TRIGGER_FL**: out-of-band (OOB) flow - /// - /// The flow used in the challenge. Possible values: * **PWD_OTP_PHONE_FL**: one-time password (OTP) flow via SMS * **PWD_OTP_EMAIL_FL**: one-time password (OTP) flow via email * **OOB_TRIGGER_FL**: out-of-band (OOB) flow - [DataMember(Name = "flow", IsRequired = false, EmitDefaultValue = false)] - public FlowEnum Flow { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ChallengeInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. Possible values: * **00**: Data element is absent or value has been sent back with the key `challengeCancel`. * **01**: Cardholder selected **Cancel**. * **02**: 3DS Requestor cancelled Authentication. * **03**: Transaction abandoned. * **04**: Transaction timed out at ACS — other timeouts. * **05**: Transaction timed out at ACS — first CReq not received by ACS. * **06**: Transaction error. * **07**: Unknown. * **08**: Transaction time out at SDK.. - /// The flow used in the challenge. Possible values: * **PWD_OTP_PHONE_FL**: one-time password (OTP) flow via SMS * **PWD_OTP_EMAIL_FL**: one-time password (OTP) flow via email * **OOB_TRIGGER_FL**: out-of-band (OOB) flow (required). - /// The last time of interaction with the challenge. (required). - /// The last four digits of the phone number used in the challenge.. - /// The number of times the one-time password (OTP) was resent during the challenge.. - /// The number of retries used in the challenge.. - public ChallengeInfo(ChallengeCancelEnum? challengeCancel = default(ChallengeCancelEnum?), FlowEnum flow = default(FlowEnum), DateTime lastInteraction = default(DateTime), string phoneNumber = default(string), int? resends = default(int?), int? retries = default(int?)) - { - this.Flow = flow; - this.LastInteraction = lastInteraction; - this.ChallengeCancel = challengeCancel; - this.PhoneNumber = phoneNumber; - this.Resends = resends; - this.Retries = retries; - } - - /// - /// The last time of interaction with the challenge. - /// - /// The last time of interaction with the challenge. - [DataMember(Name = "lastInteraction", IsRequired = false, EmitDefaultValue = false)] - public DateTime LastInteraction { get; set; } - - /// - /// The last four digits of the phone number used in the challenge. - /// - /// The last four digits of the phone number used in the challenge. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// The number of times the one-time password (OTP) was resent during the challenge. - /// - /// The number of times the one-time password (OTP) was resent during the challenge. - [DataMember(Name = "resends", EmitDefaultValue = false)] - public int? Resends { get; set; } - - /// - /// The number of retries used in the challenge. - /// - /// The number of retries used in the challenge. - [DataMember(Name = "retries", EmitDefaultValue = false)] - public int? Retries { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChallengeInfo {\n"); - sb.Append(" ChallengeCancel: ").Append(ChallengeCancel).Append("\n"); - sb.Append(" Flow: ").Append(Flow).Append("\n"); - sb.Append(" LastInteraction: ").Append(LastInteraction).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" Resends: ").Append(Resends).Append("\n"); - sb.Append(" Retries: ").Append(Retries).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChallengeInfo); - } - - /// - /// Returns true if ChallengeInfo instances are equal - /// - /// Instance of ChallengeInfo to be compared - /// Boolean - public bool Equals(ChallengeInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ChallengeCancel == input.ChallengeCancel || - this.ChallengeCancel.Equals(input.ChallengeCancel) - ) && - ( - this.Flow == input.Flow || - this.Flow.Equals(input.Flow) - ) && - ( - this.LastInteraction == input.LastInteraction || - (this.LastInteraction != null && - this.LastInteraction.Equals(input.LastInteraction)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.Resends == input.Resends || - this.Resends.Equals(input.Resends) - ) && - ( - this.Retries == input.Retries || - this.Retries.Equals(input.Retries) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ChallengeCancel.GetHashCode(); - hashCode = (hashCode * 59) + this.Flow.GetHashCode(); - if (this.LastInteraction != null) - { - hashCode = (hashCode * 59) + this.LastInteraction.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Resends.GetHashCode(); - hashCode = (hashCode * 59) + this.Retries.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/Purchase.cs b/Adyen/Model/AcsWebhooks/Purchase.cs deleted file mode 100644 index b5482df33..000000000 --- a/Adyen/Model/AcsWebhooks/Purchase.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// Purchase - /// - [DataContract(Name = "Purchase")] - public partial class Purchase : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Purchase() { } - /// - /// Initializes a new instance of the class. - /// - /// The time of the purchase. (required). - /// The name of the merchant. (required). - /// originalAmount (required). - public Purchase(DateTime date = default(DateTime), string merchantName = default(string), Amount originalAmount = default(Amount)) - { - this.Date = date; - this.MerchantName = merchantName; - this.OriginalAmount = originalAmount; - } - - /// - /// The time of the purchase. - /// - /// The time of the purchase. - [DataMember(Name = "date", IsRequired = false, EmitDefaultValue = false)] - public DateTime Date { get; set; } - - /// - /// The name of the merchant. - /// - /// The name of the merchant. - [DataMember(Name = "merchantName", IsRequired = false, EmitDefaultValue = false)] - public string MerchantName { get; set; } - - /// - /// Gets or Sets OriginalAmount - /// - [DataMember(Name = "originalAmount", IsRequired = false, EmitDefaultValue = false)] - public Amount OriginalAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Purchase {\n"); - sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" MerchantName: ").Append(MerchantName).Append("\n"); - sb.Append(" OriginalAmount: ").Append(OriginalAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Purchase); - } - - /// - /// Returns true if Purchase instances are equal - /// - /// Instance of Purchase to be compared - /// Boolean - public bool Equals(Purchase input) - { - if (input == null) - { - return false; - } - return - ( - this.Date == input.Date || - (this.Date != null && - this.Date.Equals(input.Date)) - ) && - ( - this.MerchantName == input.MerchantName || - (this.MerchantName != null && - this.MerchantName.Equals(input.MerchantName)) - ) && - ( - this.OriginalAmount == input.OriginalAmount || - (this.OriginalAmount != null && - this.OriginalAmount.Equals(input.OriginalAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Date != null) - { - hashCode = (hashCode * 59) + this.Date.GetHashCode(); - } - if (this.MerchantName != null) - { - hashCode = (hashCode * 59) + this.MerchantName.GetHashCode(); - } - if (this.OriginalAmount != null) - { - hashCode = (hashCode * 59) + this.OriginalAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/PurchaseInfo.cs b/Adyen/Model/AcsWebhooks/PurchaseInfo.cs deleted file mode 100644 index 29200bd8f..000000000 --- a/Adyen/Model/AcsWebhooks/PurchaseInfo.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// PurchaseInfo - /// - [DataContract(Name = "PurchaseInfo")] - public partial class PurchaseInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PurchaseInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The date of the purchase. (required). - /// The name of the business that the cardholder purchased from. (required). - /// originalAmount (required). - public PurchaseInfo(string date = default(string), string merchantName = default(string), Amount originalAmount = default(Amount)) - { - this.Date = date; - this.MerchantName = merchantName; - this.OriginalAmount = originalAmount; - } - - /// - /// The date of the purchase. - /// - /// The date of the purchase. - [DataMember(Name = "date", IsRequired = false, EmitDefaultValue = false)] - public string Date { get; set; } - - /// - /// The name of the business that the cardholder purchased from. - /// - /// The name of the business that the cardholder purchased from. - [DataMember(Name = "merchantName", IsRequired = false, EmitDefaultValue = false)] - public string MerchantName { get; set; } - - /// - /// Gets or Sets OriginalAmount - /// - [DataMember(Name = "originalAmount", IsRequired = false, EmitDefaultValue = false)] - public Amount OriginalAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PurchaseInfo {\n"); - sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" MerchantName: ").Append(MerchantName).Append("\n"); - sb.Append(" OriginalAmount: ").Append(OriginalAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PurchaseInfo); - } - - /// - /// Returns true if PurchaseInfo instances are equal - /// - /// Instance of PurchaseInfo to be compared - /// Boolean - public bool Equals(PurchaseInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Date == input.Date || - (this.Date != null && - this.Date.Equals(input.Date)) - ) && - ( - this.MerchantName == input.MerchantName || - (this.MerchantName != null && - this.MerchantName.Equals(input.MerchantName)) - ) && - ( - this.OriginalAmount == input.OriginalAmount || - (this.OriginalAmount != null && - this.OriginalAmount.Equals(input.OriginalAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Date != null) - { - hashCode = (hashCode * 59) + this.Date.GetHashCode(); - } - if (this.MerchantName != null) - { - hashCode = (hashCode * 59) + this.MerchantName.GetHashCode(); - } - if (this.OriginalAmount != null) - { - hashCode = (hashCode * 59) + this.OriginalAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.cs b/Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.cs deleted file mode 100644 index 8c190ddc1..000000000 --- a/Adyen/Model/AcsWebhooks/RelayedAuthenticationRequest.cs +++ /dev/null @@ -1,258 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// RelayedAuthenticationRequest - /// - [DataContract(Name = "RelayedAuthenticationRequest")] - public partial class RelayedAuthenticationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BalancePlatformAuthenticationRelayed for value: balancePlatform.authentication.relayed - /// - [EnumMember(Value = "balancePlatform.authentication.relayed")] - BalancePlatformAuthenticationRelayed = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RelayedAuthenticationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// The unique identifier of the challenge. (required). - /// The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_) used for the purchase. (required). - /// purchase (required). - /// URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn't support auto-switching.. - /// When the event was queued.. - /// Type of notification. (required). - public RelayedAuthenticationRequest(string environment = default(string), string id = default(string), string paymentInstrumentId = default(string), Purchase purchase = default(Purchase), string threeDSRequestorAppURL = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Environment = environment; - this.Id = id; - this.PaymentInstrumentId = paymentInstrumentId; - this.Purchase = purchase; - this.Type = type; - this.ThreeDSRequestorAppURL = threeDSRequestorAppURL; - this.Timestamp = timestamp; - } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// The unique identifier of the challenge. - /// - /// The unique identifier of the challenge. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_) used for the purchase. - /// - /// The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_) used for the purchase. - [DataMember(Name = "paymentInstrumentId", IsRequired = false, EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Gets or Sets Purchase - /// - [DataMember(Name = "purchase", IsRequired = false, EmitDefaultValue = false)] - public Purchase Purchase { get; set; } - - /// - /// URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn't support auto-switching. - /// - /// URL for auto-switching to the threeDS Requestor App. If not present, the threeDS Requestor App doesn't support auto-switching. - [DataMember(Name = "threeDSRequestorAppURL", EmitDefaultValue = false)] - public string ThreeDSRequestorAppURL { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RelayedAuthenticationRequest {\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Purchase: ").Append(Purchase).Append("\n"); - sb.Append(" ThreeDSRequestorAppURL: ").Append(ThreeDSRequestorAppURL).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RelayedAuthenticationRequest); - } - - /// - /// Returns true if RelayedAuthenticationRequest instances are equal - /// - /// Instance of RelayedAuthenticationRequest to be compared - /// Boolean - public bool Equals(RelayedAuthenticationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Purchase == input.Purchase || - (this.Purchase != null && - this.Purchase.Equals(input.Purchase)) - ) && - ( - this.ThreeDSRequestorAppURL == input.ThreeDSRequestorAppURL || - (this.ThreeDSRequestorAppURL != null && - this.ThreeDSRequestorAppURL.Equals(input.ThreeDSRequestorAppURL)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - if (this.Purchase != null) - { - hashCode = (hashCode * 59) + this.Purchase.GetHashCode(); - } - if (this.ThreeDSRequestorAppURL != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorAppURL.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/RelayedAuthenticationResponse.cs b/Adyen/Model/AcsWebhooks/RelayedAuthenticationResponse.cs deleted file mode 100644 index 3aaa933ab..000000000 --- a/Adyen/Model/AcsWebhooks/RelayedAuthenticationResponse.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// RelayedAuthenticationResponse - /// - [DataContract(Name = "RelayedAuthenticationResponse")] - public partial class RelayedAuthenticationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RelayedAuthenticationResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// authenticationDecision (required). - public RelayedAuthenticationResponse(AuthenticationDecision authenticationDecision = default(AuthenticationDecision)) - { - this.AuthenticationDecision = authenticationDecision; - } - - /// - /// Gets or Sets AuthenticationDecision - /// - [DataMember(Name = "authenticationDecision", IsRequired = false, EmitDefaultValue = false)] - public AuthenticationDecision AuthenticationDecision { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RelayedAuthenticationResponse {\n"); - sb.Append(" AuthenticationDecision: ").Append(AuthenticationDecision).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RelayedAuthenticationResponse); - } - - /// - /// Returns true if RelayedAuthenticationResponse instances are equal - /// - /// Instance of RelayedAuthenticationResponse to be compared - /// Boolean - public bool Equals(RelayedAuthenticationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthenticationDecision == input.AuthenticationDecision || - (this.AuthenticationDecision != null && - this.AuthenticationDecision.Equals(input.AuthenticationDecision)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthenticationDecision != null) - { - hashCode = (hashCode * 59) + this.AuthenticationDecision.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/Resource.cs b/Adyen/Model/AcsWebhooks/Resource.cs deleted file mode 100644 index b77e9d028..000000000 --- a/Adyen/Model/AcsWebhooks/Resource.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// Resource - /// - [DataContract(Name = "Resource")] - public partial class Resource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**.. - /// The ID of the resource.. - public Resource(string balancePlatform = default(string), DateTime creationDate = default(DateTime), string id = default(string)) - { - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Id = id; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Resource {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Resource); - } - - /// - /// Returns true if Resource instances are equal - /// - /// Instance of Resource to be compared - /// Boolean - public bool Equals(Resource input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/AcsWebhooks/ServiceError.cs b/Adyen/Model/AcsWebhooks/ServiceError.cs deleted file mode 100644 index f4a9fc252..000000000 --- a/Adyen/Model/AcsWebhooks/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Authentication webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.AcsWebhooks -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ApiError.cs b/Adyen/Model/ApiError.cs deleted file mode 100644 index 6a544f85e..000000000 --- a/Adyen/Model/ApiError.cs +++ /dev/null @@ -1,141 +0,0 @@ -#region License -// /* -// * ###### -// * ###### -// * ############ ####( ###### #####. ###### ############ ############ -// * ############# #####( ###### #####. ###### ############# ############# -// * ###### #####( ###### #####. ###### ##### ###### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ###### -// * ############# ############# ############# ############# ##### ###### -// * ############ ############ ############# ############ ##### ###### -// * ###### -// * ############# -// * ############ -// * -// * Adyen Dotnet API Library -// * -// * Copyright (c) 2020 Adyen B.V. -// * This file is open source and available under the MIT license. -// * See the LICENSE file for more info. -// */ -#endregion - -using Adyen.Model.Recurring; -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Text; - -namespace Adyen.Model -{ - public class ApiError : IEquatable, IValidatableObject - { - public int Status { get; set; } - public string ErrorCode { get; set; } - public string Message { get; set; } - public string ErrorType { get; set; } - public string PspReference { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ApiError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as RecurringDetailsResult); - } - - /// - /// Returns true if RecurringDetailsResult instances are equal - /// - /// Instance of RecurringDetailsResult to be compared - /// Boolean - public bool Equals(ApiError other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Status == other.Status || - - this.Status.Equals(other.Status) - ) && - ( - this.ErrorCode == other.ErrorCode || - this.ErrorCode != null && - this.ErrorCode.Equals(other.ErrorCode) - ) && - ( - this.Message == other.Message || - this.Message != null && - this.Message.Equals(other.Message) - ) && - ( - this.ErrorType == other.ErrorType || - this.ErrorType != null && - this.ErrorType.Equals(other.ErrorType) - ) && - ( - this.PspReference == other.PspReference || - this.PspReference != null && - this.PspReference.Equals(other.PspReference) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - hash = hash * 59 + this.Status.GetHashCode(); - if (this.ErrorCode != null) - hash = hash * 59 + this.ErrorCode.GetHashCode(); - if (this.Message != null) - hash = hash * 59 + this.Message.GetHashCode(); - if (this.ErrorType != null) - hash = hash * 59 + this.ErrorType.GetHashCode(); - if (this.PspReference != null) - hash = hash * 59 + this.PspReference.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/Adyen/Model/ApplicationInformation/ApplicationInfo.cs b/Adyen/Model/ApplicationInformation/ApplicationInfo.cs deleted file mode 100644 index 0427270a9..000000000 --- a/Adyen/Model/ApplicationInformation/ApplicationInfo.cs +++ /dev/null @@ -1,181 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; -using System.Text; -using Adyen.Constants; -using Newtonsoft.Json; - -namespace Adyen.Model.ApplicationInformation -{ - /// - /// ApplicationInfo - /// - [DataContract] - public class ApplicationInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - public ApplicationInfo() - { - AdyenLibrary = new CommonField - { - Name = ClientConfig.LibName, - Version = ClientConfig.LibVersion - }; - } - - /// - /// Gets or Sets AdyenLibrary - /// - [DataMember(Name = "adyenLibrary", EmitDefaultValue = false)] - public CommonField AdyenLibrary { get; private set; } - - /// - /// Gets or Sets AdyenPaymentSource - /// - [DataMember(Name = "adyenPaymentSource", EmitDefaultValue = false)] - public CommonField AdyenPaymentSource { get; set; } - - /// - /// Gets or Sets ExternalPlatform - /// - [DataMember(Name = "externalPlatform", EmitDefaultValue = false)] - public ExternalPlatform ExternalPlatform { get; set; } - - /// - /// Gets or Sets MerchantApplication - /// - [DataMember(Name = "merchantApplication", EmitDefaultValue = false)] - public CommonField MerchantApplication { get; set; } - - /// - /// Gets or Sets MerchantDevice - /// - [DataMember(Name = "merchantDevice", EmitDefaultValue = false)] - public MerchantDevice MerchantDevice { get; set; } - - /// - /// Gets or Sets ShopperInteractionDevice - /// - [DataMember(Name = "shopperInteractionDevice", EmitDefaultValue = false)] - public ShopperInteractionDevice ShopperInteractionDevice { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ApplicationInfo {\n"); - sb.Append(" AdyenLibrary: ").Append(AdyenLibrary).Append("\n"); - sb.Append(" AdyenPaymentSource: ").Append(AdyenPaymentSource).Append("\n"); - sb.Append(" ExternalPlatform: ").Append(ExternalPlatform).Append("\n"); - sb.Append(" MerchantApplication: ").Append(MerchantApplication).Append("\n"); - sb.Append(" MerchantDevice: ").Append(MerchantDevice).Append("\n"); - sb.Append(" ShopperInteractionDevice: ").Append(ShopperInteractionDevice).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return Equals(input as ApplicationInfo); - } - - /// - /// Returns true if ApplicationInfo instances are equal - /// - /// Instance of ApplicationInfo to be compared - /// Boolean - public bool Equals(ApplicationInfo input) - { - if (input == null) - return false; - - return - ( - AdyenLibrary == input.AdyenLibrary || - (AdyenLibrary != null && - AdyenLibrary.Equals(input.AdyenLibrary)) - ) && - ( - AdyenPaymentSource == input.AdyenPaymentSource || - (AdyenPaymentSource != null && - AdyenPaymentSource.Equals(input.AdyenPaymentSource)) - ) && - ( - ExternalPlatform == input.ExternalPlatform || - (ExternalPlatform != null && - ExternalPlatform.Equals(input.ExternalPlatform)) - ) && - ( - MerchantApplication == input.MerchantApplication || - (MerchantApplication != null && - MerchantApplication.Equals(input.MerchantApplication)) - ) && - ( - MerchantDevice == input.MerchantDevice || - (MerchantDevice != null && - MerchantDevice.Equals(input.MerchantDevice)) - ) && - ( - ShopperInteractionDevice == input.ShopperInteractionDevice || - (ShopperInteractionDevice != null && - ShopperInteractionDevice.Equals(input.ShopperInteractionDevice)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (AdyenLibrary != null) - hashCode = hashCode * 59 + AdyenLibrary.GetHashCode(); - if (AdyenPaymentSource != null) - hashCode = hashCode * 59 + AdyenPaymentSource.GetHashCode(); - if (ExternalPlatform != null) - hashCode = hashCode * 59 + ExternalPlatform.GetHashCode(); - if (MerchantApplication != null) - hashCode = hashCode * 59 + MerchantApplication.GetHashCode(); - if (MerchantDevice != null) - hashCode = hashCode * 59 + MerchantDevice.GetHashCode(); - if (ShopperInteractionDevice != null) - hashCode = hashCode * 59 + ShopperInteractionDevice.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ApplicationInformation/CommonField.cs b/Adyen/Model/ApplicationInformation/CommonField.cs deleted file mode 100644 index e1884260c..000000000 --- a/Adyen/Model/ApplicationInformation/CommonField.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; -using System.Text; -using Newtonsoft.Json; - -namespace Adyen.Model.ApplicationInformation -{ - /// - /// CommonField - /// - [DataContract] - public class CommonField : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Name of the field. For example, Name of External Platform.. - /// Version of the field. For example, Version of External Platform.. - public CommonField(string Name = default(string), string Version = default(string)) - { - this.Name = Name; - this.Version = Version; - } - - /// - /// Name of the field. For example, Name of External Platform. - /// - /// Name of the field. For example, Name of External Platform. - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Version of the field. For example, Version of External Platform. - /// - /// Version of the field. For example, Version of External Platform. - [DataMember(Name="version", EmitDefaultValue=false)] - public string Version { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CommonField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return Equals(input as CommonField); - } - - /// - /// Returns true if CommonField instances are equal - /// - /// Instance of CommonField to be compared - /// Boolean - public bool Equals(CommonField input) - { - if (input == null) - return false; - - return - ( - Name == input.Name || - (Name != null && - Name.Equals(input.Name)) - ) && - ( - Version == input.Version || - (Version != null && - Version.Equals(input.Version)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (Name != null) - hashCode = hashCode * 59 + Name.GetHashCode(); - if (Version != null) - hashCode = hashCode * 59 + Version.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/Adyen/Model/ApplicationInformation/ExternalPlatform.cs b/Adyen/Model/ApplicationInformation/ExternalPlatform.cs deleted file mode 100644 index dfd53c0fd..000000000 --- a/Adyen/Model/ApplicationInformation/ExternalPlatform.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; -using System.Text; -using Newtonsoft.Json; - -namespace Adyen.Model.ApplicationInformation -{ - /// - /// ExternalPlatform - /// - [DataContract] - public class ExternalPlatform : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// External platform integrator.. - /// Name of the field. For example, Name of External Platform.. - /// Version of the field. For example, Version of External Platform.. - public ExternalPlatform(string Integrator = default(string), string Name = default(string), string Version = default(string)) - { - this.Integrator = Integrator; - this.Name = Name; - this.Version = Version; - } - - /// - /// External platform integrator. - /// - /// External platform integrator. - [DataMember(Name="integrator", EmitDefaultValue=false)] - public string Integrator { get; set; } - - /// - /// Name of the field. For example, Name of External Platform. - /// - /// Name of the field. For example, Name of External Platform. - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Version of the field. For example, Version of External Platform. - /// - /// Version of the field. For example, Version of External Platform. - [DataMember(Name="version", EmitDefaultValue=false)] - public string Version { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ExternalPlatform {\n"); - sb.Append(" Integrator: ").Append(Integrator).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return Equals(input as ExternalPlatform); - } - - /// - /// Returns true if ExternalPlatform instances are equal - /// - /// Instance of ExternalPlatform to be compared - /// Boolean - public bool Equals(ExternalPlatform input) - { - if (input == null) - return false; - - return - ( - Integrator == input.Integrator || - (Integrator != null && - Integrator.Equals(input.Integrator)) - ) && - ( - Name == input.Name || - (Name != null && - Name.Equals(input.Name)) - ) && - ( - Version == input.Version || - (Version != null && - Version.Equals(input.Version)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (Integrator != null) - hashCode = hashCode * 59 + Integrator.GetHashCode(); - if (Name != null) - hashCode = hashCode * 59 + Name.GetHashCode(); - if (Version != null) - hashCode = hashCode * 59 + Version.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ApplicationInformation/MerchantDevice.cs b/Adyen/Model/ApplicationInformation/MerchantDevice.cs deleted file mode 100644 index 799a29e69..000000000 --- a/Adyen/Model/ApplicationInformation/MerchantDevice.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; -using System.Text; -using Newtonsoft.Json; - -namespace Adyen.Model.ApplicationInformation -{ - /// - /// MerchantDevice - /// - [DataContract] - public class MerchantDevice : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Operating system running on the merchant device.. - /// Version of the operating system on the merchant device.. - /// Merchant device reference.. - public MerchantDevice(string Os = default(string), string OsVersion = default(string), string Reference = default(string)) - { - this.Os = Os; - this.OsVersion = OsVersion; - this.Reference = Reference; - } - - /// - /// Operating system running on the merchant device. - /// - /// Operating system running on the merchant device. - [DataMember(Name="os", EmitDefaultValue=false)] - public string Os { get; set; } - - /// - /// Version of the operating system on the merchant device. - /// - /// Version of the operating system on the merchant device. - [DataMember(Name="osVersion", EmitDefaultValue=false)] - public string OsVersion { get; set; } - - /// - /// Merchant device reference. - /// - /// Merchant device reference. - [DataMember(Name="reference", EmitDefaultValue=false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MerchantDevice {\n"); - sb.Append(" Os: ").Append(Os).Append("\n"); - sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return Equals(input as MerchantDevice); - } - - /// - /// Returns true if MerchantDevice instances are equal - /// - /// Instance of MerchantDevice to be compared - /// Boolean - public bool Equals(MerchantDevice input) - { - if (input == null) - return false; - - return - ( - Os == input.Os || - (Os != null && - Os.Equals(input.Os)) - ) && - ( - OsVersion == input.OsVersion || - (OsVersion != null && - OsVersion.Equals(input.OsVersion)) - ) && - ( - Reference == input.Reference || - (Reference != null && - Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (Os != null) - hashCode = hashCode * 59 + Os.GetHashCode(); - if (OsVersion != null) - hashCode = hashCode * 59 + OsVersion.GetHashCode(); - if (Reference != null) - hashCode = hashCode * 59 + Reference.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ApplicationInformation/ShopperInteractionDevice.cs b/Adyen/Model/ApplicationInformation/ShopperInteractionDevice.cs deleted file mode 100644 index 57b152246..000000000 --- a/Adyen/Model/ApplicationInformation/ShopperInteractionDevice.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; -using System.Text; -using Newtonsoft.Json; - -namespace Adyen.Model.ApplicationInformation -{ - /// - /// ShopperInteractionDevice - /// - [DataContract] - public class ShopperInteractionDevice : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Locale on the shopper interaction device.. - /// Operating system running on the shopper interaction device.. - /// Version of the operating system on the shopper interaction device.. - public ShopperInteractionDevice(string Locale = default(string), string Os = default(string), string OsVersion = default(string)) - { - this.Locale = Locale; - this.Os = Os; - this.OsVersion = OsVersion; - } - - /// - /// Locale on the shopper interaction device. - /// - /// Locale on the shopper interaction device. - [DataMember(Name="locale", EmitDefaultValue=false)] - public string Locale { get; set; } - - /// - /// Operating system running on the shopper interaction device. - /// - /// Operating system running on the shopper interaction device. - [DataMember(Name="os", EmitDefaultValue=false)] - public string Os { get; set; } - - /// - /// Version of the operating system on the shopper interaction device. - /// - /// Version of the operating system on the shopper interaction device. - [DataMember(Name="osVersion", EmitDefaultValue=false)] - public string OsVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class PaymentMethodsApplicationInfoShopperInteractionDevice {\n"); - sb.Append(" Locale: ").Append(Locale).Append("\n"); - sb.Append(" Os: ").Append(Os).Append("\n"); - sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return Equals(input as ShopperInteractionDevice); - } - - /// - /// Returns true if PaymentMethodsApplicationInfoShopperInteractionDevice instances are equal - /// - /// Instance of PaymentMethodsApplicationInfoShopperInteractionDevice to be compared - /// Boolean - public bool Equals(ShopperInteractionDevice input) - { - if (input == null) - return false; - - return - ( - Locale == input.Locale || - (Locale != null && - Locale.Equals(input.Locale)) - ) && - ( - Os == input.Os || - (Os != null && - Os.Equals(input.Os)) - ) && - ( - OsVersion == input.OsVersion || - (OsVersion != null && - OsVersion.Equals(input.OsVersion)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (Locale != null) - hashCode = hashCode * 59 + Locale.GetHashCode(); - if (Os != null) - hashCode = hashCode * 59 + Os.GetHashCode(); - if (OsVersion != null) - hashCode = hashCode * 59 + OsVersion.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } -} diff --git a/Adyen/Model/BalanceControl/AbstractOpenAPISchema.cs b/Adyen/Model/BalanceControl/AbstractOpenAPISchema.cs deleted file mode 100644 index 4d7baff09..000000000 --- a/Adyen/Model/BalanceControl/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Adyen Balance Control API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.BalanceControl -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/BalanceControl/Amount.cs b/Adyen/Model/BalanceControl/Amount.cs deleted file mode 100644 index a9f58c3c4..000000000 --- a/Adyen/Model/BalanceControl/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Adyen Balance Control API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalanceControl -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalanceControl/BalanceTransferRequest.cs b/Adyen/Model/BalanceControl/BalanceTransferRequest.cs deleted file mode 100644 index 9d851d10e..000000000 --- a/Adyen/Model/BalanceControl/BalanceTransferRequest.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Adyen Balance Control API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalanceControl -{ - /// - /// BalanceTransferRequest - /// - [DataContract(Name = "BalanceTransferRequest")] - public partial class BalanceTransferRequest : IEquatable, IValidatableObject - { - /// - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. - /// - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Tax for value: tax - /// - [EnumMember(Value = "tax")] - Tax = 1, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 2, - - /// - /// Enum TerminalSale for value: terminalSale - /// - [EnumMember(Value = "terminalSale")] - TerminalSale = 3, - - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 4, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 5, - - /// - /// Enum Adjustment for value: adjustment - /// - [EnumMember(Value = "adjustment")] - Adjustment = 6 - - } - - - /// - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. - /// - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceTransferRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.. - /// The unique identifier of the source merchant account from which funds are deducted. (required). - /// A reference for the balance transfer. If you don't provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.. - /// The unique identifier of the destination merchant account from which funds are transferred. (required). - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. (required). - public BalanceTransferRequest(Amount amount = default(Amount), string description = default(string), string fromMerchant = default(string), string reference = default(string), string toMerchant = default(string), TypeEnum type = default(TypeEnum)) - { - this.Amount = amount; - this.FromMerchant = fromMerchant; - this.ToMerchant = toMerchant; - this.Type = type; - this.Description = description; - this.Reference = reference; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. - /// - /// A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the source merchant account from which funds are deducted. - /// - /// The unique identifier of the source merchant account from which funds are deducted. - [DataMember(Name = "fromMerchant", IsRequired = false, EmitDefaultValue = false)] - public string FromMerchant { get; set; } - - /// - /// A reference for the balance transfer. If you don't provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters. - /// - /// A reference for the balance transfer. If you don't provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The unique identifier of the destination merchant account from which funds are transferred. - /// - /// The unique identifier of the destination merchant account from which funds are transferred. - [DataMember(Name = "toMerchant", IsRequired = false, EmitDefaultValue = false)] - public string ToMerchant { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceTransferRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FromMerchant: ").Append(FromMerchant).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ToMerchant: ").Append(ToMerchant).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceTransferRequest); - } - - /// - /// Returns true if BalanceTransferRequest instances are equal - /// - /// Instance of BalanceTransferRequest to be compared - /// Boolean - public bool Equals(BalanceTransferRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.FromMerchant == input.FromMerchant || - (this.FromMerchant != null && - this.FromMerchant.Equals(input.FromMerchant)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ToMerchant == input.ToMerchant || - (this.ToMerchant != null && - this.ToMerchant.Equals(input.ToMerchant)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.FromMerchant != null) - { - hashCode = (hashCode * 59) + this.FromMerchant.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ToMerchant != null) - { - hashCode = (hashCode * 59) + this.ToMerchant.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 140) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 140.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalanceControl/BalanceTransferResponse.cs b/Adyen/Model/BalanceControl/BalanceTransferResponse.cs deleted file mode 100644 index df969c35c..000000000 --- a/Adyen/Model/BalanceControl/BalanceTransferResponse.cs +++ /dev/null @@ -1,367 +0,0 @@ -/* -* Adyen Balance Control API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalanceControl -{ - /// - /// BalanceTransferResponse - /// - [DataContract(Name = "BalanceTransferResponse")] - public partial class BalanceTransferResponse : IEquatable, IValidatableObject - { - /// - /// The status of the balance transfer. Possible values: **transferred**, **failed**, **error**, and **notEnoughBalance**. - /// - /// The status of the balance transfer. Possible values: **transferred**, **failed**, **error**, and **notEnoughBalance**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 1, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 2, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 3, - - /// - /// Enum Transferred for value: transferred - /// - [EnumMember(Value = "transferred")] - Transferred = 4 - - } - - - /// - /// The status of the balance transfer. Possible values: **transferred**, **failed**, **error**, and **notEnoughBalance**. - /// - /// The status of the balance transfer. Possible values: **transferred**, **failed**, **error**, and **notEnoughBalance**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. - /// - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Tax for value: tax - /// - [EnumMember(Value = "tax")] - Tax = 1, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 2, - - /// - /// Enum TerminalSale for value: terminalSale - /// - [EnumMember(Value = "terminalSale")] - TerminalSale = 3, - - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 4, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 5, - - /// - /// Enum Adjustment for value: adjustment - /// - [EnumMember(Value = "adjustment")] - Adjustment = 6 - - } - - - /// - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. - /// - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceTransferResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// The date when the balance transfer was requested. (required). - /// A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated.. - /// The unique identifier of the source merchant account from which funds are deducted. (required). - /// Adyen's 16-character string reference associated with the balance transfer. (required). - /// A reference for the balance transfer. If you don't provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters.. - /// The status of the balance transfer. Possible values: **transferred**, **failed**, **error**, and **notEnoughBalance**. (required). - /// The unique identifier of the destination merchant account from which funds are transferred. (required). - /// The type of balance transfer. Possible values: **tax**, **fee**, **terminalSale**, **credit**, **debit**, and **adjustment**. (required). - public BalanceTransferResponse(Amount amount = default(Amount), DateTime createdAt = default(DateTime), string description = default(string), string fromMerchant = default(string), string pspReference = default(string), string reference = default(string), StatusEnum status = default(StatusEnum), string toMerchant = default(string), TypeEnum type = default(TypeEnum)) - { - this.Amount = amount; - this.CreatedAt = createdAt; - this.FromMerchant = fromMerchant; - this.PspReference = pspReference; - this.Status = status; - this.ToMerchant = toMerchant; - this.Type = type; - this.Description = description; - this.Reference = reference; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The date when the balance transfer was requested. - /// - /// The date when the balance transfer was requested. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. - /// - /// A human-readable description for the transfer. You can use alphanumeric characters and hyphens. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the source merchant account from which funds are deducted. - /// - /// The unique identifier of the source merchant account from which funds are deducted. - [DataMember(Name = "fromMerchant", IsRequired = false, EmitDefaultValue = false)] - public string FromMerchant { get; set; } - - /// - /// Adyen's 16-character string reference associated with the balance transfer. - /// - /// Adyen's 16-character string reference associated with the balance transfer. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// A reference for the balance transfer. If you don't provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters. - /// - /// A reference for the balance transfer. If you don't provide this in the request, Adyen generates a unique reference. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The unique identifier of the destination merchant account from which funds are transferred. - /// - /// The unique identifier of the destination merchant account from which funds are transferred. - [DataMember(Name = "toMerchant", IsRequired = false, EmitDefaultValue = false)] - public string ToMerchant { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceTransferResponse {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FromMerchant: ").Append(FromMerchant).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" ToMerchant: ").Append(ToMerchant).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceTransferResponse); - } - - /// - /// Returns true if BalanceTransferResponse instances are equal - /// - /// Instance of BalanceTransferResponse to be compared - /// Boolean - public bool Equals(BalanceTransferResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.FromMerchant == input.FromMerchant || - (this.FromMerchant != null && - this.FromMerchant.Equals(input.FromMerchant)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.ToMerchant == input.ToMerchant || - (this.ToMerchant != null && - this.ToMerchant.Equals(input.ToMerchant)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.FromMerchant != null) - { - hashCode = (hashCode * 59) + this.FromMerchant.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.ToMerchant != null) - { - hashCode = (hashCode * 59) + this.ToMerchant.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 140) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 140.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AULocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/AULocalAccountIdentification.cs deleted file mode 100644 index 8e913060d..000000000 --- a/Adyen/Model/BalancePlatform/AULocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AULocalAccountIdentification - /// - [DataContract(Name = "AULocalAccountIdentification")] - public partial class AULocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **auLocal** - /// - /// **auLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AuLocal for value: auLocal - /// - [EnumMember(Value = "auLocal")] - AuLocal = 1 - - } - - - /// - /// **auLocal** - /// - /// **auLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AULocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. (required). - /// **auLocal** (required) (default to TypeEnum.AuLocal). - public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), TypeEnum type = TypeEnum.AuLocal) - { - this.AccountNumber = accountNumber; - this.BsbCode = bsbCode; - this.Type = type; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. - /// - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. - [DataMember(Name = "bsbCode", IsRequired = false, EmitDefaultValue = false)] - public string BsbCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AULocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BsbCode: ").Append(BsbCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AULocalAccountIdentification); - } - - /// - /// Returns true if AULocalAccountIdentification instances are equal - /// - /// Instance of AULocalAccountIdentification to be compared - /// Boolean - public bool Equals(AULocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BsbCode == input.BsbCode || - (this.BsbCode != null && - this.BsbCode.Equals(input.BsbCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BsbCode != null) - { - hashCode = (hashCode * 59) + this.BsbCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 9.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 5.", new [] { "AccountNumber" }); - } - - // BsbCode (string) maxLength - if (this.BsbCode != null && this.BsbCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BsbCode, length must be less than 6.", new [] { "BsbCode" }); - } - - // BsbCode (string) minLength - if (this.BsbCode != null && this.BsbCode.Length < 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BsbCode, length must be greater than 6.", new [] { "BsbCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AbstractOpenAPISchema.cs b/Adyen/Model/BalancePlatform/AbstractOpenAPISchema.cs deleted file mode 100644 index 3d86323aa..000000000 --- a/Adyen/Model/BalancePlatform/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/BalancePlatform/AccountHolder.cs b/Adyen/Model/BalancePlatform/AccountHolder.cs deleted file mode 100644 index 01cdc760b..000000000 --- a/Adyen/Model/BalancePlatform/AccountHolder.cs +++ /dev/null @@ -1,394 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AccountHolder - /// - [DataContract(Name = "AccountHolder")] - public partial class AccountHolder : IEquatable, IValidatableObject - { - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 3 - - } - - - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolder() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms.. - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.. - /// contactDetails. - /// Your description for the account holder.. - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. (required). - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request.. - /// Your reference for the account holder.. - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed.. - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - public AccountHolder(string balancePlatform = default(string), Dictionary capabilities = default(Dictionary), ContactDetails contactDetails = default(ContactDetails), string description = default(string), string legalEntityId = default(string), Dictionary metadata = default(Dictionary), string primaryBalanceAccount = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string timeZone = default(string)) - { - this.LegalEntityId = legalEntityId; - this.BalancePlatform = balancePlatform; - this.Capabilities = capabilities; - this.ContactDetails = contactDetails; - this.Description = description; - this.Metadata = metadata; - this.PrimaryBalanceAccount = primaryBalanceAccount; - this.Reference = reference; - this.Status = status; - this.TimeZone = timeZone; - } - - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// Gets or Sets ContactDetails - /// - [DataMember(Name = "contactDetails", EmitDefaultValue = false)] - [Obsolete("")] - public ContactDetails ContactDetails { get; set; } - - /// - /// Your description for the account holder. - /// - /// Your description for the account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the account holder. - /// - /// The unique identifier of the account holder. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. - [DataMember(Name = "legalEntityId", IsRequired = false, EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The unique identifier of the migrated account holder in the classic integration. - /// - /// The unique identifier of the migrated account holder in the classic integration. - [DataMember(Name = "migratedAccountHolderCode", EmitDefaultValue = false)] - public string MigratedAccountHolderCode { get; private set; } - - /// - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. - /// - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. - [DataMember(Name = "primaryBalanceAccount", EmitDefaultValue = false)] - public string PrimaryBalanceAccount { get; set; } - - /// - /// Your reference for the account holder. - /// - /// Your reference for the account holder. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. - /// - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. - [DataMember(Name = "verificationDeadlines", EmitDefaultValue = false)] - public List VerificationDeadlines { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolder {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MigratedAccountHolderCode: ").Append(MigratedAccountHolderCode).Append("\n"); - sb.Append(" PrimaryBalanceAccount: ").Append(PrimaryBalanceAccount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append(" VerificationDeadlines: ").Append(VerificationDeadlines).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolder); - } - - /// - /// Returns true if AccountHolder instances are equal - /// - /// Instance of AccountHolder to be compared - /// Boolean - public bool Equals(AccountHolder input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.ContactDetails == input.ContactDetails || - (this.ContactDetails != null && - this.ContactDetails.Equals(input.ContactDetails)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MigratedAccountHolderCode == input.MigratedAccountHolderCode || - (this.MigratedAccountHolderCode != null && - this.MigratedAccountHolderCode.Equals(input.MigratedAccountHolderCode)) - ) && - ( - this.PrimaryBalanceAccount == input.PrimaryBalanceAccount || - (this.PrimaryBalanceAccount != null && - this.PrimaryBalanceAccount.Equals(input.PrimaryBalanceAccount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ) && - ( - this.VerificationDeadlines == input.VerificationDeadlines || - this.VerificationDeadlines != null && - input.VerificationDeadlines != null && - this.VerificationDeadlines.SequenceEqual(input.VerificationDeadlines) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.ContactDetails != null) - { - hashCode = (hashCode * 59) + this.ContactDetails.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MigratedAccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.MigratedAccountHolderCode.GetHashCode(); - } - if (this.PrimaryBalanceAccount != null) - { - hashCode = (hashCode * 59) + this.PrimaryBalanceAccount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - if (this.VerificationDeadlines != null) - { - hashCode = (hashCode * 59) + this.VerificationDeadlines.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AccountHolderCapability.cs b/Adyen/Model/BalancePlatform/AccountHolderCapability.cs deleted file mode 100644 index f3929a8d5..000000000 --- a/Adyen/Model/BalancePlatform/AccountHolderCapability.cs +++ /dev/null @@ -1,383 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AccountHolderCapability - /// - [DataContract(Name = "AccountHolderCapability")] - public partial class AccountHolderCapability : IEquatable, IValidatableObject - { - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AllowedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "allowedLevel", EmitDefaultValue = false)] - public AllowedLevelEnum? AllowedLevel { get; set; } - - /// - /// Returns false as AllowedLevel should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeAllowedLevel() - { - return false; - } - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RequestedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "requestedLevel", EmitDefaultValue = false)] - public RequestedLevelEnum? RequestedLevel { get; set; } - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [JsonConverter(typeof(StringEnumConverter))] - public enum VerificationStatusEnum - { - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 3, - - /// - /// Enum Valid for value: valid - /// - [EnumMember(Value = "valid")] - Valid = 4 - - } - - - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public VerificationStatusEnum? VerificationStatus { get; set; } - - /// - /// Returns false as VerificationStatus should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeVerificationStatus() - { - return false; - } - /// - /// Initializes a new instance of the class. - /// - /// allowedSettings. - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder.. - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field.. - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**.. - /// requestedSettings. - public AccountHolderCapability(CapabilitySettings allowedSettings = default(CapabilitySettings), bool? enabled = default(bool?), bool? requested = default(bool?), RequestedLevelEnum? requestedLevel = default(RequestedLevelEnum?), CapabilitySettings requestedSettings = default(CapabilitySettings)) - { - this.AllowedSettings = allowedSettings; - this.Enabled = enabled; - this.Requested = requested; - this.RequestedLevel = requestedLevel; - this.RequestedSettings = requestedSettings; - } - - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; private set; } - - /// - /// Gets or Sets AllowedSettings - /// - [DataMember(Name = "allowedSettings", EmitDefaultValue = false)] - public CapabilitySettings AllowedSettings { get; set; } - - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// Contains verification errors and the actions that you can take to resolve them. - /// - /// Contains verification errors and the actions that you can take to resolve them. - [DataMember(Name = "problems", EmitDefaultValue = false)] - public List Problems { get; private set; } - - /// - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - /// - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - [DataMember(Name = "requested", EmitDefaultValue = false)] - public bool? Requested { get; set; } - - /// - /// Gets or Sets RequestedSettings - /// - [DataMember(Name = "requestedSettings", EmitDefaultValue = false)] - public CapabilitySettings RequestedSettings { get; set; } - - /// - /// Contains the status of the transfer instruments associated with this capability. - /// - /// Contains the status of the transfer instruments associated with this capability. - [DataMember(Name = "transferInstruments", EmitDefaultValue = false)] - public List TransferInstruments { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderCapability {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" AllowedLevel: ").Append(AllowedLevel).Append("\n"); - sb.Append(" AllowedSettings: ").Append(AllowedSettings).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" Problems: ").Append(Problems).Append("\n"); - sb.Append(" Requested: ").Append(Requested).Append("\n"); - sb.Append(" RequestedLevel: ").Append(RequestedLevel).Append("\n"); - sb.Append(" RequestedSettings: ").Append(RequestedSettings).Append("\n"); - sb.Append(" TransferInstruments: ").Append(TransferInstruments).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderCapability); - } - - /// - /// Returns true if AccountHolderCapability instances are equal - /// - /// Instance of AccountHolderCapability to be compared - /// Boolean - public bool Equals(AccountHolderCapability input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.AllowedLevel == input.AllowedLevel || - this.AllowedLevel.Equals(input.AllowedLevel) - ) && - ( - this.AllowedSettings == input.AllowedSettings || - (this.AllowedSettings != null && - this.AllowedSettings.Equals(input.AllowedSettings)) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.Problems == input.Problems || - this.Problems != null && - input.Problems != null && - this.Problems.SequenceEqual(input.Problems) - ) && - ( - this.Requested == input.Requested || - this.Requested.Equals(input.Requested) - ) && - ( - this.RequestedLevel == input.RequestedLevel || - this.RequestedLevel.Equals(input.RequestedLevel) - ) && - ( - this.RequestedSettings == input.RequestedSettings || - (this.RequestedSettings != null && - this.RequestedSettings.Equals(input.RequestedSettings)) - ) && - ( - this.TransferInstruments == input.TransferInstruments || - this.TransferInstruments != null && - input.TransferInstruments != null && - this.TransferInstruments.SequenceEqual(input.TransferInstruments) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - this.VerificationStatus.Equals(input.VerificationStatus) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowedLevel.GetHashCode(); - if (this.AllowedSettings != null) - { - hashCode = (hashCode * 59) + this.AllowedSettings.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.Problems != null) - { - hashCode = (hashCode * 59) + this.Problems.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Requested.GetHashCode(); - hashCode = (hashCode * 59) + this.RequestedLevel.GetHashCode(); - if (this.RequestedSettings != null) - { - hashCode = (hashCode * 59) + this.RequestedSettings.GetHashCode(); - } - if (this.TransferInstruments != null) - { - hashCode = (hashCode * 59) + this.TransferInstruments.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AccountHolderInfo.cs b/Adyen/Model/BalancePlatform/AccountHolderInfo.cs deleted file mode 100644 index 67f3aea7e..000000000 --- a/Adyen/Model/BalancePlatform/AccountHolderInfo.cs +++ /dev/null @@ -1,298 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AccountHolderInfo - /// - [DataContract(Name = "AccountHolderInfo")] - public partial class AccountHolderInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms.. - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.. - /// contactDetails. - /// Your description for the account holder.. - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. (required). - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// Your reference for the account holder.. - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - public AccountHolderInfo(string balancePlatform = default(string), Dictionary capabilities = default(Dictionary), ContactDetails contactDetails = default(ContactDetails), string description = default(string), string legalEntityId = default(string), Dictionary metadata = default(Dictionary), string reference = default(string), string timeZone = default(string)) - { - this.LegalEntityId = legalEntityId; - this.BalancePlatform = balancePlatform; - this.Capabilities = capabilities; - this.ContactDetails = contactDetails; - this.Description = description; - this.Metadata = metadata; - this.Reference = reference; - this.TimeZone = timeZone; - } - - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// Gets or Sets ContactDetails - /// - [DataMember(Name = "contactDetails", EmitDefaultValue = false)] - [Obsolete("")] - public ContactDetails ContactDetails { get; set; } - - /// - /// Your description for the account holder. - /// - /// Your description for the account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. - [DataMember(Name = "legalEntityId", IsRequired = false, EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The unique identifier of the migrated account holder in the classic integration. - /// - /// The unique identifier of the migrated account holder in the classic integration. - [DataMember(Name = "migratedAccountHolderCode", EmitDefaultValue = false)] - public string MigratedAccountHolderCode { get; private set; } - - /// - /// Your reference for the account holder. - /// - /// Your reference for the account holder. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderInfo {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MigratedAccountHolderCode: ").Append(MigratedAccountHolderCode).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderInfo); - } - - /// - /// Returns true if AccountHolderInfo instances are equal - /// - /// Instance of AccountHolderInfo to be compared - /// Boolean - public bool Equals(AccountHolderInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.ContactDetails == input.ContactDetails || - (this.ContactDetails != null && - this.ContactDetails.Equals(input.ContactDetails)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MigratedAccountHolderCode == input.MigratedAccountHolderCode || - (this.MigratedAccountHolderCode != null && - this.MigratedAccountHolderCode.Equals(input.MigratedAccountHolderCode)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.ContactDetails != null) - { - hashCode = (hashCode * 59) + this.ContactDetails.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MigratedAccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.MigratedAccountHolderCode.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.cs b/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.cs deleted file mode 100644 index 148281498..000000000 --- a/Adyen/Model/BalancePlatform/AccountHolderUpdateRequest.cs +++ /dev/null @@ -1,353 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AccountHolderUpdateRequest - /// - [DataContract(Name = "AccountHolderUpdateRequest")] - public partial class AccountHolderUpdateRequest : IEquatable, IValidatableObject - { - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 3 - - } - - - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms.. - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.. - /// contactDetails. - /// Your description for the account holder.. - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request.. - /// Your reference for the account holder.. - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed.. - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - public AccountHolderUpdateRequest(string balancePlatform = default(string), Dictionary capabilities = default(Dictionary), ContactDetails contactDetails = default(ContactDetails), string description = default(string), Dictionary metadata = default(Dictionary), string primaryBalanceAccount = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string timeZone = default(string)) - { - this.BalancePlatform = balancePlatform; - this.Capabilities = capabilities; - this.ContactDetails = contactDetails; - this.Description = description; - this.Metadata = metadata; - this.PrimaryBalanceAccount = primaryBalanceAccount; - this.Reference = reference; - this.Status = status; - this.TimeZone = timeZone; - } - - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// Gets or Sets ContactDetails - /// - [DataMember(Name = "contactDetails", EmitDefaultValue = false)] - [Obsolete("")] - public ContactDetails ContactDetails { get; set; } - - /// - /// Your description for the account holder. - /// - /// Your description for the account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The unique identifier of the migrated account holder in the classic integration. - /// - /// The unique identifier of the migrated account holder in the classic integration. - [DataMember(Name = "migratedAccountHolderCode", EmitDefaultValue = false)] - public string MigratedAccountHolderCode { get; private set; } - - /// - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. - /// - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. - [DataMember(Name = "primaryBalanceAccount", EmitDefaultValue = false)] - public string PrimaryBalanceAccount { get; set; } - - /// - /// Your reference for the account holder. - /// - /// Your reference for the account holder. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. - /// - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. - [DataMember(Name = "verificationDeadlines", EmitDefaultValue = false)] - public List VerificationDeadlines { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderUpdateRequest {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MigratedAccountHolderCode: ").Append(MigratedAccountHolderCode).Append("\n"); - sb.Append(" PrimaryBalanceAccount: ").Append(PrimaryBalanceAccount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append(" VerificationDeadlines: ").Append(VerificationDeadlines).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderUpdateRequest); - } - - /// - /// Returns true if AccountHolderUpdateRequest instances are equal - /// - /// Instance of AccountHolderUpdateRequest to be compared - /// Boolean - public bool Equals(AccountHolderUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.ContactDetails == input.ContactDetails || - (this.ContactDetails != null && - this.ContactDetails.Equals(input.ContactDetails)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MigratedAccountHolderCode == input.MigratedAccountHolderCode || - (this.MigratedAccountHolderCode != null && - this.MigratedAccountHolderCode.Equals(input.MigratedAccountHolderCode)) - ) && - ( - this.PrimaryBalanceAccount == input.PrimaryBalanceAccount || - (this.PrimaryBalanceAccount != null && - this.PrimaryBalanceAccount.Equals(input.PrimaryBalanceAccount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ) && - ( - this.VerificationDeadlines == input.VerificationDeadlines || - this.VerificationDeadlines != null && - input.VerificationDeadlines != null && - this.VerificationDeadlines.SequenceEqual(input.VerificationDeadlines) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.ContactDetails != null) - { - hashCode = (hashCode * 59) + this.ContactDetails.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MigratedAccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.MigratedAccountHolderCode.GetHashCode(); - } - if (this.PrimaryBalanceAccount != null) - { - hashCode = (hashCode * 59) + this.PrimaryBalanceAccount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - if (this.VerificationDeadlines != null) - { - hashCode = (hashCode * 59) + this.VerificationDeadlines.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.cs b/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.cs deleted file mode 100644 index 01d195b04..000000000 --- a/Adyen/Model/BalancePlatform/AccountSupportingEntityCapability.cs +++ /dev/null @@ -1,328 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AccountSupportingEntityCapability - /// - [DataContract(Name = "AccountSupportingEntityCapability")] - public partial class AccountSupportingEntityCapability : IEquatable, IValidatableObject - { - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AllowedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "allowedLevel", EmitDefaultValue = false)] - public AllowedLevelEnum? AllowedLevel { get; set; } - - /// - /// Returns false as AllowedLevel should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeAllowedLevel() - { - return false; - } - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RequestedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "requestedLevel", EmitDefaultValue = false)] - public RequestedLevelEnum? RequestedLevel { get; set; } - /// - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [JsonConverter(typeof(StringEnumConverter))] - public enum VerificationStatusEnum - { - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 3, - - /// - /// Enum Valid for value: valid - /// - [EnumMember(Value = "valid")] - Valid = 4 - - } - - - /// - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public VerificationStatusEnum? VerificationStatus { get; set; } - - /// - /// Returns false as VerificationStatus should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeVerificationStatus() - { - return false; - } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder.. - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field.. - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**.. - public AccountSupportingEntityCapability(bool? enabled = default(bool?), bool? requested = default(bool?), RequestedLevelEnum? requestedLevel = default(RequestedLevelEnum?)) - { - this.Enabled = enabled; - this.Requested = requested; - this.RequestedLevel = requestedLevel; - } - - /// - /// Indicates whether the supporting entity capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - /// - /// Indicates whether the supporting entity capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; private set; } - - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// The ID of the supporting entity. - /// - /// The ID of the supporting entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - /// - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - [DataMember(Name = "requested", EmitDefaultValue = false)] - public bool? Requested { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountSupportingEntityCapability {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" AllowedLevel: ").Append(AllowedLevel).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Requested: ").Append(Requested).Append("\n"); - sb.Append(" RequestedLevel: ").Append(RequestedLevel).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountSupportingEntityCapability); - } - - /// - /// Returns true if AccountSupportingEntityCapability instances are equal - /// - /// Instance of AccountSupportingEntityCapability to be compared - /// Boolean - public bool Equals(AccountSupportingEntityCapability input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.AllowedLevel == input.AllowedLevel || - this.AllowedLevel.Equals(input.AllowedLevel) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Requested == input.Requested || - this.Requested.Equals(input.Requested) - ) && - ( - this.RequestedLevel == input.RequestedLevel || - this.RequestedLevel.Equals(input.RequestedLevel) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - this.VerificationStatus.Equals(input.VerificationStatus) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowedLevel.GetHashCode(); - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Requested.GetHashCode(); - hashCode = (hashCode * 59) + this.RequestedLevel.GetHashCode(); - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.cs b/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.cs deleted file mode 100644 index 6de10a068..000000000 --- a/Adyen/Model/BalancePlatform/ActiveNetworkTokensRestriction.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// ActiveNetworkTokensRestriction - /// - [DataContract(Name = "ActiveNetworkTokensRestriction")] - public partial class ActiveNetworkTokensRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ActiveNetworkTokensRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// The number of tokens.. - public ActiveNetworkTokensRestriction(string operation = default(string), int? value = default(int?)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// The number of tokens. - /// - /// The number of tokens. - [DataMember(Name = "value", EmitDefaultValue = false)] - public int? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ActiveNetworkTokensRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ActiveNetworkTokensRestriction); - } - - /// - /// Returns true if ActiveNetworkTokensRestriction instances are equal - /// - /// Instance of ActiveNetworkTokensRestriction to be compared - /// Boolean - public bool Equals(ActiveNetworkTokensRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AdditionalBankIdentification.cs b/Adyen/Model/BalancePlatform/AdditionalBankIdentification.cs deleted file mode 100644 index 982430d0c..000000000 --- a/Adyen/Model/BalancePlatform/AdditionalBankIdentification.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AdditionalBankIdentification - /// - [DataContract(Name = "AdditionalBankIdentification")] - public partial class AdditionalBankIdentification : IEquatable, IValidatableObject - { - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum GbSortCode for value: gbSortCode - /// - [EnumMember(Value = "gbSortCode")] - GbSortCode = 1, - - /// - /// Enum UsRoutingNumber for value: usRoutingNumber - /// - [EnumMember(Value = "usRoutingNumber")] - UsRoutingNumber = 2 - - } - - - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The value of the additional bank identification.. - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces.. - public AdditionalBankIdentification(string code = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Code = code; - this.Type = type; - } - - /// - /// The value of the additional bank identification. - /// - /// The value of the additional bank identification. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalBankIdentification {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalBankIdentification); - } - - /// - /// Returns true if AdditionalBankIdentification instances are equal - /// - /// Instance of AdditionalBankIdentification to be compared - /// Boolean - public bool Equals(AdditionalBankIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Address.cs b/Adyen/Model/BalancePlatform/Address.cs deleted file mode 100644 index d75dcc31c..000000000 --- a/Adyen/Model/BalancePlatform/Address.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Address() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Maximum length: 3000 characters. (required). - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// The number or name of the house. Maximum length: 3000 characters. (required). - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). - public Address(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.City = city; - this.Country = country; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.Street = street; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Maximum length: 3000 characters. - /// - /// The name of the city. Maximum length: 3000 characters. - [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The number or name of the house. Maximum length: 3000 characters. - /// - /// The number or name of the house. Maximum length: 3000 characters. - [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) maxLength - if (this.City != null && this.City.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); - } - - // HouseNumberOrName (string) maxLength - if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); - } - - // Street (string) maxLength - if (this.Street != null && this.Street.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AddressRequirement.cs b/Adyen/Model/BalancePlatform/AddressRequirement.cs deleted file mode 100644 index 17852ad54..000000000 --- a/Adyen/Model/BalancePlatform/AddressRequirement.cs +++ /dev/null @@ -1,218 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AddressRequirement - /// - [DataContract(Name = "AddressRequirement")] - public partial class AddressRequirement : IEquatable, IValidatableObject - { - /// - /// Defines RequiredAddressFields - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RequiredAddressFieldsEnum - { - /// - /// Enum City for value: city - /// - [EnumMember(Value = "city")] - City = 1, - - /// - /// Enum Country for value: country - /// - [EnumMember(Value = "country")] - Country = 2, - - /// - /// Enum Line1 for value: line1 - /// - [EnumMember(Value = "line1")] - Line1 = 3, - - /// - /// Enum PostalCode for value: postalCode - /// - [EnumMember(Value = "postalCode")] - PostalCode = 4, - - /// - /// Enum StateOrProvince for value: stateOrProvince - /// - [EnumMember(Value = "stateOrProvince")] - StateOrProvince = 5 - - } - - - - /// - /// List of address fields. - /// - /// List of address fields. - [DataMember(Name = "requiredAddressFields", EmitDefaultValue = false)] - public List RequiredAddressFields { get; set; } - /// - /// **addressRequirement** - /// - /// **addressRequirement** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AddressRequirement for value: addressRequirement - /// - [EnumMember(Value = "addressRequirement")] - AddressRequirement = 1 - - } - - - /// - /// **addressRequirement** - /// - /// **addressRequirement** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AddressRequirement() { } - /// - /// Initializes a new instance of the class. - /// - /// Specifies the required address related fields for a particular route.. - /// List of address fields.. - /// **addressRequirement** (required) (default to TypeEnum.AddressRequirement). - public AddressRequirement(string description = default(string), List requiredAddressFields = default(List), TypeEnum type = TypeEnum.AddressRequirement) - { - this.Type = type; - this.Description = description; - this.RequiredAddressFields = requiredAddressFields; - } - - /// - /// Specifies the required address related fields for a particular route. - /// - /// Specifies the required address related fields for a particular route. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AddressRequirement {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" RequiredAddressFields: ").Append(RequiredAddressFields).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AddressRequirement); - } - - /// - /// Returns true if AddressRequirement instances are equal - /// - /// Instance of AddressRequirement to be compared - /// Boolean - public bool Equals(AddressRequirement input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.RequiredAddressFields == input.RequiredAddressFields || - this.RequiredAddressFields.SequenceEqual(input.RequiredAddressFields) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RequiredAddressFields.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Amount.cs b/Adyen/Model/BalancePlatform/Amount.cs deleted file mode 100644 index e76f58199..000000000 --- a/Adyen/Model/BalancePlatform/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.cs b/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.cs deleted file mode 100644 index 17544e1e8..000000000 --- a/Adyen/Model/BalancePlatform/AmountMinMaxRequirement.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AmountMinMaxRequirement - /// - [DataContract(Name = "AmountMinMaxRequirement")] - public partial class AmountMinMaxRequirement : IEquatable, IValidatableObject - { - /// - /// **amountMinMaxRequirement** - /// - /// **amountMinMaxRequirement** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AmountMinMaxRequirement for value: amountMinMaxRequirement - /// - [EnumMember(Value = "amountMinMaxRequirement")] - AmountMinMaxRequirement = 1 - - } - - - /// - /// **amountMinMaxRequirement** - /// - /// **amountMinMaxRequirement** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AmountMinMaxRequirement() { } - /// - /// Initializes a new instance of the class. - /// - /// Specifies the eligible amounts for a particular route.. - /// Maximum amount.. - /// Minimum amount.. - /// **amountMinMaxRequirement** (required) (default to TypeEnum.AmountMinMaxRequirement). - public AmountMinMaxRequirement(string description = default(string), long? max = default(long?), long? min = default(long?), TypeEnum type = TypeEnum.AmountMinMaxRequirement) - { - this.Type = type; - this.Description = description; - this.Max = max; - this.Min = min; - } - - /// - /// Specifies the eligible amounts for a particular route. - /// - /// Specifies the eligible amounts for a particular route. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Maximum amount. - /// - /// Maximum amount. - [DataMember(Name = "max", EmitDefaultValue = false)] - public long? Max { get; set; } - - /// - /// Minimum amount. - /// - /// Minimum amount. - [DataMember(Name = "min", EmitDefaultValue = false)] - public long? Min { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AmountMinMaxRequirement {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Max: ").Append(Max).Append("\n"); - sb.Append(" Min: ").Append(Min).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AmountMinMaxRequirement); - } - - /// - /// Returns true if AmountMinMaxRequirement instances are equal - /// - /// Instance of AmountMinMaxRequirement to be compared - /// Boolean - public bool Equals(AmountMinMaxRequirement input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Max == input.Max || - this.Max.Equals(input.Max) - ) && - ( - this.Min == input.Min || - this.Min.Equals(input.Min) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Max.GetHashCode(); - hashCode = (hashCode * 59) + this.Min.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AmountNonZeroDecimalsRequirement.cs b/Adyen/Model/BalancePlatform/AmountNonZeroDecimalsRequirement.cs deleted file mode 100644 index 92b41f31f..000000000 --- a/Adyen/Model/BalancePlatform/AmountNonZeroDecimalsRequirement.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AmountNonZeroDecimalsRequirement - /// - [DataContract(Name = "AmountNonZeroDecimalsRequirement")] - public partial class AmountNonZeroDecimalsRequirement : IEquatable, IValidatableObject - { - /// - /// **amountNonZeroDecimalsRequirement** - /// - /// **amountNonZeroDecimalsRequirement** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AmountNonZeroDecimalsRequirement for value: amountNonZeroDecimalsRequirement - /// - [EnumMember(Value = "amountNonZeroDecimalsRequirement")] - AmountNonZeroDecimalsRequirement = 1 - - } - - - /// - /// **amountNonZeroDecimalsRequirement** - /// - /// **amountNonZeroDecimalsRequirement** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AmountNonZeroDecimalsRequirement() { } - /// - /// Initializes a new instance of the class. - /// - /// Specifies for which routes the amount in a transfer request must have no non-zero decimal places, so the transfer can only be processed if the amount consists of round numbers.. - /// **amountNonZeroDecimalsRequirement** (required) (default to TypeEnum.AmountNonZeroDecimalsRequirement). - public AmountNonZeroDecimalsRequirement(string description = default(string), TypeEnum type = TypeEnum.AmountNonZeroDecimalsRequirement) - { - this.Type = type; - this.Description = description; - } - - /// - /// Specifies for which routes the amount in a transfer request must have no non-zero decimal places, so the transfer can only be processed if the amount consists of round numbers. - /// - /// Specifies for which routes the amount in a transfer request must have no non-zero decimal places, so the transfer can only be processed if the amount consists of round numbers. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AmountNonZeroDecimalsRequirement {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AmountNonZeroDecimalsRequirement); - } - - /// - /// Returns true if AmountNonZeroDecimalsRequirement instances are equal - /// - /// Instance of AmountNonZeroDecimalsRequirement to be compared - /// Boolean - public bool Equals(AmountNonZeroDecimalsRequirement input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AssociationDelegatedAuthenticationData.cs b/Adyen/Model/BalancePlatform/AssociationDelegatedAuthenticationData.cs deleted file mode 100644 index 6f77c4000..000000000 --- a/Adyen/Model/BalancePlatform/AssociationDelegatedAuthenticationData.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AssociationDelegatedAuthenticationData - /// - [DataContract(Name = "AssociationDelegatedAuthenticationData")] - public partial class AssociationDelegatedAuthenticationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AssociationDelegatedAuthenticationData() { } - /// - /// Initializes a new instance of the class. - /// - /// A base64-encoded block with the data required to authenticate the request. You obtain this information by using our authentication SDK. (required). - public AssociationDelegatedAuthenticationData(string sdkOutput = default(string)) - { - this.SdkOutput = sdkOutput; - } - - /// - /// A base64-encoded block with the data required to authenticate the request. You obtain this information by using our authentication SDK. - /// - /// A base64-encoded block with the data required to authenticate the request. You obtain this information by using our authentication SDK. - [DataMember(Name = "sdkOutput", IsRequired = false, EmitDefaultValue = false)] - public string SdkOutput { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AssociationDelegatedAuthenticationData {\n"); - sb.Append(" SdkOutput: ").Append(SdkOutput).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AssociationDelegatedAuthenticationData); - } - - /// - /// Returns true if AssociationDelegatedAuthenticationData instances are equal - /// - /// Instance of AssociationDelegatedAuthenticationData to be compared - /// Boolean - public bool Equals(AssociationDelegatedAuthenticationData input) - { - if (input == null) - { - return false; - } - return - ( - this.SdkOutput == input.SdkOutput || - (this.SdkOutput != null && - this.SdkOutput.Equals(input.SdkOutput)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SdkOutput != null) - { - hashCode = (hashCode * 59) + this.SdkOutput.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // SdkOutput (string) maxLength - if (this.SdkOutput != null && this.SdkOutput.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SdkOutput, length must be less than 20000.", new [] { "SdkOutput" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AssociationFinaliseRequest.cs b/Adyen/Model/BalancePlatform/AssociationFinaliseRequest.cs deleted file mode 100644 index a5989c123..000000000 --- a/Adyen/Model/BalancePlatform/AssociationFinaliseRequest.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AssociationFinaliseRequest - /// - [DataContract(Name = "AssociationFinaliseRequest")] - public partial class AssociationFinaliseRequest : IEquatable, IValidatableObject - { - /// - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** - /// - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PaymentInstrument for value: PaymentInstrument - /// - [EnumMember(Value = "PaymentInstrument")] - PaymentInstrument = 1 - - } - - - /// - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** - /// - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AssociationFinaliseRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. (required). - /// strongCustomerAuthentication (required). - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** (required). - public AssociationFinaliseRequest(List ids = default(List), AssociationDelegatedAuthenticationData strongCustomerAuthentication = default(AssociationDelegatedAuthenticationData), TypeEnum type = default(TypeEnum)) - { - this.Ids = ids; - this.StrongCustomerAuthentication = strongCustomerAuthentication; - this.Type = type; - } - - /// - /// The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. - /// - /// The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. - [DataMember(Name = "ids", IsRequired = false, EmitDefaultValue = false)] - public List Ids { get; set; } - - /// - /// Gets or Sets StrongCustomerAuthentication - /// - [DataMember(Name = "strongCustomerAuthentication", IsRequired = false, EmitDefaultValue = false)] - public AssociationDelegatedAuthenticationData StrongCustomerAuthentication { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AssociationFinaliseRequest {\n"); - sb.Append(" Ids: ").Append(Ids).Append("\n"); - sb.Append(" StrongCustomerAuthentication: ").Append(StrongCustomerAuthentication).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AssociationFinaliseRequest); - } - - /// - /// Returns true if AssociationFinaliseRequest instances are equal - /// - /// Instance of AssociationFinaliseRequest to be compared - /// Boolean - public bool Equals(AssociationFinaliseRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Ids == input.Ids || - this.Ids != null && - input.Ids != null && - this.Ids.SequenceEqual(input.Ids) - ) && - ( - this.StrongCustomerAuthentication == input.StrongCustomerAuthentication || - (this.StrongCustomerAuthentication != null && - this.StrongCustomerAuthentication.Equals(input.StrongCustomerAuthentication)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Ids != null) - { - hashCode = (hashCode * 59) + this.Ids.GetHashCode(); - } - if (this.StrongCustomerAuthentication != null) - { - hashCode = (hashCode * 59) + this.StrongCustomerAuthentication.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AssociationFinaliseResponse.cs b/Adyen/Model/BalancePlatform/AssociationFinaliseResponse.cs deleted file mode 100644 index e0b387488..000000000 --- a/Adyen/Model/BalancePlatform/AssociationFinaliseResponse.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AssociationFinaliseResponse - /// - [DataContract(Name = "AssociationFinaliseResponse")] - public partial class AssociationFinaliseResponse : IEquatable, IValidatableObject - { - /// - /// The type of resource that you associated with the SCA device. - /// - /// The type of resource that you associated with the SCA device. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PAYMENTINSTRUMENT for value: PAYMENT_INSTRUMENT - /// - [EnumMember(Value = "PAYMENT_INSTRUMENT")] - PAYMENTINSTRUMENT = 1 - - } - - - /// - /// The type of resource that you associated with the SCA device. - /// - /// The type of resource that you associated with the SCA device. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AssociationFinaliseResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the SCA device you associated with a resource.. - /// The list of unique identifiers of the resources that you associated with the SCA device.. - /// The type of resource that you associated with the SCA device. (required). - public AssociationFinaliseResponse(string deviceId = default(string), List ids = default(List), TypeEnum type = default(TypeEnum)) - { - this.Type = type; - this.DeviceId = deviceId; - this.Ids = ids; - } - - /// - /// The unique identifier of the SCA device you associated with a resource. - /// - /// The unique identifier of the SCA device you associated with a resource. - [DataMember(Name = "deviceId", EmitDefaultValue = false)] - public string DeviceId { get; set; } - - /// - /// The list of unique identifiers of the resources that you associated with the SCA device. - /// - /// The list of unique identifiers of the resources that you associated with the SCA device. - [DataMember(Name = "ids", EmitDefaultValue = false)] - public List Ids { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AssociationFinaliseResponse {\n"); - sb.Append(" DeviceId: ").Append(DeviceId).Append("\n"); - sb.Append(" Ids: ").Append(Ids).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AssociationFinaliseResponse); - } - - /// - /// Returns true if AssociationFinaliseResponse instances are equal - /// - /// Instance of AssociationFinaliseResponse to be compared - /// Boolean - public bool Equals(AssociationFinaliseResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DeviceId == input.DeviceId || - (this.DeviceId != null && - this.DeviceId.Equals(input.DeviceId)) - ) && - ( - this.Ids == input.Ids || - this.Ids != null && - input.Ids != null && - this.Ids.SequenceEqual(input.Ids) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DeviceId != null) - { - hashCode = (hashCode * 59) + this.DeviceId.GetHashCode(); - } - if (this.Ids != null) - { - hashCode = (hashCode * 59) + this.Ids.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AssociationInitiateRequest.cs b/Adyen/Model/BalancePlatform/AssociationInitiateRequest.cs deleted file mode 100644 index 6fca20caf..000000000 --- a/Adyen/Model/BalancePlatform/AssociationInitiateRequest.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AssociationInitiateRequest - /// - [DataContract(Name = "AssociationInitiateRequest")] - public partial class AssociationInitiateRequest : IEquatable, IValidatableObject - { - /// - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** - /// - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PaymentInstrument for value: PaymentInstrument - /// - [EnumMember(Value = "PaymentInstrument")] - PaymentInstrument = 1 - - } - - - /// - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** - /// - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AssociationInitiateRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. (required). - /// The type of resource that you are associating with the SCA device. Possible value: **PaymentInstrument** (required). - public AssociationInitiateRequest(List ids = default(List), TypeEnum type = default(TypeEnum)) - { - this.Ids = ids; - this.Type = type; - } - - /// - /// The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. - /// - /// The list of unique identifiers of the resources that you are associating with the SCA device. Maximum: 5 strings. - [DataMember(Name = "ids", IsRequired = false, EmitDefaultValue = false)] - public List Ids { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AssociationInitiateRequest {\n"); - sb.Append(" Ids: ").Append(Ids).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AssociationInitiateRequest); - } - - /// - /// Returns true if AssociationInitiateRequest instances are equal - /// - /// Instance of AssociationInitiateRequest to be compared - /// Boolean - public bool Equals(AssociationInitiateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Ids == input.Ids || - this.Ids != null && - input.Ids != null && - this.Ids.SequenceEqual(input.Ids) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Ids != null) - { - hashCode = (hashCode * 59) + this.Ids.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/AssociationInitiateResponse.cs b/Adyen/Model/BalancePlatform/AssociationInitiateResponse.cs deleted file mode 100644 index 2bda544c9..000000000 --- a/Adyen/Model/BalancePlatform/AssociationInitiateResponse.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// AssociationInitiateResponse - /// - [DataContract(Name = "AssociationInitiateResponse")] - public partial class AssociationInitiateResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A string that you must pass to the authentication SDK to continue with the association process.. - public AssociationInitiateResponse(string sdkInput = default(string)) - { - this.SdkInput = sdkInput; - } - - /// - /// A string that you must pass to the authentication SDK to continue with the association process. - /// - /// A string that you must pass to the authentication SDK to continue with the association process. - [DataMember(Name = "sdkInput", EmitDefaultValue = false)] - public string SdkInput { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AssociationInitiateResponse {\n"); - sb.Append(" SdkInput: ").Append(SdkInput).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AssociationInitiateResponse); - } - - /// - /// Returns true if AssociationInitiateResponse instances are equal - /// - /// Instance of AssociationInitiateResponse to be compared - /// Boolean - public bool Equals(AssociationInitiateResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.SdkInput == input.SdkInput || - (this.SdkInput != null && - this.SdkInput.Equals(input.SdkInput)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SdkInput != null) - { - hashCode = (hashCode * 59) + this.SdkInput.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // SdkInput (string) maxLength - if (this.SdkInput != null && this.SdkInput.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SdkInput, length must be less than 20000.", new [] { "SdkInput" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Authentication.cs b/Adyen/Model/BalancePlatform/Authentication.cs deleted file mode 100644 index cf44ca483..000000000 --- a/Adyen/Model/BalancePlatform/Authentication.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Authentication - /// - [DataContract(Name = "Authentication")] - public partial class Authentication : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The email address where the one-time password (OTP) is sent.. - /// The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#'\",;:$&àùòâôûáúó**. - /// phone. - public Authentication(string email = default(string), string password = default(string), Phone phone = default(Phone)) - { - this.Email = email; - this.Password = password; - this.Phone = phone; - } - - /// - /// The email address where the one-time password (OTP) is sent. - /// - /// The email address where the one-time password (OTP) is sent. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#'\",;:$&àùòâôûáúó** - /// - /// The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#'\",;:$&àùòâôûáúó** - [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name = "phone", EmitDefaultValue = false)] - public Phone Phone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Authentication {\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Authentication); - } - - /// - /// Returns true if Authentication instances are equal - /// - /// Instance of Authentication to be compared - /// Boolean - public bool Equals(Authentication input) - { - if (input == null) - { - return false; - } - return - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Password (string) maxLength - if (this.Password != null && this.Password.Length > 30) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be less than 30.", new [] { "Password" }); - } - - // Password (string) minLength - if (this.Password != null && this.Password.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 1.", new [] { "Password" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.cs deleted file mode 100644 index 7eb0c6450..000000000 --- a/Adyen/Model/BalancePlatform/BRLocalAccountIdentification.cs +++ /dev/null @@ -1,269 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BRLocalAccountIdentification - /// - [DataContract(Name = "BRLocalAccountIdentification")] - public partial class BRLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **brLocal** - /// - /// **brLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BrLocal for value: brLocal - /// - [EnumMember(Value = "brLocal")] - BrLocal = 1 - - } - - - /// - /// **brLocal** - /// - /// **brLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BRLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The 3-digit bank code, with leading zeros. (required). - /// The bank account branch number, without separators or whitespace. (required). - /// The 8-digit ISPB, with leading zeros.. - /// **brLocal** (required) (default to TypeEnum.BrLocal). - public BRLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string branchNumber = default(string), string ispb = default(string), TypeEnum type = TypeEnum.BrLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.BranchNumber = branchNumber; - this.Type = type; - this.Ispb = ispb; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit bank code, with leading zeros. - /// - /// The 3-digit bank code, with leading zeros. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// The bank account branch number, without separators or whitespace. - /// - /// The bank account branch number, without separators or whitespace. - [DataMember(Name = "branchNumber", IsRequired = false, EmitDefaultValue = false)] - public string BranchNumber { get; set; } - - /// - /// The 8-digit ISPB, with leading zeros. - /// - /// The 8-digit ISPB, with leading zeros. - [DataMember(Name = "ispb", EmitDefaultValue = false)] - public string Ispb { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BRLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" BranchNumber: ").Append(BranchNumber).Append("\n"); - sb.Append(" Ispb: ").Append(Ispb).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BRLocalAccountIdentification); - } - - /// - /// Returns true if BRLocalAccountIdentification instances are equal - /// - /// Instance of BRLocalAccountIdentification to be compared - /// Boolean - public bool Equals(BRLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.BranchNumber == input.BranchNumber || - (this.BranchNumber != null && - this.BranchNumber.Equals(input.BranchNumber)) - ) && - ( - this.Ispb == input.Ispb || - (this.Ispb != null && - this.Ispb.Equals(input.Ispb)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - if (this.BranchNumber != null) - { - hashCode = (hashCode * 59) + this.BranchNumber.GetHashCode(); - } - if (this.Ispb != null) - { - hashCode = (hashCode * 59) + this.Ispb.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 1.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 3.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 3.", new [] { "BankCode" }); - } - - // BranchNumber (string) maxLength - if (this.BranchNumber != null && this.BranchNumber.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BranchNumber, length must be less than 4.", new [] { "BranchNumber" }); - } - - // BranchNumber (string) minLength - if (this.BranchNumber != null && this.BranchNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BranchNumber, length must be greater than 1.", new [] { "BranchNumber" }); - } - - // Ispb (string) maxLength - if (this.Ispb != null && this.Ispb.Length > 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Ispb, length must be less than 8.", new [] { "Ispb" }); - } - - // Ispb (string) minLength - if (this.Ispb != null && this.Ispb.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Ispb, length must be greater than 8.", new [] { "Ispb" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Balance.cs b/Adyen/Model/BalancePlatform/Balance.cs deleted file mode 100644 index e6ce12860..000000000 --- a/Adyen/Model/BalancePlatform/Balance.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Balance - /// - [DataContract(Name = "Balance")] - public partial class Balance : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Balance() { } - /// - /// Initializes a new instance of the class. - /// - /// The balance available for use. (required). - /// The sum of the transactions that have already been settled. (required). - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. (required). - /// The sum of the transactions that will be settled in the future.. - /// The balance currently held in reserve. (required). - public Balance(long? available = default(long?), long? balance = default(long?), string currency = default(string), long? pending = default(long?), long? reserved = default(long?)) - { - this.Available = available; - this._Balance = balance; - this.Currency = currency; - this.Reserved = reserved; - this.Pending = pending; - } - - /// - /// The balance available for use. - /// - /// The balance available for use. - [DataMember(Name = "available", IsRequired = false, EmitDefaultValue = false)] - public long? Available { get; set; } - - /// - /// The sum of the transactions that have already been settled. - /// - /// The sum of the transactions that have already been settled. - [DataMember(Name = "balance", IsRequired = false, EmitDefaultValue = false)] - public long? _Balance { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The sum of the transactions that will be settled in the future. - /// - /// The sum of the transactions that will be settled in the future. - [DataMember(Name = "pending", EmitDefaultValue = false)] - public long? Pending { get; set; } - - /// - /// The balance currently held in reserve. - /// - /// The balance currently held in reserve. - [DataMember(Name = "reserved", IsRequired = false, EmitDefaultValue = false)] - public long? Reserved { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Balance {\n"); - sb.Append(" Available: ").Append(Available).Append("\n"); - sb.Append(" _Balance: ").Append(_Balance).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Pending: ").Append(Pending).Append("\n"); - sb.Append(" Reserved: ").Append(Reserved).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Balance); - } - - /// - /// Returns true if Balance instances are equal - /// - /// Instance of Balance to be compared - /// Boolean - public bool Equals(Balance input) - { - if (input == null) - { - return false; - } - return - ( - this.Available == input.Available || - this.Available.Equals(input.Available) - ) && - ( - this._Balance == input._Balance || - this._Balance.Equals(input._Balance) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Pending == input.Pending || - this.Pending.Equals(input.Pending) - ) && - ( - this.Reserved == input.Reserved || - this.Reserved.Equals(input.Reserved) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Available.GetHashCode(); - hashCode = (hashCode * 59) + this._Balance.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Pending.GetHashCode(); - hashCode = (hashCode * 59) + this.Reserved.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BalanceAccount.cs b/Adyen/Model/BalancePlatform/BalanceAccount.cs deleted file mode 100644 index d2d24428e..000000000 --- a/Adyen/Model/BalancePlatform/BalanceAccount.cs +++ /dev/null @@ -1,364 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BalanceAccount - /// - [DataContract(Name = "BalanceAccount")] - public partial class BalanceAccount : IEquatable, IValidatableObject - { - /// - /// The status of the balance account, set to **active** by default. - /// - /// The status of the balance account, set to **active** by default. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the balance account, set to **active** by default. - /// - /// The status of the balance account, set to **active** by default. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceAccount() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. (required). - /// List of balances with the amount and currency.. - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency.. - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder.. - /// The unique identifier of the balance account. (required). - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// platformPaymentConfiguration. - /// Your reference for the balance account, maximum 150 characters.. - /// The status of the balance account, set to **active** by default. . - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - public BalanceAccount(string accountHolderId = default(string), List balances = default(List), string defaultCurrencyCode = default(string), string description = default(string), string id = default(string), Dictionary metadata = default(Dictionary), PlatformPaymentConfiguration platformPaymentConfiguration = default(PlatformPaymentConfiguration), string reference = default(string), StatusEnum? status = default(StatusEnum?), string timeZone = default(string)) - { - this.AccountHolderId = accountHolderId; - this.Id = id; - this.Balances = balances; - this.DefaultCurrencyCode = defaultCurrencyCode; - this.Description = description; - this.Metadata = metadata; - this.PlatformPaymentConfiguration = platformPaymentConfiguration; - this.Reference = reference; - this.Status = status; - this.TimeZone = timeZone; - } - - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - [DataMember(Name = "accountHolderId", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderId { get; set; } - - /// - /// List of balances with the amount and currency. - /// - /// List of balances with the amount and currency. - [DataMember(Name = "balances", EmitDefaultValue = false)] - public List Balances { get; set; } - - /// - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. - /// - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. - [DataMember(Name = "defaultCurrencyCode", EmitDefaultValue = false)] - public string DefaultCurrencyCode { get; set; } - - /// - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. - /// - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the balance account. - /// - /// The unique identifier of the balance account. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - [DataMember(Name = "migratedAccountCode", EmitDefaultValue = false)] - public string MigratedAccountCode { get; private set; } - - /// - /// Gets or Sets PlatformPaymentConfiguration - /// - [DataMember(Name = "platformPaymentConfiguration", EmitDefaultValue = false)] - public PlatformPaymentConfiguration PlatformPaymentConfiguration { get; set; } - - /// - /// Your reference for the balance account, maximum 150 characters. - /// - /// Your reference for the balance account, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceAccount {\n"); - sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); - sb.Append(" Balances: ").Append(Balances).Append("\n"); - sb.Append(" DefaultCurrencyCode: ").Append(DefaultCurrencyCode).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MigratedAccountCode: ").Append(MigratedAccountCode).Append("\n"); - sb.Append(" PlatformPaymentConfiguration: ").Append(PlatformPaymentConfiguration).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceAccount); - } - - /// - /// Returns true if BalanceAccount instances are equal - /// - /// Instance of BalanceAccount to be compared - /// Boolean - public bool Equals(BalanceAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderId == input.AccountHolderId || - (this.AccountHolderId != null && - this.AccountHolderId.Equals(input.AccountHolderId)) - ) && - ( - this.Balances == input.Balances || - this.Balances != null && - input.Balances != null && - this.Balances.SequenceEqual(input.Balances) - ) && - ( - this.DefaultCurrencyCode == input.DefaultCurrencyCode || - (this.DefaultCurrencyCode != null && - this.DefaultCurrencyCode.Equals(input.DefaultCurrencyCode)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MigratedAccountCode == input.MigratedAccountCode || - (this.MigratedAccountCode != null && - this.MigratedAccountCode.Equals(input.MigratedAccountCode)) - ) && - ( - this.PlatformPaymentConfiguration == input.PlatformPaymentConfiguration || - (this.PlatformPaymentConfiguration != null && - this.PlatformPaymentConfiguration.Equals(input.PlatformPaymentConfiguration)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderId != null) - { - hashCode = (hashCode * 59) + this.AccountHolderId.GetHashCode(); - } - if (this.Balances != null) - { - hashCode = (hashCode * 59) + this.Balances.GetHashCode(); - } - if (this.DefaultCurrencyCode != null) - { - hashCode = (hashCode * 59) + this.DefaultCurrencyCode.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MigratedAccountCode != null) - { - hashCode = (hashCode * 59) + this.MigratedAccountCode.GetHashCode(); - } - if (this.PlatformPaymentConfiguration != null) - { - hashCode = (hashCode * 59) + this.PlatformPaymentConfiguration.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BalanceAccountBase.cs b/Adyen/Model/BalancePlatform/BalanceAccountBase.cs deleted file mode 100644 index a508812b0..000000000 --- a/Adyen/Model/BalancePlatform/BalanceAccountBase.cs +++ /dev/null @@ -1,344 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BalanceAccountBase - /// - [DataContract(Name = "BalanceAccountBase")] - public partial class BalanceAccountBase : IEquatable, IValidatableObject - { - /// - /// The status of the balance account, set to **active** by default. - /// - /// The status of the balance account, set to **active** by default. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the balance account, set to **active** by default. - /// - /// The status of the balance account, set to **active** by default. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceAccountBase() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. (required). - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency.. - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder.. - /// The unique identifier of the balance account. (required). - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// platformPaymentConfiguration. - /// Your reference for the balance account, maximum 150 characters.. - /// The status of the balance account, set to **active** by default. . - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - public BalanceAccountBase(string accountHolderId = default(string), string defaultCurrencyCode = default(string), string description = default(string), string id = default(string), Dictionary metadata = default(Dictionary), PlatformPaymentConfiguration platformPaymentConfiguration = default(PlatformPaymentConfiguration), string reference = default(string), StatusEnum? status = default(StatusEnum?), string timeZone = default(string)) - { - this.AccountHolderId = accountHolderId; - this.Id = id; - this.DefaultCurrencyCode = defaultCurrencyCode; - this.Description = description; - this.Metadata = metadata; - this.PlatformPaymentConfiguration = platformPaymentConfiguration; - this.Reference = reference; - this.Status = status; - this.TimeZone = timeZone; - } - - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - [DataMember(Name = "accountHolderId", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderId { get; set; } - - /// - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. - /// - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. - [DataMember(Name = "defaultCurrencyCode", EmitDefaultValue = false)] - public string DefaultCurrencyCode { get; set; } - - /// - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. - /// - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the balance account. - /// - /// The unique identifier of the balance account. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - [DataMember(Name = "migratedAccountCode", EmitDefaultValue = false)] - public string MigratedAccountCode { get; private set; } - - /// - /// Gets or Sets PlatformPaymentConfiguration - /// - [DataMember(Name = "platformPaymentConfiguration", EmitDefaultValue = false)] - public PlatformPaymentConfiguration PlatformPaymentConfiguration { get; set; } - - /// - /// Your reference for the balance account, maximum 150 characters. - /// - /// Your reference for the balance account, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceAccountBase {\n"); - sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); - sb.Append(" DefaultCurrencyCode: ").Append(DefaultCurrencyCode).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MigratedAccountCode: ").Append(MigratedAccountCode).Append("\n"); - sb.Append(" PlatformPaymentConfiguration: ").Append(PlatformPaymentConfiguration).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceAccountBase); - } - - /// - /// Returns true if BalanceAccountBase instances are equal - /// - /// Instance of BalanceAccountBase to be compared - /// Boolean - public bool Equals(BalanceAccountBase input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderId == input.AccountHolderId || - (this.AccountHolderId != null && - this.AccountHolderId.Equals(input.AccountHolderId)) - ) && - ( - this.DefaultCurrencyCode == input.DefaultCurrencyCode || - (this.DefaultCurrencyCode != null && - this.DefaultCurrencyCode.Equals(input.DefaultCurrencyCode)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MigratedAccountCode == input.MigratedAccountCode || - (this.MigratedAccountCode != null && - this.MigratedAccountCode.Equals(input.MigratedAccountCode)) - ) && - ( - this.PlatformPaymentConfiguration == input.PlatformPaymentConfiguration || - (this.PlatformPaymentConfiguration != null && - this.PlatformPaymentConfiguration.Equals(input.PlatformPaymentConfiguration)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderId != null) - { - hashCode = (hashCode * 59) + this.AccountHolderId.GetHashCode(); - } - if (this.DefaultCurrencyCode != null) - { - hashCode = (hashCode * 59) + this.DefaultCurrencyCode.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MigratedAccountCode != null) - { - hashCode = (hashCode * 59) + this.MigratedAccountCode.GetHashCode(); - } - if (this.PlatformPaymentConfiguration != null) - { - hashCode = (hashCode * 59) + this.PlatformPaymentConfiguration.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BalanceAccountInfo.cs b/Adyen/Model/BalancePlatform/BalanceAccountInfo.cs deleted file mode 100644 index 43d951368..000000000 --- a/Adyen/Model/BalancePlatform/BalanceAccountInfo.cs +++ /dev/null @@ -1,277 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BalanceAccountInfo - /// - [DataContract(Name = "BalanceAccountInfo")] - public partial class BalanceAccountInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceAccountInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. (required). - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency.. - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder.. - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// platformPaymentConfiguration. - /// Your reference for the balance account, maximum 150 characters.. - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - public BalanceAccountInfo(string accountHolderId = default(string), string defaultCurrencyCode = default(string), string description = default(string), Dictionary metadata = default(Dictionary), PlatformPaymentConfiguration platformPaymentConfiguration = default(PlatformPaymentConfiguration), string reference = default(string), string timeZone = default(string)) - { - this.AccountHolderId = accountHolderId; - this.DefaultCurrencyCode = defaultCurrencyCode; - this.Description = description; - this.Metadata = metadata; - this.PlatformPaymentConfiguration = platformPaymentConfiguration; - this.Reference = reference; - this.TimeZone = timeZone; - } - - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - [DataMember(Name = "accountHolderId", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderId { get; set; } - - /// - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. - /// - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. - [DataMember(Name = "defaultCurrencyCode", EmitDefaultValue = false)] - public string DefaultCurrencyCode { get; set; } - - /// - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. - /// - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - [DataMember(Name = "migratedAccountCode", EmitDefaultValue = false)] - public string MigratedAccountCode { get; private set; } - - /// - /// Gets or Sets PlatformPaymentConfiguration - /// - [DataMember(Name = "platformPaymentConfiguration", EmitDefaultValue = false)] - public PlatformPaymentConfiguration PlatformPaymentConfiguration { get; set; } - - /// - /// Your reference for the balance account, maximum 150 characters. - /// - /// Your reference for the balance account, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceAccountInfo {\n"); - sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); - sb.Append(" DefaultCurrencyCode: ").Append(DefaultCurrencyCode).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MigratedAccountCode: ").Append(MigratedAccountCode).Append("\n"); - sb.Append(" PlatformPaymentConfiguration: ").Append(PlatformPaymentConfiguration).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceAccountInfo); - } - - /// - /// Returns true if BalanceAccountInfo instances are equal - /// - /// Instance of BalanceAccountInfo to be compared - /// Boolean - public bool Equals(BalanceAccountInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderId == input.AccountHolderId || - (this.AccountHolderId != null && - this.AccountHolderId.Equals(input.AccountHolderId)) - ) && - ( - this.DefaultCurrencyCode == input.DefaultCurrencyCode || - (this.DefaultCurrencyCode != null && - this.DefaultCurrencyCode.Equals(input.DefaultCurrencyCode)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MigratedAccountCode == input.MigratedAccountCode || - (this.MigratedAccountCode != null && - this.MigratedAccountCode.Equals(input.MigratedAccountCode)) - ) && - ( - this.PlatformPaymentConfiguration == input.PlatformPaymentConfiguration || - (this.PlatformPaymentConfiguration != null && - this.PlatformPaymentConfiguration.Equals(input.PlatformPaymentConfiguration)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderId != null) - { - hashCode = (hashCode * 59) + this.AccountHolderId.GetHashCode(); - } - if (this.DefaultCurrencyCode != null) - { - hashCode = (hashCode * 59) + this.DefaultCurrencyCode.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MigratedAccountCode != null) - { - hashCode = (hashCode * 59) + this.MigratedAccountCode.GetHashCode(); - } - if (this.PlatformPaymentConfiguration != null) - { - hashCode = (hashCode * 59) + this.PlatformPaymentConfiguration.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.cs b/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.cs deleted file mode 100644 index a72102b94..000000000 --- a/Adyen/Model/BalancePlatform/BalanceAccountUpdateRequest.cs +++ /dev/null @@ -1,284 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BalanceAccountUpdateRequest - /// - [DataContract(Name = "BalanceAccountUpdateRequest")] - public partial class BalanceAccountUpdateRequest : IEquatable, IValidatableObject - { - /// - /// The status of the balance account. Payment instruments linked to the balance account can only be used if the balance account status is **active**. Possible values: **active**, **closed**, **suspended**. - /// - /// The status of the balance account. Payment instruments linked to the balance account can only be used if the balance account status is **active**. Possible values: **active**, **closed**, **suspended**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the balance account. Payment instruments linked to the balance account can only be used if the balance account status is **active**. Possible values: **active**, **closed**, **suspended**. - /// - /// The status of the balance account. Payment instruments linked to the balance account can only be used if the balance account status is **active**. Possible values: **active**, **closed**, **suspended**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account.. - /// A human-readable description of the balance account. You can use this parameter to distinguish between multiple balance accounts under an account holder.. - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// platformPaymentConfiguration. - /// Your reference to the balance account.. - /// The status of the balance account. Payment instruments linked to the balance account can only be used if the balance account status is **active**. Possible values: **active**, **closed**, **suspended**.. - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - public BalanceAccountUpdateRequest(string accountHolderId = default(string), string description = default(string), Dictionary metadata = default(Dictionary), PlatformPaymentConfiguration platformPaymentConfiguration = default(PlatformPaymentConfiguration), string reference = default(string), StatusEnum? status = default(StatusEnum?), string timeZone = default(string)) - { - this.AccountHolderId = accountHolderId; - this.Description = description; - this.Metadata = metadata; - this.PlatformPaymentConfiguration = platformPaymentConfiguration; - this.Reference = reference; - this.Status = status; - this.TimeZone = timeZone; - } - - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - [DataMember(Name = "accountHolderId", EmitDefaultValue = false)] - public string AccountHolderId { get; set; } - - /// - /// A human-readable description of the balance account. You can use this parameter to distinguish between multiple balance accounts under an account holder. - /// - /// A human-readable description of the balance account. You can use this parameter to distinguish between multiple balance accounts under an account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets PlatformPaymentConfiguration - /// - [DataMember(Name = "platformPaymentConfiguration", EmitDefaultValue = false)] - public PlatformPaymentConfiguration PlatformPaymentConfiguration { get; set; } - - /// - /// Your reference to the balance account. - /// - /// Your reference to the balance account. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceAccountUpdateRequest {\n"); - sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PlatformPaymentConfiguration: ").Append(PlatformPaymentConfiguration).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceAccountUpdateRequest); - } - - /// - /// Returns true if BalanceAccountUpdateRequest instances are equal - /// - /// Instance of BalanceAccountUpdateRequest to be compared - /// Boolean - public bool Equals(BalanceAccountUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderId == input.AccountHolderId || - (this.AccountHolderId != null && - this.AccountHolderId.Equals(input.AccountHolderId)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PlatformPaymentConfiguration == input.PlatformPaymentConfiguration || - (this.PlatformPaymentConfiguration != null && - this.PlatformPaymentConfiguration.Equals(input.PlatformPaymentConfiguration)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderId != null) - { - hashCode = (hashCode * 59) + this.AccountHolderId.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PlatformPaymentConfiguration != null) - { - hashCode = (hashCode * 59) + this.PlatformPaymentConfiguration.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BalancePlatform.cs b/Adyen/Model/BalancePlatform/BalancePlatform.cs deleted file mode 100644 index e22ab8dee..000000000 --- a/Adyen/Model/BalancePlatform/BalancePlatform.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BalancePlatform - /// - [DataContract(Name = "BalancePlatform")] - public partial class BalancePlatform : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalancePlatform() { } - /// - /// Initializes a new instance of the class. - /// - /// Your description of the balance platform.. - /// The unique identifier of the balance platform. (required). - /// The status of the balance platform. Possible values: **Active**, **Inactive**, **Closed**, **Suspended**.. - public BalancePlatform(string description = default(string), string id = default(string), string status = default(string)) - { - this.Id = id; - this.Description = description; - this.Status = status; - } - - /// - /// Your description of the balance platform. - /// - /// Your description of the balance platform. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The status of the balance platform. Possible values: **Active**, **Inactive**, **Closed**, **Suspended**. - /// - /// The status of the balance platform. Possible values: **Active**, **Inactive**, **Closed**, **Suspended**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalancePlatform {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalancePlatform); - } - - /// - /// Returns true if BalancePlatform instances are equal - /// - /// Instance of BalancePlatform to be compared - /// Boolean - public bool Equals(BalancePlatform input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.cs b/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.cs deleted file mode 100644 index 05a0a5dcb..000000000 --- a/Adyen/Model/BalancePlatform/BalanceSweepConfigurationsResponse.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BalanceSweepConfigurationsResponse - /// - [DataContract(Name = "BalanceSweepConfigurationsResponse")] - public partial class BalanceSweepConfigurationsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceSweepConfigurationsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether there are more items on the next page. (required). - /// Indicates whether there are more items on the previous page. (required). - /// List of sweeps associated with the balance account. (required). - public BalanceSweepConfigurationsResponse(bool? hasNext = default(bool?), bool? hasPrevious = default(bool?), List sweeps = default(List)) - { - this.HasNext = hasNext; - this.HasPrevious = hasPrevious; - this.Sweeps = sweeps; - } - - /// - /// Indicates whether there are more items on the next page. - /// - /// Indicates whether there are more items on the next page. - [DataMember(Name = "hasNext", IsRequired = false, EmitDefaultValue = false)] - public bool? HasNext { get; set; } - - /// - /// Indicates whether there are more items on the previous page. - /// - /// Indicates whether there are more items on the previous page. - [DataMember(Name = "hasPrevious", IsRequired = false, EmitDefaultValue = false)] - public bool? HasPrevious { get; set; } - - /// - /// List of sweeps associated with the balance account. - /// - /// List of sweeps associated with the balance account. - [DataMember(Name = "sweeps", IsRequired = false, EmitDefaultValue = false)] - public List Sweeps { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceSweepConfigurationsResponse {\n"); - sb.Append(" HasNext: ").Append(HasNext).Append("\n"); - sb.Append(" HasPrevious: ").Append(HasPrevious).Append("\n"); - sb.Append(" Sweeps: ").Append(Sweeps).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceSweepConfigurationsResponse); - } - - /// - /// Returns true if BalanceSweepConfigurationsResponse instances are equal - /// - /// Instance of BalanceSweepConfigurationsResponse to be compared - /// Boolean - public bool Equals(BalanceSweepConfigurationsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasNext == input.HasNext || - this.HasNext.Equals(input.HasNext) - ) && - ( - this.HasPrevious == input.HasPrevious || - this.HasPrevious.Equals(input.HasPrevious) - ) && - ( - this.Sweeps == input.Sweeps || - this.Sweeps != null && - input.Sweeps != null && - this.Sweeps.SequenceEqual(input.Sweeps) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasNext.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPrevious.GetHashCode(); - if (this.Sweeps != null) - { - hashCode = (hashCode * 59) + this.Sweeps.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BankAccount.cs b/Adyen/Model/BalancePlatform/BankAccount.cs deleted file mode 100644 index b6b12d305..000000000 --- a/Adyen/Model/BalancePlatform/BankAccount.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BankAccount - /// - [DataContract(Name = "BankAccount")] - public partial class BankAccount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BankAccount() { } - /// - /// Initializes a new instance of the class. - /// - /// accountIdentification (required). - public BankAccount(BankAccountAccountIdentification accountIdentification = default(BankAccountAccountIdentification)) - { - this.AccountIdentification = accountIdentification; - } - - /// - /// Gets or Sets AccountIdentification - /// - [DataMember(Name = "accountIdentification", IsRequired = false, EmitDefaultValue = false)] - public BankAccountAccountIdentification AccountIdentification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccount {\n"); - sb.Append(" AccountIdentification: ").Append(AccountIdentification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccount); - } - - /// - /// Returns true if BankAccount instances are equal - /// - /// Instance of BankAccount to be compared - /// Boolean - public bool Equals(BankAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountIdentification == input.AccountIdentification || - (this.AccountIdentification != null && - this.AccountIdentification.Equals(input.AccountIdentification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountIdentification != null) - { - hashCode = (hashCode * 59) + this.AccountIdentification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.cs b/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.cs deleted file mode 100644 index a93bca711..000000000 --- a/Adyen/Model/BalancePlatform/BankAccountAccountIdentification.cs +++ /dev/null @@ -1,743 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. - /// - [JsonConverter(typeof(BankAccountAccountIdentificationJsonConverter))] - [DataContract(Name = "BankAccount_accountIdentification")] - public partial class BankAccountAccountIdentification : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AULocalAccountIdentification. - public BankAccountAccountIdentification(AULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BRLocalAccountIdentification. - public BankAccountAccountIdentification(BRLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CALocalAccountIdentification. - public BankAccountAccountIdentification(CALocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CZLocalAccountIdentification. - public BankAccountAccountIdentification(CZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DKLocalAccountIdentification. - public BankAccountAccountIdentification(DKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HKLocalAccountIdentification. - public BankAccountAccountIdentification(HKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HULocalAccountIdentification. - public BankAccountAccountIdentification(HULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IbanAccountIdentification. - public BankAccountAccountIdentification(IbanAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NOLocalAccountIdentification. - public BankAccountAccountIdentification(NOLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NZLocalAccountIdentification. - public BankAccountAccountIdentification(NZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NumberAndBicAccountIdentification. - public BankAccountAccountIdentification(NumberAndBicAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PLLocalAccountIdentification. - public BankAccountAccountIdentification(PLLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SELocalAccountIdentification. - public BankAccountAccountIdentification(SELocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SGLocalAccountIdentification. - public BankAccountAccountIdentification(SGLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UKLocalAccountIdentification. - public BankAccountAccountIdentification(UKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of USLocalAccountIdentification. - public BankAccountAccountIdentification(USLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BRLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CALocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IbanAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NOLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NumberAndBicAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PLLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SELocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SGLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(USLocalAccountIdentification)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AULocalAccountIdentification, BRLocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification"); - } - } - } - - /// - /// Get the actual instance of `AULocalAccountIdentification`. If the actual instance is not `AULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of AULocalAccountIdentification - public AULocalAccountIdentification GetAULocalAccountIdentification() - { - return (AULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `BRLocalAccountIdentification`. If the actual instance is not `BRLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of BRLocalAccountIdentification - public BRLocalAccountIdentification GetBRLocalAccountIdentification() - { - return (BRLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CALocalAccountIdentification`. If the actual instance is not `CALocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CALocalAccountIdentification - public CALocalAccountIdentification GetCALocalAccountIdentification() - { - return (CALocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CZLocalAccountIdentification`. If the actual instance is not `CZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CZLocalAccountIdentification - public CZLocalAccountIdentification GetCZLocalAccountIdentification() - { - return (CZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `DKLocalAccountIdentification`. If the actual instance is not `DKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of DKLocalAccountIdentification - public DKLocalAccountIdentification GetDKLocalAccountIdentification() - { - return (DKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HKLocalAccountIdentification`. If the actual instance is not `HKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HKLocalAccountIdentification - public HKLocalAccountIdentification GetHKLocalAccountIdentification() - { - return (HKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HULocalAccountIdentification`. If the actual instance is not `HULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HULocalAccountIdentification - public HULocalAccountIdentification GetHULocalAccountIdentification() - { - return (HULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of IbanAccountIdentification - public IbanAccountIdentification GetIbanAccountIdentification() - { - return (IbanAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NOLocalAccountIdentification`. If the actual instance is not `NOLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NOLocalAccountIdentification - public NOLocalAccountIdentification GetNOLocalAccountIdentification() - { - return (NOLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NZLocalAccountIdentification`. If the actual instance is not `NZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NZLocalAccountIdentification - public NZLocalAccountIdentification GetNZLocalAccountIdentification() - { - return (NZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NumberAndBicAccountIdentification`. If the actual instance is not `NumberAndBicAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NumberAndBicAccountIdentification - public NumberAndBicAccountIdentification GetNumberAndBicAccountIdentification() - { - return (NumberAndBicAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `PLLocalAccountIdentification`. If the actual instance is not `PLLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of PLLocalAccountIdentification - public PLLocalAccountIdentification GetPLLocalAccountIdentification() - { - return (PLLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SELocalAccountIdentification`. If the actual instance is not `SELocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SELocalAccountIdentification - public SELocalAccountIdentification GetSELocalAccountIdentification() - { - return (SELocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SGLocalAccountIdentification`. If the actual instance is not `SGLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SGLocalAccountIdentification - public SGLocalAccountIdentification GetSGLocalAccountIdentification() - { - return (SGLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `UKLocalAccountIdentification`. If the actual instance is not `UKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of UKLocalAccountIdentification - public UKLocalAccountIdentification GetUKLocalAccountIdentification() - { - return (UKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `USLocalAccountIdentification`. If the actual instance is not `USLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of USLocalAccountIdentification - public USLocalAccountIdentification GetUSLocalAccountIdentification() - { - return (USLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BankAccountAccountIdentification {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, BankAccountAccountIdentification.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of BankAccountAccountIdentification - /// - /// JSON string - /// An instance of BankAccountAccountIdentification - public static BankAccountAccountIdentification FromJson(string jsonString) - { - BankAccountAccountIdentification newBankAccountAccountIdentification = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newBankAccountAccountIdentification; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the AULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("AULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the BRLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("BRLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CALocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("CALocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("CZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the DKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("DKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("HKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("HULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the IbanAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("IbanAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NOLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("NOLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("NZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NumberAndBicAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("NumberAndBicAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the PLLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("PLLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SELocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("SELocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SGLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("SGLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the UKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("UKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the USLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountAccountIdentification = new BankAccountAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountAccountIdentification.SerializerSettings)); - matchedTypes.Add("USLocalAccountIdentification"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newBankAccountAccountIdentification; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountAccountIdentification); - } - - /// - /// Returns true if BankAccountAccountIdentification instances are equal - /// - /// Instance of BankAccountAccountIdentification to be compared - /// Boolean - public bool Equals(BankAccountAccountIdentification input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for BankAccountAccountIdentification - /// - public class BankAccountAccountIdentificationJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(BankAccountAccountIdentification).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return BankAccountAccountIdentification.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BankAccountDetails.cs b/Adyen/Model/BalancePlatform/BankAccountDetails.cs deleted file mode 100644 index e5b496a19..000000000 --- a/Adyen/Model/BalancePlatform/BankAccountDetails.cs +++ /dev/null @@ -1,269 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BankAccountDetails - /// - [DataContract(Name = "BankAccountDetails")] - public partial class BankAccountDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BankAccountDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace.. - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to "checking"). - /// The bank account branch number, without separators or whitespace. - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard.. - /// The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace.. - /// The [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace.. - /// **iban** or **usLocal** or **ukLocal** (required) (default to "iban"). - public BankAccountDetails(string accountNumber = default(string), string accountType = "checking", string branchNumber = default(string), string formFactor = "physical", string iban = default(string), string routingNumber = default(string), string sortCode = default(string), string type = "iban") - { - this.Type = type; - this.AccountNumber = accountNumber; - // use default value if no "accountType" provided - this.AccountType = accountType ?? "checking"; - this.BranchNumber = branchNumber; - // use default value if no "formFactor" provided - this.FormFactor = formFactor ?? "physical"; - this.Iban = iban; - this.RoutingNumber = routingNumber; - this.SortCode = sortCode; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public string AccountType { get; set; } - - /// - /// The bank account branch number, without separators or whitespace - /// - /// The bank account branch number, without separators or whitespace - [DataMember(Name = "branchNumber", EmitDefaultValue = false)] - public string BranchNumber { get; set; } - - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. - [DataMember(Name = "formFactor", EmitDefaultValue = false)] - public string FormFactor { get; set; } - - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - /// - /// The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - [DataMember(Name = "routingNumber", EmitDefaultValue = false)] - public string RoutingNumber { get; set; } - - /// - /// The [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - /// - /// The [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - [DataMember(Name = "sortCode", EmitDefaultValue = false)] - public string SortCode { get; set; } - - /// - /// **iban** or **usLocal** or **ukLocal** - /// - /// **iban** or **usLocal** or **ukLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountDetails {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" BranchNumber: ").Append(BranchNumber).Append("\n"); - sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); - sb.Append(" SortCode: ").Append(SortCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountDetails); - } - - /// - /// Returns true if BankAccountDetails instances are equal - /// - /// Instance of BankAccountDetails to be compared - /// Boolean - public bool Equals(BankAccountDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.BranchNumber == input.BranchNumber || - (this.BranchNumber != null && - this.BranchNumber.Equals(input.BranchNumber)) - ) && - ( - this.FormFactor == input.FormFactor || - (this.FormFactor != null && - this.FormFactor.Equals(input.FormFactor)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.RoutingNumber == input.RoutingNumber || - (this.RoutingNumber != null && - this.RoutingNumber.Equals(input.RoutingNumber)) - ) && - ( - this.SortCode == input.SortCode || - (this.SortCode != null && - this.SortCode.Equals(input.SortCode)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.BranchNumber != null) - { - hashCode = (hashCode * 59) + this.BranchNumber.GetHashCode(); - } - if (this.FormFactor != null) - { - hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.RoutingNumber != null) - { - hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); - } - if (this.SortCode != null) - { - hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.cs b/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.cs deleted file mode 100644 index 99c7b43af..000000000 --- a/Adyen/Model/BalancePlatform/BankAccountIdentificationTypeRequirement.cs +++ /dev/null @@ -1,290 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BankAccountIdentificationTypeRequirement - /// - [DataContract(Name = "BankAccountIdentificationTypeRequirement")] - public partial class BankAccountIdentificationTypeRequirement : IEquatable, IValidatableObject - { - /// - /// Defines BankAccountIdentificationTypes - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum BankAccountIdentificationTypesEnum - { - /// - /// Enum AuLocal for value: auLocal - /// - [EnumMember(Value = "auLocal")] - AuLocal = 1, - - /// - /// Enum BrLocal for value: brLocal - /// - [EnumMember(Value = "brLocal")] - BrLocal = 2, - - /// - /// Enum CaLocal for value: caLocal - /// - [EnumMember(Value = "caLocal")] - CaLocal = 3, - - /// - /// Enum CzLocal for value: czLocal - /// - [EnumMember(Value = "czLocal")] - CzLocal = 4, - - /// - /// Enum DkLocal for value: dkLocal - /// - [EnumMember(Value = "dkLocal")] - DkLocal = 5, - - /// - /// Enum HkLocal for value: hkLocal - /// - [EnumMember(Value = "hkLocal")] - HkLocal = 6, - - /// - /// Enum HuLocal for value: huLocal - /// - [EnumMember(Value = "huLocal")] - HuLocal = 7, - - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 8, - - /// - /// Enum Legacy for value: legacy - /// - [EnumMember(Value = "legacy")] - Legacy = 9, - - /// - /// Enum NoLocal for value: noLocal - /// - [EnumMember(Value = "noLocal")] - NoLocal = 10, - - /// - /// Enum NumberAndBic for value: numberAndBic - /// - [EnumMember(Value = "numberAndBic")] - NumberAndBic = 11, - - /// - /// Enum NzLocal for value: nzLocal - /// - [EnumMember(Value = "nzLocal")] - NzLocal = 12, - - /// - /// Enum PlLocal for value: plLocal - /// - [EnumMember(Value = "plLocal")] - PlLocal = 13, - - /// - /// Enum SeLocal for value: seLocal - /// - [EnumMember(Value = "seLocal")] - SeLocal = 14, - - /// - /// Enum SgLocal for value: sgLocal - /// - [EnumMember(Value = "sgLocal")] - SgLocal = 15, - - /// - /// Enum UkLocal for value: ukLocal - /// - [EnumMember(Value = "ukLocal")] - UkLocal = 16, - - /// - /// Enum UsLocal for value: usLocal - /// - [EnumMember(Value = "usLocal")] - UsLocal = 17 - - } - - - - /// - /// List of bank account identification types: eg.; [iban , numberAndBic] - /// - /// List of bank account identification types: eg.; [iban , numberAndBic] - [DataMember(Name = "bankAccountIdentificationTypes", EmitDefaultValue = false)] - public List BankAccountIdentificationTypes { get; set; } - /// - /// **bankAccountIdentificationTypeRequirement** - /// - /// **bankAccountIdentificationTypeRequirement** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccountIdentificationTypeRequirement for value: bankAccountIdentificationTypeRequirement - /// - [EnumMember(Value = "bankAccountIdentificationTypeRequirement")] - BankAccountIdentificationTypeRequirement = 1 - - } - - - /// - /// **bankAccountIdentificationTypeRequirement** - /// - /// **bankAccountIdentificationTypeRequirement** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BankAccountIdentificationTypeRequirement() { } - /// - /// Initializes a new instance of the class. - /// - /// List of bank account identification types: eg.; [iban , numberAndBic]. - /// Specifies the bank account details for a particular route per required field in this object depending on the country of the bank account and the currency of the transfer.. - /// **bankAccountIdentificationTypeRequirement** (required) (default to TypeEnum.BankAccountIdentificationTypeRequirement). - public BankAccountIdentificationTypeRequirement(List bankAccountIdentificationTypes = default(List), string description = default(string), TypeEnum type = TypeEnum.BankAccountIdentificationTypeRequirement) - { - this.Type = type; - this.BankAccountIdentificationTypes = bankAccountIdentificationTypes; - this.Description = description; - } - - /// - /// Specifies the bank account details for a particular route per required field in this object depending on the country of the bank account and the currency of the transfer. - /// - /// Specifies the bank account details for a particular route per required field in this object depending on the country of the bank account and the currency of the transfer. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountIdentificationTypeRequirement {\n"); - sb.Append(" BankAccountIdentificationTypes: ").Append(BankAccountIdentificationTypes).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountIdentificationTypeRequirement); - } - - /// - /// Returns true if BankAccountIdentificationTypeRequirement instances are equal - /// - /// Instance of BankAccountIdentificationTypeRequirement to be compared - /// Boolean - public bool Equals(BankAccountIdentificationTypeRequirement input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccountIdentificationTypes == input.BankAccountIdentificationTypes || - this.BankAccountIdentificationTypes.SequenceEqual(input.BankAccountIdentificationTypes) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.BankAccountIdentificationTypes.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.cs b/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.cs deleted file mode 100644 index fb7c61e49..000000000 --- a/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequest.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BankAccountIdentificationValidationRequest - /// - [DataContract(Name = "BankAccountIdentificationValidationRequest")] - public partial class BankAccountIdentificationValidationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BankAccountIdentificationValidationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// accountIdentification (required). - public BankAccountIdentificationValidationRequest(BankAccountIdentificationValidationRequestAccountIdentification accountIdentification = default(BankAccountIdentificationValidationRequestAccountIdentification)) - { - this.AccountIdentification = accountIdentification; - } - - /// - /// Gets or Sets AccountIdentification - /// - [DataMember(Name = "accountIdentification", IsRequired = false, EmitDefaultValue = false)] - public BankAccountIdentificationValidationRequestAccountIdentification AccountIdentification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountIdentificationValidationRequest {\n"); - sb.Append(" AccountIdentification: ").Append(AccountIdentification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountIdentificationValidationRequest); - } - - /// - /// Returns true if BankAccountIdentificationValidationRequest instances are equal - /// - /// Instance of BankAccountIdentificationValidationRequest to be compared - /// Boolean - public bool Equals(BankAccountIdentificationValidationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountIdentification == input.AccountIdentification || - (this.AccountIdentification != null && - this.AccountIdentification.Equals(input.AccountIdentification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountIdentification != null) - { - hashCode = (hashCode * 59) + this.AccountIdentification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.cs b/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.cs deleted file mode 100644 index 9f21b75e7..000000000 --- a/Adyen/Model/BalancePlatform/BankAccountIdentificationValidationRequestAccountIdentification.cs +++ /dev/null @@ -1,743 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Bank account identification. - /// - [JsonConverter(typeof(BankAccountIdentificationValidationRequestAccountIdentificationJsonConverter))] - [DataContract(Name = "BankAccountIdentificationValidationRequest_accountIdentification")] - public partial class BankAccountIdentificationValidationRequestAccountIdentification : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AULocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(AULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BRLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(BRLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CALocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(CALocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CZLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(CZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DKLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(DKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HKLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(HKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HULocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(HULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IbanAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(IbanAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NOLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(NOLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NZLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(NZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NumberAndBicAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(NumberAndBicAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PLLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(PLLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SELocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(SELocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SGLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(SGLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UKLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(UKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of USLocalAccountIdentification. - public BankAccountIdentificationValidationRequestAccountIdentification(USLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BRLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CALocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IbanAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NOLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NumberAndBicAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PLLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SELocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SGLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(USLocalAccountIdentification)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AULocalAccountIdentification, BRLocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification"); - } - } - } - - /// - /// Get the actual instance of `AULocalAccountIdentification`. If the actual instance is not `AULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of AULocalAccountIdentification - public AULocalAccountIdentification GetAULocalAccountIdentification() - { - return (AULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `BRLocalAccountIdentification`. If the actual instance is not `BRLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of BRLocalAccountIdentification - public BRLocalAccountIdentification GetBRLocalAccountIdentification() - { - return (BRLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CALocalAccountIdentification`. If the actual instance is not `CALocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CALocalAccountIdentification - public CALocalAccountIdentification GetCALocalAccountIdentification() - { - return (CALocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CZLocalAccountIdentification`. If the actual instance is not `CZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CZLocalAccountIdentification - public CZLocalAccountIdentification GetCZLocalAccountIdentification() - { - return (CZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `DKLocalAccountIdentification`. If the actual instance is not `DKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of DKLocalAccountIdentification - public DKLocalAccountIdentification GetDKLocalAccountIdentification() - { - return (DKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HKLocalAccountIdentification`. If the actual instance is not `HKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HKLocalAccountIdentification - public HKLocalAccountIdentification GetHKLocalAccountIdentification() - { - return (HKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HULocalAccountIdentification`. If the actual instance is not `HULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HULocalAccountIdentification - public HULocalAccountIdentification GetHULocalAccountIdentification() - { - return (HULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of IbanAccountIdentification - public IbanAccountIdentification GetIbanAccountIdentification() - { - return (IbanAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NOLocalAccountIdentification`. If the actual instance is not `NOLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NOLocalAccountIdentification - public NOLocalAccountIdentification GetNOLocalAccountIdentification() - { - return (NOLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NZLocalAccountIdentification`. If the actual instance is not `NZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NZLocalAccountIdentification - public NZLocalAccountIdentification GetNZLocalAccountIdentification() - { - return (NZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NumberAndBicAccountIdentification`. If the actual instance is not `NumberAndBicAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NumberAndBicAccountIdentification - public NumberAndBicAccountIdentification GetNumberAndBicAccountIdentification() - { - return (NumberAndBicAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `PLLocalAccountIdentification`. If the actual instance is not `PLLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of PLLocalAccountIdentification - public PLLocalAccountIdentification GetPLLocalAccountIdentification() - { - return (PLLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SELocalAccountIdentification`. If the actual instance is not `SELocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SELocalAccountIdentification - public SELocalAccountIdentification GetSELocalAccountIdentification() - { - return (SELocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SGLocalAccountIdentification`. If the actual instance is not `SGLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SGLocalAccountIdentification - public SGLocalAccountIdentification GetSGLocalAccountIdentification() - { - return (SGLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `UKLocalAccountIdentification`. If the actual instance is not `UKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of UKLocalAccountIdentification - public UKLocalAccountIdentification GetUKLocalAccountIdentification() - { - return (UKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `USLocalAccountIdentification`. If the actual instance is not `USLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of USLocalAccountIdentification - public USLocalAccountIdentification GetUSLocalAccountIdentification() - { - return (USLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BankAccountIdentificationValidationRequestAccountIdentification {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of BankAccountIdentificationValidationRequestAccountIdentification - /// - /// JSON string - /// An instance of BankAccountIdentificationValidationRequestAccountIdentification - public static BankAccountIdentificationValidationRequestAccountIdentification FromJson(string jsonString) - { - BankAccountIdentificationValidationRequestAccountIdentification newBankAccountIdentificationValidationRequestAccountIdentification = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newBankAccountIdentificationValidationRequestAccountIdentification; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the AULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("AULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the BRLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("BRLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CALocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("CALocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("CZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the DKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("DKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("HKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("HULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the IbanAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("IbanAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NOLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("NOLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("NZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NumberAndBicAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("NumberAndBicAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the PLLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("PLLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SELocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("SELocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SGLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("SGLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the UKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("UKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the USLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountIdentificationValidationRequestAccountIdentification = new BankAccountIdentificationValidationRequestAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountIdentificationValidationRequestAccountIdentification.SerializerSettings)); - matchedTypes.Add("USLocalAccountIdentification"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newBankAccountIdentificationValidationRequestAccountIdentification; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountIdentificationValidationRequestAccountIdentification); - } - - /// - /// Returns true if BankAccountIdentificationValidationRequestAccountIdentification instances are equal - /// - /// Instance of BankAccountIdentificationValidationRequestAccountIdentification to be compared - /// Boolean - public bool Equals(BankAccountIdentificationValidationRequestAccountIdentification input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for BankAccountIdentificationValidationRequestAccountIdentification - /// - public class BankAccountIdentificationValidationRequestAccountIdentificationJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(BankAccountIdentificationValidationRequestAccountIdentification).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return BankAccountIdentificationValidationRequestAccountIdentification.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BankAccountModel.cs b/Adyen/Model/BalancePlatform/BankAccountModel.cs deleted file mode 100644 index 820f13e56..000000000 --- a/Adyen/Model/BalancePlatform/BankAccountModel.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BankAccountModel - /// - [DataContract(Name = "BankAccountModel")] - public partial class BankAccountModel : IEquatable, IValidatableObject - { - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. - [JsonConverter(typeof(StringEnumConverter))] - public enum FormFactorEnum - { - /// - /// Enum Physical for value: physical - /// - [EnumMember(Value = "physical")] - Physical = 1, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 2, - - /// - /// Enum Virtual for value: virtual - /// - [EnumMember(Value = "virtual")] - Virtual = 3 - - } - - - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. - [DataMember(Name = "formFactor", EmitDefaultValue = false)] - public FormFactorEnum? FormFactor { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to FormFactorEnum.Physical). - public BankAccountModel(FormFactorEnum? formFactor = FormFactorEnum.Physical) - { - this.FormFactor = formFactor; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountModel {\n"); - sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountModel); - } - - /// - /// Returns true if BankAccountModel instances are equal - /// - /// Instance of BankAccountModel to be compared - /// Boolean - public bool Equals(BankAccountModel input) - { - if (input == null) - { - return false; - } - return - ( - this.FormFactor == input.FormFactor || - this.FormFactor.Equals(input.FormFactor) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BankIdentification.cs b/Adyen/Model/BalancePlatform/BankIdentification.cs deleted file mode 100644 index bf45d0b79..000000000 --- a/Adyen/Model/BalancePlatform/BankIdentification.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BankIdentification - /// - [DataContract(Name = "BankIdentification")] - public partial class BankIdentification : IEquatable, IValidatableObject - { - /// - /// The type of the identification. Possible values: **iban**, **routingNumber**, **sortCode**. - /// - /// The type of the identification. Possible values: **iban**, **routingNumber**, **sortCode**. - [JsonConverter(typeof(StringEnumConverter))] - public enum IdentificationTypeEnum - { - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 1, - - /// - /// Enum RoutingNumber for value: routingNumber - /// - [EnumMember(Value = "routingNumber")] - RoutingNumber = 2, - - /// - /// Enum SortCode for value: sortCode - /// - [EnumMember(Value = "sortCode")] - SortCode = 3 - - } - - - /// - /// The type of the identification. Possible values: **iban**, **routingNumber**, **sortCode**. - /// - /// The type of the identification. Possible values: **iban**, **routingNumber**, **sortCode**. - [DataMember(Name = "identificationType", EmitDefaultValue = false)] - public IdentificationTypeEnum? IdentificationType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.. - /// The bank identification code.. - /// The type of the identification. Possible values: **iban**, **routingNumber**, **sortCode**.. - public BankIdentification(string country = default(string), string identification = default(string), IdentificationTypeEnum? identificationType = default(IdentificationTypeEnum?)) - { - this.Country = country; - this.Identification = identification; - this.IdentificationType = identificationType; - } - - /// - /// Two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - /// - /// Two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The bank identification code. - /// - /// The bank identification code. - [DataMember(Name = "identification", EmitDefaultValue = false)] - public string Identification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankIdentification {\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Identification: ").Append(Identification).Append("\n"); - sb.Append(" IdentificationType: ").Append(IdentificationType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankIdentification); - } - - /// - /// Returns true if BankIdentification instances are equal - /// - /// Instance of BankIdentification to be compared - /// Boolean - public bool Equals(BankIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Identification == input.Identification || - (this.Identification != null && - this.Identification.Equals(input.Identification)) - ) && - ( - this.IdentificationType == input.IdentificationType || - this.IdentificationType.Equals(input.IdentificationType) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Identification != null) - { - hashCode = (hashCode * 59) + this.Identification.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IdentificationType.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BrandVariantsRestriction.cs b/Adyen/Model/BalancePlatform/BrandVariantsRestriction.cs deleted file mode 100644 index 01c34fb15..000000000 --- a/Adyen/Model/BalancePlatform/BrandVariantsRestriction.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BrandVariantsRestriction - /// - [DataContract(Name = "BrandVariantsRestriction")] - public partial class BrandVariantsRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BrandVariantsRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// List of card brand variants. Possible values: - **mc**, **mccredit**, **mccommercialcredit_b2b**, **mcdebit**, **mcbusinessdebit**, **mcbusinessworlddebit**, **mcprepaid**, **mcmaestro** - **visa**, **visacredit**, **visadebit**, **visaprepaid**. You can specify a rule for a generic variant. For example, to create a rule for all Mastercard payment instruments, use **mc**. The rule is applied to all payment instruments under **mc**, such as **mcbusinessdebit** and **mcdebit**. . - public BrandVariantsRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// List of card brand variants. Possible values: - **mc**, **mccredit**, **mccommercialcredit_b2b**, **mcdebit**, **mcbusinessdebit**, **mcbusinessworlddebit**, **mcprepaid**, **mcmaestro** - **visa**, **visacredit**, **visadebit**, **visaprepaid**. You can specify a rule for a generic variant. For example, to create a rule for all Mastercard payment instruments, use **mc**. The rule is applied to all payment instruments under **mc**, such as **mcbusinessdebit** and **mcdebit**. - /// - /// List of card brand variants. Possible values: - **mc**, **mccredit**, **mccommercialcredit_b2b**, **mcdebit**, **mcbusinessdebit**, **mcbusinessworlddebit**, **mcprepaid**, **mcmaestro** - **visa**, **visacredit**, **visadebit**, **visaprepaid**. You can specify a rule for a generic variant. For example, to create a rule for all Mastercard payment instruments, use **mc**. The rule is applied to all payment instruments under **mc**, such as **mcbusinessdebit** and **mcdebit**. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BrandVariantsRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BrandVariantsRestriction); - } - - /// - /// Returns true if BrandVariantsRestriction instances are equal - /// - /// Instance of BrandVariantsRestriction to be compared - /// Boolean - public bool Equals(BrandVariantsRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/BulkAddress.cs b/Adyen/Model/BalancePlatform/BulkAddress.cs deleted file mode 100644 index 58c0b3397..000000000 --- a/Adyen/Model/BalancePlatform/BulkAddress.cs +++ /dev/null @@ -1,286 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// BulkAddress - /// - [DataContract(Name = "BulkAddress")] - public partial class BulkAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BulkAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city.. - /// The name of the company.. - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. (required). - /// The email address.. - /// The house number or name.. - /// The full telephone number.. - /// The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries.. - /// The two-letter ISO 3166-2 state or province code. Maximum length: 2 characters for addresses in the US.. - /// The streetname of the house.. - public BulkAddress(string city = default(string), string company = default(string), string country = default(string), string email = default(string), string houseNumberOrName = default(string), string mobile = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.Country = country; - this.City = city; - this.Company = company; - this.Email = email; - this.HouseNumberOrName = houseNumberOrName; - this.Mobile = mobile; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - this.Street = street; - } - - /// - /// The name of the city. - /// - /// The name of the city. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The name of the company. - /// - /// The name of the company. - [DataMember(Name = "company", EmitDefaultValue = false)] - public string Company { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The email address. - /// - /// The email address. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The house number or name. - /// - /// The house number or name. - [DataMember(Name = "houseNumberOrName", EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// The full telephone number. - /// - /// The full telephone number. - [DataMember(Name = "mobile", EmitDefaultValue = false)] - public string Mobile { get; set; } - - /// - /// The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. - /// - /// The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-letter ISO 3166-2 state or province code. Maximum length: 2 characters for addresses in the US. - /// - /// The two-letter ISO 3166-2 state or province code. Maximum length: 2 characters for addresses in the US. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The streetname of the house. - /// - /// The streetname of the house. - [DataMember(Name = "street", EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BulkAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" Mobile: ").Append(Mobile).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BulkAddress); - } - - /// - /// Returns true if BulkAddress instances are equal - /// - /// Instance of BulkAddress to be compared - /// Boolean - public bool Equals(BulkAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.Mobile == input.Mobile || - (this.Mobile != null && - this.Mobile.Equals(input.Mobile)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.Mobile != null) - { - hashCode = (hashCode * 59) + this.Mobile.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CALocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/CALocalAccountIdentification.cs deleted file mode 100644 index 706a50142..000000000 --- a/Adyen/Model/BalancePlatform/CALocalAccountIdentification.cs +++ /dev/null @@ -1,274 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CALocalAccountIdentification - /// - [DataContract(Name = "CALocalAccountIdentification")] - public partial class CALocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 1, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 2 - - } - - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// **caLocal** - /// - /// **caLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum CaLocal for value: caLocal - /// - [EnumMember(Value = "caLocal")] - CaLocal = 1 - - } - - - /// - /// **caLocal** - /// - /// **caLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CALocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. (required). - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The 3-digit institution number, without separators or whitespace. (required). - /// The 5-digit transit number, without separators or whitespace. (required). - /// **caLocal** (required) (default to TypeEnum.CaLocal). - public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) - { - this.AccountNumber = accountNumber; - this.InstitutionNumber = institutionNumber; - this.TransitNumber = transitNumber; - this.Type = type; - this.AccountType = accountType; - } - - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit institution number, without separators or whitespace. - /// - /// The 3-digit institution number, without separators or whitespace. - [DataMember(Name = "institutionNumber", IsRequired = false, EmitDefaultValue = false)] - public string InstitutionNumber { get; set; } - - /// - /// The 5-digit transit number, without separators or whitespace. - /// - /// The 5-digit transit number, without separators or whitespace. - [DataMember(Name = "transitNumber", IsRequired = false, EmitDefaultValue = false)] - public string TransitNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CALocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" InstitutionNumber: ").Append(InstitutionNumber).Append("\n"); - sb.Append(" TransitNumber: ").Append(TransitNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CALocalAccountIdentification); - } - - /// - /// Returns true if CALocalAccountIdentification instances are equal - /// - /// Instance of CALocalAccountIdentification to be compared - /// Boolean - public bool Equals(CALocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.InstitutionNumber == input.InstitutionNumber || - (this.InstitutionNumber != null && - this.InstitutionNumber.Equals(input.InstitutionNumber)) - ) && - ( - this.TransitNumber == input.TransitNumber || - (this.TransitNumber != null && - this.TransitNumber.Equals(input.TransitNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.InstitutionNumber != null) - { - hashCode = (hashCode * 59) + this.InstitutionNumber.GetHashCode(); - } - if (this.TransitNumber != null) - { - hashCode = (hashCode * 59) + this.TransitNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 12.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 5.", new [] { "AccountNumber" }); - } - - // InstitutionNumber (string) maxLength - if (this.InstitutionNumber != null && this.InstitutionNumber.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstitutionNumber, length must be less than 3.", new [] { "InstitutionNumber" }); - } - - // InstitutionNumber (string) minLength - if (this.InstitutionNumber != null && this.InstitutionNumber.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstitutionNumber, length must be greater than 3.", new [] { "InstitutionNumber" }); - } - - // TransitNumber (string) maxLength - if (this.TransitNumber != null && this.TransitNumber.Length > 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransitNumber, length must be less than 5.", new [] { "TransitNumber" }); - } - - // TransitNumber (string) minLength - if (this.TransitNumber != null && this.TransitNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransitNumber, length must be greater than 5.", new [] { "TransitNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.cs deleted file mode 100644 index 61a40a2c7..000000000 --- a/Adyen/Model/BalancePlatform/CZLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CZLocalAccountIdentification - /// - [DataContract(Name = "CZLocalAccountIdentification")] - public partial class CZLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **czLocal** - /// - /// **czLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum CzLocal for value: czLocal - /// - [EnumMember(Value = "czLocal")] - CzLocal = 1 - - } - - - /// - /// **czLocal** - /// - /// **czLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CZLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) (required). - /// The 4-digit bank code (Kód banky), without separators or whitespace. (required). - /// **czLocal** (required) (default to TypeEnum.CzLocal). - public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.CzLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.Type = type; - } - - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4-digit bank code (Kód banky), without separators or whitespace. - /// - /// The 4-digit bank code (Kód banky), without separators or whitespace. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CZLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CZLocalAccountIdentification); - } - - /// - /// Returns true if CZLocalAccountIdentification instances are equal - /// - /// Instance of CZLocalAccountIdentification to be compared - /// Boolean - public bool Equals(CZLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 17) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 17.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 2.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 4.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 4.", new [] { "BankCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CapabilityProblem.cs b/Adyen/Model/BalancePlatform/CapabilityProblem.cs deleted file mode 100644 index 2ba190895..000000000 --- a/Adyen/Model/BalancePlatform/CapabilityProblem.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CapabilityProblem - /// - [DataContract(Name = "CapabilityProblem")] - public partial class CapabilityProblem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// entity. - /// Contains information about the verification error.. - public CapabilityProblem(CapabilityProblemEntity entity = default(CapabilityProblemEntity), List verificationErrors = default(List)) - { - this.Entity = entity; - this.VerificationErrors = verificationErrors; - } - - /// - /// Gets or Sets Entity - /// - [DataMember(Name = "entity", EmitDefaultValue = false)] - public CapabilityProblemEntity Entity { get; set; } - - /// - /// Contains information about the verification error. - /// - /// Contains information about the verification error. - [DataMember(Name = "verificationErrors", EmitDefaultValue = false)] - public List VerificationErrors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblem {\n"); - sb.Append(" Entity: ").Append(Entity).Append("\n"); - sb.Append(" VerificationErrors: ").Append(VerificationErrors).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblem); - } - - /// - /// Returns true if CapabilityProblem instances are equal - /// - /// Instance of CapabilityProblem to be compared - /// Boolean - public bool Equals(CapabilityProblem input) - { - if (input == null) - { - return false; - } - return - ( - this.Entity == input.Entity || - (this.Entity != null && - this.Entity.Equals(input.Entity)) - ) && - ( - this.VerificationErrors == input.VerificationErrors || - this.VerificationErrors != null && - input.VerificationErrors != null && - this.VerificationErrors.SequenceEqual(input.VerificationErrors) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Entity != null) - { - hashCode = (hashCode * 59) + this.Entity.GetHashCode(); - } - if (this.VerificationErrors != null) - { - hashCode = (hashCode * 59) + this.VerificationErrors.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CapabilityProblemEntity.cs b/Adyen/Model/BalancePlatform/CapabilityProblemEntity.cs deleted file mode 100644 index ddf039dba..000000000 --- a/Adyen/Model/BalancePlatform/CapabilityProblemEntity.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CapabilityProblemEntity - /// - [DataContract(Name = "CapabilityProblemEntity")] - public partial class CapabilityProblemEntity : IEquatable, IValidatableObject - { - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Document for value: Document - /// - [EnumMember(Value = "Document")] - Document = 2, - - /// - /// Enum LegalEntity for value: LegalEntity - /// - [EnumMember(Value = "LegalEntity")] - LegalEntity = 3 - - } - - - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to.. - /// The ID of the entity.. - /// owner. - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**.. - public CapabilityProblemEntity(List documents = default(List), string id = default(string), CapabilityProblemEntityRecursive owner = default(CapabilityProblemEntityRecursive), TypeEnum? type = default(TypeEnum?)) - { - this.Documents = documents; - this.Id = id; - this.Owner = owner; - this.Type = type; - } - - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - [DataMember(Name = "documents", EmitDefaultValue = false)] - public List Documents { get; set; } - - /// - /// The ID of the entity. - /// - /// The ID of the entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Owner - /// - [DataMember(Name = "owner", EmitDefaultValue = false)] - public CapabilityProblemEntityRecursive Owner { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblemEntity {\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblemEntity); - } - - /// - /// Returns true if CapabilityProblemEntity instances are equal - /// - /// Instance of CapabilityProblemEntity to be compared - /// Boolean - public bool Equals(CapabilityProblemEntity input) - { - if (input == null) - { - return false; - } - return - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Owner != null) - { - hashCode = (hashCode * 59) + this.Owner.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.cs b/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.cs deleted file mode 100644 index 7a59f9c1c..000000000 --- a/Adyen/Model/BalancePlatform/CapabilityProblemEntityRecursive.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CapabilityProblemEntityRecursive - /// - [DataContract(Name = "CapabilityProblemEntity-recursive")] - public partial class CapabilityProblemEntityRecursive : IEquatable, IValidatableObject - { - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Document for value: Document - /// - [EnumMember(Value = "Document")] - Document = 2, - - /// - /// Enum LegalEntity for value: LegalEntity - /// - [EnumMember(Value = "LegalEntity")] - LegalEntity = 3 - - } - - - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to.. - /// The ID of the entity.. - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**.. - public CapabilityProblemEntityRecursive(List documents = default(List), string id = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Documents = documents; - this.Id = id; - this.Type = type; - } - - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - [DataMember(Name = "documents", EmitDefaultValue = false)] - public List Documents { get; set; } - - /// - /// The ID of the entity. - /// - /// The ID of the entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblemEntityRecursive {\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblemEntityRecursive); - } - - /// - /// Returns true if CapabilityProblemEntityRecursive instances are equal - /// - /// Instance of CapabilityProblemEntityRecursive to be compared - /// Boolean - public bool Equals(CapabilityProblemEntityRecursive input) - { - if (input == null) - { - return false; - } - return - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CapabilitySettings.cs b/Adyen/Model/BalancePlatform/CapabilitySettings.cs deleted file mode 100644 index 77efa2e09..000000000 --- a/Adyen/Model/BalancePlatform/CapabilitySettings.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CapabilitySettings - /// - [DataContract(Name = "CapabilitySettings")] - public partial class CapabilitySettings : IEquatable, IValidatableObject - { - /// - /// Defines FundingSource - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2, - - /// - /// Enum Prepaid for value: prepaid - /// - [EnumMember(Value = "prepaid")] - Prepaid = 3 - - } - - - - /// - /// Gets or Sets FundingSource - /// - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public List FundingSource { get; set; } - /// - /// Defines Interval - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum IntervalEnum - { - /// - /// Enum Daily for value: daily - /// - [EnumMember(Value = "daily")] - Daily = 1, - - /// - /// Enum Monthly for value: monthly - /// - [EnumMember(Value = "monthly")] - Monthly = 2, - - /// - /// Enum Weekly for value: weekly - /// - [EnumMember(Value = "weekly")] - Weekly = 3 - - } - - - /// - /// Gets or Sets Interval - /// - [DataMember(Name = "interval", EmitDefaultValue = false)] - public IntervalEnum? Interval { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amountPerIndustry. - /// authorizedCardUsers. - /// fundingSource. - /// interval. - /// maxAmount. - public CapabilitySettings(Dictionary amountPerIndustry = default(Dictionary), bool? authorizedCardUsers = default(bool?), List fundingSource = default(List), IntervalEnum? interval = default(IntervalEnum?), Amount maxAmount = default(Amount)) - { - this.AmountPerIndustry = amountPerIndustry; - this.AuthorizedCardUsers = authorizedCardUsers; - this.FundingSource = fundingSource; - this.Interval = interval; - this.MaxAmount = maxAmount; - } - - /// - /// Gets or Sets AmountPerIndustry - /// - [DataMember(Name = "amountPerIndustry", EmitDefaultValue = false)] - public Dictionary AmountPerIndustry { get; set; } - - /// - /// Gets or Sets AuthorizedCardUsers - /// - [DataMember(Name = "authorizedCardUsers", EmitDefaultValue = false)] - public bool? AuthorizedCardUsers { get; set; } - - /// - /// Gets or Sets MaxAmount - /// - [DataMember(Name = "maxAmount", EmitDefaultValue = false)] - public Amount MaxAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilitySettings {\n"); - sb.Append(" AmountPerIndustry: ").Append(AmountPerIndustry).Append("\n"); - sb.Append(" AuthorizedCardUsers: ").Append(AuthorizedCardUsers).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" Interval: ").Append(Interval).Append("\n"); - sb.Append(" MaxAmount: ").Append(MaxAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilitySettings); - } - - /// - /// Returns true if CapabilitySettings instances are equal - /// - /// Instance of CapabilitySettings to be compared - /// Boolean - public bool Equals(CapabilitySettings input) - { - if (input == null) - { - return false; - } - return - ( - this.AmountPerIndustry == input.AmountPerIndustry || - this.AmountPerIndustry != null && - input.AmountPerIndustry != null && - this.AmountPerIndustry.SequenceEqual(input.AmountPerIndustry) - ) && - ( - this.AuthorizedCardUsers == input.AuthorizedCardUsers || - this.AuthorizedCardUsers.Equals(input.AuthorizedCardUsers) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.SequenceEqual(input.FundingSource) - ) && - ( - this.Interval == input.Interval || - this.Interval.Equals(input.Interval) - ) && - ( - this.MaxAmount == input.MaxAmount || - (this.MaxAmount != null && - this.MaxAmount.Equals(input.MaxAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AmountPerIndustry != null) - { - hashCode = (hashCode * 59) + this.AmountPerIndustry.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AuthorizedCardUsers.GetHashCode(); - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - hashCode = (hashCode * 59) + this.Interval.GetHashCode(); - if (this.MaxAmount != null) - { - hashCode = (hashCode * 59) + this.MaxAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CapitalBalance.cs b/Adyen/Model/BalancePlatform/CapitalBalance.cs deleted file mode 100644 index b5239439d..000000000 --- a/Adyen/Model/BalancePlatform/CapitalBalance.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CapitalBalance - /// - [DataContract(Name = "CapitalBalance")] - public partial class CapitalBalance : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CapitalBalance() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). (required). - /// Fee amount. (required). - /// Principal amount. (required). - /// Total amount. A sum of principal amount and fee amount. (required). - public CapitalBalance(string currency = default(string), long? fee = default(long?), long? principal = default(long?), long? total = default(long?)) - { - this.Currency = currency; - this.Fee = fee; - this.Principal = principal; - this.Total = total; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// Fee amount. - /// - /// Fee amount. - [DataMember(Name = "fee", IsRequired = false, EmitDefaultValue = false)] - public long? Fee { get; set; } - - /// - /// Principal amount. - /// - /// Principal amount. - [DataMember(Name = "principal", IsRequired = false, EmitDefaultValue = false)] - public long? Principal { get; set; } - - /// - /// Total amount. A sum of principal amount and fee amount. - /// - /// Total amount. A sum of principal amount and fee amount. - [DataMember(Name = "total", IsRequired = false, EmitDefaultValue = false)] - public long? Total { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapitalBalance {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Fee: ").Append(Fee).Append("\n"); - sb.Append(" Principal: ").Append(Principal).Append("\n"); - sb.Append(" Total: ").Append(Total).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapitalBalance); - } - - /// - /// Returns true if CapitalBalance instances are equal - /// - /// Instance of CapitalBalance to be compared - /// Boolean - public bool Equals(CapitalBalance input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Fee == input.Fee || - this.Fee.Equals(input.Fee) - ) && - ( - this.Principal == input.Principal || - this.Principal.Equals(input.Principal) - ) && - ( - this.Total == input.Total || - this.Total.Equals(input.Total) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Fee.GetHashCode(); - hashCode = (hashCode * 59) + this.Principal.GetHashCode(); - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CapitalGrantAccount.cs b/Adyen/Model/BalancePlatform/CapitalGrantAccount.cs deleted file mode 100644 index 788172ba2..000000000 --- a/Adyen/Model/BalancePlatform/CapitalGrantAccount.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CapitalGrantAccount - /// - [DataContract(Name = "CapitalGrantAccount")] - public partial class CapitalGrantAccount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The balances of the grant account.. - /// The unique identifier of the balance account used to fund the grant.. - /// The identifier of the grant account.. - /// The limits of the grant account.. - public CapitalGrantAccount(List balances = default(List), string fundingBalanceAccountId = default(string), string id = default(string), List limits = default(List)) - { - this.Balances = balances; - this.FundingBalanceAccountId = fundingBalanceAccountId; - this.Id = id; - this.Limits = limits; - } - - /// - /// The balances of the grant account. - /// - /// The balances of the grant account. - [DataMember(Name = "balances", EmitDefaultValue = false)] - public List Balances { get; set; } - - /// - /// The unique identifier of the balance account used to fund the grant. - /// - /// The unique identifier of the balance account used to fund the grant. - [DataMember(Name = "fundingBalanceAccountId", EmitDefaultValue = false)] - public string FundingBalanceAccountId { get; set; } - - /// - /// The identifier of the grant account. - /// - /// The identifier of the grant account. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The limits of the grant account. - /// - /// The limits of the grant account. - [DataMember(Name = "limits", EmitDefaultValue = false)] - public List Limits { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapitalGrantAccount {\n"); - sb.Append(" Balances: ").Append(Balances).Append("\n"); - sb.Append(" FundingBalanceAccountId: ").Append(FundingBalanceAccountId).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Limits: ").Append(Limits).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapitalGrantAccount); - } - - /// - /// Returns true if CapitalGrantAccount instances are equal - /// - /// Instance of CapitalGrantAccount to be compared - /// Boolean - public bool Equals(CapitalGrantAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.Balances == input.Balances || - this.Balances != null && - input.Balances != null && - this.Balances.SequenceEqual(input.Balances) - ) && - ( - this.FundingBalanceAccountId == input.FundingBalanceAccountId || - (this.FundingBalanceAccountId != null && - this.FundingBalanceAccountId.Equals(input.FundingBalanceAccountId)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Limits == input.Limits || - this.Limits != null && - input.Limits != null && - this.Limits.SequenceEqual(input.Limits) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Balances != null) - { - hashCode = (hashCode * 59) + this.Balances.GetHashCode(); - } - if (this.FundingBalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.FundingBalanceAccountId.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Limits != null) - { - hashCode = (hashCode * 59) + this.Limits.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Card.cs b/Adyen/Model/BalancePlatform/Card.cs deleted file mode 100644 index e0822dd4c..000000000 --- a/Adyen/Model/BalancePlatform/Card.cs +++ /dev/null @@ -1,385 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Card - /// - [DataContract(Name = "Card")] - public partial class Card : IEquatable, IValidatableObject - { - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FormFactorEnum - { - /// - /// Enum Physical for value: physical - /// - [EnumMember(Value = "physical")] - Physical = 1, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 2, - - /// - /// Enum Virtual for value: virtual - /// - [EnumMember(Value = "virtual")] - Virtual = 3 - - } - - - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - [DataMember(Name = "formFactor", IsRequired = false, EmitDefaultValue = false)] - public FormFactorEnum FormFactor { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Card() { } - /// - /// Initializes a new instance of the class. - /// - /// authentication. - /// The bank identification number (BIN) of the card number.. - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. (required). - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. (required). - /// The name of the cardholder. Maximum length: 26 characters. (required). - /// configuration. - /// The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards.. - /// deliveryContact. - /// expiration. - /// The form factor of the card. Possible values: **virtual**, **physical**. (required). - /// Last last four digits of the card number.. - /// Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration.. - public Card(Authentication authentication = default(Authentication), string bin = default(string), string brand = default(string), string brandVariant = default(string), string cardholderName = default(string), CardConfiguration configuration = default(CardConfiguration), string cvc = default(string), DeliveryContact deliveryContact = default(DeliveryContact), Expiry expiration = default(Expiry), FormFactorEnum formFactor = default(FormFactorEnum), string lastFour = default(string), string threeDSecure = default(string)) - { - this.Brand = brand; - this.BrandVariant = brandVariant; - this.CardholderName = cardholderName; - this.FormFactor = formFactor; - this.Authentication = authentication; - this.Bin = bin; - this._Configuration = configuration; - this.Cvc = cvc; - this.DeliveryContact = deliveryContact; - this.Expiration = expiration; - this.LastFour = lastFour; - this.ThreeDSecure = threeDSecure; - } - - /// - /// Gets or Sets Authentication - /// - [DataMember(Name = "authentication", EmitDefaultValue = false)] - public Authentication Authentication { get; set; } - - /// - /// The bank identification number (BIN) of the card number. - /// - /// The bank identification number (BIN) of the card number. - [DataMember(Name = "bin", EmitDefaultValue = false)] - public string Bin { get; set; } - - /// - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. - /// - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. - [DataMember(Name = "brand", IsRequired = false, EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. - /// - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. - [DataMember(Name = "brandVariant", IsRequired = false, EmitDefaultValue = false)] - public string BrandVariant { get; set; } - - /// - /// The name of the cardholder. Maximum length: 26 characters. - /// - /// The name of the cardholder. Maximum length: 26 characters. - [DataMember(Name = "cardholderName", IsRequired = false, EmitDefaultValue = false)] - public string CardholderName { get; set; } - - /// - /// Gets or Sets _Configuration - /// - [DataMember(Name = "configuration", EmitDefaultValue = false)] - public CardConfiguration _Configuration { get; set; } - - /// - /// The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards. - /// - /// The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards. - [DataMember(Name = "cvc", EmitDefaultValue = false)] - public string Cvc { get; set; } - - /// - /// Gets or Sets DeliveryContact - /// - [DataMember(Name = "deliveryContact", EmitDefaultValue = false)] - public DeliveryContact DeliveryContact { get; set; } - - /// - /// Gets or Sets Expiration - /// - [DataMember(Name = "expiration", EmitDefaultValue = false)] - public Expiry Expiration { get; set; } - - /// - /// Last last four digits of the card number. - /// - /// Last last four digits of the card number. - [DataMember(Name = "lastFour", EmitDefaultValue = false)] - public string LastFour { get; set; } - - /// - /// The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. - /// - /// The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. - [DataMember(Name = "number", IsRequired = false, EmitDefaultValue = false)] - public string Number { get; private set; } - - /// - /// Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. - /// - /// Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. - [DataMember(Name = "threeDSecure", EmitDefaultValue = false)] - public string ThreeDSecure { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Card {\n"); - sb.Append(" Authentication: ").Append(Authentication).Append("\n"); - sb.Append(" Bin: ").Append(Bin).Append("\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" BrandVariant: ").Append(BrandVariant).Append("\n"); - sb.Append(" CardholderName: ").Append(CardholderName).Append("\n"); - sb.Append(" _Configuration: ").Append(_Configuration).Append("\n"); - sb.Append(" Cvc: ").Append(Cvc).Append("\n"); - sb.Append(" DeliveryContact: ").Append(DeliveryContact).Append("\n"); - sb.Append(" Expiration: ").Append(Expiration).Append("\n"); - sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); - sb.Append(" LastFour: ").Append(LastFour).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" ThreeDSecure: ").Append(ThreeDSecure).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Card); - } - - /// - /// Returns true if Card instances are equal - /// - /// Instance of Card to be compared - /// Boolean - public bool Equals(Card input) - { - if (input == null) - { - return false; - } - return - ( - this.Authentication == input.Authentication || - (this.Authentication != null && - this.Authentication.Equals(input.Authentication)) - ) && - ( - this.Bin == input.Bin || - (this.Bin != null && - this.Bin.Equals(input.Bin)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.BrandVariant == input.BrandVariant || - (this.BrandVariant != null && - this.BrandVariant.Equals(input.BrandVariant)) - ) && - ( - this.CardholderName == input.CardholderName || - (this.CardholderName != null && - this.CardholderName.Equals(input.CardholderName)) - ) && - ( - this._Configuration == input._Configuration || - (this._Configuration != null && - this._Configuration.Equals(input._Configuration)) - ) && - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.DeliveryContact == input.DeliveryContact || - (this.DeliveryContact != null && - this.DeliveryContact.Equals(input.DeliveryContact)) - ) && - ( - this.Expiration == input.Expiration || - (this.Expiration != null && - this.Expiration.Equals(input.Expiration)) - ) && - ( - this.FormFactor == input.FormFactor || - this.FormFactor.Equals(input.FormFactor) - ) && - ( - this.LastFour == input.LastFour || - (this.LastFour != null && - this.LastFour.Equals(input.LastFour)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.ThreeDSecure == input.ThreeDSecure || - (this.ThreeDSecure != null && - this.ThreeDSecure.Equals(input.ThreeDSecure)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Authentication != null) - { - hashCode = (hashCode * 59) + this.Authentication.GetHashCode(); - } - if (this.Bin != null) - { - hashCode = (hashCode * 59) + this.Bin.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.BrandVariant != null) - { - hashCode = (hashCode * 59) + this.BrandVariant.GetHashCode(); - } - if (this.CardholderName != null) - { - hashCode = (hashCode * 59) + this.CardholderName.GetHashCode(); - } - if (this._Configuration != null) - { - hashCode = (hashCode * 59) + this._Configuration.GetHashCode(); - } - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.DeliveryContact != null) - { - hashCode = (hashCode * 59) + this.DeliveryContact.GetHashCode(); - } - if (this.Expiration != null) - { - hashCode = (hashCode * 59) + this.Expiration.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); - if (this.LastFour != null) - { - hashCode = (hashCode * 59) + this.LastFour.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.ThreeDSecure != null) - { - hashCode = (hashCode * 59) + this.ThreeDSecure.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CardholderName (string) maxLength - if (this.CardholderName != null && this.CardholderName.Length > 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CardholderName, length must be less than 26.", new [] { "CardholderName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CardConfiguration.cs b/Adyen/Model/BalancePlatform/CardConfiguration.cs deleted file mode 100644 index a4eb4f368..000000000 --- a/Adyen/Model/BalancePlatform/CardConfiguration.cs +++ /dev/null @@ -1,386 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CardConfiguration - /// - [DataContract(Name = "CardConfiguration")] - public partial class CardConfiguration : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CardConfiguration() { } - /// - /// Initializes a new instance of the class. - /// - /// Overrides the activation label design ID defined in the `configurationProfileId`. The activation label is attached to the card and contains the activation instructions.. - /// Your app's URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters.. - /// bulkAddress. - /// The ID of the card image. This is the image that will be printed on the full front of the card.. - /// Overrides the carrier design ID defined in the `configurationProfileId`. The carrier is the letter or packaging to which the card is attached.. - /// The ID of the carrier image. This is the image that will printed on the letter to which the card is attached.. - /// The ID of the card configuration profile that contains the settings of the card. For example, the envelope and PIN mailer designs or the logistics company handling the shipment. All the settings in the profile are applied to the card, unless you provide other fields to override them. For example, send the `shipmentMethod` to override the logistics company defined in the card configuration profile. (required). - /// The three-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the card. For example, **EUR**.. - /// Overrides the envelope design ID defined in the `configurationProfileId`. . - /// Overrides the insert design ID defined in the `configurationProfileId`. An insert is any additional material, such as marketing materials, that are shipped together with the card.. - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code of the card. For example, **en**.. - /// The ID of the logo image. This is the image that will be printed on the partial front of the card, such as a logo on the upper right corner.. - /// Overrides the PIN mailer design ID defined in the `configurationProfileId`. The PIN mailer is the letter on which the PIN is printed.. - /// Overrides the logistics company defined in the `configurationProfileId`.. - public CardConfiguration(string activation = default(string), string activationUrl = default(string), BulkAddress bulkAddress = default(BulkAddress), string cardImageId = default(string), string carrier = default(string), string carrierImageId = default(string), string configurationProfileId = default(string), string currency = default(string), string envelope = default(string), string insert = default(string), string language = default(string), string logoImageId = default(string), string pinMailer = default(string), string shipmentMethod = default(string)) - { - this.ConfigurationProfileId = configurationProfileId; - this.Activation = activation; - this.ActivationUrl = activationUrl; - this.BulkAddress = bulkAddress; - this.CardImageId = cardImageId; - this.Carrier = carrier; - this.CarrierImageId = carrierImageId; - this.Currency = currency; - this.Envelope = envelope; - this.Insert = insert; - this.Language = language; - this.LogoImageId = logoImageId; - this.PinMailer = pinMailer; - this.ShipmentMethod = shipmentMethod; - } - - /// - /// Overrides the activation label design ID defined in the `configurationProfileId`. The activation label is attached to the card and contains the activation instructions. - /// - /// Overrides the activation label design ID defined in the `configurationProfileId`. The activation label is attached to the card and contains the activation instructions. - [DataMember(Name = "activation", EmitDefaultValue = false)] - public string Activation { get; set; } - - /// - /// Your app's URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters. - /// - /// Your app's URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters. - [DataMember(Name = "activationUrl", EmitDefaultValue = false)] - public string ActivationUrl { get; set; } - - /// - /// Gets or Sets BulkAddress - /// - [DataMember(Name = "bulkAddress", EmitDefaultValue = false)] - public BulkAddress BulkAddress { get; set; } - - /// - /// The ID of the card image. This is the image that will be printed on the full front of the card. - /// - /// The ID of the card image. This is the image that will be printed on the full front of the card. - [DataMember(Name = "cardImageId", EmitDefaultValue = false)] - public string CardImageId { get; set; } - - /// - /// Overrides the carrier design ID defined in the `configurationProfileId`. The carrier is the letter or packaging to which the card is attached. - /// - /// Overrides the carrier design ID defined in the `configurationProfileId`. The carrier is the letter or packaging to which the card is attached. - [DataMember(Name = "carrier", EmitDefaultValue = false)] - public string Carrier { get; set; } - - /// - /// The ID of the carrier image. This is the image that will printed on the letter to which the card is attached. - /// - /// The ID of the carrier image. This is the image that will printed on the letter to which the card is attached. - [DataMember(Name = "carrierImageId", EmitDefaultValue = false)] - public string CarrierImageId { get; set; } - - /// - /// The ID of the card configuration profile that contains the settings of the card. For example, the envelope and PIN mailer designs or the logistics company handling the shipment. All the settings in the profile are applied to the card, unless you provide other fields to override them. For example, send the `shipmentMethod` to override the logistics company defined in the card configuration profile. - /// - /// The ID of the card configuration profile that contains the settings of the card. For example, the envelope and PIN mailer designs or the logistics company handling the shipment. All the settings in the profile are applied to the card, unless you provide other fields to override them. For example, send the `shipmentMethod` to override the logistics company defined in the card configuration profile. - [DataMember(Name = "configurationProfileId", IsRequired = false, EmitDefaultValue = false)] - public string ConfigurationProfileId { get; set; } - - /// - /// The three-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the card. For example, **EUR**. - /// - /// The three-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the card. For example, **EUR**. - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// Overrides the envelope design ID defined in the `configurationProfileId`. - /// - /// Overrides the envelope design ID defined in the `configurationProfileId`. - [DataMember(Name = "envelope", EmitDefaultValue = false)] - public string Envelope { get; set; } - - /// - /// Overrides the insert design ID defined in the `configurationProfileId`. An insert is any additional material, such as marketing materials, that are shipped together with the card. - /// - /// Overrides the insert design ID defined in the `configurationProfileId`. An insert is any additional material, such as marketing materials, that are shipped together with the card. - [DataMember(Name = "insert", EmitDefaultValue = false)] - public string Insert { get; set; } - - /// - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code of the card. For example, **en**. - /// - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code of the card. For example, **en**. - [DataMember(Name = "language", EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// The ID of the logo image. This is the image that will be printed on the partial front of the card, such as a logo on the upper right corner. - /// - /// The ID of the logo image. This is the image that will be printed on the partial front of the card, such as a logo on the upper right corner. - [DataMember(Name = "logoImageId", EmitDefaultValue = false)] - public string LogoImageId { get; set; } - - /// - /// Overrides the PIN mailer design ID defined in the `configurationProfileId`. The PIN mailer is the letter on which the PIN is printed. - /// - /// Overrides the PIN mailer design ID defined in the `configurationProfileId`. The PIN mailer is the letter on which the PIN is printed. - [DataMember(Name = "pinMailer", EmitDefaultValue = false)] - public string PinMailer { get; set; } - - /// - /// Overrides the logistics company defined in the `configurationProfileId`. - /// - /// Overrides the logistics company defined in the `configurationProfileId`. - [DataMember(Name = "shipmentMethod", EmitDefaultValue = false)] - public string ShipmentMethod { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardConfiguration {\n"); - sb.Append(" Activation: ").Append(Activation).Append("\n"); - sb.Append(" ActivationUrl: ").Append(ActivationUrl).Append("\n"); - sb.Append(" BulkAddress: ").Append(BulkAddress).Append("\n"); - sb.Append(" CardImageId: ").Append(CardImageId).Append("\n"); - sb.Append(" Carrier: ").Append(Carrier).Append("\n"); - sb.Append(" CarrierImageId: ").Append(CarrierImageId).Append("\n"); - sb.Append(" ConfigurationProfileId: ").Append(ConfigurationProfileId).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Envelope: ").Append(Envelope).Append("\n"); - sb.Append(" Insert: ").Append(Insert).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" LogoImageId: ").Append(LogoImageId).Append("\n"); - sb.Append(" PinMailer: ").Append(PinMailer).Append("\n"); - sb.Append(" ShipmentMethod: ").Append(ShipmentMethod).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardConfiguration); - } - - /// - /// Returns true if CardConfiguration instances are equal - /// - /// Instance of CardConfiguration to be compared - /// Boolean - public bool Equals(CardConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.Activation == input.Activation || - (this.Activation != null && - this.Activation.Equals(input.Activation)) - ) && - ( - this.ActivationUrl == input.ActivationUrl || - (this.ActivationUrl != null && - this.ActivationUrl.Equals(input.ActivationUrl)) - ) && - ( - this.BulkAddress == input.BulkAddress || - (this.BulkAddress != null && - this.BulkAddress.Equals(input.BulkAddress)) - ) && - ( - this.CardImageId == input.CardImageId || - (this.CardImageId != null && - this.CardImageId.Equals(input.CardImageId)) - ) && - ( - this.Carrier == input.Carrier || - (this.Carrier != null && - this.Carrier.Equals(input.Carrier)) - ) && - ( - this.CarrierImageId == input.CarrierImageId || - (this.CarrierImageId != null && - this.CarrierImageId.Equals(input.CarrierImageId)) - ) && - ( - this.ConfigurationProfileId == input.ConfigurationProfileId || - (this.ConfigurationProfileId != null && - this.ConfigurationProfileId.Equals(input.ConfigurationProfileId)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Envelope == input.Envelope || - (this.Envelope != null && - this.Envelope.Equals(input.Envelope)) - ) && - ( - this.Insert == input.Insert || - (this.Insert != null && - this.Insert.Equals(input.Insert)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.LogoImageId == input.LogoImageId || - (this.LogoImageId != null && - this.LogoImageId.Equals(input.LogoImageId)) - ) && - ( - this.PinMailer == input.PinMailer || - (this.PinMailer != null && - this.PinMailer.Equals(input.PinMailer)) - ) && - ( - this.ShipmentMethod == input.ShipmentMethod || - (this.ShipmentMethod != null && - this.ShipmentMethod.Equals(input.ShipmentMethod)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Activation != null) - { - hashCode = (hashCode * 59) + this.Activation.GetHashCode(); - } - if (this.ActivationUrl != null) - { - hashCode = (hashCode * 59) + this.ActivationUrl.GetHashCode(); - } - if (this.BulkAddress != null) - { - hashCode = (hashCode * 59) + this.BulkAddress.GetHashCode(); - } - if (this.CardImageId != null) - { - hashCode = (hashCode * 59) + this.CardImageId.GetHashCode(); - } - if (this.Carrier != null) - { - hashCode = (hashCode * 59) + this.Carrier.GetHashCode(); - } - if (this.CarrierImageId != null) - { - hashCode = (hashCode * 59) + this.CarrierImageId.GetHashCode(); - } - if (this.ConfigurationProfileId != null) - { - hashCode = (hashCode * 59) + this.ConfigurationProfileId.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Envelope != null) - { - hashCode = (hashCode * 59) + this.Envelope.GetHashCode(); - } - if (this.Insert != null) - { - hashCode = (hashCode * 59) + this.Insert.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.LogoImageId != null) - { - hashCode = (hashCode * 59) + this.LogoImageId.GetHashCode(); - } - if (this.PinMailer != null) - { - hashCode = (hashCode * 59) + this.PinMailer.GetHashCode(); - } - if (this.ShipmentMethod != null) - { - hashCode = (hashCode * 59) + this.ShipmentMethod.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ActivationUrl (string) maxLength - if (this.ActivationUrl != null && this.ActivationUrl.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ActivationUrl, length must be less than 255.", new [] { "ActivationUrl" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CardInfo.cs b/Adyen/Model/BalancePlatform/CardInfo.cs deleted file mode 100644 index 603cf0245..000000000 --- a/Adyen/Model/BalancePlatform/CardInfo.cs +++ /dev/null @@ -1,293 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CardInfo - /// - [DataContract(Name = "CardInfo")] - public partial class CardInfo : IEquatable, IValidatableObject - { - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FormFactorEnum - { - /// - /// Enum Physical for value: physical - /// - [EnumMember(Value = "physical")] - Physical = 1, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 2, - - /// - /// Enum Virtual for value: virtual - /// - [EnumMember(Value = "virtual")] - Virtual = 3 - - } - - - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - [DataMember(Name = "formFactor", IsRequired = false, EmitDefaultValue = false)] - public FormFactorEnum FormFactor { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CardInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// authentication. - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. (required). - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. (required). - /// The name of the cardholder. Maximum length: 26 characters. (required). - /// configuration. - /// deliveryContact. - /// The form factor of the card. Possible values: **virtual**, **physical**. (required). - /// Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration.. - public CardInfo(Authentication authentication = default(Authentication), string brand = default(string), string brandVariant = default(string), string cardholderName = default(string), CardConfiguration configuration = default(CardConfiguration), DeliveryContact deliveryContact = default(DeliveryContact), FormFactorEnum formFactor = default(FormFactorEnum), string threeDSecure = default(string)) - { - this.Brand = brand; - this.BrandVariant = brandVariant; - this.CardholderName = cardholderName; - this.FormFactor = formFactor; - this.Authentication = authentication; - this._Configuration = configuration; - this.DeliveryContact = deliveryContact; - this.ThreeDSecure = threeDSecure; - } - - /// - /// Gets or Sets Authentication - /// - [DataMember(Name = "authentication", EmitDefaultValue = false)] - public Authentication Authentication { get; set; } - - /// - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. - /// - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. - [DataMember(Name = "brand", IsRequired = false, EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. - /// - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. - [DataMember(Name = "brandVariant", IsRequired = false, EmitDefaultValue = false)] - public string BrandVariant { get; set; } - - /// - /// The name of the cardholder. Maximum length: 26 characters. - /// - /// The name of the cardholder. Maximum length: 26 characters. - [DataMember(Name = "cardholderName", IsRequired = false, EmitDefaultValue = false)] - public string CardholderName { get; set; } - - /// - /// Gets or Sets _Configuration - /// - [DataMember(Name = "configuration", EmitDefaultValue = false)] - public CardConfiguration _Configuration { get; set; } - - /// - /// Gets or Sets DeliveryContact - /// - [DataMember(Name = "deliveryContact", EmitDefaultValue = false)] - public DeliveryContact DeliveryContact { get; set; } - - /// - /// Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. - /// - /// Allocates a specific product range for either a physical or a virtual card. Possible values: **fullySupported**, **secureCorporate**. >Reach out to your Adyen contact to get the values relevant for your integration. - [DataMember(Name = "threeDSecure", EmitDefaultValue = false)] - public string ThreeDSecure { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardInfo {\n"); - sb.Append(" Authentication: ").Append(Authentication).Append("\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" BrandVariant: ").Append(BrandVariant).Append("\n"); - sb.Append(" CardholderName: ").Append(CardholderName).Append("\n"); - sb.Append(" _Configuration: ").Append(_Configuration).Append("\n"); - sb.Append(" DeliveryContact: ").Append(DeliveryContact).Append("\n"); - sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); - sb.Append(" ThreeDSecure: ").Append(ThreeDSecure).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardInfo); - } - - /// - /// Returns true if CardInfo instances are equal - /// - /// Instance of CardInfo to be compared - /// Boolean - public bool Equals(CardInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Authentication == input.Authentication || - (this.Authentication != null && - this.Authentication.Equals(input.Authentication)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.BrandVariant == input.BrandVariant || - (this.BrandVariant != null && - this.BrandVariant.Equals(input.BrandVariant)) - ) && - ( - this.CardholderName == input.CardholderName || - (this.CardholderName != null && - this.CardholderName.Equals(input.CardholderName)) - ) && - ( - this._Configuration == input._Configuration || - (this._Configuration != null && - this._Configuration.Equals(input._Configuration)) - ) && - ( - this.DeliveryContact == input.DeliveryContact || - (this.DeliveryContact != null && - this.DeliveryContact.Equals(input.DeliveryContact)) - ) && - ( - this.FormFactor == input.FormFactor || - this.FormFactor.Equals(input.FormFactor) - ) && - ( - this.ThreeDSecure == input.ThreeDSecure || - (this.ThreeDSecure != null && - this.ThreeDSecure.Equals(input.ThreeDSecure)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Authentication != null) - { - hashCode = (hashCode * 59) + this.Authentication.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.BrandVariant != null) - { - hashCode = (hashCode * 59) + this.BrandVariant.GetHashCode(); - } - if (this.CardholderName != null) - { - hashCode = (hashCode * 59) + this.CardholderName.GetHashCode(); - } - if (this._Configuration != null) - { - hashCode = (hashCode * 59) + this._Configuration.GetHashCode(); - } - if (this.DeliveryContact != null) - { - hashCode = (hashCode * 59) + this.DeliveryContact.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); - if (this.ThreeDSecure != null) - { - hashCode = (hashCode * 59) + this.ThreeDSecure.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CardholderName (string) maxLength - if (this.CardholderName != null && this.CardholderName.Length > 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CardholderName, length must be less than 26.", new [] { "CardholderName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CardOrder.cs b/Adyen/Model/BalancePlatform/CardOrder.cs deleted file mode 100644 index ca5c33d6c..000000000 --- a/Adyen/Model/BalancePlatform/CardOrder.cs +++ /dev/null @@ -1,279 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CardOrder - /// - [DataContract(Name = "CardOrder")] - public partial class CardOrder : IEquatable, IValidatableObject - { - /// - /// The status of the card order. Possible values: **Open**, **Closed**. - /// - /// The status of the card order. Possible values: **Open**, **Closed**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 1, - - /// - /// Enum Open for value: open - /// - [EnumMember(Value = "open")] - Open = 2 - - } - - - /// - /// The status of the card order. Possible values: **Open**, **Closed**. - /// - /// The status of the card order. Possible values: **Open**, **Closed**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The date when the card order is created.. - /// The unique identifier of the card manufacturer profile.. - /// The date when the card order processing ends.. - /// The date when you manually closed the card order. Card orders are automatically closed by the end of the day it was created. If you manually closed it beforehand, the closing date is shown as the `endDate`.. - /// The unique identifier of the card order.. - /// The date when the card order processing begins.. - /// The service center.. - /// The status of the card order. Possible values: **Open**, **Closed**.. - public CardOrder(DateTime beginDate = default(DateTime), string cardManufacturingProfileId = default(string), DateTime closedDate = default(DateTime), DateTime endDate = default(DateTime), string id = default(string), DateTime lockDate = default(DateTime), string serviceCenter = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.BeginDate = beginDate; - this.CardManufacturingProfileId = cardManufacturingProfileId; - this.ClosedDate = closedDate; - this.EndDate = endDate; - this.Id = id; - this.LockDate = lockDate; - this.ServiceCenter = serviceCenter; - this.Status = status; - } - - /// - /// The date when the card order is created. - /// - /// The date when the card order is created. - [DataMember(Name = "beginDate", EmitDefaultValue = false)] - public DateTime BeginDate { get; set; } - - /// - /// The unique identifier of the card manufacturer profile. - /// - /// The unique identifier of the card manufacturer profile. - [DataMember(Name = "cardManufacturingProfileId", EmitDefaultValue = false)] - public string CardManufacturingProfileId { get; set; } - - /// - /// The date when the card order processing ends. - /// - /// The date when the card order processing ends. - [DataMember(Name = "closedDate", EmitDefaultValue = false)] - public DateTime ClosedDate { get; set; } - - /// - /// The date when you manually closed the card order. Card orders are automatically closed by the end of the day it was created. If you manually closed it beforehand, the closing date is shown as the `endDate`. - /// - /// The date when you manually closed the card order. Card orders are automatically closed by the end of the day it was created. If you manually closed it beforehand, the closing date is shown as the `endDate`. - [DataMember(Name = "endDate", EmitDefaultValue = false)] - public DateTime EndDate { get; set; } - - /// - /// The unique identifier of the card order. - /// - /// The unique identifier of the card order. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The date when the card order processing begins. - /// - /// The date when the card order processing begins. - [DataMember(Name = "lockDate", EmitDefaultValue = false)] - public DateTime LockDate { get; set; } - - /// - /// The service center. - /// - /// The service center. - [DataMember(Name = "serviceCenter", EmitDefaultValue = false)] - public string ServiceCenter { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardOrder {\n"); - sb.Append(" BeginDate: ").Append(BeginDate).Append("\n"); - sb.Append(" CardManufacturingProfileId: ").Append(CardManufacturingProfileId).Append("\n"); - sb.Append(" ClosedDate: ").Append(ClosedDate).Append("\n"); - sb.Append(" EndDate: ").Append(EndDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LockDate: ").Append(LockDate).Append("\n"); - sb.Append(" ServiceCenter: ").Append(ServiceCenter).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardOrder); - } - - /// - /// Returns true if CardOrder instances are equal - /// - /// Instance of CardOrder to be compared - /// Boolean - public bool Equals(CardOrder input) - { - if (input == null) - { - return false; - } - return - ( - this.BeginDate == input.BeginDate || - (this.BeginDate != null && - this.BeginDate.Equals(input.BeginDate)) - ) && - ( - this.CardManufacturingProfileId == input.CardManufacturingProfileId || - (this.CardManufacturingProfileId != null && - this.CardManufacturingProfileId.Equals(input.CardManufacturingProfileId)) - ) && - ( - this.ClosedDate == input.ClosedDate || - (this.ClosedDate != null && - this.ClosedDate.Equals(input.ClosedDate)) - ) && - ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LockDate == input.LockDate || - (this.LockDate != null && - this.LockDate.Equals(input.LockDate)) - ) && - ( - this.ServiceCenter == input.ServiceCenter || - (this.ServiceCenter != null && - this.ServiceCenter.Equals(input.ServiceCenter)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BeginDate != null) - { - hashCode = (hashCode * 59) + this.BeginDate.GetHashCode(); - } - if (this.CardManufacturingProfileId != null) - { - hashCode = (hashCode * 59) + this.CardManufacturingProfileId.GetHashCode(); - } - if (this.ClosedDate != null) - { - hashCode = (hashCode * 59) + this.ClosedDate.GetHashCode(); - } - if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LockDate != null) - { - hashCode = (hashCode * 59) + this.LockDate.GetHashCode(); - } - if (this.ServiceCenter != null) - { - hashCode = (hashCode * 59) + this.ServiceCenter.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CardOrderItem.cs b/Adyen/Model/BalancePlatform/CardOrderItem.cs deleted file mode 100644 index b63d40df5..000000000 --- a/Adyen/Model/BalancePlatform/CardOrderItem.cs +++ /dev/null @@ -1,258 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CardOrderItem - /// - [DataContract(Name = "CardOrderItem")] - public partial class CardOrderItem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// card. - /// The unique identifier of the card order item.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The unique identifier of the payment instrument related to the card order item.. - /// pin. - /// The shipping method used to deliver the card or the PIN.. - public CardOrderItem(string balancePlatform = default(string), CardOrderItemDeliveryStatus card = default(CardOrderItemDeliveryStatus), string cardOrderItemId = default(string), DateTime creationDate = default(DateTime), string paymentInstrumentId = default(string), CardOrderItemDeliveryStatus pin = default(CardOrderItemDeliveryStatus), string shippingMethod = default(string)) - { - this.BalancePlatform = balancePlatform; - this.Card = card; - this.CardOrderItemId = cardOrderItemId; - this.CreationDate = creationDate; - this.PaymentInstrumentId = paymentInstrumentId; - this.Pin = pin; - this.ShippingMethod = shippingMethod; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public CardOrderItemDeliveryStatus Card { get; set; } - - /// - /// The unique identifier of the card order item. - /// - /// The unique identifier of the card order item. - [DataMember(Name = "cardOrderItemId", EmitDefaultValue = false)] - public string CardOrderItemId { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// The unique identifier of the payment instrument related to the card order item. - /// - /// The unique identifier of the payment instrument related to the card order item. - [DataMember(Name = "paymentInstrumentId", EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Gets or Sets Pin - /// - [DataMember(Name = "pin", EmitDefaultValue = false)] - public CardOrderItemDeliveryStatus Pin { get; set; } - - /// - /// The shipping method used to deliver the card or the PIN. - /// - /// The shipping method used to deliver the card or the PIN. - [DataMember(Name = "shippingMethod", EmitDefaultValue = false)] - public string ShippingMethod { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardOrderItem {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" CardOrderItemId: ").Append(CardOrderItemId).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Pin: ").Append(Pin).Append("\n"); - sb.Append(" ShippingMethod: ").Append(ShippingMethod).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardOrderItem); - } - - /// - /// Returns true if CardOrderItem instances are equal - /// - /// Instance of CardOrderItem to be compared - /// Boolean - public bool Equals(CardOrderItem input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.CardOrderItemId == input.CardOrderItemId || - (this.CardOrderItemId != null && - this.CardOrderItemId.Equals(input.CardOrderItemId)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Pin == input.Pin || - (this.Pin != null && - this.Pin.Equals(input.Pin)) - ) && - ( - this.ShippingMethod == input.ShippingMethod || - (this.ShippingMethod != null && - this.ShippingMethod.Equals(input.ShippingMethod)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.CardOrderItemId != null) - { - hashCode = (hashCode * 59) + this.CardOrderItemId.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - if (this.Pin != null) - { - hashCode = (hashCode * 59) + this.Pin.GetHashCode(); - } - if (this.ShippingMethod != null) - { - hashCode = (hashCode * 59) + this.ShippingMethod.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.cs b/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.cs deleted file mode 100644 index 39bcc10b1..000000000 --- a/Adyen/Model/BalancePlatform/CardOrderItemDeliveryStatus.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CardOrderItemDeliveryStatus - /// - [DataContract(Name = "CardOrderItemDeliveryStatus")] - public partial class CardOrderItemDeliveryStatus : IEquatable, IValidatableObject - { - /// - /// The status of the PIN delivery. - /// - /// The status of the PIN delivery. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Created for value: created - /// - [EnumMember(Value = "created")] - Created = 1, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 2, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 3, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 4, - - /// - /// Enum Produced for value: produced - /// - [EnumMember(Value = "produced")] - Produced = 5, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 6, - - /// - /// Enum Shipped for value: shipped - /// - [EnumMember(Value = "shipped")] - Shipped = 7, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 8 - - } - - - /// - /// The status of the PIN delivery. - /// - /// The status of the PIN delivery. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// An error message.. - /// The status of the PIN delivery.. - /// The tracking number of the PIN delivery.. - public CardOrderItemDeliveryStatus(string errorMessage = default(string), StatusEnum? status = default(StatusEnum?), string trackingNumber = default(string)) - { - this.ErrorMessage = errorMessage; - this.Status = status; - this.TrackingNumber = trackingNumber; - } - - /// - /// An error message. - /// - /// An error message. - [DataMember(Name = "errorMessage", EmitDefaultValue = false)] - public string ErrorMessage { get; set; } - - /// - /// The tracking number of the PIN delivery. - /// - /// The tracking number of the PIN delivery. - [DataMember(Name = "trackingNumber", EmitDefaultValue = false)] - public string TrackingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardOrderItemDeliveryStatus {\n"); - sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardOrderItemDeliveryStatus); - } - - /// - /// Returns true if CardOrderItemDeliveryStatus instances are equal - /// - /// Instance of CardOrderItemDeliveryStatus to be compared - /// Boolean - public bool Equals(CardOrderItemDeliveryStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorMessage == input.ErrorMessage || - (this.ErrorMessage != null && - this.ErrorMessage.Equals(input.ErrorMessage)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TrackingNumber == input.TrackingNumber || - (this.TrackingNumber != null && - this.TrackingNumber.Equals(input.TrackingNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorMessage != null) - { - hashCode = (hashCode * 59) + this.ErrorMessage.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TrackingNumber != null) - { - hashCode = (hashCode * 59) + this.TrackingNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/ContactDetails.cs b/Adyen/Model/BalancePlatform/ContactDetails.cs deleted file mode 100644 index e55c2629f..000000000 --- a/Adyen/Model/BalancePlatform/ContactDetails.cs +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// ContactDetails - /// - [DataContract(Name = "ContactDetails")] - public partial class ContactDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ContactDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// The email address of the account holder. (required). - /// phone (required). - /// The URL of the account holder's website.. - public ContactDetails(Address address = default(Address), string email = default(string), Phone phone = default(Phone), string webAddress = default(string)) - { - this.Address = address; - this.Email = email; - this.Phone = phone; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public Address Address { get; set; } - - /// - /// The email address of the account holder. - /// - /// The email address of the account holder. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] - public Phone Phone { get; set; } - - /// - /// The URL of the account holder's website. - /// - /// The URL of the account holder's website. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ContactDetails {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ContactDetails); - } - - /// - /// Returns true if ContactDetails instances are equal - /// - /// Instance of ContactDetails to be compared - /// Boolean - public bool Equals(ContactDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Counterparty.cs b/Adyen/Model/BalancePlatform/Counterparty.cs deleted file mode 100644 index 4339f5fcb..000000000 --- a/Adyen/Model/BalancePlatform/Counterparty.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Counterparty - /// - [DataContract(Name = "Counterparty")] - public partial class Counterparty : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// bankAccount. - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id).. - public Counterparty(BankAccount bankAccount = default(BankAccount), string transferInstrumentId = default(string)) - { - this.BankAccount = bankAccount; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccount BankAccount { get; set; } - - /// - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - /// - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Counterparty {\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Counterparty); - } - - /// - /// Returns true if Counterparty instances are equal - /// - /// Instance of Counterparty to be compared - /// Boolean - public bool Equals(Counterparty input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.cs b/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.cs deleted file mode 100644 index 9e84bcd3a..000000000 --- a/Adyen/Model/BalancePlatform/CounterpartyBankRestriction.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CounterpartyBankRestriction - /// - [DataContract(Name = "CounterpartyBankRestriction")] - public partial class CounterpartyBankRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CounterpartyBankRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// The list of counterparty bank institutions to be evaluated.. - public CounterpartyBankRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// The list of counterparty bank institutions to be evaluated. - /// - /// The list of counterparty bank institutions to be evaluated. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CounterpartyBankRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CounterpartyBankRestriction); - } - - /// - /// Returns true if CounterpartyBankRestriction instances are equal - /// - /// Instance of CounterpartyBankRestriction to be compared - /// Boolean - public bool Equals(CounterpartyBankRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CounterpartyTypesRestriction.cs b/Adyen/Model/BalancePlatform/CounterpartyTypesRestriction.cs deleted file mode 100644 index 3eb6bcb03..000000000 --- a/Adyen/Model/BalancePlatform/CounterpartyTypesRestriction.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CounterpartyTypesRestriction - /// - [DataContract(Name = "CounterpartyTypesRestriction")] - public partial class CounterpartyTypesRestriction : IEquatable, IValidatableObject - { - /// - /// Defines Value - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ValueEnum - { - /// - /// Enum BalanceAccount for value: balanceAccount - /// - [EnumMember(Value = "balanceAccount")] - BalanceAccount = 1, - - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 2, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 3, - - /// - /// Enum TransferInstrument for value: transferInstrument - /// - [EnumMember(Value = "transferInstrument")] - TransferInstrument = 4 - - } - - - - /// - /// The list of counterparty types to be evaluated. - /// - /// The list of counterparty types to be evaluated. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CounterpartyTypesRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// The list of counterparty types to be evaluated.. - public CounterpartyTypesRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CounterpartyTypesRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CounterpartyTypesRestriction); - } - - /// - /// Returns true if CounterpartyTypesRestriction instances are equal - /// - /// Instance of CounterpartyTypesRestriction to be compared - /// Boolean - public bool Equals(CounterpartyTypesRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CountriesRestriction.cs b/Adyen/Model/BalancePlatform/CountriesRestriction.cs deleted file mode 100644 index df712afad..000000000 --- a/Adyen/Model/BalancePlatform/CountriesRestriction.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CountriesRestriction - /// - [DataContract(Name = "CountriesRestriction")] - public partial class CountriesRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CountriesRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// List of two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes.. - public CountriesRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// List of two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. - /// - /// List of two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CountriesRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CountriesRestriction); - } - - /// - /// Returns true if CountriesRestriction instances are equal - /// - /// Instance of CountriesRestriction to be compared - /// Boolean - public bool Equals(CountriesRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.cs b/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.cs deleted file mode 100644 index fbb7580cd..000000000 --- a/Adyen/Model/BalancePlatform/CreateSweepConfigurationV2.cs +++ /dev/null @@ -1,653 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// CreateSweepConfigurationV2 - /// - [DataContract(Name = "CreateSweepConfigurationV2")] - public partial class CreateSweepConfigurationV2 : IEquatable, IValidatableObject - { - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 2, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 3 - - } - - - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - [DataMember(Name = "category", EmitDefaultValue = false)] - public CategoryEnum? Category { get; set; } - /// - /// Defines Priorities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PrioritiesEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). - [DataMember(Name = "priorities", EmitDefaultValue = false)] - public List Priorities { get; set; } - /// - /// The reason for disabling the sweep. - /// - /// The reason for disabling the sweep. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 16, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 17, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 18, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 19, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 20, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 21, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 22, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 23 - - } - - - /// - /// The reason for disabling the sweep. - /// - /// The reason for disabling the sweep. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - - /// - /// Returns false as Reason should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeReason() - { - return false; - } - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 2 - - } - - - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Pull for value: pull - /// - [EnumMember(Value = "pull")] - Pull = 1, - - /// - /// Enum Push for value: push - /// - [EnumMember(Value = "push")] - Push = 2 - - } - - - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateSweepConfigurationV2() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`.. - /// counterparty (required). - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). (required). - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters.. - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup).. - /// Your reference for the sweep configuration.. - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed.. - /// schedule (required). - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. . - /// sweepAmount. - /// targetAmount. - /// triggerAmount. - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. (default to TypeEnum.Push). - public CreateSweepConfigurationV2(CategoryEnum? category = default(CategoryEnum?), SweepCounterparty counterparty = default(SweepCounterparty), string currency = default(string), string description = default(string), List priorities = default(List), string reference = default(string), string referenceForBeneficiary = default(string), SweepSchedule schedule = default(SweepSchedule), StatusEnum? status = default(StatusEnum?), Amount sweepAmount = default(Amount), Amount targetAmount = default(Amount), Amount triggerAmount = default(Amount), TypeEnum? type = TypeEnum.Push) - { - this.Counterparty = counterparty; - this.Currency = currency; - this.Schedule = schedule; - this.Category = category; - this.Description = description; - this.Priorities = priorities; - this.Reference = reference; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Status = status; - this.SweepAmount = sweepAmount; - this.TargetAmount = targetAmount; - this.TriggerAmount = triggerAmount; - this.Type = type; - } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", IsRequired = false, EmitDefaultValue = false)] - public SweepCounterparty Counterparty { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. - /// - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The human readable reason for disabling the sweep. - /// - /// The human readable reason for disabling the sweep. - [DataMember(Name = "reasonDetail", EmitDefaultValue = false)] - public string ReasonDetail { get; private set; } - - /// - /// Your reference for the sweep configuration. - /// - /// Your reference for the sweep configuration. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. - /// - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Schedule - /// - [DataMember(Name = "schedule", IsRequired = false, EmitDefaultValue = false)] - public SweepSchedule Schedule { get; set; } - - /// - /// Gets or Sets SweepAmount - /// - [DataMember(Name = "sweepAmount", EmitDefaultValue = false)] - public Amount SweepAmount { get; set; } - - /// - /// Gets or Sets TargetAmount - /// - [DataMember(Name = "targetAmount", EmitDefaultValue = false)] - public Amount TargetAmount { get; set; } - - /// - /// Gets or Sets TriggerAmount - /// - [DataMember(Name = "triggerAmount", EmitDefaultValue = false)] - public Amount TriggerAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateSweepConfigurationV2 {\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Priorities: ").Append(Priorities).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" ReasonDetail: ").Append(ReasonDetail).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Schedule: ").Append(Schedule).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" SweepAmount: ").Append(SweepAmount).Append("\n"); - sb.Append(" TargetAmount: ").Append(TargetAmount).Append("\n"); - sb.Append(" TriggerAmount: ").Append(TriggerAmount).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateSweepConfigurationV2); - } - - /// - /// Returns true if CreateSweepConfigurationV2 instances are equal - /// - /// Instance of CreateSweepConfigurationV2 to be compared - /// Boolean - public bool Equals(CreateSweepConfigurationV2 input) - { - if (input == null) - { - return false; - } - return - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Priorities == input.Priorities || - this.Priorities.SequenceEqual(input.Priorities) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.ReasonDetail == input.ReasonDetail || - (this.ReasonDetail != null && - this.ReasonDetail.Equals(input.ReasonDetail)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Schedule == input.Schedule || - (this.Schedule != null && - this.Schedule.Equals(input.Schedule)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.SweepAmount == input.SweepAmount || - (this.SweepAmount != null && - this.SweepAmount.Equals(input.SweepAmount)) - ) && - ( - this.TargetAmount == input.TargetAmount || - (this.TargetAmount != null && - this.TargetAmount.Equals(input.TargetAmount)) - ) && - ( - this.TriggerAmount == input.TriggerAmount || - (this.TriggerAmount != null && - this.TriggerAmount.Equals(input.TriggerAmount)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priorities.GetHashCode(); - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - if (this.ReasonDetail != null) - { - hashCode = (hashCode * 59) + this.ReasonDetail.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - if (this.Schedule != null) - { - hashCode = (hashCode * 59) + this.Schedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.SweepAmount != null) - { - hashCode = (hashCode * 59) + this.SweepAmount.GetHashCode(); - } - if (this.TargetAmount != null) - { - hashCode = (hashCode * 59) + this.TargetAmount.GetHashCode(); - } - if (this.TriggerAmount != null) - { - hashCode = (hashCode * 59) + this.TriggerAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - // ReferenceForBeneficiary (string) maxLength - if (this.ReferenceForBeneficiary != null && this.ReferenceForBeneficiary.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReferenceForBeneficiary, length must be less than 80.", new [] { "ReferenceForBeneficiary" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.cs deleted file mode 100644 index fafd717cb..000000000 --- a/Adyen/Model/BalancePlatform/DKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// DKLocalAccountIdentification - /// - [DataContract(Name = "DKLocalAccountIdentification")] - public partial class DKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **dkLocal** - /// - /// **dkLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DkLocal for value: dkLocal - /// - [EnumMember(Value = "dkLocal")] - DkLocal = 1 - - } - - - /// - /// **dkLocal** - /// - /// **dkLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). (required). - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). (required). - /// **dkLocal** (required) (default to TypeEnum.DkLocal). - public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.DkLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.Type = type; - } - - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). - /// - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DKLocalAccountIdentification); - } - - /// - /// Returns true if DKLocalAccountIdentification instances are equal - /// - /// Instance of DKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(DKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 4.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 4.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 4.", new [] { "BankCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/DayOfWeekRestriction.cs b/Adyen/Model/BalancePlatform/DayOfWeekRestriction.cs deleted file mode 100644 index 9414b7fba..000000000 --- a/Adyen/Model/BalancePlatform/DayOfWeekRestriction.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// DayOfWeekRestriction - /// - [DataContract(Name = "DayOfWeekRestriction")] - public partial class DayOfWeekRestriction : IEquatable, IValidatableObject - { - /// - /// Defines Value - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ValueEnum - { - /// - /// Enum Friday for value: friday - /// - [EnumMember(Value = "friday")] - Friday = 1, - - /// - /// Enum Monday for value: monday - /// - [EnumMember(Value = "monday")] - Monday = 2, - - /// - /// Enum Saturday for value: saturday - /// - [EnumMember(Value = "saturday")] - Saturday = 3, - - /// - /// Enum Sunday for value: sunday - /// - [EnumMember(Value = "sunday")] - Sunday = 4, - - /// - /// Enum Thursday for value: thursday - /// - [EnumMember(Value = "thursday")] - Thursday = 5, - - /// - /// Enum Tuesday for value: tuesday - /// - [EnumMember(Value = "tuesday")] - Tuesday = 6, - - /// - /// Enum Wednesday for value: wednesday - /// - [EnumMember(Value = "wednesday")] - Wednesday = 7 - - } - - - - /// - /// List of days of the week. Possible values: **monday**, **tuesday**, **wednesday**, **thursday**, **friday**, **saturday**, **sunday**. - /// - /// List of days of the week. Possible values: **monday**, **tuesday**, **wednesday**, **thursday**, **friday**, **saturday**, **sunday**. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DayOfWeekRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// List of days of the week. Possible values: **monday**, **tuesday**, **wednesday**, **thursday**, **friday**, **saturday**, **sunday**. . - public DayOfWeekRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DayOfWeekRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DayOfWeekRestriction); - } - - /// - /// Returns true if DayOfWeekRestriction instances are equal - /// - /// Instance of DayOfWeekRestriction to be compared - /// Boolean - public bool Equals(DayOfWeekRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/DelegatedAuthenticationData.cs b/Adyen/Model/BalancePlatform/DelegatedAuthenticationData.cs deleted file mode 100644 index 4a39dea3a..000000000 --- a/Adyen/Model/BalancePlatform/DelegatedAuthenticationData.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// DelegatedAuthenticationData - /// - [DataContract(Name = "DelegatedAuthenticationData")] - public partial class DelegatedAuthenticationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DelegatedAuthenticationData() { } - /// - /// Initializes a new instance of the class. - /// - /// A base64-encoded block with the data required to register the SCA device. You obtain this information by using our authentication SDK. (required). - public DelegatedAuthenticationData(string sdkOutput = default(string)) - { - this.SdkOutput = sdkOutput; - } - - /// - /// A base64-encoded block with the data required to register the SCA device. You obtain this information by using our authentication SDK. - /// - /// A base64-encoded block with the data required to register the SCA device. You obtain this information by using our authentication SDK. - [DataMember(Name = "sdkOutput", IsRequired = false, EmitDefaultValue = false)] - public string SdkOutput { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DelegatedAuthenticationData {\n"); - sb.Append(" SdkOutput: ").Append(SdkOutput).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DelegatedAuthenticationData); - } - - /// - /// Returns true if DelegatedAuthenticationData instances are equal - /// - /// Instance of DelegatedAuthenticationData to be compared - /// Boolean - public bool Equals(DelegatedAuthenticationData input) - { - if (input == null) - { - return false; - } - return - ( - this.SdkOutput == input.SdkOutput || - (this.SdkOutput != null && - this.SdkOutput.Equals(input.SdkOutput)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SdkOutput != null) - { - hashCode = (hashCode * 59) + this.SdkOutput.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // SdkOutput (string) maxLength - if (this.SdkOutput != null && this.SdkOutput.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SdkOutput, length must be less than 20000.", new [] { "SdkOutput" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/DeliveryAddress.cs b/Adyen/Model/BalancePlatform/DeliveryAddress.cs deleted file mode 100644 index 3f38b6476..000000000 --- a/Adyen/Model/BalancePlatform/DeliveryAddress.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// DeliveryAddress - /// - [DataContract(Name = "DeliveryAddress")] - public partial class DeliveryAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeliveryAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city.. - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// The name of the street. Do not include the number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **Simon Carmiggeltstraat**.. - /// The number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **6-50**.. - /// Additional information about the delivery address.. - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries.. - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - public DeliveryAddress(string city = default(string), string country = default(string), string line1 = default(string), string line2 = default(string), string line3 = default(string), string postalCode = default(string), string stateOrProvince = default(string)) - { - this.Country = country; - this.City = city; - this.Line1 = line1; - this.Line2 = line2; - this.Line3 = line3; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. - /// - /// The name of the city. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The name of the street. Do not include the number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **Simon Carmiggeltstraat**. - /// - /// The name of the street. Do not include the number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **Simon Carmiggeltstraat**. - [DataMember(Name = "line1", EmitDefaultValue = false)] - public string Line1 { get; set; } - - /// - /// The number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **6-50**. - /// - /// The number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **6-50**. - [DataMember(Name = "line2", EmitDefaultValue = false)] - public string Line2 { get; set; } - - /// - /// Additional information about the delivery address. - /// - /// Additional information about the delivery address. - [DataMember(Name = "line3", EmitDefaultValue = false)] - public string Line3 { get; set; } - - /// - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. - /// - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeliveryAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Line1: ").Append(Line1).Append("\n"); - sb.Append(" Line2: ").Append(Line2).Append("\n"); - sb.Append(" Line3: ").Append(Line3).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeliveryAddress); - } - - /// - /// Returns true if DeliveryAddress instances are equal - /// - /// Instance of DeliveryAddress to be compared - /// Boolean - public bool Equals(DeliveryAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Line1 == input.Line1 || - (this.Line1 != null && - this.Line1.Equals(input.Line1)) - ) && - ( - this.Line2 == input.Line2 || - (this.Line2 != null && - this.Line2.Equals(input.Line2)) - ) && - ( - this.Line3 == input.Line3 || - (this.Line3 != null && - this.Line3.Equals(input.Line3)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Line1 != null) - { - hashCode = (hashCode * 59) + this.Line1.GetHashCode(); - } - if (this.Line2 != null) - { - hashCode = (hashCode * 59) + this.Line2.GetHashCode(); - } - if (this.Line3 != null) - { - hashCode = (hashCode * 59) + this.Line3.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/DeliveryContact.cs b/Adyen/Model/BalancePlatform/DeliveryContact.cs deleted file mode 100644 index b0d015cbf..000000000 --- a/Adyen/Model/BalancePlatform/DeliveryContact.cs +++ /dev/null @@ -1,245 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// DeliveryContact - /// - [DataContract(Name = "DeliveryContact")] - public partial class DeliveryContact : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeliveryContact() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// The company name of the contact.. - /// The email address of the contact.. - /// The full phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// name (required). - /// phoneNumber. - /// The URL of the contact's website.. - public DeliveryContact(DeliveryAddress address = default(DeliveryAddress), string company = default(string), string email = default(string), string fullPhoneNumber = default(string), Name name = default(Name), PhoneNumber phoneNumber = default(PhoneNumber), string webAddress = default(string)) - { - this.Address = address; - this.Name = name; - this.Company = company; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.PhoneNumber = phoneNumber; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public DeliveryAddress Address { get; set; } - - /// - /// The company name of the contact. - /// - /// The company name of the contact. - [DataMember(Name = "company", EmitDefaultValue = false)] - public string Company { get; set; } - - /// - /// The email address of the contact. - /// - /// The email address of the contact. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The full phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The full phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public PhoneNumber PhoneNumber { get; set; } - - /// - /// The URL of the contact's website. - /// - /// The URL of the contact's website. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeliveryContact {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeliveryContact); - } - - /// - /// Returns true if DeliveryContact instances are equal - /// - /// Instance of DeliveryContact to be compared - /// Boolean - public bool Equals(DeliveryContact input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Device.cs b/Adyen/Model/BalancePlatform/Device.cs deleted file mode 100644 index 9ede3916b..000000000 --- a/Adyen/Model/BalancePlatform/Device.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Device - /// - [DataContract(Name = "Device")] - public partial class Device : IEquatable, IValidatableObject - { - /// - /// The type of device. Possible values: **ios**, **android**, **browser**. - /// - /// The type of device. Possible values: **ios**, **android**, **browser**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Ios for value: ios - /// - [EnumMember(Value = "ios")] - Ios = 1, - - /// - /// Enum Android for value: android - /// - [EnumMember(Value = "android")] - Android = 2, - - /// - /// Enum Browser for value: browser - /// - [EnumMember(Value = "browser")] - Browser = 3 - - } - - - /// - /// The type of device. Possible values: **ios**, **android**, **browser**. - /// - /// The type of device. Possible values: **ios**, **android**, **browser**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the SCA device.. - /// The name of the SCA device. You can show this name to your user to help them identify the device.. - /// The unique identifier of the payment instrument that is associated with the SCA device.. - /// The type of device. Possible values: **ios**, **android**, **browser**.. - public Device(string id = default(string), string name = default(string), string paymentInstrumentId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Id = id; - this.Name = name; - this.PaymentInstrumentId = paymentInstrumentId; - this.Type = type; - } - - /// - /// The unique identifier of the SCA device. - /// - /// The unique identifier of the SCA device. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The name of the SCA device. You can show this name to your user to help them identify the device. - /// - /// The name of the SCA device. You can show this name to your user to help them identify the device. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The unique identifier of the payment instrument that is associated with the SCA device. - /// - /// The unique identifier of the payment instrument that is associated with the SCA device. - [DataMember(Name = "paymentInstrumentId", EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Device {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Device); - } - - /// - /// Returns true if Device instances are equal - /// - /// Instance of Device to be compared - /// Boolean - public bool Equals(Device input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/DeviceInfo.cs b/Adyen/Model/BalancePlatform/DeviceInfo.cs deleted file mode 100644 index 94369b13b..000000000 --- a/Adyen/Model/BalancePlatform/DeviceInfo.cs +++ /dev/null @@ -1,320 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// DeviceInfo - /// - [DataContract(Name = "DeviceInfo")] - public partial class DeviceInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The technology used to capture the card details.. - /// The name of the device.. - /// The form factor of the device to be provisioned.. - /// The IMEI number of the device being provisioned.. - /// The 2-digit device type provided on the ISO messages that the token is being provisioned to.. - /// The MSISDN of the device being provisioned.. - /// The name of the device operating system.. - /// The version of the device operating system.. - /// Different types of payments supported for the network token.. - /// The serial number of the device.. - /// The architecture or technology used for network token storage.. - public DeviceInfo(string cardCaptureTechnology = default(string), string deviceName = default(string), string formFactor = default(string), string imei = default(string), string isoDeviceType = default(string), string msisdn = default(string), string osName = default(string), string osVersion = default(string), List paymentTypes = default(List), string serialNumber = default(string), string storageTechnology = default(string)) - { - this.CardCaptureTechnology = cardCaptureTechnology; - this.DeviceName = deviceName; - this.FormFactor = formFactor; - this.Imei = imei; - this.IsoDeviceType = isoDeviceType; - this.Msisdn = msisdn; - this.OsName = osName; - this.OsVersion = osVersion; - this.PaymentTypes = paymentTypes; - this.SerialNumber = serialNumber; - this.StorageTechnology = storageTechnology; - } - - /// - /// The technology used to capture the card details. - /// - /// The technology used to capture the card details. - [DataMember(Name = "cardCaptureTechnology", EmitDefaultValue = false)] - public string CardCaptureTechnology { get; set; } - - /// - /// The name of the device. - /// - /// The name of the device. - [DataMember(Name = "deviceName", EmitDefaultValue = false)] - public string DeviceName { get; set; } - - /// - /// The form factor of the device to be provisioned. - /// - /// The form factor of the device to be provisioned. - [DataMember(Name = "formFactor", EmitDefaultValue = false)] - public string FormFactor { get; set; } - - /// - /// The IMEI number of the device being provisioned. - /// - /// The IMEI number of the device being provisioned. - [DataMember(Name = "imei", EmitDefaultValue = false)] - public string Imei { get; set; } - - /// - /// The 2-digit device type provided on the ISO messages that the token is being provisioned to. - /// - /// The 2-digit device type provided on the ISO messages that the token is being provisioned to. - [DataMember(Name = "isoDeviceType", EmitDefaultValue = false)] - public string IsoDeviceType { get; set; } - - /// - /// The MSISDN of the device being provisioned. - /// - /// The MSISDN of the device being provisioned. - [DataMember(Name = "msisdn", EmitDefaultValue = false)] - public string Msisdn { get; set; } - - /// - /// The name of the device operating system. - /// - /// The name of the device operating system. - [DataMember(Name = "osName", EmitDefaultValue = false)] - public string OsName { get; set; } - - /// - /// The version of the device operating system. - /// - /// The version of the device operating system. - [DataMember(Name = "osVersion", EmitDefaultValue = false)] - public string OsVersion { get; set; } - - /// - /// Different types of payments supported for the network token. - /// - /// Different types of payments supported for the network token. - [DataMember(Name = "paymentTypes", EmitDefaultValue = false)] - public List PaymentTypes { get; set; } - - /// - /// The serial number of the device. - /// - /// The serial number of the device. - [DataMember(Name = "serialNumber", EmitDefaultValue = false)] - public string SerialNumber { get; set; } - - /// - /// The architecture or technology used for network token storage. - /// - /// The architecture or technology used for network token storage. - [DataMember(Name = "storageTechnology", EmitDefaultValue = false)] - public string StorageTechnology { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeviceInfo {\n"); - sb.Append(" CardCaptureTechnology: ").Append(CardCaptureTechnology).Append("\n"); - sb.Append(" DeviceName: ").Append(DeviceName).Append("\n"); - sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); - sb.Append(" Imei: ").Append(Imei).Append("\n"); - sb.Append(" IsoDeviceType: ").Append(IsoDeviceType).Append("\n"); - sb.Append(" Msisdn: ").Append(Msisdn).Append("\n"); - sb.Append(" OsName: ").Append(OsName).Append("\n"); - sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); - sb.Append(" PaymentTypes: ").Append(PaymentTypes).Append("\n"); - sb.Append(" SerialNumber: ").Append(SerialNumber).Append("\n"); - sb.Append(" StorageTechnology: ").Append(StorageTechnology).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeviceInfo); - } - - /// - /// Returns true if DeviceInfo instances are equal - /// - /// Instance of DeviceInfo to be compared - /// Boolean - public bool Equals(DeviceInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.CardCaptureTechnology == input.CardCaptureTechnology || - (this.CardCaptureTechnology != null && - this.CardCaptureTechnology.Equals(input.CardCaptureTechnology)) - ) && - ( - this.DeviceName == input.DeviceName || - (this.DeviceName != null && - this.DeviceName.Equals(input.DeviceName)) - ) && - ( - this.FormFactor == input.FormFactor || - (this.FormFactor != null && - this.FormFactor.Equals(input.FormFactor)) - ) && - ( - this.Imei == input.Imei || - (this.Imei != null && - this.Imei.Equals(input.Imei)) - ) && - ( - this.IsoDeviceType == input.IsoDeviceType || - (this.IsoDeviceType != null && - this.IsoDeviceType.Equals(input.IsoDeviceType)) - ) && - ( - this.Msisdn == input.Msisdn || - (this.Msisdn != null && - this.Msisdn.Equals(input.Msisdn)) - ) && - ( - this.OsName == input.OsName || - (this.OsName != null && - this.OsName.Equals(input.OsName)) - ) && - ( - this.OsVersion == input.OsVersion || - (this.OsVersion != null && - this.OsVersion.Equals(input.OsVersion)) - ) && - ( - this.PaymentTypes == input.PaymentTypes || - this.PaymentTypes != null && - input.PaymentTypes != null && - this.PaymentTypes.SequenceEqual(input.PaymentTypes) - ) && - ( - this.SerialNumber == input.SerialNumber || - (this.SerialNumber != null && - this.SerialNumber.Equals(input.SerialNumber)) - ) && - ( - this.StorageTechnology == input.StorageTechnology || - (this.StorageTechnology != null && - this.StorageTechnology.Equals(input.StorageTechnology)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardCaptureTechnology != null) - { - hashCode = (hashCode * 59) + this.CardCaptureTechnology.GetHashCode(); - } - if (this.DeviceName != null) - { - hashCode = (hashCode * 59) + this.DeviceName.GetHashCode(); - } - if (this.FormFactor != null) - { - hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); - } - if (this.Imei != null) - { - hashCode = (hashCode * 59) + this.Imei.GetHashCode(); - } - if (this.IsoDeviceType != null) - { - hashCode = (hashCode * 59) + this.IsoDeviceType.GetHashCode(); - } - if (this.Msisdn != null) - { - hashCode = (hashCode * 59) + this.Msisdn.GetHashCode(); - } - if (this.OsName != null) - { - hashCode = (hashCode * 59) + this.OsName.GetHashCode(); - } - if (this.OsVersion != null) - { - hashCode = (hashCode * 59) + this.OsVersion.GetHashCode(); - } - if (this.PaymentTypes != null) - { - hashCode = (hashCode * 59) + this.PaymentTypes.GetHashCode(); - } - if (this.SerialNumber != null) - { - hashCode = (hashCode * 59) + this.SerialNumber.GetHashCode(); - } - if (this.StorageTechnology != null) - { - hashCode = (hashCode * 59) + this.StorageTechnology.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.cs b/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.cs deleted file mode 100644 index be822781d..000000000 --- a/Adyen/Model/BalancePlatform/DifferentCurrenciesRestriction.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// DifferentCurrenciesRestriction - /// - [DataContract(Name = "DifferentCurrenciesRestriction")] - public partial class DifferentCurrenciesRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DifferentCurrenciesRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// Checks the currency of the payment against the currency of the payment instrument. Possible values: - **true**: The currency of the payment is different from the currency of the payment instrument. - **false**: The currencies are the same. . - public DifferentCurrenciesRestriction(string operation = default(string), bool? value = default(bool?)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Checks the currency of the payment against the currency of the payment instrument. Possible values: - **true**: The currency of the payment is different from the currency of the payment instrument. - **false**: The currencies are the same. - /// - /// Checks the currency of the payment against the currency of the payment instrument. Possible values: - **true**: The currency of the payment is different from the currency of the payment instrument. - **false**: The currencies are the same. - [DataMember(Name = "value", EmitDefaultValue = false)] - public bool? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DifferentCurrenciesRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DifferentCurrenciesRestriction); - } - - /// - /// Returns true if DifferentCurrenciesRestriction instances are equal - /// - /// Instance of DifferentCurrenciesRestriction to be compared - /// Boolean - public bool Equals(DifferentCurrenciesRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Duration.cs b/Adyen/Model/BalancePlatform/Duration.cs deleted file mode 100644 index c43c22ed5..000000000 --- a/Adyen/Model/BalancePlatform/Duration.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Duration - /// - [DataContract(Name = "Duration")] - public partial class Duration : IEquatable, IValidatableObject - { - /// - /// The unit of time. You can only use **minutes** and **hours** if the `interval.type` is **sliding**. Possible values: **minutes**, **hours**, **days**, **weeks**, or **months** - /// - /// The unit of time. You can only use **minutes** and **hours** if the `interval.type` is **sliding**. Possible values: **minutes**, **hours**, **days**, **weeks**, or **months** - [JsonConverter(typeof(StringEnumConverter))] - public enum UnitEnum - { - /// - /// Enum Days for value: days - /// - [EnumMember(Value = "days")] - Days = 1, - - /// - /// Enum Hours for value: hours - /// - [EnumMember(Value = "hours")] - Hours = 2, - - /// - /// Enum Minutes for value: minutes - /// - [EnumMember(Value = "minutes")] - Minutes = 3, - - /// - /// Enum Months for value: months - /// - [EnumMember(Value = "months")] - Months = 4, - - /// - /// Enum Weeks for value: weeks - /// - [EnumMember(Value = "weeks")] - Weeks = 5 - - } - - - /// - /// The unit of time. You can only use **minutes** and **hours** if the `interval.type` is **sliding**. Possible values: **minutes**, **hours**, **days**, **weeks**, or **months** - /// - /// The unit of time. You can only use **minutes** and **hours** if the `interval.type` is **sliding**. Possible values: **minutes**, **hours**, **days**, **weeks**, or **months** - [DataMember(Name = "unit", EmitDefaultValue = false)] - public UnitEnum? Unit { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unit of time. You can only use **minutes** and **hours** if the `interval.type` is **sliding**. Possible values: **minutes**, **hours**, **days**, **weeks**, or **months**. - /// The length of time by the unit. For example, 5 days. The maximum duration is 90 days or an equivalent in other units. For example, 3 months.. - public Duration(UnitEnum? unit = default(UnitEnum?), int? value = default(int?)) - { - this.Unit = unit; - this.Value = value; - } - - /// - /// The length of time by the unit. For example, 5 days. The maximum duration is 90 days or an equivalent in other units. For example, 3 months. - /// - /// The length of time by the unit. For example, 5 days. The maximum duration is 90 days or an equivalent in other units. For example, 3 months. - [DataMember(Name = "value", EmitDefaultValue = false)] - public int? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Duration {\n"); - sb.Append(" Unit: ").Append(Unit).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Duration); - } - - /// - /// Returns true if Duration instances are equal - /// - /// Instance of Duration to be compared - /// Boolean - public bool Equals(Duration input) - { - if (input == null) - { - return false; - } - return - ( - this.Unit == input.Unit || - this.Unit.Equals(input.Unit) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Unit.GetHashCode(); - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/EntryModesRestriction.cs b/Adyen/Model/BalancePlatform/EntryModesRestriction.cs deleted file mode 100644 index 7f72b9fe8..000000000 --- a/Adyen/Model/BalancePlatform/EntryModesRestriction.cs +++ /dev/null @@ -1,212 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// EntryModesRestriction - /// - [DataContract(Name = "EntryModesRestriction")] - public partial class EntryModesRestriction : IEquatable, IValidatableObject - { - /// - /// Defines Value - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ValueEnum - { - /// - /// Enum Barcode for value: barcode - /// - [EnumMember(Value = "barcode")] - Barcode = 1, - - /// - /// Enum Chip for value: chip - /// - [EnumMember(Value = "chip")] - Chip = 2, - - /// - /// Enum Cof for value: cof - /// - [EnumMember(Value = "cof")] - Cof = 3, - - /// - /// Enum Contactless for value: contactless - /// - [EnumMember(Value = "contactless")] - Contactless = 4, - - /// - /// Enum Magstripe for value: magstripe - /// - [EnumMember(Value = "magstripe")] - Magstripe = 5, - - /// - /// Enum Manual for value: manual - /// - [EnumMember(Value = "manual")] - Manual = 6, - - /// - /// Enum Ocr for value: ocr - /// - [EnumMember(Value = "ocr")] - Ocr = 7, - - /// - /// Enum Server for value: server - /// - [EnumMember(Value = "server")] - Server = 8, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 9 - - } - - - - /// - /// List of point-of-sale entry modes. Possible values: **barcode**, **chip**, **cof**, **contactless**, **magstripe**, **manual**, **ocr**, **server**. - /// - /// List of point-of-sale entry modes. Possible values: **barcode**, **chip**, **cof**, **contactless**, **magstripe**, **manual**, **ocr**, **server**. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EntryModesRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// List of point-of-sale entry modes. Possible values: **barcode**, **chip**, **cof**, **contactless**, **magstripe**, **manual**, **ocr**, **server**. . - public EntryModesRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EntryModesRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EntryModesRestriction); - } - - /// - /// Returns true if EntryModesRestriction instances are equal - /// - /// Instance of EntryModesRestriction to be compared - /// Boolean - public bool Equals(EntryModesRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Expiry.cs b/Adyen/Model/BalancePlatform/Expiry.cs deleted file mode 100644 index ec5690f95..000000000 --- a/Adyen/Model/BalancePlatform/Expiry.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Expiry - /// - [DataContract(Name = "Expiry")] - public partial class Expiry : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The month in which the card will expire.. - /// The year in which the card will expire.. - public Expiry(string month = default(string), string year = default(string)) - { - this.Month = month; - this.Year = year; - } - - /// - /// The month in which the card will expire. - /// - /// The month in which the card will expire. - [DataMember(Name = "month", EmitDefaultValue = false)] - public string Month { get; set; } - - /// - /// The year in which the card will expire. - /// - /// The year in which the card will expire. - [DataMember(Name = "year", EmitDefaultValue = false)] - public string Year { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Expiry {\n"); - sb.Append(" Month: ").Append(Month).Append("\n"); - sb.Append(" Year: ").Append(Year).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Expiry); - } - - /// - /// Returns true if Expiry instances are equal - /// - /// Instance of Expiry to be compared - /// Boolean - public bool Equals(Expiry input) - { - if (input == null) - { - return false; - } - return - ( - this.Month == input.Month || - (this.Month != null && - this.Month.Equals(input.Month)) - ) && - ( - this.Year == input.Year || - (this.Year != null && - this.Year.Equals(input.Year)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Month != null) - { - hashCode = (hashCode * 59) + this.Month.GetHashCode(); - } - if (this.Year != null) - { - hashCode = (hashCode * 59) + this.Year.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Fee.cs b/Adyen/Model/BalancePlatform/Fee.cs deleted file mode 100644 index aa85274e1..000000000 --- a/Adyen/Model/BalancePlatform/Fee.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Fee - /// - [DataContract(Name = "Fee")] - public partial class Fee : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Fee() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - public Fee(Amount amount = default(Amount)) - { - this.Amount = amount; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Fee {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Fee); - } - - /// - /// Returns true if Fee instances are equal - /// - /// Instance of Fee to be compared - /// Boolean - public bool Equals(Fee input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.cs b/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.cs deleted file mode 100644 index 13b245047..000000000 --- a/Adyen/Model/BalancePlatform/GetNetworkTokenResponse.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// GetNetworkTokenResponse - /// - [DataContract(Name = "GetNetworkTokenResponse")] - public partial class GetNetworkTokenResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetNetworkTokenResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// token (required). - public GetNetworkTokenResponse(NetworkToken token = default(NetworkToken)) - { - this.Token = token; - } - - /// - /// Gets or Sets Token - /// - [DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] - public NetworkToken Token { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetNetworkTokenResponse {\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetNetworkTokenResponse); - } - - /// - /// Returns true if GetNetworkTokenResponse instances are equal - /// - /// Instance of GetNetworkTokenResponse to be compared - /// Boolean - public bool Equals(GetNetworkTokenResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/GetTaxFormResponse.cs b/Adyen/Model/BalancePlatform/GetTaxFormResponse.cs deleted file mode 100644 index 6fd551567..000000000 --- a/Adyen/Model/BalancePlatform/GetTaxFormResponse.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// GetTaxFormResponse - /// - [DataContract(Name = "GetTaxFormResponse")] - public partial class GetTaxFormResponse : IEquatable, IValidatableObject - { - /// - /// The content type of the tax form. Possible values: * **application/pdf** - /// - /// The content type of the tax form. Possible values: * **application/pdf** - [JsonConverter(typeof(StringEnumConverter))] - public enum ContentTypeEnum - { - /// - /// Enum ApplicationPdf for value: application/pdf - /// - [EnumMember(Value = "application/pdf")] - ApplicationPdf = 1 - - } - - - /// - /// The content type of the tax form. Possible values: * **application/pdf** - /// - /// The content type of the tax form. Possible values: * **application/pdf** - [DataMember(Name = "contentType", EmitDefaultValue = false)] - public ContentTypeEnum? ContentType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetTaxFormResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The content of the tax form in Base64 format. (required). - /// The content type of the tax form. Possible values: * **application/pdf** . - public GetTaxFormResponse(byte[] content = default(byte[]), ContentTypeEnum? contentType = default(ContentTypeEnum?)) - { - this.Content = content; - this.ContentType = contentType; - } - - /// - /// The content of the tax form in Base64 format. - /// - /// The content of the tax form in Base64 format. - [DataMember(Name = "content", IsRequired = false, EmitDefaultValue = false)] - public byte[] Content { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTaxFormResponse {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" ContentType: ").Append(ContentType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTaxFormResponse); - } - - /// - /// Returns true if GetTaxFormResponse instances are equal - /// - /// Instance of GetTaxFormResponse to be compared - /// Boolean - public bool Equals(GetTaxFormResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.ContentType == input.ContentType || - this.ContentType.Equals(input.ContentType) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/GrantLimit.cs b/Adyen/Model/BalancePlatform/GrantLimit.cs deleted file mode 100644 index 87862f3df..000000000 --- a/Adyen/Model/BalancePlatform/GrantLimit.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// GrantLimit - /// - [DataContract(Name = "GrantLimit")] - public partial class GrantLimit : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// amount. - public GrantLimit(Amount amount = default(Amount)) - { - this.Amount = amount; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GrantLimit {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GrantLimit); - } - - /// - /// Returns true if GrantLimit instances are equal - /// - /// Instance of GrantLimit to be compared - /// Boolean - public bool Equals(GrantLimit input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/GrantOffer.cs b/Adyen/Model/BalancePlatform/GrantOffer.cs deleted file mode 100644 index 6b9148c00..000000000 --- a/Adyen/Model/BalancePlatform/GrantOffer.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// GrantOffer - /// - [DataContract(Name = "GrantOffer")] - public partial class GrantOffer : IEquatable, IValidatableObject - { - /// - /// The contract type of the grant offer. Possible value: **cashAdvance**, **loan**. - /// - /// The contract type of the grant offer. Possible value: **cashAdvance**, **loan**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ContractTypeEnum - { - /// - /// Enum CashAdvance for value: cashAdvance - /// - [EnumMember(Value = "cashAdvance")] - CashAdvance = 1, - - /// - /// Enum Loan for value: loan - /// - [EnumMember(Value = "loan")] - Loan = 2 - - } - - - /// - /// The contract type of the grant offer. Possible value: **cashAdvance**, **loan**. - /// - /// The contract type of the grant offer. Possible value: **cashAdvance**, **loan**. - [DataMember(Name = "contractType", EmitDefaultValue = false)] - public ContractTypeEnum? ContractType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GrantOffer() { } - /// - /// Initializes a new instance of the class. - /// - /// The identifier of the account holder to which the grant is offered. (required). - /// amount. - /// The contract type of the grant offer. Possible value: **cashAdvance**, **loan**.. - /// The end date of the grant offer validity period.. - /// fee. - /// The unique identifier of the grant offer.. - /// repayment. - /// The starting date of the grant offer validity period.. - public GrantOffer(string accountHolderId = default(string), Amount amount = default(Amount), ContractTypeEnum? contractType = default(ContractTypeEnum?), DateTime expiresAt = default(DateTime), Fee fee = default(Fee), string id = default(string), Repayment repayment = default(Repayment), DateTime startsAt = default(DateTime)) - { - this.AccountHolderId = accountHolderId; - this.Amount = amount; - this.ContractType = contractType; - this.ExpiresAt = expiresAt; - this.Fee = fee; - this.Id = id; - this.Repayment = repayment; - this.StartsAt = startsAt; - } - - /// - /// The identifier of the account holder to which the grant is offered. - /// - /// The identifier of the account holder to which the grant is offered. - [DataMember(Name = "accountHolderId", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderId { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The end date of the grant offer validity period. - /// - /// The end date of the grant offer validity period. - [DataMember(Name = "expiresAt", EmitDefaultValue = false)] - public DateTime ExpiresAt { get; set; } - - /// - /// Gets or Sets Fee - /// - [DataMember(Name = "fee", EmitDefaultValue = false)] - public Fee Fee { get; set; } - - /// - /// The unique identifier of the grant offer. - /// - /// The unique identifier of the grant offer. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Repayment - /// - [DataMember(Name = "repayment", EmitDefaultValue = false)] - public Repayment Repayment { get; set; } - - /// - /// The starting date of the grant offer validity period. - /// - /// The starting date of the grant offer validity period. - [DataMember(Name = "startsAt", EmitDefaultValue = false)] - public DateTime StartsAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GrantOffer {\n"); - sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ContractType: ").Append(ContractType).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" Fee: ").Append(Fee).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Repayment: ").Append(Repayment).Append("\n"); - sb.Append(" StartsAt: ").Append(StartsAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GrantOffer); - } - - /// - /// Returns true if GrantOffer instances are equal - /// - /// Instance of GrantOffer to be compared - /// Boolean - public bool Equals(GrantOffer input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderId == input.AccountHolderId || - (this.AccountHolderId != null && - this.AccountHolderId.Equals(input.AccountHolderId)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ContractType == input.ContractType || - this.ContractType.Equals(input.ContractType) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Fee == input.Fee || - (this.Fee != null && - this.Fee.Equals(input.Fee)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Repayment == input.Repayment || - (this.Repayment != null && - this.Repayment.Equals(input.Repayment)) - ) && - ( - this.StartsAt == input.StartsAt || - (this.StartsAt != null && - this.StartsAt.Equals(input.StartsAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderId != null) - { - hashCode = (hashCode * 59) + this.AccountHolderId.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ContractType.GetHashCode(); - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Fee != null) - { - hashCode = (hashCode * 59) + this.Fee.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Repayment != null) - { - hashCode = (hashCode * 59) + this.Repayment.GetHashCode(); - } - if (this.StartsAt != null) - { - hashCode = (hashCode * 59) + this.StartsAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/GrantOffers.cs b/Adyen/Model/BalancePlatform/GrantOffers.cs deleted file mode 100644 index caee26b4f..000000000 --- a/Adyen/Model/BalancePlatform/GrantOffers.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// GrantOffers - /// - [DataContract(Name = "GrantOffers")] - public partial class GrantOffers : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GrantOffers() { } - /// - /// Initializes a new instance of the class. - /// - /// A list of available grant offers. (required). - public GrantOffers(List grantOffers = default(List)) - { - this._GrantOffers = grantOffers; - } - - /// - /// A list of available grant offers. - /// - /// A list of available grant offers. - [DataMember(Name = "grantOffers", IsRequired = false, EmitDefaultValue = false)] - public List _GrantOffers { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GrantOffers {\n"); - sb.Append(" _GrantOffers: ").Append(_GrantOffers).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GrantOffers); - } - - /// - /// Returns true if GrantOffers instances are equal - /// - /// Instance of GrantOffers to be compared - /// Boolean - public bool Equals(GrantOffers input) - { - if (input == null) - { - return false; - } - return - ( - this._GrantOffers == input._GrantOffers || - this._GrantOffers != null && - input._GrantOffers != null && - this._GrantOffers.SequenceEqual(input._GrantOffers) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._GrantOffers != null) - { - hashCode = (hashCode * 59) + this._GrantOffers.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.cs deleted file mode 100644 index faff07257..000000000 --- a/Adyen/Model/BalancePlatform/HKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// HKLocalAccountIdentification - /// - [DataContract(Name = "HKLocalAccountIdentification")] - public partial class HKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **hkLocal** - /// - /// **hkLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum HkLocal for value: hkLocal - /// - [EnumMember(Value = "hkLocal")] - HkLocal = 1 - - } - - - /// - /// **hkLocal** - /// - /// **hkLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. (required). - /// The 3-digit clearing code, without separators or whitespace. (required). - /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) - { - this.AccountNumber = accountNumber; - this.ClearingCode = clearingCode; - this.Type = type; - } - - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit clearing code, without separators or whitespace. - /// - /// The 3-digit clearing code, without separators or whitespace. - [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] - public string ClearingCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HKLocalAccountIdentification); - } - - /// - /// Returns true if HKLocalAccountIdentification instances are equal - /// - /// Instance of HKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(HKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.ClearingCode == input.ClearingCode || - (this.ClearingCode != null && - this.ClearingCode.Equals(input.ClearingCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.ClearingCode != null) - { - hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 15) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 15.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 9.", new [] { "AccountNumber" }); - } - - // ClearingCode (string) maxLength - if (this.ClearingCode != null && this.ClearingCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be less than 3.", new [] { "ClearingCode" }); - } - - // ClearingCode (string) minLength - if (this.ClearingCode != null && this.ClearingCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be greater than 3.", new [] { "ClearingCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/HULocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/HULocalAccountIdentification.cs deleted file mode 100644 index 6ef4724d2..000000000 --- a/Adyen/Model/BalancePlatform/HULocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// HULocalAccountIdentification - /// - [DataContract(Name = "HULocalAccountIdentification")] - public partial class HULocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **huLocal** - /// - /// **huLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum HuLocal for value: huLocal - /// - [EnumMember(Value = "huLocal")] - HuLocal = 1 - - } - - - /// - /// **huLocal** - /// - /// **huLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HULocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 24-digit bank account number, without separators or whitespace. (required). - /// **huLocal** (required) (default to TypeEnum.HuLocal). - public HULocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.HuLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 24-digit bank account number, without separators or whitespace. - /// - /// The 24-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HULocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HULocalAccountIdentification); - } - - /// - /// Returns true if HULocalAccountIdentification instances are equal - /// - /// Instance of HULocalAccountIdentification to be compared - /// Boolean - public bool Equals(HULocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 24) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 24.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 24) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 24.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Href.cs b/Adyen/Model/BalancePlatform/Href.cs deleted file mode 100644 index e5d779889..000000000 --- a/Adyen/Model/BalancePlatform/Href.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Href - /// - [DataContract(Name = "Href")] - public partial class Href : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// href. - public Href(string href = default(string)) - { - this._Href = href; - } - - /// - /// Gets or Sets _Href - /// - [DataMember(Name = "href", EmitDefaultValue = false)] - public string _Href { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Href {\n"); - sb.Append(" _Href: ").Append(_Href).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Href); - } - - /// - /// Returns true if Href instances are equal - /// - /// Instance of Href to be compared - /// Boolean - public bool Equals(Href input) - { - if (input == null) - { - return false; - } - return - ( - this._Href == input._Href || - (this._Href != null && - this._Href.Equals(input._Href)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Href != null) - { - hashCode = (hashCode * 59) + this._Href.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/IbanAccountIdentification.cs b/Adyen/Model/BalancePlatform/IbanAccountIdentification.cs deleted file mode 100644 index 414943838..000000000 --- a/Adyen/Model/BalancePlatform/IbanAccountIdentification.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// IbanAccountIdentification - /// - [DataContract(Name = "IbanAccountIdentification")] - public partial class IbanAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **iban** - /// - /// **iban** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 1 - - } - - - /// - /// **iban** - /// - /// **iban** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IbanAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). - /// **iban** (required) (default to TypeEnum.Iban). - public IbanAccountIdentification(string iban = default(string), TypeEnum type = TypeEnum.Iban) - { - this.Iban = iban; - this.Type = type; - } - - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - [DataMember(Name = "iban", IsRequired = false, EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IbanAccountIdentification {\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IbanAccountIdentification); - } - - /// - /// Returns true if IbanAccountIdentification instances are equal - /// - /// Instance of IbanAccountIdentification to be compared - /// Boolean - public bool Equals(IbanAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/IbanAccountIdentificationRequirement.cs b/Adyen/Model/BalancePlatform/IbanAccountIdentificationRequirement.cs deleted file mode 100644 index 05ef5571b..000000000 --- a/Adyen/Model/BalancePlatform/IbanAccountIdentificationRequirement.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// IbanAccountIdentificationRequirement - /// - [DataContract(Name = "IbanAccountIdentificationRequirement")] - public partial class IbanAccountIdentificationRequirement : IEquatable, IValidatableObject - { - /// - /// **ibanAccountIdentificationRequirement** - /// - /// **ibanAccountIdentificationRequirement** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum IbanAccountIdentificationRequirement for value: ibanAccountIdentificationRequirement - /// - [EnumMember(Value = "ibanAccountIdentificationRequirement")] - IbanAccountIdentificationRequirement = 1 - - } - - - /// - /// **ibanAccountIdentificationRequirement** - /// - /// **ibanAccountIdentificationRequirement** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IbanAccountIdentificationRequirement() { } - /// - /// Initializes a new instance of the class. - /// - /// Specifies the allowed prefixes for the international bank account number as defined in the ISO-13616 standard.. - /// Contains the list of allowed prefixes for international bank accounts. For example: NL, US, UK.. - /// **ibanAccountIdentificationRequirement** (required) (default to TypeEnum.IbanAccountIdentificationRequirement). - public IbanAccountIdentificationRequirement(string description = default(string), List ibanPrefixes = default(List), TypeEnum type = TypeEnum.IbanAccountIdentificationRequirement) - { - this.Type = type; - this.Description = description; - this.IbanPrefixes = ibanPrefixes; - } - - /// - /// Specifies the allowed prefixes for the international bank account number as defined in the ISO-13616 standard. - /// - /// Specifies the allowed prefixes for the international bank account number as defined in the ISO-13616 standard. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Contains the list of allowed prefixes for international bank accounts. For example: NL, US, UK. - /// - /// Contains the list of allowed prefixes for international bank accounts. For example: NL, US, UK. - [DataMember(Name = "ibanPrefixes", EmitDefaultValue = false)] - public List IbanPrefixes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IbanAccountIdentificationRequirement {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" IbanPrefixes: ").Append(IbanPrefixes).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IbanAccountIdentificationRequirement); - } - - /// - /// Returns true if IbanAccountIdentificationRequirement instances are equal - /// - /// Instance of IbanAccountIdentificationRequirement to be compared - /// Boolean - public bool Equals(IbanAccountIdentificationRequirement input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.IbanPrefixes == input.IbanPrefixes || - this.IbanPrefixes != null && - input.IbanPrefixes != null && - this.IbanPrefixes.SequenceEqual(input.IbanPrefixes) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.IbanPrefixes != null) - { - hashCode = (hashCode * 59) + this.IbanPrefixes.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.cs b/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.cs deleted file mode 100644 index 72cf76f9a..000000000 --- a/Adyen/Model/BalancePlatform/InternationalTransactionRestriction.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// InternationalTransactionRestriction - /// - [DataContract(Name = "InternationalTransactionRestriction")] - public partial class InternationalTransactionRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InternationalTransactionRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// Boolean indicating whether transaction is an international transaction. Possible values: - **true**: The transaction is an international transaction. - **false**: The transaction is a domestic transaction. . - public InternationalTransactionRestriction(string operation = default(string), bool? value = default(bool?)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Boolean indicating whether transaction is an international transaction. Possible values: - **true**: The transaction is an international transaction. - **false**: The transaction is a domestic transaction. - /// - /// Boolean indicating whether transaction is an international transaction. Possible values: - **true**: The transaction is an international transaction. - **false**: The transaction is a domestic transaction. - [DataMember(Name = "value", EmitDefaultValue = false)] - public bool? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InternationalTransactionRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InternationalTransactionRestriction); - } - - /// - /// Returns true if InternationalTransactionRestriction instances are equal - /// - /// Instance of InternationalTransactionRestriction to be compared - /// Boolean - public bool Equals(InternationalTransactionRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/InvalidField.cs b/Adyen/Model/BalancePlatform/InvalidField.cs deleted file mode 100644 index c588762d5..000000000 --- a/Adyen/Model/BalancePlatform/InvalidField.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// InvalidField - /// - [DataContract(Name = "InvalidField")] - public partial class InvalidField : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InvalidField() { } - /// - /// Initializes a new instance of the class. - /// - /// Description of the validation error. (required). - /// The field that has an invalid value. (required). - /// The invalid value. (required). - public InvalidField(string message = default(string), string name = default(string), string value = default(string)) - { - this.Message = message; - this.Name = name; - this.Value = value; - } - - /// - /// Description of the validation error. - /// - /// Description of the validation error. - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The field that has an invalid value. - /// - /// The field that has an invalid value. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The invalid value. - /// - /// The invalid value. - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InvalidField {\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InvalidField); - } - - /// - /// Returns true if InvalidField instances are equal - /// - /// Instance of InvalidField to be compared - /// Boolean - public bool Equals(InvalidField input) - { - if (input == null) - { - return false; - } - return - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Link.cs b/Adyen/Model/BalancePlatform/Link.cs deleted file mode 100644 index d49e8cb35..000000000 --- a/Adyen/Model/BalancePlatform/Link.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Link - /// - [DataContract(Name = "Link")] - public partial class Link : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// first. - /// last. - /// next. - /// previous. - /// self. - public Link(Href first = default(Href), Href last = default(Href), Href next = default(Href), Href previous = default(Href), Href self = default(Href)) - { - this.First = first; - this.Last = last; - this.Next = next; - this.Previous = previous; - this.Self = self; - } - - /// - /// Gets or Sets First - /// - [DataMember(Name = "first", EmitDefaultValue = false)] - public Href First { get; set; } - - /// - /// Gets or Sets Last - /// - [DataMember(Name = "last", EmitDefaultValue = false)] - public Href Last { get; set; } - - /// - /// Gets or Sets Next - /// - [DataMember(Name = "next", EmitDefaultValue = false)] - public Href Next { get; set; } - - /// - /// Gets or Sets Previous - /// - [DataMember(Name = "previous", EmitDefaultValue = false)] - public Href Previous { get; set; } - - /// - /// Gets or Sets Self - /// - [DataMember(Name = "self", EmitDefaultValue = false)] - public Href Self { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Link {\n"); - sb.Append(" First: ").Append(First).Append("\n"); - sb.Append(" Last: ").Append(Last).Append("\n"); - sb.Append(" Next: ").Append(Next).Append("\n"); - sb.Append(" Previous: ").Append(Previous).Append("\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Link); - } - - /// - /// Returns true if Link instances are equal - /// - /// Instance of Link to be compared - /// Boolean - public bool Equals(Link input) - { - if (input == null) - { - return false; - } - return - ( - this.First == input.First || - (this.First != null && - this.First.Equals(input.First)) - ) && - ( - this.Last == input.Last || - (this.Last != null && - this.Last.Equals(input.Last)) - ) && - ( - this.Next == input.Next || - (this.Next != null && - this.Next.Equals(input.Next)) - ) && - ( - this.Previous == input.Previous || - (this.Previous != null && - this.Previous.Equals(input.Previous)) - ) && - ( - this.Self == input.Self || - (this.Self != null && - this.Self.Equals(input.Self)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.First != null) - { - hashCode = (hashCode * 59) + this.First.GetHashCode(); - } - if (this.Last != null) - { - hashCode = (hashCode * 59) + this.Last.GetHashCode(); - } - if (this.Next != null) - { - hashCode = (hashCode * 59) + this.Next.GetHashCode(); - } - if (this.Previous != null) - { - hashCode = (hashCode * 59) + this.Previous.GetHashCode(); - } - if (this.Self != null) - { - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.cs b/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.cs deleted file mode 100644 index 41bdf72a9..000000000 --- a/Adyen/Model/BalancePlatform/ListNetworkTokensResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// ListNetworkTokensResponse - /// - [DataContract(Name = "ListNetworkTokensResponse")] - public partial class ListNetworkTokensResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of network tokens.. - public ListNetworkTokensResponse(List networkTokens = default(List)) - { - this.NetworkTokens = networkTokens; - } - - /// - /// List of network tokens. - /// - /// List of network tokens. - [DataMember(Name = "networkTokens", EmitDefaultValue = false)] - public List NetworkTokens { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListNetworkTokensResponse {\n"); - sb.Append(" NetworkTokens: ").Append(NetworkTokens).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListNetworkTokensResponse); - } - - /// - /// Returns true if ListNetworkTokensResponse instances are equal - /// - /// Instance of ListNetworkTokensResponse to be compared - /// Boolean - public bool Equals(ListNetworkTokensResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NetworkTokens == input.NetworkTokens || - this.NetworkTokens != null && - input.NetworkTokens != null && - this.NetworkTokens.SequenceEqual(input.NetworkTokens) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NetworkTokens != null) - { - hashCode = (hashCode * 59) + this.NetworkTokens.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.cs b/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.cs deleted file mode 100644 index bf2f70428..000000000 --- a/Adyen/Model/BalancePlatform/MatchingTransactionsRestriction.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// MatchingTransactionsRestriction - /// - [DataContract(Name = "MatchingTransactionsRestriction")] - public partial class MatchingTransactionsRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MatchingTransactionsRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// The number of transactions.. - public MatchingTransactionsRestriction(string operation = default(string), int? value = default(int?)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// The number of transactions. - /// - /// The number of transactions. - [DataMember(Name = "value", EmitDefaultValue = false)] - public int? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MatchingTransactionsRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MatchingTransactionsRestriction); - } - - /// - /// Returns true if MatchingTransactionsRestriction instances are equal - /// - /// Instance of MatchingTransactionsRestriction to be compared - /// Boolean - public bool Equals(MatchingTransactionsRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/MatchingValuesRestriction.cs b/Adyen/Model/BalancePlatform/MatchingValuesRestriction.cs deleted file mode 100644 index 64847a014..000000000 --- a/Adyen/Model/BalancePlatform/MatchingValuesRestriction.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// MatchingValuesRestriction - /// - [DataContract(Name = "MatchingValuesRestriction")] - public partial class MatchingValuesRestriction : IEquatable, IValidatableObject - { - /// - /// Defines Value - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ValueEnum - { - /// - /// Enum AcquirerId for value: acquirerId - /// - [EnumMember(Value = "acquirerId")] - AcquirerId = 1, - - /// - /// Enum Amount for value: amount - /// - [EnumMember(Value = "amount")] - Amount = 2, - - /// - /// Enum Currency for value: currency - /// - [EnumMember(Value = "currency")] - Currency = 3, - - /// - /// Enum MerchantId for value: merchantId - /// - [EnumMember(Value = "merchantId")] - MerchantId = 4, - - /// - /// Enum MerchantName for value: merchantName - /// - [EnumMember(Value = "merchantName")] - MerchantName = 5 - - } - - - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MatchingValuesRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// value. - public MatchingValuesRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MatchingValuesRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MatchingValuesRestriction); - } - - /// - /// Returns true if MatchingValuesRestriction instances are equal - /// - /// Instance of MatchingValuesRestriction to be compared - /// Boolean - public bool Equals(MatchingValuesRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/MccsRestriction.cs b/Adyen/Model/BalancePlatform/MccsRestriction.cs deleted file mode 100644 index 20fa168db..000000000 --- a/Adyen/Model/BalancePlatform/MccsRestriction.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// MccsRestriction - /// - [DataContract(Name = "MccsRestriction")] - public partial class MccsRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MccsRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// List of merchant category codes (MCCs).. - public MccsRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// List of merchant category codes (MCCs). - /// - /// List of merchant category codes (MCCs). - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MccsRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MccsRestriction); - } - - /// - /// Returns true if MccsRestriction instances are equal - /// - /// Instance of MccsRestriction to be compared - /// Boolean - public bool Equals(MccsRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/MerchantAcquirerPair.cs b/Adyen/Model/BalancePlatform/MerchantAcquirerPair.cs deleted file mode 100644 index 19269a3d8..000000000 --- a/Adyen/Model/BalancePlatform/MerchantAcquirerPair.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// MerchantAcquirerPair - /// - [DataContract(Name = "MerchantAcquirerPair")] - public partial class MerchantAcquirerPair : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The acquirer ID.. - /// The merchant identification number (MID).. - public MerchantAcquirerPair(string acquirerId = default(string), string merchantId = default(string)) - { - this.AcquirerId = acquirerId; - this.MerchantId = merchantId; - } - - /// - /// The acquirer ID. - /// - /// The acquirer ID. - [DataMember(Name = "acquirerId", EmitDefaultValue = false)] - public string AcquirerId { get; set; } - - /// - /// The merchant identification number (MID). - /// - /// The merchant identification number (MID). - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantAcquirerPair {\n"); - sb.Append(" AcquirerId: ").Append(AcquirerId).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantAcquirerPair); - } - - /// - /// Returns true if MerchantAcquirerPair instances are equal - /// - /// Instance of MerchantAcquirerPair to be compared - /// Boolean - public bool Equals(MerchantAcquirerPair input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquirerId == input.AcquirerId || - (this.AcquirerId != null && - this.AcquirerId.Equals(input.AcquirerId)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcquirerId != null) - { - hashCode = (hashCode * 59) + this.AcquirerId.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/MerchantNamesRestriction.cs b/Adyen/Model/BalancePlatform/MerchantNamesRestriction.cs deleted file mode 100644 index 3a789d6e8..000000000 --- a/Adyen/Model/BalancePlatform/MerchantNamesRestriction.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// MerchantNamesRestriction - /// - [DataContract(Name = "MerchantNamesRestriction")] - public partial class MerchantNamesRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MerchantNamesRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// value. - public MerchantNamesRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantNamesRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantNamesRestriction); - } - - /// - /// Returns true if MerchantNamesRestriction instances are equal - /// - /// Instance of MerchantNamesRestriction to be compared - /// Boolean - public bool Equals(MerchantNamesRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/MerchantsRestriction.cs b/Adyen/Model/BalancePlatform/MerchantsRestriction.cs deleted file mode 100644 index 3b4e114de..000000000 --- a/Adyen/Model/BalancePlatform/MerchantsRestriction.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// MerchantsRestriction - /// - [DataContract(Name = "MerchantsRestriction")] - public partial class MerchantsRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MerchantsRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// List of merchant ID and acquirer ID pairs.. - public MerchantsRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// List of merchant ID and acquirer ID pairs. - /// - /// List of merchant ID and acquirer ID pairs. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantsRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantsRestriction); - } - - /// - /// Returns true if MerchantsRestriction instances are equal - /// - /// Instance of MerchantsRestriction to be compared - /// Boolean - public bool Equals(MerchantsRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.cs deleted file mode 100644 index 9c21c9461..000000000 --- a/Adyen/Model/BalancePlatform/NOLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// NOLocalAccountIdentification - /// - [DataContract(Name = "NOLocalAccountIdentification")] - public partial class NOLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **noLocal** - /// - /// **noLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NoLocal for value: noLocal - /// - [EnumMember(Value = "noLocal")] - NoLocal = 1 - - } - - - /// - /// **noLocal** - /// - /// **noLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NOLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 11-digit bank account number, without separators or whitespace. (required). - /// **noLocal** (required) (default to TypeEnum.NoLocal). - public NOLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NoLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 11-digit bank account number, without separators or whitespace. - /// - /// The 11-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NOLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NOLocalAccountIdentification); - } - - /// - /// Returns true if NOLocalAccountIdentification instances are equal - /// - /// Instance of NOLocalAccountIdentification to be compared - /// Boolean - public bool Equals(NOLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 11.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 11.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.cs deleted file mode 100644 index ee6c75e8b..000000000 --- a/Adyen/Model/BalancePlatform/NZLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// NZLocalAccountIdentification - /// - [DataContract(Name = "NZLocalAccountIdentification")] - public partial class NZLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **nzLocal** - /// - /// **nzLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NzLocal for value: nzLocal - /// - [EnumMember(Value = "nzLocal")] - NzLocal = 1 - - } - - - /// - /// **nzLocal** - /// - /// **nzLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NZLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. (required). - /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NZLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NZLocalAccountIdentification); - } - - /// - /// Returns true if NZLocalAccountIdentification instances are equal - /// - /// Instance of NZLocalAccountIdentification to be compared - /// Boolean - public bool Equals(NZLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 16.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 15) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 15.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Name.cs b/Adyen/Model/BalancePlatform/Name.cs deleted file mode 100644 index ca103b299..000000000 --- a/Adyen/Model/BalancePlatform/Name.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Name - /// - [DataContract(Name = "Name")] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// The first name. (required). - /// The last name. (required). - public Name(string firstName = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/NetworkToken.cs b/Adyen/Model/BalancePlatform/NetworkToken.cs deleted file mode 100644 index 6b2901728..000000000 --- a/Adyen/Model/BalancePlatform/NetworkToken.cs +++ /dev/null @@ -1,290 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// NetworkToken - /// - [DataContract(Name = "NetworkToken")] - public partial class NetworkToken : IEquatable, IValidatableObject - { - /// - /// The status of the network token. Possible values: **active**, **inactive**, **suspended**, **closed**. - /// - /// The status of the network token. Possible values: **active**, **inactive**, **suspended**, **closed**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 2, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 3, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 4 - - } - - - /// - /// The status of the network token. Possible values: **active**, **inactive**, **suspended**, **closed**. - /// - /// The status of the network token. Possible values: **active**, **inactive**, **suspended**, **closed**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The card brand variant of the payment instrument associated with the network token. For example, **mc_prepaid_mrw**.. - /// Date and time when the network token was created, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) extended format. For example, **2020-12-18T10:15:30+01:00**... - /// device. - /// The unique identifier of the network token.. - /// The unique identifier of the payment instrument to which this network token belongs to.. - /// The status of the network token. Possible values: **active**, **inactive**, **suspended**, **closed**.. - /// The last four digits of the network token `id`.. - /// The type of network token. For example, **wallet**, **cof**.. - public NetworkToken(string brandVariant = default(string), DateTime creationDate = default(DateTime), DeviceInfo device = default(DeviceInfo), string id = default(string), string paymentInstrumentId = default(string), StatusEnum? status = default(StatusEnum?), string tokenLastFour = default(string), string type = default(string)) - { - this.BrandVariant = brandVariant; - this.CreationDate = creationDate; - this.Device = device; - this.Id = id; - this.PaymentInstrumentId = paymentInstrumentId; - this.Status = status; - this.TokenLastFour = tokenLastFour; - this.Type = type; - } - - /// - /// The card brand variant of the payment instrument associated with the network token. For example, **mc_prepaid_mrw**. - /// - /// The card brand variant of the payment instrument associated with the network token. For example, **mc_prepaid_mrw**. - [DataMember(Name = "brandVariant", EmitDefaultValue = false)] - public string BrandVariant { get; set; } - - /// - /// Date and time when the network token was created, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// - /// Date and time when the network token was created, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) extended format. For example, **2020-12-18T10:15:30+01:00**.. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// Gets or Sets Device - /// - [DataMember(Name = "device", EmitDefaultValue = false)] - public DeviceInfo Device { get; set; } - - /// - /// The unique identifier of the network token. - /// - /// The unique identifier of the network token. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the payment instrument to which this network token belongs to. - /// - /// The unique identifier of the payment instrument to which this network token belongs to. - [DataMember(Name = "paymentInstrumentId", EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// The last four digits of the network token `id`. - /// - /// The last four digits of the network token `id`. - [DataMember(Name = "tokenLastFour", EmitDefaultValue = false)] - public string TokenLastFour { get; set; } - - /// - /// The type of network token. For example, **wallet**, **cof**. - /// - /// The type of network token. For example, **wallet**, **cof**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NetworkToken {\n"); - sb.Append(" BrandVariant: ").Append(BrandVariant).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Device: ").Append(Device).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TokenLastFour: ").Append(TokenLastFour).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NetworkToken); - } - - /// - /// Returns true if NetworkToken instances are equal - /// - /// Instance of NetworkToken to be compared - /// Boolean - public bool Equals(NetworkToken input) - { - if (input == null) - { - return false; - } - return - ( - this.BrandVariant == input.BrandVariant || - (this.BrandVariant != null && - this.BrandVariant.Equals(input.BrandVariant)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Device == input.Device || - (this.Device != null && - this.Device.Equals(input.Device)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TokenLastFour == input.TokenLastFour || - (this.TokenLastFour != null && - this.TokenLastFour.Equals(input.TokenLastFour)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BrandVariant != null) - { - hashCode = (hashCode * 59) + this.BrandVariant.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Device != null) - { - hashCode = (hashCode * 59) + this.Device.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TokenLastFour != null) - { - hashCode = (hashCode * 59) + this.TokenLastFour.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.cs b/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.cs deleted file mode 100644 index 4a1bfe1b2..000000000 --- a/Adyen/Model/BalancePlatform/NumberAndBicAccountIdentification.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// NumberAndBicAccountIdentification - /// - [DataContract(Name = "NumberAndBicAccountIdentification")] - public partial class NumberAndBicAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **numberAndBic** - /// - /// **numberAndBic** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NumberAndBic for value: numberAndBic - /// - [EnumMember(Value = "numberAndBic")] - NumberAndBic = 1 - - } - - - /// - /// **numberAndBic** - /// - /// **numberAndBic** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NumberAndBicAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. (required). - /// additionalBankIdentification. - /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// **numberAndBic** (required) (default to TypeEnum.NumberAndBic). - public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), TypeEnum type = TypeEnum.NumberAndBic) - { - this.AccountNumber = accountNumber; - this.Bic = bic; - this.Type = type; - this.AdditionalBankIdentification = additionalBankIdentification; - } - - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Gets or Sets AdditionalBankIdentification - /// - [DataMember(Name = "additionalBankIdentification", EmitDefaultValue = false)] - public AdditionalBankIdentification AdditionalBankIdentification { get; set; } - - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NumberAndBicAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AdditionalBankIdentification: ").Append(AdditionalBankIdentification).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberAndBicAccountIdentification); - } - - /// - /// Returns true if NumberAndBicAccountIdentification instances are equal - /// - /// Instance of NumberAndBicAccountIdentification to be compared - /// Boolean - public bool Equals(NumberAndBicAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AdditionalBankIdentification == input.AdditionalBankIdentification || - (this.AdditionalBankIdentification != null && - this.AdditionalBankIdentification.Equals(input.AdditionalBankIdentification)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AdditionalBankIdentification != null) - { - hashCode = (hashCode * 59) + this.AdditionalBankIdentification.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 34) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 34.", new [] { "AccountNumber" }); - } - - // Bic (string) maxLength - if (this.Bic != null && this.Bic.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be less than 11.", new [] { "Bic" }); - } - - // Bic (string) minLength - if (this.Bic != null && this.Bic.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be greater than 8.", new [] { "Bic" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.cs deleted file mode 100644 index 25417331a..000000000 --- a/Adyen/Model/BalancePlatform/PLLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PLLocalAccountIdentification - /// - [DataContract(Name = "PLLocalAccountIdentification")] - public partial class PLLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **plLocal** - /// - /// **plLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PlLocal for value: plLocal - /// - [EnumMember(Value = "plLocal")] - PlLocal = 1 - - } - - - /// - /// **plLocal** - /// - /// **plLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PLLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. (required). - /// **plLocal** (required) (default to TypeEnum.PlLocal). - public PLLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.PlLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PLLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PLLocalAccountIdentification); - } - - /// - /// Returns true if PLLocalAccountIdentification instances are equal - /// - /// Instance of PLLocalAccountIdentification to be compared - /// Boolean - public bool Equals(PLLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 26.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 26.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.cs b/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.cs deleted file mode 100644 index 8bd74cf0c..000000000 --- a/Adyen/Model/BalancePlatform/PaginatedAccountHoldersResponse.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaginatedAccountHoldersResponse - /// - [DataContract(Name = "PaginatedAccountHoldersResponse")] - public partial class PaginatedAccountHoldersResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaginatedAccountHoldersResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// List of account holders. (required). - /// Indicates whether there are more items on the next page. (required). - /// Indicates whether there are more items on the previous page. (required). - public PaginatedAccountHoldersResponse(List accountHolders = default(List), bool? hasNext = default(bool?), bool? hasPrevious = default(bool?)) - { - this.AccountHolders = accountHolders; - this.HasNext = hasNext; - this.HasPrevious = hasPrevious; - } - - /// - /// List of account holders. - /// - /// List of account holders. - [DataMember(Name = "accountHolders", IsRequired = false, EmitDefaultValue = false)] - public List AccountHolders { get; set; } - - /// - /// Indicates whether there are more items on the next page. - /// - /// Indicates whether there are more items on the next page. - [DataMember(Name = "hasNext", IsRequired = false, EmitDefaultValue = false)] - public bool? HasNext { get; set; } - - /// - /// Indicates whether there are more items on the previous page. - /// - /// Indicates whether there are more items on the previous page. - [DataMember(Name = "hasPrevious", IsRequired = false, EmitDefaultValue = false)] - public bool? HasPrevious { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaginatedAccountHoldersResponse {\n"); - sb.Append(" AccountHolders: ").Append(AccountHolders).Append("\n"); - sb.Append(" HasNext: ").Append(HasNext).Append("\n"); - sb.Append(" HasPrevious: ").Append(HasPrevious).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaginatedAccountHoldersResponse); - } - - /// - /// Returns true if PaginatedAccountHoldersResponse instances are equal - /// - /// Instance of PaginatedAccountHoldersResponse to be compared - /// Boolean - public bool Equals(PaginatedAccountHoldersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolders == input.AccountHolders || - this.AccountHolders != null && - input.AccountHolders != null && - this.AccountHolders.SequenceEqual(input.AccountHolders) - ) && - ( - this.HasNext == input.HasNext || - this.HasNext.Equals(input.HasNext) - ) && - ( - this.HasPrevious == input.HasPrevious || - this.HasPrevious.Equals(input.HasPrevious) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolders != null) - { - hashCode = (hashCode * 59) + this.AccountHolders.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasNext.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPrevious.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.cs b/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.cs deleted file mode 100644 index e59cb5140..000000000 --- a/Adyen/Model/BalancePlatform/PaginatedBalanceAccountsResponse.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaginatedBalanceAccountsResponse - /// - [DataContract(Name = "PaginatedBalanceAccountsResponse")] - public partial class PaginatedBalanceAccountsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaginatedBalanceAccountsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// List of balance accounts. (required). - /// Indicates whether there are more items on the next page. (required). - /// Indicates whether there are more items on the previous page. (required). - public PaginatedBalanceAccountsResponse(List balanceAccounts = default(List), bool? hasNext = default(bool?), bool? hasPrevious = default(bool?)) - { - this.BalanceAccounts = balanceAccounts; - this.HasNext = hasNext; - this.HasPrevious = hasPrevious; - } - - /// - /// List of balance accounts. - /// - /// List of balance accounts. - [DataMember(Name = "balanceAccounts", IsRequired = false, EmitDefaultValue = false)] - public List BalanceAccounts { get; set; } - - /// - /// Indicates whether there are more items on the next page. - /// - /// Indicates whether there are more items on the next page. - [DataMember(Name = "hasNext", IsRequired = false, EmitDefaultValue = false)] - public bool? HasNext { get; set; } - - /// - /// Indicates whether there are more items on the previous page. - /// - /// Indicates whether there are more items on the previous page. - [DataMember(Name = "hasPrevious", IsRequired = false, EmitDefaultValue = false)] - public bool? HasPrevious { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaginatedBalanceAccountsResponse {\n"); - sb.Append(" BalanceAccounts: ").Append(BalanceAccounts).Append("\n"); - sb.Append(" HasNext: ").Append(HasNext).Append("\n"); - sb.Append(" HasPrevious: ").Append(HasPrevious).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaginatedBalanceAccountsResponse); - } - - /// - /// Returns true if PaginatedBalanceAccountsResponse instances are equal - /// - /// Instance of PaginatedBalanceAccountsResponse to be compared - /// Boolean - public bool Equals(PaginatedBalanceAccountsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccounts == input.BalanceAccounts || - this.BalanceAccounts != null && - input.BalanceAccounts != null && - this.BalanceAccounts.SequenceEqual(input.BalanceAccounts) - ) && - ( - this.HasNext == input.HasNext || - this.HasNext.Equals(input.HasNext) - ) && - ( - this.HasPrevious == input.HasPrevious || - this.HasPrevious.Equals(input.HasPrevious) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccounts != null) - { - hashCode = (hashCode * 59) + this.BalanceAccounts.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasNext.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPrevious.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.cs b/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.cs deleted file mode 100644 index 3def5a006..000000000 --- a/Adyen/Model/BalancePlatform/PaginatedGetCardOrderItemResponse.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaginatedGetCardOrderItemResponse - /// - [DataContract(Name = "PaginatedGetCardOrderItemResponse")] - public partial class PaginatedGetCardOrderItemResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaginatedGetCardOrderItemResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// List of card order items in the card order batch. (required). - /// Indicates whether there are more items on the next page. (required). - /// Indicates whether there are more items on the previous page. (required). - public PaginatedGetCardOrderItemResponse(List data = default(List), bool? hasNext = default(bool?), bool? hasPrevious = default(bool?)) - { - this.Data = data; - this.HasNext = hasNext; - this.HasPrevious = hasPrevious; - } - - /// - /// List of card order items in the card order batch. - /// - /// List of card order items in the card order batch. - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Indicates whether there are more items on the next page. - /// - /// Indicates whether there are more items on the next page. - [DataMember(Name = "hasNext", IsRequired = false, EmitDefaultValue = false)] - public bool? HasNext { get; set; } - - /// - /// Indicates whether there are more items on the previous page. - /// - /// Indicates whether there are more items on the previous page. - [DataMember(Name = "hasPrevious", IsRequired = false, EmitDefaultValue = false)] - public bool? HasPrevious { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaginatedGetCardOrderItemResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" HasNext: ").Append(HasNext).Append("\n"); - sb.Append(" HasPrevious: ").Append(HasPrevious).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaginatedGetCardOrderItemResponse); - } - - /// - /// Returns true if PaginatedGetCardOrderItemResponse instances are equal - /// - /// Instance of PaginatedGetCardOrderItemResponse to be compared - /// Boolean - public bool Equals(PaginatedGetCardOrderItemResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.HasNext == input.HasNext || - this.HasNext.Equals(input.HasNext) - ) && - ( - this.HasPrevious == input.HasPrevious || - this.HasPrevious.Equals(input.HasPrevious) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasNext.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPrevious.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.cs b/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.cs deleted file mode 100644 index 059125b20..000000000 --- a/Adyen/Model/BalancePlatform/PaginatedGetCardOrderResponse.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaginatedGetCardOrderResponse - /// - [DataContract(Name = "PaginatedGetCardOrderResponse")] - public partial class PaginatedGetCardOrderResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaginatedGetCardOrderResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Contains objects with information about card orders.. - /// Indicates whether there are more items on the next page. (required). - /// Indicates whether there are more items on the previous page. (required). - public PaginatedGetCardOrderResponse(List cardOrders = default(List), bool? hasNext = default(bool?), bool? hasPrevious = default(bool?)) - { - this.HasNext = hasNext; - this.HasPrevious = hasPrevious; - this.CardOrders = cardOrders; - } - - /// - /// Contains objects with information about card orders. - /// - /// Contains objects with information about card orders. - [DataMember(Name = "cardOrders", EmitDefaultValue = false)] - public List CardOrders { get; set; } - - /// - /// Indicates whether there are more items on the next page. - /// - /// Indicates whether there are more items on the next page. - [DataMember(Name = "hasNext", IsRequired = false, EmitDefaultValue = false)] - public bool? HasNext { get; set; } - - /// - /// Indicates whether there are more items on the previous page. - /// - /// Indicates whether there are more items on the previous page. - [DataMember(Name = "hasPrevious", IsRequired = false, EmitDefaultValue = false)] - public bool? HasPrevious { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaginatedGetCardOrderResponse {\n"); - sb.Append(" CardOrders: ").Append(CardOrders).Append("\n"); - sb.Append(" HasNext: ").Append(HasNext).Append("\n"); - sb.Append(" HasPrevious: ").Append(HasPrevious).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaginatedGetCardOrderResponse); - } - - /// - /// Returns true if PaginatedGetCardOrderResponse instances are equal - /// - /// Instance of PaginatedGetCardOrderResponse to be compared - /// Boolean - public bool Equals(PaginatedGetCardOrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CardOrders == input.CardOrders || - this.CardOrders != null && - input.CardOrders != null && - this.CardOrders.SequenceEqual(input.CardOrders) - ) && - ( - this.HasNext == input.HasNext || - this.HasNext.Equals(input.HasNext) - ) && - ( - this.HasPrevious == input.HasPrevious || - this.HasPrevious.Equals(input.HasPrevious) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardOrders != null) - { - hashCode = (hashCode * 59) + this.CardOrders.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasNext.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPrevious.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.cs b/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.cs deleted file mode 100644 index 6934c97c5..000000000 --- a/Adyen/Model/BalancePlatform/PaginatedPaymentInstrumentsResponse.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaginatedPaymentInstrumentsResponse - /// - [DataContract(Name = "PaginatedPaymentInstrumentsResponse")] - public partial class PaginatedPaymentInstrumentsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaginatedPaymentInstrumentsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether there are more items on the next page. (required). - /// Indicates whether there are more items on the previous page. (required). - /// List of payment instruments associated with the balance account. (required). - public PaginatedPaymentInstrumentsResponse(bool? hasNext = default(bool?), bool? hasPrevious = default(bool?), List paymentInstruments = default(List)) - { - this.HasNext = hasNext; - this.HasPrevious = hasPrevious; - this.PaymentInstruments = paymentInstruments; - } - - /// - /// Indicates whether there are more items on the next page. - /// - /// Indicates whether there are more items on the next page. - [DataMember(Name = "hasNext", IsRequired = false, EmitDefaultValue = false)] - public bool? HasNext { get; set; } - - /// - /// Indicates whether there are more items on the previous page. - /// - /// Indicates whether there are more items on the previous page. - [DataMember(Name = "hasPrevious", IsRequired = false, EmitDefaultValue = false)] - public bool? HasPrevious { get; set; } - - /// - /// List of payment instruments associated with the balance account. - /// - /// List of payment instruments associated with the balance account. - [DataMember(Name = "paymentInstruments", IsRequired = false, EmitDefaultValue = false)] - public List PaymentInstruments { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaginatedPaymentInstrumentsResponse {\n"); - sb.Append(" HasNext: ").Append(HasNext).Append("\n"); - sb.Append(" HasPrevious: ").Append(HasPrevious).Append("\n"); - sb.Append(" PaymentInstruments: ").Append(PaymentInstruments).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaginatedPaymentInstrumentsResponse); - } - - /// - /// Returns true if PaginatedPaymentInstrumentsResponse instances are equal - /// - /// Instance of PaginatedPaymentInstrumentsResponse to be compared - /// Boolean - public bool Equals(PaginatedPaymentInstrumentsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasNext == input.HasNext || - this.HasNext.Equals(input.HasNext) - ) && - ( - this.HasPrevious == input.HasPrevious || - this.HasPrevious.Equals(input.HasPrevious) - ) && - ( - this.PaymentInstruments == input.PaymentInstruments || - this.PaymentInstruments != null && - input.PaymentInstruments != null && - this.PaymentInstruments.SequenceEqual(input.PaymentInstruments) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasNext.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPrevious.GetHashCode(); - if (this.PaymentInstruments != null) - { - hashCode = (hashCode * 59) + this.PaymentInstruments.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrument.cs b/Adyen/Model/BalancePlatform/PaymentInstrument.cs deleted file mode 100644 index 20936aa90..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrument.cs +++ /dev/null @@ -1,479 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrument - /// - [DataContract(Name = "PaymentInstrument")] - public partial class PaymentInstrument : IEquatable, IValidatableObject - { - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusReasonEnum - { - /// - /// Enum AccountClosure for value: accountClosure - /// - [EnumMember(Value = "accountClosure")] - AccountClosure = 1, - - /// - /// Enum Damaged for value: damaged - /// - [EnumMember(Value = "damaged")] - Damaged = 2, - - /// - /// Enum EndOfLife for value: endOfLife - /// - [EnumMember(Value = "endOfLife")] - EndOfLife = 3, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 4, - - /// - /// Enum Lost for value: lost - /// - [EnumMember(Value = "lost")] - Lost = 5, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 6, - - /// - /// Enum Stolen for value: stolen - /// - [EnumMember(Value = "stolen")] - Stolen = 7, - - /// - /// Enum SuspectedFraud for value: suspectedFraud - /// - [EnumMember(Value = "suspectedFraud")] - SuspectedFraud = 8, - - /// - /// Enum TransactionRule for value: transactionRule - /// - [EnumMember(Value = "transactionRule")] - TransactionRule = 9 - - } - - - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [DataMember(Name = "statusReason", EmitDefaultValue = false)] - public StatusReasonEnum? StatusReason { get; set; } - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2 - - } - - - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrument() { } - /// - /// Initializes a new instance of the class. - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.. - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. (required). - /// bankAccount. - /// card. - /// Your description for the payment instrument, maximum 300 characters.. - /// The unique identifier of the payment instrument. (required). - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. (required). - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.. - /// Your reference for the payment instrument, maximum 150 characters.. - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. . - /// The status comment provides additional information for the statusReason of the payment instrument.. - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.. - /// The type of payment instrument. Possible values: **card**, **bankAccount**. (required). - public PaymentInstrument(List additionalBankAccountIdentifications = default(List), string balanceAccountId = default(string), BankAccountDetails bankAccount = default(BankAccountDetails), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string statusComment = default(string), StatusReasonEnum? statusReason = default(StatusReasonEnum?), TypeEnum type = default(TypeEnum)) - { - this.BalanceAccountId = balanceAccountId; - this.Id = id; - this.IssuingCountryCode = issuingCountryCode; - this.Type = type; - this.AdditionalBankAccountIdentifications = additionalBankAccountIdentifications; - this.BankAccount = bankAccount; - this.Card = card; - this.Description = description; - this.PaymentInstrumentGroupId = paymentInstrumentGroupId; - this.Reference = reference; - this.Status = status; - this.StatusComment = statusComment; - this.StatusReason = statusReason; - } - - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. - [DataMember(Name = "additionalBankAccountIdentifications", EmitDefaultValue = false)] - [Obsolete("Deprecated since Configuration API v2. Please use `bankAccount` object instead")] - public List AdditionalBankAccountIdentifications { get; set; } - - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. - [DataMember(Name = "balanceAccountId", IsRequired = false, EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountDetails BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Your description for the payment instrument, maximum 300 characters. - /// - /// Your description for the payment instrument, maximum 300 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the payment instrument. - /// - /// The unique identifier of the payment instrument. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - [DataMember(Name = "issuingCountryCode", IsRequired = false, EmitDefaultValue = false)] - public string IssuingCountryCode { get; set; } - - /// - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. - /// - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. - [DataMember(Name = "paymentInstrumentGroupId", EmitDefaultValue = false)] - public string PaymentInstrumentGroupId { get; set; } - - /// - /// Your reference for the payment instrument, maximum 150 characters. - /// - /// Your reference for the payment instrument, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The status comment provides additional information for the statusReason of the payment instrument. - /// - /// The status comment provides additional information for the statusReason of the payment instrument. - [DataMember(Name = "statusComment", EmitDefaultValue = false)] - public string StatusComment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrument {\n"); - sb.Append(" AdditionalBankAccountIdentifications: ").Append(AdditionalBankAccountIdentifications).Append("\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" IssuingCountryCode: ").Append(IssuingCountryCode).Append("\n"); - sb.Append(" PaymentInstrumentGroupId: ").Append(PaymentInstrumentGroupId).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StatusComment: ").Append(StatusComment).Append("\n"); - sb.Append(" StatusReason: ").Append(StatusReason).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrument); - } - - /// - /// Returns true if PaymentInstrument instances are equal - /// - /// Instance of PaymentInstrument to be compared - /// Boolean - public bool Equals(PaymentInstrument input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalBankAccountIdentifications == input.AdditionalBankAccountIdentifications || - this.AdditionalBankAccountIdentifications != null && - input.AdditionalBankAccountIdentifications != null && - this.AdditionalBankAccountIdentifications.SequenceEqual(input.AdditionalBankAccountIdentifications) - ) && - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuingCountryCode == input.IssuingCountryCode || - (this.IssuingCountryCode != null && - this.IssuingCountryCode.Equals(input.IssuingCountryCode)) - ) && - ( - this.PaymentInstrumentGroupId == input.PaymentInstrumentGroupId || - (this.PaymentInstrumentGroupId != null && - this.PaymentInstrumentGroupId.Equals(input.PaymentInstrumentGroupId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StatusComment == input.StatusComment || - (this.StatusComment != null && - this.StatusComment.Equals(input.StatusComment)) - ) && - ( - this.StatusReason == input.StatusReason || - this.StatusReason.Equals(input.StatusReason) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalBankAccountIdentifications != null) - { - hashCode = (hashCode * 59) + this.AdditionalBankAccountIdentifications.GetHashCode(); - } - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuingCountryCode != null) - { - hashCode = (hashCode * 59) + this.IssuingCountryCode.GetHashCode(); - } - if (this.PaymentInstrumentGroupId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentGroupId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StatusComment != null) - { - hashCode = (hashCode * 59) + this.StatusComment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusReason.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs deleted file mode 100644 index bdb9cd5f1..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentAdditionalBankAccountIdentificationsInner - /// - [JsonConverter(typeof(PaymentInstrumentAdditionalBankAccountIdentificationsInnerJsonConverter))] - [DataContract(Name = "PaymentInstrument_additionalBankAccountIdentifications_inner")] - public partial class PaymentInstrumentAdditionalBankAccountIdentificationsInner : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IbanAccountIdentification. - public PaymentInstrumentAdditionalBankAccountIdentificationsInner(IbanAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(IbanAccountIdentification)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: IbanAccountIdentification"); - } - } - } - - /// - /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of IbanAccountIdentification - public IbanAccountIdentification GetIbanAccountIdentification() - { - return (IbanAccountIdentification)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class PaymentInstrumentAdditionalBankAccountIdentificationsInner {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, PaymentInstrumentAdditionalBankAccountIdentificationsInner.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner - /// - /// JSON string - /// An instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner - public static PaymentInstrumentAdditionalBankAccountIdentificationsInner FromJson(string jsonString) - { - PaymentInstrumentAdditionalBankAccountIdentificationsInner newPaymentInstrumentAdditionalBankAccountIdentificationsInner = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newPaymentInstrumentAdditionalBankAccountIdentificationsInner; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the IbanAccountIdentification type enums - if (ContainsValue(type)) - { - newPaymentInstrumentAdditionalBankAccountIdentificationsInner = new PaymentInstrumentAdditionalBankAccountIdentificationsInner(JsonConvert.DeserializeObject(jsonString, PaymentInstrumentAdditionalBankAccountIdentificationsInner.SerializerSettings)); - matchedTypes.Add("IbanAccountIdentification"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newPaymentInstrumentAdditionalBankAccountIdentificationsInner; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentAdditionalBankAccountIdentificationsInner); - } - - /// - /// Returns true if PaymentInstrumentAdditionalBankAccountIdentificationsInner instances are equal - /// - /// Instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner to be compared - /// Boolean - public bool Equals(PaymentInstrumentAdditionalBankAccountIdentificationsInner input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for PaymentInstrumentAdditionalBankAccountIdentificationsInner - /// - public class PaymentInstrumentAdditionalBankAccountIdentificationsInnerJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(PaymentInstrumentAdditionalBankAccountIdentificationsInner).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return PaymentInstrumentAdditionalBankAccountIdentificationsInner.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.cs deleted file mode 100644 index 80eac9749..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentGroup.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentGroup - /// - [DataContract(Name = "PaymentInstrumentGroup")] - public partial class PaymentInstrumentGroup : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrumentGroup() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs. (required). - /// Your description for the payment instrument group.. - /// The unique identifier of the payment instrument group.. - /// Properties of the payment instrument group.. - /// Your reference for the payment instrument group.. - /// The tx variant of the payment instrument group. (required). - public PaymentInstrumentGroup(string balancePlatform = default(string), string description = default(string), string id = default(string), Dictionary properties = default(Dictionary), string reference = default(string), string txVariant = default(string)) - { - this.BalancePlatform = balancePlatform; - this.TxVariant = txVariant; - this.Description = description; - this.Id = id; - this.Properties = properties; - this.Reference = reference; - } - - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs. - [DataMember(Name = "balancePlatform", IsRequired = false, EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Your description for the payment instrument group. - /// - /// Your description for the payment instrument group. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the payment instrument group. - /// - /// The unique identifier of the payment instrument group. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Properties of the payment instrument group. - /// - /// Properties of the payment instrument group. - [DataMember(Name = "properties", EmitDefaultValue = false)] - public Dictionary Properties { get; set; } - - /// - /// Your reference for the payment instrument group. - /// - /// Your reference for the payment instrument group. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The tx variant of the payment instrument group. - /// - /// The tx variant of the payment instrument group. - [DataMember(Name = "txVariant", IsRequired = false, EmitDefaultValue = false)] - public string TxVariant { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentGroup {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Properties: ").Append(Properties).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" TxVariant: ").Append(TxVariant).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentGroup); - } - - /// - /// Returns true if PaymentInstrumentGroup instances are equal - /// - /// Instance of PaymentInstrumentGroup to be compared - /// Boolean - public bool Equals(PaymentInstrumentGroup input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Properties == input.Properties || - this.Properties != null && - input.Properties != null && - this.Properties.SequenceEqual(input.Properties) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.TxVariant == input.TxVariant || - (this.TxVariant != null && - this.TxVariant.Equals(input.TxVariant)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Properties != null) - { - hashCode = (hashCode * 59) + this.Properties.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.TxVariant != null) - { - hashCode = (hashCode * 59) + this.TxVariant.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.cs deleted file mode 100644 index 8137dfb05..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentGroupInfo.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentGroupInfo - /// - [DataContract(Name = "PaymentInstrumentGroupInfo")] - public partial class PaymentInstrumentGroupInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrumentGroupInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs. (required). - /// Your description for the payment instrument group.. - /// Properties of the payment instrument group.. - /// Your reference for the payment instrument group.. - /// The tx variant of the payment instrument group. (required). - public PaymentInstrumentGroupInfo(string balancePlatform = default(string), string description = default(string), Dictionary properties = default(Dictionary), string reference = default(string), string txVariant = default(string)) - { - this.BalancePlatform = balancePlatform; - this.TxVariant = txVariant; - this.Description = description; - this.Properties = properties; - this.Reference = reference; - } - - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs. - [DataMember(Name = "balancePlatform", IsRequired = false, EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Your description for the payment instrument group. - /// - /// Your description for the payment instrument group. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Properties of the payment instrument group. - /// - /// Properties of the payment instrument group. - [DataMember(Name = "properties", EmitDefaultValue = false)] - public Dictionary Properties { get; set; } - - /// - /// Your reference for the payment instrument group. - /// - /// Your reference for the payment instrument group. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The tx variant of the payment instrument group. - /// - /// The tx variant of the payment instrument group. - [DataMember(Name = "txVariant", IsRequired = false, EmitDefaultValue = false)] - public string TxVariant { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentGroupInfo {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Properties: ").Append(Properties).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" TxVariant: ").Append(TxVariant).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentGroupInfo); - } - - /// - /// Returns true if PaymentInstrumentGroupInfo instances are equal - /// - /// Instance of PaymentInstrumentGroupInfo to be compared - /// Boolean - public bool Equals(PaymentInstrumentGroupInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Properties == input.Properties || - this.Properties != null && - input.Properties != null && - this.Properties.SequenceEqual(input.Properties) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.TxVariant == input.TxVariant || - (this.TxVariant != null && - this.TxVariant.Equals(input.TxVariant)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Properties != null) - { - hashCode = (hashCode * 59) + this.Properties.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.TxVariant != null) - { - hashCode = (hashCode * 59) + this.TxVariant.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.cs deleted file mode 100644 index b7afaa5cb..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentInfo.cs +++ /dev/null @@ -1,439 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentInfo - /// - [DataContract(Name = "PaymentInstrumentInfo")] - public partial class PaymentInstrumentInfo : IEquatable, IValidatableObject - { - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusReasonEnum - { - /// - /// Enum AccountClosure for value: accountClosure - /// - [EnumMember(Value = "accountClosure")] - AccountClosure = 1, - - /// - /// Enum Damaged for value: damaged - /// - [EnumMember(Value = "damaged")] - Damaged = 2, - - /// - /// Enum EndOfLife for value: endOfLife - /// - [EnumMember(Value = "endOfLife")] - EndOfLife = 3, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 4, - - /// - /// Enum Lost for value: lost - /// - [EnumMember(Value = "lost")] - Lost = 5, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 6, - - /// - /// Enum Stolen for value: stolen - /// - [EnumMember(Value = "stolen")] - Stolen = 7, - - /// - /// Enum SuspectedFraud for value: suspectedFraud - /// - [EnumMember(Value = "suspectedFraud")] - SuspectedFraud = 8, - - /// - /// Enum TransactionRule for value: transactionRule - /// - [EnumMember(Value = "transactionRule")] - TransactionRule = 9 - - } - - - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [DataMember(Name = "statusReason", EmitDefaultValue = false)] - public StatusReasonEnum? StatusReason { get; set; } - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2 - - } - - - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrumentInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. (required). - /// bankAccount. - /// card. - /// Your description for the payment instrument, maximum 300 characters.. - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. (required). - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.. - /// Your reference for the payment instrument, maximum 150 characters.. - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. . - /// The status comment provides additional information for the statusReason of the payment instrument.. - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.. - /// The type of payment instrument. Possible values: **card**, **bankAccount**. (required). - public PaymentInstrumentInfo(string balanceAccountId = default(string), BankAccountModel bankAccount = default(BankAccountModel), CardInfo card = default(CardInfo), string description = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string statusComment = default(string), StatusReasonEnum? statusReason = default(StatusReasonEnum?), TypeEnum type = default(TypeEnum)) - { - this.BalanceAccountId = balanceAccountId; - this.IssuingCountryCode = issuingCountryCode; - this.Type = type; - this.BankAccount = bankAccount; - this.Card = card; - this.Description = description; - this.PaymentInstrumentGroupId = paymentInstrumentGroupId; - this.Reference = reference; - this.Status = status; - this.StatusComment = statusComment; - this.StatusReason = statusReason; - } - - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. - [DataMember(Name = "balanceAccountId", IsRequired = false, EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountModel BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public CardInfo Card { get; set; } - - /// - /// Your description for the payment instrument, maximum 300 characters. - /// - /// Your description for the payment instrument, maximum 300 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - [DataMember(Name = "issuingCountryCode", IsRequired = false, EmitDefaultValue = false)] - public string IssuingCountryCode { get; set; } - - /// - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. - /// - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. - [DataMember(Name = "paymentInstrumentGroupId", EmitDefaultValue = false)] - public string PaymentInstrumentGroupId { get; set; } - - /// - /// Your reference for the payment instrument, maximum 150 characters. - /// - /// Your reference for the payment instrument, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The status comment provides additional information for the statusReason of the payment instrument. - /// - /// The status comment provides additional information for the statusReason of the payment instrument. - [DataMember(Name = "statusComment", EmitDefaultValue = false)] - public string StatusComment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentInfo {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" IssuingCountryCode: ").Append(IssuingCountryCode).Append("\n"); - sb.Append(" PaymentInstrumentGroupId: ").Append(PaymentInstrumentGroupId).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StatusComment: ").Append(StatusComment).Append("\n"); - sb.Append(" StatusReason: ").Append(StatusReason).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentInfo); - } - - /// - /// Returns true if PaymentInstrumentInfo instances are equal - /// - /// Instance of PaymentInstrumentInfo to be compared - /// Boolean - public bool Equals(PaymentInstrumentInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.IssuingCountryCode == input.IssuingCountryCode || - (this.IssuingCountryCode != null && - this.IssuingCountryCode.Equals(input.IssuingCountryCode)) - ) && - ( - this.PaymentInstrumentGroupId == input.PaymentInstrumentGroupId || - (this.PaymentInstrumentGroupId != null && - this.PaymentInstrumentGroupId.Equals(input.PaymentInstrumentGroupId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StatusComment == input.StatusComment || - (this.StatusComment != null && - this.StatusComment.Equals(input.StatusComment)) - ) && - ( - this.StatusReason == input.StatusReason || - this.StatusReason.Equals(input.StatusReason) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.IssuingCountryCode != null) - { - hashCode = (hashCode * 59) + this.IssuingCountryCode.GetHashCode(); - } - if (this.PaymentInstrumentGroupId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentGroupId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StatusComment != null) - { - hashCode = (hashCode * 59) + this.StatusComment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusReason.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.cs deleted file mode 100644 index bc5073f4b..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentRequirement.cs +++ /dev/null @@ -1,254 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentRequirement - /// - [DataContract(Name = "PaymentInstrumentRequirement")] - public partial class PaymentInstrumentRequirement : IEquatable, IValidatableObject - { - /// - /// The type of the payment instrument. For example, \"BankAccount\" or \"Card\". - /// - /// The type of the payment instrument. For example, \"BankAccount\" or \"Card\". - [JsonConverter(typeof(StringEnumConverter))] - public enum PaymentInstrumentTypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Card for value: Card - /// - [EnumMember(Value = "Card")] - Card = 2 - - } - - - /// - /// The type of the payment instrument. For example, \"BankAccount\" or \"Card\". - /// - /// The type of the payment instrument. For example, \"BankAccount\" or \"Card\". - [DataMember(Name = "paymentInstrumentType", EmitDefaultValue = false)] - public PaymentInstrumentTypeEnum? PaymentInstrumentType { get; set; } - /// - /// **paymentInstrumentRequirement** - /// - /// **paymentInstrumentRequirement** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PaymentInstrumentRequirement for value: paymentInstrumentRequirement - /// - [EnumMember(Value = "paymentInstrumentRequirement")] - PaymentInstrumentRequirement = 1 - - } - - - /// - /// **paymentInstrumentRequirement** - /// - /// **paymentInstrumentRequirement** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrumentRequirement() { } - /// - /// Initializes a new instance of the class. - /// - /// Specifies the requirements for the payment instrument that need to be included in the request for a particular route.. - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**.. - /// The two-character ISO-3166-1 alpha-2 country code list for payment instruments.. - /// Specifies if the requirement only applies to transfers to another balance platform.. - /// The type of the payment instrument. For example, \"BankAccount\" or \"Card\".. - /// **paymentInstrumentRequirement** (required) (default to TypeEnum.PaymentInstrumentRequirement). - public PaymentInstrumentRequirement(string description = default(string), string issuingCountryCode = default(string), List issuingCountryCodes = default(List), bool? onlyForCrossBalancePlatform = default(bool?), PaymentInstrumentTypeEnum? paymentInstrumentType = default(PaymentInstrumentTypeEnum?), TypeEnum type = TypeEnum.PaymentInstrumentRequirement) - { - this.Type = type; - this.Description = description; - this.IssuingCountryCode = issuingCountryCode; - this.IssuingCountryCodes = issuingCountryCodes; - this.OnlyForCrossBalancePlatform = onlyForCrossBalancePlatform; - this.PaymentInstrumentType = paymentInstrumentType; - } - - /// - /// Specifies the requirements for the payment instrument that need to be included in the request for a particular route. - /// - /// Specifies the requirements for the payment instrument that need to be included in the request for a particular route. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - [DataMember(Name = "issuingCountryCode", EmitDefaultValue = false)] - public string IssuingCountryCode { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code list for payment instruments. - /// - /// The two-character ISO-3166-1 alpha-2 country code list for payment instruments. - [DataMember(Name = "issuingCountryCodes", EmitDefaultValue = false)] - public List IssuingCountryCodes { get; set; } - - /// - /// Specifies if the requirement only applies to transfers to another balance platform. - /// - /// Specifies if the requirement only applies to transfers to another balance platform. - [DataMember(Name = "onlyForCrossBalancePlatform", EmitDefaultValue = false)] - public bool? OnlyForCrossBalancePlatform { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentRequirement {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" IssuingCountryCode: ").Append(IssuingCountryCode).Append("\n"); - sb.Append(" IssuingCountryCodes: ").Append(IssuingCountryCodes).Append("\n"); - sb.Append(" OnlyForCrossBalancePlatform: ").Append(OnlyForCrossBalancePlatform).Append("\n"); - sb.Append(" PaymentInstrumentType: ").Append(PaymentInstrumentType).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentRequirement); - } - - /// - /// Returns true if PaymentInstrumentRequirement instances are equal - /// - /// Instance of PaymentInstrumentRequirement to be compared - /// Boolean - public bool Equals(PaymentInstrumentRequirement input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.IssuingCountryCode == input.IssuingCountryCode || - (this.IssuingCountryCode != null && - this.IssuingCountryCode.Equals(input.IssuingCountryCode)) - ) && - ( - this.IssuingCountryCodes == input.IssuingCountryCodes || - this.IssuingCountryCodes != null && - input.IssuingCountryCodes != null && - this.IssuingCountryCodes.SequenceEqual(input.IssuingCountryCodes) - ) && - ( - this.OnlyForCrossBalancePlatform == input.OnlyForCrossBalancePlatform || - this.OnlyForCrossBalancePlatform.Equals(input.OnlyForCrossBalancePlatform) - ) && - ( - this.PaymentInstrumentType == input.PaymentInstrumentType || - this.PaymentInstrumentType.Equals(input.PaymentInstrumentType) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.IssuingCountryCode != null) - { - hashCode = (hashCode * 59) + this.IssuingCountryCode.GetHashCode(); - } - if (this.IssuingCountryCodes != null) - { - hashCode = (hashCode * 59) + this.IssuingCountryCodes.GetHashCode(); - } - hashCode = (hashCode * 59) + this.OnlyForCrossBalancePlatform.GetHashCode(); - hashCode = (hashCode * 59) + this.PaymentInstrumentType.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.cs deleted file mode 100644 index b70e5c7b8..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentRevealInfo.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentRevealInfo - /// - [DataContract(Name = "PaymentInstrumentRevealInfo")] - public partial class PaymentInstrumentRevealInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrumentRevealInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The CVC2 value of the card. (required). - /// expiration (required). - /// The primary account number (PAN) of the card. (required). - public PaymentInstrumentRevealInfo(string cvc = default(string), Expiry expiration = default(Expiry), string pan = default(string)) - { - this.Cvc = cvc; - this.Expiration = expiration; - this.Pan = pan; - } - - /// - /// The CVC2 value of the card. - /// - /// The CVC2 value of the card. - [DataMember(Name = "cvc", IsRequired = false, EmitDefaultValue = false)] - public string Cvc { get; set; } - - /// - /// Gets or Sets Expiration - /// - [DataMember(Name = "expiration", IsRequired = false, EmitDefaultValue = false)] - public Expiry Expiration { get; set; } - - /// - /// The primary account number (PAN) of the card. - /// - /// The primary account number (PAN) of the card. - [DataMember(Name = "pan", IsRequired = false, EmitDefaultValue = false)] - public string Pan { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentRevealInfo {\n"); - sb.Append(" Cvc: ").Append(Cvc).Append("\n"); - sb.Append(" Expiration: ").Append(Expiration).Append("\n"); - sb.Append(" Pan: ").Append(Pan).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentRevealInfo); - } - - /// - /// Returns true if PaymentInstrumentRevealInfo instances are equal - /// - /// Instance of PaymentInstrumentRevealInfo to be compared - /// Boolean - public bool Equals(PaymentInstrumentRevealInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.Expiration == input.Expiration || - (this.Expiration != null && - this.Expiration.Equals(input.Expiration)) - ) && - ( - this.Pan == input.Pan || - (this.Pan != null && - this.Pan.Equals(input.Pan)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.Expiration != null) - { - hashCode = (hashCode * 59) + this.Expiration.GetHashCode(); - } - if (this.Pan != null) - { - hashCode = (hashCode * 59) + this.Pan.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.cs deleted file mode 100644 index 8ad9b0ffa..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentRevealRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentRevealRequest - /// - [DataContract(Name = "PaymentInstrumentRevealRequest")] - public partial class PaymentInstrumentRevealRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrumentRevealRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. (required). - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. (required). - public PaymentInstrumentRevealRequest(string encryptedKey = default(string), string paymentInstrumentId = default(string)) - { - this.EncryptedKey = encryptedKey; - this.PaymentInstrumentId = paymentInstrumentId; - } - - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. - [DataMember(Name = "encryptedKey", IsRequired = false, EmitDefaultValue = false)] - public string EncryptedKey { get; set; } - - /// - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. - /// - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. - [DataMember(Name = "paymentInstrumentId", IsRequired = false, EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentRevealRequest {\n"); - sb.Append(" EncryptedKey: ").Append(EncryptedKey).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentRevealRequest); - } - - /// - /// Returns true if PaymentInstrumentRevealRequest instances are equal - /// - /// Instance of PaymentInstrumentRevealRequest to be compared - /// Boolean - public bool Equals(PaymentInstrumentRevealRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.EncryptedKey == input.EncryptedKey || - (this.EncryptedKey != null && - this.EncryptedKey.Equals(input.EncryptedKey)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EncryptedKey != null) - { - hashCode = (hashCode * 59) + this.EncryptedKey.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.cs deleted file mode 100644 index e3e26362c..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentRevealResponse.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentRevealResponse - /// - [DataContract(Name = "PaymentInstrumentRevealResponse")] - public partial class PaymentInstrumentRevealResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrumentRevealResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The data encrypted using the `encryptedKey`. (required). - public PaymentInstrumentRevealResponse(string encryptedData = default(string)) - { - this.EncryptedData = encryptedData; - } - - /// - /// The data encrypted using the `encryptedKey`. - /// - /// The data encrypted using the `encryptedKey`. - [DataMember(Name = "encryptedData", IsRequired = false, EmitDefaultValue = false)] - public string EncryptedData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentRevealResponse {\n"); - sb.Append(" EncryptedData: ").Append(EncryptedData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentRevealResponse); - } - - /// - /// Returns true if PaymentInstrumentRevealResponse instances are equal - /// - /// Instance of PaymentInstrumentRevealResponse to be compared - /// Boolean - public bool Equals(PaymentInstrumentRevealResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.EncryptedData == input.EncryptedData || - (this.EncryptedData != null && - this.EncryptedData.Equals(input.EncryptedData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EncryptedData != null) - { - hashCode = (hashCode * 59) + this.EncryptedData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.cs b/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.cs deleted file mode 100644 index 17071fc08..000000000 --- a/Adyen/Model/BalancePlatform/PaymentInstrumentUpdateRequest.cs +++ /dev/null @@ -1,292 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PaymentInstrumentUpdateRequest - /// - [DataContract(Name = "PaymentInstrumentUpdateRequest")] - public partial class PaymentInstrumentUpdateRequest : IEquatable, IValidatableObject - { - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusReasonEnum - { - /// - /// Enum AccountClosure for value: accountClosure - /// - [EnumMember(Value = "accountClosure")] - AccountClosure = 1, - - /// - /// Enum Damaged for value: damaged - /// - [EnumMember(Value = "damaged")] - Damaged = 2, - - /// - /// Enum EndOfLife for value: endOfLife - /// - [EnumMember(Value = "endOfLife")] - EndOfLife = 3, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 4, - - /// - /// Enum Lost for value: lost - /// - [EnumMember(Value = "lost")] - Lost = 5, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 6, - - /// - /// Enum Stolen for value: stolen - /// - [EnumMember(Value = "stolen")] - Stolen = 7, - - /// - /// Enum SuspectedFraud for value: suspectedFraud - /// - [EnumMember(Value = "suspectedFraud")] - SuspectedFraud = 8, - - /// - /// Enum TransactionRule for value: transactionRule - /// - [EnumMember(Value = "transactionRule")] - TransactionRule = 9 - - } - - - /// - /// The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [DataMember(Name = "statusReason", EmitDefaultValue = false)] - public StatusReasonEnum? StatusReason { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance account associated with this payment instrument. >You can only change the balance account ID if the payment instrument has **inactive** status.. - /// card. - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. . - /// Comment for the status of the payment instrument. Required if `statusReason` is **other**.. - /// The reason for updating the status of the payment instrument. Possible values: **lost**, **stolen**, **damaged**, **suspectedFraud**, **expired**, **endOfLife**, **accountClosure**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.. - public PaymentInstrumentUpdateRequest(string balanceAccountId = default(string), CardInfo card = default(CardInfo), StatusEnum? status = default(StatusEnum?), string statusComment = default(string), StatusReasonEnum? statusReason = default(StatusReasonEnum?)) - { - this.BalanceAccountId = balanceAccountId; - this.Card = card; - this.Status = status; - this.StatusComment = statusComment; - this.StatusReason = statusReason; - } - - /// - /// The unique identifier of the balance account associated with this payment instrument. >You can only change the balance account ID if the payment instrument has **inactive** status. - /// - /// The unique identifier of the balance account associated with this payment instrument. >You can only change the balance account ID if the payment instrument has **inactive** status. - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public CardInfo Card { get; set; } - - /// - /// Comment for the status of the payment instrument. Required if `statusReason` is **other**. - /// - /// Comment for the status of the payment instrument. Required if `statusReason` is **other**. - [DataMember(Name = "statusComment", EmitDefaultValue = false)] - public string StatusComment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentUpdateRequest {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StatusComment: ").Append(StatusComment).Append("\n"); - sb.Append(" StatusReason: ").Append(StatusReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentUpdateRequest); - } - - /// - /// Returns true if PaymentInstrumentUpdateRequest instances are equal - /// - /// Instance of PaymentInstrumentUpdateRequest to be compared - /// Boolean - public bool Equals(PaymentInstrumentUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StatusComment == input.StatusComment || - (this.StatusComment != null && - this.StatusComment.Equals(input.StatusComment)) - ) && - ( - this.StatusReason == input.StatusReason || - this.StatusReason.Equals(input.StatusReason) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StatusComment != null) - { - hashCode = (hashCode * 59) + this.StatusComment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusReason.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Phone.cs b/Adyen/Model/BalancePlatform/Phone.cs deleted file mode 100644 index 8e19df17f..000000000 --- a/Adyen/Model/BalancePlatform/Phone.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Phone - /// - [DataContract(Name = "Phone")] - public partial class Phone : IEquatable, IValidatableObject - { - /// - /// Type of phone number. Possible values: **Landline**, **Mobile**. - /// - /// Type of phone number. Possible values: **Landline**, **Mobile**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Landline for value: landline - /// - [EnumMember(Value = "landline")] - Landline = 1, - - /// - /// Enum Mobile for value: mobile - /// - [EnumMember(Value = "mobile")] - Mobile = 2 - - } - - - /// - /// Type of phone number. Possible values: **Landline**, **Mobile**. - /// - /// Type of phone number. Possible values: **Landline**, **Mobile**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Phone() { } - /// - /// Initializes a new instance of the class. - /// - /// The full phone number provided as a single string. For example, **\"0031 6 11 22 33 44\"**, **\"+316/1122-3344\"**, or **\"(0031) 611223344\"**. (required). - /// Type of phone number. Possible values: **Landline**, **Mobile**. (required). - public Phone(string number = default(string), TypeEnum type = default(TypeEnum)) - { - this.Number = number; - this.Type = type; - } - - /// - /// The full phone number provided as a single string. For example, **\"0031 6 11 22 33 44\"**, **\"+316/1122-3344\"**, or **\"(0031) 611223344\"**. - /// - /// The full phone number provided as a single string. For example, **\"0031 6 11 22 33 44\"**, **\"+316/1122-3344\"**, or **\"(0031) 611223344\"**. - [DataMember(Name = "number", IsRequired = false, EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Phone {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Phone); - } - - /// - /// Returns true if Phone instances are equal - /// - /// Instance of Phone to be compared - /// Boolean - public bool Equals(Phone input) - { - if (input == null) - { - return false; - } - return - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PhoneNumber.cs b/Adyen/Model/BalancePlatform/PhoneNumber.cs deleted file mode 100644 index 7dbffc7ed..000000000 --- a/Adyen/Model/BalancePlatform/PhoneNumber.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PhoneNumber - /// - [DataContract(Name = "PhoneNumber")] - public partial class PhoneNumber : IEquatable, IValidatableObject - { - /// - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. - /// - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. - [JsonConverter(typeof(StringEnumConverter))] - public enum PhoneTypeEnum - { - /// - /// Enum Fax for value: Fax - /// - [EnumMember(Value = "Fax")] - Fax = 1, - - /// - /// Enum Landline for value: Landline - /// - [EnumMember(Value = "Landline")] - Landline = 2, - - /// - /// Enum Mobile for value: Mobile - /// - [EnumMember(Value = "Mobile")] - Mobile = 3, - - /// - /// Enum SIP for value: SIP - /// - [EnumMember(Value = "SIP")] - SIP = 4 - - } - - - /// - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. - /// - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. - [DataMember(Name = "phoneType", EmitDefaultValue = false)] - public PhoneTypeEnum? PhoneType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**.. - /// The phone number. The inclusion of the phone number country code is not necessary.. - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**.. - public PhoneNumber(string phoneCountryCode = default(string), string phoneNumber = default(string), PhoneTypeEnum? phoneType = default(PhoneTypeEnum?)) - { - this.PhoneCountryCode = phoneCountryCode; - this._PhoneNumber = phoneNumber; - this.PhoneType = phoneType; - } - - /// - /// The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**. - /// - /// The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**. - [DataMember(Name = "phoneCountryCode", EmitDefaultValue = false)] - public string PhoneCountryCode { get; set; } - - /// - /// The phone number. The inclusion of the phone number country code is not necessary. - /// - /// The phone number. The inclusion of the phone number country code is not necessary. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string _PhoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PhoneNumber {\n"); - sb.Append(" PhoneCountryCode: ").Append(PhoneCountryCode).Append("\n"); - sb.Append(" _PhoneNumber: ").Append(_PhoneNumber).Append("\n"); - sb.Append(" PhoneType: ").Append(PhoneType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PhoneNumber); - } - - /// - /// Returns true if PhoneNumber instances are equal - /// - /// Instance of PhoneNumber to be compared - /// Boolean - public bool Equals(PhoneNumber input) - { - if (input == null) - { - return false; - } - return - ( - this.PhoneCountryCode == input.PhoneCountryCode || - (this.PhoneCountryCode != null && - this.PhoneCountryCode.Equals(input.PhoneCountryCode)) - ) && - ( - this._PhoneNumber == input._PhoneNumber || - (this._PhoneNumber != null && - this._PhoneNumber.Equals(input._PhoneNumber)) - ) && - ( - this.PhoneType == input.PhoneType || - this.PhoneType.Equals(input.PhoneType) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PhoneCountryCode != null) - { - hashCode = (hashCode * 59) + this.PhoneCountryCode.GetHashCode(); - } - if (this._PhoneNumber != null) - { - hashCode = (hashCode * 59) + this._PhoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PhoneType.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PinChangeRequest.cs b/Adyen/Model/BalancePlatform/PinChangeRequest.cs deleted file mode 100644 index d22fb8013..000000000 --- a/Adyen/Model/BalancePlatform/PinChangeRequest.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PinChangeRequest - /// - [DataContract(Name = "PinChangeRequest")] - public partial class PinChangeRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PinChangeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. (required). - /// The encrypted [PIN block](https://www.pcisecuritystandards.org/glossary/pin-block). (required). - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. (required). - /// The 16-digit token that you used to generate the `encryptedPinBlock`. (required). - public PinChangeRequest(string encryptedKey = default(string), string encryptedPinBlock = default(string), string paymentInstrumentId = default(string), string token = default(string)) - { - this.EncryptedKey = encryptedKey; - this.EncryptedPinBlock = encryptedPinBlock; - this.PaymentInstrumentId = paymentInstrumentId; - this.Token = token; - } - - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. - [DataMember(Name = "encryptedKey", IsRequired = false, EmitDefaultValue = false)] - public string EncryptedKey { get; set; } - - /// - /// The encrypted [PIN block](https://www.pcisecuritystandards.org/glossary/pin-block). - /// - /// The encrypted [PIN block](https://www.pcisecuritystandards.org/glossary/pin-block). - [DataMember(Name = "encryptedPinBlock", IsRequired = false, EmitDefaultValue = false)] - public string EncryptedPinBlock { get; set; } - - /// - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. - /// - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. - [DataMember(Name = "paymentInstrumentId", IsRequired = false, EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// The 16-digit token that you used to generate the `encryptedPinBlock`. - /// - /// The 16-digit token that you used to generate the `encryptedPinBlock`. - [DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] - public string Token { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PinChangeRequest {\n"); - sb.Append(" EncryptedKey: ").Append(EncryptedKey).Append("\n"); - sb.Append(" EncryptedPinBlock: ").Append(EncryptedPinBlock).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PinChangeRequest); - } - - /// - /// Returns true if PinChangeRequest instances are equal - /// - /// Instance of PinChangeRequest to be compared - /// Boolean - public bool Equals(PinChangeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.EncryptedKey == input.EncryptedKey || - (this.EncryptedKey != null && - this.EncryptedKey.Equals(input.EncryptedKey)) - ) && - ( - this.EncryptedPinBlock == input.EncryptedPinBlock || - (this.EncryptedPinBlock != null && - this.EncryptedPinBlock.Equals(input.EncryptedPinBlock)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EncryptedKey != null) - { - hashCode = (hashCode * 59) + this.EncryptedKey.GetHashCode(); - } - if (this.EncryptedPinBlock != null) - { - hashCode = (hashCode * 59) + this.EncryptedPinBlock.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PinChangeResponse.cs b/Adyen/Model/BalancePlatform/PinChangeResponse.cs deleted file mode 100644 index 78aa8c4d1..000000000 --- a/Adyen/Model/BalancePlatform/PinChangeResponse.cs +++ /dev/null @@ -1,157 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PinChangeResponse - /// - [DataContract(Name = "PinChangeResponse")] - public partial class PinChangeResponse : IEquatable, IValidatableObject - { - /// - /// The status of the request for PIN change. Possible values: **completed**, **pending**, **unavailable**. - /// - /// The status of the request for PIN change. Possible values: **completed**, **pending**, **unavailable**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Completed for value: completed - /// - [EnumMember(Value = "completed")] - Completed = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Unavailable for value: unavailable - /// - [EnumMember(Value = "unavailable")] - Unavailable = 3 - - } - - - /// - /// The status of the request for PIN change. Possible values: **completed**, **pending**, **unavailable**. - /// - /// The status of the request for PIN change. Possible values: **completed**, **pending**, **unavailable**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PinChangeResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The status of the request for PIN change. Possible values: **completed**, **pending**, **unavailable**. (required). - public PinChangeResponse(StatusEnum status = default(StatusEnum)) - { - this.Status = status; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PinChangeResponse {\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PinChangeResponse); - } - - /// - /// Returns true if PinChangeResponse instances are equal - /// - /// Instance of PinChangeResponse to be compared - /// Boolean - public bool Equals(PinChangeResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.cs b/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.cs deleted file mode 100644 index 622f7e34b..000000000 --- a/Adyen/Model/BalancePlatform/PlatformPaymentConfiguration.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PlatformPaymentConfiguration - /// - [DataContract(Name = "PlatformPaymentConfiguration")] - public partial class PlatformPaymentConfiguration : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Specifies at what time a [sales day](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#sales-day) ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**.. - /// Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **1** to **20**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**.. - public PlatformPaymentConfiguration(string salesDayClosingTime = default(string), int? settlementDelayDays = default(int?)) - { - this.SalesDayClosingTime = salesDayClosingTime; - this.SettlementDelayDays = settlementDelayDays; - } - - /// - /// Specifies at what time a [sales day](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#sales-day) ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. - /// - /// Specifies at what time a [sales day](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#sales-day) ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. - [DataMember(Name = "salesDayClosingTime", EmitDefaultValue = false)] - public string SalesDayClosingTime { get; set; } - - /// - /// Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **1** to **20**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**. - /// - /// Specifies after how many business days the funds in a [settlement batch](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement#settlement-batch) are made available in this balance account. Possible values: **1** to **20**, or **null**. * Setting this value to an integer enables Sales day settlement in this balance account. See how Sales day settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/sales-day-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/sales-day-settlement). * Setting this value to **null** enables Pass-through settlement in this balance account. See how Pass-through settlement works in your [marketplace](https://docs.adyen.com/marketplaces/settle-funds/pass-through-settlement) or [platform](https://docs.adyen.com/platforms/settle-funds/pass-through-settlement). Default value: **null**. - [DataMember(Name = "settlementDelayDays", EmitDefaultValue = false)] - public int? SettlementDelayDays { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PlatformPaymentConfiguration {\n"); - sb.Append(" SalesDayClosingTime: ").Append(SalesDayClosingTime).Append("\n"); - sb.Append(" SettlementDelayDays: ").Append(SettlementDelayDays).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlatformPaymentConfiguration); - } - - /// - /// Returns true if PlatformPaymentConfiguration instances are equal - /// - /// Instance of PlatformPaymentConfiguration to be compared - /// Boolean - public bool Equals(PlatformPaymentConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.SalesDayClosingTime == input.SalesDayClosingTime || - (this.SalesDayClosingTime != null && - this.SalesDayClosingTime.Equals(input.SalesDayClosingTime)) - ) && - ( - this.SettlementDelayDays == input.SettlementDelayDays || - this.SettlementDelayDays.Equals(input.SettlementDelayDays) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SalesDayClosingTime != null) - { - hashCode = (hashCode * 59) + this.SalesDayClosingTime.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SettlementDelayDays.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.cs b/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.cs deleted file mode 100644 index 27e534acd..000000000 --- a/Adyen/Model/BalancePlatform/ProcessingTypesRestriction.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// ProcessingTypesRestriction - /// - [DataContract(Name = "ProcessingTypesRestriction")] - public partial class ProcessingTypesRestriction : IEquatable, IValidatableObject - { - /// - /// Defines Value - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ValueEnum - { - /// - /// Enum AtmWithdraw for value: atmWithdraw - /// - [EnumMember(Value = "atmWithdraw")] - AtmWithdraw = 1, - - /// - /// Enum BalanceInquiry for value: balanceInquiry - /// - [EnumMember(Value = "balanceInquiry")] - BalanceInquiry = 2, - - /// - /// Enum Ecommerce for value: ecommerce - /// - [EnumMember(Value = "ecommerce")] - Ecommerce = 3, - - /// - /// Enum Moto for value: moto - /// - [EnumMember(Value = "moto")] - Moto = 4, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 5, - - /// - /// Enum Recurring for value: recurring - /// - [EnumMember(Value = "recurring")] - Recurring = 6, - - /// - /// Enum Token for value: token - /// - [EnumMember(Value = "token")] - Token = 7, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 8 - - } - - - - /// - /// List of processing types. Possible values: **atmWithdraw**, **balanceInquiry**, **ecommerce**, **moto**, **pos**, **recurring**, **token**. - /// - /// List of processing types. Possible values: **atmWithdraw**, **balanceInquiry**, **ecommerce**, **moto**, **pos**, **recurring**, **token**. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProcessingTypesRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// List of processing types. Possible values: **atmWithdraw**, **balanceInquiry**, **ecommerce**, **moto**, **pos**, **recurring**, **token**. . - public ProcessingTypesRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ProcessingTypesRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ProcessingTypesRestriction); - } - - /// - /// Returns true if ProcessingTypesRestriction instances are equal - /// - /// Instance of ProcessingTypesRestriction to be compared - /// Boolean - public bool Equals(ProcessingTypesRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/PublicKeyResponse.cs b/Adyen/Model/BalancePlatform/PublicKeyResponse.cs deleted file mode 100644 index 0c9e33d1b..000000000 --- a/Adyen/Model/BalancePlatform/PublicKeyResponse.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// PublicKeyResponse - /// - [DataContract(Name = "PublicKeyResponse")] - public partial class PublicKeyResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PublicKeyResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The public key you need for encrypting a symmetric session key. (required). - /// The expiry date of the public key. (required). - public PublicKeyResponse(string publicKey = default(string), string publicKeyExpiryDate = default(string)) - { - this.PublicKey = publicKey; - this.PublicKeyExpiryDate = publicKeyExpiryDate; - } - - /// - /// The public key you need for encrypting a symmetric session key. - /// - /// The public key you need for encrypting a symmetric session key. - [DataMember(Name = "publicKey", IsRequired = false, EmitDefaultValue = false)] - public string PublicKey { get; set; } - - /// - /// The expiry date of the public key. - /// - /// The expiry date of the public key. - [DataMember(Name = "publicKeyExpiryDate", IsRequired = false, EmitDefaultValue = false)] - public string PublicKeyExpiryDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PublicKeyResponse {\n"); - sb.Append(" PublicKey: ").Append(PublicKey).Append("\n"); - sb.Append(" PublicKeyExpiryDate: ").Append(PublicKeyExpiryDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PublicKeyResponse); - } - - /// - /// Returns true if PublicKeyResponse instances are equal - /// - /// Instance of PublicKeyResponse to be compared - /// Boolean - public bool Equals(PublicKeyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.PublicKey == input.PublicKey || - (this.PublicKey != null && - this.PublicKey.Equals(input.PublicKey)) - ) && - ( - this.PublicKeyExpiryDate == input.PublicKeyExpiryDate || - (this.PublicKeyExpiryDate != null && - this.PublicKeyExpiryDate.Equals(input.PublicKeyExpiryDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PublicKey != null) - { - hashCode = (hashCode * 59) + this.PublicKey.GetHashCode(); - } - if (this.PublicKeyExpiryDate != null) - { - hashCode = (hashCode * 59) + this.PublicKeyExpiryDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RegisterSCAFinalResponse.cs b/Adyen/Model/BalancePlatform/RegisterSCAFinalResponse.cs deleted file mode 100644 index c4e3984e3..000000000 --- a/Adyen/Model/BalancePlatform/RegisterSCAFinalResponse.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RegisterSCAFinalResponse - /// - [DataContract(Name = "RegisterSCAFinalResponse")] - public partial class RegisterSCAFinalResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Specifies if the registration was initiated successfully.. - public RegisterSCAFinalResponse(bool? success = default(bool?)) - { - this.Success = success; - } - - /// - /// Specifies if the registration was initiated successfully. - /// - /// Specifies if the registration was initiated successfully. - [DataMember(Name = "success", EmitDefaultValue = false)] - public bool? Success { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RegisterSCAFinalResponse {\n"); - sb.Append(" Success: ").Append(Success).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RegisterSCAFinalResponse); - } - - /// - /// Returns true if RegisterSCAFinalResponse instances are equal - /// - /// Instance of RegisterSCAFinalResponse to be compared - /// Boolean - public bool Equals(RegisterSCAFinalResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Success == input.Success || - this.Success.Equals(input.Success) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Success.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RegisterSCARequest.cs b/Adyen/Model/BalancePlatform/RegisterSCARequest.cs deleted file mode 100644 index 1875dea62..000000000 --- a/Adyen/Model/BalancePlatform/RegisterSCARequest.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RegisterSCARequest - /// - [DataContract(Name = "RegisterSCARequest")] - public partial class RegisterSCARequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RegisterSCARequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the SCA device that you are registering. You can use it to help your users identify the device. If you do not specify a `name`, Adyen automatically generates one.. - /// The unique identifier of the payment instrument for which you are registering the SCA device. (required). - /// strongCustomerAuthentication (required). - public RegisterSCARequest(string name = default(string), string paymentInstrumentId = default(string), DelegatedAuthenticationData strongCustomerAuthentication = default(DelegatedAuthenticationData)) - { - this.PaymentInstrumentId = paymentInstrumentId; - this.StrongCustomerAuthentication = strongCustomerAuthentication; - this.Name = name; - } - - /// - /// The name of the SCA device that you are registering. You can use it to help your users identify the device. If you do not specify a `name`, Adyen automatically generates one. - /// - /// The name of the SCA device that you are registering. You can use it to help your users identify the device. If you do not specify a `name`, Adyen automatically generates one. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The unique identifier of the payment instrument for which you are registering the SCA device. - /// - /// The unique identifier of the payment instrument for which you are registering the SCA device. - [DataMember(Name = "paymentInstrumentId", IsRequired = false, EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Gets or Sets StrongCustomerAuthentication - /// - [DataMember(Name = "strongCustomerAuthentication", IsRequired = false, EmitDefaultValue = false)] - public DelegatedAuthenticationData StrongCustomerAuthentication { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RegisterSCARequest {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" StrongCustomerAuthentication: ").Append(StrongCustomerAuthentication).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RegisterSCARequest); - } - - /// - /// Returns true if RegisterSCARequest instances are equal - /// - /// Instance of RegisterSCARequest to be compared - /// Boolean - public bool Equals(RegisterSCARequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.StrongCustomerAuthentication == input.StrongCustomerAuthentication || - (this.StrongCustomerAuthentication != null && - this.StrongCustomerAuthentication.Equals(input.StrongCustomerAuthentication)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - if (this.StrongCustomerAuthentication != null) - { - hashCode = (hashCode * 59) + this.StrongCustomerAuthentication.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RegisterSCAResponse.cs b/Adyen/Model/BalancePlatform/RegisterSCAResponse.cs deleted file mode 100644 index a639d57fd..000000000 --- a/Adyen/Model/BalancePlatform/RegisterSCAResponse.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RegisterSCAResponse - /// - [DataContract(Name = "RegisterSCAResponse")] - public partial class RegisterSCAResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the SCA device you are registering.. - /// The unique identifier of the payment instrument for which you are registering the SCA device.. - /// A string that you must pass to the authentication SDK to continue with the registration process.. - /// Specifies if the registration was initiated successfully.. - public RegisterSCAResponse(string id = default(string), string paymentInstrumentId = default(string), string sdkInput = default(string), bool? success = default(bool?)) - { - this.Id = id; - this.PaymentInstrumentId = paymentInstrumentId; - this.SdkInput = sdkInput; - this.Success = success; - } - - /// - /// The unique identifier of the SCA device you are registering. - /// - /// The unique identifier of the SCA device you are registering. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the payment instrument for which you are registering the SCA device. - /// - /// The unique identifier of the payment instrument for which you are registering the SCA device. - [DataMember(Name = "paymentInstrumentId", EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// A string that you must pass to the authentication SDK to continue with the registration process. - /// - /// A string that you must pass to the authentication SDK to continue with the registration process. - [DataMember(Name = "sdkInput", EmitDefaultValue = false)] - public string SdkInput { get; set; } - - /// - /// Specifies if the registration was initiated successfully. - /// - /// Specifies if the registration was initiated successfully. - [DataMember(Name = "success", EmitDefaultValue = false)] - public bool? Success { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RegisterSCAResponse {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" SdkInput: ").Append(SdkInput).Append("\n"); - sb.Append(" Success: ").Append(Success).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RegisterSCAResponse); - } - - /// - /// Returns true if RegisterSCAResponse instances are equal - /// - /// Instance of RegisterSCAResponse to be compared - /// Boolean - public bool Equals(RegisterSCAResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.SdkInput == input.SdkInput || - (this.SdkInput != null && - this.SdkInput.Equals(input.SdkInput)) - ) && - ( - this.Success == input.Success || - this.Success.Equals(input.Success) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - if (this.SdkInput != null) - { - hashCode = (hashCode * 59) + this.SdkInput.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Success.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // SdkInput (string) maxLength - if (this.SdkInput != null && this.SdkInput.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SdkInput, length must be less than 20000.", new [] { "SdkInput" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RemediatingAction.cs b/Adyen/Model/BalancePlatform/RemediatingAction.cs deleted file mode 100644 index aedde1254..000000000 --- a/Adyen/Model/BalancePlatform/RemediatingAction.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RemediatingAction - /// - [DataContract(Name = "RemediatingAction")] - public partial class RemediatingAction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The remediating action code.. - /// A description of how you can resolve the verification error.. - public RemediatingAction(string code = default(string), string message = default(string)) - { - this.Code = code; - this.Message = message; - } - - /// - /// The remediating action code. - /// - /// The remediating action code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// A description of how you can resolve the verification error. - /// - /// A description of how you can resolve the verification error. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RemediatingAction {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RemediatingAction); - } - - /// - /// Returns true if RemediatingAction instances are equal - /// - /// Instance of RemediatingAction to be compared - /// Boolean - public bool Equals(RemediatingAction input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/Repayment.cs b/Adyen/Model/BalancePlatform/Repayment.cs deleted file mode 100644 index 4d92207c4..000000000 --- a/Adyen/Model/BalancePlatform/Repayment.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// Repayment - /// - [DataContract(Name = "Repayment")] - public partial class Repayment : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Repayment() { } - /// - /// Initializes a new instance of the class. - /// - /// The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). (required). - /// term. - /// threshold. - public Repayment(int? basisPoints = default(int?), RepaymentTerm term = default(RepaymentTerm), ThresholdRepayment threshold = default(ThresholdRepayment)) - { - this.BasisPoints = basisPoints; - this.Term = term; - this.Threshold = threshold; - } - - /// - /// The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). - /// - /// The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). - [DataMember(Name = "basisPoints", IsRequired = false, EmitDefaultValue = false)] - public int? BasisPoints { get; set; } - - /// - /// Gets or Sets Term - /// - [DataMember(Name = "term", EmitDefaultValue = false)] - public RepaymentTerm Term { get; set; } - - /// - /// Gets or Sets Threshold - /// - [DataMember(Name = "threshold", EmitDefaultValue = false)] - public ThresholdRepayment Threshold { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Repayment {\n"); - sb.Append(" BasisPoints: ").Append(BasisPoints).Append("\n"); - sb.Append(" Term: ").Append(Term).Append("\n"); - sb.Append(" Threshold: ").Append(Threshold).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Repayment); - } - - /// - /// Returns true if Repayment instances are equal - /// - /// Instance of Repayment to be compared - /// Boolean - public bool Equals(Repayment input) - { - if (input == null) - { - return false; - } - return - ( - this.BasisPoints == input.BasisPoints || - this.BasisPoints.Equals(input.BasisPoints) - ) && - ( - this.Term == input.Term || - (this.Term != null && - this.Term.Equals(input.Term)) - ) && - ( - this.Threshold == input.Threshold || - (this.Threshold != null && - this.Threshold.Equals(input.Threshold)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.BasisPoints.GetHashCode(); - if (this.Term != null) - { - hashCode = (hashCode * 59) + this.Term.GetHashCode(); - } - if (this.Threshold != null) - { - hashCode = (hashCode * 59) + this.Threshold.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RepaymentTerm.cs b/Adyen/Model/BalancePlatform/RepaymentTerm.cs deleted file mode 100644 index ee97338b3..000000000 --- a/Adyen/Model/BalancePlatform/RepaymentTerm.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RepaymentTerm - /// - [DataContract(Name = "RepaymentTerm")] - public partial class RepaymentTerm : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RepaymentTerm() { } - /// - /// Initializes a new instance of the class. - /// - /// The estimated term for repaying the grant, in days. (required). - /// The maximum term for repaying the grant, in days. Only applies when `contractType` is **loan**.. - public RepaymentTerm(int? estimatedDays = default(int?), int? maximumDays = default(int?)) - { - this.EstimatedDays = estimatedDays; - this.MaximumDays = maximumDays; - } - - /// - /// The estimated term for repaying the grant, in days. - /// - /// The estimated term for repaying the grant, in days. - [DataMember(Name = "estimatedDays", IsRequired = false, EmitDefaultValue = false)] - public int? EstimatedDays { get; set; } - - /// - /// The maximum term for repaying the grant, in days. Only applies when `contractType` is **loan**. - /// - /// The maximum term for repaying the grant, in days. Only applies when `contractType` is **loan**. - [DataMember(Name = "maximumDays", EmitDefaultValue = false)] - public int? MaximumDays { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RepaymentTerm {\n"); - sb.Append(" EstimatedDays: ").Append(EstimatedDays).Append("\n"); - sb.Append(" MaximumDays: ").Append(MaximumDays).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RepaymentTerm); - } - - /// - /// Returns true if RepaymentTerm instances are equal - /// - /// Instance of RepaymentTerm to be compared - /// Boolean - public bool Equals(RepaymentTerm input) - { - if (input == null) - { - return false; - } - return - ( - this.EstimatedDays == input.EstimatedDays || - this.EstimatedDays.Equals(input.EstimatedDays) - ) && - ( - this.MaximumDays == input.MaximumDays || - this.MaximumDays.Equals(input.MaximumDays) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EstimatedDays.GetHashCode(); - hashCode = (hashCode * 59) + this.MaximumDays.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RestServiceError.cs b/Adyen/Model/BalancePlatform/RestServiceError.cs deleted file mode 100644 index 9301f2bac..000000000 --- a/Adyen/Model/BalancePlatform/RestServiceError.cs +++ /dev/null @@ -1,282 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RestServiceError - /// - [DataContract(Name = "RestServiceError")] - public partial class RestServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RestServiceError() { } - /// - /// Initializes a new instance of the class. - /// - /// A human-readable explanation specific to this occurrence of the problem. (required). - /// A code that identifies the problem type. (required). - /// A unique URI that identifies the specific occurrence of the problem.. - /// Detailed explanation of each validation error, when applicable.. - /// A unique reference for the request, essentially the same as `pspReference`.. - /// response. - /// The HTTP status code. (required). - /// A short, human-readable summary of the problem type. (required). - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. (required). - public RestServiceError(string detail = default(string), string errorCode = default(string), string instance = default(string), List invalidFields = default(List), string requestId = default(string), Object response = default(Object), int? status = default(int?), string title = default(string), string type = default(string)) - { - this.Detail = detail; - this.ErrorCode = errorCode; - this.Status = status; - this.Title = title; - this.Type = type; - this.Instance = instance; - this.InvalidFields = invalidFields; - this.RequestId = requestId; - this.Response = response; - } - - /// - /// A human-readable explanation specific to this occurrence of the problem. - /// - /// A human-readable explanation specific to this occurrence of the problem. - [DataMember(Name = "detail", IsRequired = false, EmitDefaultValue = false)] - public string Detail { get; set; } - - /// - /// A code that identifies the problem type. - /// - /// A code that identifies the problem type. - [DataMember(Name = "errorCode", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// A unique URI that identifies the specific occurrence of the problem. - /// - /// A unique URI that identifies the specific occurrence of the problem. - [DataMember(Name = "instance", EmitDefaultValue = false)] - public string Instance { get; set; } - - /// - /// Detailed explanation of each validation error, when applicable. - /// - /// Detailed explanation of each validation error, when applicable. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A unique reference for the request, essentially the same as `pspReference`. - /// - /// A unique reference for the request, essentially the same as `pspReference`. - [DataMember(Name = "requestId", EmitDefaultValue = false)] - public string RequestId { get; set; } - - /// - /// Gets or Sets Response - /// - [DataMember(Name = "response", EmitDefaultValue = false)] - public Object Response { get; set; } - - /// - /// The HTTP status code. - /// - /// The HTTP status code. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// A short, human-readable summary of the problem type. - /// - /// A short, human-readable summary of the problem type. - [DataMember(Name = "title", IsRequired = false, EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. - /// - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RestServiceError {\n"); - sb.Append(" Detail: ").Append(Detail).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Instance: ").Append(Instance).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" RequestId: ").Append(RequestId).Append("\n"); - sb.Append(" Response: ").Append(Response).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RestServiceError); - } - - /// - /// Returns true if RestServiceError instances are equal - /// - /// Instance of RestServiceError to be compared - /// Boolean - public bool Equals(RestServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.Detail == input.Detail || - (this.Detail != null && - this.Detail.Equals(input.Detail)) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.Instance == input.Instance || - (this.Instance != null && - this.Instance.Equals(input.Instance)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.RequestId == input.RequestId || - (this.RequestId != null && - this.RequestId.Equals(input.RequestId)) - ) && - ( - this.Response == input.Response || - (this.Response != null && - this.Response.Equals(input.Response)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Detail != null) - { - hashCode = (hashCode * 59) + this.Detail.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.Instance != null) - { - hashCode = (hashCode * 59) + this.Instance.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.RequestId != null) - { - hashCode = (hashCode * 59) + this.RequestId.GetHashCode(); - } - if (this.Response != null) - { - hashCode = (hashCode * 59) + this.Response.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RevealPinRequest.cs b/Adyen/Model/BalancePlatform/RevealPinRequest.cs deleted file mode 100644 index f6bf986d1..000000000 --- a/Adyen/Model/BalancePlatform/RevealPinRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RevealPinRequest - /// - [DataContract(Name = "RevealPinRequest")] - public partial class RevealPinRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RevealPinRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. (required). - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. (required). - public RevealPinRequest(string encryptedKey = default(string), string paymentInstrumentId = default(string)) - { - this.EncryptedKey = encryptedKey; - this.PaymentInstrumentId = paymentInstrumentId; - } - - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. - /// - /// The symmetric session key that you encrypted with the [public key](https://docs.adyen.com/api-explorer/balanceplatform/2/get/publicKey) that you received from Adyen. - [DataMember(Name = "encryptedKey", IsRequired = false, EmitDefaultValue = false)] - public string EncryptedKey { get; set; } - - /// - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. - /// - /// The unique identifier of the payment instrument, which is the card for which you are managing the PIN. - [DataMember(Name = "paymentInstrumentId", IsRequired = false, EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RevealPinRequest {\n"); - sb.Append(" EncryptedKey: ").Append(EncryptedKey).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RevealPinRequest); - } - - /// - /// Returns true if RevealPinRequest instances are equal - /// - /// Instance of RevealPinRequest to be compared - /// Boolean - public bool Equals(RevealPinRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.EncryptedKey == input.EncryptedKey || - (this.EncryptedKey != null && - this.EncryptedKey.Equals(input.EncryptedKey)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EncryptedKey != null) - { - hashCode = (hashCode * 59) + this.EncryptedKey.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RevealPinResponse.cs b/Adyen/Model/BalancePlatform/RevealPinResponse.cs deleted file mode 100644 index 4fa154b5b..000000000 --- a/Adyen/Model/BalancePlatform/RevealPinResponse.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RevealPinResponse - /// - [DataContract(Name = "RevealPinResponse")] - public partial class RevealPinResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RevealPinResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The encrypted [PIN block](https://www.pcisecuritystandards.org/glossary/pin-block). (required). - /// The 16-digit token that you need to extract the `encryptedPinBlock`. (required). - public RevealPinResponse(string encryptedPinBlock = default(string), string token = default(string)) - { - this.EncryptedPinBlock = encryptedPinBlock; - this.Token = token; - } - - /// - /// The encrypted [PIN block](https://www.pcisecuritystandards.org/glossary/pin-block). - /// - /// The encrypted [PIN block](https://www.pcisecuritystandards.org/glossary/pin-block). - [DataMember(Name = "encryptedPinBlock", IsRequired = false, EmitDefaultValue = false)] - public string EncryptedPinBlock { get; set; } - - /// - /// The 16-digit token that you need to extract the `encryptedPinBlock`. - /// - /// The 16-digit token that you need to extract the `encryptedPinBlock`. - [DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] - public string Token { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RevealPinResponse {\n"); - sb.Append(" EncryptedPinBlock: ").Append(EncryptedPinBlock).Append("\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RevealPinResponse); - } - - /// - /// Returns true if RevealPinResponse instances are equal - /// - /// Instance of RevealPinResponse to be compared - /// Boolean - public bool Equals(RevealPinResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.EncryptedPinBlock == input.EncryptedPinBlock || - (this.EncryptedPinBlock != null && - this.EncryptedPinBlock.Equals(input.EncryptedPinBlock)) - ) && - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EncryptedPinBlock != null) - { - hashCode = (hashCode * 59) + this.EncryptedPinBlock.GetHashCode(); - } - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RiskScores.cs b/Adyen/Model/BalancePlatform/RiskScores.cs deleted file mode 100644 index 99296bf38..000000000 --- a/Adyen/Model/BalancePlatform/RiskScores.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RiskScores - /// - [DataContract(Name = "RiskScores")] - public partial class RiskScores : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Transaction risk score provided by Mastercard. Values provided by Mastercard range between 0 (lowest risk) to 998 (highest risk).. - /// Transaction risk score provided by Visa. Values provided by Visa range between 01 (lowest risk) to 99 (highest risk).. - public RiskScores(int? mastercard = default(int?), int? visa = default(int?)) - { - this.Mastercard = mastercard; - this.Visa = visa; - } - - /// - /// Transaction risk score provided by Mastercard. Values provided by Mastercard range between 0 (lowest risk) to 998 (highest risk). - /// - /// Transaction risk score provided by Mastercard. Values provided by Mastercard range between 0 (lowest risk) to 998 (highest risk). - [DataMember(Name = "mastercard", EmitDefaultValue = false)] - public int? Mastercard { get; set; } - - /// - /// Transaction risk score provided by Visa. Values provided by Visa range between 01 (lowest risk) to 99 (highest risk). - /// - /// Transaction risk score provided by Visa. Values provided by Visa range between 01 (lowest risk) to 99 (highest risk). - [DataMember(Name = "visa", EmitDefaultValue = false)] - public int? Visa { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RiskScores {\n"); - sb.Append(" Mastercard: ").Append(Mastercard).Append("\n"); - sb.Append(" Visa: ").Append(Visa).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RiskScores); - } - - /// - /// Returns true if RiskScores instances are equal - /// - /// Instance of RiskScores to be compared - /// Boolean - public bool Equals(RiskScores input) - { - if (input == null) - { - return false; - } - return - ( - this.Mastercard == input.Mastercard || - this.Mastercard.Equals(input.Mastercard) - ) && - ( - this.Visa == input.Visa || - this.Visa.Equals(input.Visa) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Mastercard.GetHashCode(); - hashCode = (hashCode * 59) + this.Visa.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/RiskScoresRestriction.cs b/Adyen/Model/BalancePlatform/RiskScoresRestriction.cs deleted file mode 100644 index 3aaefc8b4..000000000 --- a/Adyen/Model/BalancePlatform/RiskScoresRestriction.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// RiskScoresRestriction - /// - [DataContract(Name = "RiskScoresRestriction")] - public partial class RiskScoresRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RiskScoresRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// value. - public RiskScoresRestriction(string operation = default(string), RiskScores value = default(RiskScores)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public RiskScores Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RiskScoresRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RiskScoresRestriction); - } - - /// - /// Returns true if RiskScoresRestriction instances are equal - /// - /// Instance of RiskScoresRestriction to be compared - /// Boolean - public bool Equals(RiskScoresRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SELocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/SELocalAccountIdentification.cs deleted file mode 100644 index 711040b83..000000000 --- a/Adyen/Model/BalancePlatform/SELocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SELocalAccountIdentification - /// - [DataContract(Name = "SELocalAccountIdentification")] - public partial class SELocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **seLocal** - /// - /// **seLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum SeLocal for value: seLocal - /// - [EnumMember(Value = "seLocal")] - SeLocal = 1 - - } - - - /// - /// **seLocal** - /// - /// **seLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SELocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. (required). - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. (required). - /// **seLocal** (required) (default to TypeEnum.SeLocal). - public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), TypeEnum type = TypeEnum.SeLocal) - { - this.AccountNumber = accountNumber; - this.ClearingNumber = clearingNumber; - this.Type = type; - } - - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. - /// - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. - [DataMember(Name = "clearingNumber", IsRequired = false, EmitDefaultValue = false)] - public string ClearingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SELocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" ClearingNumber: ").Append(ClearingNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SELocalAccountIdentification); - } - - /// - /// Returns true if SELocalAccountIdentification instances are equal - /// - /// Instance of SELocalAccountIdentification to be compared - /// Boolean - public bool Equals(SELocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.ClearingNumber == input.ClearingNumber || - (this.ClearingNumber != null && - this.ClearingNumber.Equals(input.ClearingNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.ClearingNumber != null) - { - hashCode = (hashCode * 59) + this.ClearingNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 7) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 7.", new [] { "AccountNumber" }); - } - - // ClearingNumber (string) maxLength - if (this.ClearingNumber != null && this.ClearingNumber.Length > 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingNumber, length must be less than 5.", new [] { "ClearingNumber" }); - } - - // ClearingNumber (string) minLength - if (this.ClearingNumber != null && this.ClearingNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingNumber, length must be greater than 4.", new [] { "ClearingNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.cs deleted file mode 100644 index 0d8d793c1..000000000 --- a/Adyen/Model/BalancePlatform/SGLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SGLocalAccountIdentification - /// - [DataContract(Name = "SGLocalAccountIdentification")] - public partial class SGLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **sgLocal** - /// - /// **sgLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum SgLocal for value: sgLocal - /// - [EnumMember(Value = "sgLocal")] - SgLocal = 1 - - } - - - /// - /// **sgLocal** - /// - /// **sgLocal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SGLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. (required). - /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// **sgLocal** (default to TypeEnum.SgLocal). - public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), TypeEnum? type = TypeEnum.SgLocal) - { - this.AccountNumber = accountNumber; - this.Bic = bic; - this.Type = type; - } - - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SGLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SGLocalAccountIdentification); - } - - /// - /// Returns true if SGLocalAccountIdentification instances are equal - /// - /// Instance of SGLocalAccountIdentification to be compared - /// Boolean - public bool Equals(SGLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 19.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 4.", new [] { "AccountNumber" }); - } - - // Bic (string) maxLength - if (this.Bic != null && this.Bic.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be less than 11.", new [] { "Bic" }); - } - - // Bic (string) minLength - if (this.Bic != null && this.Bic.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be greater than 8.", new [] { "Bic" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SameAmountRestriction.cs b/Adyen/Model/BalancePlatform/SameAmountRestriction.cs deleted file mode 100644 index ff9ec9e82..000000000 --- a/Adyen/Model/BalancePlatform/SameAmountRestriction.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SameAmountRestriction - /// - [DataContract(Name = "SameAmountRestriction")] - public partial class SameAmountRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SameAmountRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// value. - public SameAmountRestriction(string operation = default(string), bool? value = default(bool?)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public bool? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SameAmountRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SameAmountRestriction); - } - - /// - /// Returns true if SameAmountRestriction instances are equal - /// - /// Instance of SameAmountRestriction to be compared - /// Boolean - public bool Equals(SameAmountRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.cs b/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.cs deleted file mode 100644 index df09ffc0d..000000000 --- a/Adyen/Model/BalancePlatform/SameCounterpartyRestriction.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SameCounterpartyRestriction - /// - [DataContract(Name = "SameCounterpartyRestriction")] - public partial class SameCounterpartyRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SameCounterpartyRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// value. - public SameCounterpartyRestriction(string operation = default(string), bool? value = default(bool?)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public bool? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SameCounterpartyRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SameCounterpartyRestriction); - } - - /// - /// Returns true if SameCounterpartyRestriction instances are equal - /// - /// Instance of SameCounterpartyRestriction to be compared - /// Boolean - public bool Equals(SameCounterpartyRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SearchRegisteredDevicesResponse.cs b/Adyen/Model/BalancePlatform/SearchRegisteredDevicesResponse.cs deleted file mode 100644 index ad21cc444..000000000 --- a/Adyen/Model/BalancePlatform/SearchRegisteredDevicesResponse.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SearchRegisteredDevicesResponse - /// - [DataContract(Name = "SearchRegisteredDevicesResponse")] - public partial class SearchRegisteredDevicesResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains a list of registered SCA devices and their corresponding details.. - /// The total amount of registered SCA devices that match the query parameters.. - /// link. - /// The total amount of list pages.. - public SearchRegisteredDevicesResponse(List data = default(List), int? itemsTotal = default(int?), Link link = default(Link), int? pagesTotal = default(int?)) - { - this.Data = data; - this.ItemsTotal = itemsTotal; - this.Link = link; - this.PagesTotal = pagesTotal; - } - - /// - /// Contains a list of registered SCA devices and their corresponding details. - /// - /// Contains a list of registered SCA devices and their corresponding details. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// The total amount of registered SCA devices that match the query parameters. - /// - /// The total amount of registered SCA devices that match the query parameters. - [DataMember(Name = "itemsTotal", EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Gets or Sets Link - /// - [DataMember(Name = "link", EmitDefaultValue = false)] - public Link Link { get; set; } - - /// - /// The total amount of list pages. - /// - /// The total amount of list pages. - [DataMember(Name = "pagesTotal", EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SearchRegisteredDevicesResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" Link: ").Append(Link).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SearchRegisteredDevicesResponse); - } - - /// - /// Returns true if SearchRegisteredDevicesResponse instances are equal - /// - /// Instance of SearchRegisteredDevicesResponse to be compared - /// Boolean - public bool Equals(SearchRegisteredDevicesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.Link == input.Link || - (this.Link != null && - this.Link.Equals(input.Link)) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - if (this.Link != null) - { - hashCode = (hashCode * 59) + this.Link.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SourceAccountTypesRestriction.cs b/Adyen/Model/BalancePlatform/SourceAccountTypesRestriction.cs deleted file mode 100644 index 2e1f21bac..000000000 --- a/Adyen/Model/BalancePlatform/SourceAccountTypesRestriction.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SourceAccountTypesRestriction - /// - [DataContract(Name = "SourceAccountTypesRestriction")] - public partial class SourceAccountTypesRestriction : IEquatable, IValidatableObject - { - /// - /// Defines Value - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ValueEnum - { - /// - /// Enum BalanceAccount for value: balanceAccount - /// - [EnumMember(Value = "balanceAccount")] - BalanceAccount = 1, - - /// - /// Enum BusinessAccount for value: businessAccount - /// - [EnumMember(Value = "businessAccount")] - BusinessAccount = 2 - - } - - - - /// - /// The list of source account types to be evaluated. - /// - /// The list of source account types to be evaluated. - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SourceAccountTypesRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// The list of source account types to be evaluated.. - public SourceAccountTypesRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SourceAccountTypesRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SourceAccountTypesRestriction); - } - - /// - /// Returns true if SourceAccountTypesRestriction instances are equal - /// - /// Instance of SourceAccountTypesRestriction to be compared - /// Boolean - public bool Equals(SourceAccountTypesRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/StringMatch.cs b/Adyen/Model/BalancePlatform/StringMatch.cs deleted file mode 100644 index 6f7af7628..000000000 --- a/Adyen/Model/BalancePlatform/StringMatch.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// StringMatch - /// - [DataContract(Name = "StringMatch")] - public partial class StringMatch : IEquatable, IValidatableObject - { - /// - /// The type of string matching operation. Possible values: **startsWith**, **endsWith**, **isEqualTo**, **contains**, - /// - /// The type of string matching operation. Possible values: **startsWith**, **endsWith**, **isEqualTo**, **contains**, - [JsonConverter(typeof(StringEnumConverter))] - public enum OperationEnum - { - /// - /// Enum Contains for value: contains - /// - [EnumMember(Value = "contains")] - Contains = 1, - - /// - /// Enum EndsWith for value: endsWith - /// - [EnumMember(Value = "endsWith")] - EndsWith = 2, - - /// - /// Enum IsEqualTo for value: isEqualTo - /// - [EnumMember(Value = "isEqualTo")] - IsEqualTo = 3, - - /// - /// Enum StartsWith for value: startsWith - /// - [EnumMember(Value = "startsWith")] - StartsWith = 4 - - } - - - /// - /// The type of string matching operation. Possible values: **startsWith**, **endsWith**, **isEqualTo**, **contains**, - /// - /// The type of string matching operation. Possible values: **startsWith**, **endsWith**, **isEqualTo**, **contains**, - [DataMember(Name = "operation", EmitDefaultValue = false)] - public OperationEnum? Operation { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of string matching operation. Possible values: **startsWith**, **endsWith**, **isEqualTo**, **contains**,. - /// The string to be matched.. - public StringMatch(OperationEnum? operation = default(OperationEnum?), string value = default(string)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// The string to be matched. - /// - /// The string to be matched. - [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StringMatch {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StringMatch); - } - - /// - /// Returns true if StringMatch instances are equal - /// - /// Instance of StringMatch to be compared - /// Boolean - public bool Equals(StringMatch input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - this.Operation.Equals(input.Operation) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SweepConfigurationV2.cs b/Adyen/Model/BalancePlatform/SweepConfigurationV2.cs deleted file mode 100644 index a06b3f8b6..000000000 --- a/Adyen/Model/BalancePlatform/SweepConfigurationV2.cs +++ /dev/null @@ -1,670 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SweepConfigurationV2 - /// - [DataContract(Name = "SweepConfigurationV2")] - public partial class SweepConfigurationV2 : IEquatable, IValidatableObject - { - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 2, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 3 - - } - - - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - [DataMember(Name = "category", EmitDefaultValue = false)] - public CategoryEnum? Category { get; set; } - /// - /// Defines Priorities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PrioritiesEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). - [DataMember(Name = "priorities", EmitDefaultValue = false)] - public List Priorities { get; set; } - /// - /// The reason for disabling the sweep. - /// - /// The reason for disabling the sweep. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 16, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 17, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 18, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 19, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 20, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 21, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 22, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 23 - - } - - - /// - /// The reason for disabling the sweep. - /// - /// The reason for disabling the sweep. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - - /// - /// Returns false as Reason should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeReason() - { - return false; - } - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 2 - - } - - - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Pull for value: pull - /// - [EnumMember(Value = "pull")] - Pull = 1, - - /// - /// Enum Push for value: push - /// - [EnumMember(Value = "push")] - Push = 2 - - } - - - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SweepConfigurationV2() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`.. - /// counterparty (required). - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). (required). - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters.. - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup).. - /// Your reference for the sweep configuration.. - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed.. - /// schedule (required). - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. . - /// sweepAmount. - /// targetAmount. - /// triggerAmount. - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. (default to TypeEnum.Push). - public SweepConfigurationV2(CategoryEnum? category = default(CategoryEnum?), SweepCounterparty counterparty = default(SweepCounterparty), string currency = default(string), string description = default(string), List priorities = default(List), string reference = default(string), string referenceForBeneficiary = default(string), SweepSchedule schedule = default(SweepSchedule), StatusEnum? status = default(StatusEnum?), Amount sweepAmount = default(Amount), Amount targetAmount = default(Amount), Amount triggerAmount = default(Amount), TypeEnum? type = TypeEnum.Push) - { - this.Counterparty = counterparty; - this.Currency = currency; - this.Schedule = schedule; - this.Category = category; - this.Description = description; - this.Priorities = priorities; - this.Reference = reference; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Status = status; - this.SweepAmount = sweepAmount; - this.TargetAmount = targetAmount; - this.TriggerAmount = triggerAmount; - this.Type = type; - } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", IsRequired = false, EmitDefaultValue = false)] - public SweepCounterparty Counterparty { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. - /// - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the sweep. - /// - /// The unique identifier of the sweep. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// The human readable reason for disabling the sweep. - /// - /// The human readable reason for disabling the sweep. - [DataMember(Name = "reasonDetail", EmitDefaultValue = false)] - public string ReasonDetail { get; private set; } - - /// - /// Your reference for the sweep configuration. - /// - /// Your reference for the sweep configuration. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. - /// - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Schedule - /// - [DataMember(Name = "schedule", IsRequired = false, EmitDefaultValue = false)] - public SweepSchedule Schedule { get; set; } - - /// - /// Gets or Sets SweepAmount - /// - [DataMember(Name = "sweepAmount", EmitDefaultValue = false)] - public Amount SweepAmount { get; set; } - - /// - /// Gets or Sets TargetAmount - /// - [DataMember(Name = "targetAmount", EmitDefaultValue = false)] - public Amount TargetAmount { get; set; } - - /// - /// Gets or Sets TriggerAmount - /// - [DataMember(Name = "triggerAmount", EmitDefaultValue = false)] - public Amount TriggerAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SweepConfigurationV2 {\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Priorities: ").Append(Priorities).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" ReasonDetail: ").Append(ReasonDetail).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Schedule: ").Append(Schedule).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" SweepAmount: ").Append(SweepAmount).Append("\n"); - sb.Append(" TargetAmount: ").Append(TargetAmount).Append("\n"); - sb.Append(" TriggerAmount: ").Append(TriggerAmount).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SweepConfigurationV2); - } - - /// - /// Returns true if SweepConfigurationV2 instances are equal - /// - /// Instance of SweepConfigurationV2 to be compared - /// Boolean - public bool Equals(SweepConfigurationV2 input) - { - if (input == null) - { - return false; - } - return - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Priorities == input.Priorities || - this.Priorities.SequenceEqual(input.Priorities) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.ReasonDetail == input.ReasonDetail || - (this.ReasonDetail != null && - this.ReasonDetail.Equals(input.ReasonDetail)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Schedule == input.Schedule || - (this.Schedule != null && - this.Schedule.Equals(input.Schedule)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.SweepAmount == input.SweepAmount || - (this.SweepAmount != null && - this.SweepAmount.Equals(input.SweepAmount)) - ) && - ( - this.TargetAmount == input.TargetAmount || - (this.TargetAmount != null && - this.TargetAmount.Equals(input.TargetAmount)) - ) && - ( - this.TriggerAmount == input.TriggerAmount || - (this.TriggerAmount != null && - this.TriggerAmount.Equals(input.TriggerAmount)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priorities.GetHashCode(); - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - if (this.ReasonDetail != null) - { - hashCode = (hashCode * 59) + this.ReasonDetail.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - if (this.Schedule != null) - { - hashCode = (hashCode * 59) + this.Schedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.SweepAmount != null) - { - hashCode = (hashCode * 59) + this.SweepAmount.GetHashCode(); - } - if (this.TargetAmount != null) - { - hashCode = (hashCode * 59) + this.TargetAmount.GetHashCode(); - } - if (this.TriggerAmount != null) - { - hashCode = (hashCode * 59) + this.TriggerAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - // ReferenceForBeneficiary (string) maxLength - if (this.ReferenceForBeneficiary != null && this.ReferenceForBeneficiary.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReferenceForBeneficiary, length must be less than 80.", new [] { "ReferenceForBeneficiary" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SweepCounterparty.cs b/Adyen/Model/BalancePlatform/SweepCounterparty.cs deleted file mode 100644 index 6d4ac7edf..000000000 --- a/Adyen/Model/BalancePlatform/SweepCounterparty.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SweepCounterparty - /// - [DataContract(Name = "SweepCounterparty")] - public partial class SweepCounterparty : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). > If you are updating the counterparty from a transfer instrument to a balance account, set `transferInstrumentId` to **null**.. - /// The merchant account that will be the source of funds. You can only use this parameter with sweeps of `type` **pull** and if you are processing payments with Adyen.. - /// The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id) depending on the sweep `type` . To set up automated top-up sweeps to balance accounts in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/platforms/top-up-balance-account/#before-you-begin), use this parameter in combination with a `merchantAccount` and a sweep `type` of **pull**. Top-up sweeps start a direct debit request from the source transfer instrument. Contact Adyen Support to enable this feature.> If you are updating the counterparty from a balance account to a transfer instrument, set `balanceAccountId` to **null**.. - public SweepCounterparty(string balanceAccountId = default(string), string merchantAccount = default(string), string transferInstrumentId = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.MerchantAccount = merchantAccount; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). > If you are updating the counterparty from a transfer instrument to a balance account, set `transferInstrumentId` to **null**. - /// - /// The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). > If you are updating the counterparty from a transfer instrument to a balance account, set `transferInstrumentId` to **null**. - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// The merchant account that will be the source of funds. You can only use this parameter with sweeps of `type` **pull** and if you are processing payments with Adyen. - /// - /// The merchant account that will be the source of funds. You can only use this parameter with sweeps of `type` **pull** and if you are processing payments with Adyen. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id) depending on the sweep `type` . To set up automated top-up sweeps to balance accounts in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/platforms/top-up-balance-account/#before-you-begin), use this parameter in combination with a `merchantAccount` and a sweep `type` of **pull**. Top-up sweeps start a direct debit request from the source transfer instrument. Contact Adyen Support to enable this feature.> If you are updating the counterparty from a balance account to a transfer instrument, set `balanceAccountId` to **null**. - /// - /// The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id) depending on the sweep `type` . To set up automated top-up sweeps to balance accounts in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/platforms/top-up-balance-account/#before-you-begin), use this parameter in combination with a `merchantAccount` and a sweep `type` of **pull**. Top-up sweeps start a direct debit request from the source transfer instrument. Contact Adyen Support to enable this feature.> If you are updating the counterparty from a balance account to a transfer instrument, set `balanceAccountId` to **null**. - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SweepCounterparty {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SweepCounterparty); - } - - /// - /// Returns true if SweepCounterparty instances are equal - /// - /// Instance of SweepCounterparty to be compared - /// Boolean - public bool Equals(SweepCounterparty input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/SweepSchedule.cs b/Adyen/Model/BalancePlatform/SweepSchedule.cs deleted file mode 100644 index 1f85f4bb1..000000000 --- a/Adyen/Model/BalancePlatform/SweepSchedule.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// SweepSchedule - /// - [DataContract(Name = "SweepSchedule")] - public partial class SweepSchedule : IEquatable, IValidatableObject - { - /// - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. - /// - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Daily for value: daily - /// - [EnumMember(Value = "daily")] - Daily = 1, - - /// - /// Enum Weekly for value: weekly - /// - [EnumMember(Value = "weekly")] - Weekly = 2, - - /// - /// Enum Monthly for value: monthly - /// - [EnumMember(Value = "monthly")] - Monthly = 3, - - /// - /// Enum Balance for value: balance - /// - [EnumMember(Value = "balance")] - Balance = 4, - - /// - /// Enum Cron for value: cron - /// - [EnumMember(Value = "cron")] - Cron = 5 - - } - - - /// - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. - /// - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SweepSchedule() { } - /// - /// Initializes a new instance of the class. - /// - /// A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: **&ast;**, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. Required when `type` is **cron**. . - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. (required). - public SweepSchedule(string cronExpression = default(string), TypeEnum type = default(TypeEnum)) - { - this.Type = type; - this.CronExpression = cronExpression; - } - - /// - /// A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: **&ast;**, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. Required when `type` is **cron**. - /// - /// A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: **&ast;**, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. Required when `type` is **cron**. - [DataMember(Name = "cronExpression", EmitDefaultValue = false)] - public string CronExpression { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SweepSchedule {\n"); - sb.Append(" CronExpression: ").Append(CronExpression).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SweepSchedule); - } - - /// - /// Returns true if SweepSchedule instances are equal - /// - /// Instance of SweepSchedule to be compared - /// Boolean - public bool Equals(SweepSchedule input) - { - if (input == null) - { - return false; - } - return - ( - this.CronExpression == input.CronExpression || - (this.CronExpression != null && - this.CronExpression.Equals(input.CronExpression)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CronExpression != null) - { - hashCode = (hashCode * 59) + this.CronExpression.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/ThresholdRepayment.cs b/Adyen/Model/BalancePlatform/ThresholdRepayment.cs deleted file mode 100644 index 63fce5360..000000000 --- a/Adyen/Model/BalancePlatform/ThresholdRepayment.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// ThresholdRepayment - /// - [DataContract(Name = "ThresholdRepayment")] - public partial class ThresholdRepayment : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ThresholdRepayment() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - public ThresholdRepayment(Amount amount = default(Amount)) - { - this.Amount = amount; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThresholdRepayment {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThresholdRepayment); - } - - /// - /// Returns true if ThresholdRepayment instances are equal - /// - /// Instance of ThresholdRepayment to be compared - /// Boolean - public bool Equals(ThresholdRepayment input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TimeOfDay.cs b/Adyen/Model/BalancePlatform/TimeOfDay.cs deleted file mode 100644 index 4efffb0d9..000000000 --- a/Adyen/Model/BalancePlatform/TimeOfDay.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TimeOfDay - /// - [DataContract(Name = "TimeOfDay")] - public partial class TimeOfDay : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The end time in a time-only ISO-8601 extended offset format. For example: **08:00:00+02:00**, **22:30:00-03:00**. . - /// The start time in a time-only ISO-8601 extended offset format. For example: **08:00:00+02:00**, **22:30:00-03:00**. . - public TimeOfDay(string endTime = default(string), string startTime = default(string)) - { - this.EndTime = endTime; - this.StartTime = startTime; - } - - /// - /// The end time in a time-only ISO-8601 extended offset format. For example: **08:00:00+02:00**, **22:30:00-03:00**. - /// - /// The end time in a time-only ISO-8601 extended offset format. For example: **08:00:00+02:00**, **22:30:00-03:00**. - [DataMember(Name = "endTime", EmitDefaultValue = false)] - public string EndTime { get; set; } - - /// - /// The start time in a time-only ISO-8601 extended offset format. For example: **08:00:00+02:00**, **22:30:00-03:00**. - /// - /// The start time in a time-only ISO-8601 extended offset format. For example: **08:00:00+02:00**, **22:30:00-03:00**. - [DataMember(Name = "startTime", EmitDefaultValue = false)] - public string StartTime { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TimeOfDay {\n"); - sb.Append(" EndTime: ").Append(EndTime).Append("\n"); - sb.Append(" StartTime: ").Append(StartTime).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TimeOfDay); - } - - /// - /// Returns true if TimeOfDay instances are equal - /// - /// Instance of TimeOfDay to be compared - /// Boolean - public bool Equals(TimeOfDay input) - { - if (input == null) - { - return false; - } - return - ( - this.EndTime == input.EndTime || - (this.EndTime != null && - this.EndTime.Equals(input.EndTime)) - ) && - ( - this.StartTime == input.StartTime || - (this.StartTime != null && - this.StartTime.Equals(input.StartTime)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EndTime != null) - { - hashCode = (hashCode * 59) + this.EndTime.GetHashCode(); - } - if (this.StartTime != null) - { - hashCode = (hashCode * 59) + this.StartTime.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TimeOfDayRestriction.cs b/Adyen/Model/BalancePlatform/TimeOfDayRestriction.cs deleted file mode 100644 index f33592d51..000000000 --- a/Adyen/Model/BalancePlatform/TimeOfDayRestriction.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TimeOfDayRestriction - /// - [DataContract(Name = "TimeOfDayRestriction")] - public partial class TimeOfDayRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TimeOfDayRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// value. - public TimeOfDayRestriction(string operation = default(string), TimeOfDay value = default(TimeOfDay)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public TimeOfDay Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TimeOfDayRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TimeOfDayRestriction); - } - - /// - /// Returns true if TimeOfDayRestriction instances are equal - /// - /// Instance of TimeOfDayRestriction to be compared - /// Boolean - public bool Equals(TimeOfDayRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TokenRequestorsRestriction.cs b/Adyen/Model/BalancePlatform/TokenRequestorsRestriction.cs deleted file mode 100644 index 9f0f8761d..000000000 --- a/Adyen/Model/BalancePlatform/TokenRequestorsRestriction.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TokenRequestorsRestriction - /// - [DataContract(Name = "TokenRequestorsRestriction")] - public partial class TokenRequestorsRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TokenRequestorsRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// value. - public TokenRequestorsRestriction(string operation = default(string), List value = default(List)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public List Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TokenRequestorsRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TokenRequestorsRestriction); - } - - /// - /// Returns true if TokenRequestorsRestriction instances are equal - /// - /// Instance of TokenRequestorsRestriction to be compared - /// Boolean - public bool Equals(TokenRequestorsRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - this.Value != null && - input.Value != null && - this.Value.SequenceEqual(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TotalAmountRestriction.cs b/Adyen/Model/BalancePlatform/TotalAmountRestriction.cs deleted file mode 100644 index 6176f4970..000000000 --- a/Adyen/Model/BalancePlatform/TotalAmountRestriction.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TotalAmountRestriction - /// - [DataContract(Name = "TotalAmountRestriction")] - public partial class TotalAmountRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TotalAmountRestriction() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines how the condition must be evaluated. (required). - /// value. - public TotalAmountRestriction(string operation = default(string), Amount value = default(Amount)) - { - this.Operation = operation; - this.Value = value; - } - - /// - /// Defines how the condition must be evaluated. - /// - /// Defines how the condition must be evaluated. - [DataMember(Name = "operation", IsRequired = false, EmitDefaultValue = false)] - public string Operation { get; set; } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public Amount Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TotalAmountRestriction {\n"); - sb.Append(" Operation: ").Append(Operation).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TotalAmountRestriction); - } - - /// - /// Returns true if TotalAmountRestriction instances are equal - /// - /// Instance of TotalAmountRestriction to be compared - /// Boolean - public bool Equals(TotalAmountRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.Operation == input.Operation || - (this.Operation != null && - this.Operation.Equals(input.Operation)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Operation != null) - { - hashCode = (hashCode * 59) + this.Operation.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransactionRule.cs b/Adyen/Model/BalancePlatform/TransactionRule.cs deleted file mode 100644 index a368622f8..000000000 --- a/Adyen/Model/BalancePlatform/TransactionRule.cs +++ /dev/null @@ -1,490 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransactionRule - /// - [DataContract(Name = "TransactionRule")] - public partial class TransactionRule : IEquatable, IValidatableObject - { - /// - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. - /// - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. - [JsonConverter(typeof(StringEnumConverter))] - public enum OutcomeTypeEnum - { - /// - /// Enum EnforceSCA for value: enforceSCA - /// - [EnumMember(Value = "enforceSCA")] - EnforceSCA = 1, - - /// - /// Enum HardBlock for value: hardBlock - /// - [EnumMember(Value = "hardBlock")] - HardBlock = 2, - - /// - /// Enum ScoreBased for value: scoreBased - /// - [EnumMember(Value = "scoreBased")] - ScoreBased = 3, - - /// - /// Enum TimedBlock for value: timedBlock - /// - [EnumMember(Value = "timedBlock")] - TimedBlock = 4 - - } - - - /// - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. - /// - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. - [DataMember(Name = "outcomeType", EmitDefaultValue = false)] - public OutcomeTypeEnum? OutcomeType { get; set; } - /// - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**. - /// - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RequestTypeEnum - { - /// - /// Enum Authentication for value: authentication - /// - [EnumMember(Value = "authentication")] - Authentication = 1, - - /// - /// Enum Authorization for value: authorization - /// - [EnumMember(Value = "authorization")] - Authorization = 2, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 3, - - /// - /// Enum Tokenization for value: tokenization - /// - [EnumMember(Value = "tokenization")] - Tokenization = 4 - - } - - - /// - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**. - /// - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**. - [DataMember(Name = "requestType", EmitDefaultValue = false)] - public RequestTypeEnum? RequestType { get; set; } - /// - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. - /// - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 2 - - } - - - /// - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. - /// - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. - /// - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AllowList for value: allowList - /// - [EnumMember(Value = "allowList")] - AllowList = 1, - - /// - /// Enum BlockList for value: blockList - /// - [EnumMember(Value = "blockList")] - BlockList = 2, - - /// - /// Enum MaxUsage for value: maxUsage - /// - [EnumMember(Value = "maxUsage")] - MaxUsage = 3, - - /// - /// Enum Velocity for value: velocity - /// - [EnumMember(Value = "velocity")] - Velocity = 4 - - } - - - /// - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. - /// - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransactionRule() { } - /// - /// Initializes a new instance of the class. - /// - /// The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**.. - /// Your description for the transaction rule. (required). - /// The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**.. - /// entityKey (required). - /// The unique identifier of the transaction rule.. - /// interval (required). - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.. - /// Your reference for the transaction rule. (required). - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**.. - /// ruleRestrictions (required). - /// A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**.. - /// The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. . - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**.. - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. (required). - public TransactionRule(string aggregationLevel = default(string), string description = default(string), string endDate = default(string), TransactionRuleEntityKey entityKey = default(TransactionRuleEntityKey), string id = default(string), TransactionRuleInterval interval = default(TransactionRuleInterval), OutcomeTypeEnum? outcomeType = default(OutcomeTypeEnum?), string reference = default(string), RequestTypeEnum? requestType = default(RequestTypeEnum?), TransactionRuleRestrictions ruleRestrictions = default(TransactionRuleRestrictions), int? score = default(int?), string startDate = default(string), StatusEnum? status = default(StatusEnum?), TypeEnum type = default(TypeEnum)) - { - this.Description = description; - this.EntityKey = entityKey; - this.Interval = interval; - this.Reference = reference; - this.RuleRestrictions = ruleRestrictions; - this.Type = type; - this.AggregationLevel = aggregationLevel; - this.EndDate = endDate; - this.Id = id; - this.OutcomeType = outcomeType; - this.RequestType = requestType; - this.Score = score; - this.StartDate = startDate; - this.Status = status; - } - - /// - /// The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**. - /// - /// The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**. - [DataMember(Name = "aggregationLevel", EmitDefaultValue = false)] - public string AggregationLevel { get; set; } - - /// - /// Your description for the transaction rule. - /// - /// Your description for the transaction rule. - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**. - /// - /// The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**. - [DataMember(Name = "endDate", EmitDefaultValue = false)] - public string EndDate { get; set; } - - /// - /// Gets or Sets EntityKey - /// - [DataMember(Name = "entityKey", IsRequired = false, EmitDefaultValue = false)] - public TransactionRuleEntityKey EntityKey { get; set; } - - /// - /// The unique identifier of the transaction rule. - /// - /// The unique identifier of the transaction rule. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Interval - /// - [DataMember(Name = "interval", IsRequired = false, EmitDefaultValue = false)] - public TransactionRuleInterval Interval { get; set; } - - /// - /// Your reference for the transaction rule. - /// - /// Your reference for the transaction rule. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets RuleRestrictions - /// - [DataMember(Name = "ruleRestrictions", IsRequired = false, EmitDefaultValue = false)] - public TransactionRuleRestrictions RuleRestrictions { get; set; } - - /// - /// A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**. - /// - /// A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**. - [DataMember(Name = "score", EmitDefaultValue = false)] - public int? Score { get; set; } - - /// - /// The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. - /// - /// The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. - [DataMember(Name = "startDate", EmitDefaultValue = false)] - public string StartDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRule {\n"); - sb.Append(" AggregationLevel: ").Append(AggregationLevel).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EndDate: ").Append(EndDate).Append("\n"); - sb.Append(" EntityKey: ").Append(EntityKey).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Interval: ").Append(Interval).Append("\n"); - sb.Append(" OutcomeType: ").Append(OutcomeType).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" RequestType: ").Append(RequestType).Append("\n"); - sb.Append(" RuleRestrictions: ").Append(RuleRestrictions).Append("\n"); - sb.Append(" Score: ").Append(Score).Append("\n"); - sb.Append(" StartDate: ").Append(StartDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRule); - } - - /// - /// Returns true if TransactionRule instances are equal - /// - /// Instance of TransactionRule to be compared - /// Boolean - public bool Equals(TransactionRule input) - { - if (input == null) - { - return false; - } - return - ( - this.AggregationLevel == input.AggregationLevel || - (this.AggregationLevel != null && - this.AggregationLevel.Equals(input.AggregationLevel)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) - ) && - ( - this.EntityKey == input.EntityKey || - (this.EntityKey != null && - this.EntityKey.Equals(input.EntityKey)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Interval == input.Interval || - (this.Interval != null && - this.Interval.Equals(input.Interval)) - ) && - ( - this.OutcomeType == input.OutcomeType || - this.OutcomeType.Equals(input.OutcomeType) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.RequestType == input.RequestType || - this.RequestType.Equals(input.RequestType) - ) && - ( - this.RuleRestrictions == input.RuleRestrictions || - (this.RuleRestrictions != null && - this.RuleRestrictions.Equals(input.RuleRestrictions)) - ) && - ( - this.Score == input.Score || - this.Score.Equals(input.Score) - ) && - ( - this.StartDate == input.StartDate || - (this.StartDate != null && - this.StartDate.Equals(input.StartDate)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AggregationLevel != null) - { - hashCode = (hashCode * 59) + this.AggregationLevel.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } - if (this.EntityKey != null) - { - hashCode = (hashCode * 59) + this.EntityKey.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Interval != null) - { - hashCode = (hashCode * 59) + this.Interval.GetHashCode(); - } - hashCode = (hashCode * 59) + this.OutcomeType.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RequestType.GetHashCode(); - if (this.RuleRestrictions != null) - { - hashCode = (hashCode * 59) + this.RuleRestrictions.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Score.GetHashCode(); - if (this.StartDate != null) - { - hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.cs b/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.cs deleted file mode 100644 index 1691b4659..000000000 --- a/Adyen/Model/BalancePlatform/TransactionRuleEntityKey.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransactionRuleEntityKey - /// - [DataContract(Name = "TransactionRuleEntityKey")] - public partial class TransactionRuleEntityKey : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the resource.. - /// The type of resource. Possible values: **balancePlatform**, **paymentInstrumentGroup**, **accountHolder**, **balanceAccount**, or **paymentInstrument**.. - public TransactionRuleEntityKey(string entityReference = default(string), string entityType = default(string)) - { - this.EntityReference = entityReference; - this.EntityType = entityType; - } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "entityReference", EmitDefaultValue = false)] - public string EntityReference { get; set; } - - /// - /// The type of resource. Possible values: **balancePlatform**, **paymentInstrumentGroup**, **accountHolder**, **balanceAccount**, or **paymentInstrument**. - /// - /// The type of resource. Possible values: **balancePlatform**, **paymentInstrumentGroup**, **accountHolder**, **balanceAccount**, or **paymentInstrument**. - [DataMember(Name = "entityType", EmitDefaultValue = false)] - public string EntityType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleEntityKey {\n"); - sb.Append(" EntityReference: ").Append(EntityReference).Append("\n"); - sb.Append(" EntityType: ").Append(EntityType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleEntityKey); - } - - /// - /// Returns true if TransactionRuleEntityKey instances are equal - /// - /// Instance of TransactionRuleEntityKey to be compared - /// Boolean - public bool Equals(TransactionRuleEntityKey input) - { - if (input == null) - { - return false; - } - return - ( - this.EntityReference == input.EntityReference || - (this.EntityReference != null && - this.EntityReference.Equals(input.EntityReference)) - ) && - ( - this.EntityType == input.EntityType || - (this.EntityType != null && - this.EntityType.Equals(input.EntityType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EntityReference != null) - { - hashCode = (hashCode * 59) + this.EntityReference.GetHashCode(); - } - if (this.EntityType != null) - { - hashCode = (hashCode * 59) + this.EntityType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransactionRuleInfo.cs b/Adyen/Model/BalancePlatform/TransactionRuleInfo.cs deleted file mode 100644 index d8806aabe..000000000 --- a/Adyen/Model/BalancePlatform/TransactionRuleInfo.cs +++ /dev/null @@ -1,471 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransactionRuleInfo - /// - [DataContract(Name = "TransactionRuleInfo")] - public partial class TransactionRuleInfo : IEquatable, IValidatableObject - { - /// - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. - /// - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. - [JsonConverter(typeof(StringEnumConverter))] - public enum OutcomeTypeEnum - { - /// - /// Enum EnforceSCA for value: enforceSCA - /// - [EnumMember(Value = "enforceSCA")] - EnforceSCA = 1, - - /// - /// Enum HardBlock for value: hardBlock - /// - [EnumMember(Value = "hardBlock")] - HardBlock = 2, - - /// - /// Enum ScoreBased for value: scoreBased - /// - [EnumMember(Value = "scoreBased")] - ScoreBased = 3, - - /// - /// Enum TimedBlock for value: timedBlock - /// - [EnumMember(Value = "timedBlock")] - TimedBlock = 4 - - } - - - /// - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. - /// - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**. - [DataMember(Name = "outcomeType", EmitDefaultValue = false)] - public OutcomeTypeEnum? OutcomeType { get; set; } - /// - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**. - /// - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RequestTypeEnum - { - /// - /// Enum Authentication for value: authentication - /// - [EnumMember(Value = "authentication")] - Authentication = 1, - - /// - /// Enum Authorization for value: authorization - /// - [EnumMember(Value = "authorization")] - Authorization = 2, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 3, - - /// - /// Enum Tokenization for value: tokenization - /// - [EnumMember(Value = "tokenization")] - Tokenization = 4 - - } - - - /// - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**. - /// - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**. - [DataMember(Name = "requestType", EmitDefaultValue = false)] - public RequestTypeEnum? RequestType { get; set; } - /// - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. - /// - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 2 - - } - - - /// - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. - /// - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. - /// - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AllowList for value: allowList - /// - [EnumMember(Value = "allowList")] - AllowList = 1, - - /// - /// Enum BlockList for value: blockList - /// - [EnumMember(Value = "blockList")] - BlockList = 2, - - /// - /// Enum MaxUsage for value: maxUsage - /// - [EnumMember(Value = "maxUsage")] - MaxUsage = 3, - - /// - /// Enum Velocity for value: velocity - /// - [EnumMember(Value = "velocity")] - Velocity = 4 - - } - - - /// - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. - /// - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransactionRuleInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**.. - /// Your description for the transaction rule. (required). - /// The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**.. - /// entityKey (required). - /// interval (required). - /// The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.. - /// Your reference for the transaction rule. (required). - /// Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**.. - /// ruleRestrictions (required). - /// A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**.. - /// The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. . - /// The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**.. - /// The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met. (required). - public TransactionRuleInfo(string aggregationLevel = default(string), string description = default(string), string endDate = default(string), TransactionRuleEntityKey entityKey = default(TransactionRuleEntityKey), TransactionRuleInterval interval = default(TransactionRuleInterval), OutcomeTypeEnum? outcomeType = default(OutcomeTypeEnum?), string reference = default(string), RequestTypeEnum? requestType = default(RequestTypeEnum?), TransactionRuleRestrictions ruleRestrictions = default(TransactionRuleRestrictions), int? score = default(int?), string startDate = default(string), StatusEnum? status = default(StatusEnum?), TypeEnum type = default(TypeEnum)) - { - this.Description = description; - this.EntityKey = entityKey; - this.Interval = interval; - this.Reference = reference; - this.RuleRestrictions = ruleRestrictions; - this.Type = type; - this.AggregationLevel = aggregationLevel; - this.EndDate = endDate; - this.OutcomeType = outcomeType; - this.RequestType = requestType; - this.Score = score; - this.StartDate = startDate; - this.Status = status; - } - - /// - /// The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**. - /// - /// The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**. - [DataMember(Name = "aggregationLevel", EmitDefaultValue = false)] - public string AggregationLevel { get; set; } - - /// - /// Your description for the transaction rule. - /// - /// Your description for the transaction rule. - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**. - /// - /// The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**. - [DataMember(Name = "endDate", EmitDefaultValue = false)] - public string EndDate { get; set; } - - /// - /// Gets or Sets EntityKey - /// - [DataMember(Name = "entityKey", IsRequired = false, EmitDefaultValue = false)] - public TransactionRuleEntityKey EntityKey { get; set; } - - /// - /// Gets or Sets Interval - /// - [DataMember(Name = "interval", IsRequired = false, EmitDefaultValue = false)] - public TransactionRuleInterval Interval { get; set; } - - /// - /// Your reference for the transaction rule. - /// - /// Your reference for the transaction rule. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets RuleRestrictions - /// - [DataMember(Name = "ruleRestrictions", IsRequired = false, EmitDefaultValue = false)] - public TransactionRuleRestrictions RuleRestrictions { get; set; } - - /// - /// A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**. - /// - /// A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**. - [DataMember(Name = "score", EmitDefaultValue = false)] - public int? Score { get; set; } - - /// - /// The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. - /// - /// The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**. - [DataMember(Name = "startDate", EmitDefaultValue = false)] - public string StartDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleInfo {\n"); - sb.Append(" AggregationLevel: ").Append(AggregationLevel).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EndDate: ").Append(EndDate).Append("\n"); - sb.Append(" EntityKey: ").Append(EntityKey).Append("\n"); - sb.Append(" Interval: ").Append(Interval).Append("\n"); - sb.Append(" OutcomeType: ").Append(OutcomeType).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" RequestType: ").Append(RequestType).Append("\n"); - sb.Append(" RuleRestrictions: ").Append(RuleRestrictions).Append("\n"); - sb.Append(" Score: ").Append(Score).Append("\n"); - sb.Append(" StartDate: ").Append(StartDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleInfo); - } - - /// - /// Returns true if TransactionRuleInfo instances are equal - /// - /// Instance of TransactionRuleInfo to be compared - /// Boolean - public bool Equals(TransactionRuleInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AggregationLevel == input.AggregationLevel || - (this.AggregationLevel != null && - this.AggregationLevel.Equals(input.AggregationLevel)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EndDate == input.EndDate || - (this.EndDate != null && - this.EndDate.Equals(input.EndDate)) - ) && - ( - this.EntityKey == input.EntityKey || - (this.EntityKey != null && - this.EntityKey.Equals(input.EntityKey)) - ) && - ( - this.Interval == input.Interval || - (this.Interval != null && - this.Interval.Equals(input.Interval)) - ) && - ( - this.OutcomeType == input.OutcomeType || - this.OutcomeType.Equals(input.OutcomeType) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.RequestType == input.RequestType || - this.RequestType.Equals(input.RequestType) - ) && - ( - this.RuleRestrictions == input.RuleRestrictions || - (this.RuleRestrictions != null && - this.RuleRestrictions.Equals(input.RuleRestrictions)) - ) && - ( - this.Score == input.Score || - this.Score.Equals(input.Score) - ) && - ( - this.StartDate == input.StartDate || - (this.StartDate != null && - this.StartDate.Equals(input.StartDate)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AggregationLevel != null) - { - hashCode = (hashCode * 59) + this.AggregationLevel.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.EndDate != null) - { - hashCode = (hashCode * 59) + this.EndDate.GetHashCode(); - } - if (this.EntityKey != null) - { - hashCode = (hashCode * 59) + this.EntityKey.GetHashCode(); - } - if (this.Interval != null) - { - hashCode = (hashCode * 59) + this.Interval.GetHashCode(); - } - hashCode = (hashCode * 59) + this.OutcomeType.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RequestType.GetHashCode(); - if (this.RuleRestrictions != null) - { - hashCode = (hashCode * 59) + this.RuleRestrictions.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Score.GetHashCode(); - if (this.StartDate != null) - { - hashCode = (hashCode * 59) + this.StartDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransactionRuleInterval.cs b/Adyen/Model/BalancePlatform/TransactionRuleInterval.cs deleted file mode 100644 index 1df142f77..000000000 --- a/Adyen/Model/BalancePlatform/TransactionRuleInterval.cs +++ /dev/null @@ -1,318 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransactionRuleInterval - /// - [DataContract(Name = "TransactionRuleInterval")] - public partial class TransactionRuleInterval : IEquatable, IValidatableObject - { - /// - /// The day of week, used when the `duration.unit` is **weeks**. If not provided, by default, this is set to **monday**. Possible values: **sunday**, **monday**, **tuesday**, **wednesday**, **thursday**, **friday**. - /// - /// The day of week, used when the `duration.unit` is **weeks**. If not provided, by default, this is set to **monday**. Possible values: **sunday**, **monday**, **tuesday**, **wednesday**, **thursday**, **friday**. - [JsonConverter(typeof(StringEnumConverter))] - public enum DayOfWeekEnum - { - /// - /// Enum Friday for value: friday - /// - [EnumMember(Value = "friday")] - Friday = 1, - - /// - /// Enum Monday for value: monday - /// - [EnumMember(Value = "monday")] - Monday = 2, - - /// - /// Enum Saturday for value: saturday - /// - [EnumMember(Value = "saturday")] - Saturday = 3, - - /// - /// Enum Sunday for value: sunday - /// - [EnumMember(Value = "sunday")] - Sunday = 4, - - /// - /// Enum Thursday for value: thursday - /// - [EnumMember(Value = "thursday")] - Thursday = 5, - - /// - /// Enum Tuesday for value: tuesday - /// - [EnumMember(Value = "tuesday")] - Tuesday = 6, - - /// - /// Enum Wednesday for value: wednesday - /// - [EnumMember(Value = "wednesday")] - Wednesday = 7 - - } - - - /// - /// The day of week, used when the `duration.unit` is **weeks**. If not provided, by default, this is set to **monday**. Possible values: **sunday**, **monday**, **tuesday**, **wednesday**, **thursday**, **friday**. - /// - /// The day of week, used when the `duration.unit` is **weeks**. If not provided, by default, this is set to **monday**. Possible values: **sunday**, **monday**, **tuesday**, **wednesday**, **thursday**, **friday**. - [DataMember(Name = "dayOfWeek", EmitDefaultValue = false)] - public DayOfWeekEnum? DayOfWeek { get; set; } - /// - /// The [type of interval](https://docs.adyen.com/issuing/transaction-rules#time-intervals) during which the rule conditions and limits apply, and how often counters are reset. Possible values: * **perTransaction**: conditions are evaluated and the counters are reset for every transaction. * **daily**: the counters are reset daily at 00:00:00 CET. * **weekly**: the counters are reset every Monday at 00:00:00 CET. * **monthly**: the counters reset every first day of the month at 00:00:00 CET. * **lifetime**: conditions are applied to the lifetime of the payment instrument. * **rolling**: conditions are applied and the counters are reset based on a `duration`. If the reset date and time are not provided, Adyen applies the default reset time similar to fixed intervals. For example, if the duration is every two weeks, the counter resets every third Monday at 00:00:00 CET. * **sliding**: conditions are applied and the counters are reset based on the current time and a `duration` that you specify. - /// - /// The [type of interval](https://docs.adyen.com/issuing/transaction-rules#time-intervals) during which the rule conditions and limits apply, and how often counters are reset. Possible values: * **perTransaction**: conditions are evaluated and the counters are reset for every transaction. * **daily**: the counters are reset daily at 00:00:00 CET. * **weekly**: the counters are reset every Monday at 00:00:00 CET. * **monthly**: the counters reset every first day of the month at 00:00:00 CET. * **lifetime**: conditions are applied to the lifetime of the payment instrument. * **rolling**: conditions are applied and the counters are reset based on a `duration`. If the reset date and time are not provided, Adyen applies the default reset time similar to fixed intervals. For example, if the duration is every two weeks, the counter resets every third Monday at 00:00:00 CET. * **sliding**: conditions are applied and the counters are reset based on the current time and a `duration` that you specify. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Daily for value: daily - /// - [EnumMember(Value = "daily")] - Daily = 1, - - /// - /// Enum Lifetime for value: lifetime - /// - [EnumMember(Value = "lifetime")] - Lifetime = 2, - - /// - /// Enum Monthly for value: monthly - /// - [EnumMember(Value = "monthly")] - Monthly = 3, - - /// - /// Enum PerTransaction for value: perTransaction - /// - [EnumMember(Value = "perTransaction")] - PerTransaction = 4, - - /// - /// Enum Rolling for value: rolling - /// - [EnumMember(Value = "rolling")] - Rolling = 5, - - /// - /// Enum Sliding for value: sliding - /// - [EnumMember(Value = "sliding")] - Sliding = 6, - - /// - /// Enum Weekly for value: weekly - /// - [EnumMember(Value = "weekly")] - Weekly = 7 - - } - - - /// - /// The [type of interval](https://docs.adyen.com/issuing/transaction-rules#time-intervals) during which the rule conditions and limits apply, and how often counters are reset. Possible values: * **perTransaction**: conditions are evaluated and the counters are reset for every transaction. * **daily**: the counters are reset daily at 00:00:00 CET. * **weekly**: the counters are reset every Monday at 00:00:00 CET. * **monthly**: the counters reset every first day of the month at 00:00:00 CET. * **lifetime**: conditions are applied to the lifetime of the payment instrument. * **rolling**: conditions are applied and the counters are reset based on a `duration`. If the reset date and time are not provided, Adyen applies the default reset time similar to fixed intervals. For example, if the duration is every two weeks, the counter resets every third Monday at 00:00:00 CET. * **sliding**: conditions are applied and the counters are reset based on the current time and a `duration` that you specify. - /// - /// The [type of interval](https://docs.adyen.com/issuing/transaction-rules#time-intervals) during which the rule conditions and limits apply, and how often counters are reset. Possible values: * **perTransaction**: conditions are evaluated and the counters are reset for every transaction. * **daily**: the counters are reset daily at 00:00:00 CET. * **weekly**: the counters are reset every Monday at 00:00:00 CET. * **monthly**: the counters reset every first day of the month at 00:00:00 CET. * **lifetime**: conditions are applied to the lifetime of the payment instrument. * **rolling**: conditions are applied and the counters are reset based on a `duration`. If the reset date and time are not provided, Adyen applies the default reset time similar to fixed intervals. For example, if the duration is every two weeks, the counter resets every third Monday at 00:00:00 CET. * **sliding**: conditions are applied and the counters are reset based on the current time and a `duration` that you specify. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransactionRuleInterval() { } - /// - /// Initializes a new instance of the class. - /// - /// The day of month, used when the `duration.unit` is **months**. If not provided, by default, this is set to **1**, the first day of the month.. - /// The day of week, used when the `duration.unit` is **weeks**. If not provided, by default, this is set to **monday**. Possible values: **sunday**, **monday**, **tuesday**, **wednesday**, **thursday**, **friday**.. - /// duration. - /// The time of day, in **hh:mm:ss** format, used when the `duration.unit` is **hours**. If not provided, by default, this is set to **00:00:00**.. - /// The [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example, **Europe/Amsterdam**. By default, this is set to **UTC**.. - /// The [type of interval](https://docs.adyen.com/issuing/transaction-rules#time-intervals) during which the rule conditions and limits apply, and how often counters are reset. Possible values: * **perTransaction**: conditions are evaluated and the counters are reset for every transaction. * **daily**: the counters are reset daily at 00:00:00 CET. * **weekly**: the counters are reset every Monday at 00:00:00 CET. * **monthly**: the counters reset every first day of the month at 00:00:00 CET. * **lifetime**: conditions are applied to the lifetime of the payment instrument. * **rolling**: conditions are applied and the counters are reset based on a `duration`. If the reset date and time are not provided, Adyen applies the default reset time similar to fixed intervals. For example, if the duration is every two weeks, the counter resets every third Monday at 00:00:00 CET. * **sliding**: conditions are applied and the counters are reset based on the current time and a `duration` that you specify. (required). - public TransactionRuleInterval(int? dayOfMonth = default(int?), DayOfWeekEnum? dayOfWeek = default(DayOfWeekEnum?), Duration duration = default(Duration), string timeOfDay = default(string), string timeZone = default(string), TypeEnum type = default(TypeEnum)) - { - this.Type = type; - this.DayOfMonth = dayOfMonth; - this.DayOfWeek = dayOfWeek; - this.Duration = duration; - this.TimeOfDay = timeOfDay; - this.TimeZone = timeZone; - } - - /// - /// The day of month, used when the `duration.unit` is **months**. If not provided, by default, this is set to **1**, the first day of the month. - /// - /// The day of month, used when the `duration.unit` is **months**. If not provided, by default, this is set to **1**, the first day of the month. - [DataMember(Name = "dayOfMonth", EmitDefaultValue = false)] - public int? DayOfMonth { get; set; } - - /// - /// Gets or Sets Duration - /// - [DataMember(Name = "duration", EmitDefaultValue = false)] - public Duration Duration { get; set; } - - /// - /// The time of day, in **hh:mm:ss** format, used when the `duration.unit` is **hours**. If not provided, by default, this is set to **00:00:00**. - /// - /// The time of day, in **hh:mm:ss** format, used when the `duration.unit` is **hours**. If not provided, by default, this is set to **00:00:00**. - [DataMember(Name = "timeOfDay", EmitDefaultValue = false)] - public string TimeOfDay { get; set; } - - /// - /// The [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example, **Europe/Amsterdam**. By default, this is set to **UTC**. - /// - /// The [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example, **Europe/Amsterdam**. By default, this is set to **UTC**. - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleInterval {\n"); - sb.Append(" DayOfMonth: ").Append(DayOfMonth).Append("\n"); - sb.Append(" DayOfWeek: ").Append(DayOfWeek).Append("\n"); - sb.Append(" Duration: ").Append(Duration).Append("\n"); - sb.Append(" TimeOfDay: ").Append(TimeOfDay).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleInterval); - } - - /// - /// Returns true if TransactionRuleInterval instances are equal - /// - /// Instance of TransactionRuleInterval to be compared - /// Boolean - public bool Equals(TransactionRuleInterval input) - { - if (input == null) - { - return false; - } - return - ( - this.DayOfMonth == input.DayOfMonth || - this.DayOfMonth.Equals(input.DayOfMonth) - ) && - ( - this.DayOfWeek == input.DayOfWeek || - this.DayOfWeek.Equals(input.DayOfWeek) - ) && - ( - this.Duration == input.Duration || - (this.Duration != null && - this.Duration.Equals(input.Duration)) - ) && - ( - this.TimeOfDay == input.TimeOfDay || - (this.TimeOfDay != null && - this.TimeOfDay.Equals(input.TimeOfDay)) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.DayOfMonth.GetHashCode(); - hashCode = (hashCode * 59) + this.DayOfWeek.GetHashCode(); - if (this.Duration != null) - { - hashCode = (hashCode * 59) + this.Duration.GetHashCode(); - } - if (this.TimeOfDay != null) - { - hashCode = (hashCode * 59) + this.TimeOfDay.GetHashCode(); - } - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransactionRuleResponse.cs b/Adyen/Model/BalancePlatform/TransactionRuleResponse.cs deleted file mode 100644 index 822c07e58..000000000 --- a/Adyen/Model/BalancePlatform/TransactionRuleResponse.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransactionRuleResponse - /// - [DataContract(Name = "TransactionRuleResponse")] - public partial class TransactionRuleResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// transactionRule. - public TransactionRuleResponse(TransactionRule transactionRule = default(TransactionRule)) - { - this.TransactionRule = transactionRule; - } - - /// - /// Gets or Sets TransactionRule - /// - [DataMember(Name = "transactionRule", EmitDefaultValue = false)] - public TransactionRule TransactionRule { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleResponse {\n"); - sb.Append(" TransactionRule: ").Append(TransactionRule).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleResponse); - } - - /// - /// Returns true if TransactionRuleResponse instances are equal - /// - /// Instance of TransactionRuleResponse to be compared - /// Boolean - public bool Equals(TransactionRuleResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.TransactionRule == input.TransactionRule || - (this.TransactionRule != null && - this.TransactionRule.Equals(input.TransactionRule)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TransactionRule != null) - { - hashCode = (hashCode * 59) + this.TransactionRule.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.cs b/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.cs deleted file mode 100644 index 7edae221f..000000000 --- a/Adyen/Model/BalancePlatform/TransactionRuleRestrictions.cs +++ /dev/null @@ -1,506 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransactionRuleRestrictions - /// - [DataContract(Name = "TransactionRuleRestrictions")] - public partial class TransactionRuleRestrictions : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// activeNetworkTokens. - /// brandVariants. - /// counterpartyBank. - /// counterpartyTypes. - /// countries. - /// dayOfWeek. - /// differentCurrencies. - /// entryModes. - /// internationalTransaction. - /// matchingTransactions. - /// matchingValues. - /// mccs. - /// merchantNames. - /// merchants. - /// processingTypes. - /// riskScores. - /// sameAmountRestriction. - /// sameCounterpartyRestriction. - /// sourceAccountTypes. - /// timeOfDay. - /// tokenRequestors. - /// totalAmount. - public TransactionRuleRestrictions(ActiveNetworkTokensRestriction activeNetworkTokens = default(ActiveNetworkTokensRestriction), BrandVariantsRestriction brandVariants = default(BrandVariantsRestriction), CounterpartyBankRestriction counterpartyBank = default(CounterpartyBankRestriction), CounterpartyTypesRestriction counterpartyTypes = default(CounterpartyTypesRestriction), CountriesRestriction countries = default(CountriesRestriction), DayOfWeekRestriction dayOfWeek = default(DayOfWeekRestriction), DifferentCurrenciesRestriction differentCurrencies = default(DifferentCurrenciesRestriction), EntryModesRestriction entryModes = default(EntryModesRestriction), InternationalTransactionRestriction internationalTransaction = default(InternationalTransactionRestriction), MatchingTransactionsRestriction matchingTransactions = default(MatchingTransactionsRestriction), MatchingValuesRestriction matchingValues = default(MatchingValuesRestriction), MccsRestriction mccs = default(MccsRestriction), MerchantNamesRestriction merchantNames = default(MerchantNamesRestriction), MerchantsRestriction merchants = default(MerchantsRestriction), ProcessingTypesRestriction processingTypes = default(ProcessingTypesRestriction), RiskScoresRestriction riskScores = default(RiskScoresRestriction), SameAmountRestriction sameAmountRestriction = default(SameAmountRestriction), SameCounterpartyRestriction sameCounterpartyRestriction = default(SameCounterpartyRestriction), SourceAccountTypesRestriction sourceAccountTypes = default(SourceAccountTypesRestriction), TimeOfDayRestriction timeOfDay = default(TimeOfDayRestriction), TokenRequestorsRestriction tokenRequestors = default(TokenRequestorsRestriction), TotalAmountRestriction totalAmount = default(TotalAmountRestriction)) - { - this.ActiveNetworkTokens = activeNetworkTokens; - this.BrandVariants = brandVariants; - this.CounterpartyBank = counterpartyBank; - this.CounterpartyTypes = counterpartyTypes; - this.Countries = countries; - this.DayOfWeek = dayOfWeek; - this.DifferentCurrencies = differentCurrencies; - this.EntryModes = entryModes; - this.InternationalTransaction = internationalTransaction; - this.MatchingTransactions = matchingTransactions; - this.MatchingValues = matchingValues; - this.Mccs = mccs; - this.MerchantNames = merchantNames; - this.Merchants = merchants; - this.ProcessingTypes = processingTypes; - this.RiskScores = riskScores; - this.SameAmountRestriction = sameAmountRestriction; - this.SameCounterpartyRestriction = sameCounterpartyRestriction; - this.SourceAccountTypes = sourceAccountTypes; - this.TimeOfDay = timeOfDay; - this.TokenRequestors = tokenRequestors; - this.TotalAmount = totalAmount; - } - - /// - /// Gets or Sets ActiveNetworkTokens - /// - [DataMember(Name = "activeNetworkTokens", EmitDefaultValue = false)] - public ActiveNetworkTokensRestriction ActiveNetworkTokens { get; set; } - - /// - /// Gets or Sets BrandVariants - /// - [DataMember(Name = "brandVariants", EmitDefaultValue = false)] - public BrandVariantsRestriction BrandVariants { get; set; } - - /// - /// Gets or Sets CounterpartyBank - /// - [DataMember(Name = "counterpartyBank", EmitDefaultValue = false)] - public CounterpartyBankRestriction CounterpartyBank { get; set; } - - /// - /// Gets or Sets CounterpartyTypes - /// - [DataMember(Name = "counterpartyTypes", EmitDefaultValue = false)] - public CounterpartyTypesRestriction CounterpartyTypes { get; set; } - - /// - /// Gets or Sets Countries - /// - [DataMember(Name = "countries", EmitDefaultValue = false)] - public CountriesRestriction Countries { get; set; } - - /// - /// Gets or Sets DayOfWeek - /// - [DataMember(Name = "dayOfWeek", EmitDefaultValue = false)] - public DayOfWeekRestriction DayOfWeek { get; set; } - - /// - /// Gets or Sets DifferentCurrencies - /// - [DataMember(Name = "differentCurrencies", EmitDefaultValue = false)] - public DifferentCurrenciesRestriction DifferentCurrencies { get; set; } - - /// - /// Gets or Sets EntryModes - /// - [DataMember(Name = "entryModes", EmitDefaultValue = false)] - public EntryModesRestriction EntryModes { get; set; } - - /// - /// Gets or Sets InternationalTransaction - /// - [DataMember(Name = "internationalTransaction", EmitDefaultValue = false)] - public InternationalTransactionRestriction InternationalTransaction { get; set; } - - /// - /// Gets or Sets MatchingTransactions - /// - [DataMember(Name = "matchingTransactions", EmitDefaultValue = false)] - public MatchingTransactionsRestriction MatchingTransactions { get; set; } - - /// - /// Gets or Sets MatchingValues - /// - [DataMember(Name = "matchingValues", EmitDefaultValue = false)] - public MatchingValuesRestriction MatchingValues { get; set; } - - /// - /// Gets or Sets Mccs - /// - [DataMember(Name = "mccs", EmitDefaultValue = false)] - public MccsRestriction Mccs { get; set; } - - /// - /// Gets or Sets MerchantNames - /// - [DataMember(Name = "merchantNames", EmitDefaultValue = false)] - public MerchantNamesRestriction MerchantNames { get; set; } - - /// - /// Gets or Sets Merchants - /// - [DataMember(Name = "merchants", EmitDefaultValue = false)] - public MerchantsRestriction Merchants { get; set; } - - /// - /// Gets or Sets ProcessingTypes - /// - [DataMember(Name = "processingTypes", EmitDefaultValue = false)] - public ProcessingTypesRestriction ProcessingTypes { get; set; } - - /// - /// Gets or Sets RiskScores - /// - [DataMember(Name = "riskScores", EmitDefaultValue = false)] - public RiskScoresRestriction RiskScores { get; set; } - - /// - /// Gets or Sets SameAmountRestriction - /// - [DataMember(Name = "sameAmountRestriction", EmitDefaultValue = false)] - public SameAmountRestriction SameAmountRestriction { get; set; } - - /// - /// Gets or Sets SameCounterpartyRestriction - /// - [DataMember(Name = "sameCounterpartyRestriction", EmitDefaultValue = false)] - public SameCounterpartyRestriction SameCounterpartyRestriction { get; set; } - - /// - /// Gets or Sets SourceAccountTypes - /// - [DataMember(Name = "sourceAccountTypes", EmitDefaultValue = false)] - public SourceAccountTypesRestriction SourceAccountTypes { get; set; } - - /// - /// Gets or Sets TimeOfDay - /// - [DataMember(Name = "timeOfDay", EmitDefaultValue = false)] - public TimeOfDayRestriction TimeOfDay { get; set; } - - /// - /// Gets or Sets TokenRequestors - /// - [DataMember(Name = "tokenRequestors", EmitDefaultValue = false)] - public TokenRequestorsRestriction TokenRequestors { get; set; } - - /// - /// Gets or Sets TotalAmount - /// - [DataMember(Name = "totalAmount", EmitDefaultValue = false)] - public TotalAmountRestriction TotalAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleRestrictions {\n"); - sb.Append(" ActiveNetworkTokens: ").Append(ActiveNetworkTokens).Append("\n"); - sb.Append(" BrandVariants: ").Append(BrandVariants).Append("\n"); - sb.Append(" CounterpartyBank: ").Append(CounterpartyBank).Append("\n"); - sb.Append(" CounterpartyTypes: ").Append(CounterpartyTypes).Append("\n"); - sb.Append(" Countries: ").Append(Countries).Append("\n"); - sb.Append(" DayOfWeek: ").Append(DayOfWeek).Append("\n"); - sb.Append(" DifferentCurrencies: ").Append(DifferentCurrencies).Append("\n"); - sb.Append(" EntryModes: ").Append(EntryModes).Append("\n"); - sb.Append(" InternationalTransaction: ").Append(InternationalTransaction).Append("\n"); - sb.Append(" MatchingTransactions: ").Append(MatchingTransactions).Append("\n"); - sb.Append(" MatchingValues: ").Append(MatchingValues).Append("\n"); - sb.Append(" Mccs: ").Append(Mccs).Append("\n"); - sb.Append(" MerchantNames: ").Append(MerchantNames).Append("\n"); - sb.Append(" Merchants: ").Append(Merchants).Append("\n"); - sb.Append(" ProcessingTypes: ").Append(ProcessingTypes).Append("\n"); - sb.Append(" RiskScores: ").Append(RiskScores).Append("\n"); - sb.Append(" SameAmountRestriction: ").Append(SameAmountRestriction).Append("\n"); - sb.Append(" SameCounterpartyRestriction: ").Append(SameCounterpartyRestriction).Append("\n"); - sb.Append(" SourceAccountTypes: ").Append(SourceAccountTypes).Append("\n"); - sb.Append(" TimeOfDay: ").Append(TimeOfDay).Append("\n"); - sb.Append(" TokenRequestors: ").Append(TokenRequestors).Append("\n"); - sb.Append(" TotalAmount: ").Append(TotalAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleRestrictions); - } - - /// - /// Returns true if TransactionRuleRestrictions instances are equal - /// - /// Instance of TransactionRuleRestrictions to be compared - /// Boolean - public bool Equals(TransactionRuleRestrictions input) - { - if (input == null) - { - return false; - } - return - ( - this.ActiveNetworkTokens == input.ActiveNetworkTokens || - (this.ActiveNetworkTokens != null && - this.ActiveNetworkTokens.Equals(input.ActiveNetworkTokens)) - ) && - ( - this.BrandVariants == input.BrandVariants || - (this.BrandVariants != null && - this.BrandVariants.Equals(input.BrandVariants)) - ) && - ( - this.CounterpartyBank == input.CounterpartyBank || - (this.CounterpartyBank != null && - this.CounterpartyBank.Equals(input.CounterpartyBank)) - ) && - ( - this.CounterpartyTypes == input.CounterpartyTypes || - (this.CounterpartyTypes != null && - this.CounterpartyTypes.Equals(input.CounterpartyTypes)) - ) && - ( - this.Countries == input.Countries || - (this.Countries != null && - this.Countries.Equals(input.Countries)) - ) && - ( - this.DayOfWeek == input.DayOfWeek || - (this.DayOfWeek != null && - this.DayOfWeek.Equals(input.DayOfWeek)) - ) && - ( - this.DifferentCurrencies == input.DifferentCurrencies || - (this.DifferentCurrencies != null && - this.DifferentCurrencies.Equals(input.DifferentCurrencies)) - ) && - ( - this.EntryModes == input.EntryModes || - (this.EntryModes != null && - this.EntryModes.Equals(input.EntryModes)) - ) && - ( - this.InternationalTransaction == input.InternationalTransaction || - (this.InternationalTransaction != null && - this.InternationalTransaction.Equals(input.InternationalTransaction)) - ) && - ( - this.MatchingTransactions == input.MatchingTransactions || - (this.MatchingTransactions != null && - this.MatchingTransactions.Equals(input.MatchingTransactions)) - ) && - ( - this.MatchingValues == input.MatchingValues || - (this.MatchingValues != null && - this.MatchingValues.Equals(input.MatchingValues)) - ) && - ( - this.Mccs == input.Mccs || - (this.Mccs != null && - this.Mccs.Equals(input.Mccs)) - ) && - ( - this.MerchantNames == input.MerchantNames || - (this.MerchantNames != null && - this.MerchantNames.Equals(input.MerchantNames)) - ) && - ( - this.Merchants == input.Merchants || - (this.Merchants != null && - this.Merchants.Equals(input.Merchants)) - ) && - ( - this.ProcessingTypes == input.ProcessingTypes || - (this.ProcessingTypes != null && - this.ProcessingTypes.Equals(input.ProcessingTypes)) - ) && - ( - this.RiskScores == input.RiskScores || - (this.RiskScores != null && - this.RiskScores.Equals(input.RiskScores)) - ) && - ( - this.SameAmountRestriction == input.SameAmountRestriction || - (this.SameAmountRestriction != null && - this.SameAmountRestriction.Equals(input.SameAmountRestriction)) - ) && - ( - this.SameCounterpartyRestriction == input.SameCounterpartyRestriction || - (this.SameCounterpartyRestriction != null && - this.SameCounterpartyRestriction.Equals(input.SameCounterpartyRestriction)) - ) && - ( - this.SourceAccountTypes == input.SourceAccountTypes || - (this.SourceAccountTypes != null && - this.SourceAccountTypes.Equals(input.SourceAccountTypes)) - ) && - ( - this.TimeOfDay == input.TimeOfDay || - (this.TimeOfDay != null && - this.TimeOfDay.Equals(input.TimeOfDay)) - ) && - ( - this.TokenRequestors == input.TokenRequestors || - (this.TokenRequestors != null && - this.TokenRequestors.Equals(input.TokenRequestors)) - ) && - ( - this.TotalAmount == input.TotalAmount || - (this.TotalAmount != null && - this.TotalAmount.Equals(input.TotalAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActiveNetworkTokens != null) - { - hashCode = (hashCode * 59) + this.ActiveNetworkTokens.GetHashCode(); - } - if (this.BrandVariants != null) - { - hashCode = (hashCode * 59) + this.BrandVariants.GetHashCode(); - } - if (this.CounterpartyBank != null) - { - hashCode = (hashCode * 59) + this.CounterpartyBank.GetHashCode(); - } - if (this.CounterpartyTypes != null) - { - hashCode = (hashCode * 59) + this.CounterpartyTypes.GetHashCode(); - } - if (this.Countries != null) - { - hashCode = (hashCode * 59) + this.Countries.GetHashCode(); - } - if (this.DayOfWeek != null) - { - hashCode = (hashCode * 59) + this.DayOfWeek.GetHashCode(); - } - if (this.DifferentCurrencies != null) - { - hashCode = (hashCode * 59) + this.DifferentCurrencies.GetHashCode(); - } - if (this.EntryModes != null) - { - hashCode = (hashCode * 59) + this.EntryModes.GetHashCode(); - } - if (this.InternationalTransaction != null) - { - hashCode = (hashCode * 59) + this.InternationalTransaction.GetHashCode(); - } - if (this.MatchingTransactions != null) - { - hashCode = (hashCode * 59) + this.MatchingTransactions.GetHashCode(); - } - if (this.MatchingValues != null) - { - hashCode = (hashCode * 59) + this.MatchingValues.GetHashCode(); - } - if (this.Mccs != null) - { - hashCode = (hashCode * 59) + this.Mccs.GetHashCode(); - } - if (this.MerchantNames != null) - { - hashCode = (hashCode * 59) + this.MerchantNames.GetHashCode(); - } - if (this.Merchants != null) - { - hashCode = (hashCode * 59) + this.Merchants.GetHashCode(); - } - if (this.ProcessingTypes != null) - { - hashCode = (hashCode * 59) + this.ProcessingTypes.GetHashCode(); - } - if (this.RiskScores != null) - { - hashCode = (hashCode * 59) + this.RiskScores.GetHashCode(); - } - if (this.SameAmountRestriction != null) - { - hashCode = (hashCode * 59) + this.SameAmountRestriction.GetHashCode(); - } - if (this.SameCounterpartyRestriction != null) - { - hashCode = (hashCode * 59) + this.SameCounterpartyRestriction.GetHashCode(); - } - if (this.SourceAccountTypes != null) - { - hashCode = (hashCode * 59) + this.SourceAccountTypes.GetHashCode(); - } - if (this.TimeOfDay != null) - { - hashCode = (hashCode * 59) + this.TimeOfDay.GetHashCode(); - } - if (this.TokenRequestors != null) - { - hashCode = (hashCode * 59) + this.TokenRequestors.GetHashCode(); - } - if (this.TotalAmount != null) - { - hashCode = (hashCode * 59) + this.TotalAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransactionRulesResponse.cs b/Adyen/Model/BalancePlatform/TransactionRulesResponse.cs deleted file mode 100644 index 78c80498e..000000000 --- a/Adyen/Model/BalancePlatform/TransactionRulesResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransactionRulesResponse - /// - [DataContract(Name = "TransactionRulesResponse")] - public partial class TransactionRulesResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of transaction rules.. - public TransactionRulesResponse(List transactionRules = default(List)) - { - this.TransactionRules = transactionRules; - } - - /// - /// List of transaction rules. - /// - /// List of transaction rules. - [DataMember(Name = "transactionRules", EmitDefaultValue = false)] - public List TransactionRules { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRulesResponse {\n"); - sb.Append(" TransactionRules: ").Append(TransactionRules).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRulesResponse); - } - - /// - /// Returns true if TransactionRulesResponse instances are equal - /// - /// Instance of TransactionRulesResponse to be compared - /// Boolean - public bool Equals(TransactionRulesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.TransactionRules == input.TransactionRules || - this.TransactionRules != null && - input.TransactionRules != null && - this.TransactionRules.SequenceEqual(input.TransactionRules) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TransactionRules != null) - { - hashCode = (hashCode * 59) + this.TransactionRules.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransferRoute.cs b/Adyen/Model/BalancePlatform/TransferRoute.cs deleted file mode 100644 index f688b5cb0..000000000 --- a/Adyen/Model/BalancePlatform/TransferRoute.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransferRoute - /// - [DataContract(Name = "TransferRoute")] - public partial class TransferRoute : IEquatable, IValidatableObject - { - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2, - - /// - /// Enum Grants for value: grants - /// - [EnumMember(Value = "grants")] - Grants = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum IssuedCard for value: issuedCard - /// - [EnumMember(Value = "issuedCard")] - IssuedCard = 5, - - /// - /// Enum Migration for value: migration - /// - [EnumMember(Value = "migration")] - Migration = 6, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 7, - - /// - /// Enum TopUp for value: topUp - /// - [EnumMember(Value = "topUp")] - TopUp = 8, - - /// - /// Enum Upgrade for value: upgrade - /// - [EnumMember(Value = "upgrade")] - Upgrade = 9 - - } - - - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - [DataMember(Name = "category", EmitDefaultValue = false)] - public CategoryEnum? Category { get; set; } - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [JsonConverter(typeof(StringEnumConverter))] - public enum PriorityEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [DataMember(Name = "priority", EmitDefaultValue = false)] - public PriorityEnum? Priority { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. . - /// The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**.. - /// The three-character ISO currency code of transfer. For example, **USD** or **EUR**.. - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN).. - /// A set of rules defined by clearing houses and banking partners. Your transfer request must adhere to these rules to ensure successful initiation of transfer. Based on the priority, one or more requirements may be returned. Each requirement is defined with a `type` and `description`.. - public TransferRoute(CategoryEnum? category = default(CategoryEnum?), string country = default(string), string currency = default(string), PriorityEnum? priority = default(PriorityEnum?), List requirements = default(List)) - { - this.Category = category; - this.Country = country; - this.Currency = currency; - this.Priority = priority; - this.Requirements = requirements; - } - - /// - /// The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**. - /// - /// The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The three-character ISO currency code of transfer. For example, **USD** or **EUR**. - /// - /// The three-character ISO currency code of transfer. For example, **USD** or **EUR**. - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// A set of rules defined by clearing houses and banking partners. Your transfer request must adhere to these rules to ensure successful initiation of transfer. Based on the priority, one or more requirements may be returned. Each requirement is defined with a `type` and `description`. - /// - /// A set of rules defined by clearing houses and banking partners. Your transfer request must adhere to these rules to ensure successful initiation of transfer. Based on the priority, one or more requirements may be returned. Each requirement is defined with a `type` and `description`. - [DataMember(Name = "requirements", EmitDefaultValue = false)] - public List Requirements { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferRoute {\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Priority: ").Append(Priority).Append("\n"); - sb.Append(" Requirements: ").Append(Requirements).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferRoute); - } - - /// - /// Returns true if TransferRoute instances are equal - /// - /// Instance of TransferRoute to be compared - /// Boolean - public bool Equals(TransferRoute input) - { - if (input == null) - { - return false; - } - return - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Priority == input.Priority || - this.Priority.Equals(input.Priority) - ) && - ( - this.Requirements == input.Requirements || - this.Requirements != null && - input.Requirements != null && - this.Requirements.SequenceEqual(input.Requirements) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priority.GetHashCode(); - if (this.Requirements != null) - { - hashCode = (hashCode * 59) + this.Requirements.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransferRouteRequest.cs b/Adyen/Model/BalancePlatform/TransferRouteRequest.cs deleted file mode 100644 index b8bdd4958..000000000 --- a/Adyen/Model/BalancePlatform/TransferRouteRequest.cs +++ /dev/null @@ -1,299 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransferRouteRequest - /// - [DataContract(Name = "TransferRouteRequest")] - public partial class TransferRouteRequest : IEquatable, IValidatableObject - { - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1 - - } - - - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - /// - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - [DataMember(Name = "category", IsRequired = false, EmitDefaultValue = false)] - public CategoryEnum Category { get; set; } - /// - /// Defines Priorities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PrioritiesEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - - /// - /// The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [DataMember(Name = "priorities", EmitDefaultValue = false)] - public List Priorities { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferRouteRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). Required if `counterparty` is **transferInstrumentId**.. - /// The unique identifier assigned to the balance platform associated with the account holder. (required). - /// The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. (required). - /// counterparty. - /// The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**. > Either `counterparty` or `country` field must be provided in a transfer route request.. - /// The three-character ISO currency code of transfer. For example, **USD** or **EUR**. (required). - /// The list of priorities for the bank transfer. Priorities set the speed at which the transfer is sent and the fees that you have to pay. Multiple values can be provided. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN).. - public TransferRouteRequest(string balanceAccountId = default(string), string balancePlatform = default(string), CategoryEnum category = default(CategoryEnum), Counterparty counterparty = default(Counterparty), string country = default(string), string currency = default(string), List priorities = default(List)) - { - this.BalancePlatform = balancePlatform; - this.Category = category; - this.Currency = currency; - this.BalanceAccountId = balanceAccountId; - this.Counterparty = counterparty; - this.Country = country; - this.Priorities = priorities; - } - - /// - /// The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). Required if `counterparty` is **transferInstrumentId**. - /// - /// The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). Required if `counterparty` is **transferInstrumentId**. - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// The unique identifier assigned to the balance platform associated with the account holder. - /// - /// The unique identifier assigned to the balance platform associated with the account holder. - [DataMember(Name = "balancePlatform", IsRequired = false, EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", EmitDefaultValue = false)] - public Counterparty Counterparty { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**. > Either `counterparty` or `country` field must be provided in a transfer route request. - /// - /// The two-character ISO-3166-1 alpha-2 country code of the counterparty. For example, **US** or **NL**. > Either `counterparty` or `country` field must be provided in a transfer route request. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The three-character ISO currency code of transfer. For example, **USD** or **EUR**. - /// - /// The three-character ISO currency code of transfer. For example, **USD** or **EUR**. - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferRouteRequest {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Priorities: ").Append(Priorities).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferRouteRequest); - } - - /// - /// Returns true if TransferRouteRequest instances are equal - /// - /// Instance of TransferRouteRequest to be compared - /// Boolean - public bool Equals(TransferRouteRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Priorities == input.Priorities || - this.Priorities.SequenceEqual(input.Priorities) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priorities.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.cs b/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.cs deleted file mode 100644 index 513da3fdf..000000000 --- a/Adyen/Model/BalancePlatform/TransferRouteRequirementsInner.cs +++ /dev/null @@ -1,446 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransferRouteRequirementsInner - /// - [JsonConverter(typeof(TransferRouteRequirementsInnerJsonConverter))] - [DataContract(Name = "TransferRoute_requirements_inner")] - public partial class TransferRouteRequirementsInner : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AddressRequirement. - public TransferRouteRequirementsInner(AddressRequirement actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AmountMinMaxRequirement. - public TransferRouteRequirementsInner(AmountMinMaxRequirement actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AmountNonZeroDecimalsRequirement. - public TransferRouteRequirementsInner(AmountNonZeroDecimalsRequirement actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BankAccountIdentificationTypeRequirement. - public TransferRouteRequirementsInner(BankAccountIdentificationTypeRequirement actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IbanAccountIdentificationRequirement. - public TransferRouteRequirementsInner(IbanAccountIdentificationRequirement actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PaymentInstrumentRequirement. - public TransferRouteRequirementsInner(PaymentInstrumentRequirement actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of USInternationalAchAddressRequirement. - public TransferRouteRequirementsInner(USInternationalAchAddressRequirement actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AddressRequirement)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AmountMinMaxRequirement)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AmountNonZeroDecimalsRequirement)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BankAccountIdentificationTypeRequirement)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IbanAccountIdentificationRequirement)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PaymentInstrumentRequirement)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(USInternationalAchAddressRequirement)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AddressRequirement, AmountMinMaxRequirement, AmountNonZeroDecimalsRequirement, BankAccountIdentificationTypeRequirement, IbanAccountIdentificationRequirement, PaymentInstrumentRequirement, USInternationalAchAddressRequirement"); - } - } - } - - /// - /// Get the actual instance of `AddressRequirement`. If the actual instance is not `AddressRequirement`, - /// the InvalidClassException will be thrown - /// - /// An instance of AddressRequirement - public AddressRequirement GetAddressRequirement() - { - return (AddressRequirement)this.ActualInstance; - } - - /// - /// Get the actual instance of `AmountMinMaxRequirement`. If the actual instance is not `AmountMinMaxRequirement`, - /// the InvalidClassException will be thrown - /// - /// An instance of AmountMinMaxRequirement - public AmountMinMaxRequirement GetAmountMinMaxRequirement() - { - return (AmountMinMaxRequirement)this.ActualInstance; - } - - /// - /// Get the actual instance of `AmountNonZeroDecimalsRequirement`. If the actual instance is not `AmountNonZeroDecimalsRequirement`, - /// the InvalidClassException will be thrown - /// - /// An instance of AmountNonZeroDecimalsRequirement - public AmountNonZeroDecimalsRequirement GetAmountNonZeroDecimalsRequirement() - { - return (AmountNonZeroDecimalsRequirement)this.ActualInstance; - } - - /// - /// Get the actual instance of `BankAccountIdentificationTypeRequirement`. If the actual instance is not `BankAccountIdentificationTypeRequirement`, - /// the InvalidClassException will be thrown - /// - /// An instance of BankAccountIdentificationTypeRequirement - public BankAccountIdentificationTypeRequirement GetBankAccountIdentificationTypeRequirement() - { - return (BankAccountIdentificationTypeRequirement)this.ActualInstance; - } - - /// - /// Get the actual instance of `IbanAccountIdentificationRequirement`. If the actual instance is not `IbanAccountIdentificationRequirement`, - /// the InvalidClassException will be thrown - /// - /// An instance of IbanAccountIdentificationRequirement - public IbanAccountIdentificationRequirement GetIbanAccountIdentificationRequirement() - { - return (IbanAccountIdentificationRequirement)this.ActualInstance; - } - - /// - /// Get the actual instance of `PaymentInstrumentRequirement`. If the actual instance is not `PaymentInstrumentRequirement`, - /// the InvalidClassException will be thrown - /// - /// An instance of PaymentInstrumentRequirement - public PaymentInstrumentRequirement GetPaymentInstrumentRequirement() - { - return (PaymentInstrumentRequirement)this.ActualInstance; - } - - /// - /// Get the actual instance of `USInternationalAchAddressRequirement`. If the actual instance is not `USInternationalAchAddressRequirement`, - /// the InvalidClassException will be thrown - /// - /// An instance of USInternationalAchAddressRequirement - public USInternationalAchAddressRequirement GetUSInternationalAchAddressRequirement() - { - return (USInternationalAchAddressRequirement)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferRouteRequirementsInner {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferRouteRequirementsInner.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferRouteRequirementsInner - /// - /// JSON string - /// An instance of TransferRouteRequirementsInner - public static TransferRouteRequirementsInner FromJson(string jsonString) - { - TransferRouteRequirementsInner newTransferRouteRequirementsInner = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferRouteRequirementsInner; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the AddressRequirement type enums - if (ContainsValue(type)) - { - newTransferRouteRequirementsInner = new TransferRouteRequirementsInner(JsonConvert.DeserializeObject(jsonString, TransferRouteRequirementsInner.SerializerSettings)); - matchedTypes.Add("AddressRequirement"); - match++; - } - // Check if the jsonString type enum matches the AmountMinMaxRequirement type enums - if (ContainsValue(type)) - { - newTransferRouteRequirementsInner = new TransferRouteRequirementsInner(JsonConvert.DeserializeObject(jsonString, TransferRouteRequirementsInner.SerializerSettings)); - matchedTypes.Add("AmountMinMaxRequirement"); - match++; - } - // Check if the jsonString type enum matches the AmountNonZeroDecimalsRequirement type enums - if (ContainsValue(type)) - { - newTransferRouteRequirementsInner = new TransferRouteRequirementsInner(JsonConvert.DeserializeObject(jsonString, TransferRouteRequirementsInner.SerializerSettings)); - matchedTypes.Add("AmountNonZeroDecimalsRequirement"); - match++; - } - // Check if the jsonString type enum matches the BankAccountIdentificationTypeRequirement type enums - if (ContainsValue(type)) - { - newTransferRouteRequirementsInner = new TransferRouteRequirementsInner(JsonConvert.DeserializeObject(jsonString, TransferRouteRequirementsInner.SerializerSettings)); - matchedTypes.Add("BankAccountIdentificationTypeRequirement"); - match++; - } - // Check if the jsonString type enum matches the IbanAccountIdentificationRequirement type enums - if (ContainsValue(type)) - { - newTransferRouteRequirementsInner = new TransferRouteRequirementsInner(JsonConvert.DeserializeObject(jsonString, TransferRouteRequirementsInner.SerializerSettings)); - matchedTypes.Add("IbanAccountIdentificationRequirement"); - match++; - } - // Check if the jsonString type enum matches the PaymentInstrumentRequirement type enums - if (ContainsValue(type)) - { - newTransferRouteRequirementsInner = new TransferRouteRequirementsInner(JsonConvert.DeserializeObject(jsonString, TransferRouteRequirementsInner.SerializerSettings)); - matchedTypes.Add("PaymentInstrumentRequirement"); - match++; - } - // Check if the jsonString type enum matches the USInternationalAchAddressRequirement type enums - if (ContainsValue(type)) - { - newTransferRouteRequirementsInner = new TransferRouteRequirementsInner(JsonConvert.DeserializeObject(jsonString, TransferRouteRequirementsInner.SerializerSettings)); - matchedTypes.Add("USInternationalAchAddressRequirement"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferRouteRequirementsInner; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferRouteRequirementsInner); - } - - /// - /// Returns true if TransferRouteRequirementsInner instances are equal - /// - /// Instance of TransferRouteRequirementsInner to be compared - /// Boolean - public bool Equals(TransferRouteRequirementsInner input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferRouteRequirementsInner - /// - public class TransferRouteRequirementsInnerJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferRouteRequirementsInner).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferRouteRequirementsInner.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/TransferRouteResponse.cs b/Adyen/Model/BalancePlatform/TransferRouteResponse.cs deleted file mode 100644 index 79ebbd705..000000000 --- a/Adyen/Model/BalancePlatform/TransferRouteResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// TransferRouteResponse - /// - [DataContract(Name = "TransferRouteResponse")] - public partial class TransferRouteResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of available priorities for a transfer, along with requirements. Use this information to initiate a transfer.. - public TransferRouteResponse(List transferRoutes = default(List)) - { - this.TransferRoutes = transferRoutes; - } - - /// - /// List of available priorities for a transfer, along with requirements. Use this information to initiate a transfer. - /// - /// List of available priorities for a transfer, along with requirements. Use this information to initiate a transfer. - [DataMember(Name = "transferRoutes", EmitDefaultValue = false)] - public List TransferRoutes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferRouteResponse {\n"); - sb.Append(" TransferRoutes: ").Append(TransferRoutes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferRouteResponse); - } - - /// - /// Returns true if TransferRouteResponse instances are equal - /// - /// Instance of TransferRouteResponse to be compared - /// Boolean - public bool Equals(TransferRouteResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.TransferRoutes == input.TransferRoutes || - this.TransferRoutes != null && - input.TransferRoutes != null && - this.TransferRoutes.SequenceEqual(input.TransferRoutes) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TransferRoutes != null) - { - hashCode = (hashCode * 59) + this.TransferRoutes.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.cs deleted file mode 100644 index 2be74cb47..000000000 --- a/Adyen/Model/BalancePlatform/UKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// UKLocalAccountIdentification - /// - [DataContract(Name = "UKLocalAccountIdentification")] - public partial class UKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **ukLocal** - /// - /// **ukLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UkLocal for value: ukLocal - /// - [EnumMember(Value = "ukLocal")] - UkLocal = 1 - - } - - - /// - /// **ukLocal** - /// - /// **ukLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 8-digit bank account number, without separators or whitespace. (required). - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). - /// **ukLocal** (required) (default to TypeEnum.UkLocal). - public UKLocalAccountIdentification(string accountNumber = default(string), string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) - { - this.AccountNumber = accountNumber; - this.SortCode = sortCode; - this.Type = type; - } - - /// - /// The 8-digit bank account number, without separators or whitespace. - /// - /// The 8-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - /// - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - [DataMember(Name = "sortCode", IsRequired = false, EmitDefaultValue = false)] - public string SortCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" SortCode: ").Append(SortCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UKLocalAccountIdentification); - } - - /// - /// Returns true if UKLocalAccountIdentification instances are equal - /// - /// Instance of UKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(UKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.SortCode == input.SortCode || - (this.SortCode != null && - this.SortCode.Equals(input.SortCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.SortCode != null) - { - hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 8.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 8.", new [] { "AccountNumber" }); - } - - // SortCode (string) maxLength - if (this.SortCode != null && this.SortCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be less than 6.", new [] { "SortCode" }); - } - - // SortCode (string) minLength - if (this.SortCode != null && this.SortCode.Length < 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be greater than 6.", new [] { "SortCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/USInternationalAchAddressRequirement.cs b/Adyen/Model/BalancePlatform/USInternationalAchAddressRequirement.cs deleted file mode 100644 index 8d299c4f8..000000000 --- a/Adyen/Model/BalancePlatform/USInternationalAchAddressRequirement.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// USInternationalAchAddressRequirement - /// - [DataContract(Name = "USInternationalAchAddressRequirement")] - public partial class USInternationalAchAddressRequirement : IEquatable, IValidatableObject - { - /// - /// **usInternationalAchAddressRequirement** - /// - /// **usInternationalAchAddressRequirement** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UsInternationalAchAddressRequirement for value: usInternationalAchAddressRequirement - /// - [EnumMember(Value = "usInternationalAchAddressRequirement")] - UsInternationalAchAddressRequirement = 1 - - } - - - /// - /// **usInternationalAchAddressRequirement** - /// - /// **usInternationalAchAddressRequirement** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected USInternationalAchAddressRequirement() { } - /// - /// Initializes a new instance of the class. - /// - /// Specifies that you must provide a complete street address for International ACH (IAT) transactions.. - /// **usInternationalAchAddressRequirement** (required) (default to TypeEnum.UsInternationalAchAddressRequirement). - public USInternationalAchAddressRequirement(string description = default(string), TypeEnum type = TypeEnum.UsInternationalAchAddressRequirement) - { - this.Type = type; - this.Description = description; - } - - /// - /// Specifies that you must provide a complete street address for International ACH (IAT) transactions. - /// - /// Specifies that you must provide a complete street address for International ACH (IAT) transactions. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class USInternationalAchAddressRequirement {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as USInternationalAchAddressRequirement); - } - - /// - /// Returns true if USInternationalAchAddressRequirement instances are equal - /// - /// Instance of USInternationalAchAddressRequirement to be compared - /// Boolean - public bool Equals(USInternationalAchAddressRequirement input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/USLocalAccountIdentification.cs b/Adyen/Model/BalancePlatform/USLocalAccountIdentification.cs deleted file mode 100644 index 43e05c8f9..000000000 --- a/Adyen/Model/BalancePlatform/USLocalAccountIdentification.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// USLocalAccountIdentification - /// - [DataContract(Name = "USLocalAccountIdentification")] - public partial class USLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 1, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 2 - - } - - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// **usLocal** - /// - /// **usLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UsLocal for value: usLocal - /// - [EnumMember(Value = "usLocal")] - UsLocal = 1 - - } - - - /// - /// **usLocal** - /// - /// **usLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected USLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). - /// **usLocal** (required) (default to TypeEnum.UsLocal). - public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) - { - this.AccountNumber = accountNumber; - this.RoutingNumber = routingNumber; - this.Type = type; - this.AccountType = accountType; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - /// - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - [DataMember(Name = "routingNumber", IsRequired = false, EmitDefaultValue = false)] - public string RoutingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class USLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as USLocalAccountIdentification); - } - - /// - /// Returns true if USLocalAccountIdentification instances are equal - /// - /// Instance of USLocalAccountIdentification to be compared - /// Boolean - public bool Equals(USLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.RoutingNumber == input.RoutingNumber || - (this.RoutingNumber != null && - this.RoutingNumber.Equals(input.RoutingNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.RoutingNumber != null) - { - hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 18) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 18.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 2.", new [] { "AccountNumber" }); - } - - // RoutingNumber (string) maxLength - if (this.RoutingNumber != null && this.RoutingNumber.Length > 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RoutingNumber, length must be less than 9.", new [] { "RoutingNumber" }); - } - - // RoutingNumber (string) minLength - if (this.RoutingNumber != null && this.RoutingNumber.Length < 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RoutingNumber, length must be greater than 9.", new [] { "RoutingNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.cs b/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.cs deleted file mode 100644 index 7ce381b82..000000000 --- a/Adyen/Model/BalancePlatform/UpdateNetworkTokenRequest.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// UpdateNetworkTokenRequest - /// - [DataContract(Name = "UpdateNetworkTokenRequest")] - public partial class UpdateNetworkTokenRequest : IEquatable, IValidatableObject - { - /// - /// The new status of the network token. Possible values: **active**, **suspended**, **closed**. The **closed** status is final and cannot be changed. - /// - /// The new status of the network token. Possible values: **active**, **suspended**, **closed**. The **closed** status is final and cannot be changed. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 2, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 3 - - } - - - /// - /// The new status of the network token. Possible values: **active**, **suspended**, **closed**. The **closed** status is final and cannot be changed. - /// - /// The new status of the network token. Possible values: **active**, **suspended**, **closed**. The **closed** status is final and cannot be changed. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The new status of the network token. Possible values: **active**, **suspended**, **closed**. The **closed** status is final and cannot be changed.. - public UpdateNetworkTokenRequest(StatusEnum? status = default(StatusEnum?)) - { - this.Status = status; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateNetworkTokenRequest {\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateNetworkTokenRequest); - } - - /// - /// Returns true if UpdateNetworkTokenRequest instances are equal - /// - /// Instance of UpdateNetworkTokenRequest to be compared - /// Boolean - public bool Equals(UpdateNetworkTokenRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.cs b/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.cs deleted file mode 100644 index c5a51ca40..000000000 --- a/Adyen/Model/BalancePlatform/UpdatePaymentInstrument.cs +++ /dev/null @@ -1,479 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// UpdatePaymentInstrument - /// - [DataContract(Name = "UpdatePaymentInstrument")] - public partial class UpdatePaymentInstrument : IEquatable, IValidatableObject - { - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusReasonEnum - { - /// - /// Enum AccountClosure for value: accountClosure - /// - [EnumMember(Value = "accountClosure")] - AccountClosure = 1, - - /// - /// Enum Damaged for value: damaged - /// - [EnumMember(Value = "damaged")] - Damaged = 2, - - /// - /// Enum EndOfLife for value: endOfLife - /// - [EnumMember(Value = "endOfLife")] - EndOfLife = 3, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 4, - - /// - /// Enum Lost for value: lost - /// - [EnumMember(Value = "lost")] - Lost = 5, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 6, - - /// - /// Enum Stolen for value: stolen - /// - [EnumMember(Value = "stolen")] - Stolen = 7, - - /// - /// Enum SuspectedFraud for value: suspectedFraud - /// - [EnumMember(Value = "suspectedFraud")] - SuspectedFraud = 8, - - /// - /// Enum TransactionRule for value: transactionRule - /// - [EnumMember(Value = "transactionRule")] - TransactionRule = 9 - - } - - - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [DataMember(Name = "statusReason", EmitDefaultValue = false)] - public StatusReasonEnum? StatusReason { get; set; } - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2 - - } - - - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdatePaymentInstrument() { } - /// - /// Initializes a new instance of the class. - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.. - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. (required). - /// bankAccount. - /// card. - /// Your description for the payment instrument, maximum 300 characters.. - /// The unique identifier of the payment instrument. (required). - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. (required). - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.. - /// Your reference for the payment instrument, maximum 150 characters.. - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. . - /// Comment for the status of the payment instrument. Required if `statusReason` is **other**.. - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.. - /// The type of payment instrument. Possible values: **card**, **bankAccount**. (required). - public UpdatePaymentInstrument(List additionalBankAccountIdentifications = default(List), string balanceAccountId = default(string), BankAccountDetails bankAccount = default(BankAccountDetails), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string statusComment = default(string), StatusReasonEnum? statusReason = default(StatusReasonEnum?), TypeEnum type = default(TypeEnum)) - { - this.BalanceAccountId = balanceAccountId; - this.Id = id; - this.IssuingCountryCode = issuingCountryCode; - this.Type = type; - this.AdditionalBankAccountIdentifications = additionalBankAccountIdentifications; - this.BankAccount = bankAccount; - this.Card = card; - this.Description = description; - this.PaymentInstrumentGroupId = paymentInstrumentGroupId; - this.Reference = reference; - this.Status = status; - this.StatusComment = statusComment; - this.StatusReason = statusReason; - } - - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. - [DataMember(Name = "additionalBankAccountIdentifications", EmitDefaultValue = false)] - [Obsolete("Deprecated since Configuration API v2. Please use `bankAccount` object instead")] - public List AdditionalBankAccountIdentifications { get; set; } - - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. - [DataMember(Name = "balanceAccountId", IsRequired = false, EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountDetails BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Your description for the payment instrument, maximum 300 characters. - /// - /// Your description for the payment instrument, maximum 300 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the payment instrument. - /// - /// The unique identifier of the payment instrument. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - [DataMember(Name = "issuingCountryCode", IsRequired = false, EmitDefaultValue = false)] - public string IssuingCountryCode { get; set; } - - /// - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. - /// - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. - [DataMember(Name = "paymentInstrumentGroupId", EmitDefaultValue = false)] - public string PaymentInstrumentGroupId { get; set; } - - /// - /// Your reference for the payment instrument, maximum 150 characters. - /// - /// Your reference for the payment instrument, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Comment for the status of the payment instrument. Required if `statusReason` is **other**. - /// - /// Comment for the status of the payment instrument. Required if `statusReason` is **other**. - [DataMember(Name = "statusComment", EmitDefaultValue = false)] - public string StatusComment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdatePaymentInstrument {\n"); - sb.Append(" AdditionalBankAccountIdentifications: ").Append(AdditionalBankAccountIdentifications).Append("\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" IssuingCountryCode: ").Append(IssuingCountryCode).Append("\n"); - sb.Append(" PaymentInstrumentGroupId: ").Append(PaymentInstrumentGroupId).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StatusComment: ").Append(StatusComment).Append("\n"); - sb.Append(" StatusReason: ").Append(StatusReason).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdatePaymentInstrument); - } - - /// - /// Returns true if UpdatePaymentInstrument instances are equal - /// - /// Instance of UpdatePaymentInstrument to be compared - /// Boolean - public bool Equals(UpdatePaymentInstrument input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalBankAccountIdentifications == input.AdditionalBankAccountIdentifications || - this.AdditionalBankAccountIdentifications != null && - input.AdditionalBankAccountIdentifications != null && - this.AdditionalBankAccountIdentifications.SequenceEqual(input.AdditionalBankAccountIdentifications) - ) && - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuingCountryCode == input.IssuingCountryCode || - (this.IssuingCountryCode != null && - this.IssuingCountryCode.Equals(input.IssuingCountryCode)) - ) && - ( - this.PaymentInstrumentGroupId == input.PaymentInstrumentGroupId || - (this.PaymentInstrumentGroupId != null && - this.PaymentInstrumentGroupId.Equals(input.PaymentInstrumentGroupId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StatusComment == input.StatusComment || - (this.StatusComment != null && - this.StatusComment.Equals(input.StatusComment)) - ) && - ( - this.StatusReason == input.StatusReason || - this.StatusReason.Equals(input.StatusReason) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalBankAccountIdentifications != null) - { - hashCode = (hashCode * 59) + this.AdditionalBankAccountIdentifications.GetHashCode(); - } - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuingCountryCode != null) - { - hashCode = (hashCode * 59) + this.IssuingCountryCode.GetHashCode(); - } - if (this.PaymentInstrumentGroupId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentGroupId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StatusComment != null) - { - hashCode = (hashCode * 59) + this.StatusComment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusReason.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.cs b/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.cs deleted file mode 100644 index 204f7cc72..000000000 --- a/Adyen/Model/BalancePlatform/UpdateSweepConfigurationV2.cs +++ /dev/null @@ -1,665 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// UpdateSweepConfigurationV2 - /// - [DataContract(Name = "UpdateSweepConfigurationV2")] - public partial class UpdateSweepConfigurationV2 : IEquatable, IValidatableObject - { - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 2, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 3 - - } - - - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - [DataMember(Name = "category", EmitDefaultValue = false)] - public CategoryEnum? Category { get; set; } - /// - /// Defines Priorities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PrioritiesEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). - [DataMember(Name = "priorities", EmitDefaultValue = false)] - public List Priorities { get; set; } - /// - /// The reason for disabling the sweep. - /// - /// The reason for disabling the sweep. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 16, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 17, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 18, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 19, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 20, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 21, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 22, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 23 - - } - - - /// - /// The reason for disabling the sweep. - /// - /// The reason for disabling the sweep. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - - /// - /// Returns false as Reason should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeReason() - { - return false; - } - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 2 - - } - - - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Pull for value: pull - /// - [EnumMember(Value = "pull")] - Pull = 1, - - /// - /// Enum Push for value: push - /// - [EnumMember(Value = "push")] - Push = 2 - - } - - - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`.. - /// counterparty. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances).. - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters.. - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup).. - /// Your reference for the sweep configuration.. - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed.. - /// schedule. - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. . - /// sweepAmount. - /// targetAmount. - /// triggerAmount. - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. (default to TypeEnum.Push). - public UpdateSweepConfigurationV2(CategoryEnum? category = default(CategoryEnum?), SweepCounterparty counterparty = default(SweepCounterparty), string currency = default(string), string description = default(string), List priorities = default(List), string reference = default(string), string referenceForBeneficiary = default(string), SweepSchedule schedule = default(SweepSchedule), StatusEnum? status = default(StatusEnum?), Amount sweepAmount = default(Amount), Amount targetAmount = default(Amount), Amount triggerAmount = default(Amount), TypeEnum? type = TypeEnum.Push) - { - this.Category = category; - this.Counterparty = counterparty; - this.Currency = currency; - this.Description = description; - this.Priorities = priorities; - this.Reference = reference; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Schedule = schedule; - this.Status = status; - this.SweepAmount = sweepAmount; - this.TargetAmount = targetAmount; - this.TriggerAmount = triggerAmount; - this.Type = type; - } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", EmitDefaultValue = false)] - public SweepCounterparty Counterparty { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. - /// - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the sweep. - /// - /// The unique identifier of the sweep. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// The human readable reason for disabling the sweep. - /// - /// The human readable reason for disabling the sweep. - [DataMember(Name = "reasonDetail", EmitDefaultValue = false)] - public string ReasonDetail { get; private set; } - - /// - /// Your reference for the sweep configuration. - /// - /// Your reference for the sweep configuration. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. - /// - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Schedule - /// - [DataMember(Name = "schedule", EmitDefaultValue = false)] - public SweepSchedule Schedule { get; set; } - - /// - /// Gets or Sets SweepAmount - /// - [DataMember(Name = "sweepAmount", EmitDefaultValue = false)] - public Amount SweepAmount { get; set; } - - /// - /// Gets or Sets TargetAmount - /// - [DataMember(Name = "targetAmount", EmitDefaultValue = false)] - public Amount TargetAmount { get; set; } - - /// - /// Gets or Sets TriggerAmount - /// - [DataMember(Name = "triggerAmount", EmitDefaultValue = false)] - public Amount TriggerAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateSweepConfigurationV2 {\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Priorities: ").Append(Priorities).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" ReasonDetail: ").Append(ReasonDetail).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Schedule: ").Append(Schedule).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" SweepAmount: ").Append(SweepAmount).Append("\n"); - sb.Append(" TargetAmount: ").Append(TargetAmount).Append("\n"); - sb.Append(" TriggerAmount: ").Append(TriggerAmount).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateSweepConfigurationV2); - } - - /// - /// Returns true if UpdateSweepConfigurationV2 instances are equal - /// - /// Instance of UpdateSweepConfigurationV2 to be compared - /// Boolean - public bool Equals(UpdateSweepConfigurationV2 input) - { - if (input == null) - { - return false; - } - return - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Priorities == input.Priorities || - this.Priorities.SequenceEqual(input.Priorities) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.ReasonDetail == input.ReasonDetail || - (this.ReasonDetail != null && - this.ReasonDetail.Equals(input.ReasonDetail)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Schedule == input.Schedule || - (this.Schedule != null && - this.Schedule.Equals(input.Schedule)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.SweepAmount == input.SweepAmount || - (this.SweepAmount != null && - this.SweepAmount.Equals(input.SweepAmount)) - ) && - ( - this.TargetAmount == input.TargetAmount || - (this.TargetAmount != null && - this.TargetAmount.Equals(input.TargetAmount)) - ) && - ( - this.TriggerAmount == input.TriggerAmount || - (this.TriggerAmount != null && - this.TriggerAmount.Equals(input.TriggerAmount)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priorities.GetHashCode(); - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - if (this.ReasonDetail != null) - { - hashCode = (hashCode * 59) + this.ReasonDetail.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - if (this.Schedule != null) - { - hashCode = (hashCode * 59) + this.Schedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.SweepAmount != null) - { - hashCode = (hashCode * 59) + this.SweepAmount.GetHashCode(); - } - if (this.TargetAmount != null) - { - hashCode = (hashCode * 59) + this.TargetAmount.GetHashCode(); - } - if (this.TriggerAmount != null) - { - hashCode = (hashCode * 59) + this.TriggerAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - // ReferenceForBeneficiary (string) maxLength - if (this.ReferenceForBeneficiary != null && this.ReferenceForBeneficiary.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReferenceForBeneficiary, length must be less than 80.", new [] { "ReferenceForBeneficiary" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/VerificationDeadline.cs b/Adyen/Model/BalancePlatform/VerificationDeadline.cs deleted file mode 100644 index e85e8d2ea..000000000 --- a/Adyen/Model/BalancePlatform/VerificationDeadline.cs +++ /dev/null @@ -1,507 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// VerificationDeadline - /// - [DataContract(Name = "VerificationDeadline")] - public partial class VerificationDeadline : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// The names of the capabilities to be disallowed. - /// - /// The names of the capabilities to be disallowed. - [DataMember(Name = "capabilities", IsRequired = false, EmitDefaultValue = false)] - public List Capabilities { get; set; } - - /// - /// Returns false as Capabilities should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCapabilities() - { - return false; - } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public VerificationDeadline() - { - } - - /// - /// The unique identifiers of the bank account(s) that the deadline applies to - /// - /// The unique identifiers of the bank account(s) that the deadline applies to - [DataMember(Name = "entityIds", EmitDefaultValue = false)] - public List EntityIds { get; private set; } - - /// - /// The date that verification is due by before capabilities are disallowed. - /// - /// The date that verification is due by before capabilities are disallowed. - [DataMember(Name = "expiresAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime ExpiresAt { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationDeadline {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" EntityIds: ").Append(EntityIds).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationDeadline); - } - - /// - /// Returns true if VerificationDeadline instances are equal - /// - /// Instance of VerificationDeadline to be compared - /// Boolean - public bool Equals(VerificationDeadline input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.EntityIds == input.EntityIds || - this.EntityIds != null && - input.EntityIds != null && - this.EntityIds.SequenceEqual(input.EntityIds) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.EntityIds != null) - { - hashCode = (hashCode * 59) + this.EntityIds.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/VerificationError.cs b/Adyen/Model/BalancePlatform/VerificationError.cs deleted file mode 100644 index ab623fc06..000000000 --- a/Adyen/Model/BalancePlatform/VerificationError.cs +++ /dev/null @@ -1,589 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// VerificationError - /// - [DataContract(Name = "VerificationError")] - public partial class VerificationError : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// Contains the capabilities that the verification error applies to. - /// - /// Contains the capabilities that the verification error applies to. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public List Capabilities { get; set; } - /// - /// The type of error. Possible values: **invalidInput**, **dataMissing**. - /// - /// The type of error. Possible values: **invalidInput**, **dataMissing**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DataMissing for value: dataMissing - /// - [EnumMember(Value = "dataMissing")] - DataMissing = 1, - - /// - /// Enum InvalidInput for value: invalidInput - /// - [EnumMember(Value = "invalidInput")] - InvalidInput = 2, - - /// - /// Enum PendingStatus for value: pendingStatus - /// - [EnumMember(Value = "pendingStatus")] - PendingStatus = 3, - - /// - /// Enum DataReview for value: dataReview - /// - [EnumMember(Value = "dataReview")] - DataReview = 4 - } - - - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains the capabilities that the verification error applies to.. - /// The verification error code.. - /// A description of the error.. - /// Contains the actions that you can take to resolve the verification error.. - /// Contains more granular information about the verification error.. - /// The type of error. Possible values: **invalidInput**, **dataMissing**, **pendingStatus**, **dataReview** . - public VerificationError(List capabilities = default(List), string code = default(string), string message = default(string), List remediatingActions = default(List), List subErrors = default(List), TypeEnum? type = default(TypeEnum?)) - { - this.Capabilities = capabilities; - this.Code = code; - this.Message = message; - this.RemediatingActions = remediatingActions; - this.SubErrors = subErrors; - this.Type = type; - } - - /// - /// The verification error code. - /// - /// The verification error code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// A description of the error. - /// - /// A description of the error. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Contains the actions that you can take to resolve the verification error. - /// - /// Contains the actions that you can take to resolve the verification error. - [DataMember(Name = "remediatingActions", EmitDefaultValue = false)] - public List RemediatingActions { get; set; } - - /// - /// Contains more granular information about the verification error. - /// - /// Contains more granular information about the verification error. - [DataMember(Name = "subErrors", EmitDefaultValue = false)] - public List SubErrors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationError {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" RemediatingActions: ").Append(RemediatingActions).Append("\n"); - sb.Append(" SubErrors: ").Append(SubErrors).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationError); - } - - /// - /// Returns true if VerificationError instances are equal - /// - /// Instance of VerificationError to be compared - /// Boolean - public bool Equals(VerificationError input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.RemediatingActions == input.RemediatingActions || - this.RemediatingActions != null && - input.RemediatingActions != null && - this.RemediatingActions.SequenceEqual(input.RemediatingActions) - ) && - ( - this.SubErrors == input.SubErrors || - this.SubErrors != null && - input.SubErrors != null && - this.SubErrors.SequenceEqual(input.SubErrors) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.RemediatingActions != null) - { - hashCode = (hashCode * 59) + this.RemediatingActions.GetHashCode(); - } - if (this.SubErrors != null) - { - hashCode = (hashCode * 59) + this.SubErrors.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BalancePlatform/VerificationErrorRecursive.cs b/Adyen/Model/BalancePlatform/VerificationErrorRecursive.cs deleted file mode 100644 index 9bf8551f9..000000000 --- a/Adyen/Model/BalancePlatform/VerificationErrorRecursive.cs +++ /dev/null @@ -1,570 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BalancePlatform -{ - /// - /// VerificationErrorRecursive - /// - [DataContract(Name = "VerificationError-recursive")] - public partial class VerificationErrorRecursive : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// Contains the capabilities that the verification error applies to. - /// - /// Contains the capabilities that the verification error applies to. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public List Capabilities { get; set; } - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DataMissing for value: dataMissing - /// - [EnumMember(Value = "dataMissing")] - DataMissing = 1, - - /// - /// Enum InvalidInput for value: invalidInput - /// - [EnumMember(Value = "invalidInput")] - InvalidInput = 2, - - /// - /// Enum PendingStatus for value: pendingStatus - /// - [EnumMember(Value = "pendingStatus")] - PendingStatus = 3, - - /// - /// Enum DataReview for value: dataReview - /// - [EnumMember(Value = "dataReview")] - DataReview = 4 - - } - - - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains the capabilities that the verification error applies to.. - /// The verification error code.. - /// A description of the error.. - /// The type of error. Possible values: **invalidInput**, **dataMissing**.. - /// Contains the actions that you can take to resolve the verification error.. - public VerificationErrorRecursive(List capabilities = default(List), string code = default(string), string message = default(string), TypeEnum? type = default(TypeEnum?), List remediatingActions = default(List)) - { - this.Capabilities = capabilities; - this.Code = code; - this.Message = message; - this.Type = type; - this.RemediatingActions = remediatingActions; - } - - /// - /// The verification error code. - /// - /// The verification error code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// A description of the error. - /// - /// A description of the error. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Contains the actions that you can take to resolve the verification error. - /// - /// Contains the actions that you can take to resolve the verification error. - [DataMember(Name = "remediatingActions", EmitDefaultValue = false)] - public List RemediatingActions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationErrorRecursive {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" RemediatingActions: ").Append(RemediatingActions).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationErrorRecursive); - } - - /// - /// Returns true if VerificationErrorRecursive instances are equal - /// - /// Instance of VerificationErrorRecursive to be compared - /// Boolean - public bool Equals(VerificationErrorRecursive input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.RemediatingActions == input.RemediatingActions || - this.RemediatingActions != null && - input.RemediatingActions != null && - this.RemediatingActions.SequenceEqual(input.RemediatingActions) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.RemediatingActions != null) - { - hashCode = (hashCode * 59) + this.RemediatingActions.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/AbstractOpenAPISchema.cs b/Adyen/Model/BinLookup/AbstractOpenAPISchema.cs deleted file mode 100644 index acbb9e004..000000000 --- a/Adyen/Model/BinLookup/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.BinLookup -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/BinLookup/Amount.cs b/Adyen/Model/BinLookup/Amount.cs deleted file mode 100644 index 311da0060..000000000 --- a/Adyen/Model/BinLookup/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/BinDetail.cs b/Adyen/Model/BinLookup/BinDetail.cs deleted file mode 100644 index 938b79c4e..000000000 --- a/Adyen/Model/BinLookup/BinDetail.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// BinDetail - /// - [DataContract(Name = "BinDetail")] - public partial class BinDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The country where the card was issued.. - public BinDetail(string issuerCountry = default(string)) - { - this.IssuerCountry = issuerCountry; - } - - /// - /// The country where the card was issued. - /// - /// The country where the card was issued. - [DataMember(Name = "issuerCountry", EmitDefaultValue = false)] - public string IssuerCountry { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BinDetail {\n"); - sb.Append(" IssuerCountry: ").Append(IssuerCountry).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BinDetail); - } - - /// - /// Returns true if BinDetail instances are equal - /// - /// Instance of BinDetail to be compared - /// Boolean - public bool Equals(BinDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.IssuerCountry == input.IssuerCountry || - (this.IssuerCountry != null && - this.IssuerCountry.Equals(input.IssuerCountry)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IssuerCountry != null) - { - hashCode = (hashCode * 59) + this.IssuerCountry.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/CardBin.cs b/Adyen/Model/BinLookup/CardBin.cs deleted file mode 100644 index 1e6c1596f..000000000 --- a/Adyen/Model/BinLookup/CardBin.cs +++ /dev/null @@ -1,315 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// CardBin - /// - [DataContract(Name = "CardBin")] - public partial class CardBin : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The first 6 digit of the card number. Enable this field via merchant account settings.. - /// If true, it indicates a commercial card. Enable this field via merchant account settings.. - /// The card funding source. Valid values are: * CHARGE * CREDIT * DEBIT * DEFERRED_DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE > Enable this field via merchant account settings.. - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\".. - /// The first 8 digit of the card number. Enable this field via merchant account settings.. - /// The issuing bank of the card.. - /// The country where the card was issued from.. - /// The currency of the card.. - /// The payment method associated with the card (e.g. visa, mc, or amex).. - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\".. - /// The last four digits of the card number.. - public CardBin(string bin = default(string), bool? commercial = default(bool?), string fundingSource = default(string), string fundsAvailability = default(string), string issuerBin = default(string), string issuingBank = default(string), string issuingCountry = default(string), string issuingCurrency = default(string), string paymentMethod = default(string), string payoutEligible = default(string), string summary = default(string)) - { - this.Bin = bin; - this.Commercial = commercial; - this.FundingSource = fundingSource; - this.FundsAvailability = fundsAvailability; - this.IssuerBin = issuerBin; - this.IssuingBank = issuingBank; - this.IssuingCountry = issuingCountry; - this.IssuingCurrency = issuingCurrency; - this.PaymentMethod = paymentMethod; - this.PayoutEligible = payoutEligible; - this.Summary = summary; - } - - /// - /// The first 6 digit of the card number. Enable this field via merchant account settings. - /// - /// The first 6 digit of the card number. Enable this field via merchant account settings. - [DataMember(Name = "bin", EmitDefaultValue = false)] - public string Bin { get; set; } - - /// - /// If true, it indicates a commercial card. Enable this field via merchant account settings. - /// - /// If true, it indicates a commercial card. Enable this field via merchant account settings. - [DataMember(Name = "commercial", EmitDefaultValue = false)] - public bool? Commercial { get; set; } - - /// - /// The card funding source. Valid values are: * CHARGE * CREDIT * DEBIT * DEFERRED_DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE > Enable this field via merchant account settings. - /// - /// The card funding source. Valid values are: * CHARGE * CREDIT * DEBIT * DEFERRED_DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE > Enable this field via merchant account settings. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public string FundingSource { get; set; } - - /// - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\". - /// - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\". - [DataMember(Name = "fundsAvailability", EmitDefaultValue = false)] - public string FundsAvailability { get; set; } - - /// - /// The first 8 digit of the card number. Enable this field via merchant account settings. - /// - /// The first 8 digit of the card number. Enable this field via merchant account settings. - [DataMember(Name = "issuerBin", EmitDefaultValue = false)] - public string IssuerBin { get; set; } - - /// - /// The issuing bank of the card. - /// - /// The issuing bank of the card. - [DataMember(Name = "issuingBank", EmitDefaultValue = false)] - public string IssuingBank { get; set; } - - /// - /// The country where the card was issued from. - /// - /// The country where the card was issued from. - [DataMember(Name = "issuingCountry", EmitDefaultValue = false)] - public string IssuingCountry { get; set; } - - /// - /// The currency of the card. - /// - /// The currency of the card. - [DataMember(Name = "issuingCurrency", EmitDefaultValue = false)] - public string IssuingCurrency { get; set; } - - /// - /// The payment method associated with the card (e.g. visa, mc, or amex). - /// - /// The payment method associated with the card (e.g. visa, mc, or amex). - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public string PaymentMethod { get; set; } - - /// - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\". - /// - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) > Returned when you verify a card BIN or estimate costs, and only if `payoutEligible` is different from \"N\" or \"U\". - [DataMember(Name = "payoutEligible", EmitDefaultValue = false)] - public string PayoutEligible { get; set; } - - /// - /// The last four digits of the card number. - /// - /// The last four digits of the card number. - [DataMember(Name = "summary", EmitDefaultValue = false)] - public string Summary { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardBin {\n"); - sb.Append(" Bin: ").Append(Bin).Append("\n"); - sb.Append(" Commercial: ").Append(Commercial).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" FundsAvailability: ").Append(FundsAvailability).Append("\n"); - sb.Append(" IssuerBin: ").Append(IssuerBin).Append("\n"); - sb.Append(" IssuingBank: ").Append(IssuingBank).Append("\n"); - sb.Append(" IssuingCountry: ").Append(IssuingCountry).Append("\n"); - sb.Append(" IssuingCurrency: ").Append(IssuingCurrency).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" PayoutEligible: ").Append(PayoutEligible).Append("\n"); - sb.Append(" Summary: ").Append(Summary).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardBin); - } - - /// - /// Returns true if CardBin instances are equal - /// - /// Instance of CardBin to be compared - /// Boolean - public bool Equals(CardBin input) - { - if (input == null) - { - return false; - } - return - ( - this.Bin == input.Bin || - (this.Bin != null && - this.Bin.Equals(input.Bin)) - ) && - ( - this.Commercial == input.Commercial || - this.Commercial.Equals(input.Commercial) - ) && - ( - this.FundingSource == input.FundingSource || - (this.FundingSource != null && - this.FundingSource.Equals(input.FundingSource)) - ) && - ( - this.FundsAvailability == input.FundsAvailability || - (this.FundsAvailability != null && - this.FundsAvailability.Equals(input.FundsAvailability)) - ) && - ( - this.IssuerBin == input.IssuerBin || - (this.IssuerBin != null && - this.IssuerBin.Equals(input.IssuerBin)) - ) && - ( - this.IssuingBank == input.IssuingBank || - (this.IssuingBank != null && - this.IssuingBank.Equals(input.IssuingBank)) - ) && - ( - this.IssuingCountry == input.IssuingCountry || - (this.IssuingCountry != null && - this.IssuingCountry.Equals(input.IssuingCountry)) - ) && - ( - this.IssuingCurrency == input.IssuingCurrency || - (this.IssuingCurrency != null && - this.IssuingCurrency.Equals(input.IssuingCurrency)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.PayoutEligible == input.PayoutEligible || - (this.PayoutEligible != null && - this.PayoutEligible.Equals(input.PayoutEligible)) - ) && - ( - this.Summary == input.Summary || - (this.Summary != null && - this.Summary.Equals(input.Summary)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bin != null) - { - hashCode = (hashCode * 59) + this.Bin.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Commercial.GetHashCode(); - if (this.FundingSource != null) - { - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - } - if (this.FundsAvailability != null) - { - hashCode = (hashCode * 59) + this.FundsAvailability.GetHashCode(); - } - if (this.IssuerBin != null) - { - hashCode = (hashCode * 59) + this.IssuerBin.GetHashCode(); - } - if (this.IssuingBank != null) - { - hashCode = (hashCode * 59) + this.IssuingBank.GetHashCode(); - } - if (this.IssuingCountry != null) - { - hashCode = (hashCode * 59) + this.IssuingCountry.GetHashCode(); - } - if (this.IssuingCurrency != null) - { - hashCode = (hashCode * 59) + this.IssuingCurrency.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.PayoutEligible != null) - { - hashCode = (hashCode * 59) + this.PayoutEligible.GetHashCode(); - } - if (this.Summary != null) - { - hashCode = (hashCode * 59) + this.Summary.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/CostEstimateAssumptions.cs b/Adyen/Model/BinLookup/CostEstimateAssumptions.cs deleted file mode 100644 index 45d3ce46a..000000000 --- a/Adyen/Model/BinLookup/CostEstimateAssumptions.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// CostEstimateAssumptions - /// - [DataContract(Name = "CostEstimateAssumptions")] - public partial class CostEstimateAssumptions : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// If true, the cardholder is expected to successfully authorise via 3D Secure.. - /// If true, the transaction is expected to have valid Level 3 data.. - /// If not zero, the number of installments.. - public CostEstimateAssumptions(bool? assume3DSecureAuthenticated = default(bool?), bool? assumeLevel3Data = default(bool?), int? installments = default(int?)) - { - this.Assume3DSecureAuthenticated = assume3DSecureAuthenticated; - this.AssumeLevel3Data = assumeLevel3Data; - this.Installments = installments; - } - - /// - /// If true, the cardholder is expected to successfully authorise via 3D Secure. - /// - /// If true, the cardholder is expected to successfully authorise via 3D Secure. - [DataMember(Name = "assume3DSecureAuthenticated", EmitDefaultValue = false)] - public bool? Assume3DSecureAuthenticated { get; set; } - - /// - /// If true, the transaction is expected to have valid Level 3 data. - /// - /// If true, the transaction is expected to have valid Level 3 data. - [DataMember(Name = "assumeLevel3Data", EmitDefaultValue = false)] - public bool? AssumeLevel3Data { get; set; } - - /// - /// If not zero, the number of installments. - /// - /// If not zero, the number of installments. - [DataMember(Name = "installments", EmitDefaultValue = false)] - public int? Installments { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CostEstimateAssumptions {\n"); - sb.Append(" Assume3DSecureAuthenticated: ").Append(Assume3DSecureAuthenticated).Append("\n"); - sb.Append(" AssumeLevel3Data: ").Append(AssumeLevel3Data).Append("\n"); - sb.Append(" Installments: ").Append(Installments).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CostEstimateAssumptions); - } - - /// - /// Returns true if CostEstimateAssumptions instances are equal - /// - /// Instance of CostEstimateAssumptions to be compared - /// Boolean - public bool Equals(CostEstimateAssumptions input) - { - if (input == null) - { - return false; - } - return - ( - this.Assume3DSecureAuthenticated == input.Assume3DSecureAuthenticated || - this.Assume3DSecureAuthenticated.Equals(input.Assume3DSecureAuthenticated) - ) && - ( - this.AssumeLevel3Data == input.AssumeLevel3Data || - this.AssumeLevel3Data.Equals(input.AssumeLevel3Data) - ) && - ( - this.Installments == input.Installments || - this.Installments.Equals(input.Installments) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Assume3DSecureAuthenticated.GetHashCode(); - hashCode = (hashCode * 59) + this.AssumeLevel3Data.GetHashCode(); - hashCode = (hashCode * 59) + this.Installments.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/CostEstimateRequest.cs b/Adyen/Model/BinLookup/CostEstimateRequest.cs deleted file mode 100644 index a66fc5aae..000000000 --- a/Adyen/Model/BinLookup/CostEstimateRequest.cs +++ /dev/null @@ -1,342 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// CostEstimateRequest - /// - [DataContract(Name = "CostEstimateRequest")] - public partial class CostEstimateRequest : IEquatable, IValidatableObject - { - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the card holder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the card holder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the card holder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the card holder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CostEstimateRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// assumptions. - /// The card number (4-19 characters) for PCI compliant use cases. Do not use any separators. > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request.. - /// Encrypted data that stores card information for non PCI-compliant use cases. The encrypted data must be created with the Checkout Card Component or Secured Fields Component, and must contain the `encryptedCardNumber` field. > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request.. - /// The merchant account identifier you want to process the (transaction) request with. (required). - /// merchantDetails. - /// recurring. - /// The `recurringDetailReference` you want to use for this cost estimate. The value `LATEST` can be used to select the most recently stored recurring detail.. - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the card holder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - public CostEstimateRequest(Amount amount = default(Amount), CostEstimateAssumptions assumptions = default(CostEstimateAssumptions), string cardNumber = default(string), string encryptedCardNumber = default(string), string merchantAccount = default(string), MerchantDetails merchantDetails = default(MerchantDetails), Recurring recurring = default(Recurring), string selectedRecurringDetailReference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperReference = default(string)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.Assumptions = assumptions; - this.CardNumber = cardNumber; - this.EncryptedCardNumber = encryptedCardNumber; - this.MerchantDetails = merchantDetails; - this.Recurring = recurring; - this.SelectedRecurringDetailReference = selectedRecurringDetailReference; - this.ShopperInteraction = shopperInteraction; - this.ShopperReference = shopperReference; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets Assumptions - /// - [DataMember(Name = "assumptions", EmitDefaultValue = false)] - public CostEstimateAssumptions Assumptions { get; set; } - - /// - /// The card number (4-19 characters) for PCI compliant use cases. Do not use any separators. > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request. - /// - /// The card number (4-19 characters) for PCI compliant use cases. Do not use any separators. > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request. - [DataMember(Name = "cardNumber", EmitDefaultValue = false)] - public string CardNumber { get; set; } - - /// - /// Encrypted data that stores card information for non PCI-compliant use cases. The encrypted data must be created with the Checkout Card Component or Secured Fields Component, and must contain the `encryptedCardNumber` field. > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request. - /// - /// Encrypted data that stores card information for non PCI-compliant use cases. The encrypted data must be created with the Checkout Card Component or Secured Fields Component, and must contain the `encryptedCardNumber` field. > Either the `cardNumber` or `encryptedCardNumber` field must be provided in a payment request. - [DataMember(Name = "encryptedCardNumber", EmitDefaultValue = false)] - public string EncryptedCardNumber { get; set; } - - /// - /// The merchant account identifier you want to process the (transaction) request with. - /// - /// The merchant account identifier you want to process the (transaction) request with. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets MerchantDetails - /// - [DataMember(Name = "merchantDetails", EmitDefaultValue = false)] - public MerchantDetails MerchantDetails { get; set; } - - /// - /// Gets or Sets Recurring - /// - [DataMember(Name = "recurring", EmitDefaultValue = false)] - public Recurring Recurring { get; set; } - - /// - /// The `recurringDetailReference` you want to use for this cost estimate. The value `LATEST` can be used to select the most recently stored recurring detail. - /// - /// The `recurringDetailReference` you want to use for this cost estimate. The value `LATEST` can be used to select the most recently stored recurring detail. - [DataMember(Name = "selectedRecurringDetailReference", EmitDefaultValue = false)] - public string SelectedRecurringDetailReference { get; set; } - - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CostEstimateRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Assumptions: ").Append(Assumptions).Append("\n"); - sb.Append(" CardNumber: ").Append(CardNumber).Append("\n"); - sb.Append(" EncryptedCardNumber: ").Append(EncryptedCardNumber).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantDetails: ").Append(MerchantDetails).Append("\n"); - sb.Append(" Recurring: ").Append(Recurring).Append("\n"); - sb.Append(" SelectedRecurringDetailReference: ").Append(SelectedRecurringDetailReference).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CostEstimateRequest); - } - - /// - /// Returns true if CostEstimateRequest instances are equal - /// - /// Instance of CostEstimateRequest to be compared - /// Boolean - public bool Equals(CostEstimateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Assumptions == input.Assumptions || - (this.Assumptions != null && - this.Assumptions.Equals(input.Assumptions)) - ) && - ( - this.CardNumber == input.CardNumber || - (this.CardNumber != null && - this.CardNumber.Equals(input.CardNumber)) - ) && - ( - this.EncryptedCardNumber == input.EncryptedCardNumber || - (this.EncryptedCardNumber != null && - this.EncryptedCardNumber.Equals(input.EncryptedCardNumber)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantDetails == input.MerchantDetails || - (this.MerchantDetails != null && - this.MerchantDetails.Equals(input.MerchantDetails)) - ) && - ( - this.Recurring == input.Recurring || - (this.Recurring != null && - this.Recurring.Equals(input.Recurring)) - ) && - ( - this.SelectedRecurringDetailReference == input.SelectedRecurringDetailReference || - (this.SelectedRecurringDetailReference != null && - this.SelectedRecurringDetailReference.Equals(input.SelectedRecurringDetailReference)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Assumptions != null) - { - hashCode = (hashCode * 59) + this.Assumptions.GetHashCode(); - } - if (this.CardNumber != null) - { - hashCode = (hashCode * 59) + this.CardNumber.GetHashCode(); - } - if (this.EncryptedCardNumber != null) - { - hashCode = (hashCode * 59) + this.EncryptedCardNumber.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantDetails != null) - { - hashCode = (hashCode * 59) + this.MerchantDetails.GetHashCode(); - } - if (this.Recurring != null) - { - hashCode = (hashCode * 59) + this.Recurring.GetHashCode(); - } - if (this.SelectedRecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.SelectedRecurringDetailReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CardNumber (string) maxLength - if (this.CardNumber != null && this.CardNumber.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CardNumber, length must be less than 19.", new [] { "CardNumber" }); - } - - // CardNumber (string) minLength - if (this.CardNumber != null && this.CardNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CardNumber, length must be greater than 4.", new [] { "CardNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/CostEstimateResponse.cs b/Adyen/Model/BinLookup/CostEstimateResponse.cs deleted file mode 100644 index 8ab77fd57..000000000 --- a/Adyen/Model/BinLookup/CostEstimateResponse.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// CostEstimateResponse - /// - [DataContract(Name = "CostEstimateResponse")] - public partial class CostEstimateResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// cardBin. - /// costEstimateAmount. - /// Adyen's 16-character reference associated with the request.. - /// The result of the cost estimation.. - public CostEstimateResponse(CardBin cardBin = default(CardBin), Amount costEstimateAmount = default(Amount), string costEstimateReference = default(string), string resultCode = default(string)) - { - this.CardBin = cardBin; - this.CostEstimateAmount = costEstimateAmount; - this.CostEstimateReference = costEstimateReference; - this.ResultCode = resultCode; - } - - /// - /// Gets or Sets CardBin - /// - [DataMember(Name = "cardBin", EmitDefaultValue = false)] - public CardBin CardBin { get; set; } - - /// - /// Gets or Sets CostEstimateAmount - /// - [DataMember(Name = "costEstimateAmount", EmitDefaultValue = false)] - public Amount CostEstimateAmount { get; set; } - - /// - /// Adyen's 16-character reference associated with the request. - /// - /// Adyen's 16-character reference associated with the request. - [DataMember(Name = "costEstimateReference", EmitDefaultValue = false)] - public string CostEstimateReference { get; set; } - - /// - /// The result of the cost estimation. - /// - /// The result of the cost estimation. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CostEstimateResponse {\n"); - sb.Append(" CardBin: ").Append(CardBin).Append("\n"); - sb.Append(" CostEstimateAmount: ").Append(CostEstimateAmount).Append("\n"); - sb.Append(" CostEstimateReference: ").Append(CostEstimateReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CostEstimateResponse); - } - - /// - /// Returns true if CostEstimateResponse instances are equal - /// - /// Instance of CostEstimateResponse to be compared - /// Boolean - public bool Equals(CostEstimateResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CardBin == input.CardBin || - (this.CardBin != null && - this.CardBin.Equals(input.CardBin)) - ) && - ( - this.CostEstimateAmount == input.CostEstimateAmount || - (this.CostEstimateAmount != null && - this.CostEstimateAmount.Equals(input.CostEstimateAmount)) - ) && - ( - this.CostEstimateReference == input.CostEstimateReference || - (this.CostEstimateReference != null && - this.CostEstimateReference.Equals(input.CostEstimateReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardBin != null) - { - hashCode = (hashCode * 59) + this.CardBin.GetHashCode(); - } - if (this.CostEstimateAmount != null) - { - hashCode = (hashCode * 59) + this.CostEstimateAmount.GetHashCode(); - } - if (this.CostEstimateReference != null) - { - hashCode = (hashCode * 59) + this.CostEstimateReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/DSPublicKeyDetail.cs b/Adyen/Model/BinLookup/DSPublicKeyDetail.cs deleted file mode 100644 index d2a3220df..000000000 --- a/Adyen/Model/BinLookup/DSPublicKeyDetail.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// DSPublicKeyDetail - /// - [DataContract(Name = "DSPublicKeyDetail")] - public partial class DSPublicKeyDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Card brand.. - /// Directory Server (DS) identifier.. - /// The version of the mobile 3D Secure 2 SDK. For the possible values, refer to the versions in [Adyen 3DS2 Android](https://github.com/Adyen/adyen-3ds2-android/releases) and [Adyen 3DS2 iOS](https://github.com/Adyen/adyen-3ds2-ios/releases).. - /// Public key. The 3D Secure 2 SDK encrypts the device information by using the DS public key.. - /// Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates.. - public DSPublicKeyDetail(string brand = default(string), string directoryServerId = default(string), string fromSDKVersion = default(string), byte[] publicKey = default(byte[]), string rootCertificates = default(string)) - { - this.Brand = brand; - this.DirectoryServerId = directoryServerId; - this.FromSDKVersion = fromSDKVersion; - this.PublicKey = publicKey; - this.RootCertificates = rootCertificates; - } - - /// - /// Card brand. - /// - /// Card brand. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// Directory Server (DS) identifier. - /// - /// Directory Server (DS) identifier. - [DataMember(Name = "directoryServerId", EmitDefaultValue = false)] - public string DirectoryServerId { get; set; } - - /// - /// The version of the mobile 3D Secure 2 SDK. For the possible values, refer to the versions in [Adyen 3DS2 Android](https://github.com/Adyen/adyen-3ds2-android/releases) and [Adyen 3DS2 iOS](https://github.com/Adyen/adyen-3ds2-ios/releases). - /// - /// The version of the mobile 3D Secure 2 SDK. For the possible values, refer to the versions in [Adyen 3DS2 Android](https://github.com/Adyen/adyen-3ds2-android/releases) and [Adyen 3DS2 iOS](https://github.com/Adyen/adyen-3ds2-ios/releases). - [DataMember(Name = "fromSDKVersion", EmitDefaultValue = false)] - public string FromSDKVersion { get; set; } - - /// - /// Public key. The 3D Secure 2 SDK encrypts the device information by using the DS public key. - /// - /// Public key. The 3D Secure 2 SDK encrypts the device information by using the DS public key. - [DataMember(Name = "publicKey", EmitDefaultValue = false)] - public byte[] PublicKey { get; set; } - - /// - /// Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. - /// - /// Directory Server root certificates. The 3D Secure 2 SDK verifies the ACS signed content using the rootCertificates. - [DataMember(Name = "rootCertificates", EmitDefaultValue = false)] - public string RootCertificates { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DSPublicKeyDetail {\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" DirectoryServerId: ").Append(DirectoryServerId).Append("\n"); - sb.Append(" FromSDKVersion: ").Append(FromSDKVersion).Append("\n"); - sb.Append(" PublicKey: ").Append(PublicKey).Append("\n"); - sb.Append(" RootCertificates: ").Append(RootCertificates).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DSPublicKeyDetail); - } - - /// - /// Returns true if DSPublicKeyDetail instances are equal - /// - /// Instance of DSPublicKeyDetail to be compared - /// Boolean - public bool Equals(DSPublicKeyDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.DirectoryServerId == input.DirectoryServerId || - (this.DirectoryServerId != null && - this.DirectoryServerId.Equals(input.DirectoryServerId)) - ) && - ( - this.FromSDKVersion == input.FromSDKVersion || - (this.FromSDKVersion != null && - this.FromSDKVersion.Equals(input.FromSDKVersion)) - ) && - ( - this.PublicKey == input.PublicKey || - (this.PublicKey != null && - this.PublicKey.Equals(input.PublicKey)) - ) && - ( - this.RootCertificates == input.RootCertificates || - (this.RootCertificates != null && - this.RootCertificates.Equals(input.RootCertificates)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.DirectoryServerId != null) - { - hashCode = (hashCode * 59) + this.DirectoryServerId.GetHashCode(); - } - if (this.FromSDKVersion != null) - { - hashCode = (hashCode * 59) + this.FromSDKVersion.GetHashCode(); - } - if (this.PublicKey != null) - { - hashCode = (hashCode * 59) + this.PublicKey.GetHashCode(); - } - if (this.RootCertificates != null) - { - hashCode = (hashCode * 59) + this.RootCertificates.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/MerchantDetails.cs b/Adyen/Model/BinLookup/MerchantDetails.cs deleted file mode 100644 index 9ace0a7c4..000000000 --- a/Adyen/Model/BinLookup/MerchantDetails.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// MerchantDetails - /// - [DataContract(Name = "MerchantDetails")] - public partial class MerchantDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// 2-letter ISO 3166 country code of the card acceptor location. > This parameter is required for the merchants who don't use Adyen as the payment authorisation gateway.. - /// If true, indicates that the merchant is enrolled in 3D Secure for the card network.. - /// The merchant category code (MCC) is a four-digit number which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. The list of MCCs can be found [here](https://en.wikipedia.org/wiki/Merchant_category_code).. - public MerchantDetails(string countryCode = default(string), bool? enrolledIn3DSecure = default(bool?), string mcc = default(string)) - { - this.CountryCode = countryCode; - this.EnrolledIn3DSecure = enrolledIn3DSecure; - this.Mcc = mcc; - } - - /// - /// 2-letter ISO 3166 country code of the card acceptor location. > This parameter is required for the merchants who don't use Adyen as the payment authorisation gateway. - /// - /// 2-letter ISO 3166 country code of the card acceptor location. > This parameter is required for the merchants who don't use Adyen as the payment authorisation gateway. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// If true, indicates that the merchant is enrolled in 3D Secure for the card network. - /// - /// If true, indicates that the merchant is enrolled in 3D Secure for the card network. - [DataMember(Name = "enrolledIn3DSecure", EmitDefaultValue = false)] - public bool? EnrolledIn3DSecure { get; set; } - - /// - /// The merchant category code (MCC) is a four-digit number which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. The list of MCCs can be found [here](https://en.wikipedia.org/wiki/Merchant_category_code). - /// - /// The merchant category code (MCC) is a four-digit number which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. The list of MCCs can be found [here](https://en.wikipedia.org/wiki/Merchant_category_code). - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantDetails {\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" EnrolledIn3DSecure: ").Append(EnrolledIn3DSecure).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantDetails); - } - - /// - /// Returns true if MerchantDetails instances are equal - /// - /// Instance of MerchantDetails to be compared - /// Boolean - public bool Equals(MerchantDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.EnrolledIn3DSecure == input.EnrolledIn3DSecure || - this.EnrolledIn3DSecure.Equals(input.EnrolledIn3DSecure) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EnrolledIn3DSecure.GetHashCode(); - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CountryCode (string) maxLength - if (this.CountryCode != null && this.CountryCode.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 2.", new [] { "CountryCode" }); - } - - // CountryCode (string) minLength - if (this.CountryCode != null && this.CountryCode.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be greater than 2.", new [] { "CountryCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/Recurring.cs b/Adyen/Model/BinLookup/Recurring.cs deleted file mode 100644 index 9ff232298..000000000 --- a/Adyen/Model/BinLookup/Recurring.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// Recurring - /// - [DataContract(Name = "Recurring")] - public partial class Recurring : IEquatable, IValidatableObject - { - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - [JsonConverter(typeof(StringEnumConverter))] - public enum ContractEnum - { - /// - /// Enum ONECLICK for value: ONECLICK - /// - [EnumMember(Value = "ONECLICK")] - ONECLICK = 1, - - /// - /// Enum RECURRING for value: RECURRING - /// - [EnumMember(Value = "RECURRING")] - RECURRING = 2, - - /// - /// Enum PAYOUT for value: PAYOUT - /// - [EnumMember(Value = "PAYOUT")] - PAYOUT = 3 - - } - - - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - [DataMember(Name = "contract", EmitDefaultValue = false)] - public ContractEnum? Contract { get; set; } - /// - /// The name of the token service. - /// - /// The name of the token service. - [JsonConverter(typeof(StringEnumConverter))] - public enum TokenServiceEnum - { - /// - /// Enum VISATOKENSERVICE for value: VISATOKENSERVICE - /// - [EnumMember(Value = "VISATOKENSERVICE")] - VISATOKENSERVICE = 1, - - /// - /// Enum MCTOKENSERVICE for value: MCTOKENSERVICE - /// - [EnumMember(Value = "MCTOKENSERVICE")] - MCTOKENSERVICE = 2, - - /// - /// Enum AMEXTOKENSERVICE for value: AMEXTOKENSERVICE - /// - [EnumMember(Value = "AMEXTOKENSERVICE")] - AMEXTOKENSERVICE = 3, - - /// - /// Enum TOKENSHARING for value: TOKEN_SHARING - /// - [EnumMember(Value = "TOKEN_SHARING")] - TOKENSHARING = 4 - - } - - - /// - /// The name of the token service. - /// - /// The name of the token service. - [DataMember(Name = "tokenService", EmitDefaultValue = false)] - public TokenServiceEnum? TokenService { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts).. - /// A descriptive name for this detail.. - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.. - /// Minimum number of days between authorisations. Only for 3D Secure 2.. - /// The name of the token service.. - public Recurring(ContractEnum? contract = default(ContractEnum?), string recurringDetailName = default(string), DateTime recurringExpiry = default(DateTime), string recurringFrequency = default(string), TokenServiceEnum? tokenService = default(TokenServiceEnum?)) - { - this.Contract = contract; - this.RecurringDetailName = recurringDetailName; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.TokenService = tokenService; - } - - /// - /// A descriptive name for this detail. - /// - /// A descriptive name for this detail. - [DataMember(Name = "recurringDetailName", EmitDefaultValue = false)] - public string RecurringDetailName { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public DateTime RecurringExpiry { get; set; } - - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Recurring {\n"); - sb.Append(" Contract: ").Append(Contract).Append("\n"); - sb.Append(" RecurringDetailName: ").Append(RecurringDetailName).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" TokenService: ").Append(TokenService).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Recurring); - } - - /// - /// Returns true if Recurring instances are equal - /// - /// Instance of Recurring to be compared - /// Boolean - public bool Equals(Recurring input) - { - if (input == null) - { - return false; - } - return - ( - this.Contract == input.Contract || - this.Contract.Equals(input.Contract) - ) && - ( - this.RecurringDetailName == input.RecurringDetailName || - (this.RecurringDetailName != null && - this.RecurringDetailName.Equals(input.RecurringDetailName)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.TokenService == input.TokenService || - this.TokenService.Equals(input.TokenService) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Contract.GetHashCode(); - if (this.RecurringDetailName != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailName.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TokenService.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/ServiceError.cs b/Adyen/Model/BinLookup/ServiceError.cs deleted file mode 100644 index 0587de1d7..000000000 --- a/Adyen/Model/BinLookup/ServiceError.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.. - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(Dictionary additionalData = default(Dictionary), string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.AdditionalData = additionalData; - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.cs b/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.cs deleted file mode 100644 index e7fd78e84..000000000 --- a/Adyen/Model/BinLookup/ThreeDS2CardRangeDetail.cs +++ /dev/null @@ -1,226 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// ThreeDS2CardRangeDetail - /// - [DataContract(Name = "ThreeDS2CardRangeDetail")] - public partial class ThreeDS2CardRangeDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Provides additional information to the 3DS Server. Possible values: - 01 (Authentication is available at ACS) - 02 (Attempts supported by ACS or DS) - 03 (Decoupled authentication supported) - 04 (Whitelisting supported). - /// Card brand.. - /// BIN end range.. - /// BIN start range.. - /// Supported 3D Secure protocol versions. - /// In a 3D Secure 2 browser-based flow, this is the URL where you should send the device fingerprint to.. - public ThreeDS2CardRangeDetail(List acsInfoInd = default(List), string brandCode = default(string), string endRange = default(string), string startRange = default(string), List threeDS2Versions = default(List), string threeDSMethodURL = default(string)) - { - this.AcsInfoInd = acsInfoInd; - this.BrandCode = brandCode; - this.EndRange = endRange; - this.StartRange = startRange; - this.ThreeDS2Versions = threeDS2Versions; - this.ThreeDSMethodURL = threeDSMethodURL; - } - - /// - /// Provides additional information to the 3DS Server. Possible values: - 01 (Authentication is available at ACS) - 02 (Attempts supported by ACS or DS) - 03 (Decoupled authentication supported) - 04 (Whitelisting supported) - /// - /// Provides additional information to the 3DS Server. Possible values: - 01 (Authentication is available at ACS) - 02 (Attempts supported by ACS or DS) - 03 (Decoupled authentication supported) - 04 (Whitelisting supported) - [DataMember(Name = "acsInfoInd", EmitDefaultValue = false)] - public List AcsInfoInd { get; set; } - - /// - /// Card brand. - /// - /// Card brand. - [DataMember(Name = "brandCode", EmitDefaultValue = false)] - public string BrandCode { get; set; } - - /// - /// BIN end range. - /// - /// BIN end range. - [DataMember(Name = "endRange", EmitDefaultValue = false)] - public string EndRange { get; set; } - - /// - /// BIN start range. - /// - /// BIN start range. - [DataMember(Name = "startRange", EmitDefaultValue = false)] - public string StartRange { get; set; } - - /// - /// Supported 3D Secure protocol versions - /// - /// Supported 3D Secure protocol versions - [DataMember(Name = "threeDS2Versions", EmitDefaultValue = false)] - public List ThreeDS2Versions { get; set; } - - /// - /// In a 3D Secure 2 browser-based flow, this is the URL where you should send the device fingerprint to. - /// - /// In a 3D Secure 2 browser-based flow, this is the URL where you should send the device fingerprint to. - [DataMember(Name = "threeDSMethodURL", EmitDefaultValue = false)] - public string ThreeDSMethodURL { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDS2CardRangeDetail {\n"); - sb.Append(" AcsInfoInd: ").Append(AcsInfoInd).Append("\n"); - sb.Append(" BrandCode: ").Append(BrandCode).Append("\n"); - sb.Append(" EndRange: ").Append(EndRange).Append("\n"); - sb.Append(" StartRange: ").Append(StartRange).Append("\n"); - sb.Append(" ThreeDS2Versions: ").Append(ThreeDS2Versions).Append("\n"); - sb.Append(" ThreeDSMethodURL: ").Append(ThreeDSMethodURL).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDS2CardRangeDetail); - } - - /// - /// Returns true if ThreeDS2CardRangeDetail instances are equal - /// - /// Instance of ThreeDS2CardRangeDetail to be compared - /// Boolean - public bool Equals(ThreeDS2CardRangeDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.AcsInfoInd == input.AcsInfoInd || - this.AcsInfoInd != null && - input.AcsInfoInd != null && - this.AcsInfoInd.SequenceEqual(input.AcsInfoInd) - ) && - ( - this.BrandCode == input.BrandCode || - (this.BrandCode != null && - this.BrandCode.Equals(input.BrandCode)) - ) && - ( - this.EndRange == input.EndRange || - (this.EndRange != null && - this.EndRange.Equals(input.EndRange)) - ) && - ( - this.StartRange == input.StartRange || - (this.StartRange != null && - this.StartRange.Equals(input.StartRange)) - ) && - ( - this.ThreeDS2Versions == input.ThreeDS2Versions || - this.ThreeDS2Versions != null && - input.ThreeDS2Versions != null && - this.ThreeDS2Versions.SequenceEqual(input.ThreeDS2Versions) - ) && - ( - this.ThreeDSMethodURL == input.ThreeDSMethodURL || - (this.ThreeDSMethodURL != null && - this.ThreeDSMethodURL.Equals(input.ThreeDSMethodURL)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcsInfoInd != null) - { - hashCode = (hashCode * 59) + this.AcsInfoInd.GetHashCode(); - } - if (this.BrandCode != null) - { - hashCode = (hashCode * 59) + this.BrandCode.GetHashCode(); - } - if (this.EndRange != null) - { - hashCode = (hashCode * 59) + this.EndRange.GetHashCode(); - } - if (this.StartRange != null) - { - hashCode = (hashCode * 59) + this.StartRange.GetHashCode(); - } - if (this.ThreeDS2Versions != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2Versions.GetHashCode(); - } - if (this.ThreeDSMethodURL != null) - { - hashCode = (hashCode * 59) + this.ThreeDSMethodURL.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.cs b/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.cs deleted file mode 100644 index 84742fa7c..000000000 --- a/Adyen/Model/BinLookup/ThreeDSAvailabilityRequest.cs +++ /dev/null @@ -1,231 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// ThreeDSAvailabilityRequest - /// - [DataContract(Name = "ThreeDSAvailabilityRequest")] - public partial class ThreeDSAvailabilityRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ThreeDSAvailabilityRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be required for a particular request. The `additionalData` object consists of entries, each of which includes the key and value.. - /// List of brands.. - /// Card number or BIN.. - /// The merchant account identifier. (required). - /// A recurring detail reference corresponding to a card.. - /// The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID).. - public ThreeDSAvailabilityRequest(Dictionary additionalData = default(Dictionary), List brands = default(List), string cardNumber = default(string), string merchantAccount = default(string), string recurringDetailReference = default(string), string shopperReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.AdditionalData = additionalData; - this.Brands = brands; - this.CardNumber = cardNumber; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperReference = shopperReference; - } - - /// - /// This field contains additional data, which may be required for a particular request. The `additionalData` object consists of entries, each of which includes the key and value. - /// - /// This field contains additional data, which may be required for a particular request. The `additionalData` object consists of entries, each of which includes the key and value. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// List of brands. - /// - /// List of brands. - [DataMember(Name = "brands", EmitDefaultValue = false)] - public List Brands { get; set; } - - /// - /// Card number or BIN. - /// - /// Card number or BIN. - [DataMember(Name = "cardNumber", EmitDefaultValue = false)] - public string CardNumber { get; set; } - - /// - /// The merchant account identifier. - /// - /// The merchant account identifier. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// A recurring detail reference corresponding to a card. - /// - /// A recurring detail reference corresponding to a card. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). - /// - /// The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDSAvailabilityRequest {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Brands: ").Append(Brands).Append("\n"); - sb.Append(" CardNumber: ").Append(CardNumber).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDSAvailabilityRequest); - } - - /// - /// Returns true if ThreeDSAvailabilityRequest instances are equal - /// - /// Instance of ThreeDSAvailabilityRequest to be compared - /// Boolean - public bool Equals(ThreeDSAvailabilityRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Brands == input.Brands || - this.Brands != null && - input.Brands != null && - this.Brands.SequenceEqual(input.Brands) - ) && - ( - this.CardNumber == input.CardNumber || - (this.CardNumber != null && - this.CardNumber.Equals(input.CardNumber)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Brands != null) - { - hashCode = (hashCode * 59) + this.Brands.GetHashCode(); - } - if (this.CardNumber != null) - { - hashCode = (hashCode * 59) + this.CardNumber.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.cs b/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.cs deleted file mode 100644 index 338484d97..000000000 --- a/Adyen/Model/BinLookup/ThreeDSAvailabilityResponse.cs +++ /dev/null @@ -1,198 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.BinLookup -{ - /// - /// ThreeDSAvailabilityResponse - /// - [DataContract(Name = "ThreeDSAvailabilityResponse")] - public partial class ThreeDSAvailabilityResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// binDetails. - /// List of Directory Server (DS) public keys.. - /// Indicator if 3D Secure 1 is supported.. - /// List of brand and card range pairs.. - /// Indicator if 3D Secure 2 is supported.. - public ThreeDSAvailabilityResponse(BinDetail binDetails = default(BinDetail), List dsPublicKeys = default(List), bool? threeDS1Supported = default(bool?), List threeDS2CardRangeDetails = default(List), bool? threeDS2supported = default(bool?)) - { - this.BinDetails = binDetails; - this.DsPublicKeys = dsPublicKeys; - this.ThreeDS1Supported = threeDS1Supported; - this.ThreeDS2CardRangeDetails = threeDS2CardRangeDetails; - this.ThreeDS2supported = threeDS2supported; - } - - /// - /// Gets or Sets BinDetails - /// - [DataMember(Name = "binDetails", EmitDefaultValue = false)] - public BinDetail BinDetails { get; set; } - - /// - /// List of Directory Server (DS) public keys. - /// - /// List of Directory Server (DS) public keys. - [DataMember(Name = "dsPublicKeys", EmitDefaultValue = false)] - public List DsPublicKeys { get; set; } - - /// - /// Indicator if 3D Secure 1 is supported. - /// - /// Indicator if 3D Secure 1 is supported. - [DataMember(Name = "threeDS1Supported", EmitDefaultValue = false)] - public bool? ThreeDS1Supported { get; set; } - - /// - /// List of brand and card range pairs. - /// - /// List of brand and card range pairs. - [DataMember(Name = "threeDS2CardRangeDetails", EmitDefaultValue = false)] - public List ThreeDS2CardRangeDetails { get; set; } - - /// - /// Indicator if 3D Secure 2 is supported. - /// - /// Indicator if 3D Secure 2 is supported. - [DataMember(Name = "threeDS2supported", EmitDefaultValue = false)] - public bool? ThreeDS2supported { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDSAvailabilityResponse {\n"); - sb.Append(" BinDetails: ").Append(BinDetails).Append("\n"); - sb.Append(" DsPublicKeys: ").Append(DsPublicKeys).Append("\n"); - sb.Append(" ThreeDS1Supported: ").Append(ThreeDS1Supported).Append("\n"); - sb.Append(" ThreeDS2CardRangeDetails: ").Append(ThreeDS2CardRangeDetails).Append("\n"); - sb.Append(" ThreeDS2supported: ").Append(ThreeDS2supported).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDSAvailabilityResponse); - } - - /// - /// Returns true if ThreeDSAvailabilityResponse instances are equal - /// - /// Instance of ThreeDSAvailabilityResponse to be compared - /// Boolean - public bool Equals(ThreeDSAvailabilityResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.BinDetails == input.BinDetails || - (this.BinDetails != null && - this.BinDetails.Equals(input.BinDetails)) - ) && - ( - this.DsPublicKeys == input.DsPublicKeys || - this.DsPublicKeys != null && - input.DsPublicKeys != null && - this.DsPublicKeys.SequenceEqual(input.DsPublicKeys) - ) && - ( - this.ThreeDS1Supported == input.ThreeDS1Supported || - this.ThreeDS1Supported.Equals(input.ThreeDS1Supported) - ) && - ( - this.ThreeDS2CardRangeDetails == input.ThreeDS2CardRangeDetails || - this.ThreeDS2CardRangeDetails != null && - input.ThreeDS2CardRangeDetails != null && - this.ThreeDS2CardRangeDetails.SequenceEqual(input.ThreeDS2CardRangeDetails) - ) && - ( - this.ThreeDS2supported == input.ThreeDS2supported || - this.ThreeDS2supported.Equals(input.ThreeDS2supported) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BinDetails != null) - { - hashCode = (hashCode * 59) + this.BinDetails.GetHashCode(); - } - if (this.DsPublicKeys != null) - { - hashCode = (hashCode * 59) + this.DsPublicKeys.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDS1Supported.GetHashCode(); - if (this.ThreeDS2CardRangeDetails != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2CardRangeDetails.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDS2supported.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AbstractOpenAPISchema.cs b/Adyen/Model/Checkout/AbstractOpenAPISchema.cs deleted file mode 100644 index 69c1440c8..000000000 --- a/Adyen/Model/Checkout/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.Checkout -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/Checkout/AccountInfo.cs b/Adyen/Model/Checkout/AccountInfo.cs deleted file mode 100644 index 0b3dbec79..000000000 --- a/Adyen/Model/Checkout/AccountInfo.cs +++ /dev/null @@ -1,640 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AccountInfo - /// - [DataContract(Name = "AccountInfo")] - public partial class AccountInfo : IEquatable, IValidatableObject - { - /// - /// Indicator for the length of time since this shopper account was created in the merchant's environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator for the length of time since this shopper account was created in the merchant's environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountAgeIndicatorEnum - { - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 1, - - /// - /// Enum ThisTransaction for value: thisTransaction - /// - [EnumMember(Value = "thisTransaction")] - ThisTransaction = 2, - - /// - /// Enum LessThan30Days for value: lessThan30Days - /// - [EnumMember(Value = "lessThan30Days")] - LessThan30Days = 3, - - /// - /// Enum From30To60Days for value: from30To60Days - /// - [EnumMember(Value = "from30To60Days")] - From30To60Days = 4, - - /// - /// Enum MoreThan60Days for value: moreThan60Days - /// - [EnumMember(Value = "moreThan60Days")] - MoreThan60Days = 5 - - } - - - /// - /// Indicator for the length of time since this shopper account was created in the merchant's environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator for the length of time since this shopper account was created in the merchant's environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [DataMember(Name = "accountAgeIndicator", EmitDefaultValue = false)] - public AccountAgeIndicatorEnum? AccountAgeIndicator { get; set; } - /// - /// Indicator for the length of time since the shopper's account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator for the length of time since the shopper's account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountChangeIndicatorEnum - { - /// - /// Enum ThisTransaction for value: thisTransaction - /// - [EnumMember(Value = "thisTransaction")] - ThisTransaction = 1, - - /// - /// Enum LessThan30Days for value: lessThan30Days - /// - [EnumMember(Value = "lessThan30Days")] - LessThan30Days = 2, - - /// - /// Enum From30To60Days for value: from30To60Days - /// - [EnumMember(Value = "from30To60Days")] - From30To60Days = 3, - - /// - /// Enum MoreThan60Days for value: moreThan60Days - /// - [EnumMember(Value = "moreThan60Days")] - MoreThan60Days = 4 - - } - - - /// - /// Indicator for the length of time since the shopper's account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator for the length of time since the shopper's account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [DataMember(Name = "accountChangeIndicator", EmitDefaultValue = false)] - public AccountChangeIndicatorEnum? AccountChangeIndicator { get; set; } - /// - /// Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit - /// - /// Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 1, - - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 2, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 3 - - } - - - /// - /// Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit - /// - /// Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [JsonConverter(typeof(StringEnumConverter))] - public enum DeliveryAddressUsageIndicatorEnum - { - /// - /// Enum ThisTransaction for value: thisTransaction - /// - [EnumMember(Value = "thisTransaction")] - ThisTransaction = 1, - - /// - /// Enum LessThan30Days for value: lessThan30Days - /// - [EnumMember(Value = "lessThan30Days")] - LessThan30Days = 2, - - /// - /// Enum From30To60Days for value: from30To60Days - /// - [EnumMember(Value = "from30To60Days")] - From30To60Days = 3, - - /// - /// Enum MoreThan60Days for value: moreThan60Days - /// - [EnumMember(Value = "moreThan60Days")] - MoreThan60Days = 4 - - } - - - /// - /// Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [DataMember(Name = "deliveryAddressUsageIndicator", EmitDefaultValue = false)] - public DeliveryAddressUsageIndicatorEnum? DeliveryAddressUsageIndicator { get; set; } - /// - /// Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [JsonConverter(typeof(StringEnumConverter))] - public enum PasswordChangeIndicatorEnum - { - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 1, - - /// - /// Enum ThisTransaction for value: thisTransaction - /// - [EnumMember(Value = "thisTransaction")] - ThisTransaction = 2, - - /// - /// Enum LessThan30Days for value: lessThan30Days - /// - [EnumMember(Value = "lessThan30Days")] - LessThan30Days = 3, - - /// - /// Enum From30To60Days for value: from30To60Days - /// - [EnumMember(Value = "from30To60Days")] - From30To60Days = 4, - - /// - /// Enum MoreThan60Days for value: moreThan60Days - /// - [EnumMember(Value = "moreThan60Days")] - MoreThan60Days = 5 - - } - - - /// - /// Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [DataMember(Name = "passwordChangeIndicator", EmitDefaultValue = false)] - public PasswordChangeIndicatorEnum? PasswordChangeIndicator { get; set; } - /// - /// Indicator for the length of time since this payment method was added to this shopper's account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator for the length of time since this payment method was added to this shopper's account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [JsonConverter(typeof(StringEnumConverter))] - public enum PaymentAccountIndicatorEnum - { - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 1, - - /// - /// Enum ThisTransaction for value: thisTransaction - /// - [EnumMember(Value = "thisTransaction")] - ThisTransaction = 2, - - /// - /// Enum LessThan30Days for value: lessThan30Days - /// - [EnumMember(Value = "lessThan30Days")] - LessThan30Days = 3, - - /// - /// Enum From30To60Days for value: from30To60Days - /// - [EnumMember(Value = "from30To60Days")] - From30To60Days = 4, - - /// - /// Enum MoreThan60Days for value: moreThan60Days - /// - [EnumMember(Value = "moreThan60Days")] - MoreThan60Days = 5 - - } - - - /// - /// Indicator for the length of time since this payment method was added to this shopper's account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - /// - /// Indicator for the length of time since this payment method was added to this shopper's account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days - [DataMember(Name = "paymentAccountIndicator", EmitDefaultValue = false)] - public PaymentAccountIndicatorEnum? PaymentAccountIndicator { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicator for the length of time since this shopper account was created in the merchant's environment. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days. - /// Date when the shopper's account was last changed.. - /// Indicator for the length of time since the shopper's account was last updated. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days. - /// Date when the shopper's account was created.. - /// Indicates the type of account. For example, for a multi-account card product. Allowed values: * notApplicable * credit * debit. - /// Number of attempts the shopper tried to add a card to their account in the last day.. - /// Date the selected delivery address was first used.. - /// Indicator for the length of time since this delivery address was first used. Allowed values: * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days. - /// Shopper's home phone number (including the country code).. - /// Shopper's mobile phone number (including the country code).. - /// Date when the shopper last changed their password.. - /// Indicator when the shopper has changed their password. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days. - /// Number of all transactions (successful and abandoned) from this shopper in the past 24 hours.. - /// Number of all transactions (successful and abandoned) from this shopper in the past year.. - /// Date this payment method was added to the shopper's account.. - /// Indicator for the length of time since this payment method was added to this shopper's account. Allowed values: * notApplicable * thisTransaction * lessThan30Days * from30To60Days * moreThan60Days. - /// Number of successful purchases in the last six months.. - /// Whether suspicious activity was recorded on this account.. - /// Shopper's work phone number (including the country code).. - public AccountInfo(AccountAgeIndicatorEnum? accountAgeIndicator = default(AccountAgeIndicatorEnum?), DateTime accountChangeDate = default(DateTime), AccountChangeIndicatorEnum? accountChangeIndicator = default(AccountChangeIndicatorEnum?), DateTime accountCreationDate = default(DateTime), AccountTypeEnum? accountType = default(AccountTypeEnum?), int? addCardAttemptsDay = default(int?), DateTime deliveryAddressUsageDate = default(DateTime), DeliveryAddressUsageIndicatorEnum? deliveryAddressUsageIndicator = default(DeliveryAddressUsageIndicatorEnum?), string homePhone = default(string), string mobilePhone = default(string), DateTime passwordChangeDate = default(DateTime), PasswordChangeIndicatorEnum? passwordChangeIndicator = default(PasswordChangeIndicatorEnum?), int? pastTransactionsDay = default(int?), int? pastTransactionsYear = default(int?), DateTime paymentAccountAge = default(DateTime), PaymentAccountIndicatorEnum? paymentAccountIndicator = default(PaymentAccountIndicatorEnum?), int? purchasesLast6Months = default(int?), bool? suspiciousActivity = default(bool?), string workPhone = default(string)) - { - this.AccountAgeIndicator = accountAgeIndicator; - this.AccountChangeDate = accountChangeDate; - this.AccountChangeIndicator = accountChangeIndicator; - this.AccountCreationDate = accountCreationDate; - this.AccountType = accountType; - this.AddCardAttemptsDay = addCardAttemptsDay; - this.DeliveryAddressUsageDate = deliveryAddressUsageDate; - this.DeliveryAddressUsageIndicator = deliveryAddressUsageIndicator; - this.HomePhone = homePhone; - this.MobilePhone = mobilePhone; - this.PasswordChangeDate = passwordChangeDate; - this.PasswordChangeIndicator = passwordChangeIndicator; - this.PastTransactionsDay = pastTransactionsDay; - this.PastTransactionsYear = pastTransactionsYear; - this.PaymentAccountAge = paymentAccountAge; - this.PaymentAccountIndicator = paymentAccountIndicator; - this.PurchasesLast6Months = purchasesLast6Months; - this.SuspiciousActivity = suspiciousActivity; - this.WorkPhone = workPhone; - } - - /// - /// Date when the shopper's account was last changed. - /// - /// Date when the shopper's account was last changed. - [DataMember(Name = "accountChangeDate", EmitDefaultValue = false)] - public DateTime AccountChangeDate { get; set; } - - /// - /// Date when the shopper's account was created. - /// - /// Date when the shopper's account was created. - [DataMember(Name = "accountCreationDate", EmitDefaultValue = false)] - public DateTime AccountCreationDate { get; set; } - - /// - /// Number of attempts the shopper tried to add a card to their account in the last day. - /// - /// Number of attempts the shopper tried to add a card to their account in the last day. - [DataMember(Name = "addCardAttemptsDay", EmitDefaultValue = false)] - public int? AddCardAttemptsDay { get; set; } - - /// - /// Date the selected delivery address was first used. - /// - /// Date the selected delivery address was first used. - [DataMember(Name = "deliveryAddressUsageDate", EmitDefaultValue = false)] - public DateTime DeliveryAddressUsageDate { get; set; } - - /// - /// Shopper's home phone number (including the country code). - /// - /// Shopper's home phone number (including the country code). - [DataMember(Name = "homePhone", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use `ThreeDS2RequestData.homePhone` instead.")] - public string HomePhone { get; set; } - - /// - /// Shopper's mobile phone number (including the country code). - /// - /// Shopper's mobile phone number (including the country code). - [DataMember(Name = "mobilePhone", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use `ThreeDS2RequestData.mobilePhone` instead.")] - public string MobilePhone { get; set; } - - /// - /// Date when the shopper last changed their password. - /// - /// Date when the shopper last changed their password. - [DataMember(Name = "passwordChangeDate", EmitDefaultValue = false)] - public DateTime PasswordChangeDate { get; set; } - - /// - /// Number of all transactions (successful and abandoned) from this shopper in the past 24 hours. - /// - /// Number of all transactions (successful and abandoned) from this shopper in the past 24 hours. - [DataMember(Name = "pastTransactionsDay", EmitDefaultValue = false)] - public int? PastTransactionsDay { get; set; } - - /// - /// Number of all transactions (successful and abandoned) from this shopper in the past year. - /// - /// Number of all transactions (successful and abandoned) from this shopper in the past year. - [DataMember(Name = "pastTransactionsYear", EmitDefaultValue = false)] - public int? PastTransactionsYear { get; set; } - - /// - /// Date this payment method was added to the shopper's account. - /// - /// Date this payment method was added to the shopper's account. - [DataMember(Name = "paymentAccountAge", EmitDefaultValue = false)] - public DateTime PaymentAccountAge { get; set; } - - /// - /// Number of successful purchases in the last six months. - /// - /// Number of successful purchases in the last six months. - [DataMember(Name = "purchasesLast6Months", EmitDefaultValue = false)] - public int? PurchasesLast6Months { get; set; } - - /// - /// Whether suspicious activity was recorded on this account. - /// - /// Whether suspicious activity was recorded on this account. - [DataMember(Name = "suspiciousActivity", EmitDefaultValue = false)] - public bool? SuspiciousActivity { get; set; } - - /// - /// Shopper's work phone number (including the country code). - /// - /// Shopper's work phone number (including the country code). - [DataMember(Name = "workPhone", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use `ThreeDS2RequestData.workPhone` instead.")] - public string WorkPhone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountInfo {\n"); - sb.Append(" AccountAgeIndicator: ").Append(AccountAgeIndicator).Append("\n"); - sb.Append(" AccountChangeDate: ").Append(AccountChangeDate).Append("\n"); - sb.Append(" AccountChangeIndicator: ").Append(AccountChangeIndicator).Append("\n"); - sb.Append(" AccountCreationDate: ").Append(AccountCreationDate).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" AddCardAttemptsDay: ").Append(AddCardAttemptsDay).Append("\n"); - sb.Append(" DeliveryAddressUsageDate: ").Append(DeliveryAddressUsageDate).Append("\n"); - sb.Append(" DeliveryAddressUsageIndicator: ").Append(DeliveryAddressUsageIndicator).Append("\n"); - sb.Append(" HomePhone: ").Append(HomePhone).Append("\n"); - sb.Append(" MobilePhone: ").Append(MobilePhone).Append("\n"); - sb.Append(" PasswordChangeDate: ").Append(PasswordChangeDate).Append("\n"); - sb.Append(" PasswordChangeIndicator: ").Append(PasswordChangeIndicator).Append("\n"); - sb.Append(" PastTransactionsDay: ").Append(PastTransactionsDay).Append("\n"); - sb.Append(" PastTransactionsYear: ").Append(PastTransactionsYear).Append("\n"); - sb.Append(" PaymentAccountAge: ").Append(PaymentAccountAge).Append("\n"); - sb.Append(" PaymentAccountIndicator: ").Append(PaymentAccountIndicator).Append("\n"); - sb.Append(" PurchasesLast6Months: ").Append(PurchasesLast6Months).Append("\n"); - sb.Append(" SuspiciousActivity: ").Append(SuspiciousActivity).Append("\n"); - sb.Append(" WorkPhone: ").Append(WorkPhone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountInfo); - } - - /// - /// Returns true if AccountInfo instances are equal - /// - /// Instance of AccountInfo to be compared - /// Boolean - public bool Equals(AccountInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountAgeIndicator == input.AccountAgeIndicator || - this.AccountAgeIndicator.Equals(input.AccountAgeIndicator) - ) && - ( - this.AccountChangeDate == input.AccountChangeDate || - (this.AccountChangeDate != null && - this.AccountChangeDate.Equals(input.AccountChangeDate)) - ) && - ( - this.AccountChangeIndicator == input.AccountChangeIndicator || - this.AccountChangeIndicator.Equals(input.AccountChangeIndicator) - ) && - ( - this.AccountCreationDate == input.AccountCreationDate || - (this.AccountCreationDate != null && - this.AccountCreationDate.Equals(input.AccountCreationDate)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.AddCardAttemptsDay == input.AddCardAttemptsDay || - this.AddCardAttemptsDay.Equals(input.AddCardAttemptsDay) - ) && - ( - this.DeliveryAddressUsageDate == input.DeliveryAddressUsageDate || - (this.DeliveryAddressUsageDate != null && - this.DeliveryAddressUsageDate.Equals(input.DeliveryAddressUsageDate)) - ) && - ( - this.DeliveryAddressUsageIndicator == input.DeliveryAddressUsageIndicator || - this.DeliveryAddressUsageIndicator.Equals(input.DeliveryAddressUsageIndicator) - ) && - ( - this.HomePhone == input.HomePhone || - (this.HomePhone != null && - this.HomePhone.Equals(input.HomePhone)) - ) && - ( - this.MobilePhone == input.MobilePhone || - (this.MobilePhone != null && - this.MobilePhone.Equals(input.MobilePhone)) - ) && - ( - this.PasswordChangeDate == input.PasswordChangeDate || - (this.PasswordChangeDate != null && - this.PasswordChangeDate.Equals(input.PasswordChangeDate)) - ) && - ( - this.PasswordChangeIndicator == input.PasswordChangeIndicator || - this.PasswordChangeIndicator.Equals(input.PasswordChangeIndicator) - ) && - ( - this.PastTransactionsDay == input.PastTransactionsDay || - this.PastTransactionsDay.Equals(input.PastTransactionsDay) - ) && - ( - this.PastTransactionsYear == input.PastTransactionsYear || - this.PastTransactionsYear.Equals(input.PastTransactionsYear) - ) && - ( - this.PaymentAccountAge == input.PaymentAccountAge || - (this.PaymentAccountAge != null && - this.PaymentAccountAge.Equals(input.PaymentAccountAge)) - ) && - ( - this.PaymentAccountIndicator == input.PaymentAccountIndicator || - this.PaymentAccountIndicator.Equals(input.PaymentAccountIndicator) - ) && - ( - this.PurchasesLast6Months == input.PurchasesLast6Months || - this.PurchasesLast6Months.Equals(input.PurchasesLast6Months) - ) && - ( - this.SuspiciousActivity == input.SuspiciousActivity || - this.SuspiciousActivity.Equals(input.SuspiciousActivity) - ) && - ( - this.WorkPhone == input.WorkPhone || - (this.WorkPhone != null && - this.WorkPhone.Equals(input.WorkPhone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountAgeIndicator.GetHashCode(); - if (this.AccountChangeDate != null) - { - hashCode = (hashCode * 59) + this.AccountChangeDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountChangeIndicator.GetHashCode(); - if (this.AccountCreationDate != null) - { - hashCode = (hashCode * 59) + this.AccountCreationDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - hashCode = (hashCode * 59) + this.AddCardAttemptsDay.GetHashCode(); - if (this.DeliveryAddressUsageDate != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddressUsageDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DeliveryAddressUsageIndicator.GetHashCode(); - if (this.HomePhone != null) - { - hashCode = (hashCode * 59) + this.HomePhone.GetHashCode(); - } - if (this.MobilePhone != null) - { - hashCode = (hashCode * 59) + this.MobilePhone.GetHashCode(); - } - if (this.PasswordChangeDate != null) - { - hashCode = (hashCode * 59) + this.PasswordChangeDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PasswordChangeIndicator.GetHashCode(); - hashCode = (hashCode * 59) + this.PastTransactionsDay.GetHashCode(); - hashCode = (hashCode * 59) + this.PastTransactionsYear.GetHashCode(); - if (this.PaymentAccountAge != null) - { - hashCode = (hashCode * 59) + this.PaymentAccountAge.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PaymentAccountIndicator.GetHashCode(); - hashCode = (hashCode * 59) + this.PurchasesLast6Months.GetHashCode(); - hashCode = (hashCode * 59) + this.SuspiciousActivity.GetHashCode(); - if (this.WorkPhone != null) - { - hashCode = (hashCode * 59) + this.WorkPhone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AcctInfo.cs b/Adyen/Model/Checkout/AcctInfo.cs deleted file mode 100644 index 38ea62d99..000000000 --- a/Adyen/Model/Checkout/AcctInfo.cs +++ /dev/null @@ -1,623 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AcctInfo - /// - [DataContract(Name = "AcctInfo")] - public partial class AcctInfo : IEquatable, IValidatableObject - { - /// - /// Length of time that the cardholder has had the account with the 3DS Requestor. Allowed values: * **01** — No account * **02** — Created during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - /// - /// Length of time that the cardholder has had the account with the 3DS Requestor. Allowed values: * **01** — No account * **02** — Created during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - [JsonConverter(typeof(StringEnumConverter))] - public enum ChAccAgeIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5 - - } - - - /// - /// Length of time that the cardholder has had the account with the 3DS Requestor. Allowed values: * **01** — No account * **02** — Created during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - /// - /// Length of time that the cardholder has had the account with the 3DS Requestor. Allowed values: * **01** — No account * **02** — Created during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - [DataMember(Name = "chAccAgeInd", EmitDefaultValue = false)] - public ChAccAgeIndEnum? ChAccAgeInd { get; set; } - /// - /// Length of time since the cardholder’s account information with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Allowed values: * **01** — Changed during this transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - /// - /// Length of time since the cardholder’s account information with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Allowed values: * **01** — Changed during this transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - [JsonConverter(typeof(StringEnumConverter))] - public enum ChAccChangeIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4 - - } - - - /// - /// Length of time since the cardholder’s account information with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Allowed values: * **01** — Changed during this transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - /// - /// Length of time since the cardholder’s account information with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Allowed values: * **01** — Changed during this transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - [DataMember(Name = "chAccChangeInd", EmitDefaultValue = false)] - public ChAccChangeIndEnum? ChAccChangeInd { get; set; } - /// - /// Indicates the length of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. Allowed values: * **01** — No change * **02** — Changed during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - /// - /// Indicates the length of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. Allowed values: * **01** — No change * **02** — Changed during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - [JsonConverter(typeof(StringEnumConverter))] - public enum ChAccPwChangeIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5 - - } - - - /// - /// Indicates the length of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. Allowed values: * **01** — No change * **02** — Changed during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - /// - /// Indicates the length of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. Allowed values: * **01** — No change * **02** — Changed during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - [DataMember(Name = "chAccPwChangeInd", EmitDefaultValue = false)] - public ChAccPwChangeIndEnum? ChAccPwChangeInd { get; set; } - /// - /// Indicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Allowed values: * **01** — No account (guest checkout) * **02** — During this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - /// - /// Indicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Allowed values: * **01** — No account (guest checkout) * **02** — During this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - [JsonConverter(typeof(StringEnumConverter))] - public enum PaymentAccIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5 - - } - - - /// - /// Indicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Allowed values: * **01** — No account (guest checkout) * **02** — During this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - /// - /// Indicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Allowed values: * **01** — No account (guest checkout) * **02** — During this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days - [DataMember(Name = "paymentAccInd", EmitDefaultValue = false)] - public PaymentAccIndEnum? PaymentAccInd { get; set; } - /// - /// Indicates when the shipping address used for this transaction was first used with the 3DS Requestor. Allowed values: * **01** — This transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - /// - /// Indicates when the shipping address used for this transaction was first used with the 3DS Requestor. Allowed values: * **01** — This transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - [JsonConverter(typeof(StringEnumConverter))] - public enum ShipAddressUsageIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4 - - } - - - /// - /// Indicates when the shipping address used for this transaction was first used with the 3DS Requestor. Allowed values: * **01** — This transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - /// - /// Indicates when the shipping address used for this transaction was first used with the 3DS Requestor. Allowed values: * **01** — This transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days - [DataMember(Name = "shipAddressUsageInd", EmitDefaultValue = false)] - public ShipAddressUsageIndEnum? ShipAddressUsageInd { get; set; } - /// - /// Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. Allowed values: * **01** — Account Name identical to shipping Name * **02** — Account Name different to shipping Name - /// - /// Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. Allowed values: * **01** — Account Name identical to shipping Name * **02** — Account Name different to shipping Name - [JsonConverter(typeof(StringEnumConverter))] - public enum ShipNameIndicatorEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2 - - } - - - /// - /// Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. Allowed values: * **01** — Account Name identical to shipping Name * **02** — Account Name different to shipping Name - /// - /// Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. Allowed values: * **01** — Account Name identical to shipping Name * **02** — Account Name different to shipping Name - [DataMember(Name = "shipNameIndicator", EmitDefaultValue = false)] - public ShipNameIndicatorEnum? ShipNameIndicator { get; set; } - /// - /// Indicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. Allowed values: * **01** — No suspicious activity has been observed * **02** — Suspicious activity has been observed - /// - /// Indicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. Allowed values: * **01** — No suspicious activity has been observed * **02** — Suspicious activity has been observed - [JsonConverter(typeof(StringEnumConverter))] - public enum SuspiciousAccActivityEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2 - - } - - - /// - /// Indicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. Allowed values: * **01** — No suspicious activity has been observed * **02** — Suspicious activity has been observed - /// - /// Indicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. Allowed values: * **01** — No suspicious activity has been observed * **02** — Suspicious activity has been observed - [DataMember(Name = "suspiciousAccActivity", EmitDefaultValue = false)] - public SuspiciousAccActivityEnum? SuspiciousAccActivity { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Length of time that the cardholder has had the account with the 3DS Requestor. Allowed values: * **01** — No account * **02** — Created during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days. - /// Date that the cardholder’s account with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Format: **YYYYMMDD**. - /// Length of time since the cardholder’s account information with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Allowed values: * **01** — Changed during this transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days. - /// Date that cardholder’s account with the 3DS Requestor had a password change or account reset. Format: **YYYYMMDD**. - /// Indicates the length of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. Allowed values: * **01** — No change * **02** — Changed during this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days. - /// Date that the cardholder opened the account with the 3DS Requestor. Format: **YYYYMMDD**. - /// Number of purchases with this cardholder account during the previous six months. Max length: 4 characters.. - /// String that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Format: **YYYYMMDD**. - /// Indicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Allowed values: * **01** — No account (guest checkout) * **02** — During this transaction * **03** — Less than 30 days * **04** — 30–60 days * **05** — More than 60 days. - /// Number of Add Card attempts in the last 24 hours. Max length: 3 characters.. - /// String when the shipping address used for this transaction was first used with the 3DS Requestor. Format: **YYYYMMDD**. - /// Indicates when the shipping address used for this transaction was first used with the 3DS Requestor. Allowed values: * **01** — This transaction * **02** — Less than 30 days * **03** — 30–60 days * **04** — More than 60 days. - /// Indicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. Allowed values: * **01** — Account Name identical to shipping Name * **02** — Account Name different to shipping Name. - /// Indicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. Allowed values: * **01** — No suspicious activity has been observed * **02** — Suspicious activity has been observed. - /// Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous 24 hours. Max length: 3 characters.. - /// Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous year. Max length: 3 characters.. - public AcctInfo(ChAccAgeIndEnum? chAccAgeInd = default(ChAccAgeIndEnum?), string chAccChange = default(string), ChAccChangeIndEnum? chAccChangeInd = default(ChAccChangeIndEnum?), string chAccPwChange = default(string), ChAccPwChangeIndEnum? chAccPwChangeInd = default(ChAccPwChangeIndEnum?), string chAccString = default(string), string nbPurchaseAccount = default(string), string paymentAccAge = default(string), PaymentAccIndEnum? paymentAccInd = default(PaymentAccIndEnum?), string provisionAttemptsDay = default(string), string shipAddressUsage = default(string), ShipAddressUsageIndEnum? shipAddressUsageInd = default(ShipAddressUsageIndEnum?), ShipNameIndicatorEnum? shipNameIndicator = default(ShipNameIndicatorEnum?), SuspiciousAccActivityEnum? suspiciousAccActivity = default(SuspiciousAccActivityEnum?), string txnActivityDay = default(string), string txnActivityYear = default(string)) - { - this.ChAccAgeInd = chAccAgeInd; - this.ChAccChange = chAccChange; - this.ChAccChangeInd = chAccChangeInd; - this.ChAccPwChange = chAccPwChange; - this.ChAccPwChangeInd = chAccPwChangeInd; - this.ChAccString = chAccString; - this.NbPurchaseAccount = nbPurchaseAccount; - this.PaymentAccAge = paymentAccAge; - this.PaymentAccInd = paymentAccInd; - this.ProvisionAttemptsDay = provisionAttemptsDay; - this.ShipAddressUsage = shipAddressUsage; - this.ShipAddressUsageInd = shipAddressUsageInd; - this.ShipNameIndicator = shipNameIndicator; - this.SuspiciousAccActivity = suspiciousAccActivity; - this.TxnActivityDay = txnActivityDay; - this.TxnActivityYear = txnActivityYear; - } - - /// - /// Date that the cardholder’s account with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Format: **YYYYMMDD** - /// - /// Date that the cardholder’s account with the 3DS Requestor was last changed, including Billing or Shipping address, new payment account, or new user(s) added. Format: **YYYYMMDD** - [DataMember(Name = "chAccChange", EmitDefaultValue = false)] - public string ChAccChange { get; set; } - - /// - /// Date that cardholder’s account with the 3DS Requestor had a password change or account reset. Format: **YYYYMMDD** - /// - /// Date that cardholder’s account with the 3DS Requestor had a password change or account reset. Format: **YYYYMMDD** - [DataMember(Name = "chAccPwChange", EmitDefaultValue = false)] - public string ChAccPwChange { get; set; } - - /// - /// Date that the cardholder opened the account with the 3DS Requestor. Format: **YYYYMMDD** - /// - /// Date that the cardholder opened the account with the 3DS Requestor. Format: **YYYYMMDD** - [DataMember(Name = "chAccString", EmitDefaultValue = false)] - public string ChAccString { get; set; } - - /// - /// Number of purchases with this cardholder account during the previous six months. Max length: 4 characters. - /// - /// Number of purchases with this cardholder account during the previous six months. Max length: 4 characters. - [DataMember(Name = "nbPurchaseAccount", EmitDefaultValue = false)] - public string NbPurchaseAccount { get; set; } - - /// - /// String that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Format: **YYYYMMDD** - /// - /// String that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Format: **YYYYMMDD** - [DataMember(Name = "paymentAccAge", EmitDefaultValue = false)] - public string PaymentAccAge { get; set; } - - /// - /// Number of Add Card attempts in the last 24 hours. Max length: 3 characters. - /// - /// Number of Add Card attempts in the last 24 hours. Max length: 3 characters. - [DataMember(Name = "provisionAttemptsDay", EmitDefaultValue = false)] - public string ProvisionAttemptsDay { get; set; } - - /// - /// String when the shipping address used for this transaction was first used with the 3DS Requestor. Format: **YYYYMMDD** - /// - /// String when the shipping address used for this transaction was first used with the 3DS Requestor. Format: **YYYYMMDD** - [DataMember(Name = "shipAddressUsage", EmitDefaultValue = false)] - public string ShipAddressUsage { get; set; } - - /// - /// Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous 24 hours. Max length: 3 characters. - /// - /// Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous 24 hours. Max length: 3 characters. - [DataMember(Name = "txnActivityDay", EmitDefaultValue = false)] - public string TxnActivityDay { get; set; } - - /// - /// Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous year. Max length: 3 characters. - /// - /// Number of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous year. Max length: 3 characters. - [DataMember(Name = "txnActivityYear", EmitDefaultValue = false)] - public string TxnActivityYear { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AcctInfo {\n"); - sb.Append(" ChAccAgeInd: ").Append(ChAccAgeInd).Append("\n"); - sb.Append(" ChAccChange: ").Append(ChAccChange).Append("\n"); - sb.Append(" ChAccChangeInd: ").Append(ChAccChangeInd).Append("\n"); - sb.Append(" ChAccPwChange: ").Append(ChAccPwChange).Append("\n"); - sb.Append(" ChAccPwChangeInd: ").Append(ChAccPwChangeInd).Append("\n"); - sb.Append(" ChAccString: ").Append(ChAccString).Append("\n"); - sb.Append(" NbPurchaseAccount: ").Append(NbPurchaseAccount).Append("\n"); - sb.Append(" PaymentAccAge: ").Append(PaymentAccAge).Append("\n"); - sb.Append(" PaymentAccInd: ").Append(PaymentAccInd).Append("\n"); - sb.Append(" ProvisionAttemptsDay: ").Append(ProvisionAttemptsDay).Append("\n"); - sb.Append(" ShipAddressUsage: ").Append(ShipAddressUsage).Append("\n"); - sb.Append(" ShipAddressUsageInd: ").Append(ShipAddressUsageInd).Append("\n"); - sb.Append(" ShipNameIndicator: ").Append(ShipNameIndicator).Append("\n"); - sb.Append(" SuspiciousAccActivity: ").Append(SuspiciousAccActivity).Append("\n"); - sb.Append(" TxnActivityDay: ").Append(TxnActivityDay).Append("\n"); - sb.Append(" TxnActivityYear: ").Append(TxnActivityYear).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AcctInfo); - } - - /// - /// Returns true if AcctInfo instances are equal - /// - /// Instance of AcctInfo to be compared - /// Boolean - public bool Equals(AcctInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ChAccAgeInd == input.ChAccAgeInd || - this.ChAccAgeInd.Equals(input.ChAccAgeInd) - ) && - ( - this.ChAccChange == input.ChAccChange || - (this.ChAccChange != null && - this.ChAccChange.Equals(input.ChAccChange)) - ) && - ( - this.ChAccChangeInd == input.ChAccChangeInd || - this.ChAccChangeInd.Equals(input.ChAccChangeInd) - ) && - ( - this.ChAccPwChange == input.ChAccPwChange || - (this.ChAccPwChange != null && - this.ChAccPwChange.Equals(input.ChAccPwChange)) - ) && - ( - this.ChAccPwChangeInd == input.ChAccPwChangeInd || - this.ChAccPwChangeInd.Equals(input.ChAccPwChangeInd) - ) && - ( - this.ChAccString == input.ChAccString || - (this.ChAccString != null && - this.ChAccString.Equals(input.ChAccString)) - ) && - ( - this.NbPurchaseAccount == input.NbPurchaseAccount || - (this.NbPurchaseAccount != null && - this.NbPurchaseAccount.Equals(input.NbPurchaseAccount)) - ) && - ( - this.PaymentAccAge == input.PaymentAccAge || - (this.PaymentAccAge != null && - this.PaymentAccAge.Equals(input.PaymentAccAge)) - ) && - ( - this.PaymentAccInd == input.PaymentAccInd || - this.PaymentAccInd.Equals(input.PaymentAccInd) - ) && - ( - this.ProvisionAttemptsDay == input.ProvisionAttemptsDay || - (this.ProvisionAttemptsDay != null && - this.ProvisionAttemptsDay.Equals(input.ProvisionAttemptsDay)) - ) && - ( - this.ShipAddressUsage == input.ShipAddressUsage || - (this.ShipAddressUsage != null && - this.ShipAddressUsage.Equals(input.ShipAddressUsage)) - ) && - ( - this.ShipAddressUsageInd == input.ShipAddressUsageInd || - this.ShipAddressUsageInd.Equals(input.ShipAddressUsageInd) - ) && - ( - this.ShipNameIndicator == input.ShipNameIndicator || - this.ShipNameIndicator.Equals(input.ShipNameIndicator) - ) && - ( - this.SuspiciousAccActivity == input.SuspiciousAccActivity || - this.SuspiciousAccActivity.Equals(input.SuspiciousAccActivity) - ) && - ( - this.TxnActivityDay == input.TxnActivityDay || - (this.TxnActivityDay != null && - this.TxnActivityDay.Equals(input.TxnActivityDay)) - ) && - ( - this.TxnActivityYear == input.TxnActivityYear || - (this.TxnActivityYear != null && - this.TxnActivityYear.Equals(input.TxnActivityYear)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ChAccAgeInd.GetHashCode(); - if (this.ChAccChange != null) - { - hashCode = (hashCode * 59) + this.ChAccChange.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ChAccChangeInd.GetHashCode(); - if (this.ChAccPwChange != null) - { - hashCode = (hashCode * 59) + this.ChAccPwChange.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ChAccPwChangeInd.GetHashCode(); - if (this.ChAccString != null) - { - hashCode = (hashCode * 59) + this.ChAccString.GetHashCode(); - } - if (this.NbPurchaseAccount != null) - { - hashCode = (hashCode * 59) + this.NbPurchaseAccount.GetHashCode(); - } - if (this.PaymentAccAge != null) - { - hashCode = (hashCode * 59) + this.PaymentAccAge.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PaymentAccInd.GetHashCode(); - if (this.ProvisionAttemptsDay != null) - { - hashCode = (hashCode * 59) + this.ProvisionAttemptsDay.GetHashCode(); - } - if (this.ShipAddressUsage != null) - { - hashCode = (hashCode * 59) + this.ShipAddressUsage.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShipAddressUsageInd.GetHashCode(); - hashCode = (hashCode * 59) + this.ShipNameIndicator.GetHashCode(); - hashCode = (hashCode * 59) + this.SuspiciousAccActivity.GetHashCode(); - if (this.TxnActivityDay != null) - { - hashCode = (hashCode * 59) + this.TxnActivityDay.GetHashCode(); - } - if (this.TxnActivityYear != null) - { - hashCode = (hashCode * 59) + this.TxnActivityYear.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // TxnActivityDay (string) maxLength - if (this.TxnActivityDay != null && this.TxnActivityDay.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TxnActivityDay, length must be less than 3.", new [] { "TxnActivityDay" }); - } - - // TxnActivityYear (string) maxLength - if (this.TxnActivityYear != null && this.TxnActivityYear.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TxnActivityYear, length must be less than 3.", new [] { "TxnActivityYear" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AchDetails.cs b/Adyen/Model/Checkout/AchDetails.cs deleted file mode 100644 index 17a32245d..000000000 --- a/Adyen/Model/Checkout/AchDetails.cs +++ /dev/null @@ -1,426 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AchDetails - /// - [DataContract(Name = "AchDetails")] - public partial class AchDetails : IEquatable, IValidatableObject - { - /// - /// The account holder type (personal or business). - /// - /// The account holder type (personal or business). - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountHolderTypeEnum - { - /// - /// Enum Business for value: business - /// - [EnumMember(Value = "business")] - Business = 1, - - /// - /// Enum Personal for value: personal - /// - [EnumMember(Value = "personal")] - Personal = 2 - - } - - - /// - /// The account holder type (personal or business). - /// - /// The account holder type (personal or business). - [DataMember(Name = "accountHolderType", EmitDefaultValue = false)] - public AccountHolderTypeEnum? AccountHolderType { get; set; } - /// - /// The bank account type (checking, savings...). - /// - /// The bank account type (checking, savings...). - [JsonConverter(typeof(StringEnumConverter))] - public enum BankAccountTypeEnum - { - /// - /// Enum Balance for value: balance - /// - [EnumMember(Value = "balance")] - Balance = 1, - - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 2, - - /// - /// Enum Deposit for value: deposit - /// - [EnumMember(Value = "deposit")] - Deposit = 3, - - /// - /// Enum General for value: general - /// - [EnumMember(Value = "general")] - General = 4, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 5, - - /// - /// Enum Payment for value: payment - /// - [EnumMember(Value = "payment")] - Payment = 6, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 7 - - } - - - /// - /// The bank account type (checking, savings...). - /// - /// The bank account type (checking, savings...). - [DataMember(Name = "bankAccountType", EmitDefaultValue = false)] - public BankAccountTypeEnum? BankAccountType { get; set; } - /// - /// **ach** - /// - /// **ach** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Ach for value: ach - /// - [EnumMember(Value = "ach")] - Ach = 1, - - /// - /// Enum AchPlaid for value: ach_plaid - /// - [EnumMember(Value = "ach_plaid")] - AchPlaid = 2 - - } - - - /// - /// **ach** - /// - /// **ach** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The account holder type (personal or business).. - /// The bank account number (without separators).. - /// The bank account type (checking, savings...).. - /// The bank routing number of the account. The field value is `nil` in most cases.. - /// The checkout attempt identifier.. - /// Encrypted bank account number. The bank account number (without separators).. - /// Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases.. - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts.. - /// **ach** (default to TypeEnum.Ach). - public AchDetails(AccountHolderTypeEnum? accountHolderType = default(AccountHolderTypeEnum?), string bankAccountNumber = default(string), BankAccountTypeEnum? bankAccountType = default(BankAccountTypeEnum?), string bankLocationId = default(string), string checkoutAttemptId = default(string), string encryptedBankAccountNumber = default(string), string encryptedBankLocationId = default(string), string ownerName = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string transferInstrumentId = default(string), TypeEnum? type = TypeEnum.Ach) - { - this.AccountHolderType = accountHolderType; - this.BankAccountNumber = bankAccountNumber; - this.BankAccountType = bankAccountType; - this.BankLocationId = bankLocationId; - this.CheckoutAttemptId = checkoutAttemptId; - this.EncryptedBankAccountNumber = encryptedBankAccountNumber; - this.EncryptedBankLocationId = encryptedBankLocationId; - this.OwnerName = ownerName; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.TransferInstrumentId = transferInstrumentId; - this.Type = type; - } - - /// - /// The bank account number (without separators). - /// - /// The bank account number (without separators). - [DataMember(Name = "bankAccountNumber", EmitDefaultValue = false)] - public string BankAccountNumber { get; set; } - - /// - /// The bank routing number of the account. The field value is `nil` in most cases. - /// - /// The bank routing number of the account. The field value is `nil` in most cases. - [DataMember(Name = "bankLocationId", EmitDefaultValue = false)] - public string BankLocationId { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Encrypted bank account number. The bank account number (without separators). - /// - /// Encrypted bank account number. The bank account number (without separators). - [DataMember(Name = "encryptedBankAccountNumber", EmitDefaultValue = false)] - public string EncryptedBankAccountNumber { get; set; } - - /// - /// Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. - /// - /// Encrypted location id. The bank routing number of the account. The field value is `nil` in most cases. - [DataMember(Name = "encryptedBankLocationId", EmitDefaultValue = false)] - public string EncryptedBankLocationId { get; set; } - - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts. - /// - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts. - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AchDetails {\n"); - sb.Append(" AccountHolderType: ").Append(AccountHolderType).Append("\n"); - sb.Append(" BankAccountNumber: ").Append(BankAccountNumber).Append("\n"); - sb.Append(" BankAccountType: ").Append(BankAccountType).Append("\n"); - sb.Append(" BankLocationId: ").Append(BankLocationId).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" EncryptedBankAccountNumber: ").Append(EncryptedBankAccountNumber).Append("\n"); - sb.Append(" EncryptedBankLocationId: ").Append(EncryptedBankLocationId).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AchDetails); - } - - /// - /// Returns true if AchDetails instances are equal - /// - /// Instance of AchDetails to be compared - /// Boolean - public bool Equals(AchDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderType == input.AccountHolderType || - this.AccountHolderType.Equals(input.AccountHolderType) - ) && - ( - this.BankAccountNumber == input.BankAccountNumber || - (this.BankAccountNumber != null && - this.BankAccountNumber.Equals(input.BankAccountNumber)) - ) && - ( - this.BankAccountType == input.BankAccountType || - this.BankAccountType.Equals(input.BankAccountType) - ) && - ( - this.BankLocationId == input.BankLocationId || - (this.BankLocationId != null && - this.BankLocationId.Equals(input.BankLocationId)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.EncryptedBankAccountNumber == input.EncryptedBankAccountNumber || - (this.EncryptedBankAccountNumber != null && - this.EncryptedBankAccountNumber.Equals(input.EncryptedBankAccountNumber)) - ) && - ( - this.EncryptedBankLocationId == input.EncryptedBankLocationId || - (this.EncryptedBankLocationId != null && - this.EncryptedBankLocationId.Equals(input.EncryptedBankLocationId)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountHolderType.GetHashCode(); - if (this.BankAccountNumber != null) - { - hashCode = (hashCode * 59) + this.BankAccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.BankAccountType.GetHashCode(); - if (this.BankLocationId != null) - { - hashCode = (hashCode * 59) + this.BankLocationId.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.EncryptedBankAccountNumber != null) - { - hashCode = (hashCode * 59) + this.EncryptedBankAccountNumber.GetHashCode(); - } - if (this.EncryptedBankLocationId != null) - { - hashCode = (hashCode * 59) + this.EncryptedBankLocationId.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalData3DSecure.cs b/Adyen/Model/Checkout/AdditionalData3DSecure.cs deleted file mode 100644 index 3afeb1d89..000000000 --- a/Adyen/Model/Checkout/AdditionalData3DSecure.cs +++ /dev/null @@ -1,261 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalData3DSecure - /// - [DataContract(Name = "AdditionalData3DSecure")] - public partial class AdditionalData3DSecure : IEquatable, IValidatableObject - { - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - [JsonConverter(typeof(StringEnumConverter))] - public enum ChallengeWindowSizeEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5 - - } - - - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - [DataMember(Name = "challengeWindowSize", EmitDefaultValue = false)] - public ChallengeWindowSizeEnum? ChallengeWindowSize { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen selects redirect or native authentication based on your configuration to optimize authorization rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen offers redirect 3D Secure 2 authentication instead, based on your configuration. . - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen. - /// Indicates if you want to perform 3D Secure authentication on a transaction. > Alternatively, you can use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) to configure rules for applying 3D Secure. Possible values: * **true** – Perform 3D Secure authentication. * **false** – Don't perform 3D Secure authentication. Note that this setting results in refusals if the issuer mandates 3D Secure because of the PSD2 directive or other, national regulations. . - /// In case of Secure+, this field must be set to **CUPSecurePlus**.. - /// Indicates the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that you want to request for the transaction. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** . - /// Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. * If you the BIN is not enrolled, you will receive an error. . - public AdditionalData3DSecure(string allow3DS2 = default(string), ChallengeWindowSizeEnum? challengeWindowSize = default(ChallengeWindowSizeEnum?), string executeThreeD = default(string), string mpiImplementationType = default(string), string scaExemption = default(string), string threeDSVersion = default(string)) - { - this.Allow3DS2 = allow3DS2; - this.ChallengeWindowSize = challengeWindowSize; - this.ExecuteThreeD = executeThreeD; - this.MpiImplementationType = mpiImplementationType; - this.ScaExemption = scaExemption; - this.ThreeDSVersion = threeDSVersion; - } - - /// - /// Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen selects redirect or native authentication based on your configuration to optimize authorization rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen offers redirect 3D Secure 2 authentication instead, based on your configuration. - /// - /// Indicates if you are able to process 3D Secure 2 transactions natively on your payment page. Send this parameter when you are using `/payments` endpoint with any of our [native 3D Secure 2 solutions](https://docs.adyen.com/online-payments/3d-secure/native-3ds2). > This parameter only indicates readiness to support native 3D Secure 2 authentication. To specify if you _want_ to perform 3D Secure, use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) or send the `executeThreeD` parameter. Possible values: * **true** - Ready to support native 3D Secure 2 authentication. Setting this to true does not mean always applying 3D Secure 2. Adyen selects redirect or native authentication based on your configuration to optimize authorization rates and improve the shopper's experience. * **false** – Not ready to support native 3D Secure 2 authentication. Adyen offers redirect 3D Secure 2 authentication instead, based on your configuration. - [DataMember(Name = "allow3DS2", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v69. Use `authenticationData.threeDSRequestData.nativeThreeDS` instead.")] - public string Allow3DS2 { get; set; } - - /// - /// Indicates if you want to perform 3D Secure authentication on a transaction. > Alternatively, you can use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) to configure rules for applying 3D Secure. Possible values: * **true** – Perform 3D Secure authentication. * **false** – Don't perform 3D Secure authentication. Note that this setting results in refusals if the issuer mandates 3D Secure because of the PSD2 directive or other, national regulations. - /// - /// Indicates if you want to perform 3D Secure authentication on a transaction. > Alternatively, you can use [Dynamic 3D Secure](/risk-management/dynamic-3d-secure) to configure rules for applying 3D Secure. Possible values: * **true** – Perform 3D Secure authentication. * **false** – Don't perform 3D Secure authentication. Note that this setting results in refusals if the issuer mandates 3D Secure because of the PSD2 directive or other, national regulations. - [DataMember(Name = "executeThreeD", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v69. Use [`authenticationData.attemptAuthentication`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments?target=_blank#request-authenticationData-attemptAuthentication) instead")] - public string ExecuteThreeD { get; set; } - - /// - /// In case of Secure+, this field must be set to **CUPSecurePlus**. - /// - /// In case of Secure+, this field must be set to **CUPSecurePlus**. - [DataMember(Name = "mpiImplementationType", EmitDefaultValue = false)] - public string MpiImplementationType { get; set; } - - /// - /// Indicates the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that you want to request for the transaction. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** - /// - /// Indicates the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that you want to request for the transaction. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** - [DataMember(Name = "scaExemption", EmitDefaultValue = false)] - public string ScaExemption { get; set; } - - /// - /// Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. * If you the BIN is not enrolled, you will receive an error. - /// - /// Indicates your preference for the 3D Secure version. > If you use this parameter, you override the checks from Adyen's Authentication Engine. We recommend to use this field only if you have an extensive knowledge of 3D Secure. Possible values: * **2.1.0**: Apply 3D Secure version 2.1.0. * **2.2.0**: Apply 3D Secure version 2.2.0. If the issuer does not support version 2.2.0, we will fall back to 2.1.0. The following rules apply: * If you prefer 2.1.0 or 2.2.0 but we receive a negative `transStatus` in the `ARes`, we will apply the fallback policy configured in your account. * If you the BIN is not enrolled, you will receive an error. - [DataMember(Name = "threeDSVersion", EmitDefaultValue = false)] - public string ThreeDSVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalData3DSecure {\n"); - sb.Append(" Allow3DS2: ").Append(Allow3DS2).Append("\n"); - sb.Append(" ChallengeWindowSize: ").Append(ChallengeWindowSize).Append("\n"); - sb.Append(" ExecuteThreeD: ").Append(ExecuteThreeD).Append("\n"); - sb.Append(" MpiImplementationType: ").Append(MpiImplementationType).Append("\n"); - sb.Append(" ScaExemption: ").Append(ScaExemption).Append("\n"); - sb.Append(" ThreeDSVersion: ").Append(ThreeDSVersion).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalData3DSecure); - } - - /// - /// Returns true if AdditionalData3DSecure instances are equal - /// - /// Instance of AdditionalData3DSecure to be compared - /// Boolean - public bool Equals(AdditionalData3DSecure input) - { - if (input == null) - { - return false; - } - return - ( - this.Allow3DS2 == input.Allow3DS2 || - (this.Allow3DS2 != null && - this.Allow3DS2.Equals(input.Allow3DS2)) - ) && - ( - this.ChallengeWindowSize == input.ChallengeWindowSize || - this.ChallengeWindowSize.Equals(input.ChallengeWindowSize) - ) && - ( - this.ExecuteThreeD == input.ExecuteThreeD || - (this.ExecuteThreeD != null && - this.ExecuteThreeD.Equals(input.ExecuteThreeD)) - ) && - ( - this.MpiImplementationType == input.MpiImplementationType || - (this.MpiImplementationType != null && - this.MpiImplementationType.Equals(input.MpiImplementationType)) - ) && - ( - this.ScaExemption == input.ScaExemption || - (this.ScaExemption != null && - this.ScaExemption.Equals(input.ScaExemption)) - ) && - ( - this.ThreeDSVersion == input.ThreeDSVersion || - (this.ThreeDSVersion != null && - this.ThreeDSVersion.Equals(input.ThreeDSVersion)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Allow3DS2 != null) - { - hashCode = (hashCode * 59) + this.Allow3DS2.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ChallengeWindowSize.GetHashCode(); - if (this.ExecuteThreeD != null) - { - hashCode = (hashCode * 59) + this.ExecuteThreeD.GetHashCode(); - } - if (this.MpiImplementationType != null) - { - hashCode = (hashCode * 59) + this.MpiImplementationType.GetHashCode(); - } - if (this.ScaExemption != null) - { - hashCode = (hashCode * 59) + this.ScaExemption.GetHashCode(); - } - if (this.ThreeDSVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDSVersion.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataAirline.cs b/Adyen/Model/Checkout/AdditionalDataAirline.cs deleted file mode 100644 index 76180793a..000000000 --- a/Adyen/Model/Checkout/AdditionalDataAirline.cs +++ /dev/null @@ -1,666 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataAirline - /// - [DataContract(Name = "AdditionalDataAirline")] - public partial class AdditionalDataAirline : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AdditionalDataAirline() { } - /// - /// Initializes a new instance of the class. - /// - /// The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters. - /// The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros.. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros.. - /// The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 18 characters. - /// The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters. - /// The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces. - /// A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters. - /// The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters. - /// The date that the ticket was issued to the passenger. * minLength: 6 characters * maxLength: 6 characters * Date format: YYMMDD. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros.. - /// A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros.. - /// Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros.. - /// The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros.. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros.. - /// The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros.. - /// The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros.. - /// A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character. - /// The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10. - /// The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII. - /// The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII. - /// The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters. - /// The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters. - /// The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros. (required). - /// The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters. - /// The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros.. - /// The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros.. - /// The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros.. - public AdditionalDataAirline(string airlineAgencyInvoiceNumber = default(string), string airlineAgencyPlanName = default(string), string airlineAirlineCode = default(string), string airlineAirlineDesignatorCode = default(string), string airlineBoardingFee = default(string), string airlineComputerizedReservationSystem = default(string), string airlineCustomerReferenceNumber = default(string), string airlineDocumentType = default(string), string airlineFlightDate = default(string), string airlineIssueDate = default(string), string airlineLegCarrierCode = default(string), string airlineLegClassOfTravel = default(string), string airlineLegDateOfTravel = default(string), string airlineLegDepartAirport = default(string), string airlineLegDepartTax = default(string), string airlineLegDestinationCode = default(string), string airlineLegFareBaseCode = default(string), string airlineLegFlightNumber = default(string), string airlineLegStopOverCode = default(string), string airlinePassengerDateOfBirth = default(string), string airlinePassengerFirstName = default(string), string airlinePassengerLastName = default(string), string airlinePassengerPhoneNumber = default(string), string airlinePassengerTravellerType = default(string), string airlinePassengerName = default(string), string airlineTicketIssueAddress = default(string), string airlineTicketNumber = default(string), string airlineTravelAgencyCode = default(string), string airlineTravelAgencyName = default(string)) - { - this.AirlinePassengerName = airlinePassengerName; - this.AirlineAgencyInvoiceNumber = airlineAgencyInvoiceNumber; - this.AirlineAgencyPlanName = airlineAgencyPlanName; - this.AirlineAirlineCode = airlineAirlineCode; - this.AirlineAirlineDesignatorCode = airlineAirlineDesignatorCode; - this.AirlineBoardingFee = airlineBoardingFee; - this.AirlineComputerizedReservationSystem = airlineComputerizedReservationSystem; - this.AirlineCustomerReferenceNumber = airlineCustomerReferenceNumber; - this.AirlineDocumentType = airlineDocumentType; - this.AirlineFlightDate = airlineFlightDate; - this.AirlineIssueDate = airlineIssueDate; - this.AirlineLegCarrierCode = airlineLegCarrierCode; - this.AirlineLegClassOfTravel = airlineLegClassOfTravel; - this.AirlineLegDateOfTravel = airlineLegDateOfTravel; - this.AirlineLegDepartAirport = airlineLegDepartAirport; - this.AirlineLegDepartTax = airlineLegDepartTax; - this.AirlineLegDestinationCode = airlineLegDestinationCode; - this.AirlineLegFareBaseCode = airlineLegFareBaseCode; - this.AirlineLegFlightNumber = airlineLegFlightNumber; - this.AirlineLegStopOverCode = airlineLegStopOverCode; - this.AirlinePassengerDateOfBirth = airlinePassengerDateOfBirth; - this.AirlinePassengerFirstName = airlinePassengerFirstName; - this.AirlinePassengerLastName = airlinePassengerLastName; - this.AirlinePassengerPhoneNumber = airlinePassengerPhoneNumber; - this.AirlinePassengerTravellerType = airlinePassengerTravellerType; - this.AirlineTicketIssueAddress = airlineTicketIssueAddress; - this.AirlineTicketNumber = airlineTicketNumber; - this.AirlineTravelAgencyCode = airlineTravelAgencyCode; - this.AirlineTravelAgencyName = airlineTravelAgencyName; - } - - /// - /// The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters - /// - /// The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters - [DataMember(Name = "airline.agency_invoice_number", EmitDefaultValue = false)] - public string AirlineAgencyInvoiceNumber { get; set; } - - /// - /// The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters - /// - /// The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters - [DataMember(Name = "airline.agency_plan_name", EmitDefaultValue = false)] - public string AirlineAgencyPlanName { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.airline_code", EmitDefaultValue = false)] - public string AirlineAirlineCode { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.airline_designator_code", EmitDefaultValue = false)] - public string AirlineAirlineDesignatorCode { get; set; } - - /// - /// The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 18 characters - /// - /// The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 18 characters - [DataMember(Name = "airline.boarding_fee", EmitDefaultValue = false)] - public string AirlineBoardingFee { get; set; } - - /// - /// The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters - /// - /// The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters - [DataMember(Name = "airline.computerized_reservation_system", EmitDefaultValue = false)] - public string AirlineComputerizedReservationSystem { get; set; } - - /// - /// The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces - /// - /// The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not be all spaces - [DataMember(Name = "airline.customer_reference_number", EmitDefaultValue = false)] - public string AirlineCustomerReferenceNumber { get; set; } - - /// - /// A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters - /// - /// A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters - [DataMember(Name = "airline.document_type", EmitDefaultValue = false)] - public string AirlineDocumentType { get; set; } - - /// - /// The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters - /// - /// The flight departure date. Local time `(HH:mm)` is optional. * Date format: `yyyy-MM-dd` * Date and time format: `yyyy-MM-dd HH:mm` * minLength: 10 characters * maxLength: 16 characters - [DataMember(Name = "airline.flight_date", EmitDefaultValue = false)] - public string AirlineFlightDate { get; set; } - - /// - /// The date that the ticket was issued to the passenger. * minLength: 6 characters * maxLength: 6 characters * Date format: YYMMDD - /// - /// The date that the ticket was issued to the passenger. * minLength: 6 characters * maxLength: 6 characters * Date format: YYMMDD - [DataMember(Name = "airline.issue_date", EmitDefaultValue = false)] - public string AirlineIssueDate { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.leg.carrier_code", EmitDefaultValue = false)] - public string AirlineLegCarrierCode { get; set; } - - /// - /// A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros. - /// - /// A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.leg.class_of_travel", EmitDefaultValue = false)] - public string AirlineLegClassOfTravel { get; set; } - - /// - /// Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters - /// - /// Date and time of travel in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format `yyyy-MM-dd HH:mm`. * Encoding: ASCII * minLength: 16 characters * maxLength: 16 characters - [DataMember(Name = "airline.leg.date_of_travel", EmitDefaultValue = false)] - public string AirlineLegDateOfTravel { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.leg.depart_airport", EmitDefaultValue = false)] - public string AirlineLegDepartAirport { get; set; } - - /// - /// The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros. - /// - /// The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 12 * Must not be all zeros. - [DataMember(Name = "airline.leg.depart_tax", EmitDefaultValue = false)] - public string AirlineLegDepartTax { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.leg.destination_code", EmitDefaultValue = false)] - public string AirlineLegDestinationCode { get; set; } - - /// - /// The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros. - /// - /// The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.leg.fare_base_code", EmitDefaultValue = false)] - public string AirlineLegFareBaseCode { get; set; } - - /// - /// The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros. - /// - /// The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.leg.flight_number", EmitDefaultValue = false)] - public string AirlineLegFlightNumber { get; set; } - - /// - /// A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character - /// - /// A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character - [DataMember(Name = "airline.leg.stop_over_code", EmitDefaultValue = false)] - public string AirlineLegStopOverCode { get; set; } - - /// - /// The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 - /// - /// The passenger's date of birth. Date format: `yyyy-MM-dd` * minLength: 10 * maxLength: 10 - [DataMember(Name = "airline.passenger.date_of_birth", EmitDefaultValue = false)] - public string AirlinePassengerDateOfBirth { get; set; } - - /// - /// The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII - /// - /// The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII - [DataMember(Name = "airline.passenger.first_name", EmitDefaultValue = false)] - public string AirlinePassengerFirstName { get; set; } - - /// - /// The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII - /// - /// The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII - [DataMember(Name = "airline.passenger.last_name", EmitDefaultValue = false)] - public string AirlinePassengerLastName { get; set; } - - /// - /// The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters - /// - /// The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters - [DataMember(Name = "airline.passenger.phone_number", EmitDefaultValue = false)] - public string AirlinePassengerPhoneNumber { get; set; } - - /// - /// The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters - /// - /// The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters - [DataMember(Name = "airline.passenger.traveller_type", EmitDefaultValue = false)] - public string AirlinePassengerTravellerType { get; set; } - - /// - /// The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros. - /// - /// The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.passenger_name", IsRequired = false, EmitDefaultValue = false)] - public string AirlinePassengerName { get; set; } - - /// - /// The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters - /// - /// The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters - [DataMember(Name = "airline.ticket_issue_address", EmitDefaultValue = false)] - public string AirlineTicketIssueAddress { get; set; } - - /// - /// The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros. - /// - /// The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.ticket_number", EmitDefaultValue = false)] - public string AirlineTicketNumber { get; set; } - - /// - /// The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros. - /// - /// The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.travel_agency_code", EmitDefaultValue = false)] - public string AirlineTravelAgencyCode { get; set; } - - /// - /// The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros. - /// - /// The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not be all spaces * Must not be all zeros. - [DataMember(Name = "airline.travel_agency_name", EmitDefaultValue = false)] - public string AirlineTravelAgencyName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataAirline {\n"); - sb.Append(" AirlineAgencyInvoiceNumber: ").Append(AirlineAgencyInvoiceNumber).Append("\n"); - sb.Append(" AirlineAgencyPlanName: ").Append(AirlineAgencyPlanName).Append("\n"); - sb.Append(" AirlineAirlineCode: ").Append(AirlineAirlineCode).Append("\n"); - sb.Append(" AirlineAirlineDesignatorCode: ").Append(AirlineAirlineDesignatorCode).Append("\n"); - sb.Append(" AirlineBoardingFee: ").Append(AirlineBoardingFee).Append("\n"); - sb.Append(" AirlineComputerizedReservationSystem: ").Append(AirlineComputerizedReservationSystem).Append("\n"); - sb.Append(" AirlineCustomerReferenceNumber: ").Append(AirlineCustomerReferenceNumber).Append("\n"); - sb.Append(" AirlineDocumentType: ").Append(AirlineDocumentType).Append("\n"); - sb.Append(" AirlineFlightDate: ").Append(AirlineFlightDate).Append("\n"); - sb.Append(" AirlineIssueDate: ").Append(AirlineIssueDate).Append("\n"); - sb.Append(" AirlineLegCarrierCode: ").Append(AirlineLegCarrierCode).Append("\n"); - sb.Append(" AirlineLegClassOfTravel: ").Append(AirlineLegClassOfTravel).Append("\n"); - sb.Append(" AirlineLegDateOfTravel: ").Append(AirlineLegDateOfTravel).Append("\n"); - sb.Append(" AirlineLegDepartAirport: ").Append(AirlineLegDepartAirport).Append("\n"); - sb.Append(" AirlineLegDepartTax: ").Append(AirlineLegDepartTax).Append("\n"); - sb.Append(" AirlineLegDestinationCode: ").Append(AirlineLegDestinationCode).Append("\n"); - sb.Append(" AirlineLegFareBaseCode: ").Append(AirlineLegFareBaseCode).Append("\n"); - sb.Append(" AirlineLegFlightNumber: ").Append(AirlineLegFlightNumber).Append("\n"); - sb.Append(" AirlineLegStopOverCode: ").Append(AirlineLegStopOverCode).Append("\n"); - sb.Append(" AirlinePassengerDateOfBirth: ").Append(AirlinePassengerDateOfBirth).Append("\n"); - sb.Append(" AirlinePassengerFirstName: ").Append(AirlinePassengerFirstName).Append("\n"); - sb.Append(" AirlinePassengerLastName: ").Append(AirlinePassengerLastName).Append("\n"); - sb.Append(" AirlinePassengerPhoneNumber: ").Append(AirlinePassengerPhoneNumber).Append("\n"); - sb.Append(" AirlinePassengerTravellerType: ").Append(AirlinePassengerTravellerType).Append("\n"); - sb.Append(" AirlinePassengerName: ").Append(AirlinePassengerName).Append("\n"); - sb.Append(" AirlineTicketIssueAddress: ").Append(AirlineTicketIssueAddress).Append("\n"); - sb.Append(" AirlineTicketNumber: ").Append(AirlineTicketNumber).Append("\n"); - sb.Append(" AirlineTravelAgencyCode: ").Append(AirlineTravelAgencyCode).Append("\n"); - sb.Append(" AirlineTravelAgencyName: ").Append(AirlineTravelAgencyName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataAirline); - } - - /// - /// Returns true if AdditionalDataAirline instances are equal - /// - /// Instance of AdditionalDataAirline to be compared - /// Boolean - public bool Equals(AdditionalDataAirline input) - { - if (input == null) - { - return false; - } - return - ( - this.AirlineAgencyInvoiceNumber == input.AirlineAgencyInvoiceNumber || - (this.AirlineAgencyInvoiceNumber != null && - this.AirlineAgencyInvoiceNumber.Equals(input.AirlineAgencyInvoiceNumber)) - ) && - ( - this.AirlineAgencyPlanName == input.AirlineAgencyPlanName || - (this.AirlineAgencyPlanName != null && - this.AirlineAgencyPlanName.Equals(input.AirlineAgencyPlanName)) - ) && - ( - this.AirlineAirlineCode == input.AirlineAirlineCode || - (this.AirlineAirlineCode != null && - this.AirlineAirlineCode.Equals(input.AirlineAirlineCode)) - ) && - ( - this.AirlineAirlineDesignatorCode == input.AirlineAirlineDesignatorCode || - (this.AirlineAirlineDesignatorCode != null && - this.AirlineAirlineDesignatorCode.Equals(input.AirlineAirlineDesignatorCode)) - ) && - ( - this.AirlineBoardingFee == input.AirlineBoardingFee || - (this.AirlineBoardingFee != null && - this.AirlineBoardingFee.Equals(input.AirlineBoardingFee)) - ) && - ( - this.AirlineComputerizedReservationSystem == input.AirlineComputerizedReservationSystem || - (this.AirlineComputerizedReservationSystem != null && - this.AirlineComputerizedReservationSystem.Equals(input.AirlineComputerizedReservationSystem)) - ) && - ( - this.AirlineCustomerReferenceNumber == input.AirlineCustomerReferenceNumber || - (this.AirlineCustomerReferenceNumber != null && - this.AirlineCustomerReferenceNumber.Equals(input.AirlineCustomerReferenceNumber)) - ) && - ( - this.AirlineDocumentType == input.AirlineDocumentType || - (this.AirlineDocumentType != null && - this.AirlineDocumentType.Equals(input.AirlineDocumentType)) - ) && - ( - this.AirlineFlightDate == input.AirlineFlightDate || - (this.AirlineFlightDate != null && - this.AirlineFlightDate.Equals(input.AirlineFlightDate)) - ) && - ( - this.AirlineIssueDate == input.AirlineIssueDate || - (this.AirlineIssueDate != null && - this.AirlineIssueDate.Equals(input.AirlineIssueDate)) - ) && - ( - this.AirlineLegCarrierCode == input.AirlineLegCarrierCode || - (this.AirlineLegCarrierCode != null && - this.AirlineLegCarrierCode.Equals(input.AirlineLegCarrierCode)) - ) && - ( - this.AirlineLegClassOfTravel == input.AirlineLegClassOfTravel || - (this.AirlineLegClassOfTravel != null && - this.AirlineLegClassOfTravel.Equals(input.AirlineLegClassOfTravel)) - ) && - ( - this.AirlineLegDateOfTravel == input.AirlineLegDateOfTravel || - (this.AirlineLegDateOfTravel != null && - this.AirlineLegDateOfTravel.Equals(input.AirlineLegDateOfTravel)) - ) && - ( - this.AirlineLegDepartAirport == input.AirlineLegDepartAirport || - (this.AirlineLegDepartAirport != null && - this.AirlineLegDepartAirport.Equals(input.AirlineLegDepartAirport)) - ) && - ( - this.AirlineLegDepartTax == input.AirlineLegDepartTax || - (this.AirlineLegDepartTax != null && - this.AirlineLegDepartTax.Equals(input.AirlineLegDepartTax)) - ) && - ( - this.AirlineLegDestinationCode == input.AirlineLegDestinationCode || - (this.AirlineLegDestinationCode != null && - this.AirlineLegDestinationCode.Equals(input.AirlineLegDestinationCode)) - ) && - ( - this.AirlineLegFareBaseCode == input.AirlineLegFareBaseCode || - (this.AirlineLegFareBaseCode != null && - this.AirlineLegFareBaseCode.Equals(input.AirlineLegFareBaseCode)) - ) && - ( - this.AirlineLegFlightNumber == input.AirlineLegFlightNumber || - (this.AirlineLegFlightNumber != null && - this.AirlineLegFlightNumber.Equals(input.AirlineLegFlightNumber)) - ) && - ( - this.AirlineLegStopOverCode == input.AirlineLegStopOverCode || - (this.AirlineLegStopOverCode != null && - this.AirlineLegStopOverCode.Equals(input.AirlineLegStopOverCode)) - ) && - ( - this.AirlinePassengerDateOfBirth == input.AirlinePassengerDateOfBirth || - (this.AirlinePassengerDateOfBirth != null && - this.AirlinePassengerDateOfBirth.Equals(input.AirlinePassengerDateOfBirth)) - ) && - ( - this.AirlinePassengerFirstName == input.AirlinePassengerFirstName || - (this.AirlinePassengerFirstName != null && - this.AirlinePassengerFirstName.Equals(input.AirlinePassengerFirstName)) - ) && - ( - this.AirlinePassengerLastName == input.AirlinePassengerLastName || - (this.AirlinePassengerLastName != null && - this.AirlinePassengerLastName.Equals(input.AirlinePassengerLastName)) - ) && - ( - this.AirlinePassengerPhoneNumber == input.AirlinePassengerPhoneNumber || - (this.AirlinePassengerPhoneNumber != null && - this.AirlinePassengerPhoneNumber.Equals(input.AirlinePassengerPhoneNumber)) - ) && - ( - this.AirlinePassengerTravellerType == input.AirlinePassengerTravellerType || - (this.AirlinePassengerTravellerType != null && - this.AirlinePassengerTravellerType.Equals(input.AirlinePassengerTravellerType)) - ) && - ( - this.AirlinePassengerName == input.AirlinePassengerName || - (this.AirlinePassengerName != null && - this.AirlinePassengerName.Equals(input.AirlinePassengerName)) - ) && - ( - this.AirlineTicketIssueAddress == input.AirlineTicketIssueAddress || - (this.AirlineTicketIssueAddress != null && - this.AirlineTicketIssueAddress.Equals(input.AirlineTicketIssueAddress)) - ) && - ( - this.AirlineTicketNumber == input.AirlineTicketNumber || - (this.AirlineTicketNumber != null && - this.AirlineTicketNumber.Equals(input.AirlineTicketNumber)) - ) && - ( - this.AirlineTravelAgencyCode == input.AirlineTravelAgencyCode || - (this.AirlineTravelAgencyCode != null && - this.AirlineTravelAgencyCode.Equals(input.AirlineTravelAgencyCode)) - ) && - ( - this.AirlineTravelAgencyName == input.AirlineTravelAgencyName || - (this.AirlineTravelAgencyName != null && - this.AirlineTravelAgencyName.Equals(input.AirlineTravelAgencyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AirlineAgencyInvoiceNumber != null) - { - hashCode = (hashCode * 59) + this.AirlineAgencyInvoiceNumber.GetHashCode(); - } - if (this.AirlineAgencyPlanName != null) - { - hashCode = (hashCode * 59) + this.AirlineAgencyPlanName.GetHashCode(); - } - if (this.AirlineAirlineCode != null) - { - hashCode = (hashCode * 59) + this.AirlineAirlineCode.GetHashCode(); - } - if (this.AirlineAirlineDesignatorCode != null) - { - hashCode = (hashCode * 59) + this.AirlineAirlineDesignatorCode.GetHashCode(); - } - if (this.AirlineBoardingFee != null) - { - hashCode = (hashCode * 59) + this.AirlineBoardingFee.GetHashCode(); - } - if (this.AirlineComputerizedReservationSystem != null) - { - hashCode = (hashCode * 59) + this.AirlineComputerizedReservationSystem.GetHashCode(); - } - if (this.AirlineCustomerReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.AirlineCustomerReferenceNumber.GetHashCode(); - } - if (this.AirlineDocumentType != null) - { - hashCode = (hashCode * 59) + this.AirlineDocumentType.GetHashCode(); - } - if (this.AirlineFlightDate != null) - { - hashCode = (hashCode * 59) + this.AirlineFlightDate.GetHashCode(); - } - if (this.AirlineIssueDate != null) - { - hashCode = (hashCode * 59) + this.AirlineIssueDate.GetHashCode(); - } - if (this.AirlineLegCarrierCode != null) - { - hashCode = (hashCode * 59) + this.AirlineLegCarrierCode.GetHashCode(); - } - if (this.AirlineLegClassOfTravel != null) - { - hashCode = (hashCode * 59) + this.AirlineLegClassOfTravel.GetHashCode(); - } - if (this.AirlineLegDateOfTravel != null) - { - hashCode = (hashCode * 59) + this.AirlineLegDateOfTravel.GetHashCode(); - } - if (this.AirlineLegDepartAirport != null) - { - hashCode = (hashCode * 59) + this.AirlineLegDepartAirport.GetHashCode(); - } - if (this.AirlineLegDepartTax != null) - { - hashCode = (hashCode * 59) + this.AirlineLegDepartTax.GetHashCode(); - } - if (this.AirlineLegDestinationCode != null) - { - hashCode = (hashCode * 59) + this.AirlineLegDestinationCode.GetHashCode(); - } - if (this.AirlineLegFareBaseCode != null) - { - hashCode = (hashCode * 59) + this.AirlineLegFareBaseCode.GetHashCode(); - } - if (this.AirlineLegFlightNumber != null) - { - hashCode = (hashCode * 59) + this.AirlineLegFlightNumber.GetHashCode(); - } - if (this.AirlineLegStopOverCode != null) - { - hashCode = (hashCode * 59) + this.AirlineLegStopOverCode.GetHashCode(); - } - if (this.AirlinePassengerDateOfBirth != null) - { - hashCode = (hashCode * 59) + this.AirlinePassengerDateOfBirth.GetHashCode(); - } - if (this.AirlinePassengerFirstName != null) - { - hashCode = (hashCode * 59) + this.AirlinePassengerFirstName.GetHashCode(); - } - if (this.AirlinePassengerLastName != null) - { - hashCode = (hashCode * 59) + this.AirlinePassengerLastName.GetHashCode(); - } - if (this.AirlinePassengerPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.AirlinePassengerPhoneNumber.GetHashCode(); - } - if (this.AirlinePassengerTravellerType != null) - { - hashCode = (hashCode * 59) + this.AirlinePassengerTravellerType.GetHashCode(); - } - if (this.AirlinePassengerName != null) - { - hashCode = (hashCode * 59) + this.AirlinePassengerName.GetHashCode(); - } - if (this.AirlineTicketIssueAddress != null) - { - hashCode = (hashCode * 59) + this.AirlineTicketIssueAddress.GetHashCode(); - } - if (this.AirlineTicketNumber != null) - { - hashCode = (hashCode * 59) + this.AirlineTicketNumber.GetHashCode(); - } - if (this.AirlineTravelAgencyCode != null) - { - hashCode = (hashCode * 59) + this.AirlineTravelAgencyCode.GetHashCode(); - } - if (this.AirlineTravelAgencyName != null) - { - hashCode = (hashCode * 59) + this.AirlineTravelAgencyName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataCarRental.cs b/Adyen/Model/Checkout/AdditionalDataCarRental.cs deleted file mode 100644 index 2b7a8b7e7..000000000 --- a/Adyen/Model/Checkout/AdditionalDataCarRental.cs +++ /dev/null @@ -1,547 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataCarRental - /// - [DataContract(Name = "AdditionalDataCarRental")] - public partial class AdditionalDataCarRental : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The pick-up date. * Date format: `yyyyMMdd`. - /// The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros.. - /// Number of days for which the car is being rented. * Format: Numeric * maxLength: 4 * Must not be all spaces. - /// Any fuel charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12. - /// Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces *Must not be all zeros.. - /// The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros.. - /// The country where the car is rented, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2. - /// The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces *Must not be all zeros.. - /// Indicates if the customer didn't pick up their rental car. * Y - Customer did not pick up their car * N - Not applicable. - /// The charge for not returning a car to the original rental location, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 12. - /// The daily rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Alphanumeric * maxLength: 12. - /// Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate. - /// The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces *Must not be all zeros.. - /// The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces *Must not be all zeros.. - /// The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces *Must not be all zeros.. - /// The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros.. - /// The country where the car must be returned, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2. - /// The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8. - /// The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces *Must not be all zeros.. - /// The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces *Must not be all zeros.. - /// Indicates if the goods or services were tax-exempt, or if tax was not paid on them. Values: * Y - Goods or services were tax exempt * N - Tax was not collected. - /// Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 4. - /// Indicates what market-specific dataset will be submitted or is being submitted. Value should be 'A' for car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1. - public AdditionalDataCarRental(string carRentalCheckOutDate = default(string), string carRentalCustomerServiceTollFreeNumber = default(string), string carRentalDaysRented = default(string), string carRentalFuelCharges = default(string), string carRentalInsuranceCharges = default(string), string carRentalLocationCity = default(string), string carRentalLocationCountry = default(string), string carRentalLocationStateProvince = default(string), string carRentalNoShowIndicator = default(string), string carRentalOneWayDropOffCharges = default(string), string carRentalRate = default(string), string carRentalRateIndicator = default(string), string carRentalRentalAgreementNumber = default(string), string carRentalRentalClassId = default(string), string carRentalRenterName = default(string), string carRentalReturnCity = default(string), string carRentalReturnCountry = default(string), string carRentalReturnDate = default(string), string carRentalReturnLocationId = default(string), string carRentalReturnStateProvince = default(string), string carRentalTaxExemptIndicator = default(string), string travelEntertainmentAuthDataDuration = default(string), string travelEntertainmentAuthDataMarket = default(string)) - { - this.CarRentalCheckOutDate = carRentalCheckOutDate; - this.CarRentalCustomerServiceTollFreeNumber = carRentalCustomerServiceTollFreeNumber; - this.CarRentalDaysRented = carRentalDaysRented; - this.CarRentalFuelCharges = carRentalFuelCharges; - this.CarRentalInsuranceCharges = carRentalInsuranceCharges; - this.CarRentalLocationCity = carRentalLocationCity; - this.CarRentalLocationCountry = carRentalLocationCountry; - this.CarRentalLocationStateProvince = carRentalLocationStateProvince; - this.CarRentalNoShowIndicator = carRentalNoShowIndicator; - this.CarRentalOneWayDropOffCharges = carRentalOneWayDropOffCharges; - this.CarRentalRate = carRentalRate; - this.CarRentalRateIndicator = carRentalRateIndicator; - this.CarRentalRentalAgreementNumber = carRentalRentalAgreementNumber; - this.CarRentalRentalClassId = carRentalRentalClassId; - this.CarRentalRenterName = carRentalRenterName; - this.CarRentalReturnCity = carRentalReturnCity; - this.CarRentalReturnCountry = carRentalReturnCountry; - this.CarRentalReturnDate = carRentalReturnDate; - this.CarRentalReturnLocationId = carRentalReturnLocationId; - this.CarRentalReturnStateProvince = carRentalReturnStateProvince; - this.CarRentalTaxExemptIndicator = carRentalTaxExemptIndicator; - this.TravelEntertainmentAuthDataDuration = travelEntertainmentAuthDataDuration; - this.TravelEntertainmentAuthDataMarket = travelEntertainmentAuthDataMarket; - } - - /// - /// The pick-up date. * Date format: `yyyyMMdd` - /// - /// The pick-up date. * Date format: `yyyyMMdd` - [DataMember(Name = "carRental.checkOutDate", EmitDefaultValue = false)] - public string CarRentalCheckOutDate { get; set; } - - /// - /// The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. - /// - /// The customer service phone number of the car rental company. * Format: Alphanumeric * maxLength: 17 * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - *Must not be all zeros. - [DataMember(Name = "carRental.customerServiceTollFreeNumber", EmitDefaultValue = false)] - public string CarRentalCustomerServiceTollFreeNumber { get; set; } - - /// - /// Number of days for which the car is being rented. * Format: Numeric * maxLength: 4 * Must not be all spaces - /// - /// Number of days for which the car is being rented. * Format: Numeric * maxLength: 4 * Must not be all spaces - [DataMember(Name = "carRental.daysRented", EmitDefaultValue = false)] - public string CarRentalDaysRented { get; set; } - - /// - /// Any fuel charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 - /// - /// Any fuel charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 - [DataMember(Name = "carRental.fuelCharges", EmitDefaultValue = false)] - public string CarRentalFuelCharges { get; set; } - - /// - /// Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces *Must not be all zeros. - /// - /// Any insurance charges associated with the rental, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Numeric * maxLength: 12 * Must not be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.insuranceCharges", EmitDefaultValue = false)] - public string CarRentalInsuranceCharges { get; set; } - - /// - /// The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. - /// - /// The city where the car is rented. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.locationCity", EmitDefaultValue = false)] - public string CarRentalLocationCity { get; set; } - - /// - /// The country where the car is rented, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 - /// - /// The country where the car is rented, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 - [DataMember(Name = "carRental.locationCountry", EmitDefaultValue = false)] - public string CarRentalLocationCountry { get; set; } - - /// - /// The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces *Must not be all zeros. - /// - /// The state or province where the car is rented. * Format: Alphanumeric * maxLength: 2 * Must not start with a space or be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.locationStateProvince", EmitDefaultValue = false)] - public string CarRentalLocationStateProvince { get; set; } - - /// - /// Indicates if the customer didn't pick up their rental car. * Y - Customer did not pick up their car * N - Not applicable - /// - /// Indicates if the customer didn't pick up their rental car. * Y - Customer did not pick up their car * N - Not applicable - [DataMember(Name = "carRental.noShowIndicator", EmitDefaultValue = false)] - public string CarRentalNoShowIndicator { get; set; } - - /// - /// The charge for not returning a car to the original rental location, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 12 - /// - /// The charge for not returning a car to the original rental location, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 12 - [DataMember(Name = "carRental.oneWayDropOffCharges", EmitDefaultValue = false)] - public string CarRentalOneWayDropOffCharges { get; set; } - - /// - /// The daily rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Alphanumeric * maxLength: 12 - /// - /// The daily rental rate, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: Alphanumeric * maxLength: 12 - [DataMember(Name = "carRental.rate", EmitDefaultValue = false)] - public string CarRentalRate { get; set; } - - /// - /// Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate - /// - /// Specifies whether the given rate is applied daily or weekly. * D - Daily rate * W - Weekly rate - [DataMember(Name = "carRental.rateIndicator", EmitDefaultValue = false)] - public string CarRentalRateIndicator { get; set; } - - /// - /// The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces *Must not be all zeros. - /// - /// The rental agreement number for the car rental. * Format: Alphanumeric * maxLength: 9 * Must not start with a space or be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.rentalAgreementNumber", EmitDefaultValue = false)] - public string CarRentalRentalAgreementNumber { get; set; } - - /// - /// The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces *Must not be all zeros. - /// - /// The classification of the rental car. * Format: Alphanumeric * maxLength: 4 * Must not start with a space or be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.rentalClassId", EmitDefaultValue = false)] - public string CarRentalRentalClassId { get; set; } - - /// - /// The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces *Must not be all zeros. - /// - /// The name of the person renting the car. * Format: Alphanumeric * maxLength: 26 * If you send more than 26 characters, the name is truncated * Must not start with a space or be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.renterName", EmitDefaultValue = false)] - public string CarRentalRenterName { get; set; } - - /// - /// The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. - /// - /// The city where the car must be returned. * Format: Alphanumeric * maxLength: 18 * Must not start with a space or be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.returnCity", EmitDefaultValue = false)] - public string CarRentalReturnCity { get; set; } - - /// - /// The country where the car must be returned, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 - /// - /// The country where the car must be returned, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. * Format: Alphanumeric * maxLength: 2 - [DataMember(Name = "carRental.returnCountry", EmitDefaultValue = false)] - public string CarRentalReturnCountry { get; set; } - - /// - /// The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 - /// - /// The last date to return the car by. * Date format: `yyyyMMdd` * maxLength: 8 - [DataMember(Name = "carRental.returnDate", EmitDefaultValue = false)] - public string CarRentalReturnDate { get; set; } - - /// - /// The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces *Must not be all zeros. - /// - /// The agency code, phone number, or address abbreviation * Format: Alphanumeric * maxLength: 10 * Must not start with a space or be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.returnLocationId", EmitDefaultValue = false)] - public string CarRentalReturnLocationId { get; set; } - - /// - /// The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces *Must not be all zeros. - /// - /// The state or province where the car must be returned. * Format: Alphanumeric * maxLength: 3 * Must not start with a space or be all spaces *Must not be all zeros. - [DataMember(Name = "carRental.returnStateProvince", EmitDefaultValue = false)] - public string CarRentalReturnStateProvince { get; set; } - - /// - /// Indicates if the goods or services were tax-exempt, or if tax was not paid on them. Values: * Y - Goods or services were tax exempt * N - Tax was not collected - /// - /// Indicates if the goods or services were tax-exempt, or if tax was not paid on them. Values: * Y - Goods or services were tax exempt * N - Tax was not collected - [DataMember(Name = "carRental.taxExemptIndicator", EmitDefaultValue = false)] - public string CarRentalTaxExemptIndicator { get; set; } - - /// - /// Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 4 - /// - /// Number of days the car is rented for. This should be included in the auth message. * Format: Numeric * maxLength: 4 - [DataMember(Name = "travelEntertainmentAuthData.duration", EmitDefaultValue = false)] - public string TravelEntertainmentAuthDataDuration { get; set; } - - /// - /// Indicates what market-specific dataset will be submitted or is being submitted. Value should be 'A' for car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 - /// - /// Indicates what market-specific dataset will be submitted or is being submitted. Value should be 'A' for car rental. This should be included in the auth message. * Format: Alphanumeric * maxLength: 1 - [DataMember(Name = "travelEntertainmentAuthData.market", EmitDefaultValue = false)] - public string TravelEntertainmentAuthDataMarket { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataCarRental {\n"); - sb.Append(" CarRentalCheckOutDate: ").Append(CarRentalCheckOutDate).Append("\n"); - sb.Append(" CarRentalCustomerServiceTollFreeNumber: ").Append(CarRentalCustomerServiceTollFreeNumber).Append("\n"); - sb.Append(" CarRentalDaysRented: ").Append(CarRentalDaysRented).Append("\n"); - sb.Append(" CarRentalFuelCharges: ").Append(CarRentalFuelCharges).Append("\n"); - sb.Append(" CarRentalInsuranceCharges: ").Append(CarRentalInsuranceCharges).Append("\n"); - sb.Append(" CarRentalLocationCity: ").Append(CarRentalLocationCity).Append("\n"); - sb.Append(" CarRentalLocationCountry: ").Append(CarRentalLocationCountry).Append("\n"); - sb.Append(" CarRentalLocationStateProvince: ").Append(CarRentalLocationStateProvince).Append("\n"); - sb.Append(" CarRentalNoShowIndicator: ").Append(CarRentalNoShowIndicator).Append("\n"); - sb.Append(" CarRentalOneWayDropOffCharges: ").Append(CarRentalOneWayDropOffCharges).Append("\n"); - sb.Append(" CarRentalRate: ").Append(CarRentalRate).Append("\n"); - sb.Append(" CarRentalRateIndicator: ").Append(CarRentalRateIndicator).Append("\n"); - sb.Append(" CarRentalRentalAgreementNumber: ").Append(CarRentalRentalAgreementNumber).Append("\n"); - sb.Append(" CarRentalRentalClassId: ").Append(CarRentalRentalClassId).Append("\n"); - sb.Append(" CarRentalRenterName: ").Append(CarRentalRenterName).Append("\n"); - sb.Append(" CarRentalReturnCity: ").Append(CarRentalReturnCity).Append("\n"); - sb.Append(" CarRentalReturnCountry: ").Append(CarRentalReturnCountry).Append("\n"); - sb.Append(" CarRentalReturnDate: ").Append(CarRentalReturnDate).Append("\n"); - sb.Append(" CarRentalReturnLocationId: ").Append(CarRentalReturnLocationId).Append("\n"); - sb.Append(" CarRentalReturnStateProvince: ").Append(CarRentalReturnStateProvince).Append("\n"); - sb.Append(" CarRentalTaxExemptIndicator: ").Append(CarRentalTaxExemptIndicator).Append("\n"); - sb.Append(" TravelEntertainmentAuthDataDuration: ").Append(TravelEntertainmentAuthDataDuration).Append("\n"); - sb.Append(" TravelEntertainmentAuthDataMarket: ").Append(TravelEntertainmentAuthDataMarket).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataCarRental); - } - - /// - /// Returns true if AdditionalDataCarRental instances are equal - /// - /// Instance of AdditionalDataCarRental to be compared - /// Boolean - public bool Equals(AdditionalDataCarRental input) - { - if (input == null) - { - return false; - } - return - ( - this.CarRentalCheckOutDate == input.CarRentalCheckOutDate || - (this.CarRentalCheckOutDate != null && - this.CarRentalCheckOutDate.Equals(input.CarRentalCheckOutDate)) - ) && - ( - this.CarRentalCustomerServiceTollFreeNumber == input.CarRentalCustomerServiceTollFreeNumber || - (this.CarRentalCustomerServiceTollFreeNumber != null && - this.CarRentalCustomerServiceTollFreeNumber.Equals(input.CarRentalCustomerServiceTollFreeNumber)) - ) && - ( - this.CarRentalDaysRented == input.CarRentalDaysRented || - (this.CarRentalDaysRented != null && - this.CarRentalDaysRented.Equals(input.CarRentalDaysRented)) - ) && - ( - this.CarRentalFuelCharges == input.CarRentalFuelCharges || - (this.CarRentalFuelCharges != null && - this.CarRentalFuelCharges.Equals(input.CarRentalFuelCharges)) - ) && - ( - this.CarRentalInsuranceCharges == input.CarRentalInsuranceCharges || - (this.CarRentalInsuranceCharges != null && - this.CarRentalInsuranceCharges.Equals(input.CarRentalInsuranceCharges)) - ) && - ( - this.CarRentalLocationCity == input.CarRentalLocationCity || - (this.CarRentalLocationCity != null && - this.CarRentalLocationCity.Equals(input.CarRentalLocationCity)) - ) && - ( - this.CarRentalLocationCountry == input.CarRentalLocationCountry || - (this.CarRentalLocationCountry != null && - this.CarRentalLocationCountry.Equals(input.CarRentalLocationCountry)) - ) && - ( - this.CarRentalLocationStateProvince == input.CarRentalLocationStateProvince || - (this.CarRentalLocationStateProvince != null && - this.CarRentalLocationStateProvince.Equals(input.CarRentalLocationStateProvince)) - ) && - ( - this.CarRentalNoShowIndicator == input.CarRentalNoShowIndicator || - (this.CarRentalNoShowIndicator != null && - this.CarRentalNoShowIndicator.Equals(input.CarRentalNoShowIndicator)) - ) && - ( - this.CarRentalOneWayDropOffCharges == input.CarRentalOneWayDropOffCharges || - (this.CarRentalOneWayDropOffCharges != null && - this.CarRentalOneWayDropOffCharges.Equals(input.CarRentalOneWayDropOffCharges)) - ) && - ( - this.CarRentalRate == input.CarRentalRate || - (this.CarRentalRate != null && - this.CarRentalRate.Equals(input.CarRentalRate)) - ) && - ( - this.CarRentalRateIndicator == input.CarRentalRateIndicator || - (this.CarRentalRateIndicator != null && - this.CarRentalRateIndicator.Equals(input.CarRentalRateIndicator)) - ) && - ( - this.CarRentalRentalAgreementNumber == input.CarRentalRentalAgreementNumber || - (this.CarRentalRentalAgreementNumber != null && - this.CarRentalRentalAgreementNumber.Equals(input.CarRentalRentalAgreementNumber)) - ) && - ( - this.CarRentalRentalClassId == input.CarRentalRentalClassId || - (this.CarRentalRentalClassId != null && - this.CarRentalRentalClassId.Equals(input.CarRentalRentalClassId)) - ) && - ( - this.CarRentalRenterName == input.CarRentalRenterName || - (this.CarRentalRenterName != null && - this.CarRentalRenterName.Equals(input.CarRentalRenterName)) - ) && - ( - this.CarRentalReturnCity == input.CarRentalReturnCity || - (this.CarRentalReturnCity != null && - this.CarRentalReturnCity.Equals(input.CarRentalReturnCity)) - ) && - ( - this.CarRentalReturnCountry == input.CarRentalReturnCountry || - (this.CarRentalReturnCountry != null && - this.CarRentalReturnCountry.Equals(input.CarRentalReturnCountry)) - ) && - ( - this.CarRentalReturnDate == input.CarRentalReturnDate || - (this.CarRentalReturnDate != null && - this.CarRentalReturnDate.Equals(input.CarRentalReturnDate)) - ) && - ( - this.CarRentalReturnLocationId == input.CarRentalReturnLocationId || - (this.CarRentalReturnLocationId != null && - this.CarRentalReturnLocationId.Equals(input.CarRentalReturnLocationId)) - ) && - ( - this.CarRentalReturnStateProvince == input.CarRentalReturnStateProvince || - (this.CarRentalReturnStateProvince != null && - this.CarRentalReturnStateProvince.Equals(input.CarRentalReturnStateProvince)) - ) && - ( - this.CarRentalTaxExemptIndicator == input.CarRentalTaxExemptIndicator || - (this.CarRentalTaxExemptIndicator != null && - this.CarRentalTaxExemptIndicator.Equals(input.CarRentalTaxExemptIndicator)) - ) && - ( - this.TravelEntertainmentAuthDataDuration == input.TravelEntertainmentAuthDataDuration || - (this.TravelEntertainmentAuthDataDuration != null && - this.TravelEntertainmentAuthDataDuration.Equals(input.TravelEntertainmentAuthDataDuration)) - ) && - ( - this.TravelEntertainmentAuthDataMarket == input.TravelEntertainmentAuthDataMarket || - (this.TravelEntertainmentAuthDataMarket != null && - this.TravelEntertainmentAuthDataMarket.Equals(input.TravelEntertainmentAuthDataMarket)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CarRentalCheckOutDate != null) - { - hashCode = (hashCode * 59) + this.CarRentalCheckOutDate.GetHashCode(); - } - if (this.CarRentalCustomerServiceTollFreeNumber != null) - { - hashCode = (hashCode * 59) + this.CarRentalCustomerServiceTollFreeNumber.GetHashCode(); - } - if (this.CarRentalDaysRented != null) - { - hashCode = (hashCode * 59) + this.CarRentalDaysRented.GetHashCode(); - } - if (this.CarRentalFuelCharges != null) - { - hashCode = (hashCode * 59) + this.CarRentalFuelCharges.GetHashCode(); - } - if (this.CarRentalInsuranceCharges != null) - { - hashCode = (hashCode * 59) + this.CarRentalInsuranceCharges.GetHashCode(); - } - if (this.CarRentalLocationCity != null) - { - hashCode = (hashCode * 59) + this.CarRentalLocationCity.GetHashCode(); - } - if (this.CarRentalLocationCountry != null) - { - hashCode = (hashCode * 59) + this.CarRentalLocationCountry.GetHashCode(); - } - if (this.CarRentalLocationStateProvince != null) - { - hashCode = (hashCode * 59) + this.CarRentalLocationStateProvince.GetHashCode(); - } - if (this.CarRentalNoShowIndicator != null) - { - hashCode = (hashCode * 59) + this.CarRentalNoShowIndicator.GetHashCode(); - } - if (this.CarRentalOneWayDropOffCharges != null) - { - hashCode = (hashCode * 59) + this.CarRentalOneWayDropOffCharges.GetHashCode(); - } - if (this.CarRentalRate != null) - { - hashCode = (hashCode * 59) + this.CarRentalRate.GetHashCode(); - } - if (this.CarRentalRateIndicator != null) - { - hashCode = (hashCode * 59) + this.CarRentalRateIndicator.GetHashCode(); - } - if (this.CarRentalRentalAgreementNumber != null) - { - hashCode = (hashCode * 59) + this.CarRentalRentalAgreementNumber.GetHashCode(); - } - if (this.CarRentalRentalClassId != null) - { - hashCode = (hashCode * 59) + this.CarRentalRentalClassId.GetHashCode(); - } - if (this.CarRentalRenterName != null) - { - hashCode = (hashCode * 59) + this.CarRentalRenterName.GetHashCode(); - } - if (this.CarRentalReturnCity != null) - { - hashCode = (hashCode * 59) + this.CarRentalReturnCity.GetHashCode(); - } - if (this.CarRentalReturnCountry != null) - { - hashCode = (hashCode * 59) + this.CarRentalReturnCountry.GetHashCode(); - } - if (this.CarRentalReturnDate != null) - { - hashCode = (hashCode * 59) + this.CarRentalReturnDate.GetHashCode(); - } - if (this.CarRentalReturnLocationId != null) - { - hashCode = (hashCode * 59) + this.CarRentalReturnLocationId.GetHashCode(); - } - if (this.CarRentalReturnStateProvince != null) - { - hashCode = (hashCode * 59) + this.CarRentalReturnStateProvince.GetHashCode(); - } - if (this.CarRentalTaxExemptIndicator != null) - { - hashCode = (hashCode * 59) + this.CarRentalTaxExemptIndicator.GetHashCode(); - } - if (this.TravelEntertainmentAuthDataDuration != null) - { - hashCode = (hashCode * 59) + this.TravelEntertainmentAuthDataDuration.GetHashCode(); - } - if (this.TravelEntertainmentAuthDataMarket != null) - { - hashCode = (hashCode * 59) + this.TravelEntertainmentAuthDataMarket.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataCommon.cs b/Adyen/Model/Checkout/AdditionalDataCommon.cs deleted file mode 100644 index 3d17a1c2c..000000000 --- a/Adyen/Model/Checkout/AdditionalDataCommon.cs +++ /dev/null @@ -1,526 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataCommon - /// - [DataContract(Name = "AdditionalDataCommon")] - public partial class AdditionalDataCommon : IEquatable, IValidatableObject - { - /// - /// In case of [asynchronous authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#adjust-authorisation), this field denotes why the additional payment is made. Possible values: * **NoShow**: An incremental charge is carried out because of a no-show for a guaranteed reservation. * **DelayedCharge**: An incremental charge is carried out to process an additional payment after the original services have been rendered and the respective payment has been processed. - /// - /// In case of [asynchronous authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#adjust-authorisation), this field denotes why the additional payment is made. Possible values: * **NoShow**: An incremental charge is carried out because of a no-show for a guaranteed reservation. * **DelayedCharge**: An incremental charge is carried out to process an additional payment after the original services have been rendered and the respective payment has been processed. - [JsonConverter(typeof(StringEnumConverter))] - public enum IndustryUsageEnum - { - /// - /// Enum NoShow for value: NoShow - /// - [EnumMember(Value = "NoShow")] - NoShow = 1, - - /// - /// Enum DelayedCharge for value: DelayedCharge - /// - [EnumMember(Value = "DelayedCharge")] - DelayedCharge = 2 - - } - - - /// - /// In case of [asynchronous authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#adjust-authorisation), this field denotes why the additional payment is made. Possible values: * **NoShow**: An incremental charge is carried out because of a no-show for a guaranteed reservation. * **DelayedCharge**: An incremental charge is carried out to process an additional payment after the original services have been rendered and the respective payment has been processed. - /// - /// In case of [asynchronous authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#adjust-authorisation), this field denotes why the additional payment is made. Possible values: * **NoShow**: An incremental charge is carried out because of a no-show for a guaranteed reservation. * **DelayedCharge**: An incremental charge is carried out to process an additional payment after the original services have been rendered and the respective payment has been processed. - [DataMember(Name = "industryUsage", EmitDefaultValue = false)] - public IndustryUsageEnum? IndustryUsage { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Triggers test scenarios that allow to replicate certain acquirer response codes. See [Testing result codes and refusal reasons](https://docs.adyen.com/development-resources/testing/result-codes/) to learn about the possible values, and the `refusalReason` values you can trigger. . - /// Triggers test scenarios that allow to replicate certain communication errors. Allowed values: * **NO_CONNECTION_AVAILABLE** – There wasn't a connection available to service the outgoing communication. This is a transient, retriable error since no messaging could be initiated to an issuing system (or third-party acquiring system). Therefore, the header Transient-Error: true is returned in the response. A subsequent request using the same idempotency key will be processed as if it was the first request. * **IOEXCEPTION_RECEIVED** – Something went wrong during transmission of the message or receiving the response. This is a classified as non-transient because the message could have been received by the issuing party and been acted upon. No transient error header is returned. If using idempotency, the (error) response is stored as the final result for the idempotency key. Subsequent messages with the same idempotency key not be processed beyond returning the stored response.. - /// Set to true to authorise a part of the requested amount in case the cardholder does not have enough funds on their account. If a payment was partially authorised, the response includes resultCode: PartiallyAuthorised and the authorised amount in additionalData.authorisedAmountValue. To enable this functionality, contact our Support Team.. - /// Flags a card payment request for either pre-authorisation or final authorisation. For more information, refer to [Authorisation types](https://docs.adyen.com/online-payments/adjust-authorisation#authorisation-types). Allowed values: * **PreAuth** – flags the payment request to be handled as a pre-authorisation. * **FinalAuth** – flags the payment request to be handled as a final authorisation.. - /// Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window.. - /// Allows you to determine or override the acquirer account that should be used for the transaction. If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request's additional data to target a specific acquirer. To enable this functionality, contact [Support](https://www.adyen.help/hc/en-us/requests/new).. - /// In case of [asynchronous authorisation adjustment](https://docs.adyen.com/online-payments/adjust-authorisation#adjust-authorisation), this field denotes why the additional payment is made. Possible values: * **NoShow**: An incremental charge is carried out because of a no-show for a guaranteed reservation. * **DelayedCharge**: An incremental charge is carried out to process an additional payment after the original services have been rendered and the respective payment has been processed.. - /// Set to **true** to require [manual capture](https://docs.adyen.com/online-payments/capture) for the transaction.. - /// The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days.. - /// Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT.. - /// Boolean indicator that can be optionally used for performing debit transactions on combo cards (for example, combo cards in Brazil). This is not mandatory but we recommend that you set this to true if you want to use the `selectedBrand` value to specify how to process the transaction.. - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the city of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 13 characters.. - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the three-letter country code of the actual merchant's address. * Format: alpha-numeric. * Fixed length: 3 characters.. - /// This field is required for transactions performed by registered payment facilitators. This field contains the email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters. - /// This field contains an identifier of the actual merchant when a transaction is submitted via a payment facilitator. The payment facilitator must send in this unique ID. A unique identifier per submerchant that is required if the transaction is performed by a registered payment facilitator. * Format: alpha-numeric. * Fixed length: 15 characters.. - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the name of the actual merchant. * Format: alpha-numeric. * Maximum length: 22 characters.. - /// This field is required for transactions performed by registered payment facilitators. This field contains the phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters. - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the postal code of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 10 characters.. - /// This field is required if the transaction is performed by a registered payment facilitator, and if applicable to the country. This field must contain the state code of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 3 characters.. - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the street of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 60 characters.. - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the tax ID of the actual merchant. * Format: alpha-numeric. * Fixed length: 11 or 14 characters.. - public AdditionalDataCommon(string requestedTestAcquirerResponseCode = default(string), string requestedTestErrorResponseCode = default(string), string allowPartialAuth = default(string), string authorisationType = default(string), string autoRescue = default(string), string customRoutingFlag = default(string), IndustryUsageEnum? industryUsage = default(IndustryUsageEnum?), string manualCapture = default(string), string maxDaysToRescue = default(string), string networkTxReference = default(string), string overwriteBrand = default(string), string subMerchantCity = default(string), string subMerchantCountry = default(string), string subMerchantEmail = default(string), string subMerchantID = default(string), string subMerchantName = default(string), string subMerchantPhoneNumber = default(string), string subMerchantPostalCode = default(string), string subMerchantState = default(string), string subMerchantStreet = default(string), string subMerchantTaxId = default(string)) - { - this.RequestedTestAcquirerResponseCode = requestedTestAcquirerResponseCode; - this.RequestedTestErrorResponseCode = requestedTestErrorResponseCode; - this.AllowPartialAuth = allowPartialAuth; - this.AuthorisationType = authorisationType; - this.AutoRescue = autoRescue; - this.CustomRoutingFlag = customRoutingFlag; - this.IndustryUsage = industryUsage; - this.ManualCapture = manualCapture; - this.MaxDaysToRescue = maxDaysToRescue; - this.NetworkTxReference = networkTxReference; - this.OverwriteBrand = overwriteBrand; - this.SubMerchantCity = subMerchantCity; - this.SubMerchantCountry = subMerchantCountry; - this.SubMerchantEmail = subMerchantEmail; - this.SubMerchantID = subMerchantID; - this.SubMerchantName = subMerchantName; - this.SubMerchantPhoneNumber = subMerchantPhoneNumber; - this.SubMerchantPostalCode = subMerchantPostalCode; - this.SubMerchantState = subMerchantState; - this.SubMerchantStreet = subMerchantStreet; - this.SubMerchantTaxId = subMerchantTaxId; - } - - /// - /// Triggers test scenarios that allow to replicate certain acquirer response codes. See [Testing result codes and refusal reasons](https://docs.adyen.com/development-resources/testing/result-codes/) to learn about the possible values, and the `refusalReason` values you can trigger. - /// - /// Triggers test scenarios that allow to replicate certain acquirer response codes. See [Testing result codes and refusal reasons](https://docs.adyen.com/development-resources/testing/result-codes/) to learn about the possible values, and the `refusalReason` values you can trigger. - [DataMember(Name = "RequestedTestAcquirerResponseCode", EmitDefaultValue = false)] - public string RequestedTestAcquirerResponseCode { get; set; } - - /// - /// Triggers test scenarios that allow to replicate certain communication errors. Allowed values: * **NO_CONNECTION_AVAILABLE** – There wasn't a connection available to service the outgoing communication. This is a transient, retriable error since no messaging could be initiated to an issuing system (or third-party acquiring system). Therefore, the header Transient-Error: true is returned in the response. A subsequent request using the same idempotency key will be processed as if it was the first request. * **IOEXCEPTION_RECEIVED** – Something went wrong during transmission of the message or receiving the response. This is a classified as non-transient because the message could have been received by the issuing party and been acted upon. No transient error header is returned. If using idempotency, the (error) response is stored as the final result for the idempotency key. Subsequent messages with the same idempotency key not be processed beyond returning the stored response. - /// - /// Triggers test scenarios that allow to replicate certain communication errors. Allowed values: * **NO_CONNECTION_AVAILABLE** – There wasn't a connection available to service the outgoing communication. This is a transient, retriable error since no messaging could be initiated to an issuing system (or third-party acquiring system). Therefore, the header Transient-Error: true is returned in the response. A subsequent request using the same idempotency key will be processed as if it was the first request. * **IOEXCEPTION_RECEIVED** – Something went wrong during transmission of the message or receiving the response. This is a classified as non-transient because the message could have been received by the issuing party and been acted upon. No transient error header is returned. If using idempotency, the (error) response is stored as the final result for the idempotency key. Subsequent messages with the same idempotency key not be processed beyond returning the stored response. - [DataMember(Name = "RequestedTestErrorResponseCode", EmitDefaultValue = false)] - public string RequestedTestErrorResponseCode { get; set; } - - /// - /// Set to true to authorise a part of the requested amount in case the cardholder does not have enough funds on their account. If a payment was partially authorised, the response includes resultCode: PartiallyAuthorised and the authorised amount in additionalData.authorisedAmountValue. To enable this functionality, contact our Support Team. - /// - /// Set to true to authorise a part of the requested amount in case the cardholder does not have enough funds on their account. If a payment was partially authorised, the response includes resultCode: PartiallyAuthorised and the authorised amount in additionalData.authorisedAmountValue. To enable this functionality, contact our Support Team. - [DataMember(Name = "allowPartialAuth", EmitDefaultValue = false)] - public string AllowPartialAuth { get; set; } - - /// - /// Flags a card payment request for either pre-authorisation or final authorisation. For more information, refer to [Authorisation types](https://docs.adyen.com/online-payments/adjust-authorisation#authorisation-types). Allowed values: * **PreAuth** – flags the payment request to be handled as a pre-authorisation. * **FinalAuth** – flags the payment request to be handled as a final authorisation. - /// - /// Flags a card payment request for either pre-authorisation or final authorisation. For more information, refer to [Authorisation types](https://docs.adyen.com/online-payments/adjust-authorisation#authorisation-types). Allowed values: * **PreAuth** – flags the payment request to be handled as a pre-authorisation. * **FinalAuth** – flags the payment request to be handled as a final authorisation. - [DataMember(Name = "authorisationType", EmitDefaultValue = false)] - public string AuthorisationType { get; set; } - - /// - /// Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window. - /// - /// Set to **true** to enable [Auto Rescue](https://docs.adyen.com/online-payments/auto-rescue/) for a transaction. Use the `maxDaysToRescue` to specify a rescue window. - [DataMember(Name = "autoRescue", EmitDefaultValue = false)] - public string AutoRescue { get; set; } - - /// - /// Allows you to determine or override the acquirer account that should be used for the transaction. If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request's additional data to target a specific acquirer. To enable this functionality, contact [Support](https://www.adyen.help/hc/en-us/requests/new). - /// - /// Allows you to determine or override the acquirer account that should be used for the transaction. If you need to process a payment with an acquirer different from a default one, you can set up a corresponding configuration on the Adyen payments platform. Then you can pass a custom routing flag in a payment request's additional data to target a specific acquirer. To enable this functionality, contact [Support](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "customRoutingFlag", EmitDefaultValue = false)] - public string CustomRoutingFlag { get; set; } - - /// - /// Set to **true** to require [manual capture](https://docs.adyen.com/online-payments/capture) for the transaction. - /// - /// Set to **true** to require [manual capture](https://docs.adyen.com/online-payments/capture) for the transaction. - [DataMember(Name = "manualCapture", EmitDefaultValue = false)] - public string ManualCapture { get; set; } - - /// - /// The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days. - /// - /// The rescue window for a transaction, in days, when `autoRescue` is set to **true**. You can specify a value between 1 and 48. * For [cards](https://docs.adyen.com/online-payments/auto-rescue/cards/), the default is one calendar month. * For [SEPA](https://docs.adyen.com/online-payments/auto-rescue/sepa/), the default is 42 days. - [DataMember(Name = "maxDaysToRescue", EmitDefaultValue = false)] - public string MaxDaysToRescue { get; set; } - - /// - /// Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT. - /// - /// Allows you to link the transaction to the original or previous one in a subscription/card-on-file chain. This field is required for token-based transactions where Adyen does not tokenize the card. Transaction identifier from card schemes, for example, Mastercard Trace ID or the Visa Transaction ID. Submit the original transaction ID of the contract in your payment request if you are not tokenizing card details with Adyen and are making a merchant-initiated transaction (MIT) for subsequent charges. Make sure you are sending `shopperInteraction` **ContAuth** and `recurringProcessingModel` **Subscription** or **UnscheduledCardOnFile** to ensure that the transaction is classified as MIT. - [DataMember(Name = "networkTxReference", EmitDefaultValue = false)] - public string NetworkTxReference { get; set; } - - /// - /// Boolean indicator that can be optionally used for performing debit transactions on combo cards (for example, combo cards in Brazil). This is not mandatory but we recommend that you set this to true if you want to use the `selectedBrand` value to specify how to process the transaction. - /// - /// Boolean indicator that can be optionally used for performing debit transactions on combo cards (for example, combo cards in Brazil). This is not mandatory but we recommend that you set this to true if you want to use the `selectedBrand` value to specify how to process the transaction. - [DataMember(Name = "overwriteBrand", EmitDefaultValue = false)] - public string OverwriteBrand { get; set; } - - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the city of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 13 characters. - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the city of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 13 characters. - [DataMember(Name = "subMerchantCity", EmitDefaultValue = false)] - public string SubMerchantCity { get; set; } - - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the three-letter country code of the actual merchant's address. * Format: alpha-numeric. * Fixed length: 3 characters. - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the three-letter country code of the actual merchant's address. * Format: alpha-numeric. * Fixed length: 3 characters. - [DataMember(Name = "subMerchantCountry", EmitDefaultValue = false)] - public string SubMerchantCountry { get; set; } - - /// - /// This field is required for transactions performed by registered payment facilitators. This field contains the email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters - /// - /// This field is required for transactions performed by registered payment facilitators. This field contains the email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters - [DataMember(Name = "subMerchantEmail", EmitDefaultValue = false)] - public string SubMerchantEmail { get; set; } - - /// - /// This field contains an identifier of the actual merchant when a transaction is submitted via a payment facilitator. The payment facilitator must send in this unique ID. A unique identifier per submerchant that is required if the transaction is performed by a registered payment facilitator. * Format: alpha-numeric. * Fixed length: 15 characters. - /// - /// This field contains an identifier of the actual merchant when a transaction is submitted via a payment facilitator. The payment facilitator must send in this unique ID. A unique identifier per submerchant that is required if the transaction is performed by a registered payment facilitator. * Format: alpha-numeric. * Fixed length: 15 characters. - [DataMember(Name = "subMerchantID", EmitDefaultValue = false)] - public string SubMerchantID { get; set; } - - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the name of the actual merchant. * Format: alpha-numeric. * Maximum length: 22 characters. - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the name of the actual merchant. * Format: alpha-numeric. * Maximum length: 22 characters. - [DataMember(Name = "subMerchantName", EmitDefaultValue = false)] - public string SubMerchantName { get; set; } - - /// - /// This field is required for transactions performed by registered payment facilitators. This field contains the phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters - /// - /// This field is required for transactions performed by registered payment facilitators. This field contains the phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters - [DataMember(Name = "subMerchantPhoneNumber", EmitDefaultValue = false)] - public string SubMerchantPhoneNumber { get; set; } - - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the postal code of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 10 characters. - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the postal code of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 10 characters. - [DataMember(Name = "subMerchantPostalCode", EmitDefaultValue = false)] - public string SubMerchantPostalCode { get; set; } - - /// - /// This field is required if the transaction is performed by a registered payment facilitator, and if applicable to the country. This field must contain the state code of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 3 characters. - /// - /// This field is required if the transaction is performed by a registered payment facilitator, and if applicable to the country. This field must contain the state code of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 3 characters. - [DataMember(Name = "subMerchantState", EmitDefaultValue = false)] - public string SubMerchantState { get; set; } - - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the street of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 60 characters. - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the street of the actual merchant's address. * Format: alpha-numeric. * Maximum length: 60 characters. - [DataMember(Name = "subMerchantStreet", EmitDefaultValue = false)] - public string SubMerchantStreet { get; set; } - - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the tax ID of the actual merchant. * Format: alpha-numeric. * Fixed length: 11 or 14 characters. - /// - /// This field is required if the transaction is performed by a registered payment facilitator. This field must contain the tax ID of the actual merchant. * Format: alpha-numeric. * Fixed length: 11 or 14 characters. - [DataMember(Name = "subMerchantTaxId", EmitDefaultValue = false)] - public string SubMerchantTaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataCommon {\n"); - sb.Append(" RequestedTestAcquirerResponseCode: ").Append(RequestedTestAcquirerResponseCode).Append("\n"); - sb.Append(" RequestedTestErrorResponseCode: ").Append(RequestedTestErrorResponseCode).Append("\n"); - sb.Append(" AllowPartialAuth: ").Append(AllowPartialAuth).Append("\n"); - sb.Append(" AuthorisationType: ").Append(AuthorisationType).Append("\n"); - sb.Append(" AutoRescue: ").Append(AutoRescue).Append("\n"); - sb.Append(" CustomRoutingFlag: ").Append(CustomRoutingFlag).Append("\n"); - sb.Append(" IndustryUsage: ").Append(IndustryUsage).Append("\n"); - sb.Append(" ManualCapture: ").Append(ManualCapture).Append("\n"); - sb.Append(" MaxDaysToRescue: ").Append(MaxDaysToRescue).Append("\n"); - sb.Append(" NetworkTxReference: ").Append(NetworkTxReference).Append("\n"); - sb.Append(" OverwriteBrand: ").Append(OverwriteBrand).Append("\n"); - sb.Append(" SubMerchantCity: ").Append(SubMerchantCity).Append("\n"); - sb.Append(" SubMerchantCountry: ").Append(SubMerchantCountry).Append("\n"); - sb.Append(" SubMerchantEmail: ").Append(SubMerchantEmail).Append("\n"); - sb.Append(" SubMerchantID: ").Append(SubMerchantID).Append("\n"); - sb.Append(" SubMerchantName: ").Append(SubMerchantName).Append("\n"); - sb.Append(" SubMerchantPhoneNumber: ").Append(SubMerchantPhoneNumber).Append("\n"); - sb.Append(" SubMerchantPostalCode: ").Append(SubMerchantPostalCode).Append("\n"); - sb.Append(" SubMerchantState: ").Append(SubMerchantState).Append("\n"); - sb.Append(" SubMerchantStreet: ").Append(SubMerchantStreet).Append("\n"); - sb.Append(" SubMerchantTaxId: ").Append(SubMerchantTaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataCommon); - } - - /// - /// Returns true if AdditionalDataCommon instances are equal - /// - /// Instance of AdditionalDataCommon to be compared - /// Boolean - public bool Equals(AdditionalDataCommon input) - { - if (input == null) - { - return false; - } - return - ( - this.RequestedTestAcquirerResponseCode == input.RequestedTestAcquirerResponseCode || - (this.RequestedTestAcquirerResponseCode != null && - this.RequestedTestAcquirerResponseCode.Equals(input.RequestedTestAcquirerResponseCode)) - ) && - ( - this.RequestedTestErrorResponseCode == input.RequestedTestErrorResponseCode || - (this.RequestedTestErrorResponseCode != null && - this.RequestedTestErrorResponseCode.Equals(input.RequestedTestErrorResponseCode)) - ) && - ( - this.AllowPartialAuth == input.AllowPartialAuth || - (this.AllowPartialAuth != null && - this.AllowPartialAuth.Equals(input.AllowPartialAuth)) - ) && - ( - this.AuthorisationType == input.AuthorisationType || - (this.AuthorisationType != null && - this.AuthorisationType.Equals(input.AuthorisationType)) - ) && - ( - this.AutoRescue == input.AutoRescue || - (this.AutoRescue != null && - this.AutoRescue.Equals(input.AutoRescue)) - ) && - ( - this.CustomRoutingFlag == input.CustomRoutingFlag || - (this.CustomRoutingFlag != null && - this.CustomRoutingFlag.Equals(input.CustomRoutingFlag)) - ) && - ( - this.IndustryUsage == input.IndustryUsage || - this.IndustryUsage.Equals(input.IndustryUsage) - ) && - ( - this.ManualCapture == input.ManualCapture || - (this.ManualCapture != null && - this.ManualCapture.Equals(input.ManualCapture)) - ) && - ( - this.MaxDaysToRescue == input.MaxDaysToRescue || - (this.MaxDaysToRescue != null && - this.MaxDaysToRescue.Equals(input.MaxDaysToRescue)) - ) && - ( - this.NetworkTxReference == input.NetworkTxReference || - (this.NetworkTxReference != null && - this.NetworkTxReference.Equals(input.NetworkTxReference)) - ) && - ( - this.OverwriteBrand == input.OverwriteBrand || - (this.OverwriteBrand != null && - this.OverwriteBrand.Equals(input.OverwriteBrand)) - ) && - ( - this.SubMerchantCity == input.SubMerchantCity || - (this.SubMerchantCity != null && - this.SubMerchantCity.Equals(input.SubMerchantCity)) - ) && - ( - this.SubMerchantCountry == input.SubMerchantCountry || - (this.SubMerchantCountry != null && - this.SubMerchantCountry.Equals(input.SubMerchantCountry)) - ) && - ( - this.SubMerchantEmail == input.SubMerchantEmail || - (this.SubMerchantEmail != null && - this.SubMerchantEmail.Equals(input.SubMerchantEmail)) - ) && - ( - this.SubMerchantID == input.SubMerchantID || - (this.SubMerchantID != null && - this.SubMerchantID.Equals(input.SubMerchantID)) - ) && - ( - this.SubMerchantName == input.SubMerchantName || - (this.SubMerchantName != null && - this.SubMerchantName.Equals(input.SubMerchantName)) - ) && - ( - this.SubMerchantPhoneNumber == input.SubMerchantPhoneNumber || - (this.SubMerchantPhoneNumber != null && - this.SubMerchantPhoneNumber.Equals(input.SubMerchantPhoneNumber)) - ) && - ( - this.SubMerchantPostalCode == input.SubMerchantPostalCode || - (this.SubMerchantPostalCode != null && - this.SubMerchantPostalCode.Equals(input.SubMerchantPostalCode)) - ) && - ( - this.SubMerchantState == input.SubMerchantState || - (this.SubMerchantState != null && - this.SubMerchantState.Equals(input.SubMerchantState)) - ) && - ( - this.SubMerchantStreet == input.SubMerchantStreet || - (this.SubMerchantStreet != null && - this.SubMerchantStreet.Equals(input.SubMerchantStreet)) - ) && - ( - this.SubMerchantTaxId == input.SubMerchantTaxId || - (this.SubMerchantTaxId != null && - this.SubMerchantTaxId.Equals(input.SubMerchantTaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RequestedTestAcquirerResponseCode != null) - { - hashCode = (hashCode * 59) + this.RequestedTestAcquirerResponseCode.GetHashCode(); - } - if (this.RequestedTestErrorResponseCode != null) - { - hashCode = (hashCode * 59) + this.RequestedTestErrorResponseCode.GetHashCode(); - } - if (this.AllowPartialAuth != null) - { - hashCode = (hashCode * 59) + this.AllowPartialAuth.GetHashCode(); - } - if (this.AuthorisationType != null) - { - hashCode = (hashCode * 59) + this.AuthorisationType.GetHashCode(); - } - if (this.AutoRescue != null) - { - hashCode = (hashCode * 59) + this.AutoRescue.GetHashCode(); - } - if (this.CustomRoutingFlag != null) - { - hashCode = (hashCode * 59) + this.CustomRoutingFlag.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IndustryUsage.GetHashCode(); - if (this.ManualCapture != null) - { - hashCode = (hashCode * 59) + this.ManualCapture.GetHashCode(); - } - if (this.MaxDaysToRescue != null) - { - hashCode = (hashCode * 59) + this.MaxDaysToRescue.GetHashCode(); - } - if (this.NetworkTxReference != null) - { - hashCode = (hashCode * 59) + this.NetworkTxReference.GetHashCode(); - } - if (this.OverwriteBrand != null) - { - hashCode = (hashCode * 59) + this.OverwriteBrand.GetHashCode(); - } - if (this.SubMerchantCity != null) - { - hashCode = (hashCode * 59) + this.SubMerchantCity.GetHashCode(); - } - if (this.SubMerchantCountry != null) - { - hashCode = (hashCode * 59) + this.SubMerchantCountry.GetHashCode(); - } - if (this.SubMerchantEmail != null) - { - hashCode = (hashCode * 59) + this.SubMerchantEmail.GetHashCode(); - } - if (this.SubMerchantID != null) - { - hashCode = (hashCode * 59) + this.SubMerchantID.GetHashCode(); - } - if (this.SubMerchantName != null) - { - hashCode = (hashCode * 59) + this.SubMerchantName.GetHashCode(); - } - if (this.SubMerchantPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.SubMerchantPhoneNumber.GetHashCode(); - } - if (this.SubMerchantPostalCode != null) - { - hashCode = (hashCode * 59) + this.SubMerchantPostalCode.GetHashCode(); - } - if (this.SubMerchantState != null) - { - hashCode = (hashCode * 59) + this.SubMerchantState.GetHashCode(); - } - if (this.SubMerchantStreet != null) - { - hashCode = (hashCode * 59) + this.SubMerchantStreet.GetHashCode(); - } - if (this.SubMerchantTaxId != null) - { - hashCode = (hashCode * 59) + this.SubMerchantTaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataLevel23.cs b/Adyen/Model/Checkout/AdditionalDataLevel23.cs deleted file mode 100644 index 687ceb857..000000000 --- a/Adyen/Model/Checkout/AdditionalDataLevel23.cs +++ /dev/null @@ -1,433 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataLevel23 - /// - [DataContract(Name = "AdditionalDataLevel23")] - public partial class AdditionalDataLevel23 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The reference number to identify the customer and their order. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Fixed length: 3 characters. - /// The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.. - /// The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.. - /// The duty tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters. - /// The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters. - /// The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters. - /// The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces.. - /// The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total. * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros.. - /// The order date. * Format: `ddMMyy` * Encoding: ASCII * Max length: 6 characters. - /// The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces. * Must not be all zeros.For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.. - /// The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros.. - public AdditionalDataLevel23(string enhancedSchemeDataCustomerReference = default(string), string enhancedSchemeDataDestinationCountryCode = default(string), string enhancedSchemeDataDestinationPostalCode = default(string), string enhancedSchemeDataDestinationStateProvinceCode = default(string), string enhancedSchemeDataDutyAmount = default(string), string enhancedSchemeDataFreightAmount = default(string), string enhancedSchemeDataItemDetailLineItemNrCommodityCode = default(string), string enhancedSchemeDataItemDetailLineItemNrDescription = default(string), string enhancedSchemeDataItemDetailLineItemNrDiscountAmount = default(string), string enhancedSchemeDataItemDetailLineItemNrProductCode = default(string), string enhancedSchemeDataItemDetailLineItemNrQuantity = default(string), string enhancedSchemeDataItemDetailLineItemNrTotalAmount = default(string), string enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure = default(string), string enhancedSchemeDataItemDetailLineItemNrUnitPrice = default(string), string enhancedSchemeDataOrderDate = default(string), string enhancedSchemeDataShipFromPostalCode = default(string), string enhancedSchemeDataTotalTaxAmount = default(string)) - { - this.EnhancedSchemeDataCustomerReference = enhancedSchemeDataCustomerReference; - this.EnhancedSchemeDataDestinationCountryCode = enhancedSchemeDataDestinationCountryCode; - this.EnhancedSchemeDataDestinationPostalCode = enhancedSchemeDataDestinationPostalCode; - this.EnhancedSchemeDataDestinationStateProvinceCode = enhancedSchemeDataDestinationStateProvinceCode; - this.EnhancedSchemeDataDutyAmount = enhancedSchemeDataDutyAmount; - this.EnhancedSchemeDataFreightAmount = enhancedSchemeDataFreightAmount; - this.EnhancedSchemeDataItemDetailLineItemNrCommodityCode = enhancedSchemeDataItemDetailLineItemNrCommodityCode; - this.EnhancedSchemeDataItemDetailLineItemNrDescription = enhancedSchemeDataItemDetailLineItemNrDescription; - this.EnhancedSchemeDataItemDetailLineItemNrDiscountAmount = enhancedSchemeDataItemDetailLineItemNrDiscountAmount; - this.EnhancedSchemeDataItemDetailLineItemNrProductCode = enhancedSchemeDataItemDetailLineItemNrProductCode; - this.EnhancedSchemeDataItemDetailLineItemNrQuantity = enhancedSchemeDataItemDetailLineItemNrQuantity; - this.EnhancedSchemeDataItemDetailLineItemNrTotalAmount = enhancedSchemeDataItemDetailLineItemNrTotalAmount; - this.EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure = enhancedSchemeDataItemDetailLineItemNrUnitOfMeasure; - this.EnhancedSchemeDataItemDetailLineItemNrUnitPrice = enhancedSchemeDataItemDetailLineItemNrUnitPrice; - this.EnhancedSchemeDataOrderDate = enhancedSchemeDataOrderDate; - this.EnhancedSchemeDataShipFromPostalCode = enhancedSchemeDataShipFromPostalCode; - this.EnhancedSchemeDataTotalTaxAmount = enhancedSchemeDataTotalTaxAmount; - } - - /// - /// The reference number to identify the customer and their order. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The reference number to identify the customer and their order. * Encoding: ASCII * Max length: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.customerReference", EmitDefaultValue = false)] - public string EnhancedSchemeDataCustomerReference { get; set; } - - /// - /// The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Fixed length: 3 characters - /// - /// The three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Fixed length: 3 characters - [DataMember(Name = "enhancedSchemeData.destinationCountryCode", EmitDefaultValue = false)] - public string EnhancedSchemeDataDestinationCountryCode { get; set; } - - /// - /// The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. - /// - /// The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. - [DataMember(Name = "enhancedSchemeData.destinationPostalCode", EmitDefaultValue = false)] - public string EnhancedSchemeDataDestinationPostalCode { get; set; } - - /// - /// The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space. - /// - /// The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space. - [DataMember(Name = "enhancedSchemeData.destinationStateProvinceCode", EmitDefaultValue = false)] - public string EnhancedSchemeDataDestinationStateProvinceCode { get; set; } - - /// - /// The duty tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters - /// - /// The duty tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters - [DataMember(Name = "enhancedSchemeData.dutyAmount", EmitDefaultValue = false)] - public string EnhancedSchemeDataDutyAmount { get; set; } - - /// - /// The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters - /// - /// The shipping amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters - [DataMember(Name = "enhancedSchemeData.freightAmount", EmitDefaultValue = false)] - public string EnhancedSchemeDataFreightAmount { get; set; } - - /// - /// The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The code that identifies the item in a standardized commodity coding scheme. There are different commodity coding schemes: * [UNSPSC commodity codes](https://www.unspsc.org/) * [HS commodity codes](https://www.wcoomd.org/en/topics/nomenclature/overview.aspx) * [NAICS commodity codes](https://www.census.gov/naics/) * [NAPCS commodity codes](https://www.census.gov/naics/napcs/) * Encoding: ASCII * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.itemDetailLine[itemNr].commodityCode", EmitDefaultValue = false)] - public string EnhancedSchemeDataItemDetailLineItemNrCommodityCode { get; set; } - - /// - /// A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// A description of the item. * Encoding: ASCII * Max length: 26 characters * Must not be a single character. * Must not be blank. * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.itemDetailLine[itemNr].description", EmitDefaultValue = false)] - public string EnhancedSchemeDataItemDetailLineItemNrDescription { get; set; } - - /// - /// The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters - /// - /// The discount amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters - [DataMember(Name = "enhancedSchemeData.itemDetailLine[itemNr].discountAmount", EmitDefaultValue = false)] - public string EnhancedSchemeDataItemDetailLineItemNrDiscountAmount { get; set; } - - /// - /// The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The product code. Must be a unique product code associated with the item or service. This can be your unique code for the item, or the manufacturer's product code. * Encoding: ASCII. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.itemDetailLine[itemNr].productCode", EmitDefaultValue = false)] - public string EnhancedSchemeDataItemDetailLineItemNrProductCode { get; set; } - - /// - /// The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces. - /// - /// The number of items. Must be an integer greater than zero. * Encoding: Numeric * Max length: 12 characters * Must not start with a space or be all spaces. - [DataMember(Name = "enhancedSchemeData.itemDetailLine[itemNr].quantity", EmitDefaultValue = false)] - public string EnhancedSchemeDataItemDetailLineItemNrQuantity { get; set; } - - /// - /// The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total. * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The total amount for the line item, in [minor units](https://docs.adyen.com/development-resources/currency-codes). See [Amount requirements for level 2/3 ESD](https://docs.adyen.com//payment-methods/cards/enhanced-scheme-data/l2-l3#amount-requirements) to learn more about how to calculate the line item total. * For example, 2000 means USD 20.00. * Max length: 12 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.itemDetailLine[itemNr].totalAmount", EmitDefaultValue = false)] - public string EnhancedSchemeDataItemDetailLineItemNrTotalAmount { get; set; } - - /// - /// The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The unit of measurement for an item. * Encoding: ASCII * Max length: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.itemDetailLine[itemNr].unitOfMeasure", EmitDefaultValue = false)] - public string EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure { get; set; } - - /// - /// The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. - /// - /// The unit price in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.itemDetailLine[itemNr].unitPrice", EmitDefaultValue = false)] - public string EnhancedSchemeDataItemDetailLineItemNrUnitPrice { get; set; } - - /// - /// The order date. * Format: `ddMMyy` * Encoding: ASCII * Max length: 6 characters - /// - /// The order date. * Format: `ddMMyy` * Encoding: ASCII * Max length: 6 characters - [DataMember(Name = "enhancedSchemeData.orderDate", EmitDefaultValue = false)] - public string EnhancedSchemeDataOrderDate { get; set; } - - /// - /// The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces. * Must not be all zeros.For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. - /// - /// The postal code of the address where the item is shipped from. * Encoding: ASCII * Max length: 10 characters * Must not start with a space or be all spaces. * Must not be all zeros.For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5. - [DataMember(Name = "enhancedSchemeData.shipFromPostalCode", EmitDefaultValue = false)] - public string EnhancedSchemeDataShipFromPostalCode { get; set; } - - /// - /// The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. - /// - /// The amount of state or provincial [tax included in the total transaction amount](https://docs.adyen.com/payment-methods/cards/enhanced-scheme-data/l2-l3#requirements-to-send-level-2-3-esd), in [minor units](https://docs.adyen.com/development-resources/currency-codes). * For example, 2000 means USD 20.00. * Encoding: Numeric * Max length: 12 characters * Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.totalTaxAmount", EmitDefaultValue = false)] - public string EnhancedSchemeDataTotalTaxAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataLevel23 {\n"); - sb.Append(" EnhancedSchemeDataCustomerReference: ").Append(EnhancedSchemeDataCustomerReference).Append("\n"); - sb.Append(" EnhancedSchemeDataDestinationCountryCode: ").Append(EnhancedSchemeDataDestinationCountryCode).Append("\n"); - sb.Append(" EnhancedSchemeDataDestinationPostalCode: ").Append(EnhancedSchemeDataDestinationPostalCode).Append("\n"); - sb.Append(" EnhancedSchemeDataDestinationStateProvinceCode: ").Append(EnhancedSchemeDataDestinationStateProvinceCode).Append("\n"); - sb.Append(" EnhancedSchemeDataDutyAmount: ").Append(EnhancedSchemeDataDutyAmount).Append("\n"); - sb.Append(" EnhancedSchemeDataFreightAmount: ").Append(EnhancedSchemeDataFreightAmount).Append("\n"); - sb.Append(" EnhancedSchemeDataItemDetailLineItemNrCommodityCode: ").Append(EnhancedSchemeDataItemDetailLineItemNrCommodityCode).Append("\n"); - sb.Append(" EnhancedSchemeDataItemDetailLineItemNrDescription: ").Append(EnhancedSchemeDataItemDetailLineItemNrDescription).Append("\n"); - sb.Append(" EnhancedSchemeDataItemDetailLineItemNrDiscountAmount: ").Append(EnhancedSchemeDataItemDetailLineItemNrDiscountAmount).Append("\n"); - sb.Append(" EnhancedSchemeDataItemDetailLineItemNrProductCode: ").Append(EnhancedSchemeDataItemDetailLineItemNrProductCode).Append("\n"); - sb.Append(" EnhancedSchemeDataItemDetailLineItemNrQuantity: ").Append(EnhancedSchemeDataItemDetailLineItemNrQuantity).Append("\n"); - sb.Append(" EnhancedSchemeDataItemDetailLineItemNrTotalAmount: ").Append(EnhancedSchemeDataItemDetailLineItemNrTotalAmount).Append("\n"); - sb.Append(" EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure: ").Append(EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure).Append("\n"); - sb.Append(" EnhancedSchemeDataItemDetailLineItemNrUnitPrice: ").Append(EnhancedSchemeDataItemDetailLineItemNrUnitPrice).Append("\n"); - sb.Append(" EnhancedSchemeDataOrderDate: ").Append(EnhancedSchemeDataOrderDate).Append("\n"); - sb.Append(" EnhancedSchemeDataShipFromPostalCode: ").Append(EnhancedSchemeDataShipFromPostalCode).Append("\n"); - sb.Append(" EnhancedSchemeDataTotalTaxAmount: ").Append(EnhancedSchemeDataTotalTaxAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataLevel23); - } - - /// - /// Returns true if AdditionalDataLevel23 instances are equal - /// - /// Instance of AdditionalDataLevel23 to be compared - /// Boolean - public bool Equals(AdditionalDataLevel23 input) - { - if (input == null) - { - return false; - } - return - ( - this.EnhancedSchemeDataCustomerReference == input.EnhancedSchemeDataCustomerReference || - (this.EnhancedSchemeDataCustomerReference != null && - this.EnhancedSchemeDataCustomerReference.Equals(input.EnhancedSchemeDataCustomerReference)) - ) && - ( - this.EnhancedSchemeDataDestinationCountryCode == input.EnhancedSchemeDataDestinationCountryCode || - (this.EnhancedSchemeDataDestinationCountryCode != null && - this.EnhancedSchemeDataDestinationCountryCode.Equals(input.EnhancedSchemeDataDestinationCountryCode)) - ) && - ( - this.EnhancedSchemeDataDestinationPostalCode == input.EnhancedSchemeDataDestinationPostalCode || - (this.EnhancedSchemeDataDestinationPostalCode != null && - this.EnhancedSchemeDataDestinationPostalCode.Equals(input.EnhancedSchemeDataDestinationPostalCode)) - ) && - ( - this.EnhancedSchemeDataDestinationStateProvinceCode == input.EnhancedSchemeDataDestinationStateProvinceCode || - (this.EnhancedSchemeDataDestinationStateProvinceCode != null && - this.EnhancedSchemeDataDestinationStateProvinceCode.Equals(input.EnhancedSchemeDataDestinationStateProvinceCode)) - ) && - ( - this.EnhancedSchemeDataDutyAmount == input.EnhancedSchemeDataDutyAmount || - (this.EnhancedSchemeDataDutyAmount != null && - this.EnhancedSchemeDataDutyAmount.Equals(input.EnhancedSchemeDataDutyAmount)) - ) && - ( - this.EnhancedSchemeDataFreightAmount == input.EnhancedSchemeDataFreightAmount || - (this.EnhancedSchemeDataFreightAmount != null && - this.EnhancedSchemeDataFreightAmount.Equals(input.EnhancedSchemeDataFreightAmount)) - ) && - ( - this.EnhancedSchemeDataItemDetailLineItemNrCommodityCode == input.EnhancedSchemeDataItemDetailLineItemNrCommodityCode || - (this.EnhancedSchemeDataItemDetailLineItemNrCommodityCode != null && - this.EnhancedSchemeDataItemDetailLineItemNrCommodityCode.Equals(input.EnhancedSchemeDataItemDetailLineItemNrCommodityCode)) - ) && - ( - this.EnhancedSchemeDataItemDetailLineItemNrDescription == input.EnhancedSchemeDataItemDetailLineItemNrDescription || - (this.EnhancedSchemeDataItemDetailLineItemNrDescription != null && - this.EnhancedSchemeDataItemDetailLineItemNrDescription.Equals(input.EnhancedSchemeDataItemDetailLineItemNrDescription)) - ) && - ( - this.EnhancedSchemeDataItemDetailLineItemNrDiscountAmount == input.EnhancedSchemeDataItemDetailLineItemNrDiscountAmount || - (this.EnhancedSchemeDataItemDetailLineItemNrDiscountAmount != null && - this.EnhancedSchemeDataItemDetailLineItemNrDiscountAmount.Equals(input.EnhancedSchemeDataItemDetailLineItemNrDiscountAmount)) - ) && - ( - this.EnhancedSchemeDataItemDetailLineItemNrProductCode == input.EnhancedSchemeDataItemDetailLineItemNrProductCode || - (this.EnhancedSchemeDataItemDetailLineItemNrProductCode != null && - this.EnhancedSchemeDataItemDetailLineItemNrProductCode.Equals(input.EnhancedSchemeDataItemDetailLineItemNrProductCode)) - ) && - ( - this.EnhancedSchemeDataItemDetailLineItemNrQuantity == input.EnhancedSchemeDataItemDetailLineItemNrQuantity || - (this.EnhancedSchemeDataItemDetailLineItemNrQuantity != null && - this.EnhancedSchemeDataItemDetailLineItemNrQuantity.Equals(input.EnhancedSchemeDataItemDetailLineItemNrQuantity)) - ) && - ( - this.EnhancedSchemeDataItemDetailLineItemNrTotalAmount == input.EnhancedSchemeDataItemDetailLineItemNrTotalAmount || - (this.EnhancedSchemeDataItemDetailLineItemNrTotalAmount != null && - this.EnhancedSchemeDataItemDetailLineItemNrTotalAmount.Equals(input.EnhancedSchemeDataItemDetailLineItemNrTotalAmount)) - ) && - ( - this.EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure == input.EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure || - (this.EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure != null && - this.EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure.Equals(input.EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure)) - ) && - ( - this.EnhancedSchemeDataItemDetailLineItemNrUnitPrice == input.EnhancedSchemeDataItemDetailLineItemNrUnitPrice || - (this.EnhancedSchemeDataItemDetailLineItemNrUnitPrice != null && - this.EnhancedSchemeDataItemDetailLineItemNrUnitPrice.Equals(input.EnhancedSchemeDataItemDetailLineItemNrUnitPrice)) - ) && - ( - this.EnhancedSchemeDataOrderDate == input.EnhancedSchemeDataOrderDate || - (this.EnhancedSchemeDataOrderDate != null && - this.EnhancedSchemeDataOrderDate.Equals(input.EnhancedSchemeDataOrderDate)) - ) && - ( - this.EnhancedSchemeDataShipFromPostalCode == input.EnhancedSchemeDataShipFromPostalCode || - (this.EnhancedSchemeDataShipFromPostalCode != null && - this.EnhancedSchemeDataShipFromPostalCode.Equals(input.EnhancedSchemeDataShipFromPostalCode)) - ) && - ( - this.EnhancedSchemeDataTotalTaxAmount == input.EnhancedSchemeDataTotalTaxAmount || - (this.EnhancedSchemeDataTotalTaxAmount != null && - this.EnhancedSchemeDataTotalTaxAmount.Equals(input.EnhancedSchemeDataTotalTaxAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EnhancedSchemeDataCustomerReference != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataCustomerReference.GetHashCode(); - } - if (this.EnhancedSchemeDataDestinationCountryCode != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataDestinationCountryCode.GetHashCode(); - } - if (this.EnhancedSchemeDataDestinationPostalCode != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataDestinationPostalCode.GetHashCode(); - } - if (this.EnhancedSchemeDataDestinationStateProvinceCode != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataDestinationStateProvinceCode.GetHashCode(); - } - if (this.EnhancedSchemeDataDutyAmount != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataDutyAmount.GetHashCode(); - } - if (this.EnhancedSchemeDataFreightAmount != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataFreightAmount.GetHashCode(); - } - if (this.EnhancedSchemeDataItemDetailLineItemNrCommodityCode != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataItemDetailLineItemNrCommodityCode.GetHashCode(); - } - if (this.EnhancedSchemeDataItemDetailLineItemNrDescription != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataItemDetailLineItemNrDescription.GetHashCode(); - } - if (this.EnhancedSchemeDataItemDetailLineItemNrDiscountAmount != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataItemDetailLineItemNrDiscountAmount.GetHashCode(); - } - if (this.EnhancedSchemeDataItemDetailLineItemNrProductCode != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataItemDetailLineItemNrProductCode.GetHashCode(); - } - if (this.EnhancedSchemeDataItemDetailLineItemNrQuantity != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataItemDetailLineItemNrQuantity.GetHashCode(); - } - if (this.EnhancedSchemeDataItemDetailLineItemNrTotalAmount != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataItemDetailLineItemNrTotalAmount.GetHashCode(); - } - if (this.EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataItemDetailLineItemNrUnitOfMeasure.GetHashCode(); - } - if (this.EnhancedSchemeDataItemDetailLineItemNrUnitPrice != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataItemDetailLineItemNrUnitPrice.GetHashCode(); - } - if (this.EnhancedSchemeDataOrderDate != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataOrderDate.GetHashCode(); - } - if (this.EnhancedSchemeDataShipFromPostalCode != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataShipFromPostalCode.GetHashCode(); - } - if (this.EnhancedSchemeDataTotalTaxAmount != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataTotalTaxAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataLodging.cs b/Adyen/Model/Checkout/AdditionalDataLodging.cs deleted file mode 100644 index 3382ee07a..000000000 --- a/Adyen/Model/Checkout/AdditionalDataLodging.cs +++ /dev/null @@ -1,433 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataLodging - /// - [DataContract(Name = "AdditionalDataLodging")] - public partial class AdditionalDataLodging : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A code that corresponds to the category of lodging charges for the payment. Possible values: * 1: Lodging * 2: No show reservation * 3: Advanced deposit. - /// The arrival date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**.. - /// The departure date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**.. - /// The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros.. - /// Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Must be 'Y' or 'N'. * Format: alphabetic * Max length: 1 character. - /// The folio cash advances, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters. - /// The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters * Must not start with a space * Must not contain any special characters * Must not be all zeros.. - /// Any charges for food and beverages associated with the booking, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters. - /// Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in * **N**: the customer checked in. - /// The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters. - /// The lodging property location's phone number. * Format: numeric * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros.. - /// The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 4 characters. - /// The rate for the room, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number. - /// The total room tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number. - /// The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number. - /// The number of nights. This should be included in the auth message. * Format: numeric * Max length: 4 characters. - /// Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character. - public AdditionalDataLodging(string lodgingSpecialProgramCode = default(string), string lodgingCheckInDate = default(string), string lodgingCheckOutDate = default(string), string lodgingCustomerServiceTollFreeNumber = default(string), string lodgingFireSafetyActIndicator = default(string), string lodgingFolioCashAdvances = default(string), string lodgingFolioNumber = default(string), string lodgingFoodBeverageCharges = default(string), string lodgingNoShowIndicator = default(string), string lodgingPrepaidExpenses = default(string), string lodgingPropertyPhoneNumber = default(string), string lodgingRoom1NumberOfNights = default(string), string lodgingRoom1Rate = default(string), string lodgingTotalRoomTax = default(string), string lodgingTotalTax = default(string), string travelEntertainmentAuthDataDuration = default(string), string travelEntertainmentAuthDataMarket = default(string)) - { - this.LodgingSpecialProgramCode = lodgingSpecialProgramCode; - this.LodgingCheckInDate = lodgingCheckInDate; - this.LodgingCheckOutDate = lodgingCheckOutDate; - this.LodgingCustomerServiceTollFreeNumber = lodgingCustomerServiceTollFreeNumber; - this.LodgingFireSafetyActIndicator = lodgingFireSafetyActIndicator; - this.LodgingFolioCashAdvances = lodgingFolioCashAdvances; - this.LodgingFolioNumber = lodgingFolioNumber; - this.LodgingFoodBeverageCharges = lodgingFoodBeverageCharges; - this.LodgingNoShowIndicator = lodgingNoShowIndicator; - this.LodgingPrepaidExpenses = lodgingPrepaidExpenses; - this.LodgingPropertyPhoneNumber = lodgingPropertyPhoneNumber; - this.LodgingRoom1NumberOfNights = lodgingRoom1NumberOfNights; - this.LodgingRoom1Rate = lodgingRoom1Rate; - this.LodgingTotalRoomTax = lodgingTotalRoomTax; - this.LodgingTotalTax = lodgingTotalTax; - this.TravelEntertainmentAuthDataDuration = travelEntertainmentAuthDataDuration; - this.TravelEntertainmentAuthDataMarket = travelEntertainmentAuthDataMarket; - } - - /// - /// A code that corresponds to the category of lodging charges for the payment. Possible values: * 1: Lodging * 2: No show reservation * 3: Advanced deposit - /// - /// A code that corresponds to the category of lodging charges for the payment. Possible values: * 1: Lodging * 2: No show reservation * 3: Advanced deposit - [DataMember(Name = "lodging.SpecialProgramCode", EmitDefaultValue = false)] - public string LodgingSpecialProgramCode { get; set; } - - /// - /// The arrival date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. - /// - /// The arrival date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. - [DataMember(Name = "lodging.checkInDate", EmitDefaultValue = false)] - public string LodgingCheckInDate { get; set; } - - /// - /// The departure date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. - /// - /// The departure date. * Date format: **yyyyMmDd**. For example, for 2023 April 22, **20230422**. - [DataMember(Name = "lodging.checkOutDate", EmitDefaultValue = false)] - public string LodgingCheckOutDate { get; set; } - - /// - /// The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros. - /// - /// The toll-free phone number for the lodging. * Format: numeric * Max length: 17 characters. * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros. - [DataMember(Name = "lodging.customerServiceTollFreeNumber", EmitDefaultValue = false)] - public string LodgingCustomerServiceTollFreeNumber { get; set; } - - /// - /// Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Must be 'Y' or 'N'. * Format: alphabetic * Max length: 1 character - /// - /// Identifies that the facility complies with the Hotel and Motel Fire Safety Act of 1990. Must be 'Y' or 'N'. * Format: alphabetic * Max length: 1 character - [DataMember(Name = "lodging.fireSafetyActIndicator", EmitDefaultValue = false)] - public string LodgingFireSafetyActIndicator { get; set; } - - /// - /// The folio cash advances, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters - /// - /// The folio cash advances, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters - [DataMember(Name = "lodging.folioCashAdvances", EmitDefaultValue = false)] - public string LodgingFolioCashAdvances { get; set; } - - /// - /// The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters * Must not start with a space * Must not contain any special characters * Must not be all zeros. - /// - /// The card acceptor’s internal invoice or billing ID reference number. * Max length: 25 characters * Must not start with a space * Must not contain any special characters * Must not be all zeros. - [DataMember(Name = "lodging.folioNumber", EmitDefaultValue = false)] - public string LodgingFolioNumber { get; set; } - - /// - /// Any charges for food and beverages associated with the booking, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters - /// - /// Any charges for food and beverages associated with the booking, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters - [DataMember(Name = "lodging.foodBeverageCharges", EmitDefaultValue = false)] - public string LodgingFoodBeverageCharges { get; set; } - - /// - /// Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in * **N**: the customer checked in - /// - /// Indicates if the customer didn't check in for their booking. Possible values: * **Y**: the customer didn't check in * **N**: the customer checked in - [DataMember(Name = "lodging.noShowIndicator", EmitDefaultValue = false)] - public string LodgingNoShowIndicator { get; set; } - - /// - /// The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters - /// - /// The prepaid expenses for the booking. * Format: numeric * Max length: 12 characters - [DataMember(Name = "lodging.prepaidExpenses", EmitDefaultValue = false)] - public string LodgingPrepaidExpenses { get; set; } - - /// - /// The lodging property location's phone number. * Format: numeric * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros. - /// - /// The lodging property location's phone number. * Format: numeric * Min length: 10 characters * Max length: 17 characters * For US and CA numbers must be 10 characters in length * Must not start with a space * Must not contain any special characters such as + or - * Must not be all zeros. - [DataMember(Name = "lodging.propertyPhoneNumber", EmitDefaultValue = false)] - public string LodgingPropertyPhoneNumber { get; set; } - - /// - /// The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 4 characters - /// - /// The total number of nights the room is booked for. * Format: numeric * Must be a number between 0 and 99 * Max length: 4 characters - [DataMember(Name = "lodging.room1.numberOfNights", EmitDefaultValue = false)] - public string LodgingRoom1NumberOfNights { get; set; } - - /// - /// The rate for the room, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number - /// - /// The rate for the room, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number - [DataMember(Name = "lodging.room1.rate", EmitDefaultValue = false)] - public string LodgingRoom1Rate { get; set; } - - /// - /// The total room tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number - /// - /// The total room tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number - [DataMember(Name = "lodging.totalRoomTax", EmitDefaultValue = false)] - public string LodgingTotalRoomTax { get; set; } - - /// - /// The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number - /// - /// The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Format: numeric * Max length: 12 characters * Must not be a negative number - [DataMember(Name = "lodging.totalTax", EmitDefaultValue = false)] - public string LodgingTotalTax { get; set; } - - /// - /// The number of nights. This should be included in the auth message. * Format: numeric * Max length: 4 characters - /// - /// The number of nights. This should be included in the auth message. * Format: numeric * Max length: 4 characters - [DataMember(Name = "travelEntertainmentAuthData.duration", EmitDefaultValue = false)] - public string TravelEntertainmentAuthDataDuration { get; set; } - - /// - /// Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character - /// - /// Indicates what market-specific dataset will be submitted. Must be 'H' for Hotel. This should be included in the auth message. * Format: alphanumeric * Max length: 1 character - [DataMember(Name = "travelEntertainmentAuthData.market", EmitDefaultValue = false)] - public string TravelEntertainmentAuthDataMarket { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataLodging {\n"); - sb.Append(" LodgingSpecialProgramCode: ").Append(LodgingSpecialProgramCode).Append("\n"); - sb.Append(" LodgingCheckInDate: ").Append(LodgingCheckInDate).Append("\n"); - sb.Append(" LodgingCheckOutDate: ").Append(LodgingCheckOutDate).Append("\n"); - sb.Append(" LodgingCustomerServiceTollFreeNumber: ").Append(LodgingCustomerServiceTollFreeNumber).Append("\n"); - sb.Append(" LodgingFireSafetyActIndicator: ").Append(LodgingFireSafetyActIndicator).Append("\n"); - sb.Append(" LodgingFolioCashAdvances: ").Append(LodgingFolioCashAdvances).Append("\n"); - sb.Append(" LodgingFolioNumber: ").Append(LodgingFolioNumber).Append("\n"); - sb.Append(" LodgingFoodBeverageCharges: ").Append(LodgingFoodBeverageCharges).Append("\n"); - sb.Append(" LodgingNoShowIndicator: ").Append(LodgingNoShowIndicator).Append("\n"); - sb.Append(" LodgingPrepaidExpenses: ").Append(LodgingPrepaidExpenses).Append("\n"); - sb.Append(" LodgingPropertyPhoneNumber: ").Append(LodgingPropertyPhoneNumber).Append("\n"); - sb.Append(" LodgingRoom1NumberOfNights: ").Append(LodgingRoom1NumberOfNights).Append("\n"); - sb.Append(" LodgingRoom1Rate: ").Append(LodgingRoom1Rate).Append("\n"); - sb.Append(" LodgingTotalRoomTax: ").Append(LodgingTotalRoomTax).Append("\n"); - sb.Append(" LodgingTotalTax: ").Append(LodgingTotalTax).Append("\n"); - sb.Append(" TravelEntertainmentAuthDataDuration: ").Append(TravelEntertainmentAuthDataDuration).Append("\n"); - sb.Append(" TravelEntertainmentAuthDataMarket: ").Append(TravelEntertainmentAuthDataMarket).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataLodging); - } - - /// - /// Returns true if AdditionalDataLodging instances are equal - /// - /// Instance of AdditionalDataLodging to be compared - /// Boolean - public bool Equals(AdditionalDataLodging input) - { - if (input == null) - { - return false; - } - return - ( - this.LodgingSpecialProgramCode == input.LodgingSpecialProgramCode || - (this.LodgingSpecialProgramCode != null && - this.LodgingSpecialProgramCode.Equals(input.LodgingSpecialProgramCode)) - ) && - ( - this.LodgingCheckInDate == input.LodgingCheckInDate || - (this.LodgingCheckInDate != null && - this.LodgingCheckInDate.Equals(input.LodgingCheckInDate)) - ) && - ( - this.LodgingCheckOutDate == input.LodgingCheckOutDate || - (this.LodgingCheckOutDate != null && - this.LodgingCheckOutDate.Equals(input.LodgingCheckOutDate)) - ) && - ( - this.LodgingCustomerServiceTollFreeNumber == input.LodgingCustomerServiceTollFreeNumber || - (this.LodgingCustomerServiceTollFreeNumber != null && - this.LodgingCustomerServiceTollFreeNumber.Equals(input.LodgingCustomerServiceTollFreeNumber)) - ) && - ( - this.LodgingFireSafetyActIndicator == input.LodgingFireSafetyActIndicator || - (this.LodgingFireSafetyActIndicator != null && - this.LodgingFireSafetyActIndicator.Equals(input.LodgingFireSafetyActIndicator)) - ) && - ( - this.LodgingFolioCashAdvances == input.LodgingFolioCashAdvances || - (this.LodgingFolioCashAdvances != null && - this.LodgingFolioCashAdvances.Equals(input.LodgingFolioCashAdvances)) - ) && - ( - this.LodgingFolioNumber == input.LodgingFolioNumber || - (this.LodgingFolioNumber != null && - this.LodgingFolioNumber.Equals(input.LodgingFolioNumber)) - ) && - ( - this.LodgingFoodBeverageCharges == input.LodgingFoodBeverageCharges || - (this.LodgingFoodBeverageCharges != null && - this.LodgingFoodBeverageCharges.Equals(input.LodgingFoodBeverageCharges)) - ) && - ( - this.LodgingNoShowIndicator == input.LodgingNoShowIndicator || - (this.LodgingNoShowIndicator != null && - this.LodgingNoShowIndicator.Equals(input.LodgingNoShowIndicator)) - ) && - ( - this.LodgingPrepaidExpenses == input.LodgingPrepaidExpenses || - (this.LodgingPrepaidExpenses != null && - this.LodgingPrepaidExpenses.Equals(input.LodgingPrepaidExpenses)) - ) && - ( - this.LodgingPropertyPhoneNumber == input.LodgingPropertyPhoneNumber || - (this.LodgingPropertyPhoneNumber != null && - this.LodgingPropertyPhoneNumber.Equals(input.LodgingPropertyPhoneNumber)) - ) && - ( - this.LodgingRoom1NumberOfNights == input.LodgingRoom1NumberOfNights || - (this.LodgingRoom1NumberOfNights != null && - this.LodgingRoom1NumberOfNights.Equals(input.LodgingRoom1NumberOfNights)) - ) && - ( - this.LodgingRoom1Rate == input.LodgingRoom1Rate || - (this.LodgingRoom1Rate != null && - this.LodgingRoom1Rate.Equals(input.LodgingRoom1Rate)) - ) && - ( - this.LodgingTotalRoomTax == input.LodgingTotalRoomTax || - (this.LodgingTotalRoomTax != null && - this.LodgingTotalRoomTax.Equals(input.LodgingTotalRoomTax)) - ) && - ( - this.LodgingTotalTax == input.LodgingTotalTax || - (this.LodgingTotalTax != null && - this.LodgingTotalTax.Equals(input.LodgingTotalTax)) - ) && - ( - this.TravelEntertainmentAuthDataDuration == input.TravelEntertainmentAuthDataDuration || - (this.TravelEntertainmentAuthDataDuration != null && - this.TravelEntertainmentAuthDataDuration.Equals(input.TravelEntertainmentAuthDataDuration)) - ) && - ( - this.TravelEntertainmentAuthDataMarket == input.TravelEntertainmentAuthDataMarket || - (this.TravelEntertainmentAuthDataMarket != null && - this.TravelEntertainmentAuthDataMarket.Equals(input.TravelEntertainmentAuthDataMarket)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LodgingSpecialProgramCode != null) - { - hashCode = (hashCode * 59) + this.LodgingSpecialProgramCode.GetHashCode(); - } - if (this.LodgingCheckInDate != null) - { - hashCode = (hashCode * 59) + this.LodgingCheckInDate.GetHashCode(); - } - if (this.LodgingCheckOutDate != null) - { - hashCode = (hashCode * 59) + this.LodgingCheckOutDate.GetHashCode(); - } - if (this.LodgingCustomerServiceTollFreeNumber != null) - { - hashCode = (hashCode * 59) + this.LodgingCustomerServiceTollFreeNumber.GetHashCode(); - } - if (this.LodgingFireSafetyActIndicator != null) - { - hashCode = (hashCode * 59) + this.LodgingFireSafetyActIndicator.GetHashCode(); - } - if (this.LodgingFolioCashAdvances != null) - { - hashCode = (hashCode * 59) + this.LodgingFolioCashAdvances.GetHashCode(); - } - if (this.LodgingFolioNumber != null) - { - hashCode = (hashCode * 59) + this.LodgingFolioNumber.GetHashCode(); - } - if (this.LodgingFoodBeverageCharges != null) - { - hashCode = (hashCode * 59) + this.LodgingFoodBeverageCharges.GetHashCode(); - } - if (this.LodgingNoShowIndicator != null) - { - hashCode = (hashCode * 59) + this.LodgingNoShowIndicator.GetHashCode(); - } - if (this.LodgingPrepaidExpenses != null) - { - hashCode = (hashCode * 59) + this.LodgingPrepaidExpenses.GetHashCode(); - } - if (this.LodgingPropertyPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.LodgingPropertyPhoneNumber.GetHashCode(); - } - if (this.LodgingRoom1NumberOfNights != null) - { - hashCode = (hashCode * 59) + this.LodgingRoom1NumberOfNights.GetHashCode(); - } - if (this.LodgingRoom1Rate != null) - { - hashCode = (hashCode * 59) + this.LodgingRoom1Rate.GetHashCode(); - } - if (this.LodgingTotalRoomTax != null) - { - hashCode = (hashCode * 59) + this.LodgingTotalRoomTax.GetHashCode(); - } - if (this.LodgingTotalTax != null) - { - hashCode = (hashCode * 59) + this.LodgingTotalTax.GetHashCode(); - } - if (this.TravelEntertainmentAuthDataDuration != null) - { - hashCode = (hashCode * 59) + this.TravelEntertainmentAuthDataDuration.GetHashCode(); - } - if (this.TravelEntertainmentAuthDataMarket != null) - { - hashCode = (hashCode * 59) + this.TravelEntertainmentAuthDataMarket.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataOpenInvoice.cs b/Adyen/Model/Checkout/AdditionalDataOpenInvoice.cs deleted file mode 100644 index 8b3216c85..000000000 --- a/Adyen/Model/Checkout/AdditionalDataOpenInvoice.cs +++ /dev/null @@ -1,452 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataOpenInvoice - /// - [DataContract(Name = "AdditionalDataOpenInvoice")] - public partial class AdditionalDataOpenInvoice : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Holds different merchant data points like product, purchase, customer, and so on. It takes data in a Base64 encoded string. The `merchantData` parameter needs to be added to the `openinvoicedata` signature at the end. Since the field is optional, if it's not included it does not impact computing the merchant signature. Applies only to Klarna. You can contact Klarna for the format and structure of the string.. - /// The number of invoice lines included in `openinvoicedata`. There needs to be at least one line, so `numberOfLines` needs to be at least 1.. - /// First name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna.. - /// Last name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna.. - /// The three-character ISO currency code.. - /// A text description of the product the invoice line refers to.. - /// The price for one item in the invoice line, represented in minor units. The due amount for the item, VAT excluded.. - /// A unique id for this item. Required for RatePay if the description of each item is not unique.. - /// The VAT due for one item in the invoice line, represented in minor units.. - /// The VAT percentage for one item in the invoice line, represented in minor units. For example, 19% VAT is specified as 1900.. - /// The number of units purchased of a specific product.. - /// Name of the shipping company handling the the return shipment.. - /// The tracking number for the return of the shipment.. - /// URI where the customer can track the return of their shipment.. - /// Name of the shipping company handling the delivery.. - /// Shipping method.. - /// The tracking number for the shipment.. - /// URI where the customer can track their shipment.. - public AdditionalDataOpenInvoice(string openinvoicedataMerchantData = default(string), string openinvoicedataNumberOfLines = default(string), string openinvoicedataRecipientFirstName = default(string), string openinvoicedataRecipientLastName = default(string), string openinvoicedataLineItemNrCurrencyCode = default(string), string openinvoicedataLineItemNrDescription = default(string), string openinvoicedataLineItemNrItemAmount = default(string), string openinvoicedataLineItemNrItemId = default(string), string openinvoicedataLineItemNrItemVatAmount = default(string), string openinvoicedataLineItemNrItemVatPercentage = default(string), string openinvoicedataLineItemNrNumberOfItems = default(string), string openinvoicedataLineItemNrReturnShippingCompany = default(string), string openinvoicedataLineItemNrReturnTrackingNumber = default(string), string openinvoicedataLineItemNrReturnTrackingUri = default(string), string openinvoicedataLineItemNrShippingCompany = default(string), string openinvoicedataLineItemNrShippingMethod = default(string), string openinvoicedataLineItemNrTrackingNumber = default(string), string openinvoicedataLineItemNrTrackingUri = default(string)) - { - this.OpeninvoicedataMerchantData = openinvoicedataMerchantData; - this.OpeninvoicedataNumberOfLines = openinvoicedataNumberOfLines; - this.OpeninvoicedataRecipientFirstName = openinvoicedataRecipientFirstName; - this.OpeninvoicedataRecipientLastName = openinvoicedataRecipientLastName; - this.OpeninvoicedataLineItemNrCurrencyCode = openinvoicedataLineItemNrCurrencyCode; - this.OpeninvoicedataLineItemNrDescription = openinvoicedataLineItemNrDescription; - this.OpeninvoicedataLineItemNrItemAmount = openinvoicedataLineItemNrItemAmount; - this.OpeninvoicedataLineItemNrItemId = openinvoicedataLineItemNrItemId; - this.OpeninvoicedataLineItemNrItemVatAmount = openinvoicedataLineItemNrItemVatAmount; - this.OpeninvoicedataLineItemNrItemVatPercentage = openinvoicedataLineItemNrItemVatPercentage; - this.OpeninvoicedataLineItemNrNumberOfItems = openinvoicedataLineItemNrNumberOfItems; - this.OpeninvoicedataLineItemNrReturnShippingCompany = openinvoicedataLineItemNrReturnShippingCompany; - this.OpeninvoicedataLineItemNrReturnTrackingNumber = openinvoicedataLineItemNrReturnTrackingNumber; - this.OpeninvoicedataLineItemNrReturnTrackingUri = openinvoicedataLineItemNrReturnTrackingUri; - this.OpeninvoicedataLineItemNrShippingCompany = openinvoicedataLineItemNrShippingCompany; - this.OpeninvoicedataLineItemNrShippingMethod = openinvoicedataLineItemNrShippingMethod; - this.OpeninvoicedataLineItemNrTrackingNumber = openinvoicedataLineItemNrTrackingNumber; - this.OpeninvoicedataLineItemNrTrackingUri = openinvoicedataLineItemNrTrackingUri; - } - - /// - /// Holds different merchant data points like product, purchase, customer, and so on. It takes data in a Base64 encoded string. The `merchantData` parameter needs to be added to the `openinvoicedata` signature at the end. Since the field is optional, if it's not included it does not impact computing the merchant signature. Applies only to Klarna. You can contact Klarna for the format and structure of the string. - /// - /// Holds different merchant data points like product, purchase, customer, and so on. It takes data in a Base64 encoded string. The `merchantData` parameter needs to be added to the `openinvoicedata` signature at the end. Since the field is optional, if it's not included it does not impact computing the merchant signature. Applies only to Klarna. You can contact Klarna for the format and structure of the string. - [DataMember(Name = "openinvoicedata.merchantData", EmitDefaultValue = false)] - public string OpeninvoicedataMerchantData { get; set; } - - /// - /// The number of invoice lines included in `openinvoicedata`. There needs to be at least one line, so `numberOfLines` needs to be at least 1. - /// - /// The number of invoice lines included in `openinvoicedata`. There needs to be at least one line, so `numberOfLines` needs to be at least 1. - [DataMember(Name = "openinvoicedata.numberOfLines", EmitDefaultValue = false)] - public string OpeninvoicedataNumberOfLines { get; set; } - - /// - /// First name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna. - /// - /// First name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna. - [DataMember(Name = "openinvoicedata.recipientFirstName", EmitDefaultValue = false)] - public string OpeninvoicedataRecipientFirstName { get; set; } - - /// - /// Last name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna. - /// - /// Last name of the recipient. If the delivery address and the billing address are different, specify the `recipientFirstName` and `recipientLastName` to share the delivery address with Klarna. Otherwise, only the billing address is shared with Klarna. - [DataMember(Name = "openinvoicedata.recipientLastName", EmitDefaultValue = false)] - public string OpeninvoicedataRecipientLastName { get; set; } - - /// - /// The three-character ISO currency code. - /// - /// The three-character ISO currency code. - [DataMember(Name = "openinvoicedataLine[itemNr].currencyCode", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrCurrencyCode { get; set; } - - /// - /// A text description of the product the invoice line refers to. - /// - /// A text description of the product the invoice line refers to. - [DataMember(Name = "openinvoicedataLine[itemNr].description", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrDescription { get; set; } - - /// - /// The price for one item in the invoice line, represented in minor units. The due amount for the item, VAT excluded. - /// - /// The price for one item in the invoice line, represented in minor units. The due amount for the item, VAT excluded. - [DataMember(Name = "openinvoicedataLine[itemNr].itemAmount", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrItemAmount { get; set; } - - /// - /// A unique id for this item. Required for RatePay if the description of each item is not unique. - /// - /// A unique id for this item. Required for RatePay if the description of each item is not unique. - [DataMember(Name = "openinvoicedataLine[itemNr].itemId", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrItemId { get; set; } - - /// - /// The VAT due for one item in the invoice line, represented in minor units. - /// - /// The VAT due for one item in the invoice line, represented in minor units. - [DataMember(Name = "openinvoicedataLine[itemNr].itemVatAmount", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrItemVatAmount { get; set; } - - /// - /// The VAT percentage for one item in the invoice line, represented in minor units. For example, 19% VAT is specified as 1900. - /// - /// The VAT percentage for one item in the invoice line, represented in minor units. For example, 19% VAT is specified as 1900. - [DataMember(Name = "openinvoicedataLine[itemNr].itemVatPercentage", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrItemVatPercentage { get; set; } - - /// - /// The number of units purchased of a specific product. - /// - /// The number of units purchased of a specific product. - [DataMember(Name = "openinvoicedataLine[itemNr].numberOfItems", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrNumberOfItems { get; set; } - - /// - /// Name of the shipping company handling the the return shipment. - /// - /// Name of the shipping company handling the the return shipment. - [DataMember(Name = "openinvoicedataLine[itemNr].returnShippingCompany", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrReturnShippingCompany { get; set; } - - /// - /// The tracking number for the return of the shipment. - /// - /// The tracking number for the return of the shipment. - [DataMember(Name = "openinvoicedataLine[itemNr].returnTrackingNumber", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrReturnTrackingNumber { get; set; } - - /// - /// URI where the customer can track the return of their shipment. - /// - /// URI where the customer can track the return of their shipment. - [DataMember(Name = "openinvoicedataLine[itemNr].returnTrackingUri", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrReturnTrackingUri { get; set; } - - /// - /// Name of the shipping company handling the delivery. - /// - /// Name of the shipping company handling the delivery. - [DataMember(Name = "openinvoicedataLine[itemNr].shippingCompany", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrShippingCompany { get; set; } - - /// - /// Shipping method. - /// - /// Shipping method. - [DataMember(Name = "openinvoicedataLine[itemNr].shippingMethod", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrShippingMethod { get; set; } - - /// - /// The tracking number for the shipment. - /// - /// The tracking number for the shipment. - [DataMember(Name = "openinvoicedataLine[itemNr].trackingNumber", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrTrackingNumber { get; set; } - - /// - /// URI where the customer can track their shipment. - /// - /// URI where the customer can track their shipment. - [DataMember(Name = "openinvoicedataLine[itemNr].trackingUri", EmitDefaultValue = false)] - public string OpeninvoicedataLineItemNrTrackingUri { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataOpenInvoice {\n"); - sb.Append(" OpeninvoicedataMerchantData: ").Append(OpeninvoicedataMerchantData).Append("\n"); - sb.Append(" OpeninvoicedataNumberOfLines: ").Append(OpeninvoicedataNumberOfLines).Append("\n"); - sb.Append(" OpeninvoicedataRecipientFirstName: ").Append(OpeninvoicedataRecipientFirstName).Append("\n"); - sb.Append(" OpeninvoicedataRecipientLastName: ").Append(OpeninvoicedataRecipientLastName).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrCurrencyCode: ").Append(OpeninvoicedataLineItemNrCurrencyCode).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrDescription: ").Append(OpeninvoicedataLineItemNrDescription).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrItemAmount: ").Append(OpeninvoicedataLineItemNrItemAmount).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrItemId: ").Append(OpeninvoicedataLineItemNrItemId).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrItemVatAmount: ").Append(OpeninvoicedataLineItemNrItemVatAmount).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrItemVatPercentage: ").Append(OpeninvoicedataLineItemNrItemVatPercentage).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrNumberOfItems: ").Append(OpeninvoicedataLineItemNrNumberOfItems).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrReturnShippingCompany: ").Append(OpeninvoicedataLineItemNrReturnShippingCompany).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrReturnTrackingNumber: ").Append(OpeninvoicedataLineItemNrReturnTrackingNumber).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrReturnTrackingUri: ").Append(OpeninvoicedataLineItemNrReturnTrackingUri).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrShippingCompany: ").Append(OpeninvoicedataLineItemNrShippingCompany).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrShippingMethod: ").Append(OpeninvoicedataLineItemNrShippingMethod).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrTrackingNumber: ").Append(OpeninvoicedataLineItemNrTrackingNumber).Append("\n"); - sb.Append(" OpeninvoicedataLineItemNrTrackingUri: ").Append(OpeninvoicedataLineItemNrTrackingUri).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataOpenInvoice); - } - - /// - /// Returns true if AdditionalDataOpenInvoice instances are equal - /// - /// Instance of AdditionalDataOpenInvoice to be compared - /// Boolean - public bool Equals(AdditionalDataOpenInvoice input) - { - if (input == null) - { - return false; - } - return - ( - this.OpeninvoicedataMerchantData == input.OpeninvoicedataMerchantData || - (this.OpeninvoicedataMerchantData != null && - this.OpeninvoicedataMerchantData.Equals(input.OpeninvoicedataMerchantData)) - ) && - ( - this.OpeninvoicedataNumberOfLines == input.OpeninvoicedataNumberOfLines || - (this.OpeninvoicedataNumberOfLines != null && - this.OpeninvoicedataNumberOfLines.Equals(input.OpeninvoicedataNumberOfLines)) - ) && - ( - this.OpeninvoicedataRecipientFirstName == input.OpeninvoicedataRecipientFirstName || - (this.OpeninvoicedataRecipientFirstName != null && - this.OpeninvoicedataRecipientFirstName.Equals(input.OpeninvoicedataRecipientFirstName)) - ) && - ( - this.OpeninvoicedataRecipientLastName == input.OpeninvoicedataRecipientLastName || - (this.OpeninvoicedataRecipientLastName != null && - this.OpeninvoicedataRecipientLastName.Equals(input.OpeninvoicedataRecipientLastName)) - ) && - ( - this.OpeninvoicedataLineItemNrCurrencyCode == input.OpeninvoicedataLineItemNrCurrencyCode || - (this.OpeninvoicedataLineItemNrCurrencyCode != null && - this.OpeninvoicedataLineItemNrCurrencyCode.Equals(input.OpeninvoicedataLineItemNrCurrencyCode)) - ) && - ( - this.OpeninvoicedataLineItemNrDescription == input.OpeninvoicedataLineItemNrDescription || - (this.OpeninvoicedataLineItemNrDescription != null && - this.OpeninvoicedataLineItemNrDescription.Equals(input.OpeninvoicedataLineItemNrDescription)) - ) && - ( - this.OpeninvoicedataLineItemNrItemAmount == input.OpeninvoicedataLineItemNrItemAmount || - (this.OpeninvoicedataLineItemNrItemAmount != null && - this.OpeninvoicedataLineItemNrItemAmount.Equals(input.OpeninvoicedataLineItemNrItemAmount)) - ) && - ( - this.OpeninvoicedataLineItemNrItemId == input.OpeninvoicedataLineItemNrItemId || - (this.OpeninvoicedataLineItemNrItemId != null && - this.OpeninvoicedataLineItemNrItemId.Equals(input.OpeninvoicedataLineItemNrItemId)) - ) && - ( - this.OpeninvoicedataLineItemNrItemVatAmount == input.OpeninvoicedataLineItemNrItemVatAmount || - (this.OpeninvoicedataLineItemNrItemVatAmount != null && - this.OpeninvoicedataLineItemNrItemVatAmount.Equals(input.OpeninvoicedataLineItemNrItemVatAmount)) - ) && - ( - this.OpeninvoicedataLineItemNrItemVatPercentage == input.OpeninvoicedataLineItemNrItemVatPercentage || - (this.OpeninvoicedataLineItemNrItemVatPercentage != null && - this.OpeninvoicedataLineItemNrItemVatPercentage.Equals(input.OpeninvoicedataLineItemNrItemVatPercentage)) - ) && - ( - this.OpeninvoicedataLineItemNrNumberOfItems == input.OpeninvoicedataLineItemNrNumberOfItems || - (this.OpeninvoicedataLineItemNrNumberOfItems != null && - this.OpeninvoicedataLineItemNrNumberOfItems.Equals(input.OpeninvoicedataLineItemNrNumberOfItems)) - ) && - ( - this.OpeninvoicedataLineItemNrReturnShippingCompany == input.OpeninvoicedataLineItemNrReturnShippingCompany || - (this.OpeninvoicedataLineItemNrReturnShippingCompany != null && - this.OpeninvoicedataLineItemNrReturnShippingCompany.Equals(input.OpeninvoicedataLineItemNrReturnShippingCompany)) - ) && - ( - this.OpeninvoicedataLineItemNrReturnTrackingNumber == input.OpeninvoicedataLineItemNrReturnTrackingNumber || - (this.OpeninvoicedataLineItemNrReturnTrackingNumber != null && - this.OpeninvoicedataLineItemNrReturnTrackingNumber.Equals(input.OpeninvoicedataLineItemNrReturnTrackingNumber)) - ) && - ( - this.OpeninvoicedataLineItemNrReturnTrackingUri == input.OpeninvoicedataLineItemNrReturnTrackingUri || - (this.OpeninvoicedataLineItemNrReturnTrackingUri != null && - this.OpeninvoicedataLineItemNrReturnTrackingUri.Equals(input.OpeninvoicedataLineItemNrReturnTrackingUri)) - ) && - ( - this.OpeninvoicedataLineItemNrShippingCompany == input.OpeninvoicedataLineItemNrShippingCompany || - (this.OpeninvoicedataLineItemNrShippingCompany != null && - this.OpeninvoicedataLineItemNrShippingCompany.Equals(input.OpeninvoicedataLineItemNrShippingCompany)) - ) && - ( - this.OpeninvoicedataLineItemNrShippingMethod == input.OpeninvoicedataLineItemNrShippingMethod || - (this.OpeninvoicedataLineItemNrShippingMethod != null && - this.OpeninvoicedataLineItemNrShippingMethod.Equals(input.OpeninvoicedataLineItemNrShippingMethod)) - ) && - ( - this.OpeninvoicedataLineItemNrTrackingNumber == input.OpeninvoicedataLineItemNrTrackingNumber || - (this.OpeninvoicedataLineItemNrTrackingNumber != null && - this.OpeninvoicedataLineItemNrTrackingNumber.Equals(input.OpeninvoicedataLineItemNrTrackingNumber)) - ) && - ( - this.OpeninvoicedataLineItemNrTrackingUri == input.OpeninvoicedataLineItemNrTrackingUri || - (this.OpeninvoicedataLineItemNrTrackingUri != null && - this.OpeninvoicedataLineItemNrTrackingUri.Equals(input.OpeninvoicedataLineItemNrTrackingUri)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OpeninvoicedataMerchantData != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataMerchantData.GetHashCode(); - } - if (this.OpeninvoicedataNumberOfLines != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataNumberOfLines.GetHashCode(); - } - if (this.OpeninvoicedataRecipientFirstName != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataRecipientFirstName.GetHashCode(); - } - if (this.OpeninvoicedataRecipientLastName != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataRecipientLastName.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrCurrencyCode != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrCurrencyCode.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrDescription != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrDescription.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrItemAmount != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrItemAmount.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrItemId != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrItemId.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrItemVatAmount != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrItemVatAmount.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrItemVatPercentage != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrItemVatPercentage.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrNumberOfItems != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrNumberOfItems.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrReturnShippingCompany != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrReturnShippingCompany.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrReturnTrackingNumber != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrReturnTrackingNumber.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrReturnTrackingUri != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrReturnTrackingUri.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrShippingCompany != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrShippingCompany.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrShippingMethod != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrShippingMethod.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrTrackingNumber != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrTrackingNumber.GetHashCode(); - } - if (this.OpeninvoicedataLineItemNrTrackingUri != null) - { - hashCode = (hashCode * 59) + this.OpeninvoicedataLineItemNrTrackingUri.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataOpi.cs b/Adyen/Model/Checkout/AdditionalDataOpi.cs deleted file mode 100644 index 19f3a472f..000000000 --- a/Adyen/Model/Checkout/AdditionalDataOpi.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataOpi - /// - [DataContract(Name = "AdditionalDataOpi")] - public partial class AdditionalDataOpi : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Optional boolean indicator. Set to **true** if you want an ecommerce transaction to return an `opi.transToken` as additional data in the response. You can store this Oracle Payment Interface token in your Oracle Opera database. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce).. - public AdditionalDataOpi(string opiIncludeTransToken = default(string)) - { - this.OpiIncludeTransToken = opiIncludeTransToken; - } - - /// - /// Optional boolean indicator. Set to **true** if you want an ecommerce transaction to return an `opi.transToken` as additional data in the response. You can store this Oracle Payment Interface token in your Oracle Opera database. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). - /// - /// Optional boolean indicator. Set to **true** if you want an ecommerce transaction to return an `opi.transToken` as additional data in the response. You can store this Oracle Payment Interface token in your Oracle Opera database. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). - [DataMember(Name = "opi.includeTransToken", EmitDefaultValue = false)] - public string OpiIncludeTransToken { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataOpi {\n"); - sb.Append(" OpiIncludeTransToken: ").Append(OpiIncludeTransToken).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataOpi); - } - - /// - /// Returns true if AdditionalDataOpi instances are equal - /// - /// Instance of AdditionalDataOpi to be compared - /// Boolean - public bool Equals(AdditionalDataOpi input) - { - if (input == null) - { - return false; - } - return - ( - this.OpiIncludeTransToken == input.OpiIncludeTransToken || - (this.OpiIncludeTransToken != null && - this.OpiIncludeTransToken.Equals(input.OpiIncludeTransToken)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OpiIncludeTransToken != null) - { - hashCode = (hashCode * 59) + this.OpiIncludeTransToken.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataRatepay.cs b/Adyen/Model/Checkout/AdditionalDataRatepay.cs deleted file mode 100644 index 9e8a5a351..000000000 --- a/Adyen/Model/Checkout/AdditionalDataRatepay.cs +++ /dev/null @@ -1,262 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataRatepay - /// - [DataContract(Name = "AdditionalDataRatepay")] - public partial class AdditionalDataRatepay : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Amount the customer has to pay each month.. - /// Interest rate of this installment.. - /// Amount of the last installment.. - /// Calendar day of the first payment.. - /// Date the merchant delivered the goods to the customer.. - /// Date by which the customer must settle the payment.. - /// Invoice date, defined by the merchant. If not included, the invoice date is set to the delivery date.. - /// Identification name or number for the invoice, defined by the merchant.. - public AdditionalDataRatepay(string ratepayInstallmentAmount = default(string), string ratepayInterestRate = default(string), string ratepayLastInstallmentAmount = default(string), string ratepayPaymentFirstday = default(string), string ratepaydataDeliveryDate = default(string), string ratepaydataDueDate = default(string), string ratepaydataInvoiceDate = default(string), string ratepaydataInvoiceId = default(string)) - { - this.RatepayInstallmentAmount = ratepayInstallmentAmount; - this.RatepayInterestRate = ratepayInterestRate; - this.RatepayLastInstallmentAmount = ratepayLastInstallmentAmount; - this.RatepayPaymentFirstday = ratepayPaymentFirstday; - this.RatepaydataDeliveryDate = ratepaydataDeliveryDate; - this.RatepaydataDueDate = ratepaydataDueDate; - this.RatepaydataInvoiceDate = ratepaydataInvoiceDate; - this.RatepaydataInvoiceId = ratepaydataInvoiceId; - } - - /// - /// Amount the customer has to pay each month. - /// - /// Amount the customer has to pay each month. - [DataMember(Name = "ratepay.installmentAmount", EmitDefaultValue = false)] - public string RatepayInstallmentAmount { get; set; } - - /// - /// Interest rate of this installment. - /// - /// Interest rate of this installment. - [DataMember(Name = "ratepay.interestRate", EmitDefaultValue = false)] - public string RatepayInterestRate { get; set; } - - /// - /// Amount of the last installment. - /// - /// Amount of the last installment. - [DataMember(Name = "ratepay.lastInstallmentAmount", EmitDefaultValue = false)] - public string RatepayLastInstallmentAmount { get; set; } - - /// - /// Calendar day of the first payment. - /// - /// Calendar day of the first payment. - [DataMember(Name = "ratepay.paymentFirstday", EmitDefaultValue = false)] - public string RatepayPaymentFirstday { get; set; } - - /// - /// Date the merchant delivered the goods to the customer. - /// - /// Date the merchant delivered the goods to the customer. - [DataMember(Name = "ratepaydata.deliveryDate", EmitDefaultValue = false)] - public string RatepaydataDeliveryDate { get; set; } - - /// - /// Date by which the customer must settle the payment. - /// - /// Date by which the customer must settle the payment. - [DataMember(Name = "ratepaydata.dueDate", EmitDefaultValue = false)] - public string RatepaydataDueDate { get; set; } - - /// - /// Invoice date, defined by the merchant. If not included, the invoice date is set to the delivery date. - /// - /// Invoice date, defined by the merchant. If not included, the invoice date is set to the delivery date. - [DataMember(Name = "ratepaydata.invoiceDate", EmitDefaultValue = false)] - public string RatepaydataInvoiceDate { get; set; } - - /// - /// Identification name or number for the invoice, defined by the merchant. - /// - /// Identification name or number for the invoice, defined by the merchant. - [DataMember(Name = "ratepaydata.invoiceId", EmitDefaultValue = false)] - public string RatepaydataInvoiceId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataRatepay {\n"); - sb.Append(" RatepayInstallmentAmount: ").Append(RatepayInstallmentAmount).Append("\n"); - sb.Append(" RatepayInterestRate: ").Append(RatepayInterestRate).Append("\n"); - sb.Append(" RatepayLastInstallmentAmount: ").Append(RatepayLastInstallmentAmount).Append("\n"); - sb.Append(" RatepayPaymentFirstday: ").Append(RatepayPaymentFirstday).Append("\n"); - sb.Append(" RatepaydataDeliveryDate: ").Append(RatepaydataDeliveryDate).Append("\n"); - sb.Append(" RatepaydataDueDate: ").Append(RatepaydataDueDate).Append("\n"); - sb.Append(" RatepaydataInvoiceDate: ").Append(RatepaydataInvoiceDate).Append("\n"); - sb.Append(" RatepaydataInvoiceId: ").Append(RatepaydataInvoiceId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataRatepay); - } - - /// - /// Returns true if AdditionalDataRatepay instances are equal - /// - /// Instance of AdditionalDataRatepay to be compared - /// Boolean - public bool Equals(AdditionalDataRatepay input) - { - if (input == null) - { - return false; - } - return - ( - this.RatepayInstallmentAmount == input.RatepayInstallmentAmount || - (this.RatepayInstallmentAmount != null && - this.RatepayInstallmentAmount.Equals(input.RatepayInstallmentAmount)) - ) && - ( - this.RatepayInterestRate == input.RatepayInterestRate || - (this.RatepayInterestRate != null && - this.RatepayInterestRate.Equals(input.RatepayInterestRate)) - ) && - ( - this.RatepayLastInstallmentAmount == input.RatepayLastInstallmentAmount || - (this.RatepayLastInstallmentAmount != null && - this.RatepayLastInstallmentAmount.Equals(input.RatepayLastInstallmentAmount)) - ) && - ( - this.RatepayPaymentFirstday == input.RatepayPaymentFirstday || - (this.RatepayPaymentFirstday != null && - this.RatepayPaymentFirstday.Equals(input.RatepayPaymentFirstday)) - ) && - ( - this.RatepaydataDeliveryDate == input.RatepaydataDeliveryDate || - (this.RatepaydataDeliveryDate != null && - this.RatepaydataDeliveryDate.Equals(input.RatepaydataDeliveryDate)) - ) && - ( - this.RatepaydataDueDate == input.RatepaydataDueDate || - (this.RatepaydataDueDate != null && - this.RatepaydataDueDate.Equals(input.RatepaydataDueDate)) - ) && - ( - this.RatepaydataInvoiceDate == input.RatepaydataInvoiceDate || - (this.RatepaydataInvoiceDate != null && - this.RatepaydataInvoiceDate.Equals(input.RatepaydataInvoiceDate)) - ) && - ( - this.RatepaydataInvoiceId == input.RatepaydataInvoiceId || - (this.RatepaydataInvoiceId != null && - this.RatepaydataInvoiceId.Equals(input.RatepaydataInvoiceId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RatepayInstallmentAmount != null) - { - hashCode = (hashCode * 59) + this.RatepayInstallmentAmount.GetHashCode(); - } - if (this.RatepayInterestRate != null) - { - hashCode = (hashCode * 59) + this.RatepayInterestRate.GetHashCode(); - } - if (this.RatepayLastInstallmentAmount != null) - { - hashCode = (hashCode * 59) + this.RatepayLastInstallmentAmount.GetHashCode(); - } - if (this.RatepayPaymentFirstday != null) - { - hashCode = (hashCode * 59) + this.RatepayPaymentFirstday.GetHashCode(); - } - if (this.RatepaydataDeliveryDate != null) - { - hashCode = (hashCode * 59) + this.RatepaydataDeliveryDate.GetHashCode(); - } - if (this.RatepaydataDueDate != null) - { - hashCode = (hashCode * 59) + this.RatepaydataDueDate.GetHashCode(); - } - if (this.RatepaydataInvoiceDate != null) - { - hashCode = (hashCode * 59) + this.RatepaydataInvoiceDate.GetHashCode(); - } - if (this.RatepaydataInvoiceId != null) - { - hashCode = (hashCode * 59) + this.RatepaydataInvoiceId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataRetry.cs b/Adyen/Model/Checkout/AdditionalDataRetry.cs deleted file mode 100644 index 80d25b5b4..000000000 --- a/Adyen/Model/Checkout/AdditionalDataRetry.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataRetry - /// - [DataContract(Name = "AdditionalDataRetry")] - public partial class AdditionalDataRetry : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The number of times the transaction (not order) has been retried between different payment service providers. For instance, the `chainAttemptNumber` set to 2 means that this transaction has been recently tried on another provider before being sent to Adyen. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together.. - /// The index of the attempt to bill a particular order, which is identified by the `merchantOrderReference` field. For example, if a recurring transaction fails and is retried one day later, then the order number for these attempts would be 1 and 2, respectively. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together.. - /// The Boolean value indicating whether Adyen should skip or retry this transaction, if possible. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together.. - public AdditionalDataRetry(string retryChainAttemptNumber = default(string), string retryOrderAttemptNumber = default(string), string retrySkipRetry = default(string)) - { - this.RetryChainAttemptNumber = retryChainAttemptNumber; - this.RetryOrderAttemptNumber = retryOrderAttemptNumber; - this.RetrySkipRetry = retrySkipRetry; - } - - /// - /// The number of times the transaction (not order) has been retried between different payment service providers. For instance, the `chainAttemptNumber` set to 2 means that this transaction has been recently tried on another provider before being sent to Adyen. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - /// - /// The number of times the transaction (not order) has been retried between different payment service providers. For instance, the `chainAttemptNumber` set to 2 means that this transaction has been recently tried on another provider before being sent to Adyen. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - [DataMember(Name = "retry.chainAttemptNumber", EmitDefaultValue = false)] - public string RetryChainAttemptNumber { get; set; } - - /// - /// The index of the attempt to bill a particular order, which is identified by the `merchantOrderReference` field. For example, if a recurring transaction fails and is retried one day later, then the order number for these attempts would be 1 and 2, respectively. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - /// - /// The index of the attempt to bill a particular order, which is identified by the `merchantOrderReference` field. For example, if a recurring transaction fails and is retried one day later, then the order number for these attempts would be 1 and 2, respectively. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - [DataMember(Name = "retry.orderAttemptNumber", EmitDefaultValue = false)] - public string RetryOrderAttemptNumber { get; set; } - - /// - /// The Boolean value indicating whether Adyen should skip or retry this transaction, if possible. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - /// - /// The Boolean value indicating whether Adyen should skip or retry this transaction, if possible. > If you submit `retry.chainAttemptNumber`, `retry.orderAttemptNumber`, and `retry.skipRetry` values, we also recommend you provide the `merchantOrderReference` to facilitate linking payment attempts together. - [DataMember(Name = "retry.skipRetry", EmitDefaultValue = false)] - public string RetrySkipRetry { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataRetry {\n"); - sb.Append(" RetryChainAttemptNumber: ").Append(RetryChainAttemptNumber).Append("\n"); - sb.Append(" RetryOrderAttemptNumber: ").Append(RetryOrderAttemptNumber).Append("\n"); - sb.Append(" RetrySkipRetry: ").Append(RetrySkipRetry).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataRetry); - } - - /// - /// Returns true if AdditionalDataRetry instances are equal - /// - /// Instance of AdditionalDataRetry to be compared - /// Boolean - public bool Equals(AdditionalDataRetry input) - { - if (input == null) - { - return false; - } - return - ( - this.RetryChainAttemptNumber == input.RetryChainAttemptNumber || - (this.RetryChainAttemptNumber != null && - this.RetryChainAttemptNumber.Equals(input.RetryChainAttemptNumber)) - ) && - ( - this.RetryOrderAttemptNumber == input.RetryOrderAttemptNumber || - (this.RetryOrderAttemptNumber != null && - this.RetryOrderAttemptNumber.Equals(input.RetryOrderAttemptNumber)) - ) && - ( - this.RetrySkipRetry == input.RetrySkipRetry || - (this.RetrySkipRetry != null && - this.RetrySkipRetry.Equals(input.RetrySkipRetry)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RetryChainAttemptNumber != null) - { - hashCode = (hashCode * 59) + this.RetryChainAttemptNumber.GetHashCode(); - } - if (this.RetryOrderAttemptNumber != null) - { - hashCode = (hashCode * 59) + this.RetryOrderAttemptNumber.GetHashCode(); - } - if (this.RetrySkipRetry != null) - { - hashCode = (hashCode * 59) + this.RetrySkipRetry.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataRisk.cs b/Adyen/Model/Checkout/AdditionalDataRisk.cs deleted file mode 100644 index 734fff71c..000000000 --- a/Adyen/Model/Checkout/AdditionalDataRisk.cs +++ /dev/null @@ -1,509 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataRisk - /// - [DataContract(Name = "AdditionalDataRisk")] - public partial class AdditionalDataRisk : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The data for your custom risk field. For more information, refer to [Create custom risk fields](https://docs.adyen.com/risk-management/configure-custom-risk-rules#step-1-create-custom-risk-fields).. - /// The price of item in the basket, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes).. - /// Brand of the item.. - /// Category of the item.. - /// Color of the item.. - /// The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).. - /// ID of the item.. - /// Manufacturer of the item.. - /// A text description of the product the invoice line refers to.. - /// Quantity of the item purchased.. - /// Email associated with the given product in the basket (usually in electronic gift cards).. - /// Size of the item.. - /// [Stock keeping unit](https://en.wikipedia.org/wiki/Stock_keeping_unit).. - /// [Universal Product Code](https://en.wikipedia.org/wiki/Universal_Product_Code).. - /// Code of the promotion.. - /// The discount amount of the promotion, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes).. - /// The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217).. - /// Promotion's percentage discount. It is represented in percentage value and there is no need to include the '%' sign. e.g. for a promotion discount of 30%, the value of the field should be 30.. - /// Name of the promotion.. - /// Reference number of the risk profile that you want to apply to the payment. If not provided or left blank, the merchant-level account's default risk profile will be applied to the payment. For more information, see [dynamically assign a risk profile to a payment](https://docs.adyen.com/risk-management/create-and-use-risk-profiles#dynamically-assign-a-risk-profile-to-a-payment).. - /// If this parameter is provided with the value **true**, risk checks for the payment request are skipped and the transaction will not get a risk score.. - public AdditionalDataRisk(string riskdataCustomFieldName = default(string), string riskdataBasketItemItemNrAmountPerItem = default(string), string riskdataBasketItemItemNrBrand = default(string), string riskdataBasketItemItemNrCategory = default(string), string riskdataBasketItemItemNrColor = default(string), string riskdataBasketItemItemNrCurrency = default(string), string riskdataBasketItemItemNrItemID = default(string), string riskdataBasketItemItemNrManufacturer = default(string), string riskdataBasketItemItemNrProductTitle = default(string), string riskdataBasketItemItemNrQuantity = default(string), string riskdataBasketItemItemNrReceiverEmail = default(string), string riskdataBasketItemItemNrSize = default(string), string riskdataBasketItemItemNrSku = default(string), string riskdataBasketItemItemNrUpc = default(string), string riskdataPromotionsPromotionItemNrPromotionCode = default(string), string riskdataPromotionsPromotionItemNrPromotionDiscountAmount = default(string), string riskdataPromotionsPromotionItemNrPromotionDiscountCurrency = default(string), string riskdataPromotionsPromotionItemNrPromotionDiscountPercentage = default(string), string riskdataPromotionsPromotionItemNrPromotionName = default(string), string riskdataRiskProfileReference = default(string), string riskdataSkipRisk = default(string)) - { - this.RiskdataCustomFieldName = riskdataCustomFieldName; - this.RiskdataBasketItemItemNrAmountPerItem = riskdataBasketItemItemNrAmountPerItem; - this.RiskdataBasketItemItemNrBrand = riskdataBasketItemItemNrBrand; - this.RiskdataBasketItemItemNrCategory = riskdataBasketItemItemNrCategory; - this.RiskdataBasketItemItemNrColor = riskdataBasketItemItemNrColor; - this.RiskdataBasketItemItemNrCurrency = riskdataBasketItemItemNrCurrency; - this.RiskdataBasketItemItemNrItemID = riskdataBasketItemItemNrItemID; - this.RiskdataBasketItemItemNrManufacturer = riskdataBasketItemItemNrManufacturer; - this.RiskdataBasketItemItemNrProductTitle = riskdataBasketItemItemNrProductTitle; - this.RiskdataBasketItemItemNrQuantity = riskdataBasketItemItemNrQuantity; - this.RiskdataBasketItemItemNrReceiverEmail = riskdataBasketItemItemNrReceiverEmail; - this.RiskdataBasketItemItemNrSize = riskdataBasketItemItemNrSize; - this.RiskdataBasketItemItemNrSku = riskdataBasketItemItemNrSku; - this.RiskdataBasketItemItemNrUpc = riskdataBasketItemItemNrUpc; - this.RiskdataPromotionsPromotionItemNrPromotionCode = riskdataPromotionsPromotionItemNrPromotionCode; - this.RiskdataPromotionsPromotionItemNrPromotionDiscountAmount = riskdataPromotionsPromotionItemNrPromotionDiscountAmount; - this.RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency = riskdataPromotionsPromotionItemNrPromotionDiscountCurrency; - this.RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage = riskdataPromotionsPromotionItemNrPromotionDiscountPercentage; - this.RiskdataPromotionsPromotionItemNrPromotionName = riskdataPromotionsPromotionItemNrPromotionName; - this.RiskdataRiskProfileReference = riskdataRiskProfileReference; - this.RiskdataSkipRisk = riskdataSkipRisk; - } - - /// - /// The data for your custom risk field. For more information, refer to [Create custom risk fields](https://docs.adyen.com/risk-management/configure-custom-risk-rules#step-1-create-custom-risk-fields). - /// - /// The data for your custom risk field. For more information, refer to [Create custom risk fields](https://docs.adyen.com/risk-management/configure-custom-risk-rules#step-1-create-custom-risk-fields). - [DataMember(Name = "riskdata.[customFieldName]", EmitDefaultValue = false)] - public string RiskdataCustomFieldName { get; set; } - - /// - /// The price of item in the basket, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The price of item in the basket, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "riskdata.basket.item[itemNr].amountPerItem", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrAmountPerItem { get; set; } - - /// - /// Brand of the item. - /// - /// Brand of the item. - [DataMember(Name = "riskdata.basket.item[itemNr].brand", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrBrand { get; set; } - - /// - /// Category of the item. - /// - /// Category of the item. - [DataMember(Name = "riskdata.basket.item[itemNr].category", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrCategory { get; set; } - - /// - /// Color of the item. - /// - /// Color of the item. - [DataMember(Name = "riskdata.basket.item[itemNr].color", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrColor { get; set; } - - /// - /// The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - /// - /// The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - [DataMember(Name = "riskdata.basket.item[itemNr].currency", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrCurrency { get; set; } - - /// - /// ID of the item. - /// - /// ID of the item. - [DataMember(Name = "riskdata.basket.item[itemNr].itemID", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrItemID { get; set; } - - /// - /// Manufacturer of the item. - /// - /// Manufacturer of the item. - [DataMember(Name = "riskdata.basket.item[itemNr].manufacturer", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrManufacturer { get; set; } - - /// - /// A text description of the product the invoice line refers to. - /// - /// A text description of the product the invoice line refers to. - [DataMember(Name = "riskdata.basket.item[itemNr].productTitle", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrProductTitle { get; set; } - - /// - /// Quantity of the item purchased. - /// - /// Quantity of the item purchased. - [DataMember(Name = "riskdata.basket.item[itemNr].quantity", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrQuantity { get; set; } - - /// - /// Email associated with the given product in the basket (usually in electronic gift cards). - /// - /// Email associated with the given product in the basket (usually in electronic gift cards). - [DataMember(Name = "riskdata.basket.item[itemNr].receiverEmail", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrReceiverEmail { get; set; } - - /// - /// Size of the item. - /// - /// Size of the item. - [DataMember(Name = "riskdata.basket.item[itemNr].size", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrSize { get; set; } - - /// - /// [Stock keeping unit](https://en.wikipedia.org/wiki/Stock_keeping_unit). - /// - /// [Stock keeping unit](https://en.wikipedia.org/wiki/Stock_keeping_unit). - [DataMember(Name = "riskdata.basket.item[itemNr].sku", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrSku { get; set; } - - /// - /// [Universal Product Code](https://en.wikipedia.org/wiki/Universal_Product_Code). - /// - /// [Universal Product Code](https://en.wikipedia.org/wiki/Universal_Product_Code). - [DataMember(Name = "riskdata.basket.item[itemNr].upc", EmitDefaultValue = false)] - public string RiskdataBasketItemItemNrUpc { get; set; } - - /// - /// Code of the promotion. - /// - /// Code of the promotion. - [DataMember(Name = "riskdata.promotions.promotion[itemNr].promotionCode", EmitDefaultValue = false)] - public string RiskdataPromotionsPromotionItemNrPromotionCode { get; set; } - - /// - /// The discount amount of the promotion, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The discount amount of the promotion, represented in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "riskdata.promotions.promotion[itemNr].promotionDiscountAmount", EmitDefaultValue = false)] - public string RiskdataPromotionsPromotionItemNrPromotionDiscountAmount { get; set; } - - /// - /// The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - /// - /// The three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - [DataMember(Name = "riskdata.promotions.promotion[itemNr].promotionDiscountCurrency", EmitDefaultValue = false)] - public string RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency { get; set; } - - /// - /// Promotion's percentage discount. It is represented in percentage value and there is no need to include the '%' sign. e.g. for a promotion discount of 30%, the value of the field should be 30. - /// - /// Promotion's percentage discount. It is represented in percentage value and there is no need to include the '%' sign. e.g. for a promotion discount of 30%, the value of the field should be 30. - [DataMember(Name = "riskdata.promotions.promotion[itemNr].promotionDiscountPercentage", EmitDefaultValue = false)] - public string RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage { get; set; } - - /// - /// Name of the promotion. - /// - /// Name of the promotion. - [DataMember(Name = "riskdata.promotions.promotion[itemNr].promotionName", EmitDefaultValue = false)] - public string RiskdataPromotionsPromotionItemNrPromotionName { get; set; } - - /// - /// Reference number of the risk profile that you want to apply to the payment. If not provided or left blank, the merchant-level account's default risk profile will be applied to the payment. For more information, see [dynamically assign a risk profile to a payment](https://docs.adyen.com/risk-management/create-and-use-risk-profiles#dynamically-assign-a-risk-profile-to-a-payment). - /// - /// Reference number of the risk profile that you want to apply to the payment. If not provided or left blank, the merchant-level account's default risk profile will be applied to the payment. For more information, see [dynamically assign a risk profile to a payment](https://docs.adyen.com/risk-management/create-and-use-risk-profiles#dynamically-assign-a-risk-profile-to-a-payment). - [DataMember(Name = "riskdata.riskProfileReference", EmitDefaultValue = false)] - public string RiskdataRiskProfileReference { get; set; } - - /// - /// If this parameter is provided with the value **true**, risk checks for the payment request are skipped and the transaction will not get a risk score. - /// - /// If this parameter is provided with the value **true**, risk checks for the payment request are skipped and the transaction will not get a risk score. - [DataMember(Name = "riskdata.skipRisk", EmitDefaultValue = false)] - public string RiskdataSkipRisk { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataRisk {\n"); - sb.Append(" RiskdataCustomFieldName: ").Append(RiskdataCustomFieldName).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrAmountPerItem: ").Append(RiskdataBasketItemItemNrAmountPerItem).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrBrand: ").Append(RiskdataBasketItemItemNrBrand).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrCategory: ").Append(RiskdataBasketItemItemNrCategory).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrColor: ").Append(RiskdataBasketItemItemNrColor).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrCurrency: ").Append(RiskdataBasketItemItemNrCurrency).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrItemID: ").Append(RiskdataBasketItemItemNrItemID).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrManufacturer: ").Append(RiskdataBasketItemItemNrManufacturer).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrProductTitle: ").Append(RiskdataBasketItemItemNrProductTitle).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrQuantity: ").Append(RiskdataBasketItemItemNrQuantity).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrReceiverEmail: ").Append(RiskdataBasketItemItemNrReceiverEmail).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrSize: ").Append(RiskdataBasketItemItemNrSize).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrSku: ").Append(RiskdataBasketItemItemNrSku).Append("\n"); - sb.Append(" RiskdataBasketItemItemNrUpc: ").Append(RiskdataBasketItemItemNrUpc).Append("\n"); - sb.Append(" RiskdataPromotionsPromotionItemNrPromotionCode: ").Append(RiskdataPromotionsPromotionItemNrPromotionCode).Append("\n"); - sb.Append(" RiskdataPromotionsPromotionItemNrPromotionDiscountAmount: ").Append(RiskdataPromotionsPromotionItemNrPromotionDiscountAmount).Append("\n"); - sb.Append(" RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency: ").Append(RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency).Append("\n"); - sb.Append(" RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage: ").Append(RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage).Append("\n"); - sb.Append(" RiskdataPromotionsPromotionItemNrPromotionName: ").Append(RiskdataPromotionsPromotionItemNrPromotionName).Append("\n"); - sb.Append(" RiskdataRiskProfileReference: ").Append(RiskdataRiskProfileReference).Append("\n"); - sb.Append(" RiskdataSkipRisk: ").Append(RiskdataSkipRisk).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataRisk); - } - - /// - /// Returns true if AdditionalDataRisk instances are equal - /// - /// Instance of AdditionalDataRisk to be compared - /// Boolean - public bool Equals(AdditionalDataRisk input) - { - if (input == null) - { - return false; - } - return - ( - this.RiskdataCustomFieldName == input.RiskdataCustomFieldName || - (this.RiskdataCustomFieldName != null && - this.RiskdataCustomFieldName.Equals(input.RiskdataCustomFieldName)) - ) && - ( - this.RiskdataBasketItemItemNrAmountPerItem == input.RiskdataBasketItemItemNrAmountPerItem || - (this.RiskdataBasketItemItemNrAmountPerItem != null && - this.RiskdataBasketItemItemNrAmountPerItem.Equals(input.RiskdataBasketItemItemNrAmountPerItem)) - ) && - ( - this.RiskdataBasketItemItemNrBrand == input.RiskdataBasketItemItemNrBrand || - (this.RiskdataBasketItemItemNrBrand != null && - this.RiskdataBasketItemItemNrBrand.Equals(input.RiskdataBasketItemItemNrBrand)) - ) && - ( - this.RiskdataBasketItemItemNrCategory == input.RiskdataBasketItemItemNrCategory || - (this.RiskdataBasketItemItemNrCategory != null && - this.RiskdataBasketItemItemNrCategory.Equals(input.RiskdataBasketItemItemNrCategory)) - ) && - ( - this.RiskdataBasketItemItemNrColor == input.RiskdataBasketItemItemNrColor || - (this.RiskdataBasketItemItemNrColor != null && - this.RiskdataBasketItemItemNrColor.Equals(input.RiskdataBasketItemItemNrColor)) - ) && - ( - this.RiskdataBasketItemItemNrCurrency == input.RiskdataBasketItemItemNrCurrency || - (this.RiskdataBasketItemItemNrCurrency != null && - this.RiskdataBasketItemItemNrCurrency.Equals(input.RiskdataBasketItemItemNrCurrency)) - ) && - ( - this.RiskdataBasketItemItemNrItemID == input.RiskdataBasketItemItemNrItemID || - (this.RiskdataBasketItemItemNrItemID != null && - this.RiskdataBasketItemItemNrItemID.Equals(input.RiskdataBasketItemItemNrItemID)) - ) && - ( - this.RiskdataBasketItemItemNrManufacturer == input.RiskdataBasketItemItemNrManufacturer || - (this.RiskdataBasketItemItemNrManufacturer != null && - this.RiskdataBasketItemItemNrManufacturer.Equals(input.RiskdataBasketItemItemNrManufacturer)) - ) && - ( - this.RiskdataBasketItemItemNrProductTitle == input.RiskdataBasketItemItemNrProductTitle || - (this.RiskdataBasketItemItemNrProductTitle != null && - this.RiskdataBasketItemItemNrProductTitle.Equals(input.RiskdataBasketItemItemNrProductTitle)) - ) && - ( - this.RiskdataBasketItemItemNrQuantity == input.RiskdataBasketItemItemNrQuantity || - (this.RiskdataBasketItemItemNrQuantity != null && - this.RiskdataBasketItemItemNrQuantity.Equals(input.RiskdataBasketItemItemNrQuantity)) - ) && - ( - this.RiskdataBasketItemItemNrReceiverEmail == input.RiskdataBasketItemItemNrReceiverEmail || - (this.RiskdataBasketItemItemNrReceiverEmail != null && - this.RiskdataBasketItemItemNrReceiverEmail.Equals(input.RiskdataBasketItemItemNrReceiverEmail)) - ) && - ( - this.RiskdataBasketItemItemNrSize == input.RiskdataBasketItemItemNrSize || - (this.RiskdataBasketItemItemNrSize != null && - this.RiskdataBasketItemItemNrSize.Equals(input.RiskdataBasketItemItemNrSize)) - ) && - ( - this.RiskdataBasketItemItemNrSku == input.RiskdataBasketItemItemNrSku || - (this.RiskdataBasketItemItemNrSku != null && - this.RiskdataBasketItemItemNrSku.Equals(input.RiskdataBasketItemItemNrSku)) - ) && - ( - this.RiskdataBasketItemItemNrUpc == input.RiskdataBasketItemItemNrUpc || - (this.RiskdataBasketItemItemNrUpc != null && - this.RiskdataBasketItemItemNrUpc.Equals(input.RiskdataBasketItemItemNrUpc)) - ) && - ( - this.RiskdataPromotionsPromotionItemNrPromotionCode == input.RiskdataPromotionsPromotionItemNrPromotionCode || - (this.RiskdataPromotionsPromotionItemNrPromotionCode != null && - this.RiskdataPromotionsPromotionItemNrPromotionCode.Equals(input.RiskdataPromotionsPromotionItemNrPromotionCode)) - ) && - ( - this.RiskdataPromotionsPromotionItemNrPromotionDiscountAmount == input.RiskdataPromotionsPromotionItemNrPromotionDiscountAmount || - (this.RiskdataPromotionsPromotionItemNrPromotionDiscountAmount != null && - this.RiskdataPromotionsPromotionItemNrPromotionDiscountAmount.Equals(input.RiskdataPromotionsPromotionItemNrPromotionDiscountAmount)) - ) && - ( - this.RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency == input.RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency || - (this.RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency != null && - this.RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency.Equals(input.RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency)) - ) && - ( - this.RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage == input.RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage || - (this.RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage != null && - this.RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage.Equals(input.RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage)) - ) && - ( - this.RiskdataPromotionsPromotionItemNrPromotionName == input.RiskdataPromotionsPromotionItemNrPromotionName || - (this.RiskdataPromotionsPromotionItemNrPromotionName != null && - this.RiskdataPromotionsPromotionItemNrPromotionName.Equals(input.RiskdataPromotionsPromotionItemNrPromotionName)) - ) && - ( - this.RiskdataRiskProfileReference == input.RiskdataRiskProfileReference || - (this.RiskdataRiskProfileReference != null && - this.RiskdataRiskProfileReference.Equals(input.RiskdataRiskProfileReference)) - ) && - ( - this.RiskdataSkipRisk == input.RiskdataSkipRisk || - (this.RiskdataSkipRisk != null && - this.RiskdataSkipRisk.Equals(input.RiskdataSkipRisk)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RiskdataCustomFieldName != null) - { - hashCode = (hashCode * 59) + this.RiskdataCustomFieldName.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrAmountPerItem != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrAmountPerItem.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrBrand != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrBrand.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrCategory != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrCategory.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrColor != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrColor.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrCurrency != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrCurrency.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrItemID != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrItemID.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrManufacturer != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrManufacturer.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrProductTitle != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrProductTitle.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrQuantity != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrQuantity.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrReceiverEmail != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrReceiverEmail.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrSize != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrSize.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrSku != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrSku.GetHashCode(); - } - if (this.RiskdataBasketItemItemNrUpc != null) - { - hashCode = (hashCode * 59) + this.RiskdataBasketItemItemNrUpc.GetHashCode(); - } - if (this.RiskdataPromotionsPromotionItemNrPromotionCode != null) - { - hashCode = (hashCode * 59) + this.RiskdataPromotionsPromotionItemNrPromotionCode.GetHashCode(); - } - if (this.RiskdataPromotionsPromotionItemNrPromotionDiscountAmount != null) - { - hashCode = (hashCode * 59) + this.RiskdataPromotionsPromotionItemNrPromotionDiscountAmount.GetHashCode(); - } - if (this.RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency != null) - { - hashCode = (hashCode * 59) + this.RiskdataPromotionsPromotionItemNrPromotionDiscountCurrency.GetHashCode(); - } - if (this.RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage != null) - { - hashCode = (hashCode * 59) + this.RiskdataPromotionsPromotionItemNrPromotionDiscountPercentage.GetHashCode(); - } - if (this.RiskdataPromotionsPromotionItemNrPromotionName != null) - { - hashCode = (hashCode * 59) + this.RiskdataPromotionsPromotionItemNrPromotionName.GetHashCode(); - } - if (this.RiskdataRiskProfileReference != null) - { - hashCode = (hashCode * 59) + this.RiskdataRiskProfileReference.GetHashCode(); - } - if (this.RiskdataSkipRisk != null) - { - hashCode = (hashCode * 59) + this.RiskdataSkipRisk.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataRiskStandalone.cs b/Adyen/Model/Checkout/AdditionalDataRiskStandalone.cs deleted file mode 100644 index 80f9583a4..000000000 --- a/Adyen/Model/Checkout/AdditionalDataRiskStandalone.cs +++ /dev/null @@ -1,395 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataRiskStandalone - /// - [DataContract(Name = "AdditionalDataRiskStandalone")] - public partial class AdditionalDataRiskStandalone : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Shopper's country of residence in the form of ISO standard 3166 2-character country codes.. - /// Shopper's email.. - /// Shopper's first name.. - /// Shopper's last name.. - /// Unique PayPal Customer Account identification number. Character length and limitations: 13 single-byte alphanumeric characters.. - /// Shopper's phone number.. - /// Allowed values: * **Eligible** — Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received. * **PartiallyEligible** — Merchant is protected by PayPal's Seller Protection Policy for Item Not Received. * **Ineligible** — Merchant is not protected under the Seller Protection Policy.. - /// Unique transaction ID of the payment.. - /// Raw AVS result received from the acquirer, where available. Example: D. - /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/online-payments/tokenization).. - /// Raw CVC result received from the acquirer, where available. Example: 1. - /// Unique identifier or token for the shopper's card details.. - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true. - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true. - /// Required for PayPal payments only. The only supported value is: **paypal**.. - public AdditionalDataRiskStandalone(string payPalCountryCode = default(string), string payPalEmailId = default(string), string payPalFirstName = default(string), string payPalLastName = default(string), string payPalPayerId = default(string), string payPalPhone = default(string), string payPalProtectionEligibility = default(string), string payPalTransactionId = default(string), string avsResultRaw = default(string), string bin = default(string), string cvcResultRaw = default(string), string riskToken = default(string), string threeDAuthenticated = default(string), string threeDOffered = default(string), string tokenDataType = default(string)) - { - this.PayPalCountryCode = payPalCountryCode; - this.PayPalEmailId = payPalEmailId; - this.PayPalFirstName = payPalFirstName; - this.PayPalLastName = payPalLastName; - this.PayPalPayerId = payPalPayerId; - this.PayPalPhone = payPalPhone; - this.PayPalProtectionEligibility = payPalProtectionEligibility; - this.PayPalTransactionId = payPalTransactionId; - this.AvsResultRaw = avsResultRaw; - this.Bin = bin; - this.CvcResultRaw = cvcResultRaw; - this.RiskToken = riskToken; - this.ThreeDAuthenticated = threeDAuthenticated; - this.ThreeDOffered = threeDOffered; - this.TokenDataType = tokenDataType; - } - - /// - /// Shopper's country of residence in the form of ISO standard 3166 2-character country codes. - /// - /// Shopper's country of residence in the form of ISO standard 3166 2-character country codes. - [DataMember(Name = "PayPal.CountryCode", EmitDefaultValue = false)] - public string PayPalCountryCode { get; set; } - - /// - /// Shopper's email. - /// - /// Shopper's email. - [DataMember(Name = "PayPal.EmailId", EmitDefaultValue = false)] - public string PayPalEmailId { get; set; } - - /// - /// Shopper's first name. - /// - /// Shopper's first name. - [DataMember(Name = "PayPal.FirstName", EmitDefaultValue = false)] - public string PayPalFirstName { get; set; } - - /// - /// Shopper's last name. - /// - /// Shopper's last name. - [DataMember(Name = "PayPal.LastName", EmitDefaultValue = false)] - public string PayPalLastName { get; set; } - - /// - /// Unique PayPal Customer Account identification number. Character length and limitations: 13 single-byte alphanumeric characters. - /// - /// Unique PayPal Customer Account identification number. Character length and limitations: 13 single-byte alphanumeric characters. - [DataMember(Name = "PayPal.PayerId", EmitDefaultValue = false)] - public string PayPalPayerId { get; set; } - - /// - /// Shopper's phone number. - /// - /// Shopper's phone number. - [DataMember(Name = "PayPal.Phone", EmitDefaultValue = false)] - public string PayPalPhone { get; set; } - - /// - /// Allowed values: * **Eligible** — Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received. * **PartiallyEligible** — Merchant is protected by PayPal's Seller Protection Policy for Item Not Received. * **Ineligible** — Merchant is not protected under the Seller Protection Policy. - /// - /// Allowed values: * **Eligible** — Merchant is protected by PayPal's Seller Protection Policy for Unauthorized Payments and Item Not Received. * **PartiallyEligible** — Merchant is protected by PayPal's Seller Protection Policy for Item Not Received. * **Ineligible** — Merchant is not protected under the Seller Protection Policy. - [DataMember(Name = "PayPal.ProtectionEligibility", EmitDefaultValue = false)] - public string PayPalProtectionEligibility { get; set; } - - /// - /// Unique transaction ID of the payment. - /// - /// Unique transaction ID of the payment. - [DataMember(Name = "PayPal.TransactionId", EmitDefaultValue = false)] - public string PayPalTransactionId { get; set; } - - /// - /// Raw AVS result received from the acquirer, where available. Example: D - /// - /// Raw AVS result received from the acquirer, where available. Example: D - [DataMember(Name = "avsResultRaw", EmitDefaultValue = false)] - public string AvsResultRaw { get; set; } - - /// - /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/online-payments/tokenization). - /// - /// The Bank Identification Number of a credit card, which is the first six digits of a card number. Required for [tokenized card request](https://docs.adyen.com/online-payments/tokenization). - [DataMember(Name = "bin", EmitDefaultValue = false)] - public string Bin { get; set; } - - /// - /// Raw CVC result received from the acquirer, where available. Example: 1 - /// - /// Raw CVC result received from the acquirer, where available. Example: 1 - [DataMember(Name = "cvcResultRaw", EmitDefaultValue = false)] - public string CvcResultRaw { get; set; } - - /// - /// Unique identifier or token for the shopper's card details. - /// - /// Unique identifier or token for the shopper's card details. - [DataMember(Name = "riskToken", EmitDefaultValue = false)] - public string RiskToken { get; set; } - - /// - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - /// - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - [DataMember(Name = "threeDAuthenticated", EmitDefaultValue = false)] - public string ThreeDAuthenticated { get; set; } - - /// - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true - /// - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true - [DataMember(Name = "threeDOffered", EmitDefaultValue = false)] - public string ThreeDOffered { get; set; } - - /// - /// Required for PayPal payments only. The only supported value is: **paypal**. - /// - /// Required for PayPal payments only. The only supported value is: **paypal**. - [DataMember(Name = "tokenDataType", EmitDefaultValue = false)] - public string TokenDataType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataRiskStandalone {\n"); - sb.Append(" PayPalCountryCode: ").Append(PayPalCountryCode).Append("\n"); - sb.Append(" PayPalEmailId: ").Append(PayPalEmailId).Append("\n"); - sb.Append(" PayPalFirstName: ").Append(PayPalFirstName).Append("\n"); - sb.Append(" PayPalLastName: ").Append(PayPalLastName).Append("\n"); - sb.Append(" PayPalPayerId: ").Append(PayPalPayerId).Append("\n"); - sb.Append(" PayPalPhone: ").Append(PayPalPhone).Append("\n"); - sb.Append(" PayPalProtectionEligibility: ").Append(PayPalProtectionEligibility).Append("\n"); - sb.Append(" PayPalTransactionId: ").Append(PayPalTransactionId).Append("\n"); - sb.Append(" AvsResultRaw: ").Append(AvsResultRaw).Append("\n"); - sb.Append(" Bin: ").Append(Bin).Append("\n"); - sb.Append(" CvcResultRaw: ").Append(CvcResultRaw).Append("\n"); - sb.Append(" RiskToken: ").Append(RiskToken).Append("\n"); - sb.Append(" ThreeDAuthenticated: ").Append(ThreeDAuthenticated).Append("\n"); - sb.Append(" ThreeDOffered: ").Append(ThreeDOffered).Append("\n"); - sb.Append(" TokenDataType: ").Append(TokenDataType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataRiskStandalone); - } - - /// - /// Returns true if AdditionalDataRiskStandalone instances are equal - /// - /// Instance of AdditionalDataRiskStandalone to be compared - /// Boolean - public bool Equals(AdditionalDataRiskStandalone input) - { - if (input == null) - { - return false; - } - return - ( - this.PayPalCountryCode == input.PayPalCountryCode || - (this.PayPalCountryCode != null && - this.PayPalCountryCode.Equals(input.PayPalCountryCode)) - ) && - ( - this.PayPalEmailId == input.PayPalEmailId || - (this.PayPalEmailId != null && - this.PayPalEmailId.Equals(input.PayPalEmailId)) - ) && - ( - this.PayPalFirstName == input.PayPalFirstName || - (this.PayPalFirstName != null && - this.PayPalFirstName.Equals(input.PayPalFirstName)) - ) && - ( - this.PayPalLastName == input.PayPalLastName || - (this.PayPalLastName != null && - this.PayPalLastName.Equals(input.PayPalLastName)) - ) && - ( - this.PayPalPayerId == input.PayPalPayerId || - (this.PayPalPayerId != null && - this.PayPalPayerId.Equals(input.PayPalPayerId)) - ) && - ( - this.PayPalPhone == input.PayPalPhone || - (this.PayPalPhone != null && - this.PayPalPhone.Equals(input.PayPalPhone)) - ) && - ( - this.PayPalProtectionEligibility == input.PayPalProtectionEligibility || - (this.PayPalProtectionEligibility != null && - this.PayPalProtectionEligibility.Equals(input.PayPalProtectionEligibility)) - ) && - ( - this.PayPalTransactionId == input.PayPalTransactionId || - (this.PayPalTransactionId != null && - this.PayPalTransactionId.Equals(input.PayPalTransactionId)) - ) && - ( - this.AvsResultRaw == input.AvsResultRaw || - (this.AvsResultRaw != null && - this.AvsResultRaw.Equals(input.AvsResultRaw)) - ) && - ( - this.Bin == input.Bin || - (this.Bin != null && - this.Bin.Equals(input.Bin)) - ) && - ( - this.CvcResultRaw == input.CvcResultRaw || - (this.CvcResultRaw != null && - this.CvcResultRaw.Equals(input.CvcResultRaw)) - ) && - ( - this.RiskToken == input.RiskToken || - (this.RiskToken != null && - this.RiskToken.Equals(input.RiskToken)) - ) && - ( - this.ThreeDAuthenticated == input.ThreeDAuthenticated || - (this.ThreeDAuthenticated != null && - this.ThreeDAuthenticated.Equals(input.ThreeDAuthenticated)) - ) && - ( - this.ThreeDOffered == input.ThreeDOffered || - (this.ThreeDOffered != null && - this.ThreeDOffered.Equals(input.ThreeDOffered)) - ) && - ( - this.TokenDataType == input.TokenDataType || - (this.TokenDataType != null && - this.TokenDataType.Equals(input.TokenDataType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PayPalCountryCode != null) - { - hashCode = (hashCode * 59) + this.PayPalCountryCode.GetHashCode(); - } - if (this.PayPalEmailId != null) - { - hashCode = (hashCode * 59) + this.PayPalEmailId.GetHashCode(); - } - if (this.PayPalFirstName != null) - { - hashCode = (hashCode * 59) + this.PayPalFirstName.GetHashCode(); - } - if (this.PayPalLastName != null) - { - hashCode = (hashCode * 59) + this.PayPalLastName.GetHashCode(); - } - if (this.PayPalPayerId != null) - { - hashCode = (hashCode * 59) + this.PayPalPayerId.GetHashCode(); - } - if (this.PayPalPhone != null) - { - hashCode = (hashCode * 59) + this.PayPalPhone.GetHashCode(); - } - if (this.PayPalProtectionEligibility != null) - { - hashCode = (hashCode * 59) + this.PayPalProtectionEligibility.GetHashCode(); - } - if (this.PayPalTransactionId != null) - { - hashCode = (hashCode * 59) + this.PayPalTransactionId.GetHashCode(); - } - if (this.AvsResultRaw != null) - { - hashCode = (hashCode * 59) + this.AvsResultRaw.GetHashCode(); - } - if (this.Bin != null) - { - hashCode = (hashCode * 59) + this.Bin.GetHashCode(); - } - if (this.CvcResultRaw != null) - { - hashCode = (hashCode * 59) + this.CvcResultRaw.GetHashCode(); - } - if (this.RiskToken != null) - { - hashCode = (hashCode * 59) + this.RiskToken.GetHashCode(); - } - if (this.ThreeDAuthenticated != null) - { - hashCode = (hashCode * 59) + this.ThreeDAuthenticated.GetHashCode(); - } - if (this.ThreeDOffered != null) - { - hashCode = (hashCode * 59) + this.ThreeDOffered.GetHashCode(); - } - if (this.TokenDataType != null) - { - hashCode = (hashCode * 59) + this.TokenDataType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataSubMerchant.cs b/Adyen/Model/Checkout/AdditionalDataSubMerchant.cs deleted file mode 100644 index bfbcea0a1..000000000 --- a/Adyen/Model/Checkout/AdditionalDataSubMerchant.cs +++ /dev/null @@ -1,338 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataSubMerchant - /// - [DataContract(Name = "AdditionalDataSubMerchant")] - public partial class AdditionalDataSubMerchant : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Required for transactions performed by registered payment facilitators. Indicates the number of sub-merchants contained in the request. For example, **3**.. - /// Required for transactions performed by registered payment facilitators. The city of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 13 characters. - /// Required for transactions performed by registered payment facilitators. The three-letter country code of the sub-merchant's address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters. - /// Required for transactions performed by registered payment facilitators. The email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters. - /// Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters. - /// Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits. - /// Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters. - /// Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters. - /// Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant's address, without dashes. * Format: Numeric * Fixed length: 8 digits. - /// Required for transactions performed by registered payment facilitators. The state code of the sub-merchant's address, if applicable to the country. * Format: Alphanumeric * Maximum length: 2 characters. - /// Required for transactions performed by registered payment facilitators. The street name and house number of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 60 characters. - /// Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ. - public AdditionalDataSubMerchant(string subMerchantNumberOfSubSellers = default(string), string subMerchantSubSellerSubSellerNrCity = default(string), string subMerchantSubSellerSubSellerNrCountry = default(string), string subMerchantSubSellerSubSellerNrEmail = default(string), string subMerchantSubSellerSubSellerNrId = default(string), string subMerchantSubSellerSubSellerNrMcc = default(string), string subMerchantSubSellerSubSellerNrName = default(string), string subMerchantSubSellerSubSellerNrPhoneNumber = default(string), string subMerchantSubSellerSubSellerNrPostalCode = default(string), string subMerchantSubSellerSubSellerNrState = default(string), string subMerchantSubSellerSubSellerNrStreet = default(string), string subMerchantSubSellerSubSellerNrTaxId = default(string)) - { - this.SubMerchantNumberOfSubSellers = subMerchantNumberOfSubSellers; - this.SubMerchantSubSellerSubSellerNrCity = subMerchantSubSellerSubSellerNrCity; - this.SubMerchantSubSellerSubSellerNrCountry = subMerchantSubSellerSubSellerNrCountry; - this.SubMerchantSubSellerSubSellerNrEmail = subMerchantSubSellerSubSellerNrEmail; - this.SubMerchantSubSellerSubSellerNrId = subMerchantSubSellerSubSellerNrId; - this.SubMerchantSubSellerSubSellerNrMcc = subMerchantSubSellerSubSellerNrMcc; - this.SubMerchantSubSellerSubSellerNrName = subMerchantSubSellerSubSellerNrName; - this.SubMerchantSubSellerSubSellerNrPhoneNumber = subMerchantSubSellerSubSellerNrPhoneNumber; - this.SubMerchantSubSellerSubSellerNrPostalCode = subMerchantSubSellerSubSellerNrPostalCode; - this.SubMerchantSubSellerSubSellerNrState = subMerchantSubSellerSubSellerNrState; - this.SubMerchantSubSellerSubSellerNrStreet = subMerchantSubSellerSubSellerNrStreet; - this.SubMerchantSubSellerSubSellerNrTaxId = subMerchantSubSellerSubSellerNrTaxId; - } - - /// - /// Required for transactions performed by registered payment facilitators. Indicates the number of sub-merchants contained in the request. For example, **3**. - /// - /// Required for transactions performed by registered payment facilitators. Indicates the number of sub-merchants contained in the request. For example, **3**. - [DataMember(Name = "subMerchant.numberOfSubSellers", EmitDefaultValue = false)] - public string SubMerchantNumberOfSubSellers { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The city of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 13 characters - /// - /// Required for transactions performed by registered payment facilitators. The city of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 13 characters - [DataMember(Name = "subMerchant.subSeller[subSellerNr].city", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrCity { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The three-letter country code of the sub-merchant's address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters - /// - /// Required for transactions performed by registered payment facilitators. The three-letter country code of the sub-merchant's address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters - [DataMember(Name = "subMerchant.subSeller[subSellerNr].country", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrCountry { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters - /// - /// Required for transactions performed by registered payment facilitators. The email address of the sub-merchant. * Format: Alphanumeric * Maximum length: 40 characters - [DataMember(Name = "subMerchant.subSeller[subSellerNr].email", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrEmail { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters - /// - /// Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters - [DataMember(Name = "subMerchant.subSeller[subSellerNr].id", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrId { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits - /// - /// Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits - [DataMember(Name = "subMerchant.subSeller[subSellerNr].mcc", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrMcc { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters - /// - /// Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters - [DataMember(Name = "subMerchant.subSeller[subSellerNr].name", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrName { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters - /// - /// Required for transactions performed by registered payment facilitators. The phone number of the sub-merchant.* Format: Alphanumeric * Maximum length: 20 characters - [DataMember(Name = "subMerchant.subSeller[subSellerNr].phoneNumber", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrPhoneNumber { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant's address, without dashes. * Format: Numeric * Fixed length: 8 digits - /// - /// Required for transactions performed by registered payment facilitators. The postal code of the sub-merchant's address, without dashes. * Format: Numeric * Fixed length: 8 digits - [DataMember(Name = "subMerchant.subSeller[subSellerNr].postalCode", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrPostalCode { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The state code of the sub-merchant's address, if applicable to the country. * Format: Alphanumeric * Maximum length: 2 characters - /// - /// Required for transactions performed by registered payment facilitators. The state code of the sub-merchant's address, if applicable to the country. * Format: Alphanumeric * Maximum length: 2 characters - [DataMember(Name = "subMerchant.subSeller[subSellerNr].state", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrState { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The street name and house number of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 60 characters - /// - /// Required for transactions performed by registered payment facilitators. The street name and house number of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 60 characters - [DataMember(Name = "subMerchant.subSeller[subSellerNr].street", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrStreet { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ - /// - /// Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ - [DataMember(Name = "subMerchant.subSeller[subSellerNr].taxId", EmitDefaultValue = false)] - public string SubMerchantSubSellerSubSellerNrTaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataSubMerchant {\n"); - sb.Append(" SubMerchantNumberOfSubSellers: ").Append(SubMerchantNumberOfSubSellers).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrCity: ").Append(SubMerchantSubSellerSubSellerNrCity).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrCountry: ").Append(SubMerchantSubSellerSubSellerNrCountry).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrEmail: ").Append(SubMerchantSubSellerSubSellerNrEmail).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrId: ").Append(SubMerchantSubSellerSubSellerNrId).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrMcc: ").Append(SubMerchantSubSellerSubSellerNrMcc).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrName: ").Append(SubMerchantSubSellerSubSellerNrName).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrPhoneNumber: ").Append(SubMerchantSubSellerSubSellerNrPhoneNumber).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrPostalCode: ").Append(SubMerchantSubSellerSubSellerNrPostalCode).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrState: ").Append(SubMerchantSubSellerSubSellerNrState).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrStreet: ").Append(SubMerchantSubSellerSubSellerNrStreet).Append("\n"); - sb.Append(" SubMerchantSubSellerSubSellerNrTaxId: ").Append(SubMerchantSubSellerSubSellerNrTaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataSubMerchant); - } - - /// - /// Returns true if AdditionalDataSubMerchant instances are equal - /// - /// Instance of AdditionalDataSubMerchant to be compared - /// Boolean - public bool Equals(AdditionalDataSubMerchant input) - { - if (input == null) - { - return false; - } - return - ( - this.SubMerchantNumberOfSubSellers == input.SubMerchantNumberOfSubSellers || - (this.SubMerchantNumberOfSubSellers != null && - this.SubMerchantNumberOfSubSellers.Equals(input.SubMerchantNumberOfSubSellers)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrCity == input.SubMerchantSubSellerSubSellerNrCity || - (this.SubMerchantSubSellerSubSellerNrCity != null && - this.SubMerchantSubSellerSubSellerNrCity.Equals(input.SubMerchantSubSellerSubSellerNrCity)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrCountry == input.SubMerchantSubSellerSubSellerNrCountry || - (this.SubMerchantSubSellerSubSellerNrCountry != null && - this.SubMerchantSubSellerSubSellerNrCountry.Equals(input.SubMerchantSubSellerSubSellerNrCountry)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrEmail == input.SubMerchantSubSellerSubSellerNrEmail || - (this.SubMerchantSubSellerSubSellerNrEmail != null && - this.SubMerchantSubSellerSubSellerNrEmail.Equals(input.SubMerchantSubSellerSubSellerNrEmail)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrId == input.SubMerchantSubSellerSubSellerNrId || - (this.SubMerchantSubSellerSubSellerNrId != null && - this.SubMerchantSubSellerSubSellerNrId.Equals(input.SubMerchantSubSellerSubSellerNrId)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrMcc == input.SubMerchantSubSellerSubSellerNrMcc || - (this.SubMerchantSubSellerSubSellerNrMcc != null && - this.SubMerchantSubSellerSubSellerNrMcc.Equals(input.SubMerchantSubSellerSubSellerNrMcc)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrName == input.SubMerchantSubSellerSubSellerNrName || - (this.SubMerchantSubSellerSubSellerNrName != null && - this.SubMerchantSubSellerSubSellerNrName.Equals(input.SubMerchantSubSellerSubSellerNrName)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrPhoneNumber == input.SubMerchantSubSellerSubSellerNrPhoneNumber || - (this.SubMerchantSubSellerSubSellerNrPhoneNumber != null && - this.SubMerchantSubSellerSubSellerNrPhoneNumber.Equals(input.SubMerchantSubSellerSubSellerNrPhoneNumber)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrPostalCode == input.SubMerchantSubSellerSubSellerNrPostalCode || - (this.SubMerchantSubSellerSubSellerNrPostalCode != null && - this.SubMerchantSubSellerSubSellerNrPostalCode.Equals(input.SubMerchantSubSellerSubSellerNrPostalCode)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrState == input.SubMerchantSubSellerSubSellerNrState || - (this.SubMerchantSubSellerSubSellerNrState != null && - this.SubMerchantSubSellerSubSellerNrState.Equals(input.SubMerchantSubSellerSubSellerNrState)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrStreet == input.SubMerchantSubSellerSubSellerNrStreet || - (this.SubMerchantSubSellerSubSellerNrStreet != null && - this.SubMerchantSubSellerSubSellerNrStreet.Equals(input.SubMerchantSubSellerSubSellerNrStreet)) - ) && - ( - this.SubMerchantSubSellerSubSellerNrTaxId == input.SubMerchantSubSellerSubSellerNrTaxId || - (this.SubMerchantSubSellerSubSellerNrTaxId != null && - this.SubMerchantSubSellerSubSellerNrTaxId.Equals(input.SubMerchantSubSellerSubSellerNrTaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SubMerchantNumberOfSubSellers != null) - { - hashCode = (hashCode * 59) + this.SubMerchantNumberOfSubSellers.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrCity != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrCity.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrCountry != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrCountry.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrEmail != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrEmail.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrId != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrId.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrMcc != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrMcc.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrName != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrName.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrPhoneNumber.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrPostalCode != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrPostalCode.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrState != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrState.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrStreet != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrStreet.GetHashCode(); - } - if (this.SubMerchantSubSellerSubSellerNrTaxId != null) - { - hashCode = (hashCode * 59) + this.SubMerchantSubSellerSubSellerNrTaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataTemporaryServices.cs b/Adyen/Model/Checkout/AdditionalDataTemporaryServices.cs deleted file mode 100644 index 787a7cbfe..000000000 --- a/Adyen/Model/Checkout/AdditionalDataTemporaryServices.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataTemporaryServices - /// - [DataContract(Name = "AdditionalDataTemporaryServices")] - public partial class AdditionalDataTemporaryServices : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25. - /// The name or ID of the person working in a temporary capacity. * maxLength: 40. * Must not be all spaces. *Must not be all zeros.. - /// The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all spaces. *Must not be all zeros.. - /// The amount paid for regular hours worked, [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 7 * Must not be empty * Can be all zeros. - /// The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros. - /// The name of the person requesting temporary services. * maxLength: 40 * Must not be all zeros * Must not be all spaces. - /// The billing period start date. * Format: ddMMyy * maxLength: 6. - /// The billing period end date. * Format: ddMMyy * maxLength: 6. - /// The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00 * maxLength: 12. - public AdditionalDataTemporaryServices(string enhancedSchemeDataCustomerReference = default(string), string enhancedSchemeDataEmployeeName = default(string), string enhancedSchemeDataJobDescription = default(string), string enhancedSchemeDataRegularHoursRate = default(string), string enhancedSchemeDataRegularHoursWorked = default(string), string enhancedSchemeDataRequestName = default(string), string enhancedSchemeDataTempStartDate = default(string), string enhancedSchemeDataTempWeekEnding = default(string), string enhancedSchemeDataTotalTaxAmount = default(string)) - { - this.EnhancedSchemeDataCustomerReference = enhancedSchemeDataCustomerReference; - this.EnhancedSchemeDataEmployeeName = enhancedSchemeDataEmployeeName; - this.EnhancedSchemeDataJobDescription = enhancedSchemeDataJobDescription; - this.EnhancedSchemeDataRegularHoursRate = enhancedSchemeDataRegularHoursRate; - this.EnhancedSchemeDataRegularHoursWorked = enhancedSchemeDataRegularHoursWorked; - this.EnhancedSchemeDataRequestName = enhancedSchemeDataRequestName; - this.EnhancedSchemeDataTempStartDate = enhancedSchemeDataTempStartDate; - this.EnhancedSchemeDataTempWeekEnding = enhancedSchemeDataTempWeekEnding; - this.EnhancedSchemeDataTotalTaxAmount = enhancedSchemeDataTotalTaxAmount; - } - - /// - /// The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 - /// - /// The customer code, if supplied by a customer. * Encoding: ASCII * maxLength: 25 - [DataMember(Name = "enhancedSchemeData.customerReference", EmitDefaultValue = false)] - public string EnhancedSchemeDataCustomerReference { get; set; } - - /// - /// The name or ID of the person working in a temporary capacity. * maxLength: 40. * Must not be all spaces. *Must not be all zeros. - /// - /// The name or ID of the person working in a temporary capacity. * maxLength: 40. * Must not be all spaces. *Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.employeeName", EmitDefaultValue = false)] - public string EnhancedSchemeDataEmployeeName { get; set; } - - /// - /// The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all spaces. *Must not be all zeros. - /// - /// The job description of the person working in a temporary capacity. * maxLength: 40 * Must not be all spaces. *Must not be all zeros. - [DataMember(Name = "enhancedSchemeData.jobDescription", EmitDefaultValue = false)] - public string EnhancedSchemeDataJobDescription { get; set; } - - /// - /// The amount paid for regular hours worked, [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 7 * Must not be empty * Can be all zeros - /// - /// The amount paid for regular hours worked, [minor units](https://docs.adyen.com/development-resources/currency-codes). * maxLength: 7 * Must not be empty * Can be all zeros - [DataMember(Name = "enhancedSchemeData.regularHoursRate", EmitDefaultValue = false)] - public string EnhancedSchemeDataRegularHoursRate { get; set; } - - /// - /// The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros - /// - /// The hours worked. * maxLength: 7 * Must not be empty * Can be all zeros - [DataMember(Name = "enhancedSchemeData.regularHoursWorked", EmitDefaultValue = false)] - public string EnhancedSchemeDataRegularHoursWorked { get; set; } - - /// - /// The name of the person requesting temporary services. * maxLength: 40 * Must not be all zeros * Must not be all spaces - /// - /// The name of the person requesting temporary services. * maxLength: 40 * Must not be all zeros * Must not be all spaces - [DataMember(Name = "enhancedSchemeData.requestName", EmitDefaultValue = false)] - public string EnhancedSchemeDataRequestName { get; set; } - - /// - /// The billing period start date. * Format: ddMMyy * maxLength: 6 - /// - /// The billing period start date. * Format: ddMMyy * maxLength: 6 - [DataMember(Name = "enhancedSchemeData.tempStartDate", EmitDefaultValue = false)] - public string EnhancedSchemeDataTempStartDate { get; set; } - - /// - /// The billing period end date. * Format: ddMMyy * maxLength: 6 - /// - /// The billing period end date. * Format: ddMMyy * maxLength: 6 - [DataMember(Name = "enhancedSchemeData.tempWeekEnding", EmitDefaultValue = false)] - public string EnhancedSchemeDataTempWeekEnding { get; set; } - - /// - /// The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00 * maxLength: 12 - /// - /// The total tax amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). For example, 2000 means USD 20.00 * maxLength: 12 - [DataMember(Name = "enhancedSchemeData.totalTaxAmount", EmitDefaultValue = false)] - public string EnhancedSchemeDataTotalTaxAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataTemporaryServices {\n"); - sb.Append(" EnhancedSchemeDataCustomerReference: ").Append(EnhancedSchemeDataCustomerReference).Append("\n"); - sb.Append(" EnhancedSchemeDataEmployeeName: ").Append(EnhancedSchemeDataEmployeeName).Append("\n"); - sb.Append(" EnhancedSchemeDataJobDescription: ").Append(EnhancedSchemeDataJobDescription).Append("\n"); - sb.Append(" EnhancedSchemeDataRegularHoursRate: ").Append(EnhancedSchemeDataRegularHoursRate).Append("\n"); - sb.Append(" EnhancedSchemeDataRegularHoursWorked: ").Append(EnhancedSchemeDataRegularHoursWorked).Append("\n"); - sb.Append(" EnhancedSchemeDataRequestName: ").Append(EnhancedSchemeDataRequestName).Append("\n"); - sb.Append(" EnhancedSchemeDataTempStartDate: ").Append(EnhancedSchemeDataTempStartDate).Append("\n"); - sb.Append(" EnhancedSchemeDataTempWeekEnding: ").Append(EnhancedSchemeDataTempWeekEnding).Append("\n"); - sb.Append(" EnhancedSchemeDataTotalTaxAmount: ").Append(EnhancedSchemeDataTotalTaxAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataTemporaryServices); - } - - /// - /// Returns true if AdditionalDataTemporaryServices instances are equal - /// - /// Instance of AdditionalDataTemporaryServices to be compared - /// Boolean - public bool Equals(AdditionalDataTemporaryServices input) - { - if (input == null) - { - return false; - } - return - ( - this.EnhancedSchemeDataCustomerReference == input.EnhancedSchemeDataCustomerReference || - (this.EnhancedSchemeDataCustomerReference != null && - this.EnhancedSchemeDataCustomerReference.Equals(input.EnhancedSchemeDataCustomerReference)) - ) && - ( - this.EnhancedSchemeDataEmployeeName == input.EnhancedSchemeDataEmployeeName || - (this.EnhancedSchemeDataEmployeeName != null && - this.EnhancedSchemeDataEmployeeName.Equals(input.EnhancedSchemeDataEmployeeName)) - ) && - ( - this.EnhancedSchemeDataJobDescription == input.EnhancedSchemeDataJobDescription || - (this.EnhancedSchemeDataJobDescription != null && - this.EnhancedSchemeDataJobDescription.Equals(input.EnhancedSchemeDataJobDescription)) - ) && - ( - this.EnhancedSchemeDataRegularHoursRate == input.EnhancedSchemeDataRegularHoursRate || - (this.EnhancedSchemeDataRegularHoursRate != null && - this.EnhancedSchemeDataRegularHoursRate.Equals(input.EnhancedSchemeDataRegularHoursRate)) - ) && - ( - this.EnhancedSchemeDataRegularHoursWorked == input.EnhancedSchemeDataRegularHoursWorked || - (this.EnhancedSchemeDataRegularHoursWorked != null && - this.EnhancedSchemeDataRegularHoursWorked.Equals(input.EnhancedSchemeDataRegularHoursWorked)) - ) && - ( - this.EnhancedSchemeDataRequestName == input.EnhancedSchemeDataRequestName || - (this.EnhancedSchemeDataRequestName != null && - this.EnhancedSchemeDataRequestName.Equals(input.EnhancedSchemeDataRequestName)) - ) && - ( - this.EnhancedSchemeDataTempStartDate == input.EnhancedSchemeDataTempStartDate || - (this.EnhancedSchemeDataTempStartDate != null && - this.EnhancedSchemeDataTempStartDate.Equals(input.EnhancedSchemeDataTempStartDate)) - ) && - ( - this.EnhancedSchemeDataTempWeekEnding == input.EnhancedSchemeDataTempWeekEnding || - (this.EnhancedSchemeDataTempWeekEnding != null && - this.EnhancedSchemeDataTempWeekEnding.Equals(input.EnhancedSchemeDataTempWeekEnding)) - ) && - ( - this.EnhancedSchemeDataTotalTaxAmount == input.EnhancedSchemeDataTotalTaxAmount || - (this.EnhancedSchemeDataTotalTaxAmount != null && - this.EnhancedSchemeDataTotalTaxAmount.Equals(input.EnhancedSchemeDataTotalTaxAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EnhancedSchemeDataCustomerReference != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataCustomerReference.GetHashCode(); - } - if (this.EnhancedSchemeDataEmployeeName != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataEmployeeName.GetHashCode(); - } - if (this.EnhancedSchemeDataJobDescription != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataJobDescription.GetHashCode(); - } - if (this.EnhancedSchemeDataRegularHoursRate != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataRegularHoursRate.GetHashCode(); - } - if (this.EnhancedSchemeDataRegularHoursWorked != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataRegularHoursWorked.GetHashCode(); - } - if (this.EnhancedSchemeDataRequestName != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataRequestName.GetHashCode(); - } - if (this.EnhancedSchemeDataTempStartDate != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataTempStartDate.GetHashCode(); - } - if (this.EnhancedSchemeDataTempWeekEnding != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataTempWeekEnding.GetHashCode(); - } - if (this.EnhancedSchemeDataTotalTaxAmount != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeDataTotalTaxAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AdditionalDataWallets.cs b/Adyen/Model/Checkout/AdditionalDataWallets.cs deleted file mode 100644 index 023dd11ca..000000000 --- a/Adyen/Model/Checkout/AdditionalDataWallets.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AdditionalDataWallets - /// - [DataContract(Name = "AdditionalDataWallets")] - public partial class AdditionalDataWallets : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The Android Pay token retrieved from the SDK.. - /// The Mastercard Masterpass Transaction ID retrieved from the SDK.. - /// The Apple Pay token retrieved from the SDK.. - /// The Google Pay token retrieved from the SDK.. - /// The Samsung Pay token retrieved from the SDK.. - /// The Visa Checkout Call ID retrieved from the SDK.. - public AdditionalDataWallets(string androidpayToken = default(string), string masterpassTransactionId = default(string), string paymentToken = default(string), string paywithgoogleToken = default(string), string samsungpayToken = default(string), string visacheckoutCallId = default(string)) - { - this.AndroidpayToken = androidpayToken; - this.MasterpassTransactionId = masterpassTransactionId; - this.PaymentToken = paymentToken; - this.PaywithgoogleToken = paywithgoogleToken; - this.SamsungpayToken = samsungpayToken; - this.VisacheckoutCallId = visacheckoutCallId; - } - - /// - /// The Android Pay token retrieved from the SDK. - /// - /// The Android Pay token retrieved from the SDK. - [DataMember(Name = "androidpay.token", EmitDefaultValue = false)] - public string AndroidpayToken { get; set; } - - /// - /// The Mastercard Masterpass Transaction ID retrieved from the SDK. - /// - /// The Mastercard Masterpass Transaction ID retrieved from the SDK. - [DataMember(Name = "masterpass.transactionId", EmitDefaultValue = false)] - public string MasterpassTransactionId { get; set; } - - /// - /// The Apple Pay token retrieved from the SDK. - /// - /// The Apple Pay token retrieved from the SDK. - [DataMember(Name = "payment.token", EmitDefaultValue = false)] - public string PaymentToken { get; set; } - - /// - /// The Google Pay token retrieved from the SDK. - /// - /// The Google Pay token retrieved from the SDK. - [DataMember(Name = "paywithgoogle.token", EmitDefaultValue = false)] - public string PaywithgoogleToken { get; set; } - - /// - /// The Samsung Pay token retrieved from the SDK. - /// - /// The Samsung Pay token retrieved from the SDK. - [DataMember(Name = "samsungpay.token", EmitDefaultValue = false)] - public string SamsungpayToken { get; set; } - - /// - /// The Visa Checkout Call ID retrieved from the SDK. - /// - /// The Visa Checkout Call ID retrieved from the SDK. - [DataMember(Name = "visacheckout.callId", EmitDefaultValue = false)] - public string VisacheckoutCallId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalDataWallets {\n"); - sb.Append(" AndroidpayToken: ").Append(AndroidpayToken).Append("\n"); - sb.Append(" MasterpassTransactionId: ").Append(MasterpassTransactionId).Append("\n"); - sb.Append(" PaymentToken: ").Append(PaymentToken).Append("\n"); - sb.Append(" PaywithgoogleToken: ").Append(PaywithgoogleToken).Append("\n"); - sb.Append(" SamsungpayToken: ").Append(SamsungpayToken).Append("\n"); - sb.Append(" VisacheckoutCallId: ").Append(VisacheckoutCallId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalDataWallets); - } - - /// - /// Returns true if AdditionalDataWallets instances are equal - /// - /// Instance of AdditionalDataWallets to be compared - /// Boolean - public bool Equals(AdditionalDataWallets input) - { - if (input == null) - { - return false; - } - return - ( - this.AndroidpayToken == input.AndroidpayToken || - (this.AndroidpayToken != null && - this.AndroidpayToken.Equals(input.AndroidpayToken)) - ) && - ( - this.MasterpassTransactionId == input.MasterpassTransactionId || - (this.MasterpassTransactionId != null && - this.MasterpassTransactionId.Equals(input.MasterpassTransactionId)) - ) && - ( - this.PaymentToken == input.PaymentToken || - (this.PaymentToken != null && - this.PaymentToken.Equals(input.PaymentToken)) - ) && - ( - this.PaywithgoogleToken == input.PaywithgoogleToken || - (this.PaywithgoogleToken != null && - this.PaywithgoogleToken.Equals(input.PaywithgoogleToken)) - ) && - ( - this.SamsungpayToken == input.SamsungpayToken || - (this.SamsungpayToken != null && - this.SamsungpayToken.Equals(input.SamsungpayToken)) - ) && - ( - this.VisacheckoutCallId == input.VisacheckoutCallId || - (this.VisacheckoutCallId != null && - this.VisacheckoutCallId.Equals(input.VisacheckoutCallId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AndroidpayToken != null) - { - hashCode = (hashCode * 59) + this.AndroidpayToken.GetHashCode(); - } - if (this.MasterpassTransactionId != null) - { - hashCode = (hashCode * 59) + this.MasterpassTransactionId.GetHashCode(); - } - if (this.PaymentToken != null) - { - hashCode = (hashCode * 59) + this.PaymentToken.GetHashCode(); - } - if (this.PaywithgoogleToken != null) - { - hashCode = (hashCode * 59) + this.PaywithgoogleToken.GetHashCode(); - } - if (this.SamsungpayToken != null) - { - hashCode = (hashCode * 59) + this.SamsungpayToken.GetHashCode(); - } - if (this.VisacheckoutCallId != null) - { - hashCode = (hashCode * 59) + this.VisacheckoutCallId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Address.cs b/Adyen/Model/Checkout/Address.cs deleted file mode 100644 index 089bbaee7..000000000 --- a/Adyen/Model/Checkout/Address.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Address() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Maximum length: 3000 characters. (required). - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// The number or name of the house. Maximum length: 3000 characters. (required). - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). - public Address(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.City = city; - this.Country = country; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.Street = street; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Maximum length: 3000 characters. - /// - /// The name of the city. Maximum length: 3000 characters. - [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The number or name of the house. Maximum length: 3000 characters. - /// - /// The number or name of the house. Maximum length: 3000 characters. - [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) maxLength - if (this.City != null && this.City.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); - } - - // HouseNumberOrName (string) maxLength - if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); - } - - // Street (string) maxLength - if (this.Street != null && this.Street.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AffirmDetails.cs b/Adyen/Model/Checkout/AffirmDetails.cs deleted file mode 100644 index d3ff4747b..000000000 --- a/Adyen/Model/Checkout/AffirmDetails.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AffirmDetails - /// - [DataContract(Name = "AffirmDetails")] - public partial class AffirmDetails : IEquatable, IValidatableObject - { - /// - /// **affirm** - /// - /// **affirm** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Affirm for value: affirm - /// - [EnumMember(Value = "affirm")] - Affirm = 1 - - } - - - /// - /// **affirm** - /// - /// **affirm** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// **affirm** (default to TypeEnum.Affirm). - public AffirmDetails(string checkoutAttemptId = default(string), TypeEnum? type = TypeEnum.Affirm) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AffirmDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AffirmDetails); - } - - /// - /// Returns true if AffirmDetails instances are equal - /// - /// Instance of AffirmDetails to be compared - /// Boolean - public bool Equals(AffirmDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AfterpayDetails.cs b/Adyen/Model/Checkout/AfterpayDetails.cs deleted file mode 100644 index ba49680ac..000000000 --- a/Adyen/Model/Checkout/AfterpayDetails.cs +++ /dev/null @@ -1,284 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AfterpayDetails - /// - [DataContract(Name = "AfterpayDetails")] - public partial class AfterpayDetails : IEquatable, IValidatableObject - { - /// - /// **afterpay_default** - /// - /// **afterpay_default** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AfterpayDefault for value: afterpay_default - /// - [EnumMember(Value = "afterpay_default")] - AfterpayDefault = 1, - - /// - /// Enum Afterpaytouch for value: afterpaytouch - /// - [EnumMember(Value = "afterpaytouch")] - Afterpaytouch = 2, - - /// - /// Enum AfterpayB2b for value: afterpay_b2b - /// - [EnumMember(Value = "afterpay_b2b")] - AfterpayB2b = 3, - - /// - /// Enum Clearpay for value: clearpay - /// - [EnumMember(Value = "clearpay")] - Clearpay = 4 - - } - - - /// - /// **afterpay_default** - /// - /// **afterpay_default** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AfterpayDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The address where to send the invoice.. - /// The checkout attempt identifier.. - /// The address where the goods should be delivered.. - /// Shopper name, date of birth, phone number, and email address.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **afterpay_default** (required) (default to TypeEnum.AfterpayDefault). - public AfterpayDetails(string billingAddress = default(string), string checkoutAttemptId = default(string), string deliveryAddress = default(string), string personalDetails = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = TypeEnum.AfterpayDefault) - { - this.Type = type; - this.BillingAddress = billingAddress; - this.CheckoutAttemptId = checkoutAttemptId; - this.DeliveryAddress = deliveryAddress; - this.PersonalDetails = personalDetails; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// The address where to send the invoice. - /// - /// The address where to send the invoice. - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public string BillingAddress { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The address where the goods should be delivered. - /// - /// The address where the goods should be delivered. - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public string DeliveryAddress { get; set; } - - /// - /// Shopper name, date of birth, phone number, and email address. - /// - /// Shopper name, date of birth, phone number, and email address. - [DataMember(Name = "personalDetails", EmitDefaultValue = false)] - public string PersonalDetails { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AfterpayDetails {\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" PersonalDetails: ").Append(PersonalDetails).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AfterpayDetails); - } - - /// - /// Returns true if AfterpayDetails instances are equal - /// - /// Instance of AfterpayDetails to be compared - /// Boolean - public bool Equals(AfterpayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.PersonalDetails == input.PersonalDetails || - (this.PersonalDetails != null && - this.PersonalDetails.Equals(input.PersonalDetails)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.PersonalDetails != null) - { - hashCode = (hashCode * 59) + this.PersonalDetails.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Agency.cs b/Adyen/Model/Checkout/Agency.cs deleted file mode 100644 index f77419dd5..000000000 --- a/Adyen/Model/Checkout/Agency.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Agency - /// - [DataContract(Name = "Agency")] - public partial class Agency : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters. - /// The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters. - public Agency(string invoiceNumber = default(string), string planName = default(string)) - { - this.InvoiceNumber = invoiceNumber; - this.PlanName = planName; - } - - /// - /// The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters - /// - /// The reference number for the invoice, issued by the agency. * Encoding: ASCII * minLength: 1 character * maxLength: 6 characters - [DataMember(Name = "invoiceNumber", EmitDefaultValue = false)] - public string InvoiceNumber { get; set; } - - /// - /// The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters - /// - /// The two-letter agency plan identifier. * Encoding: ASCII * minLength: 2 characters * maxLength: 2 characters - [DataMember(Name = "planName", EmitDefaultValue = false)] - public string PlanName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Agency {\n"); - sb.Append(" InvoiceNumber: ").Append(InvoiceNumber).Append("\n"); - sb.Append(" PlanName: ").Append(PlanName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Agency); - } - - /// - /// Returns true if Agency instances are equal - /// - /// Instance of Agency to be compared - /// Boolean - public bool Equals(Agency input) - { - if (input == null) - { - return false; - } - return - ( - this.InvoiceNumber == input.InvoiceNumber || - (this.InvoiceNumber != null && - this.InvoiceNumber.Equals(input.InvoiceNumber)) - ) && - ( - this.PlanName == input.PlanName || - (this.PlanName != null && - this.PlanName.Equals(input.PlanName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvoiceNumber != null) - { - hashCode = (hashCode * 59) + this.InvoiceNumber.GetHashCode(); - } - if (this.PlanName != null) - { - hashCode = (hashCode * 59) + this.PlanName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Airline.cs b/Adyen/Model/Checkout/Airline.cs deleted file mode 100644 index 224947ca9..000000000 --- a/Adyen/Model/Checkout/Airline.cs +++ /dev/null @@ -1,355 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Airline - /// - [DataContract(Name = "Airline")] - public partial class Airline : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Airline() { } - /// - /// Initializes a new instance of the class. - /// - /// agency. - /// The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 11 characters. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters. - /// The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not start with a space or be all spaces.. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be all spaces.. - /// A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters. - /// The flight departure date. Time is optional. * Format for date only: `yyyy-MM-dd` * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local time of departure airport. * minLength: 10 characters * maxLength: 16 characters. - /// legs. - /// The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not start with a space or be all spaces. * Must not be all zeros. (required). - /// passengers. - /// ticket. - /// travelAgency. - public Airline(Agency agency = default(Agency), long? boardingFee = default(long?), string code = default(string), string computerizedReservationSystem = default(string), string customerReferenceNumber = default(string), string designatorCode = default(string), string documentType = default(string), DateTime flightDate = default(DateTime), List legs = default(List), string passengerName = default(string), List passengers = default(List), Ticket ticket = default(Ticket), TravelAgency travelAgency = default(TravelAgency)) - { - this.PassengerName = passengerName; - this.Agency = agency; - this.BoardingFee = boardingFee; - this.Code = code; - this.ComputerizedReservationSystem = computerizedReservationSystem; - this.CustomerReferenceNumber = customerReferenceNumber; - this.DesignatorCode = designatorCode; - this.DocumentType = documentType; - this.FlightDate = flightDate; - this.Legs = legs; - this.Passengers = passengers; - this.Ticket = ticket; - this.TravelAgency = travelAgency; - } - - /// - /// Gets or Sets Agency - /// - [DataMember(Name = "agency", EmitDefaultValue = false)] - public Agency Agency { get; set; } - - /// - /// The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 11 characters - /// - /// The amount charged for boarding the plane, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 character * maxLength: 11 characters - [DataMember(Name = "boardingFee", EmitDefaultValue = false)] - public long? BoardingFee { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-digit accounting code (PAX) that identifies the carrier. * Format: IATA 3-digit accounting code (PAX) * Example: KLM = 074 * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters - /// - /// The [CRS](https://en.wikipedia.org/wiki/Computer_reservation_system) used to make the reservation and purchase the ticket. * Encoding: ASCII * minLength: 4 characters * maxLength: 4 characters - [DataMember(Name = "computerizedReservationSystem", EmitDefaultValue = false)] - public string ComputerizedReservationSystem { get; set; } - - /// - /// The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not start with a space or be all spaces. - /// - /// The alphanumeric customer reference number. * Encoding: ASCII * maxLength: 20 characters * If you send more than 20 characters, the customer reference number is truncated * Must not start with a space or be all spaces. - [DataMember(Name = "customerReferenceNumber", EmitDefaultValue = false)] - public string CustomerReferenceNumber { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be all spaces. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. * Encoding: ASCII * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be all spaces. - [DataMember(Name = "designatorCode", EmitDefaultValue = false)] - public string DesignatorCode { get; set; } - - /// - /// A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters - /// - /// A code that identifies the type of item bought. The description of the code can appear on credit card statements. * Encoding: ASCII * Example: Passenger ticket = 01 * minLength: 2 characters * maxLength: 2 characters - [DataMember(Name = "documentType", EmitDefaultValue = false)] - public string DocumentType { get; set; } - - /// - /// The flight departure date. Time is optional. * Format for date only: `yyyy-MM-dd` * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local time of departure airport. * minLength: 10 characters * maxLength: 16 characters - /// - /// The flight departure date. Time is optional. * Format for date only: `yyyy-MM-dd` * Format for date and time: `yyyy-MM-ddTHH:mm` * Use local time of departure airport. * minLength: 10 characters * maxLength: 16 characters - [DataMember(Name = "flightDate", EmitDefaultValue = false)] - public DateTime FlightDate { get; set; } - - /// - /// Gets or Sets Legs - /// - [DataMember(Name = "legs", EmitDefaultValue = false)] - public List Legs { get; set; } - - /// - /// The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The passenger's name, initials, and title. * Format: last name + first name or initials + title * Example: *FLYER / MARY MS* * minLength: 1 character * maxLength: 20 characters * If you send more than 20 characters, the name is truncated * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "passengerName", IsRequired = false, EmitDefaultValue = false)] - public string PassengerName { get; set; } - - /// - /// Gets or Sets Passengers - /// - [DataMember(Name = "passengers", EmitDefaultValue = false)] - public List Passengers { get; set; } - - /// - /// Gets or Sets Ticket - /// - [DataMember(Name = "ticket", EmitDefaultValue = false)] - public Ticket Ticket { get; set; } - - /// - /// Gets or Sets TravelAgency - /// - [DataMember(Name = "travelAgency", EmitDefaultValue = false)] - public TravelAgency TravelAgency { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Airline {\n"); - sb.Append(" Agency: ").Append(Agency).Append("\n"); - sb.Append(" BoardingFee: ").Append(BoardingFee).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" ComputerizedReservationSystem: ").Append(ComputerizedReservationSystem).Append("\n"); - sb.Append(" CustomerReferenceNumber: ").Append(CustomerReferenceNumber).Append("\n"); - sb.Append(" DesignatorCode: ").Append(DesignatorCode).Append("\n"); - sb.Append(" DocumentType: ").Append(DocumentType).Append("\n"); - sb.Append(" FlightDate: ").Append(FlightDate).Append("\n"); - sb.Append(" Legs: ").Append(Legs).Append("\n"); - sb.Append(" PassengerName: ").Append(PassengerName).Append("\n"); - sb.Append(" Passengers: ").Append(Passengers).Append("\n"); - sb.Append(" Ticket: ").Append(Ticket).Append("\n"); - sb.Append(" TravelAgency: ").Append(TravelAgency).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Airline); - } - - /// - /// Returns true if Airline instances are equal - /// - /// Instance of Airline to be compared - /// Boolean - public bool Equals(Airline input) - { - if (input == null) - { - return false; - } - return - ( - this.Agency == input.Agency || - (this.Agency != null && - this.Agency.Equals(input.Agency)) - ) && - ( - this.BoardingFee == input.BoardingFee || - this.BoardingFee.Equals(input.BoardingFee) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.ComputerizedReservationSystem == input.ComputerizedReservationSystem || - (this.ComputerizedReservationSystem != null && - this.ComputerizedReservationSystem.Equals(input.ComputerizedReservationSystem)) - ) && - ( - this.CustomerReferenceNumber == input.CustomerReferenceNumber || - (this.CustomerReferenceNumber != null && - this.CustomerReferenceNumber.Equals(input.CustomerReferenceNumber)) - ) && - ( - this.DesignatorCode == input.DesignatorCode || - (this.DesignatorCode != null && - this.DesignatorCode.Equals(input.DesignatorCode)) - ) && - ( - this.DocumentType == input.DocumentType || - (this.DocumentType != null && - this.DocumentType.Equals(input.DocumentType)) - ) && - ( - this.FlightDate == input.FlightDate || - (this.FlightDate != null && - this.FlightDate.Equals(input.FlightDate)) - ) && - ( - this.Legs == input.Legs || - this.Legs != null && - input.Legs != null && - this.Legs.SequenceEqual(input.Legs) - ) && - ( - this.PassengerName == input.PassengerName || - (this.PassengerName != null && - this.PassengerName.Equals(input.PassengerName)) - ) && - ( - this.Passengers == input.Passengers || - this.Passengers != null && - input.Passengers != null && - this.Passengers.SequenceEqual(input.Passengers) - ) && - ( - this.Ticket == input.Ticket || - (this.Ticket != null && - this.Ticket.Equals(input.Ticket)) - ) && - ( - this.TravelAgency == input.TravelAgency || - (this.TravelAgency != null && - this.TravelAgency.Equals(input.TravelAgency)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Agency != null) - { - hashCode = (hashCode * 59) + this.Agency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.BoardingFee.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.ComputerizedReservationSystem != null) - { - hashCode = (hashCode * 59) + this.ComputerizedReservationSystem.GetHashCode(); - } - if (this.CustomerReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.CustomerReferenceNumber.GetHashCode(); - } - if (this.DesignatorCode != null) - { - hashCode = (hashCode * 59) + this.DesignatorCode.GetHashCode(); - } - if (this.DocumentType != null) - { - hashCode = (hashCode * 59) + this.DocumentType.GetHashCode(); - } - if (this.FlightDate != null) - { - hashCode = (hashCode * 59) + this.FlightDate.GetHashCode(); - } - if (this.Legs != null) - { - hashCode = (hashCode * 59) + this.Legs.GetHashCode(); - } - if (this.PassengerName != null) - { - hashCode = (hashCode * 59) + this.PassengerName.GetHashCode(); - } - if (this.Passengers != null) - { - hashCode = (hashCode * 59) + this.Passengers.GetHashCode(); - } - if (this.Ticket != null) - { - hashCode = (hashCode * 59) + this.Ticket.GetHashCode(); - } - if (this.TravelAgency != null) - { - hashCode = (hashCode * 59) + this.TravelAgency.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AmazonPayDetails.cs b/Adyen/Model/Checkout/AmazonPayDetails.cs deleted file mode 100644 index df075513d..000000000 --- a/Adyen/Model/Checkout/AmazonPayDetails.cs +++ /dev/null @@ -1,197 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AmazonPayDetails - /// - [DataContract(Name = "AmazonPayDetails")] - public partial class AmazonPayDetails : IEquatable, IValidatableObject - { - /// - /// **amazonpay** - /// - /// **amazonpay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Amazonpay for value: amazonpay - /// - [EnumMember(Value = "amazonpay")] - Amazonpay = 1 - - } - - - /// - /// **amazonpay** - /// - /// **amazonpay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically.. - /// The checkout attempt identifier.. - /// The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken.. - /// **amazonpay** (default to TypeEnum.Amazonpay). - public AmazonPayDetails(string amazonPayToken = default(string), string checkoutAttemptId = default(string), string checkoutSessionId = default(string), TypeEnum? type = TypeEnum.Amazonpay) - { - this.AmazonPayToken = amazonPayToken; - this.CheckoutAttemptId = checkoutAttemptId; - this.CheckoutSessionId = checkoutSessionId; - this.Type = type; - } - - /// - /// This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. - /// - /// This is the `amazonPayToken` that you obtained from the [Get Checkout Session](https://amazon-pay-acquirer-guide.s3-eu-west-1.amazonaws.com/v1/amazon-pay-api-v2/checkout-session.html#get-checkout-session) response. This token is used for API only integration specifically. - [DataMember(Name = "amazonPayToken", EmitDefaultValue = false)] - public string AmazonPayToken { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. - /// - /// The `checkoutSessionId` is used to identify the checkout session at the Amazon Pay side. This field is required only for drop-in and components integration, where it replaces the amazonPayToken. - [DataMember(Name = "checkoutSessionId", EmitDefaultValue = false)] - public string CheckoutSessionId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AmazonPayDetails {\n"); - sb.Append(" AmazonPayToken: ").Append(AmazonPayToken).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" CheckoutSessionId: ").Append(CheckoutSessionId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AmazonPayDetails); - } - - /// - /// Returns true if AmazonPayDetails instances are equal - /// - /// Instance of AmazonPayDetails to be compared - /// Boolean - public bool Equals(AmazonPayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.AmazonPayToken == input.AmazonPayToken || - (this.AmazonPayToken != null && - this.AmazonPayToken.Equals(input.AmazonPayToken)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.CheckoutSessionId == input.CheckoutSessionId || - (this.CheckoutSessionId != null && - this.CheckoutSessionId.Equals(input.CheckoutSessionId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AmazonPayToken != null) - { - hashCode = (hashCode * 59) + this.AmazonPayToken.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.CheckoutSessionId != null) - { - hashCode = (hashCode * 59) + this.CheckoutSessionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Amount.cs b/Adyen/Model/Checkout/Amount.cs deleted file mode 100644 index 86a10a75e..000000000 --- a/Adyen/Model/Checkout/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Amounts.cs b/Adyen/Model/Checkout/Amounts.cs deleted file mode 100644 index 0383533bf..000000000 --- a/Adyen/Model/Checkout/Amounts.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Amounts - /// - [DataContract(Name = "Amounts")] - public partial class Amounts : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amounts() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). (required). - /// The amounts of the donation (in [minor units](https://docs.adyen.com/development-resources/currency-codes/)). (required). - public Amounts(string currency = default(string), List values = default(List)) - { - this.Currency = currency; - this.Values = values; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amounts of the donation (in [minor units](https://docs.adyen.com/development-resources/currency-codes/)). - /// - /// The amounts of the donation (in [minor units](https://docs.adyen.com/development-resources/currency-codes/)). - [DataMember(Name = "values", IsRequired = false, EmitDefaultValue = false)] - public List Values { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amounts {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Values: ").Append(Values).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amounts); - } - - /// - /// Returns true if Amounts instances are equal - /// - /// Instance of Amounts to be compared - /// Boolean - public bool Equals(Amounts input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Values == input.Values || - this.Values != null && - input.Values != null && - this.Values.SequenceEqual(input.Values) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Values != null) - { - hashCode = (hashCode * 59) + this.Values.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AncvDetails.cs b/Adyen/Model/Checkout/AncvDetails.cs deleted file mode 100644 index d2b7365a6..000000000 --- a/Adyen/Model/Checkout/AncvDetails.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AncvDetails - /// - [DataContract(Name = "AncvDetails")] - public partial class AncvDetails : IEquatable, IValidatableObject - { - /// - /// **ancv** - /// - /// **ancv** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Ancv for value: ancv - /// - [EnumMember(Value = "ancv")] - Ancv = 1 - - } - - - /// - /// **ancv** - /// - /// **ancv** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// ANCV account identification (email or account number). - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **ancv**. - public AncvDetails(string beneficiaryId = default(string), string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.BeneficiaryId = beneficiaryId; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// ANCV account identification (email or account number) - /// - /// ANCV account identification (email or account number) - [DataMember(Name = "beneficiaryId", EmitDefaultValue = false)] - public string BeneficiaryId { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AncvDetails {\n"); - sb.Append(" BeneficiaryId: ").Append(BeneficiaryId).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AncvDetails); - } - - /// - /// Returns true if AncvDetails instances are equal - /// - /// Instance of AncvDetails to be compared - /// Boolean - public bool Equals(AncvDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BeneficiaryId == input.BeneficiaryId || - (this.BeneficiaryId != null && - this.BeneficiaryId.Equals(input.BeneficiaryId)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BeneficiaryId != null) - { - hashCode = (hashCode * 59) + this.BeneficiaryId.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AndroidPayDetails.cs b/Adyen/Model/Checkout/AndroidPayDetails.cs deleted file mode 100644 index 13933bbb6..000000000 --- a/Adyen/Model/Checkout/AndroidPayDetails.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AndroidPayDetails - /// - [DataContract(Name = "AndroidPayDetails")] - public partial class AndroidPayDetails : IEquatable, IValidatableObject - { - /// - /// **androidpay** - /// - /// **androidpay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Androidpay for value: androidpay - /// - [EnumMember(Value = "androidpay")] - Androidpay = 1 - - } - - - /// - /// **androidpay** - /// - /// **androidpay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// **androidpay** (default to TypeEnum.Androidpay). - public AndroidPayDetails(string checkoutAttemptId = default(string), TypeEnum? type = TypeEnum.Androidpay) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AndroidPayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AndroidPayDetails); - } - - /// - /// Returns true if AndroidPayDetails instances are equal - /// - /// Instance of AndroidPayDetails to be compared - /// Boolean - public bool Equals(AndroidPayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ApplePayDetails.cs b/Adyen/Model/Checkout/ApplePayDetails.cs deleted file mode 100644 index 03f028850..000000000 --- a/Adyen/Model/Checkout/ApplePayDetails.cs +++ /dev/null @@ -1,270 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ApplePayDetails - /// - [DataContract(Name = "ApplePayDetails")] - public partial class ApplePayDetails : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **applepay** - /// - /// **applepay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Applepay for value: applepay - /// - [EnumMember(Value = "applepay")] - Applepay = 1 - - } - - - /// - /// **applepay** - /// - /// **applepay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ApplePayDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. (required). - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **applepay** (default to TypeEnum.Applepay). - public ApplePayDetails(string applePayToken = default(string), string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Applepay) - { - this.ApplePayToken = applePayToken; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. - /// - /// The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. - [DataMember(Name = "applePayToken", IsRequired = false, EmitDefaultValue = false)] - public string ApplePayToken { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApplePayDetails {\n"); - sb.Append(" ApplePayToken: ").Append(ApplePayToken).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplePayDetails); - } - - /// - /// Returns true if ApplePayDetails instances are equal - /// - /// Instance of ApplePayDetails to be compared - /// Boolean - public bool Equals(ApplePayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.ApplePayToken == input.ApplePayToken || - (this.ApplePayToken != null && - this.ApplePayToken.Equals(input.ApplePayToken)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApplePayToken != null) - { - hashCode = (hashCode * 59) + this.ApplePayToken.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ApplePayToken (string) maxLength - if (this.ApplePayToken != null && this.ApplePayToken.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ApplePayToken, length must be less than 10000.", new [] { "ApplePayToken" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ApplePayDonations.cs b/Adyen/Model/Checkout/ApplePayDonations.cs deleted file mode 100644 index ca15916c5..000000000 --- a/Adyen/Model/Checkout/ApplePayDonations.cs +++ /dev/null @@ -1,270 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ApplePayDonations - /// - [DataContract(Name = "ApplePayDonations")] - public partial class ApplePayDonations : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **applepay** - /// - /// **applepay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Applepay for value: applepay - /// - [EnumMember(Value = "applepay")] - Applepay = 1 - - } - - - /// - /// **applepay** - /// - /// **applepay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ApplePayDonations() { } - /// - /// Initializes a new instance of the class. - /// - /// The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. (required). - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **applepay** (default to TypeEnum.Applepay). - public ApplePayDonations(string applePayToken = default(string), string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Applepay) - { - this.ApplePayToken = applePayToken; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. - /// - /// The stringified and base64 encoded `paymentData` you retrieved from the Apple framework. - [DataMember(Name = "applePayToken", IsRequired = false, EmitDefaultValue = false)] - public string ApplePayToken { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApplePayDonations {\n"); - sb.Append(" ApplePayToken: ").Append(ApplePayToken).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplePayDonations); - } - - /// - /// Returns true if ApplePayDonations instances are equal - /// - /// Instance of ApplePayDonations to be compared - /// Boolean - public bool Equals(ApplePayDonations input) - { - if (input == null) - { - return false; - } - return - ( - this.ApplePayToken == input.ApplePayToken || - (this.ApplePayToken != null && - this.ApplePayToken.Equals(input.ApplePayToken)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApplePayToken != null) - { - hashCode = (hashCode * 59) + this.ApplePayToken.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ApplePayToken (string) maxLength - if (this.ApplePayToken != null && this.ApplePayToken.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ApplePayToken, length must be less than 10000.", new [] { "ApplePayToken" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ApplePaySessionRequest.cs b/Adyen/Model/Checkout/ApplePaySessionRequest.cs deleted file mode 100644 index 4f113ca85..000000000 --- a/Adyen/Model/Checkout/ApplePaySessionRequest.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ApplePaySessionRequest - /// - [DataContract(Name = "ApplePaySessionRequest")] - public partial class ApplePaySessionRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ApplePaySessionRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// This is the name that your shoppers will see in the Apple Pay interface. The value returned as `configuration.merchantName` field from the [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. (required). - /// The domain name you provided when you added Apple Pay in your Customer Area. This must match the `window.location.hostname` of the web shop. (required). - /// Your merchant identifier registered with Apple Pay. Use the value of the `configuration.merchantId` field from the [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. (required). - public ApplePaySessionRequest(string displayName = default(string), string domainName = default(string), string merchantIdentifier = default(string)) - { - this.DisplayName = displayName; - this.DomainName = domainName; - this.MerchantIdentifier = merchantIdentifier; - } - - /// - /// This is the name that your shoppers will see in the Apple Pay interface. The value returned as `configuration.merchantName` field from the [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. - /// - /// This is the name that your shoppers will see in the Apple Pay interface. The value returned as `configuration.merchantName` field from the [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. - [DataMember(Name = "displayName", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// The domain name you provided when you added Apple Pay in your Customer Area. This must match the `window.location.hostname` of the web shop. - /// - /// The domain name you provided when you added Apple Pay in your Customer Area. This must match the `window.location.hostname` of the web shop. - [DataMember(Name = "domainName", IsRequired = false, EmitDefaultValue = false)] - public string DomainName { get; set; } - - /// - /// Your merchant identifier registered with Apple Pay. Use the value of the `configuration.merchantId` field from the [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. - /// - /// Your merchant identifier registered with Apple Pay. Use the value of the `configuration.merchantId` field from the [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. - [DataMember(Name = "merchantIdentifier", IsRequired = false, EmitDefaultValue = false)] - public string MerchantIdentifier { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApplePaySessionRequest {\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" DomainName: ").Append(DomainName).Append("\n"); - sb.Append(" MerchantIdentifier: ").Append(MerchantIdentifier).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplePaySessionRequest); - } - - /// - /// Returns true if ApplePaySessionRequest instances are equal - /// - /// Instance of ApplePaySessionRequest to be compared - /// Boolean - public bool Equals(ApplePaySessionRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.DomainName == input.DomainName || - (this.DomainName != null && - this.DomainName.Equals(input.DomainName)) - ) && - ( - this.MerchantIdentifier == input.MerchantIdentifier || - (this.MerchantIdentifier != null && - this.MerchantIdentifier.Equals(input.MerchantIdentifier)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.DomainName != null) - { - hashCode = (hashCode * 59) + this.DomainName.GetHashCode(); - } - if (this.MerchantIdentifier != null) - { - hashCode = (hashCode * 59) + this.MerchantIdentifier.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // DisplayName (string) maxLength - if (this.DisplayName != null && this.DisplayName.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, length must be less than 64.", new [] { "DisplayName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ApplePaySessionResponse.cs b/Adyen/Model/Checkout/ApplePaySessionResponse.cs deleted file mode 100644 index 5f314d423..000000000 --- a/Adyen/Model/Checkout/ApplePaySessionResponse.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ApplePaySessionResponse - /// - [DataContract(Name = "ApplePaySessionResponse")] - public partial class ApplePaySessionResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ApplePaySessionResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Base64 encoded data you need to [complete the Apple Pay merchant validation](https://docs.adyen.com/payment-methods/apple-pay/api-only?tab=adyen-certificate-validation_1#complete-apple-pay-session-validation). (required). - public ApplePaySessionResponse(string data = default(string)) - { - this.Data = data; - } - - /// - /// Base64 encoded data you need to [complete the Apple Pay merchant validation](https://docs.adyen.com/payment-methods/apple-pay/api-only?tab=adyen-certificate-validation_1#complete-apple-pay-session-validation). - /// - /// Base64 encoded data you need to [complete the Apple Pay merchant validation](https://docs.adyen.com/payment-methods/apple-pay/api-only?tab=adyen-certificate-validation_1#complete-apple-pay-session-validation). - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public string Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApplePaySessionResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplePaySessionResponse); - } - - /// - /// Returns true if ApplePaySessionResponse instances are equal - /// - /// Instance of ApplePaySessionResponse to be compared - /// Boolean - public bool Equals(ApplePaySessionResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ApplicationInfo.cs b/Adyen/Model/Checkout/ApplicationInfo.cs deleted file mode 100644 index b560f848b..000000000 --- a/Adyen/Model/Checkout/ApplicationInfo.cs +++ /dev/null @@ -1,218 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ApplicationInfo - /// - [DataContract(Name = "ApplicationInfo")] - public partial class ApplicationInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// adyenLibrary. - /// adyenPaymentSource. - /// externalPlatform. - /// merchantApplication. - /// merchantDevice. - /// shopperInteractionDevice. - public ApplicationInfo(CommonField adyenLibrary = default(CommonField), CommonField adyenPaymentSource = default(CommonField), ExternalPlatform externalPlatform = default(ExternalPlatform), CommonField merchantApplication = default(CommonField), MerchantDevice merchantDevice = default(MerchantDevice), ShopperInteractionDevice shopperInteractionDevice = default(ShopperInteractionDevice)) - { - this.AdyenLibrary = adyenLibrary; - this.AdyenPaymentSource = adyenPaymentSource; - this.ExternalPlatform = externalPlatform; - this.MerchantApplication = merchantApplication; - this.MerchantDevice = merchantDevice; - this.ShopperInteractionDevice = shopperInteractionDevice; - } - - /// - /// Gets or Sets AdyenLibrary - /// - [DataMember(Name = "adyenLibrary", EmitDefaultValue = false)] - public CommonField AdyenLibrary { get; set; } - - /// - /// Gets or Sets AdyenPaymentSource - /// - [DataMember(Name = "adyenPaymentSource", EmitDefaultValue = false)] - public CommonField AdyenPaymentSource { get; set; } - - /// - /// Gets or Sets ExternalPlatform - /// - [DataMember(Name = "externalPlatform", EmitDefaultValue = false)] - public ExternalPlatform ExternalPlatform { get; set; } - - /// - /// Gets or Sets MerchantApplication - /// - [DataMember(Name = "merchantApplication", EmitDefaultValue = false)] - public CommonField MerchantApplication { get; set; } - - /// - /// Gets or Sets MerchantDevice - /// - [DataMember(Name = "merchantDevice", EmitDefaultValue = false)] - public MerchantDevice MerchantDevice { get; set; } - - /// - /// Gets or Sets ShopperInteractionDevice - /// - [DataMember(Name = "shopperInteractionDevice", EmitDefaultValue = false)] - public ShopperInteractionDevice ShopperInteractionDevice { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApplicationInfo {\n"); - sb.Append(" AdyenLibrary: ").Append(AdyenLibrary).Append("\n"); - sb.Append(" AdyenPaymentSource: ").Append(AdyenPaymentSource).Append("\n"); - sb.Append(" ExternalPlatform: ").Append(ExternalPlatform).Append("\n"); - sb.Append(" MerchantApplication: ").Append(MerchantApplication).Append("\n"); - sb.Append(" MerchantDevice: ").Append(MerchantDevice).Append("\n"); - sb.Append(" ShopperInteractionDevice: ").Append(ShopperInteractionDevice).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplicationInfo); - } - - /// - /// Returns true if ApplicationInfo instances are equal - /// - /// Instance of ApplicationInfo to be compared - /// Boolean - public bool Equals(ApplicationInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AdyenLibrary == input.AdyenLibrary || - (this.AdyenLibrary != null && - this.AdyenLibrary.Equals(input.AdyenLibrary)) - ) && - ( - this.AdyenPaymentSource == input.AdyenPaymentSource || - (this.AdyenPaymentSource != null && - this.AdyenPaymentSource.Equals(input.AdyenPaymentSource)) - ) && - ( - this.ExternalPlatform == input.ExternalPlatform || - (this.ExternalPlatform != null && - this.ExternalPlatform.Equals(input.ExternalPlatform)) - ) && - ( - this.MerchantApplication == input.MerchantApplication || - (this.MerchantApplication != null && - this.MerchantApplication.Equals(input.MerchantApplication)) - ) && - ( - this.MerchantDevice == input.MerchantDevice || - (this.MerchantDevice != null && - this.MerchantDevice.Equals(input.MerchantDevice)) - ) && - ( - this.ShopperInteractionDevice == input.ShopperInteractionDevice || - (this.ShopperInteractionDevice != null && - this.ShopperInteractionDevice.Equals(input.ShopperInteractionDevice)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdyenLibrary != null) - { - hashCode = (hashCode * 59) + this.AdyenLibrary.GetHashCode(); - } - if (this.AdyenPaymentSource != null) - { - hashCode = (hashCode * 59) + this.AdyenPaymentSource.GetHashCode(); - } - if (this.ExternalPlatform != null) - { - hashCode = (hashCode * 59) + this.ExternalPlatform.GetHashCode(); - } - if (this.MerchantApplication != null) - { - hashCode = (hashCode * 59) + this.MerchantApplication.GetHashCode(); - } - if (this.MerchantDevice != null) - { - hashCode = (hashCode * 59) + this.MerchantDevice.GetHashCode(); - } - if (this.ShopperInteractionDevice != null) - { - hashCode = (hashCode * 59) + this.ShopperInteractionDevice.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/AuthenticationData.cs b/Adyen/Model/Checkout/AuthenticationData.cs deleted file mode 100644 index 974b35995..000000000 --- a/Adyen/Model/Checkout/AuthenticationData.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// AuthenticationData - /// - [DataContract(Name = "AuthenticationData")] - public partial class AuthenticationData : IEquatable, IValidatableObject - { - /// - /// Indicates when 3D Secure authentication should be attempted. This overrides all other rules, including [Dynamic 3D Secure settings](https://docs.adyen.com/risk-management/dynamic-3d-secure). Possible values: * **always**: Perform 3D Secure authentication. * **never**: Don't perform 3D Secure authentication. If PSD2 SCA or other national regulations require authentication, the transaction gets declined. - /// - /// Indicates when 3D Secure authentication should be attempted. This overrides all other rules, including [Dynamic 3D Secure settings](https://docs.adyen.com/risk-management/dynamic-3d-secure). Possible values: * **always**: Perform 3D Secure authentication. * **never**: Don't perform 3D Secure authentication. If PSD2 SCA or other national regulations require authentication, the transaction gets declined. - [JsonConverter(typeof(StringEnumConverter))] - public enum AttemptAuthenticationEnum - { - /// - /// Enum Always for value: always - /// - [EnumMember(Value = "always")] - Always = 1, - - /// - /// Enum Never for value: never - /// - [EnumMember(Value = "never")] - Never = 2 - - } - - - /// - /// Indicates when 3D Secure authentication should be attempted. This overrides all other rules, including [Dynamic 3D Secure settings](https://docs.adyen.com/risk-management/dynamic-3d-secure). Possible values: * **always**: Perform 3D Secure authentication. * **never**: Don't perform 3D Secure authentication. If PSD2 SCA or other national regulations require authentication, the transaction gets declined. - /// - /// Indicates when 3D Secure authentication should be attempted. This overrides all other rules, including [Dynamic 3D Secure settings](https://docs.adyen.com/risk-management/dynamic-3d-secure). Possible values: * **always**: Perform 3D Secure authentication. * **never**: Don't perform 3D Secure authentication. If PSD2 SCA or other national regulations require authentication, the transaction gets declined. - [DataMember(Name = "attemptAuthentication", EmitDefaultValue = false)] - public AttemptAuthenticationEnum? AttemptAuthentication { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicates when 3D Secure authentication should be attempted. This overrides all other rules, including [Dynamic 3D Secure settings](https://docs.adyen.com/risk-management/dynamic-3d-secure). Possible values: * **always**: Perform 3D Secure authentication. * **never**: Don't perform 3D Secure authentication. If PSD2 SCA or other national regulations require authentication, the transaction gets declined.. - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization. Default: **false**. (default to false). - /// threeDSRequestData. - public AuthenticationData(AttemptAuthenticationEnum? attemptAuthentication = default(AttemptAuthenticationEnum?), bool? authenticationOnly = false, ThreeDSRequestData threeDSRequestData = default(ThreeDSRequestData)) - { - this.AttemptAuthentication = attemptAuthentication; - this.AuthenticationOnly = authenticationOnly; - this.ThreeDSRequestData = threeDSRequestData; - } - - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization. Default: **false**. - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization. Default: **false**. - [DataMember(Name = "authenticationOnly", EmitDefaultValue = false)] - public bool? AuthenticationOnly { get; set; } - - /// - /// Gets or Sets ThreeDSRequestData - /// - [DataMember(Name = "threeDSRequestData", EmitDefaultValue = false)] - public ThreeDSRequestData ThreeDSRequestData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AuthenticationData {\n"); - sb.Append(" AttemptAuthentication: ").Append(AttemptAuthentication).Append("\n"); - sb.Append(" AuthenticationOnly: ").Append(AuthenticationOnly).Append("\n"); - sb.Append(" ThreeDSRequestData: ").Append(ThreeDSRequestData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AuthenticationData); - } - - /// - /// Returns true if AuthenticationData instances are equal - /// - /// Instance of AuthenticationData to be compared - /// Boolean - public bool Equals(AuthenticationData input) - { - if (input == null) - { - return false; - } - return - ( - this.AttemptAuthentication == input.AttemptAuthentication || - this.AttemptAuthentication.Equals(input.AttemptAuthentication) - ) && - ( - this.AuthenticationOnly == input.AuthenticationOnly || - this.AuthenticationOnly.Equals(input.AuthenticationOnly) - ) && - ( - this.ThreeDSRequestData == input.ThreeDSRequestData || - (this.ThreeDSRequestData != null && - this.ThreeDSRequestData.Equals(input.ThreeDSRequestData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AttemptAuthentication.GetHashCode(); - hashCode = (hashCode * 59) + this.AuthenticationOnly.GetHashCode(); - if (this.ThreeDSRequestData != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/BacsDirectDebitDetails.cs b/Adyen/Model/Checkout/BacsDirectDebitDetails.cs deleted file mode 100644 index e5db52c40..000000000 --- a/Adyen/Model/Checkout/BacsDirectDebitDetails.cs +++ /dev/null @@ -1,280 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// BacsDirectDebitDetails - /// - [DataContract(Name = "BacsDirectDebitDetails")] - public partial class BacsDirectDebitDetails : IEquatable, IValidatableObject - { - /// - /// **directdebit_GB** - /// - /// **directdebit_GB** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DirectdebitGB for value: directdebit_GB - /// - [EnumMember(Value = "directdebit_GB")] - DirectdebitGB = 1 - - } - - - /// - /// **directdebit_GB** - /// - /// **directdebit_GB** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators).. - /// The bank routing number of the account.. - /// The checkout attempt identifier.. - /// The name of the bank account holder.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts.. - /// **directdebit_GB** (default to TypeEnum.DirectdebitGB). - public BacsDirectDebitDetails(string bankAccountNumber = default(string), string bankLocationId = default(string), string checkoutAttemptId = default(string), string holderName = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string transferInstrumentId = default(string), TypeEnum? type = TypeEnum.DirectdebitGB) - { - this.BankAccountNumber = bankAccountNumber; - this.BankLocationId = bankLocationId; - this.CheckoutAttemptId = checkoutAttemptId; - this.HolderName = holderName; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.TransferInstrumentId = transferInstrumentId; - this.Type = type; - } - - /// - /// The bank account number (without separators). - /// - /// The bank account number (without separators). - [DataMember(Name = "bankAccountNumber", EmitDefaultValue = false)] - public string BankAccountNumber { get; set; } - - /// - /// The bank routing number of the account. - /// - /// The bank routing number of the account. - [DataMember(Name = "bankLocationId", EmitDefaultValue = false)] - public string BankLocationId { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The name of the bank account holder. - /// - /// The name of the bank account holder. - [DataMember(Name = "holderName", EmitDefaultValue = false)] - public string HolderName { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts. - /// - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts. - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BacsDirectDebitDetails {\n"); - sb.Append(" BankAccountNumber: ").Append(BankAccountNumber).Append("\n"); - sb.Append(" BankLocationId: ").Append(BankLocationId).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" HolderName: ").Append(HolderName).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BacsDirectDebitDetails); - } - - /// - /// Returns true if BacsDirectDebitDetails instances are equal - /// - /// Instance of BacsDirectDebitDetails to be compared - /// Boolean - public bool Equals(BacsDirectDebitDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccountNumber == input.BankAccountNumber || - (this.BankAccountNumber != null && - this.BankAccountNumber.Equals(input.BankAccountNumber)) - ) && - ( - this.BankLocationId == input.BankLocationId || - (this.BankLocationId != null && - this.BankLocationId.Equals(input.BankLocationId)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.HolderName == input.HolderName || - (this.HolderName != null && - this.HolderName.Equals(input.HolderName)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccountNumber != null) - { - hashCode = (hashCode * 59) + this.BankAccountNumber.GetHashCode(); - } - if (this.BankLocationId != null) - { - hashCode = (hashCode * 59) + this.BankLocationId.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.HolderName != null) - { - hashCode = (hashCode * 59) + this.HolderName.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/BalanceCheckRequest.cs b/Adyen/Model/Checkout/BalanceCheckRequest.cs deleted file mode 100644 index 50f294353..000000000 --- a/Adyen/Model/Checkout/BalanceCheckRequest.cs +++ /dev/null @@ -1,1011 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// BalanceCheckRequest - /// - [DataContract(Name = "BalanceCheckRequest")] - public partial class BalanceCheckRequest : IEquatable, IValidatableObject - { - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceCheckRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// accountInfo. - /// additionalAmount. - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.. - /// amount (required). - /// applicationInfo. - /// billingAddress. - /// browserInfo. - /// The delay between the authorisation and scheduled auto-capture, specified in hours.. - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD. - /// dccQuote. - /// deliveryAddress. - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00. - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting).. - /// An integer value that is added to the normal fraud score. The value can be either positive or negative.. - /// installments. - /// The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana and ja-Hani character set for Visa, Mastercard and JCB payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, Kanji, capital letters, numbers and special characters. * Half-width or full-width characters.. - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.. - /// merchantRiskIndicator. - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. . - /// When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead.. - /// The collection that contains the type of the payment method and its specific information. (required). - /// recurring. - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. . - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters.. - /// Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card.. - /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail.. - /// A session ID used to identify a payment session.. - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`.. - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).. - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// The combination of a language code and a country code to specify the language to be used in the payment.. - /// shopperName. - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. - /// The shopper's social security number.. - /// An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split).. - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment.. - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication.. - /// threeDS2RequestData. - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. (default to false). - /// The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available).. - /// Set to true if the payment should be routed to a trusted MID.. - public BalanceCheckRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), Address billingAddress = default(Address), BrowserInfo browserInfo = default(BrowserInfo), int? captureDelayHours = default(int?), DateTime dateOfBirth = default(DateTime), ForexQuote dccQuote = default(ForexQuote), Address deliveryAddress = default(Address), DateTime deliveryDate = default(DateTime), string deviceFingerprint = default(string), int? fraudOffset = default(int?), Installments installments = default(Installments), Dictionary localizedShopperStatement = default(Dictionary), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), MerchantRiskIndicator merchantRiskIndicator = default(MerchantRiskIndicator), Dictionary metadata = default(Dictionary), string orderReference = default(string), Dictionary paymentMethod = default(Dictionary), Recurring recurring = default(Recurring), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string reference = default(string), string selectedBrand = default(string), string selectedRecurringDetailReference = default(string), string sessionId = default(string), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), string socialSecurityNumber = default(string), List splits = default(List), string store = default(string), string telephoneNumber = default(string), ThreeDS2RequestData threeDS2RequestData = default(ThreeDS2RequestData), bool? threeDSAuthenticationOnly = false, string totalsGroup = default(string), bool? trustedShopper = default(bool?)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.AccountInfo = accountInfo; - this.AdditionalAmount = additionalAmount; - this.AdditionalData = additionalData; - this.ApplicationInfo = applicationInfo; - this.BillingAddress = billingAddress; - this.BrowserInfo = browserInfo; - this.CaptureDelayHours = captureDelayHours; - this.DateOfBirth = dateOfBirth; - this.DccQuote = dccQuote; - this.DeliveryAddress = deliveryAddress; - this.DeliveryDate = deliveryDate; - this.DeviceFingerprint = deviceFingerprint; - this.FraudOffset = fraudOffset; - this.Installments = installments; - this.LocalizedShopperStatement = localizedShopperStatement; - this.Mcc = mcc; - this.MerchantOrderReference = merchantOrderReference; - this.MerchantRiskIndicator = merchantRiskIndicator; - this.Metadata = metadata; - this.OrderReference = orderReference; - this.Recurring = recurring; - this.RecurringProcessingModel = recurringProcessingModel; - this.Reference = reference; - this.SelectedBrand = selectedBrand; - this.SelectedRecurringDetailReference = selectedRecurringDetailReference; - this.SessionId = sessionId; - this.ShopperEmail = shopperEmail; - this.ShopperIP = shopperIP; - this.ShopperInteraction = shopperInteraction; - this.ShopperLocale = shopperLocale; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.ShopperStatement = shopperStatement; - this.SocialSecurityNumber = socialSecurityNumber; - this.Splits = splits; - this.Store = store; - this.TelephoneNumber = telephoneNumber; - this.ThreeDS2RequestData = threeDS2RequestData; - this.ThreeDSAuthenticationOnly = threeDSAuthenticationOnly; - this.TotalsGroup = totalsGroup; - this.TrustedShopper = trustedShopper; - } - - /// - /// Gets or Sets AccountInfo - /// - [DataMember(Name = "accountInfo", EmitDefaultValue = false)] - public AccountInfo AccountInfo { get; set; } - - /// - /// Gets or Sets AdditionalAmount - /// - [DataMember(Name = "additionalAmount", EmitDefaultValue = false)] - public Amount AdditionalAmount { get; set; } - - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// Gets or Sets BrowserInfo - /// - [DataMember(Name = "browserInfo", EmitDefaultValue = false)] - public BrowserInfo BrowserInfo { get; set; } - - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - [DataMember(Name = "captureDelayHours", EmitDefaultValue = false)] - public int? CaptureDelayHours { get; set; } - - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// Gets or Sets DccQuote - /// - [DataMember(Name = "dccQuote", EmitDefaultValue = false)] - public ForexQuote DccQuote { get; set; } - - /// - /// Gets or Sets DeliveryAddress - /// - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public Address DeliveryAddress { get; set; } - - /// - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - /// - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - [DataMember(Name = "deliveryDate", EmitDefaultValue = false)] - public DateTime DeliveryDate { get; set; } - - /// - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - /// - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - [DataMember(Name = "deviceFingerprint", EmitDefaultValue = false)] - public string DeviceFingerprint { get; set; } - - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - [DataMember(Name = "fraudOffset", EmitDefaultValue = false)] - public int? FraudOffset { get; set; } - - /// - /// Gets or Sets Installments - /// - [DataMember(Name = "installments", EmitDefaultValue = false)] - public Installments Installments { get; set; } - - /// - /// The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana and ja-Hani character set for Visa, Mastercard and JCB payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, Kanji, capital letters, numbers and special characters. * Half-width or full-width characters. - /// - /// The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana and ja-Hani character set for Visa, Mastercard and JCB payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, Kanji, capital letters, numbers and special characters. * Half-width or full-width characters. - [DataMember(Name = "localizedShopperStatement", EmitDefaultValue = false)] - public Dictionary LocalizedShopperStatement { get; set; } - - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - [DataMember(Name = "merchantOrderReference", EmitDefaultValue = false)] - public string MerchantOrderReference { get; set; } - - /// - /// Gets or Sets MerchantRiskIndicator - /// - [DataMember(Name = "merchantRiskIndicator", EmitDefaultValue = false)] - public MerchantRiskIndicator MerchantRiskIndicator { get; set; } - - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - /// - /// When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - [DataMember(Name = "orderReference", EmitDefaultValue = false)] - public string OrderReference { get; set; } - - /// - /// The collection that contains the type of the payment method and its specific information. - /// - /// The collection that contains the type of the payment method and its specific information. - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public Dictionary PaymentMethod { get; set; } - - /// - /// Gets or Sets Recurring - /// - [DataMember(Name = "recurring", EmitDefaultValue = false)] - public Recurring Recurring { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. - /// - /// Some payment methods require defining a value for this field to specify how to process the transaction. For the Bancontact payment method, it can be set to: * `maestro` (default), to be processed like a Maestro card, or * `bcmc`, to be processed like a Bancontact card. - [DataMember(Name = "selectedBrand", EmitDefaultValue = false)] - public string SelectedBrand { get; set; } - - /// - /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - /// - /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - [DataMember(Name = "selectedRecurringDetailReference", EmitDefaultValue = false)] - public string SelectedRecurringDetailReference { get; set; } - - /// - /// A session ID used to identify a payment session. - /// - /// A session ID used to identify a payment session. - [DataMember(Name = "sessionId", EmitDefaultValue = false)] - public string SessionId { get; set; } - - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "shopperIP", EmitDefaultValue = false)] - public string ShopperIP { get; set; } - - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). - /// - /// An array of objects specifying how the payment should be split when using either Adyen for Platforms for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/split-payments), or standalone [Issuing](https://docs.adyen.com/issuing/add-manage-funds#split). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Gets or Sets ThreeDS2RequestData - /// - [DataMember(Name = "threeDS2RequestData", EmitDefaultValue = false)] - public ThreeDS2RequestData ThreeDS2RequestData { get; set; } - - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - [DataMember(Name = "threeDSAuthenticationOnly", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v69. Use `authenticationData.authenticationOnly` instead.")] - public bool? ThreeDSAuthenticationOnly { get; set; } - - /// - /// The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). - /// - /// The reference value to aggregate sales totals in reporting. When not specified, the store field is used (if available). - [DataMember(Name = "totalsGroup", EmitDefaultValue = false)] - public string TotalsGroup { get; set; } - - /// - /// Set to true if the payment should be routed to a trusted MID. - /// - /// Set to true if the payment should be routed to a trusted MID. - [DataMember(Name = "trustedShopper", EmitDefaultValue = false)] - public bool? TrustedShopper { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceCheckRequest {\n"); - sb.Append(" AccountInfo: ").Append(AccountInfo).Append("\n"); - sb.Append(" AdditionalAmount: ").Append(AdditionalAmount).Append("\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" BrowserInfo: ").Append(BrowserInfo).Append("\n"); - sb.Append(" CaptureDelayHours: ").Append(CaptureDelayHours).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DccQuote: ").Append(DccQuote).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" DeliveryDate: ").Append(DeliveryDate).Append("\n"); - sb.Append(" DeviceFingerprint: ").Append(DeviceFingerprint).Append("\n"); - sb.Append(" FraudOffset: ").Append(FraudOffset).Append("\n"); - sb.Append(" Installments: ").Append(Installments).Append("\n"); - sb.Append(" LocalizedShopperStatement: ").Append(LocalizedShopperStatement).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantOrderReference: ").Append(MerchantOrderReference).Append("\n"); - sb.Append(" MerchantRiskIndicator: ").Append(MerchantRiskIndicator).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" OrderReference: ").Append(OrderReference).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" Recurring: ").Append(Recurring).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SelectedBrand: ").Append(SelectedBrand).Append("\n"); - sb.Append(" SelectedRecurringDetailReference: ").Append(SelectedRecurringDetailReference).Append("\n"); - sb.Append(" SessionId: ").Append(SessionId).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" ThreeDS2RequestData: ").Append(ThreeDS2RequestData).Append("\n"); - sb.Append(" ThreeDSAuthenticationOnly: ").Append(ThreeDSAuthenticationOnly).Append("\n"); - sb.Append(" TotalsGroup: ").Append(TotalsGroup).Append("\n"); - sb.Append(" TrustedShopper: ").Append(TrustedShopper).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceCheckRequest); - } - - /// - /// Returns true if BalanceCheckRequest instances are equal - /// - /// Instance of BalanceCheckRequest to be compared - /// Boolean - public bool Equals(BalanceCheckRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountInfo == input.AccountInfo || - (this.AccountInfo != null && - this.AccountInfo.Equals(input.AccountInfo)) - ) && - ( - this.AdditionalAmount == input.AdditionalAmount || - (this.AdditionalAmount != null && - this.AdditionalAmount.Equals(input.AdditionalAmount)) - ) && - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.BrowserInfo == input.BrowserInfo || - (this.BrowserInfo != null && - this.BrowserInfo.Equals(input.BrowserInfo)) - ) && - ( - this.CaptureDelayHours == input.CaptureDelayHours || - this.CaptureDelayHours.Equals(input.CaptureDelayHours) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DccQuote == input.DccQuote || - (this.DccQuote != null && - this.DccQuote.Equals(input.DccQuote)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.DeliveryDate == input.DeliveryDate || - (this.DeliveryDate != null && - this.DeliveryDate.Equals(input.DeliveryDate)) - ) && - ( - this.DeviceFingerprint == input.DeviceFingerprint || - (this.DeviceFingerprint != null && - this.DeviceFingerprint.Equals(input.DeviceFingerprint)) - ) && - ( - this.FraudOffset == input.FraudOffset || - this.FraudOffset.Equals(input.FraudOffset) - ) && - ( - this.Installments == input.Installments || - (this.Installments != null && - this.Installments.Equals(input.Installments)) - ) && - ( - this.LocalizedShopperStatement == input.LocalizedShopperStatement || - this.LocalizedShopperStatement != null && - input.LocalizedShopperStatement != null && - this.LocalizedShopperStatement.SequenceEqual(input.LocalizedShopperStatement) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantOrderReference == input.MerchantOrderReference || - (this.MerchantOrderReference != null && - this.MerchantOrderReference.Equals(input.MerchantOrderReference)) - ) && - ( - this.MerchantRiskIndicator == input.MerchantRiskIndicator || - (this.MerchantRiskIndicator != null && - this.MerchantRiskIndicator.Equals(input.MerchantRiskIndicator)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.OrderReference == input.OrderReference || - (this.OrderReference != null && - this.OrderReference.Equals(input.OrderReference)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - this.PaymentMethod != null && - input.PaymentMethod != null && - this.PaymentMethod.SequenceEqual(input.PaymentMethod) - ) && - ( - this.Recurring == input.Recurring || - (this.Recurring != null && - this.Recurring.Equals(input.Recurring)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SelectedBrand == input.SelectedBrand || - (this.SelectedBrand != null && - this.SelectedBrand.Equals(input.SelectedBrand)) - ) && - ( - this.SelectedRecurringDetailReference == input.SelectedRecurringDetailReference || - (this.SelectedRecurringDetailReference != null && - this.SelectedRecurringDetailReference.Equals(input.SelectedRecurringDetailReference)) - ) && - ( - this.SessionId == input.SessionId || - (this.SessionId != null && - this.SessionId.Equals(input.SessionId)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperIP == input.ShopperIP || - (this.ShopperIP != null && - this.ShopperIP.Equals(input.ShopperIP)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.ThreeDS2RequestData == input.ThreeDS2RequestData || - (this.ThreeDS2RequestData != null && - this.ThreeDS2RequestData.Equals(input.ThreeDS2RequestData)) - ) && - ( - this.ThreeDSAuthenticationOnly == input.ThreeDSAuthenticationOnly || - this.ThreeDSAuthenticationOnly.Equals(input.ThreeDSAuthenticationOnly) - ) && - ( - this.TotalsGroup == input.TotalsGroup || - (this.TotalsGroup != null && - this.TotalsGroup.Equals(input.TotalsGroup)) - ) && - ( - this.TrustedShopper == input.TrustedShopper || - this.TrustedShopper.Equals(input.TrustedShopper) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountInfo != null) - { - hashCode = (hashCode * 59) + this.AccountInfo.GetHashCode(); - } - if (this.AdditionalAmount != null) - { - hashCode = (hashCode * 59) + this.AdditionalAmount.GetHashCode(); - } - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.BrowserInfo != null) - { - hashCode = (hashCode * 59) + this.BrowserInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CaptureDelayHours.GetHashCode(); - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DccQuote != null) - { - hashCode = (hashCode * 59) + this.DccQuote.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.DeliveryDate != null) - { - hashCode = (hashCode * 59) + this.DeliveryDate.GetHashCode(); - } - if (this.DeviceFingerprint != null) - { - hashCode = (hashCode * 59) + this.DeviceFingerprint.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FraudOffset.GetHashCode(); - if (this.Installments != null) - { - hashCode = (hashCode * 59) + this.Installments.GetHashCode(); - } - if (this.LocalizedShopperStatement != null) - { - hashCode = (hashCode * 59) + this.LocalizedShopperStatement.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantOrderReference != null) - { - hashCode = (hashCode * 59) + this.MerchantOrderReference.GetHashCode(); - } - if (this.MerchantRiskIndicator != null) - { - hashCode = (hashCode * 59) + this.MerchantRiskIndicator.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.OrderReference != null) - { - hashCode = (hashCode * 59) + this.OrderReference.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.Recurring != null) - { - hashCode = (hashCode * 59) + this.Recurring.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SelectedBrand != null) - { - hashCode = (hashCode * 59) + this.SelectedBrand.GetHashCode(); - } - if (this.SelectedRecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.SelectedRecurringDetailReference.GetHashCode(); - } - if (this.SessionId != null) - { - hashCode = (hashCode * 59) + this.SessionId.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperIP != null) - { - hashCode = (hashCode * 59) + this.ShopperIP.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.ThreeDS2RequestData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2RequestData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSAuthenticationOnly.GetHashCode(); - if (this.TotalsGroup != null) - { - hashCode = (hashCode * 59) + this.TotalsGroup.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TrustedShopper.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // DeviceFingerprint (string) maxLength - if (this.DeviceFingerprint != null && this.DeviceFingerprint.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DeviceFingerprint, length must be less than 5000.", new [] { "DeviceFingerprint" }); - } - - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 16.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - // TotalsGroup (string) maxLength - if (this.TotalsGroup != null && this.TotalsGroup.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TotalsGroup, length must be less than 16.", new [] { "TotalsGroup" }); - } - - // TotalsGroup (string) minLength - if (this.TotalsGroup != null && this.TotalsGroup.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TotalsGroup, length must be greater than 1.", new [] { "TotalsGroup" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/BalanceCheckResponse.cs b/Adyen/Model/Checkout/BalanceCheckResponse.cs deleted file mode 100644 index e6f833b19..000000000 --- a/Adyen/Model/Checkout/BalanceCheckResponse.cs +++ /dev/null @@ -1,269 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// BalanceCheckResponse - /// - [DataContract(Name = "BalanceCheckResponse")] - public partial class BalanceCheckResponse : IEquatable, IValidatableObject - { - /// - /// The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed. - /// - /// The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 1, - - /// - /// Enum NotEnoughBalance for value: NotEnoughBalance - /// - [EnumMember(Value = "NotEnoughBalance")] - NotEnoughBalance = 2, - - /// - /// Enum Failed for value: Failed - /// - [EnumMember(Value = "Failed")] - Failed = 3 - - } - - - /// - /// The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed. - /// - /// The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed. - [DataMember(Name = "resultCode", IsRequired = false, EmitDefaultValue = false)] - public ResultCodeEnum ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceCheckResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.. - /// balance (required). - /// fraudResult. - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).. - /// The result of the cancellation request. Possible values: * **Success** – Indicates that the balance check was successful. * **NotEnoughBalance** – Commonly indicates that the card did not have enough balance to pay the amount in the request, or that the currency of the balance on the card did not match the currency of the requested amount. * **Failed** – Indicates that the balance check failed. (required). - /// transactionLimit. - public BalanceCheckResponse(Dictionary additionalData = default(Dictionary), Amount balance = default(Amount), FraudResult fraudResult = default(FraudResult), string pspReference = default(string), string refusalReason = default(string), ResultCodeEnum resultCode = default(ResultCodeEnum), Amount transactionLimit = default(Amount)) - { - this.Balance = balance; - this.ResultCode = resultCode; - this.AdditionalData = additionalData; - this.FraudResult = fraudResult; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.TransactionLimit = transactionLimit; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Balance - /// - [DataMember(Name = "balance", IsRequired = false, EmitDefaultValue = false)] - public Amount Balance { get; set; } - - /// - /// Gets or Sets FraudResult - /// - [DataMember(Name = "fraudResult", EmitDefaultValue = false)] - public FraudResult FraudResult { get; set; } - - /// - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Gets or Sets TransactionLimit - /// - [DataMember(Name = "transactionLimit", EmitDefaultValue = false)] - public Amount TransactionLimit { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceCheckResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Balance: ").Append(Balance).Append("\n"); - sb.Append(" FraudResult: ").Append(FraudResult).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" TransactionLimit: ").Append(TransactionLimit).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceCheckResponse); - } - - /// - /// Returns true if BalanceCheckResponse instances are equal - /// - /// Instance of BalanceCheckResponse to be compared - /// Boolean - public bool Equals(BalanceCheckResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Balance == input.Balance || - (this.Balance != null && - this.Balance.Equals(input.Balance)) - ) && - ( - this.FraudResult == input.FraudResult || - (this.FraudResult != null && - this.FraudResult.Equals(input.FraudResult)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.TransactionLimit == input.TransactionLimit || - (this.TransactionLimit != null && - this.TransactionLimit.Equals(input.TransactionLimit)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Balance != null) - { - hashCode = (hashCode * 59) + this.Balance.GetHashCode(); - } - if (this.FraudResult != null) - { - hashCode = (hashCode * 59) + this.FraudResult.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.TransactionLimit != null) - { - hashCode = (hashCode * 59) + this.TransactionLimit.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/BillDeskDetails.cs b/Adyen/Model/Checkout/BillDeskDetails.cs deleted file mode 100644 index ef006b764..000000000 --- a/Adyen/Model/Checkout/BillDeskDetails.cs +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// BillDeskDetails - /// - [DataContract(Name = "BillDeskDetails")] - public partial class BillDeskDetails : IEquatable, IValidatableObject - { - /// - /// **billdesk** - /// - /// **billdesk** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Online for value: billdesk_online - /// - [EnumMember(Value = "billdesk_online")] - Online = 1, - - /// - /// Enum Wallet for value: billdesk_wallet - /// - [EnumMember(Value = "billdesk_wallet")] - Wallet = 2 - - } - - - /// - /// **billdesk** - /// - /// **billdesk** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BillDeskDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The issuer id of the shopper's selected bank. (required). - /// **billdesk** (required). - public BillDeskDetails(string checkoutAttemptId = default(string), string issuer = default(string), TypeEnum type = default(TypeEnum)) - { - this.Issuer = issuer; - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The issuer id of the shopper's selected bank. - /// - /// The issuer id of the shopper's selected bank. - [DataMember(Name = "issuer", IsRequired = false, EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BillDeskDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BillDeskDetails); - } - - /// - /// Returns true if BillDeskDetails instances are equal - /// - /// Instance of BillDeskDetails to be compared - /// Boolean - public bool Equals(BillDeskDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/BillingAddress.cs b/Adyen/Model/Checkout/BillingAddress.cs deleted file mode 100644 index 4b1e4119e..000000000 --- a/Adyen/Model/Checkout/BillingAddress.cs +++ /dev/null @@ -1,253 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// BillingAddress - /// - [DataContract(Name = "BillingAddress")] - public partial class BillingAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BillingAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Maximum length: 3000 characters. (required). - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// The number or name of the house. Maximum length: 3000 characters. (required). - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). - public BillingAddress(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.City = city; - this.Country = country; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.Street = street; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Maximum length: 3000 characters. - /// - /// The name of the city. Maximum length: 3000 characters. - [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The number or name of the house. Maximum length: 3000 characters. - /// - /// The number or name of the house. Maximum length: 3000 characters. - [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BillingAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BillingAddress); - } - - /// - /// Returns true if BillingAddress instances are equal - /// - /// Instance of BillingAddress to be compared - /// Boolean - public bool Equals(BillingAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) maxLength - if (this.City != null && this.City.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); - } - - // HouseNumberOrName (string) maxLength - if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); - } - - // StateOrProvince (string) maxLength - if (this.StateOrProvince != null && this.StateOrProvince.Length > 1000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StateOrProvince, length must be less than 1000.", new [] { "StateOrProvince" }); - } - - // Street (string) maxLength - if (this.Street != null && this.Street.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/BlikDetails.cs b/Adyen/Model/Checkout/BlikDetails.cs deleted file mode 100644 index 0a5cd33cf..000000000 --- a/Adyen/Model/Checkout/BlikDetails.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// BlikDetails - /// - [DataContract(Name = "BlikDetails")] - public partial class BlikDetails : IEquatable, IValidatableObject - { - /// - /// **blik** - /// - /// **blik** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Blik for value: blik - /// - [EnumMember(Value = "blik")] - Blik = 1 - - } - - - /// - /// **blik** - /// - /// **blik** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// BLIK code consisting of 6 digits.. - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **blik**. - public BlikDetails(string blikCode = default(string), string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.BlikCode = blikCode; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// BLIK code consisting of 6 digits. - /// - /// BLIK code consisting of 6 digits. - [DataMember(Name = "blikCode", EmitDefaultValue = false)] - public string BlikCode { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BlikDetails {\n"); - sb.Append(" BlikCode: ").Append(BlikCode).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BlikDetails); - } - - /// - /// Returns true if BlikDetails instances are equal - /// - /// Instance of BlikDetails to be compared - /// Boolean - public bool Equals(BlikDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BlikCode == input.BlikCode || - (this.BlikCode != null && - this.BlikCode.Equals(input.BlikCode)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BlikCode != null) - { - hashCode = (hashCode * 59) + this.BlikCode.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/BrowserInfo.cs b/Adyen/Model/Checkout/BrowserInfo.cs deleted file mode 100644 index 7f6560ead..000000000 --- a/Adyen/Model/Checkout/BrowserInfo.cs +++ /dev/null @@ -1,262 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// BrowserInfo - /// - [DataContract(Name = "BrowserInfo")] - public partial class BrowserInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BrowserInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The accept header value of the shopper's browser. (required). - /// The color depth of the shopper's browser in bits per pixel. This should be obtained by using the browser's `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth. (required). - /// Boolean value indicating if the shopper's browser is able to execute Java. (required). - /// Boolean value indicating if the shopper's browser is able to execute JavaScript. A default 'true' value is assumed if the field is not present. (default to true). - /// The `navigator.language` value of the shopper's browser (as defined in IETF BCP 47). (required). - /// The total height of the shopper's device screen in pixels. (required). - /// The total width of the shopper's device screen in pixels. (required). - /// Time difference between UTC time and the shopper's browser local time, in minutes. (required). - /// The user agent value of the shopper's browser. (required). - public BrowserInfo(string acceptHeader = default(string), int? colorDepth = default(int?), bool? javaEnabled = default(bool?), bool? javaScriptEnabled = true, string language = default(string), int? screenHeight = default(int?), int? screenWidth = default(int?), int? timeZoneOffset = default(int?), string userAgent = default(string)) - { - this.AcceptHeader = acceptHeader; - this.ColorDepth = colorDepth; - this.JavaEnabled = javaEnabled; - this.Language = language; - this.ScreenHeight = screenHeight; - this.ScreenWidth = screenWidth; - this.TimeZoneOffset = timeZoneOffset; - this.UserAgent = userAgent; - this.JavaScriptEnabled = javaScriptEnabled; - } - - /// - /// The accept header value of the shopper's browser. - /// - /// The accept header value of the shopper's browser. - [DataMember(Name = "acceptHeader", IsRequired = false, EmitDefaultValue = false)] - public string AcceptHeader { get; set; } - - /// - /// The color depth of the shopper's browser in bits per pixel. This should be obtained by using the browser's `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth. - /// - /// The color depth of the shopper's browser in bits per pixel. This should be obtained by using the browser's `screen.colorDepth` property. Accepted values: 1, 4, 8, 15, 16, 24, 30, 32 or 48 bit color depth. - [DataMember(Name = "colorDepth", IsRequired = false, EmitDefaultValue = false)] - public int? ColorDepth { get; set; } - - /// - /// Boolean value indicating if the shopper's browser is able to execute Java. - /// - /// Boolean value indicating if the shopper's browser is able to execute Java. - [DataMember(Name = "javaEnabled", IsRequired = false, EmitDefaultValue = false)] - public bool? JavaEnabled { get; set; } - - /// - /// Boolean value indicating if the shopper's browser is able to execute JavaScript. A default 'true' value is assumed if the field is not present. - /// - /// Boolean value indicating if the shopper's browser is able to execute JavaScript. A default 'true' value is assumed if the field is not present. - [DataMember(Name = "javaScriptEnabled", EmitDefaultValue = false)] - public bool? JavaScriptEnabled { get; set; } - - /// - /// The `navigator.language` value of the shopper's browser (as defined in IETF BCP 47). - /// - /// The `navigator.language` value of the shopper's browser (as defined in IETF BCP 47). - [DataMember(Name = "language", IsRequired = false, EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// The total height of the shopper's device screen in pixels. - /// - /// The total height of the shopper's device screen in pixels. - [DataMember(Name = "screenHeight", IsRequired = false, EmitDefaultValue = false)] - public int? ScreenHeight { get; set; } - - /// - /// The total width of the shopper's device screen in pixels. - /// - /// The total width of the shopper's device screen in pixels. - [DataMember(Name = "screenWidth", IsRequired = false, EmitDefaultValue = false)] - public int? ScreenWidth { get; set; } - - /// - /// Time difference between UTC time and the shopper's browser local time, in minutes. - /// - /// Time difference between UTC time and the shopper's browser local time, in minutes. - [DataMember(Name = "timeZoneOffset", IsRequired = false, EmitDefaultValue = false)] - public int? TimeZoneOffset { get; set; } - - /// - /// The user agent value of the shopper's browser. - /// - /// The user agent value of the shopper's browser. - [DataMember(Name = "userAgent", IsRequired = false, EmitDefaultValue = false)] - public string UserAgent { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BrowserInfo {\n"); - sb.Append(" AcceptHeader: ").Append(AcceptHeader).Append("\n"); - sb.Append(" ColorDepth: ").Append(ColorDepth).Append("\n"); - sb.Append(" JavaEnabled: ").Append(JavaEnabled).Append("\n"); - sb.Append(" JavaScriptEnabled: ").Append(JavaScriptEnabled).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" ScreenHeight: ").Append(ScreenHeight).Append("\n"); - sb.Append(" ScreenWidth: ").Append(ScreenWidth).Append("\n"); - sb.Append(" TimeZoneOffset: ").Append(TimeZoneOffset).Append("\n"); - sb.Append(" UserAgent: ").Append(UserAgent).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BrowserInfo); - } - - /// - /// Returns true if BrowserInfo instances are equal - /// - /// Instance of BrowserInfo to be compared - /// Boolean - public bool Equals(BrowserInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptHeader == input.AcceptHeader || - (this.AcceptHeader != null && - this.AcceptHeader.Equals(input.AcceptHeader)) - ) && - ( - this.ColorDepth == input.ColorDepth || - this.ColorDepth.Equals(input.ColorDepth) - ) && - ( - this.JavaEnabled == input.JavaEnabled || - this.JavaEnabled.Equals(input.JavaEnabled) - ) && - ( - this.JavaScriptEnabled == input.JavaScriptEnabled || - this.JavaScriptEnabled.Equals(input.JavaScriptEnabled) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.ScreenHeight == input.ScreenHeight || - this.ScreenHeight.Equals(input.ScreenHeight) - ) && - ( - this.ScreenWidth == input.ScreenWidth || - this.ScreenWidth.Equals(input.ScreenWidth) - ) && - ( - this.TimeZoneOffset == input.TimeZoneOffset || - this.TimeZoneOffset.Equals(input.TimeZoneOffset) - ) && - ( - this.UserAgent == input.UserAgent || - (this.UserAgent != null && - this.UserAgent.Equals(input.UserAgent)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcceptHeader != null) - { - hashCode = (hashCode * 59) + this.AcceptHeader.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ColorDepth.GetHashCode(); - hashCode = (hashCode * 59) + this.JavaEnabled.GetHashCode(); - hashCode = (hashCode * 59) + this.JavaScriptEnabled.GetHashCode(); - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ScreenHeight.GetHashCode(); - hashCode = (hashCode * 59) + this.ScreenWidth.GetHashCode(); - hashCode = (hashCode * 59) + this.TimeZoneOffset.GetHashCode(); - if (this.UserAgent != null) - { - hashCode = (hashCode * 59) + this.UserAgent.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CancelOrderRequest.cs b/Adyen/Model/Checkout/CancelOrderRequest.cs deleted file mode 100644 index d9f25067d..000000000 --- a/Adyen/Model/Checkout/CancelOrderRequest.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CancelOrderRequest - /// - [DataContract(Name = "CancelOrderRequest")] - public partial class CancelOrderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CancelOrderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account identifier that orderData belongs to. (required). - /// order (required). - public CancelOrderRequest(string merchantAccount = default(string), EncryptedOrderData order = default(EncryptedOrderData)) - { - this.MerchantAccount = merchantAccount; - this.Order = order; - } - - /// - /// The merchant account identifier that orderData belongs to. - /// - /// The merchant account identifier that orderData belongs to. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets Order - /// - [DataMember(Name = "order", IsRequired = false, EmitDefaultValue = false)] - public EncryptedOrderData Order { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CancelOrderRequest {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Order: ").Append(Order).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CancelOrderRequest); - } - - /// - /// Returns true if CancelOrderRequest instances are equal - /// - /// Instance of CancelOrderRequest to be compared - /// Boolean - public bool Equals(CancelOrderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Order == input.Order || - (this.Order != null && - this.Order.Equals(input.Order)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Order != null) - { - hashCode = (hashCode * 59) + this.Order.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CancelOrderResponse.cs b/Adyen/Model/Checkout/CancelOrderResponse.cs deleted file mode 100644 index 417804736..000000000 --- a/Adyen/Model/Checkout/CancelOrderResponse.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CancelOrderResponse - /// - [DataContract(Name = "CancelOrderResponse")] - public partial class CancelOrderResponse : IEquatable, IValidatableObject - { - /// - /// The result of the cancellation request. Possible values: * **Received** – Indicates the cancellation has successfully been received by Adyen, and will be processed. - /// - /// The result of the cancellation request. Possible values: * **Received** – Indicates the cancellation has successfully been received by Adyen, and will be processed. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Received for value: Received - /// - [EnumMember(Value = "Received")] - Received = 1 - - } - - - /// - /// The result of the cancellation request. Possible values: * **Received** – Indicates the cancellation has successfully been received by Adyen, and will be processed. - /// - /// The result of the cancellation request. Possible values: * **Received** – Indicates the cancellation has successfully been received by Adyen, and will be processed. - [DataMember(Name = "resultCode", IsRequired = false, EmitDefaultValue = false)] - public ResultCodeEnum ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CancelOrderResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// A unique reference of the cancellation request. (required). - /// The result of the cancellation request. Possible values: * **Received** – Indicates the cancellation has successfully been received by Adyen, and will be processed. (required). - public CancelOrderResponse(string pspReference = default(string), ResultCodeEnum resultCode = default(ResultCodeEnum)) - { - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// A unique reference of the cancellation request. - /// - /// A unique reference of the cancellation request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CancelOrderResponse {\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CancelOrderResponse); - } - - /// - /// Returns true if CancelOrderResponse instances are equal - /// - /// Instance of CancelOrderResponse to be compared - /// Boolean - public bool Equals(CancelOrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CardBrandDetails.cs b/Adyen/Model/Checkout/CardBrandDetails.cs deleted file mode 100644 index 68cc25910..000000000 --- a/Adyen/Model/Checkout/CardBrandDetails.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CardBrandDetails - /// - [DataContract(Name = "CardBrandDetails")] - public partial class CardBrandDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates if you support the card brand.. - /// The name of the card brand.. - public CardBrandDetails(bool? supported = default(bool?), string type = default(string)) - { - this.Supported = supported; - this.Type = type; - } - - /// - /// Indicates if you support the card brand. - /// - /// Indicates if you support the card brand. - [DataMember(Name = "supported", EmitDefaultValue = false)] - public bool? Supported { get; set; } - - /// - /// The name of the card brand. - /// - /// The name of the card brand. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardBrandDetails {\n"); - sb.Append(" Supported: ").Append(Supported).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardBrandDetails); - } - - /// - /// Returns true if CardBrandDetails instances are equal - /// - /// Instance of CardBrandDetails to be compared - /// Boolean - public bool Equals(CardBrandDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Supported == input.Supported || - this.Supported.Equals(input.Supported) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Supported.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CardDetails.cs b/Adyen/Model/Checkout/CardDetails.cs deleted file mode 100644 index 70db52490..000000000 --- a/Adyen/Model/Checkout/CardDetails.cs +++ /dev/null @@ -1,711 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CardDetails - /// - [DataContract(Name = "CardDetails")] - public partial class CardDetails : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. - /// - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Bcmc for value: bcmc - /// - [EnumMember(Value = "bcmc")] - Bcmc = 1, - - /// - /// Enum Scheme for value: scheme - /// - [EnumMember(Value = "scheme")] - Scheme = 2, - - /// - /// Enum NetworkToken for value: networkToken - /// - [EnumMember(Value = "networkToken")] - NetworkToken = 3, - - /// - /// Enum Giftcard for value: giftcard - /// - [EnumMember(Value = "giftcard")] - Giftcard = 4, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 5, - - /// - /// Enum Clicktopay for value: clicktopay - /// - [EnumMember(Value = "clicktopay")] - Clicktopay = 6 - - } - - - /// - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. - /// - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**.. - /// The checkout attempt identifier.. - /// cupsecureplusSmscode. - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// Only include this for JSON Web Encryption (JWE) implementations. The JWE-encrypted card details.. - /// The encrypted card number.. - /// The encrypted card expiry month.. - /// The encrypted card expiry year.. - /// This field contains an encrypted, one-time password or an authentication code provided by the cardholder.. - /// The encrypted card verification code.. - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// The encoded fastlane data blob. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// The name of the card holder.. - /// The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.. - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India.. - /// An identifier used for the Click to Pay transaction.. - /// The SRC reference for the Click to Pay token.. - /// The scheme that is being used for Click to Pay.. - /// The reference for the Click to Pay token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.. - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. (default to TypeEnum.Scheme). - public CardDetails(string brand = default(string), string checkoutAttemptId = default(string), string cupsecureplusSmscode = default(string), string cvc = default(string), string encryptedCard = default(string), string encryptedCardNumber = default(string), string encryptedExpiryMonth = default(string), string encryptedExpiryYear = default(string), string encryptedPassword = default(string), string encryptedSecurityCode = default(string), string expiryMonth = default(string), string expiryYear = default(string), string fastlaneData = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string holderName = default(string), string networkPaymentReference = default(string), string number = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string srcCorrelationId = default(string), string srcDigitalCardId = default(string), string srcScheme = default(string), string srcTokenReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Scheme) - { - this.Brand = brand; - this.CheckoutAttemptId = checkoutAttemptId; - this.CupsecureplusSmscode = cupsecureplusSmscode; - this.Cvc = cvc; - this.EncryptedCard = encryptedCard; - this.EncryptedCardNumber = encryptedCardNumber; - this.EncryptedExpiryMonth = encryptedExpiryMonth; - this.EncryptedExpiryYear = encryptedExpiryYear; - this.EncryptedPassword = encryptedPassword; - this.EncryptedSecurityCode = encryptedSecurityCode; - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.FastlaneData = fastlaneData; - this.FundingSource = fundingSource; - this.HolderName = holderName; - this.NetworkPaymentReference = networkPaymentReference; - this.Number = number; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperNotificationReference = shopperNotificationReference; - this.SrcCorrelationId = srcCorrelationId; - this.SrcDigitalCardId = srcDigitalCardId; - this.SrcScheme = srcScheme; - this.SrcTokenReference = srcTokenReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.ThreeDS2SdkVersion = threeDS2SdkVersion; - this.Type = type; - } - - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**. - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Gets or Sets CupsecureplusSmscode - /// - [DataMember(Name = "cupsecureplus.smscode", EmitDefaultValue = false)] - [Obsolete("")] - public string CupsecureplusSmscode { get; set; } - - /// - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "cvc", EmitDefaultValue = false)] - public string Cvc { get; set; } - - /// - /// Only include this for JSON Web Encryption (JWE) implementations. The JWE-encrypted card details. - /// - /// Only include this for JSON Web Encryption (JWE) implementations. The JWE-encrypted card details. - [DataMember(Name = "encryptedCard", EmitDefaultValue = false)] - public string EncryptedCard { get; set; } - - /// - /// The encrypted card number. - /// - /// The encrypted card number. - [DataMember(Name = "encryptedCardNumber", EmitDefaultValue = false)] - public string EncryptedCardNumber { get; set; } - - /// - /// The encrypted card expiry month. - /// - /// The encrypted card expiry month. - [DataMember(Name = "encryptedExpiryMonth", EmitDefaultValue = false)] - public string EncryptedExpiryMonth { get; set; } - - /// - /// The encrypted card expiry year. - /// - /// The encrypted card expiry year. - [DataMember(Name = "encryptedExpiryYear", EmitDefaultValue = false)] - public string EncryptedExpiryYear { get; set; } - - /// - /// This field contains an encrypted, one-time password or an authentication code provided by the cardholder. - /// - /// This field contains an encrypted, one-time password or an authentication code provided by the cardholder. - [DataMember(Name = "encryptedPassword", EmitDefaultValue = false)] - public string EncryptedPassword { get; set; } - - /// - /// The encrypted card verification code. - /// - /// The encrypted card verification code. - [DataMember(Name = "encryptedSecurityCode", EmitDefaultValue = false)] - public string EncryptedSecurityCode { get; set; } - - /// - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The encoded fastlane data blob - /// - /// The encoded fastlane data blob - [DataMember(Name = "fastlaneData", EmitDefaultValue = false)] - public string FastlaneData { get; set; } - - /// - /// The name of the card holder. - /// - /// The name of the card holder. - [DataMember(Name = "holderName", EmitDefaultValue = false)] - public string HolderName { get; set; } - - /// - /// The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. - /// - /// The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. - [DataMember(Name = "networkPaymentReference", EmitDefaultValue = false)] - public string NetworkPaymentReference { get; set; } - - /// - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. - [DataMember(Name = "shopperNotificationReference", EmitDefaultValue = false)] - public string ShopperNotificationReference { get; set; } - - /// - /// An identifier used for the Click to Pay transaction. - /// - /// An identifier used for the Click to Pay transaction. - [DataMember(Name = "srcCorrelationId", EmitDefaultValue = false)] - public string SrcCorrelationId { get; set; } - - /// - /// The SRC reference for the Click to Pay token. - /// - /// The SRC reference for the Click to Pay token. - [DataMember(Name = "srcDigitalCardId", EmitDefaultValue = false)] - public string SrcDigitalCardId { get; set; } - - /// - /// The scheme that is being used for Click to Pay. - /// - /// The scheme that is being used for Click to Pay. - [DataMember(Name = "srcScheme", EmitDefaultValue = false)] - public string SrcScheme { get; set; } - - /// - /// The reference for the Click to Pay token. - /// - /// The reference for the Click to Pay token. - [DataMember(Name = "srcTokenReference", EmitDefaultValue = false)] - public string SrcTokenReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - [DataMember(Name = "threeDS2SdkVersion", EmitDefaultValue = false)] - public string ThreeDS2SdkVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardDetails {\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" CupsecureplusSmscode: ").Append(CupsecureplusSmscode).Append("\n"); - sb.Append(" Cvc: ").Append(Cvc).Append("\n"); - sb.Append(" EncryptedCard: ").Append(EncryptedCard).Append("\n"); - sb.Append(" EncryptedCardNumber: ").Append(EncryptedCardNumber).Append("\n"); - sb.Append(" EncryptedExpiryMonth: ").Append(EncryptedExpiryMonth).Append("\n"); - sb.Append(" EncryptedExpiryYear: ").Append(EncryptedExpiryYear).Append("\n"); - sb.Append(" EncryptedPassword: ").Append(EncryptedPassword).Append("\n"); - sb.Append(" EncryptedSecurityCode: ").Append(EncryptedSecurityCode).Append("\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" FastlaneData: ").Append(FastlaneData).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" HolderName: ").Append(HolderName).Append("\n"); - sb.Append(" NetworkPaymentReference: ").Append(NetworkPaymentReference).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperNotificationReference: ").Append(ShopperNotificationReference).Append("\n"); - sb.Append(" SrcCorrelationId: ").Append(SrcCorrelationId).Append("\n"); - sb.Append(" SrcDigitalCardId: ").Append(SrcDigitalCardId).Append("\n"); - sb.Append(" SrcScheme: ").Append(SrcScheme).Append("\n"); - sb.Append(" SrcTokenReference: ").Append(SrcTokenReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" ThreeDS2SdkVersion: ").Append(ThreeDS2SdkVersion).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardDetails); - } - - /// - /// Returns true if CardDetails instances are equal - /// - /// Instance of CardDetails to be compared - /// Boolean - public bool Equals(CardDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.CupsecureplusSmscode == input.CupsecureplusSmscode || - (this.CupsecureplusSmscode != null && - this.CupsecureplusSmscode.Equals(input.CupsecureplusSmscode)) - ) && - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.EncryptedCard == input.EncryptedCard || - (this.EncryptedCard != null && - this.EncryptedCard.Equals(input.EncryptedCard)) - ) && - ( - this.EncryptedCardNumber == input.EncryptedCardNumber || - (this.EncryptedCardNumber != null && - this.EncryptedCardNumber.Equals(input.EncryptedCardNumber)) - ) && - ( - this.EncryptedExpiryMonth == input.EncryptedExpiryMonth || - (this.EncryptedExpiryMonth != null && - this.EncryptedExpiryMonth.Equals(input.EncryptedExpiryMonth)) - ) && - ( - this.EncryptedExpiryYear == input.EncryptedExpiryYear || - (this.EncryptedExpiryYear != null && - this.EncryptedExpiryYear.Equals(input.EncryptedExpiryYear)) - ) && - ( - this.EncryptedPassword == input.EncryptedPassword || - (this.EncryptedPassword != null && - this.EncryptedPassword.Equals(input.EncryptedPassword)) - ) && - ( - this.EncryptedSecurityCode == input.EncryptedSecurityCode || - (this.EncryptedSecurityCode != null && - this.EncryptedSecurityCode.Equals(input.EncryptedSecurityCode)) - ) && - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.FastlaneData == input.FastlaneData || - (this.FastlaneData != null && - this.FastlaneData.Equals(input.FastlaneData)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.HolderName == input.HolderName || - (this.HolderName != null && - this.HolderName.Equals(input.HolderName)) - ) && - ( - this.NetworkPaymentReference == input.NetworkPaymentReference || - (this.NetworkPaymentReference != null && - this.NetworkPaymentReference.Equals(input.NetworkPaymentReference)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperNotificationReference == input.ShopperNotificationReference || - (this.ShopperNotificationReference != null && - this.ShopperNotificationReference.Equals(input.ShopperNotificationReference)) - ) && - ( - this.SrcCorrelationId == input.SrcCorrelationId || - (this.SrcCorrelationId != null && - this.SrcCorrelationId.Equals(input.SrcCorrelationId)) - ) && - ( - this.SrcDigitalCardId == input.SrcDigitalCardId || - (this.SrcDigitalCardId != null && - this.SrcDigitalCardId.Equals(input.SrcDigitalCardId)) - ) && - ( - this.SrcScheme == input.SrcScheme || - (this.SrcScheme != null && - this.SrcScheme.Equals(input.SrcScheme)) - ) && - ( - this.SrcTokenReference == input.SrcTokenReference || - (this.SrcTokenReference != null && - this.SrcTokenReference.Equals(input.SrcTokenReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.ThreeDS2SdkVersion == input.ThreeDS2SdkVersion || - (this.ThreeDS2SdkVersion != null && - this.ThreeDS2SdkVersion.Equals(input.ThreeDS2SdkVersion)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.CupsecureplusSmscode != null) - { - hashCode = (hashCode * 59) + this.CupsecureplusSmscode.GetHashCode(); - } - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.EncryptedCard != null) - { - hashCode = (hashCode * 59) + this.EncryptedCard.GetHashCode(); - } - if (this.EncryptedCardNumber != null) - { - hashCode = (hashCode * 59) + this.EncryptedCardNumber.GetHashCode(); - } - if (this.EncryptedExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.EncryptedExpiryMonth.GetHashCode(); - } - if (this.EncryptedExpiryYear != null) - { - hashCode = (hashCode * 59) + this.EncryptedExpiryYear.GetHashCode(); - } - if (this.EncryptedPassword != null) - { - hashCode = (hashCode * 59) + this.EncryptedPassword.GetHashCode(); - } - if (this.EncryptedSecurityCode != null) - { - hashCode = (hashCode * 59) + this.EncryptedSecurityCode.GetHashCode(); - } - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.FastlaneData != null) - { - hashCode = (hashCode * 59) + this.FastlaneData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.HolderName != null) - { - hashCode = (hashCode * 59) + this.HolderName.GetHashCode(); - } - if (this.NetworkPaymentReference != null) - { - hashCode = (hashCode * 59) + this.NetworkPaymentReference.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperNotificationReference != null) - { - hashCode = (hashCode * 59) + this.ShopperNotificationReference.GetHashCode(); - } - if (this.SrcCorrelationId != null) - { - hashCode = (hashCode * 59) + this.SrcCorrelationId.GetHashCode(); - } - if (this.SrcDigitalCardId != null) - { - hashCode = (hashCode * 59) + this.SrcDigitalCardId.GetHashCode(); - } - if (this.SrcScheme != null) - { - hashCode = (hashCode * 59) + this.SrcScheme.GetHashCode(); - } - if (this.SrcTokenReference != null) - { - hashCode = (hashCode * 59) + this.SrcTokenReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.ThreeDS2SdkVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2SdkVersion.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // EncryptedCard (string) maxLength - if (this.EncryptedCard != null && this.EncryptedCard.Length > 40000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedCard, length must be less than 40000.", new [] { "EncryptedCard" }); - } - - // EncryptedCardNumber (string) maxLength - if (this.EncryptedCardNumber != null && this.EncryptedCardNumber.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedCardNumber, length must be less than 15000.", new [] { "EncryptedCardNumber" }); - } - - // EncryptedExpiryMonth (string) maxLength - if (this.EncryptedExpiryMonth != null && this.EncryptedExpiryMonth.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedExpiryMonth, length must be less than 15000.", new [] { "EncryptedExpiryMonth" }); - } - - // EncryptedExpiryYear (string) maxLength - if (this.EncryptedExpiryYear != null && this.EncryptedExpiryYear.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedExpiryYear, length must be less than 15000.", new [] { "EncryptedExpiryYear" }); - } - - // EncryptedSecurityCode (string) maxLength - if (this.EncryptedSecurityCode != null && this.EncryptedSecurityCode.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedSecurityCode, length must be less than 15000.", new [] { "EncryptedSecurityCode" }); - } - - // HolderName (string) maxLength - if (this.HolderName != null && this.HolderName.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HolderName, length must be less than 15000.", new [] { "HolderName" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - // ThreeDS2SdkVersion (string) maxLength - if (this.ThreeDS2SdkVersion != null && this.ThreeDS2SdkVersion.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDS2SdkVersion, length must be less than 12.", new [] { "ThreeDS2SdkVersion" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CardDetailsRequest.cs b/Adyen/Model/Checkout/CardDetailsRequest.cs deleted file mode 100644 index f1a6b32f2..000000000 --- a/Adyen/Model/Checkout/CardDetailsRequest.cs +++ /dev/null @@ -1,217 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CardDetailsRequest - /// - [DataContract(Name = "CardDetailsRequest")] - public partial class CardDetailsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CardDetailsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// A minimum of the first eight digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. (required). - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE. - /// The encrypted card number.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The card brands you support. This is the [`brands`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods__resParam_paymentMethods-brands) array from your [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. If not included, our API uses the ones configured for your merchant account and, if provided, the country code.. - public CardDetailsRequest(string cardNumber = default(string), string countryCode = default(string), string encryptedCardNumber = default(string), string merchantAccount = default(string), List supportedBrands = default(List)) - { - this.CardNumber = cardNumber; - this.MerchantAccount = merchantAccount; - this.CountryCode = countryCode; - this.EncryptedCardNumber = encryptedCardNumber; - this.SupportedBrands = supportedBrands; - } - - /// - /// A minimum of the first eight digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. - /// - /// A minimum of the first eight digits of the card number. The full card number gives the best result. You must be [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide) to collect raw card data. Alternatively, you can use the `encryptedCardNumber` field. - [DataMember(Name = "cardNumber", IsRequired = false, EmitDefaultValue = false)] - public string CardNumber { get; set; } - - /// - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE - /// - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The encrypted card number. - /// - /// The encrypted card number. - [DataMember(Name = "encryptedCardNumber", EmitDefaultValue = false)] - public string EncryptedCardNumber { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The card brands you support. This is the [`brands`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods__resParam_paymentMethods-brands) array from your [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. If not included, our API uses the ones configured for your merchant account and, if provided, the country code. - /// - /// The card brands you support. This is the [`brands`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods__resParam_paymentMethods-brands) array from your [`/paymentMethods`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/paymentMethods) response. If not included, our API uses the ones configured for your merchant account and, if provided, the country code. - [DataMember(Name = "supportedBrands", EmitDefaultValue = false)] - public List SupportedBrands { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardDetailsRequest {\n"); - sb.Append(" CardNumber: ").Append(CardNumber).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" EncryptedCardNumber: ").Append(EncryptedCardNumber).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" SupportedBrands: ").Append(SupportedBrands).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardDetailsRequest); - } - - /// - /// Returns true if CardDetailsRequest instances are equal - /// - /// Instance of CardDetailsRequest to be compared - /// Boolean - public bool Equals(CardDetailsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CardNumber == input.CardNumber || - (this.CardNumber != null && - this.CardNumber.Equals(input.CardNumber)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.EncryptedCardNumber == input.EncryptedCardNumber || - (this.EncryptedCardNumber != null && - this.EncryptedCardNumber.Equals(input.EncryptedCardNumber)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.SupportedBrands == input.SupportedBrands || - this.SupportedBrands != null && - input.SupportedBrands != null && - this.SupportedBrands.SequenceEqual(input.SupportedBrands) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardNumber != null) - { - hashCode = (hashCode * 59) + this.CardNumber.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.EncryptedCardNumber != null) - { - hashCode = (hashCode * 59) + this.EncryptedCardNumber.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.SupportedBrands != null) - { - hashCode = (hashCode * 59) + this.SupportedBrands.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // EncryptedCardNumber (string) maxLength - if (this.EncryptedCardNumber != null && this.EncryptedCardNumber.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedCardNumber, length must be less than 15000.", new [] { "EncryptedCardNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CardDetailsResponse.cs b/Adyen/Model/Checkout/CardDetailsResponse.cs deleted file mode 100644 index 02ef1affc..000000000 --- a/Adyen/Model/Checkout/CardDetailsResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CardDetailsResponse - /// - [DataContract(Name = "CardDetailsResponse")] - public partial class CardDetailsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of brands identified for the card.. - /// The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**.. - /// Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card.. - /// The two-letter country code of the country where the card was issued.. - public CardDetailsResponse(List brands = default(List), string fundingSource = default(string), bool? isCardCommercial = default(bool?), string issuingCountryCode = default(string)) - { - this.Brands = brands; - this.FundingSource = fundingSource; - this.IsCardCommercial = isCardCommercial; - this.IssuingCountryCode = issuingCountryCode; - } - - /// - /// The list of brands identified for the card. - /// - /// The list of brands identified for the card. - [DataMember(Name = "brands", EmitDefaultValue = false)] - public List Brands { get; set; } - - /// - /// The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**. - /// - /// The funding source of the card, for example **DEBIT**, **CREDIT**, or **PREPAID**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public string FundingSource { get; set; } - - /// - /// Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card. - /// - /// Indicates if this is a commercial card or a consumer card. If **true**, it is a commercial card. If **false**, it is a consumer card. - [DataMember(Name = "isCardCommercial", EmitDefaultValue = false)] - public bool? IsCardCommercial { get; set; } - - /// - /// The two-letter country code of the country where the card was issued. - /// - /// The two-letter country code of the country where the card was issued. - [DataMember(Name = "issuingCountryCode", EmitDefaultValue = false)] - public string IssuingCountryCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardDetailsResponse {\n"); - sb.Append(" Brands: ").Append(Brands).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" IsCardCommercial: ").Append(IsCardCommercial).Append("\n"); - sb.Append(" IssuingCountryCode: ").Append(IssuingCountryCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardDetailsResponse); - } - - /// - /// Returns true if CardDetailsResponse instances are equal - /// - /// Instance of CardDetailsResponse to be compared - /// Boolean - public bool Equals(CardDetailsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Brands == input.Brands || - this.Brands != null && - input.Brands != null && - this.Brands.SequenceEqual(input.Brands) - ) && - ( - this.FundingSource == input.FundingSource || - (this.FundingSource != null && - this.FundingSource.Equals(input.FundingSource)) - ) && - ( - this.IsCardCommercial == input.IsCardCommercial || - this.IsCardCommercial.Equals(input.IsCardCommercial) - ) && - ( - this.IssuingCountryCode == input.IssuingCountryCode || - (this.IssuingCountryCode != null && - this.IssuingCountryCode.Equals(input.IssuingCountryCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brands != null) - { - hashCode = (hashCode * 59) + this.Brands.GetHashCode(); - } - if (this.FundingSource != null) - { - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsCardCommercial.GetHashCode(); - if (this.IssuingCountryCode != null) - { - hashCode = (hashCode * 59) + this.IssuingCountryCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CardDonations.cs b/Adyen/Model/Checkout/CardDonations.cs deleted file mode 100644 index 08cb712f9..000000000 --- a/Adyen/Model/Checkout/CardDonations.cs +++ /dev/null @@ -1,711 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CardDonations - /// - [DataContract(Name = "CardDonations")] - public partial class CardDonations : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. - /// - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Bcmc for value: bcmc - /// - [EnumMember(Value = "bcmc")] - Bcmc = 1, - - /// - /// Enum Scheme for value: scheme - /// - [EnumMember(Value = "scheme")] - Scheme = 2, - - /// - /// Enum NetworkToken for value: networkToken - /// - [EnumMember(Value = "networkToken")] - NetworkToken = 3, - - /// - /// Enum Giftcard for value: giftcard - /// - [EnumMember(Value = "giftcard")] - Giftcard = 4, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 5, - - /// - /// Enum Clicktopay for value: clicktopay - /// - [EnumMember(Value = "clicktopay")] - Clicktopay = 6 - - } - - - /// - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. - /// - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**.. - /// The checkout attempt identifier.. - /// cupsecureplusSmscode. - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// Only include this for JSON Web Encryption (JWE) implementations. The JWE-encrypted card details.. - /// The encrypted card number.. - /// The encrypted card expiry month.. - /// The encrypted card expiry year.. - /// This field contains an encrypted, one-time password or an authentication code provided by the cardholder.. - /// The encrypted card verification code.. - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// The encoded fastlane data blob. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// The name of the card holder.. - /// The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment.. - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India.. - /// An identifier used for the Click to Pay transaction.. - /// The SRC reference for the Click to Pay token.. - /// The scheme that is being used for Click to Pay.. - /// The reference for the Click to Pay token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.. - /// Default payment method details. Common for scheme payment methods, and for simple payment method details. (default to TypeEnum.Scheme). - public CardDonations(string brand = default(string), string checkoutAttemptId = default(string), string cupsecureplusSmscode = default(string), string cvc = default(string), string encryptedCard = default(string), string encryptedCardNumber = default(string), string encryptedExpiryMonth = default(string), string encryptedExpiryYear = default(string), string encryptedPassword = default(string), string encryptedSecurityCode = default(string), string expiryMonth = default(string), string expiryYear = default(string), string fastlaneData = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string holderName = default(string), string networkPaymentReference = default(string), string number = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string srcCorrelationId = default(string), string srcDigitalCardId = default(string), string srcScheme = default(string), string srcTokenReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Scheme) - { - this.Brand = brand; - this.CheckoutAttemptId = checkoutAttemptId; - this.CupsecureplusSmscode = cupsecureplusSmscode; - this.Cvc = cvc; - this.EncryptedCard = encryptedCard; - this.EncryptedCardNumber = encryptedCardNumber; - this.EncryptedExpiryMonth = encryptedExpiryMonth; - this.EncryptedExpiryYear = encryptedExpiryYear; - this.EncryptedPassword = encryptedPassword; - this.EncryptedSecurityCode = encryptedSecurityCode; - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.FastlaneData = fastlaneData; - this.FundingSource = fundingSource; - this.HolderName = holderName; - this.NetworkPaymentReference = networkPaymentReference; - this.Number = number; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperNotificationReference = shopperNotificationReference; - this.SrcCorrelationId = srcCorrelationId; - this.SrcDigitalCardId = srcDigitalCardId; - this.SrcScheme = srcScheme; - this.SrcTokenReference = srcTokenReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.ThreeDS2SdkVersion = threeDS2SdkVersion; - this.Type = type; - } - - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**. - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Gets or Sets CupsecureplusSmscode - /// - [DataMember(Name = "cupsecureplus.smscode", EmitDefaultValue = false)] - [Obsolete("")] - public string CupsecureplusSmscode { get; set; } - - /// - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "cvc", EmitDefaultValue = false)] - public string Cvc { get; set; } - - /// - /// Only include this for JSON Web Encryption (JWE) implementations. The JWE-encrypted card details. - /// - /// Only include this for JSON Web Encryption (JWE) implementations. The JWE-encrypted card details. - [DataMember(Name = "encryptedCard", EmitDefaultValue = false)] - public string EncryptedCard { get; set; } - - /// - /// The encrypted card number. - /// - /// The encrypted card number. - [DataMember(Name = "encryptedCardNumber", EmitDefaultValue = false)] - public string EncryptedCardNumber { get; set; } - - /// - /// The encrypted card expiry month. - /// - /// The encrypted card expiry month. - [DataMember(Name = "encryptedExpiryMonth", EmitDefaultValue = false)] - public string EncryptedExpiryMonth { get; set; } - - /// - /// The encrypted card expiry year. - /// - /// The encrypted card expiry year. - [DataMember(Name = "encryptedExpiryYear", EmitDefaultValue = false)] - public string EncryptedExpiryYear { get; set; } - - /// - /// This field contains an encrypted, one-time password or an authentication code provided by the cardholder. - /// - /// This field contains an encrypted, one-time password or an authentication code provided by the cardholder. - [DataMember(Name = "encryptedPassword", EmitDefaultValue = false)] - public string EncryptedPassword { get; set; } - - /// - /// The encrypted card verification code. - /// - /// The encrypted card verification code. - [DataMember(Name = "encryptedSecurityCode", EmitDefaultValue = false)] - public string EncryptedSecurityCode { get; set; } - - /// - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The encoded fastlane data blob - /// - /// The encoded fastlane data blob - [DataMember(Name = "fastlaneData", EmitDefaultValue = false)] - public string FastlaneData { get; set; } - - /// - /// The name of the card holder. - /// - /// The name of the card holder. - [DataMember(Name = "holderName", EmitDefaultValue = false)] - public string HolderName { get; set; } - - /// - /// The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. - /// - /// The transaction identifier from card schemes. This is the [`networkTxReference`](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-additionalData-ResponseAdditionalDataCommon-networkTxReference) from the response to the first payment. - [DataMember(Name = "networkPaymentReference", EmitDefaultValue = false)] - public string NetworkPaymentReference { get; set; } - - /// - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used only for recurring payments in India. - [DataMember(Name = "shopperNotificationReference", EmitDefaultValue = false)] - public string ShopperNotificationReference { get; set; } - - /// - /// An identifier used for the Click to Pay transaction. - /// - /// An identifier used for the Click to Pay transaction. - [DataMember(Name = "srcCorrelationId", EmitDefaultValue = false)] - public string SrcCorrelationId { get; set; } - - /// - /// The SRC reference for the Click to Pay token. - /// - /// The SRC reference for the Click to Pay token. - [DataMember(Name = "srcDigitalCardId", EmitDefaultValue = false)] - public string SrcDigitalCardId { get; set; } - - /// - /// The scheme that is being used for Click to Pay. - /// - /// The scheme that is being used for Click to Pay. - [DataMember(Name = "srcScheme", EmitDefaultValue = false)] - public string SrcScheme { get; set; } - - /// - /// The reference for the Click to Pay token. - /// - /// The reference for the Click to Pay token. - [DataMember(Name = "srcTokenReference", EmitDefaultValue = false)] - public string SrcTokenReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - [DataMember(Name = "threeDS2SdkVersion", EmitDefaultValue = false)] - public string ThreeDS2SdkVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardDonations {\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" CupsecureplusSmscode: ").Append(CupsecureplusSmscode).Append("\n"); - sb.Append(" Cvc: ").Append(Cvc).Append("\n"); - sb.Append(" EncryptedCard: ").Append(EncryptedCard).Append("\n"); - sb.Append(" EncryptedCardNumber: ").Append(EncryptedCardNumber).Append("\n"); - sb.Append(" EncryptedExpiryMonth: ").Append(EncryptedExpiryMonth).Append("\n"); - sb.Append(" EncryptedExpiryYear: ").Append(EncryptedExpiryYear).Append("\n"); - sb.Append(" EncryptedPassword: ").Append(EncryptedPassword).Append("\n"); - sb.Append(" EncryptedSecurityCode: ").Append(EncryptedSecurityCode).Append("\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" FastlaneData: ").Append(FastlaneData).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" HolderName: ").Append(HolderName).Append("\n"); - sb.Append(" NetworkPaymentReference: ").Append(NetworkPaymentReference).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperNotificationReference: ").Append(ShopperNotificationReference).Append("\n"); - sb.Append(" SrcCorrelationId: ").Append(SrcCorrelationId).Append("\n"); - sb.Append(" SrcDigitalCardId: ").Append(SrcDigitalCardId).Append("\n"); - sb.Append(" SrcScheme: ").Append(SrcScheme).Append("\n"); - sb.Append(" SrcTokenReference: ").Append(SrcTokenReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" ThreeDS2SdkVersion: ").Append(ThreeDS2SdkVersion).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardDonations); - } - - /// - /// Returns true if CardDonations instances are equal - /// - /// Instance of CardDonations to be compared - /// Boolean - public bool Equals(CardDonations input) - { - if (input == null) - { - return false; - } - return - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.CupsecureplusSmscode == input.CupsecureplusSmscode || - (this.CupsecureplusSmscode != null && - this.CupsecureplusSmscode.Equals(input.CupsecureplusSmscode)) - ) && - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.EncryptedCard == input.EncryptedCard || - (this.EncryptedCard != null && - this.EncryptedCard.Equals(input.EncryptedCard)) - ) && - ( - this.EncryptedCardNumber == input.EncryptedCardNumber || - (this.EncryptedCardNumber != null && - this.EncryptedCardNumber.Equals(input.EncryptedCardNumber)) - ) && - ( - this.EncryptedExpiryMonth == input.EncryptedExpiryMonth || - (this.EncryptedExpiryMonth != null && - this.EncryptedExpiryMonth.Equals(input.EncryptedExpiryMonth)) - ) && - ( - this.EncryptedExpiryYear == input.EncryptedExpiryYear || - (this.EncryptedExpiryYear != null && - this.EncryptedExpiryYear.Equals(input.EncryptedExpiryYear)) - ) && - ( - this.EncryptedPassword == input.EncryptedPassword || - (this.EncryptedPassword != null && - this.EncryptedPassword.Equals(input.EncryptedPassword)) - ) && - ( - this.EncryptedSecurityCode == input.EncryptedSecurityCode || - (this.EncryptedSecurityCode != null && - this.EncryptedSecurityCode.Equals(input.EncryptedSecurityCode)) - ) && - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.FastlaneData == input.FastlaneData || - (this.FastlaneData != null && - this.FastlaneData.Equals(input.FastlaneData)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.HolderName == input.HolderName || - (this.HolderName != null && - this.HolderName.Equals(input.HolderName)) - ) && - ( - this.NetworkPaymentReference == input.NetworkPaymentReference || - (this.NetworkPaymentReference != null && - this.NetworkPaymentReference.Equals(input.NetworkPaymentReference)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperNotificationReference == input.ShopperNotificationReference || - (this.ShopperNotificationReference != null && - this.ShopperNotificationReference.Equals(input.ShopperNotificationReference)) - ) && - ( - this.SrcCorrelationId == input.SrcCorrelationId || - (this.SrcCorrelationId != null && - this.SrcCorrelationId.Equals(input.SrcCorrelationId)) - ) && - ( - this.SrcDigitalCardId == input.SrcDigitalCardId || - (this.SrcDigitalCardId != null && - this.SrcDigitalCardId.Equals(input.SrcDigitalCardId)) - ) && - ( - this.SrcScheme == input.SrcScheme || - (this.SrcScheme != null && - this.SrcScheme.Equals(input.SrcScheme)) - ) && - ( - this.SrcTokenReference == input.SrcTokenReference || - (this.SrcTokenReference != null && - this.SrcTokenReference.Equals(input.SrcTokenReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.ThreeDS2SdkVersion == input.ThreeDS2SdkVersion || - (this.ThreeDS2SdkVersion != null && - this.ThreeDS2SdkVersion.Equals(input.ThreeDS2SdkVersion)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.CupsecureplusSmscode != null) - { - hashCode = (hashCode * 59) + this.CupsecureplusSmscode.GetHashCode(); - } - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.EncryptedCard != null) - { - hashCode = (hashCode * 59) + this.EncryptedCard.GetHashCode(); - } - if (this.EncryptedCardNumber != null) - { - hashCode = (hashCode * 59) + this.EncryptedCardNumber.GetHashCode(); - } - if (this.EncryptedExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.EncryptedExpiryMonth.GetHashCode(); - } - if (this.EncryptedExpiryYear != null) - { - hashCode = (hashCode * 59) + this.EncryptedExpiryYear.GetHashCode(); - } - if (this.EncryptedPassword != null) - { - hashCode = (hashCode * 59) + this.EncryptedPassword.GetHashCode(); - } - if (this.EncryptedSecurityCode != null) - { - hashCode = (hashCode * 59) + this.EncryptedSecurityCode.GetHashCode(); - } - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.FastlaneData != null) - { - hashCode = (hashCode * 59) + this.FastlaneData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.HolderName != null) - { - hashCode = (hashCode * 59) + this.HolderName.GetHashCode(); - } - if (this.NetworkPaymentReference != null) - { - hashCode = (hashCode * 59) + this.NetworkPaymentReference.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperNotificationReference != null) - { - hashCode = (hashCode * 59) + this.ShopperNotificationReference.GetHashCode(); - } - if (this.SrcCorrelationId != null) - { - hashCode = (hashCode * 59) + this.SrcCorrelationId.GetHashCode(); - } - if (this.SrcDigitalCardId != null) - { - hashCode = (hashCode * 59) + this.SrcDigitalCardId.GetHashCode(); - } - if (this.SrcScheme != null) - { - hashCode = (hashCode * 59) + this.SrcScheme.GetHashCode(); - } - if (this.SrcTokenReference != null) - { - hashCode = (hashCode * 59) + this.SrcTokenReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.ThreeDS2SdkVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2SdkVersion.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // EncryptedCard (string) maxLength - if (this.EncryptedCard != null && this.EncryptedCard.Length > 40000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedCard, length must be less than 40000.", new [] { "EncryptedCard" }); - } - - // EncryptedCardNumber (string) maxLength - if (this.EncryptedCardNumber != null && this.EncryptedCardNumber.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedCardNumber, length must be less than 15000.", new [] { "EncryptedCardNumber" }); - } - - // EncryptedExpiryMonth (string) maxLength - if (this.EncryptedExpiryMonth != null && this.EncryptedExpiryMonth.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedExpiryMonth, length must be less than 15000.", new [] { "EncryptedExpiryMonth" }); - } - - // EncryptedExpiryYear (string) maxLength - if (this.EncryptedExpiryYear != null && this.EncryptedExpiryYear.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedExpiryYear, length must be less than 15000.", new [] { "EncryptedExpiryYear" }); - } - - // EncryptedSecurityCode (string) maxLength - if (this.EncryptedSecurityCode != null && this.EncryptedSecurityCode.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedSecurityCode, length must be less than 15000.", new [] { "EncryptedSecurityCode" }); - } - - // HolderName (string) maxLength - if (this.HolderName != null && this.HolderName.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HolderName, length must be less than 15000.", new [] { "HolderName" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - // ThreeDS2SdkVersion (string) maxLength - if (this.ThreeDS2SdkVersion != null && this.ThreeDS2SdkVersion.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDS2SdkVersion, length must be less than 12.", new [] { "ThreeDS2SdkVersion" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CashAppDetails.cs b/Adyen/Model/Checkout/CashAppDetails.cs deleted file mode 100644 index b001e3386..000000000 --- a/Adyen/Model/Checkout/CashAppDetails.cs +++ /dev/null @@ -1,318 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CashAppDetails - /// - [DataContract(Name = "CashAppDetails")] - public partial class CashAppDetails : IEquatable, IValidatableObject - { - /// - /// cashapp - /// - /// cashapp - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Cashapp for value: cashapp - /// - [EnumMember(Value = "cashapp")] - Cashapp = 1 - - } - - - /// - /// cashapp - /// - /// cashapp - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Cash App issued cashtag for recurring payment. - /// The checkout attempt identifier.. - /// Cash App issued customerId for recurring payment. - /// Cash App issued grantId for one time payment. - /// Cash App issued onFileGrantId for recurring payment. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// Cash App request id. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The payment method subtype.. - /// cashapp (default to TypeEnum.Cashapp). - public CashAppDetails(string cashtag = default(string), string checkoutAttemptId = default(string), string customerId = default(string), string grantId = default(string), string onFileGrantId = default(string), string recurringDetailReference = default(string), string requestId = default(string), string storedPaymentMethodId = default(string), string subtype = default(string), TypeEnum? type = TypeEnum.Cashapp) - { - this.Cashtag = cashtag; - this.CheckoutAttemptId = checkoutAttemptId; - this.CustomerId = customerId; - this.GrantId = grantId; - this.OnFileGrantId = onFileGrantId; - this.RecurringDetailReference = recurringDetailReference; - this.RequestId = requestId; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Subtype = subtype; - this.Type = type; - } - - /// - /// Cash App issued cashtag for recurring payment - /// - /// Cash App issued cashtag for recurring payment - [DataMember(Name = "cashtag", EmitDefaultValue = false)] - public string Cashtag { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Cash App issued customerId for recurring payment - /// - /// Cash App issued customerId for recurring payment - [DataMember(Name = "customerId", EmitDefaultValue = false)] - public string CustomerId { get; set; } - - /// - /// Cash App issued grantId for one time payment - /// - /// Cash App issued grantId for one time payment - [DataMember(Name = "grantId", EmitDefaultValue = false)] - public string GrantId { get; set; } - - /// - /// Cash App issued onFileGrantId for recurring payment - /// - /// Cash App issued onFileGrantId for recurring payment - [DataMember(Name = "onFileGrantId", EmitDefaultValue = false)] - public string OnFileGrantId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// Cash App request id - /// - /// Cash App request id - [DataMember(Name = "requestId", EmitDefaultValue = false)] - public string RequestId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The payment method subtype. - /// - /// The payment method subtype. - [DataMember(Name = "subtype", EmitDefaultValue = false)] - public string Subtype { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CashAppDetails {\n"); - sb.Append(" Cashtag: ").Append(Cashtag).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" CustomerId: ").Append(CustomerId).Append("\n"); - sb.Append(" GrantId: ").Append(GrantId).Append("\n"); - sb.Append(" OnFileGrantId: ").Append(OnFileGrantId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" RequestId: ").Append(RequestId).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Subtype: ").Append(Subtype).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CashAppDetails); - } - - /// - /// Returns true if CashAppDetails instances are equal - /// - /// Instance of CashAppDetails to be compared - /// Boolean - public bool Equals(CashAppDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Cashtag == input.Cashtag || - (this.Cashtag != null && - this.Cashtag.Equals(input.Cashtag)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.CustomerId == input.CustomerId || - (this.CustomerId != null && - this.CustomerId.Equals(input.CustomerId)) - ) && - ( - this.GrantId == input.GrantId || - (this.GrantId != null && - this.GrantId.Equals(input.GrantId)) - ) && - ( - this.OnFileGrantId == input.OnFileGrantId || - (this.OnFileGrantId != null && - this.OnFileGrantId.Equals(input.OnFileGrantId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.RequestId == input.RequestId || - (this.RequestId != null && - this.RequestId.Equals(input.RequestId)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Subtype == input.Subtype || - (this.Subtype != null && - this.Subtype.Equals(input.Subtype)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cashtag != null) - { - hashCode = (hashCode * 59) + this.Cashtag.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.CustomerId != null) - { - hashCode = (hashCode * 59) + this.CustomerId.GetHashCode(); - } - if (this.GrantId != null) - { - hashCode = (hashCode * 59) + this.GrantId.GetHashCode(); - } - if (this.OnFileGrantId != null) - { - hashCode = (hashCode * 59) + this.OnFileGrantId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.RequestId != null) - { - hashCode = (hashCode * 59) + this.RequestId.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.Subtype != null) - { - hashCode = (hashCode * 59) + this.Subtype.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CellulantDetails.cs b/Adyen/Model/Checkout/CellulantDetails.cs deleted file mode 100644 index 44022dfc1..000000000 --- a/Adyen/Model/Checkout/CellulantDetails.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CellulantDetails - /// - [DataContract(Name = "CellulantDetails")] - public partial class CellulantDetails : IEquatable, IValidatableObject - { - /// - /// **Cellulant** - /// - /// **Cellulant** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Cellulant for value: cellulant - /// - [EnumMember(Value = "cellulant")] - Cellulant = 1 - - } - - - /// - /// **Cellulant** - /// - /// **Cellulant** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The Cellulant issuer.. - /// **Cellulant** (default to TypeEnum.Cellulant). - public CellulantDetails(string checkoutAttemptId = default(string), string issuer = default(string), TypeEnum? type = TypeEnum.Cellulant) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.Issuer = issuer; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The Cellulant issuer. - /// - /// The Cellulant issuer. - [DataMember(Name = "issuer", EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CellulantDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CellulantDetails); - } - - /// - /// Returns true if CellulantDetails instances are equal - /// - /// Instance of CellulantDetails to be compared - /// Boolean - public bool Equals(CellulantDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutAwaitAction.cs b/Adyen/Model/Checkout/CheckoutAwaitAction.cs deleted file mode 100644 index bee9cfb58..000000000 --- a/Adyen/Model/Checkout/CheckoutAwaitAction.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutAwaitAction - /// - [DataContract(Name = "CheckoutAwaitAction")] - public partial class CheckoutAwaitAction : IEquatable, IValidatableObject - { - /// - /// **await** - /// - /// **await** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Await for value: await - /// - [EnumMember(Value = "await")] - Await = 1 - - } - - - /// - /// **await** - /// - /// **await** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutAwaitAction() { } - /// - /// Initializes a new instance of the class. - /// - /// Encoded payment data.. - /// Specifies the payment method.. - /// **await** (required). - /// Specifies the URL to redirect to.. - public CheckoutAwaitAction(string paymentData = default(string), string paymentMethodType = default(string), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.PaymentData = paymentData; - this.PaymentMethodType = paymentMethodType; - this.Url = url; - } - - /// - /// Encoded payment data. - /// - /// Encoded payment data. - [DataMember(Name = "paymentData", EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutAwaitAction {\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutAwaitAction); - } - - /// - /// Returns true if CheckoutAwaitAction instances are equal - /// - /// Instance of CheckoutAwaitAction to be compared - /// Boolean - public bool Equals(CheckoutAwaitAction input) - { - if (input == null) - { - return false; - } - return - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutBankAccount.cs b/Adyen/Model/Checkout/CheckoutBankAccount.cs deleted file mode 100644 index fb4c247c8..000000000 --- a/Adyen/Model/Checkout/CheckoutBankAccount.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutBankAccount - /// - [DataContract(Name = "CheckoutBankAccount")] - public partial class CheckoutBankAccount : IEquatable, IValidatableObject - { - /// - /// The type of the bank account. - /// - /// The type of the bank account. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Balance for value: balance - /// - [EnumMember(Value = "balance")] - Balance = 1, - - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 2, - - /// - /// Enum Deposit for value: deposit - /// - [EnumMember(Value = "deposit")] - Deposit = 3, - - /// - /// Enum General for value: general - /// - [EnumMember(Value = "general")] - General = 4, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 5, - - /// - /// Enum Payment for value: payment - /// - [EnumMember(Value = "payment")] - Payment = 6, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 7 - - } - - - /// - /// The type of the bank account. - /// - /// The type of the bank account. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of the bank account.. - /// The bank account number (without separators).. - /// The bank city.. - /// The location id of the bank. The field value is `nil` in most cases.. - /// The name of the bank.. - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.. - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').. - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).. - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.. - /// The bank account holder's tax ID.. - public CheckoutBankAccount(AccountTypeEnum? accountType = default(AccountTypeEnum?), string bankAccountNumber = default(string), string bankCity = default(string), string bankLocationId = default(string), string bankName = default(string), string bic = default(string), string countryCode = default(string), string iban = default(string), string ownerName = default(string), string taxId = default(string)) - { - this.AccountType = accountType; - this.BankAccountNumber = bankAccountNumber; - this.BankCity = bankCity; - this.BankLocationId = bankLocationId; - this.BankName = bankName; - this.Bic = bic; - this.CountryCode = countryCode; - this.Iban = iban; - this.OwnerName = ownerName; - this.TaxId = taxId; - } - - /// - /// The bank account number (without separators). - /// - /// The bank account number (without separators). - [DataMember(Name = "bankAccountNumber", EmitDefaultValue = false)] - public string BankAccountNumber { get; set; } - - /// - /// The bank city. - /// - /// The bank city. - [DataMember(Name = "bankCity", EmitDefaultValue = false)] - public string BankCity { get; set; } - - /// - /// The location id of the bank. The field value is `nil` in most cases. - /// - /// The location id of the bank. The field value is `nil` in most cases. - [DataMember(Name = "bankLocationId", EmitDefaultValue = false)] - public string BankLocationId { get; set; } - - /// - /// The name of the bank. - /// - /// The name of the bank. - [DataMember(Name = "bankName", EmitDefaultValue = false)] - public string BankName { get; set; } - - /// - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - /// - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - [DataMember(Name = "bic", EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL'). - /// - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL'). - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - /// - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The bank account holder's tax ID. - /// - /// The bank account holder's tax ID. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutBankAccount {\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" BankAccountNumber: ").Append(BankAccountNumber).Append("\n"); - sb.Append(" BankCity: ").Append(BankCity).Append("\n"); - sb.Append(" BankLocationId: ").Append(BankLocationId).Append("\n"); - sb.Append(" BankName: ").Append(BankName).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutBankAccount); - } - - /// - /// Returns true if CheckoutBankAccount instances are equal - /// - /// Instance of CheckoutBankAccount to be compared - /// Boolean - public bool Equals(CheckoutBankAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.BankAccountNumber == input.BankAccountNumber || - (this.BankAccountNumber != null && - this.BankAccountNumber.Equals(input.BankAccountNumber)) - ) && - ( - this.BankCity == input.BankCity || - (this.BankCity != null && - this.BankCity.Equals(input.BankCity)) - ) && - ( - this.BankLocationId == input.BankLocationId || - (this.BankLocationId != null && - this.BankLocationId.Equals(input.BankLocationId)) - ) && - ( - this.BankName == input.BankName || - (this.BankName != null && - this.BankName.Equals(input.BankName)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.BankAccountNumber != null) - { - hashCode = (hashCode * 59) + this.BankAccountNumber.GetHashCode(); - } - if (this.BankCity != null) - { - hashCode = (hashCode * 59) + this.BankCity.GetHashCode(); - } - if (this.BankLocationId != null) - { - hashCode = (hashCode * 59) + this.BankLocationId.GetHashCode(); - } - if (this.BankName != null) - { - hashCode = (hashCode * 59) + this.BankName.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutBankTransferAction.cs b/Adyen/Model/Checkout/CheckoutBankTransferAction.cs deleted file mode 100644 index c0e83599b..000000000 --- a/Adyen/Model/Checkout/CheckoutBankTransferAction.cs +++ /dev/null @@ -1,372 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutBankTransferAction - /// - [DataContract(Name = "CheckoutBankTransferAction")] - public partial class CheckoutBankTransferAction : IEquatable, IValidatableObject - { - /// - /// The type of the action. - /// - /// The type of the action. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 1 - - } - - - /// - /// The type of the action. - /// - /// The type of the action. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutBankTransferAction() { } - /// - /// Initializes a new instance of the class. - /// - /// The account number of the bank transfer.. - /// The name of the account holder.. - /// The BIC of the IBAN.. - /// The url to download payment details with.. - /// The IBAN of the bank transfer.. - /// Specifies the payment method.. - /// The transfer reference.. - /// The routing number of the bank transfer.. - /// The e-mail of the shopper, included if an e-mail was sent to the shopper.. - /// The sort code of the bank transfer.. - /// totalAmount. - /// The type of the action. (required). - /// Specifies the URL to redirect to.. - public CheckoutBankTransferAction(string accountNumber = default(string), string beneficiary = default(string), string bic = default(string), string downloadUrl = default(string), string iban = default(string), string paymentMethodType = default(string), string reference = default(string), string routingNumber = default(string), string shopperEmail = default(string), string sortCode = default(string), Amount totalAmount = default(Amount), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.AccountNumber = accountNumber; - this.Beneficiary = beneficiary; - this.Bic = bic; - this.DownloadUrl = downloadUrl; - this.Iban = iban; - this.PaymentMethodType = paymentMethodType; - this.Reference = reference; - this.RoutingNumber = routingNumber; - this.ShopperEmail = shopperEmail; - this.SortCode = sortCode; - this.TotalAmount = totalAmount; - this.Url = url; - } - - /// - /// The account number of the bank transfer. - /// - /// The account number of the bank transfer. - [DataMember(Name = "accountNumber", EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The name of the account holder. - /// - /// The name of the account holder. - [DataMember(Name = "beneficiary", EmitDefaultValue = false)] - public string Beneficiary { get; set; } - - /// - /// The BIC of the IBAN. - /// - /// The BIC of the IBAN. - [DataMember(Name = "bic", EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// The url to download payment details with. - /// - /// The url to download payment details with. - [DataMember(Name = "downloadUrl", EmitDefaultValue = false)] - public string DownloadUrl { get; set; } - - /// - /// The IBAN of the bank transfer. - /// - /// The IBAN of the bank transfer. - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// The transfer reference. - /// - /// The transfer reference. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The routing number of the bank transfer. - /// - /// The routing number of the bank transfer. - [DataMember(Name = "routingNumber", EmitDefaultValue = false)] - public string RoutingNumber { get; set; } - - /// - /// The e-mail of the shopper, included if an e-mail was sent to the shopper. - /// - /// The e-mail of the shopper, included if an e-mail was sent to the shopper. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The sort code of the bank transfer. - /// - /// The sort code of the bank transfer. - [DataMember(Name = "sortCode", EmitDefaultValue = false)] - public string SortCode { get; set; } - - /// - /// Gets or Sets TotalAmount - /// - [DataMember(Name = "totalAmount", EmitDefaultValue = false)] - public Amount TotalAmount { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutBankTransferAction {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Beneficiary: ").Append(Beneficiary).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" DownloadUrl: ").Append(DownloadUrl).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" SortCode: ").Append(SortCode).Append("\n"); - sb.Append(" TotalAmount: ").Append(TotalAmount).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutBankTransferAction); - } - - /// - /// Returns true if CheckoutBankTransferAction instances are equal - /// - /// Instance of CheckoutBankTransferAction to be compared - /// Boolean - public bool Equals(CheckoutBankTransferAction input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Beneficiary == input.Beneficiary || - (this.Beneficiary != null && - this.Beneficiary.Equals(input.Beneficiary)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.DownloadUrl == input.DownloadUrl || - (this.DownloadUrl != null && - this.DownloadUrl.Equals(input.DownloadUrl)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.RoutingNumber == input.RoutingNumber || - (this.RoutingNumber != null && - this.RoutingNumber.Equals(input.RoutingNumber)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.SortCode == input.SortCode || - (this.SortCode != null && - this.SortCode.Equals(input.SortCode)) - ) && - ( - this.TotalAmount == input.TotalAmount || - (this.TotalAmount != null && - this.TotalAmount.Equals(input.TotalAmount)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.Beneficiary != null) - { - hashCode = (hashCode * 59) + this.Beneficiary.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - if (this.DownloadUrl != null) - { - hashCode = (hashCode * 59) + this.DownloadUrl.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.RoutingNumber != null) - { - hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.SortCode != null) - { - hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); - } - if (this.TotalAmount != null) - { - hashCode = (hashCode * 59) + this.TotalAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.cs b/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.cs deleted file mode 100644 index 87781b5f4..000000000 --- a/Adyen/Model/Checkout/CheckoutDelegatedAuthenticationAction.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutDelegatedAuthenticationAction - /// - [DataContract(Name = "CheckoutDelegatedAuthenticationAction")] - public partial class CheckoutDelegatedAuthenticationAction : IEquatable, IValidatableObject - { - /// - /// **delegatedAuthentication** - /// - /// **delegatedAuthentication** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DelegatedAuthentication for value: delegatedAuthentication - /// - [EnumMember(Value = "delegatedAuthentication")] - DelegatedAuthentication = 1 - - } - - - /// - /// **delegatedAuthentication** - /// - /// **delegatedAuthentication** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutDelegatedAuthenticationAction() { } - /// - /// Initializes a new instance of the class. - /// - /// A token needed to authorise a payment.. - /// Encoded payment data.. - /// Specifies the payment method.. - /// A token to pass to the delegatedAuthentication component.. - /// **delegatedAuthentication** (required). - /// Specifies the URL to redirect to.. - public CheckoutDelegatedAuthenticationAction(string authorisationToken = default(string), string paymentData = default(string), string paymentMethodType = default(string), string token = default(string), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.AuthorisationToken = authorisationToken; - this.PaymentData = paymentData; - this.PaymentMethodType = paymentMethodType; - this.Token = token; - this.Url = url; - } - - /// - /// A token needed to authorise a payment. - /// - /// A token needed to authorise a payment. - [DataMember(Name = "authorisationToken", EmitDefaultValue = false)] - public string AuthorisationToken { get; set; } - - /// - /// Encoded payment data. - /// - /// Encoded payment data. - [DataMember(Name = "paymentData", EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// A token to pass to the delegatedAuthentication component. - /// - /// A token to pass to the delegatedAuthentication component. - [DataMember(Name = "token", EmitDefaultValue = false)] - public string Token { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutDelegatedAuthenticationAction {\n"); - sb.Append(" AuthorisationToken: ").Append(AuthorisationToken).Append("\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutDelegatedAuthenticationAction); - } - - /// - /// Returns true if CheckoutDelegatedAuthenticationAction instances are equal - /// - /// Instance of CheckoutDelegatedAuthenticationAction to be compared - /// Boolean - public bool Equals(CheckoutDelegatedAuthenticationAction input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthorisationToken == input.AuthorisationToken || - (this.AuthorisationToken != null && - this.AuthorisationToken.Equals(input.AuthorisationToken)) - ) && - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthorisationToken != null) - { - hashCode = (hashCode * 59) + this.AuthorisationToken.GetHashCode(); - } - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutNativeRedirectAction.cs b/Adyen/Model/Checkout/CheckoutNativeRedirectAction.cs deleted file mode 100644 index c30bf7a47..000000000 --- a/Adyen/Model/Checkout/CheckoutNativeRedirectAction.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutNativeRedirectAction - /// - [DataContract(Name = "CheckoutNativeRedirectAction")] - public partial class CheckoutNativeRedirectAction : IEquatable, IValidatableObject - { - /// - /// **nativeRedirect** - /// - /// **nativeRedirect** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NativeRedirect for value: nativeRedirect - /// - [EnumMember(Value = "nativeRedirect")] - NativeRedirect = 1 - - } - - - /// - /// **nativeRedirect** - /// - /// **nativeRedirect** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutNativeRedirectAction() { } - /// - /// Initializes a new instance of the class. - /// - /// When the redirect URL must be accessed via POST, use this data to post to the redirect URL.. - /// Specifies the HTTP method, for example GET or POST.. - /// Native SDK's redirect data containing the direct issuer link and state data that must be submitted to the /v1/nativeRedirect/redirectResult.. - /// Specifies the payment method.. - /// **nativeRedirect** (required). - /// Specifies the URL to redirect to.. - public CheckoutNativeRedirectAction(Dictionary data = default(Dictionary), string method = default(string), string nativeRedirectData = default(string), string paymentMethodType = default(string), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.Data = data; - this.Method = method; - this.NativeRedirectData = nativeRedirectData; - this.PaymentMethodType = paymentMethodType; - this.Url = url; - } - - /// - /// When the redirect URL must be accessed via POST, use this data to post to the redirect URL. - /// - /// When the redirect URL must be accessed via POST, use this data to post to the redirect URL. - [DataMember(Name = "data", EmitDefaultValue = false)] - public Dictionary Data { get; set; } - - /// - /// Specifies the HTTP method, for example GET or POST. - /// - /// Specifies the HTTP method, for example GET or POST. - [DataMember(Name = "method", EmitDefaultValue = false)] - public string Method { get; set; } - - /// - /// Native SDK's redirect data containing the direct issuer link and state data that must be submitted to the /v1/nativeRedirect/redirectResult. - /// - /// Native SDK's redirect data containing the direct issuer link and state data that must be submitted to the /v1/nativeRedirect/redirectResult. - [DataMember(Name = "nativeRedirectData", EmitDefaultValue = false)] - public string NativeRedirectData { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutNativeRedirectAction {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" NativeRedirectData: ").Append(NativeRedirectData).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutNativeRedirectAction); - } - - /// - /// Returns true if CheckoutNativeRedirectAction instances are equal - /// - /// Instance of CheckoutNativeRedirectAction to be compared - /// Boolean - public bool Equals(CheckoutNativeRedirectAction input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.NativeRedirectData == input.NativeRedirectData || - (this.NativeRedirectData != null && - this.NativeRedirectData.Equals(input.NativeRedirectData)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.NativeRedirectData != null) - { - hashCode = (hashCode * 59) + this.NativeRedirectData.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutOrderResponse.cs b/Adyen/Model/Checkout/CheckoutOrderResponse.cs deleted file mode 100644 index c72484841..000000000 --- a/Adyen/Model/Checkout/CheckoutOrderResponse.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutOrderResponse - /// - [DataContract(Name = "CheckoutOrderResponse")] - public partial class CheckoutOrderResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutOrderResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The expiry date for the order.. - /// The encrypted order data.. - /// The `pspReference` that belongs to the order. (required). - /// The merchant reference for the order.. - /// remainingAmount. - public CheckoutOrderResponse(Amount amount = default(Amount), string expiresAt = default(string), string orderData = default(string), string pspReference = default(string), string reference = default(string), Amount remainingAmount = default(Amount)) - { - this.PspReference = pspReference; - this.Amount = amount; - this.ExpiresAt = expiresAt; - this.OrderData = orderData; - this.Reference = reference; - this.RemainingAmount = remainingAmount; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The expiry date for the order. - /// - /// The expiry date for the order. - [DataMember(Name = "expiresAt", EmitDefaultValue = false)] - public string ExpiresAt { get; set; } - - /// - /// The encrypted order data. - /// - /// The encrypted order data. - [DataMember(Name = "orderData", EmitDefaultValue = false)] - public string OrderData { get; set; } - - /// - /// The `pspReference` that belongs to the order. - /// - /// The `pspReference` that belongs to the order. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The merchant reference for the order. - /// - /// The merchant reference for the order. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets RemainingAmount - /// - [DataMember(Name = "remainingAmount", EmitDefaultValue = false)] - public Amount RemainingAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutOrderResponse {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" OrderData: ").Append(OrderData).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" RemainingAmount: ").Append(RemainingAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutOrderResponse); - } - - /// - /// Returns true if CheckoutOrderResponse instances are equal - /// - /// Instance of CheckoutOrderResponse to be compared - /// Boolean - public bool Equals(CheckoutOrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.OrderData == input.OrderData || - (this.OrderData != null && - this.OrderData.Equals(input.OrderData)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.RemainingAmount == input.RemainingAmount || - (this.RemainingAmount != null && - this.RemainingAmount.Equals(input.RemainingAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.OrderData != null) - { - hashCode = (hashCode * 59) + this.OrderData.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.RemainingAmount != null) - { - hashCode = (hashCode * 59) + this.RemainingAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutPaymentMethod.cs b/Adyen/Model/Checkout/CheckoutPaymentMethod.cs deleted file mode 100644 index 101b7109b..000000000 --- a/Adyen/Model/Checkout/CheckoutPaymentMethod.cs +++ /dev/null @@ -1,1964 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Checkout -{ - /// - /// The type and required details of a payment method to use. - /// - [JsonConverter(typeof(CheckoutPaymentMethodJsonConverter))] - [DataContract(Name = "CheckoutPaymentMethod")] - public partial class CheckoutPaymentMethod : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AchDetails. - public CheckoutPaymentMethod(AchDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AffirmDetails. - public CheckoutPaymentMethod(AffirmDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AfterpayDetails. - public CheckoutPaymentMethod(AfterpayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AmazonPayDetails. - public CheckoutPaymentMethod(AmazonPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AncvDetails. - public CheckoutPaymentMethod(AncvDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AndroidPayDetails. - public CheckoutPaymentMethod(AndroidPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ApplePayDetails. - public CheckoutPaymentMethod(ApplePayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BacsDirectDebitDetails. - public CheckoutPaymentMethod(BacsDirectDebitDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BillDeskDetails. - public CheckoutPaymentMethod(BillDeskDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BlikDetails. - public CheckoutPaymentMethod(BlikDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CardDetails. - public CheckoutPaymentMethod(CardDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CashAppDetails. - public CheckoutPaymentMethod(CashAppDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CellulantDetails. - public CheckoutPaymentMethod(CellulantDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DokuDetails. - public CheckoutPaymentMethod(DokuDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DragonpayDetails. - public CheckoutPaymentMethod(DragonpayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of EBankingFinlandDetails. - public CheckoutPaymentMethod(EBankingFinlandDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of EcontextVoucherDetails. - public CheckoutPaymentMethod(EcontextVoucherDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of EftDetails. - public CheckoutPaymentMethod(EftDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of FastlaneDetails. - public CheckoutPaymentMethod(FastlaneDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of GenericIssuerPaymentMethodDetails. - public CheckoutPaymentMethod(GenericIssuerPaymentMethodDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of GooglePayDetails. - public CheckoutPaymentMethod(GooglePayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IdealDetails. - public CheckoutPaymentMethod(IdealDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of KlarnaDetails. - public CheckoutPaymentMethod(KlarnaDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MasterpassDetails. - public CheckoutPaymentMethod(MasterpassDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MbwayDetails. - public CheckoutPaymentMethod(MbwayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MobilePayDetails. - public CheckoutPaymentMethod(MobilePayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MolPayDetails. - public CheckoutPaymentMethod(MolPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of OpenInvoiceDetails. - public CheckoutPaymentMethod(OpenInvoiceDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayByBankAISDirectDebitDetails. - public CheckoutPaymentMethod(PayByBankAISDirectDebitDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayByBankDetails. - public CheckoutPaymentMethod(PayByBankDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayPalDetails. - public CheckoutPaymentMethod(PayPalDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayPayDetails. - public CheckoutPaymentMethod(PayPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayToDetails. - public CheckoutPaymentMethod(PayToDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayUUpiDetails. - public CheckoutPaymentMethod(PayUUpiDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayWithGoogleDetails. - public CheckoutPaymentMethod(PayWithGoogleDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PaymentDetails. - public CheckoutPaymentMethod(PaymentDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PixDetails. - public CheckoutPaymentMethod(PixDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PseDetails. - public CheckoutPaymentMethod(PseDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of RakutenPayDetails. - public CheckoutPaymentMethod(RakutenPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of RatepayDetails. - public CheckoutPaymentMethod(RatepayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of RivertyDetails. - public CheckoutPaymentMethod(RivertyDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SamsungPayDetails. - public CheckoutPaymentMethod(SamsungPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SepaDirectDebitDetails. - public CheckoutPaymentMethod(SepaDirectDebitDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of StoredPaymentMethodDetails. - public CheckoutPaymentMethod(StoredPaymentMethodDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of TwintDetails. - public CheckoutPaymentMethod(TwintDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UpiCollectDetails. - public CheckoutPaymentMethod(UpiCollectDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UpiIntentDetails. - public CheckoutPaymentMethod(UpiIntentDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UpiQrDetails. - public CheckoutPaymentMethod(UpiQrDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of VippsDetails. - public CheckoutPaymentMethod(VippsDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of VisaCheckoutDetails. - public CheckoutPaymentMethod(VisaCheckoutDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of WeChatPayDetails. - public CheckoutPaymentMethod(WeChatPayDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of WeChatPayMiniProgramDetails. - public CheckoutPaymentMethod(WeChatPayMiniProgramDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ZipDetails. - public CheckoutPaymentMethod(ZipDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AchDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AffirmDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AfterpayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AmazonPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AncvDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(AndroidPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(ApplePayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BacsDirectDebitDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BillDeskDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BlikDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CardDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CashAppDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CellulantDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DokuDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DragonpayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(EBankingFinlandDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(EcontextVoucherDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(EftDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(FastlaneDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(GenericIssuerPaymentMethodDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(GooglePayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IdealDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(KlarnaDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MasterpassDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MbwayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MobilePayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MolPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(OpenInvoiceDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayByBankAISDirectDebitDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayByBankDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayPalDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayToDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayUUpiDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayWithGoogleDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PaymentDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PixDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PseDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(RakutenPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(RatepayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(RivertyDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SamsungPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SepaDirectDebitDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(StoredPaymentMethodDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(TwintDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UpiCollectDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UpiIntentDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UpiQrDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(VippsDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(VisaCheckoutDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(WeChatPayDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(WeChatPayMiniProgramDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(ZipDetails)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AchDetails, AffirmDetails, AfterpayDetails, AmazonPayDetails, AncvDetails, AndroidPayDetails, ApplePayDetails, BacsDirectDebitDetails, BillDeskDetails, BlikDetails, CardDetails, CashAppDetails, CellulantDetails, DokuDetails, DragonpayDetails, EBankingFinlandDetails, EcontextVoucherDetails, EftDetails, FastlaneDetails, GenericIssuerPaymentMethodDetails, GooglePayDetails, IdealDetails, KlarnaDetails, MasterpassDetails, MbwayDetails, MobilePayDetails, MolPayDetails, OpenInvoiceDetails, PayByBankAISDirectDebitDetails, PayByBankDetails, PayPalDetails, PayPayDetails, PayToDetails, PayUUpiDetails, PayWithGoogleDetails, PaymentDetails, PixDetails, PseDetails, RakutenPayDetails, RatepayDetails, RivertyDetails, SamsungPayDetails, SepaDirectDebitDetails, StoredPaymentMethodDetails, TwintDetails, UpiCollectDetails, UpiIntentDetails, UpiQrDetails, VippsDetails, VisaCheckoutDetails, WeChatPayDetails, WeChatPayMiniProgramDetails, ZipDetails"); - } - } - } - - /// - /// Get the actual instance of `AchDetails`. If the actual instance is not `AchDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AchDetails - public AchDetails GetAchDetails() - { - return (AchDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `AffirmDetails`. If the actual instance is not `AffirmDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AffirmDetails - public AffirmDetails GetAffirmDetails() - { - return (AffirmDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `AfterpayDetails`. If the actual instance is not `AfterpayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AfterpayDetails - public AfterpayDetails GetAfterpayDetails() - { - return (AfterpayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `AmazonPayDetails`. If the actual instance is not `AmazonPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AmazonPayDetails - public AmazonPayDetails GetAmazonPayDetails() - { - return (AmazonPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `AncvDetails`. If the actual instance is not `AncvDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AncvDetails - public AncvDetails GetAncvDetails() - { - return (AncvDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `AndroidPayDetails`. If the actual instance is not `AndroidPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of AndroidPayDetails - public AndroidPayDetails GetAndroidPayDetails() - { - return (AndroidPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `ApplePayDetails`. If the actual instance is not `ApplePayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of ApplePayDetails - public ApplePayDetails GetApplePayDetails() - { - return (ApplePayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `BacsDirectDebitDetails`. If the actual instance is not `BacsDirectDebitDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of BacsDirectDebitDetails - public BacsDirectDebitDetails GetBacsDirectDebitDetails() - { - return (BacsDirectDebitDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `BillDeskDetails`. If the actual instance is not `BillDeskDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of BillDeskDetails - public BillDeskDetails GetBillDeskDetails() - { - return (BillDeskDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `BlikDetails`. If the actual instance is not `BlikDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of BlikDetails - public BlikDetails GetBlikDetails() - { - return (BlikDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `CardDetails`. If the actual instance is not `CardDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of CardDetails - public CardDetails GetCardDetails() - { - return (CardDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `CashAppDetails`. If the actual instance is not `CashAppDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of CashAppDetails - public CashAppDetails GetCashAppDetails() - { - return (CashAppDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `CellulantDetails`. If the actual instance is not `CellulantDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of CellulantDetails - public CellulantDetails GetCellulantDetails() - { - return (CellulantDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `DokuDetails`. If the actual instance is not `DokuDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of DokuDetails - public DokuDetails GetDokuDetails() - { - return (DokuDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `DragonpayDetails`. If the actual instance is not `DragonpayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of DragonpayDetails - public DragonpayDetails GetDragonpayDetails() - { - return (DragonpayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `EBankingFinlandDetails`. If the actual instance is not `EBankingFinlandDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of EBankingFinlandDetails - public EBankingFinlandDetails GetEBankingFinlandDetails() - { - return (EBankingFinlandDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `EcontextVoucherDetails`. If the actual instance is not `EcontextVoucherDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of EcontextVoucherDetails - public EcontextVoucherDetails GetEcontextVoucherDetails() - { - return (EcontextVoucherDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `EftDetails`. If the actual instance is not `EftDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of EftDetails - public EftDetails GetEftDetails() - { - return (EftDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `FastlaneDetails`. If the actual instance is not `FastlaneDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of FastlaneDetails - public FastlaneDetails GetFastlaneDetails() - { - return (FastlaneDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `GenericIssuerPaymentMethodDetails`. If the actual instance is not `GenericIssuerPaymentMethodDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of GenericIssuerPaymentMethodDetails - public GenericIssuerPaymentMethodDetails GetGenericIssuerPaymentMethodDetails() - { - return (GenericIssuerPaymentMethodDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `GooglePayDetails`. If the actual instance is not `GooglePayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of GooglePayDetails - public GooglePayDetails GetGooglePayDetails() - { - return (GooglePayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `IdealDetails`. If the actual instance is not `IdealDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of IdealDetails - public IdealDetails GetIdealDetails() - { - return (IdealDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `KlarnaDetails`. If the actual instance is not `KlarnaDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of KlarnaDetails - public KlarnaDetails GetKlarnaDetails() - { - return (KlarnaDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `MasterpassDetails`. If the actual instance is not `MasterpassDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of MasterpassDetails - public MasterpassDetails GetMasterpassDetails() - { - return (MasterpassDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `MbwayDetails`. If the actual instance is not `MbwayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of MbwayDetails - public MbwayDetails GetMbwayDetails() - { - return (MbwayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `MobilePayDetails`. If the actual instance is not `MobilePayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of MobilePayDetails - public MobilePayDetails GetMobilePayDetails() - { - return (MobilePayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `MolPayDetails`. If the actual instance is not `MolPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of MolPayDetails - public MolPayDetails GetMolPayDetails() - { - return (MolPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `OpenInvoiceDetails`. If the actual instance is not `OpenInvoiceDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of OpenInvoiceDetails - public OpenInvoiceDetails GetOpenInvoiceDetails() - { - return (OpenInvoiceDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayByBankAISDirectDebitDetails`. If the actual instance is not `PayByBankAISDirectDebitDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayByBankAISDirectDebitDetails - public PayByBankAISDirectDebitDetails GetPayByBankAISDirectDebitDetails() - { - return (PayByBankAISDirectDebitDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayByBankDetails`. If the actual instance is not `PayByBankDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayByBankDetails - public PayByBankDetails GetPayByBankDetails() - { - return (PayByBankDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayPalDetails`. If the actual instance is not `PayPalDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayPalDetails - public PayPalDetails GetPayPalDetails() - { - return (PayPalDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayPayDetails`. If the actual instance is not `PayPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayPayDetails - public PayPayDetails GetPayPayDetails() - { - return (PayPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayToDetails`. If the actual instance is not `PayToDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayToDetails - public PayToDetails GetPayToDetails() - { - return (PayToDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayUUpiDetails`. If the actual instance is not `PayUUpiDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayUUpiDetails - public PayUUpiDetails GetPayUUpiDetails() - { - return (PayUUpiDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayWithGoogleDetails`. If the actual instance is not `PayWithGoogleDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayWithGoogleDetails - public PayWithGoogleDetails GetPayWithGoogleDetails() - { - return (PayWithGoogleDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PaymentDetails`. If the actual instance is not `PaymentDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PaymentDetails - public PaymentDetails GetPaymentDetails() - { - return (PaymentDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PixDetails`. If the actual instance is not `PixDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PixDetails - public PixDetails GetPixDetails() - { - return (PixDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `PseDetails`. If the actual instance is not `PseDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of PseDetails - public PseDetails GetPseDetails() - { - return (PseDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `RakutenPayDetails`. If the actual instance is not `RakutenPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of RakutenPayDetails - public RakutenPayDetails GetRakutenPayDetails() - { - return (RakutenPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `RatepayDetails`. If the actual instance is not `RatepayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of RatepayDetails - public RatepayDetails GetRatepayDetails() - { - return (RatepayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `RivertyDetails`. If the actual instance is not `RivertyDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of RivertyDetails - public RivertyDetails GetRivertyDetails() - { - return (RivertyDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `SamsungPayDetails`. If the actual instance is not `SamsungPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of SamsungPayDetails - public SamsungPayDetails GetSamsungPayDetails() - { - return (SamsungPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `SepaDirectDebitDetails`. If the actual instance is not `SepaDirectDebitDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of SepaDirectDebitDetails - public SepaDirectDebitDetails GetSepaDirectDebitDetails() - { - return (SepaDirectDebitDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `StoredPaymentMethodDetails`. If the actual instance is not `StoredPaymentMethodDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of StoredPaymentMethodDetails - public StoredPaymentMethodDetails GetStoredPaymentMethodDetails() - { - return (StoredPaymentMethodDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `TwintDetails`. If the actual instance is not `TwintDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of TwintDetails - public TwintDetails GetTwintDetails() - { - return (TwintDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `UpiCollectDetails`. If the actual instance is not `UpiCollectDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of UpiCollectDetails - public UpiCollectDetails GetUpiCollectDetails() - { - return (UpiCollectDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `UpiIntentDetails`. If the actual instance is not `UpiIntentDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of UpiIntentDetails - public UpiIntentDetails GetUpiIntentDetails() - { - return (UpiIntentDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `UpiQrDetails`. If the actual instance is not `UpiQrDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of UpiQrDetails - public UpiQrDetails GetUpiQrDetails() - { - return (UpiQrDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `VippsDetails`. If the actual instance is not `VippsDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of VippsDetails - public VippsDetails GetVippsDetails() - { - return (VippsDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `VisaCheckoutDetails`. If the actual instance is not `VisaCheckoutDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of VisaCheckoutDetails - public VisaCheckoutDetails GetVisaCheckoutDetails() - { - return (VisaCheckoutDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `WeChatPayDetails`. If the actual instance is not `WeChatPayDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of WeChatPayDetails - public WeChatPayDetails GetWeChatPayDetails() - { - return (WeChatPayDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `WeChatPayMiniProgramDetails`. If the actual instance is not `WeChatPayMiniProgramDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of WeChatPayMiniProgramDetails - public WeChatPayMiniProgramDetails GetWeChatPayMiniProgramDetails() - { - return (WeChatPayMiniProgramDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `ZipDetails`. If the actual instance is not `ZipDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of ZipDetails - public ZipDetails GetZipDetails() - { - return (ZipDetails)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CheckoutPaymentMethod {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, CheckoutPaymentMethod.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of CheckoutPaymentMethod - /// - /// JSON string - /// An instance of CheckoutPaymentMethod - public static CheckoutPaymentMethod FromJson(string jsonString) - { - CheckoutPaymentMethod newCheckoutPaymentMethod = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newCheckoutPaymentMethod; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the AchDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AchDetails"); - match++; - } - // Check if the jsonString type enum matches the AffirmDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AffirmDetails"); - match++; - } - // Check if the jsonString type enum matches the AfterpayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AfterpayDetails"); - match++; - } - // Check if the jsonString type enum matches the AmazonPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AmazonPayDetails"); - match++; - } - // Check if the jsonString type enum matches the AncvDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AncvDetails"); - match++; - } - // Check if the jsonString type enum matches the AndroidPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("AndroidPayDetails"); - match++; - } - // Check if the jsonString type enum matches the ApplePayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("ApplePayDetails"); - match++; - } - // Check if the jsonString type enum matches the BacsDirectDebitDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("BacsDirectDebitDetails"); - match++; - } - // Check if the jsonString type enum matches the BillDeskDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("BillDeskDetails"); - match++; - } - // Check if the jsonString type enum matches the BlikDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("BlikDetails"); - match++; - } - // Check if the jsonString type enum matches the CardDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("CardDetails"); - match++; - } - // Check if the jsonString type enum matches the CashAppDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("CashAppDetails"); - match++; - } - // Check if the jsonString type enum matches the CellulantDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("CellulantDetails"); - match++; - } - // Check if the jsonString type enum matches the DokuDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("DokuDetails"); - match++; - } - // Check if the jsonString type enum matches the DragonpayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("DragonpayDetails"); - match++; - } - // Check if the jsonString type enum matches the EBankingFinlandDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("EBankingFinlandDetails"); - match++; - } - // Check if the jsonString type enum matches the EcontextVoucherDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("EcontextVoucherDetails"); - match++; - } - // Check if the jsonString type enum matches the EftDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("EftDetails"); - match++; - } - // Check if the jsonString type enum matches the FastlaneDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("FastlaneDetails"); - match++; - } - // Check if the jsonString type enum matches the GenericIssuerPaymentMethodDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("GenericIssuerPaymentMethodDetails"); - match++; - } - // Check if the jsonString type enum matches the GooglePayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("GooglePayDetails"); - match++; - } - // Check if the jsonString type enum matches the IdealDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("IdealDetails"); - match++; - } - // Check if the jsonString type enum matches the KlarnaDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("KlarnaDetails"); - match++; - } - // Check if the jsonString type enum matches the MasterpassDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("MasterpassDetails"); - match++; - } - // Check if the jsonString type enum matches the MbwayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("MbwayDetails"); - match++; - } - // Check if the jsonString type enum matches the MobilePayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("MobilePayDetails"); - match++; - } - // Check if the jsonString type enum matches the MolPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("MolPayDetails"); - match++; - } - // Check if the jsonString type enum matches the OpenInvoiceDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("OpenInvoiceDetails"); - match++; - } - // Check if the jsonString type enum matches the PayByBankAISDirectDebitDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayByBankAISDirectDebitDetails"); - match++; - } - // Check if the jsonString type enum matches the PayByBankDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayByBankDetails"); - match++; - } - // Check if the jsonString type enum matches the PayPalDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayPalDetails"); - match++; - } - // Check if the jsonString type enum matches the PayPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayPayDetails"); - match++; - } - // Check if the jsonString type enum matches the PayToDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayToDetails"); - match++; - } - // Check if the jsonString type enum matches the PayUUpiDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayUUpiDetails"); - match++; - } - // Check if the jsonString type enum matches the PayWithGoogleDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayWithGoogleDetails"); - match++; - } - // Check if the jsonString type enum matches the PaymentDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PaymentDetails"); - match++; - } - // Check if the jsonString type enum matches the PixDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PixDetails"); - match++; - } - // Check if the jsonString type enum matches the PseDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("PseDetails"); - match++; - } - // Check if the jsonString type enum matches the RakutenPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("RakutenPayDetails"); - match++; - } - // Check if the jsonString type enum matches the RatepayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("RatepayDetails"); - match++; - } - // Check if the jsonString type enum matches the RivertyDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("RivertyDetails"); - match++; - } - // Check if the jsonString type enum matches the SamsungPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("SamsungPayDetails"); - match++; - } - // Check if the jsonString type enum matches the SepaDirectDebitDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("SepaDirectDebitDetails"); - match++; - } - // Check if the jsonString type enum matches the StoredPaymentMethodDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("StoredPaymentMethodDetails"); - match++; - } - // Check if the jsonString type enum matches the TwintDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("TwintDetails"); - match++; - } - // Check if the jsonString type enum matches the UpiCollectDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("UpiCollectDetails"); - match++; - } - // Check if the jsonString type enum matches the UpiIntentDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("UpiIntentDetails"); - match++; - } - // Check if the jsonString type enum matches the UpiQrDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("UpiQrDetails"); - match++; - } - // Check if the jsonString type enum matches the VippsDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("VippsDetails"); - match++; - } - // Check if the jsonString type enum matches the VisaCheckoutDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("VisaCheckoutDetails"); - match++; - } - // Check if the jsonString type enum matches the WeChatPayDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("WeChatPayDetails"); - match++; - } - // Check if the jsonString type enum matches the WeChatPayMiniProgramDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("WeChatPayMiniProgramDetails"); - match++; - } - // Check if the jsonString type enum matches the ZipDetails type enums - if (ContainsValue(type)) - { - newCheckoutPaymentMethod = new CheckoutPaymentMethod(JsonConvert.DeserializeObject(jsonString, CheckoutPaymentMethod.SerializerSettings)); - matchedTypes.Add("ZipDetails"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newCheckoutPaymentMethod; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutPaymentMethod); - } - - /// - /// Returns true if CheckoutPaymentMethod instances are equal - /// - /// Instance of CheckoutPaymentMethod to be compared - /// Boolean - public bool Equals(CheckoutPaymentMethod input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for CheckoutPaymentMethod - /// - public class CheckoutPaymentMethodJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(CheckoutPaymentMethod).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return CheckoutPaymentMethod.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutQrCodeAction.cs b/Adyen/Model/Checkout/CheckoutQrCodeAction.cs deleted file mode 100644 index 074401e07..000000000 --- a/Adyen/Model/Checkout/CheckoutQrCodeAction.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutQrCodeAction - /// - [DataContract(Name = "CheckoutQrCodeAction")] - public partial class CheckoutQrCodeAction : IEquatable, IValidatableObject - { - /// - /// **qrCode** - /// - /// **qrCode** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum QrCode for value: qrCode - /// - [EnumMember(Value = "qrCode")] - QrCode = 1 - - } - - - /// - /// **qrCode** - /// - /// **qrCode** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutQrCodeAction() { } - /// - /// Initializes a new instance of the class. - /// - /// Expiry time of the QR code.. - /// Encoded payment data.. - /// Specifies the payment method.. - /// The contents of the QR code as a UTF8 string.. - /// **qrCode** (required). - /// Specifies the URL to redirect to.. - public CheckoutQrCodeAction(string expiresAt = default(string), string paymentData = default(string), string paymentMethodType = default(string), string qrCodeData = default(string), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.ExpiresAt = expiresAt; - this.PaymentData = paymentData; - this.PaymentMethodType = paymentMethodType; - this.QrCodeData = qrCodeData; - this.Url = url; - } - - /// - /// Expiry time of the QR code. - /// - /// Expiry time of the QR code. - [DataMember(Name = "expiresAt", EmitDefaultValue = false)] - public string ExpiresAt { get; set; } - - /// - /// Encoded payment data. - /// - /// Encoded payment data. - [DataMember(Name = "paymentData", EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// The contents of the QR code as a UTF8 string. - /// - /// The contents of the QR code as a UTF8 string. - [DataMember(Name = "qrCodeData", EmitDefaultValue = false)] - public string QrCodeData { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutQrCodeAction {\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" QrCodeData: ").Append(QrCodeData).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutQrCodeAction); - } - - /// - /// Returns true if CheckoutQrCodeAction instances are equal - /// - /// Instance of CheckoutQrCodeAction to be compared - /// Boolean - public bool Equals(CheckoutQrCodeAction input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.QrCodeData == input.QrCodeData || - (this.QrCodeData != null && - this.QrCodeData.Equals(input.QrCodeData)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - if (this.QrCodeData != null) - { - hashCode = (hashCode * 59) + this.QrCodeData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutRedirectAction.cs b/Adyen/Model/Checkout/CheckoutRedirectAction.cs deleted file mode 100644 index 9819c80c3..000000000 --- a/Adyen/Model/Checkout/CheckoutRedirectAction.cs +++ /dev/null @@ -1,222 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutRedirectAction - /// - [DataContract(Name = "CheckoutRedirectAction")] - public partial class CheckoutRedirectAction : IEquatable, IValidatableObject - { - /// - /// **redirect** - /// - /// **redirect** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Redirect for value: redirect - /// - [EnumMember(Value = "redirect")] - Redirect = 1 - - } - - - /// - /// **redirect** - /// - /// **redirect** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutRedirectAction() { } - /// - /// Initializes a new instance of the class. - /// - /// When the redirect URL must be accessed via POST, use this data to post to the redirect URL.. - /// Specifies the HTTP method, for example GET or POST.. - /// Specifies the payment method.. - /// **redirect** (required). - /// Specifies the URL to redirect to.. - public CheckoutRedirectAction(Dictionary data = default(Dictionary), string method = default(string), string paymentMethodType = default(string), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.Data = data; - this.Method = method; - this.PaymentMethodType = paymentMethodType; - this.Url = url; - } - - /// - /// When the redirect URL must be accessed via POST, use this data to post to the redirect URL. - /// - /// When the redirect URL must be accessed via POST, use this data to post to the redirect URL. - [DataMember(Name = "data", EmitDefaultValue = false)] - public Dictionary Data { get; set; } - - /// - /// Specifies the HTTP method, for example GET or POST. - /// - /// Specifies the HTTP method, for example GET or POST. - [DataMember(Name = "method", EmitDefaultValue = false)] - public string Method { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutRedirectAction {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutRedirectAction); - } - - /// - /// Returns true if CheckoutRedirectAction instances are equal - /// - /// Instance of CheckoutRedirectAction to be compared - /// Boolean - public bool Equals(CheckoutRedirectAction input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutSDKAction.cs b/Adyen/Model/Checkout/CheckoutSDKAction.cs deleted file mode 100644 index bdf8abdca..000000000 --- a/Adyen/Model/Checkout/CheckoutSDKAction.cs +++ /dev/null @@ -1,228 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutSDKAction - /// - [DataContract(Name = "CheckoutSDKAction")] - public partial class CheckoutSDKAction : IEquatable, IValidatableObject - { - /// - /// The type of the action. - /// - /// The type of the action. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Sdk for value: sdk - /// - [EnumMember(Value = "sdk")] - Sdk = 1, - - /// - /// Enum WechatpaySDK for value: wechatpaySDK - /// - [EnumMember(Value = "wechatpaySDK")] - WechatpaySDK = 2 - - } - - - /// - /// The type of the action. - /// - /// The type of the action. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutSDKAction() { } - /// - /// Initializes a new instance of the class. - /// - /// Encoded payment data.. - /// Specifies the payment method.. - /// The data to pass to the SDK.. - /// The type of the action. (required). - /// Specifies the URL to redirect to.. - public CheckoutSDKAction(string paymentData = default(string), string paymentMethodType = default(string), Dictionary sdkData = default(Dictionary), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.PaymentData = paymentData; - this.PaymentMethodType = paymentMethodType; - this.SdkData = sdkData; - this.Url = url; - } - - /// - /// Encoded payment data. - /// - /// Encoded payment data. - [DataMember(Name = "paymentData", EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// The data to pass to the SDK. - /// - /// The data to pass to the SDK. - [DataMember(Name = "sdkData", EmitDefaultValue = false)] - public Dictionary SdkData { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutSDKAction {\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" SdkData: ").Append(SdkData).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutSDKAction); - } - - /// - /// Returns true if CheckoutSDKAction instances are equal - /// - /// Instance of CheckoutSDKAction to be compared - /// Boolean - public bool Equals(CheckoutSDKAction input) - { - if (input == null) - { - return false; - } - return - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.SdkData == input.SdkData || - this.SdkData != null && - input.SdkData != null && - this.SdkData.SequenceEqual(input.SdkData) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - if (this.SdkData != null) - { - hashCode = (hashCode * 59) + this.SdkData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.cs b/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.cs deleted file mode 100644 index 5a9459259..000000000 --- a/Adyen/Model/Checkout/CheckoutSessionInstallmentOption.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutSessionInstallmentOption - /// - [DataContract(Name = "CheckoutSessionInstallmentOption")] - public partial class CheckoutSessionInstallmentOption : IEquatable, IValidatableObject - { - /// - /// Defines Plans - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PlansEnum - { - /// - /// Enum Bonus for value: bonus - /// - [EnumMember(Value = "bonus")] - Bonus = 1, - - /// - /// Enum BuynowPaylater for value: buynow_paylater - /// - [EnumMember(Value = "buynow_paylater")] - BuynowPaylater = 2, - - /// - /// Enum InteresRefundPrctg for value: interes_refund_prctg - /// - [EnumMember(Value = "interes_refund_prctg")] - InteresRefundPrctg = 3, - - /// - /// Enum InterestBonus for value: interest_bonus - /// - [EnumMember(Value = "interest_bonus")] - InterestBonus = 4, - - /// - /// Enum NointeresRefundPrctg for value: nointeres_refund_prctg - /// - [EnumMember(Value = "nointeres_refund_prctg")] - NointeresRefundPrctg = 5, - - /// - /// Enum NointerestBonus for value: nointerest_bonus - /// - [EnumMember(Value = "nointerest_bonus")] - NointerestBonus = 6, - - /// - /// Enum RefundPrctg for value: refund_prctg - /// - [EnumMember(Value = "refund_prctg")] - RefundPrctg = 7, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 8, - - /// - /// Enum Revolving for value: revolving - /// - [EnumMember(Value = "revolving")] - Revolving = 9, - - /// - /// Enum WithInterest for value: with_interest - /// - [EnumMember(Value = "with_interest")] - WithInterest = 10 - - } - - - - /// - /// Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving*** **bonus** * **with_interest** * **buynow_paylater** * **nointerest_bonus** * **interest_bonus** * **refund_prctg** * **nointeres_refund_prctg** * **interes_refund_prctg** - /// - /// Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving*** **bonus** * **with_interest** * **buynow_paylater** * **nointerest_bonus** * **interest_bonus** * **refund_prctg** * **nointeres_refund_prctg** * **interes_refund_prctg** - [DataMember(Name = "plans", EmitDefaultValue = false)] - public List Plans { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving*** **bonus** * **with_interest** * **buynow_paylater** * **nointerest_bonus** * **interest_bonus** * **refund_prctg** * **nointeres_refund_prctg** * **interes_refund_prctg**. - /// Preselected number of installments offered for this payment method.. - /// An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.. - public CheckoutSessionInstallmentOption(List plans = default(List), int? preselectedValue = default(int?), List values = default(List)) - { - this.Plans = plans; - this.PreselectedValue = preselectedValue; - this.Values = values; - } - - /// - /// Preselected number of installments offered for this payment method. - /// - /// Preselected number of installments offered for this payment method. - [DataMember(Name = "preselectedValue", EmitDefaultValue = false)] - public int? PreselectedValue { get; set; } - - /// - /// An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`. - /// - /// An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`. - [DataMember(Name = "values", EmitDefaultValue = false)] - public List Values { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutSessionInstallmentOption {\n"); - sb.Append(" Plans: ").Append(Plans).Append("\n"); - sb.Append(" PreselectedValue: ").Append(PreselectedValue).Append("\n"); - sb.Append(" Values: ").Append(Values).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutSessionInstallmentOption); - } - - /// - /// Returns true if CheckoutSessionInstallmentOption instances are equal - /// - /// Instance of CheckoutSessionInstallmentOption to be compared - /// Boolean - public bool Equals(CheckoutSessionInstallmentOption input) - { - if (input == null) - { - return false; - } - return - ( - this.Plans == input.Plans || - this.Plans.SequenceEqual(input.Plans) - ) && - ( - this.PreselectedValue == input.PreselectedValue || - this.PreselectedValue.Equals(input.PreselectedValue) - ) && - ( - this.Values == input.Values || - this.Values != null && - input.Values != null && - this.Values.SequenceEqual(input.Values) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Plans.GetHashCode(); - hashCode = (hashCode * 59) + this.PreselectedValue.GetHashCode(); - if (this.Values != null) - { - hashCode = (hashCode * 59) + this.Values.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutSessionThreeDS2RequestData.cs b/Adyen/Model/Checkout/CheckoutSessionThreeDS2RequestData.cs deleted file mode 100644 index 4c76f48c2..000000000 --- a/Adyen/Model/Checkout/CheckoutSessionThreeDS2RequestData.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutSessionThreeDS2RequestData - /// - [DataContract(Name = "CheckoutSessionThreeDS2RequestData")] - public partial class CheckoutSessionThreeDS2RequestData : IEquatable, IValidatableObject - { - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - [JsonConverter(typeof(StringEnumConverter))] - public enum ThreeDSRequestorChallengeIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 6 - - } - - - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - [DataMember(Name = "threeDSRequestorChallengeInd", EmitDefaultValue = false)] - public ThreeDSRequestorChallengeIndEnum? ThreeDSRequestorChallengeInd { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// homePhone. - /// mobilePhone. - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only. - /// workPhone. - public CheckoutSessionThreeDS2RequestData(Phone homePhone = default(Phone), Phone mobilePhone = default(Phone), ThreeDSRequestorChallengeIndEnum? threeDSRequestorChallengeInd = default(ThreeDSRequestorChallengeIndEnum?), Phone workPhone = default(Phone)) - { - this.HomePhone = homePhone; - this.MobilePhone = mobilePhone; - this.ThreeDSRequestorChallengeInd = threeDSRequestorChallengeInd; - this.WorkPhone = workPhone; - } - - /// - /// Gets or Sets HomePhone - /// - [DataMember(Name = "homePhone", EmitDefaultValue = false)] - public Phone HomePhone { get; set; } - - /// - /// Gets or Sets MobilePhone - /// - [DataMember(Name = "mobilePhone", EmitDefaultValue = false)] - public Phone MobilePhone { get; set; } - - /// - /// Gets or Sets WorkPhone - /// - [DataMember(Name = "workPhone", EmitDefaultValue = false)] - public Phone WorkPhone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutSessionThreeDS2RequestData {\n"); - sb.Append(" HomePhone: ").Append(HomePhone).Append("\n"); - sb.Append(" MobilePhone: ").Append(MobilePhone).Append("\n"); - sb.Append(" ThreeDSRequestorChallengeInd: ").Append(ThreeDSRequestorChallengeInd).Append("\n"); - sb.Append(" WorkPhone: ").Append(WorkPhone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutSessionThreeDS2RequestData); - } - - /// - /// Returns true if CheckoutSessionThreeDS2RequestData instances are equal - /// - /// Instance of CheckoutSessionThreeDS2RequestData to be compared - /// Boolean - public bool Equals(CheckoutSessionThreeDS2RequestData input) - { - if (input == null) - { - return false; - } - return - ( - this.HomePhone == input.HomePhone || - (this.HomePhone != null && - this.HomePhone.Equals(input.HomePhone)) - ) && - ( - this.MobilePhone == input.MobilePhone || - (this.MobilePhone != null && - this.MobilePhone.Equals(input.MobilePhone)) - ) && - ( - this.ThreeDSRequestorChallengeInd == input.ThreeDSRequestorChallengeInd || - this.ThreeDSRequestorChallengeInd.Equals(input.ThreeDSRequestorChallengeInd) - ) && - ( - this.WorkPhone == input.WorkPhone || - (this.WorkPhone != null && - this.WorkPhone.Equals(input.WorkPhone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.HomePhone != null) - { - hashCode = (hashCode * 59) + this.HomePhone.GetHashCode(); - } - if (this.MobilePhone != null) - { - hashCode = (hashCode * 59) + this.MobilePhone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSRequestorChallengeInd.GetHashCode(); - if (this.WorkPhone != null) - { - hashCode = (hashCode * 59) + this.WorkPhone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutThreeDS2Action.cs b/Adyen/Model/Checkout/CheckoutThreeDS2Action.cs deleted file mode 100644 index 562036df8..000000000 --- a/Adyen/Model/Checkout/CheckoutThreeDS2Action.cs +++ /dev/null @@ -1,259 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutThreeDS2Action - /// - [DataContract(Name = "CheckoutThreeDS2Action")] - public partial class CheckoutThreeDS2Action : IEquatable, IValidatableObject - { - /// - /// **threeDS2** - /// - /// **threeDS2** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum ThreeDS2 for value: threeDS2 - /// - [EnumMember(Value = "threeDS2")] - ThreeDS2 = 1 - - } - - - /// - /// **threeDS2** - /// - /// **threeDS2** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutThreeDS2Action() { } - /// - /// Initializes a new instance of the class. - /// - /// A token needed to authorise a payment.. - /// Encoded payment data.. - /// Specifies the payment method.. - /// A subtype of the token.. - /// A token to pass to the 3DS2 Component to get the fingerprint.. - /// **threeDS2** (required). - /// Specifies the URL to redirect to.. - public CheckoutThreeDS2Action(string authorisationToken = default(string), string paymentData = default(string), string paymentMethodType = default(string), string subtype = default(string), string token = default(string), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.AuthorisationToken = authorisationToken; - this.PaymentData = paymentData; - this.PaymentMethodType = paymentMethodType; - this.Subtype = subtype; - this.Token = token; - this.Url = url; - } - - /// - /// A token needed to authorise a payment. - /// - /// A token needed to authorise a payment. - [DataMember(Name = "authorisationToken", EmitDefaultValue = false)] - public string AuthorisationToken { get; set; } - - /// - /// Encoded payment data. - /// - /// Encoded payment data. - [DataMember(Name = "paymentData", EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// A subtype of the token. - /// - /// A subtype of the token. - [DataMember(Name = "subtype", EmitDefaultValue = false)] - public string Subtype { get; set; } - - /// - /// A token to pass to the 3DS2 Component to get the fingerprint. - /// - /// A token to pass to the 3DS2 Component to get the fingerprint. - [DataMember(Name = "token", EmitDefaultValue = false)] - public string Token { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutThreeDS2Action {\n"); - sb.Append(" AuthorisationToken: ").Append(AuthorisationToken).Append("\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" Subtype: ").Append(Subtype).Append("\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutThreeDS2Action); - } - - /// - /// Returns true if CheckoutThreeDS2Action instances are equal - /// - /// Instance of CheckoutThreeDS2Action to be compared - /// Boolean - public bool Equals(CheckoutThreeDS2Action input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthorisationToken == input.AuthorisationToken || - (this.AuthorisationToken != null && - this.AuthorisationToken.Equals(input.AuthorisationToken)) - ) && - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.Subtype == input.Subtype || - (this.Subtype != null && - this.Subtype.Equals(input.Subtype)) - ) && - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthorisationToken != null) - { - hashCode = (hashCode * 59) + this.AuthorisationToken.GetHashCode(); - } - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - if (this.Subtype != null) - { - hashCode = (hashCode * 59) + this.Subtype.GetHashCode(); - } - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CheckoutVoucherAction.cs b/Adyen/Model/Checkout/CheckoutVoucherAction.cs deleted file mode 100644 index 891756064..000000000 --- a/Adyen/Model/Checkout/CheckoutVoucherAction.cs +++ /dev/null @@ -1,522 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CheckoutVoucherAction - /// - [DataContract(Name = "CheckoutVoucherAction")] - public partial class CheckoutVoucherAction : IEquatable, IValidatableObject - { - /// - /// **voucher** - /// - /// **voucher** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Voucher for value: voucher - /// - [EnumMember(Value = "voucher")] - Voucher = 1 - - } - - - /// - /// **voucher** - /// - /// **voucher** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CheckoutVoucherAction() { } - /// - /// Initializes a new instance of the class. - /// - /// The voucher alternative reference code.. - /// A collection institution number (store number) for Econtext Pay-Easy ATM.. - /// The URL to download the voucher.. - /// An entity number of Multibanco.. - /// The date time of the voucher expiry.. - /// initialAmount. - /// The URL to the detailed instructions to make payment using the voucher.. - /// The issuer of the voucher.. - /// The shopper telephone number (partially masked).. - /// The merchant name.. - /// The merchant reference.. - /// A Base64-encoded token containing all properties of the voucher. For iOS, you can use this to pass a voucher to Apple Wallet.. - /// Encoded payment data.. - /// Specifies the payment method.. - /// The voucher reference code.. - /// The shopper email.. - /// The shopper name.. - /// surcharge. - /// totalAmount. - /// **voucher** (required). - /// Specifies the URL to redirect to.. - public CheckoutVoucherAction(string alternativeReference = default(string), string collectionInstitutionNumber = default(string), string downloadUrl = default(string), string entity = default(string), string expiresAt = default(string), Amount initialAmount = default(Amount), string instructionsUrl = default(string), string issuer = default(string), string maskedTelephoneNumber = default(string), string merchantName = default(string), string merchantReference = default(string), string passCreationToken = default(string), string paymentData = default(string), string paymentMethodType = default(string), string reference = default(string), string shopperEmail = default(string), string shopperName = default(string), Amount surcharge = default(Amount), Amount totalAmount = default(Amount), TypeEnum type = default(TypeEnum), string url = default(string)) - { - this.Type = type; - this.AlternativeReference = alternativeReference; - this.CollectionInstitutionNumber = collectionInstitutionNumber; - this.DownloadUrl = downloadUrl; - this.Entity = entity; - this.ExpiresAt = expiresAt; - this.InitialAmount = initialAmount; - this.InstructionsUrl = instructionsUrl; - this.Issuer = issuer; - this.MaskedTelephoneNumber = maskedTelephoneNumber; - this.MerchantName = merchantName; - this.MerchantReference = merchantReference; - this.PassCreationToken = passCreationToken; - this.PaymentData = paymentData; - this.PaymentMethodType = paymentMethodType; - this.Reference = reference; - this.ShopperEmail = shopperEmail; - this.ShopperName = shopperName; - this.Surcharge = surcharge; - this.TotalAmount = totalAmount; - this.Url = url; - } - - /// - /// The voucher alternative reference code. - /// - /// The voucher alternative reference code. - [DataMember(Name = "alternativeReference", EmitDefaultValue = false)] - public string AlternativeReference { get; set; } - - /// - /// A collection institution number (store number) for Econtext Pay-Easy ATM. - /// - /// A collection institution number (store number) for Econtext Pay-Easy ATM. - [DataMember(Name = "collectionInstitutionNumber", EmitDefaultValue = false)] - public string CollectionInstitutionNumber { get; set; } - - /// - /// The URL to download the voucher. - /// - /// The URL to download the voucher. - [DataMember(Name = "downloadUrl", EmitDefaultValue = false)] - public string DownloadUrl { get; set; } - - /// - /// An entity number of Multibanco. - /// - /// An entity number of Multibanco. - [DataMember(Name = "entity", EmitDefaultValue = false)] - public string Entity { get; set; } - - /// - /// The date time of the voucher expiry. - /// - /// The date time of the voucher expiry. - [DataMember(Name = "expiresAt", EmitDefaultValue = false)] - public string ExpiresAt { get; set; } - - /// - /// Gets or Sets InitialAmount - /// - [DataMember(Name = "initialAmount", EmitDefaultValue = false)] - public Amount InitialAmount { get; set; } - - /// - /// The URL to the detailed instructions to make payment using the voucher. - /// - /// The URL to the detailed instructions to make payment using the voucher. - [DataMember(Name = "instructionsUrl", EmitDefaultValue = false)] - public string InstructionsUrl { get; set; } - - /// - /// The issuer of the voucher. - /// - /// The issuer of the voucher. - [DataMember(Name = "issuer", EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// The shopper telephone number (partially masked). - /// - /// The shopper telephone number (partially masked). - [DataMember(Name = "maskedTelephoneNumber", EmitDefaultValue = false)] - public string MaskedTelephoneNumber { get; set; } - - /// - /// The merchant name. - /// - /// The merchant name. - [DataMember(Name = "merchantName", EmitDefaultValue = false)] - public string MerchantName { get; set; } - - /// - /// The merchant reference. - /// - /// The merchant reference. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// A Base64-encoded token containing all properties of the voucher. For iOS, you can use this to pass a voucher to Apple Wallet. - /// - /// A Base64-encoded token containing all properties of the voucher. For iOS, you can use this to pass a voucher to Apple Wallet. - [DataMember(Name = "passCreationToken", EmitDefaultValue = false)] - public string PassCreationToken { get; set; } - - /// - /// Encoded payment data. - /// - /// Encoded payment data. - [DataMember(Name = "paymentData", EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// Specifies the payment method. - /// - /// Specifies the payment method. - [DataMember(Name = "paymentMethodType", EmitDefaultValue = false)] - public string PaymentMethodType { get; set; } - - /// - /// The voucher reference code. - /// - /// The voucher reference code. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The shopper email. - /// - /// The shopper email. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The shopper name. - /// - /// The shopper name. - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public string ShopperName { get; set; } - - /// - /// Gets or Sets Surcharge - /// - [DataMember(Name = "surcharge", EmitDefaultValue = false)] - public Amount Surcharge { get; set; } - - /// - /// Gets or Sets TotalAmount - /// - [DataMember(Name = "totalAmount", EmitDefaultValue = false)] - public Amount TotalAmount { get; set; } - - /// - /// Specifies the URL to redirect to. - /// - /// Specifies the URL to redirect to. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutVoucherAction {\n"); - sb.Append(" AlternativeReference: ").Append(AlternativeReference).Append("\n"); - sb.Append(" CollectionInstitutionNumber: ").Append(CollectionInstitutionNumber).Append("\n"); - sb.Append(" DownloadUrl: ").Append(DownloadUrl).Append("\n"); - sb.Append(" Entity: ").Append(Entity).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" InitialAmount: ").Append(InitialAmount).Append("\n"); - sb.Append(" InstructionsUrl: ").Append(InstructionsUrl).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" MaskedTelephoneNumber: ").Append(MaskedTelephoneNumber).Append("\n"); - sb.Append(" MerchantName: ").Append(MerchantName).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" PassCreationToken: ").Append(PassCreationToken).Append("\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" PaymentMethodType: ").Append(PaymentMethodType).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" Surcharge: ").Append(Surcharge).Append("\n"); - sb.Append(" TotalAmount: ").Append(TotalAmount).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutVoucherAction); - } - - /// - /// Returns true if CheckoutVoucherAction instances are equal - /// - /// Instance of CheckoutVoucherAction to be compared - /// Boolean - public bool Equals(CheckoutVoucherAction input) - { - if (input == null) - { - return false; - } - return - ( - this.AlternativeReference == input.AlternativeReference || - (this.AlternativeReference != null && - this.AlternativeReference.Equals(input.AlternativeReference)) - ) && - ( - this.CollectionInstitutionNumber == input.CollectionInstitutionNumber || - (this.CollectionInstitutionNumber != null && - this.CollectionInstitutionNumber.Equals(input.CollectionInstitutionNumber)) - ) && - ( - this.DownloadUrl == input.DownloadUrl || - (this.DownloadUrl != null && - this.DownloadUrl.Equals(input.DownloadUrl)) - ) && - ( - this.Entity == input.Entity || - (this.Entity != null && - this.Entity.Equals(input.Entity)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.InitialAmount == input.InitialAmount || - (this.InitialAmount != null && - this.InitialAmount.Equals(input.InitialAmount)) - ) && - ( - this.InstructionsUrl == input.InstructionsUrl || - (this.InstructionsUrl != null && - this.InstructionsUrl.Equals(input.InstructionsUrl)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.MaskedTelephoneNumber == input.MaskedTelephoneNumber || - (this.MaskedTelephoneNumber != null && - this.MaskedTelephoneNumber.Equals(input.MaskedTelephoneNumber)) - ) && - ( - this.MerchantName == input.MerchantName || - (this.MerchantName != null && - this.MerchantName.Equals(input.MerchantName)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.PassCreationToken == input.PassCreationToken || - (this.PassCreationToken != null && - this.PassCreationToken.Equals(input.PassCreationToken)) - ) && - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.PaymentMethodType == input.PaymentMethodType || - (this.PaymentMethodType != null && - this.PaymentMethodType.Equals(input.PaymentMethodType)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.Surcharge == input.Surcharge || - (this.Surcharge != null && - this.Surcharge.Equals(input.Surcharge)) - ) && - ( - this.TotalAmount == input.TotalAmount || - (this.TotalAmount != null && - this.TotalAmount.Equals(input.TotalAmount)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AlternativeReference != null) - { - hashCode = (hashCode * 59) + this.AlternativeReference.GetHashCode(); - } - if (this.CollectionInstitutionNumber != null) - { - hashCode = (hashCode * 59) + this.CollectionInstitutionNumber.GetHashCode(); - } - if (this.DownloadUrl != null) - { - hashCode = (hashCode * 59) + this.DownloadUrl.GetHashCode(); - } - if (this.Entity != null) - { - hashCode = (hashCode * 59) + this.Entity.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.InitialAmount != null) - { - hashCode = (hashCode * 59) + this.InitialAmount.GetHashCode(); - } - if (this.InstructionsUrl != null) - { - hashCode = (hashCode * 59) + this.InstructionsUrl.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.MaskedTelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.MaskedTelephoneNumber.GetHashCode(); - } - if (this.MerchantName != null) - { - hashCode = (hashCode * 59) + this.MerchantName.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.PassCreationToken != null) - { - hashCode = (hashCode * 59) + this.PassCreationToken.GetHashCode(); - } - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - if (this.PaymentMethodType != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodType.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.Surcharge != null) - { - hashCode = (hashCode * 59) + this.Surcharge.GetHashCode(); - } - if (this.TotalAmount != null) - { - hashCode = (hashCode * 59) + this.TotalAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CommonField.cs b/Adyen/Model/Checkout/CommonField.cs deleted file mode 100644 index 3176cf6c8..000000000 --- a/Adyen/Model/Checkout/CommonField.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CommonField - /// - [DataContract(Name = "CommonField")] - public partial class CommonField : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Name of the field. For example, Name of External Platform.. - /// Version of the field. For example, Version of External Platform.. - public CommonField(string name = default(string), string version = default(string)) - { - this.Name = name; - this.Version = version; - } - - /// - /// Name of the field. For example, Name of External Platform. - /// - /// Name of the field. For example, Name of External Platform. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Version of the field. For example, Version of External Platform. - /// - /// Version of the field. For example, Version of External Platform. - [DataMember(Name = "version", EmitDefaultValue = false)] - public string Version { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CommonField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CommonField); - } - - /// - /// Returns true if CommonField instances are equal - /// - /// Instance of CommonField to be compared - /// Boolean - public bool Equals(CommonField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Version == input.Version || - (this.Version != null && - this.Version.Equals(input.Version)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Version != null) - { - hashCode = (hashCode * 59) + this.Version.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Company.cs b/Adyen/Model/Checkout/Company.cs deleted file mode 100644 index 2dd3fbb1c..000000000 --- a/Adyen/Model/Checkout/Company.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Company - /// - [DataContract(Name = "Company")] - public partial class Company : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The company website's home page.. - /// The company name.. - /// Registration number of the company.. - /// Registry location of the company.. - /// Tax ID of the company.. - /// The company type.. - public Company(string homepage = default(string), string name = default(string), string registrationNumber = default(string), string registryLocation = default(string), string taxId = default(string), string type = default(string)) - { - this.Homepage = homepage; - this.Name = name; - this.RegistrationNumber = registrationNumber; - this.RegistryLocation = registryLocation; - this.TaxId = taxId; - this.Type = type; - } - - /// - /// The company website's home page. - /// - /// The company website's home page. - [DataMember(Name = "homepage", EmitDefaultValue = false)] - public string Homepage { get; set; } - - /// - /// The company name. - /// - /// The company name. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Registration number of the company. - /// - /// Registration number of the company. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// Registry location of the company. - /// - /// Registry location of the company. - [DataMember(Name = "registryLocation", EmitDefaultValue = false)] - public string RegistryLocation { get; set; } - - /// - /// Tax ID of the company. - /// - /// Tax ID of the company. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// The company type. - /// - /// The company type. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Company {\n"); - sb.Append(" Homepage: ").Append(Homepage).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" RegistryLocation: ").Append(RegistryLocation).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Company); - } - - /// - /// Returns true if Company instances are equal - /// - /// Instance of Company to be compared - /// Boolean - public bool Equals(Company input) - { - if (input == null) - { - return false; - } - return - ( - this.Homepage == input.Homepage || - (this.Homepage != null && - this.Homepage.Equals(input.Homepage)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.RegistryLocation == input.RegistryLocation || - (this.RegistryLocation != null && - this.RegistryLocation.Equals(input.RegistryLocation)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Homepage != null) - { - hashCode = (hashCode * 59) + this.Homepage.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.RegistryLocation != null) - { - hashCode = (hashCode * 59) + this.RegistryLocation.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs b/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs deleted file mode 100644 index 6cecc7153..000000000 --- a/Adyen/Model/Checkout/CreateCheckoutSessionRequest.cs +++ /dev/null @@ -1,1383 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CreateCheckoutSessionRequest - /// - [DataContract(Name = "CreateCheckoutSessionRequest")] - public partial class CreateCheckoutSessionRequest : IEquatable, IValidatableObject - { - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** - [JsonConverter(typeof(StringEnumConverter))] - public enum ChannelEnum - { - /// - /// Enum IOS for value: iOS - /// - [EnumMember(Value = "iOS")] - IOS = 1, - - /// - /// Enum Android for value: Android - /// - [EnumMember(Value = "Android")] - Android = 2, - - /// - /// Enum Web for value: Web - /// - [EnumMember(Value = "Web")] - Web = 3 - - } - - - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** - [DataMember(Name = "channel", EmitDefaultValue = false)] - public ChannelEnum? Channel { get; set; } - /// - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - /// - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - [JsonConverter(typeof(StringEnumConverter))] - public enum ModeEnum - { - /// - /// Enum Embedded for value: embedded - /// - [EnumMember(Value = "embedded")] - Embedded = 1, - - /// - /// Enum Hosted for value: hosted - /// - [EnumMember(Value = "hosted")] - Hosted = 2 - - } - - - /// - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - /// - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - [DataMember(Name = "mode", EmitDefaultValue = false)] - public ModeEnum? Mode { get; set; } - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - [JsonConverter(typeof(StringEnumConverter))] - public enum StoreFiltrationModeEnum - { - /// - /// Enum Exclusive for value: exclusive - /// - [EnumMember(Value = "exclusive")] - Exclusive = 1, - - /// - /// Enum Inclusive for value: inclusive - /// - [EnumMember(Value = "inclusive")] - Inclusive = 2, - - /// - /// Enum SkipFilter for value: skipFilter - /// - [EnumMember(Value = "skipFilter")] - SkipFilter = 3 - - } - - - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - [DataMember(Name = "storeFiltrationMode", EmitDefaultValue = false)] - public StoreFiltrationModeEnum? StoreFiltrationMode { get; set; } - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. - [JsonConverter(typeof(StringEnumConverter))] - public enum StorePaymentMethodModeEnum - { - /// - /// Enum AskForConsent for value: askForConsent - /// - [EnumMember(Value = "askForConsent")] - AskForConsent = 1, - - /// - /// Enum Disabled for value: disabled - /// - [EnumMember(Value = "disabled")] - Disabled = 2, - - /// - /// Enum Enabled for value: enabled - /// - [EnumMember(Value = "enabled")] - Enabled = 3 - - } - - - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. - [DataMember(Name = "storePaymentMethodMode", EmitDefaultValue = false)] - public StorePaymentMethodModeEnum? StorePaymentMethodMode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateCheckoutSessionRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// accountInfo. - /// additionalAmount. - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.. - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// amount (required). - /// applicationInfo. - /// authenticationData. - /// billingAddress. - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// The delay between the authorisation and scheduled auto-capture, specified in hours.. - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web**. - /// company. - /// The shopper's two-letter country code.. - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD. - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.. - /// deliveryAddress. - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition).. - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts.. - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments.. - /// The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation.. - /// fundOrigin. - /// fundRecipient. - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options.. - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip.. - /// mandate. - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.. - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. . - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration (default to ModeEnum.Embedded). - /// mpiData. - /// platformChargebackLogic. - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.. - /// Minimum number of days between authorisations. Only for 3D Secure 2.. - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. . - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer.. - /// Specifies the redirect method (GET or POST) when redirecting to the issuer.. - /// The reference to uniquely identify a payment. (required). - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. (required). - /// riskData. - /// The shopper's email address.. - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).. - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// The combination of a language code and a country code to specify the language to be used in the payment.. - /// shopperName. - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. - /// Set to true to show the payment amount per installment.. - /// Set to **true** to show a button that lets the shopper remove a stored payment method.. - /// The shopper's social security number.. - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. (default to false). - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).. - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment.. - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned.. - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types).. - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent.. - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication.. - /// Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area.. - /// threeDS2RequestData. - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. (default to false). - /// Set to true if the payment should be routed to a trusted MID.. - public CreateCheckoutSessionRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), BillingAddress billingAddress = default(BillingAddress), List blockedPaymentMethods = default(List), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), Company company = default(Company), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), DeliveryAddress deliveryAddress = default(DeliveryAddress), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), DateTime expiresAt = default(DateTime), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), Dictionary installmentOptions = default(Dictionary), List lineItems = default(List), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), ModeEnum? mode = ModeEnum.Embedded, ThreeDSecureData mpiData = default(ThreeDSecureData), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), bool? showInstallmentAmount = default(bool?), bool? showRemovePaymentMethodButton = default(bool?), string socialSecurityNumber = default(string), bool? splitCardFundingSources = false, List splits = default(List), string store = default(string), StoreFiltrationModeEnum? storeFiltrationMode = default(StoreFiltrationModeEnum?), bool? storePaymentMethod = default(bool?), StorePaymentMethodModeEnum? storePaymentMethodMode = default(StorePaymentMethodModeEnum?), string telephoneNumber = default(string), string themeId = default(string), CheckoutSessionThreeDS2RequestData threeDS2RequestData = default(CheckoutSessionThreeDS2RequestData), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.Reference = reference; - this.ReturnUrl = returnUrl; - this.AccountInfo = accountInfo; - this.AdditionalAmount = additionalAmount; - this.AdditionalData = additionalData; - this.AllowedPaymentMethods = allowedPaymentMethods; - this.ApplicationInfo = applicationInfo; - this.AuthenticationData = authenticationData; - this.BillingAddress = billingAddress; - this.BlockedPaymentMethods = blockedPaymentMethods; - this.CaptureDelayHours = captureDelayHours; - this.Channel = channel; - this.Company = company; - this.CountryCode = countryCode; - this.DateOfBirth = dateOfBirth; - this.DeliverAt = deliverAt; - this.DeliveryAddress = deliveryAddress; - this.EnableOneClick = enableOneClick; - this.EnablePayOut = enablePayOut; - this.EnableRecurring = enableRecurring; - this.ExpiresAt = expiresAt; - this.FundOrigin = fundOrigin; - this.FundRecipient = fundRecipient; - this.InstallmentOptions = installmentOptions; - this.LineItems = lineItems; - this.Mandate = mandate; - this.Mcc = mcc; - this.MerchantOrderReference = merchantOrderReference; - this.Metadata = metadata; - this.Mode = mode; - this.MpiData = mpiData; - this.PlatformChargebackLogic = platformChargebackLogic; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.RecurringProcessingModel = recurringProcessingModel; - this.RedirectFromIssuerMethod = redirectFromIssuerMethod; - this.RedirectToIssuerMethod = redirectToIssuerMethod; - this.RiskData = riskData; - this.ShopperEmail = shopperEmail; - this.ShopperIP = shopperIP; - this.ShopperInteraction = shopperInteraction; - this.ShopperLocale = shopperLocale; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.ShopperStatement = shopperStatement; - this.ShowInstallmentAmount = showInstallmentAmount; - this.ShowRemovePaymentMethodButton = showRemovePaymentMethodButton; - this.SocialSecurityNumber = socialSecurityNumber; - this.SplitCardFundingSources = splitCardFundingSources; - this.Splits = splits; - this.Store = store; - this.StoreFiltrationMode = storeFiltrationMode; - this.StorePaymentMethod = storePaymentMethod; - this.StorePaymentMethodMode = storePaymentMethodMode; - this.TelephoneNumber = telephoneNumber; - this.ThemeId = themeId; - this.ThreeDS2RequestData = threeDS2RequestData; - this.ThreeDSAuthenticationOnly = threeDSAuthenticationOnly; - this.TrustedShopper = trustedShopper; - } - - /// - /// Gets or Sets AccountInfo - /// - [DataMember(Name = "accountInfo", EmitDefaultValue = false)] - public AccountInfo AccountInfo { get; set; } - - /// - /// Gets or Sets AdditionalAmount - /// - [DataMember(Name = "additionalAmount", EmitDefaultValue = false)] - public Amount AdditionalAmount { get; set; } - - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "allowedPaymentMethods", EmitDefaultValue = false)] - public List AllowedPaymentMethods { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets AuthenticationData - /// - [DataMember(Name = "authenticationData", EmitDefaultValue = false)] - public AuthenticationData AuthenticationData { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public BillingAddress BillingAddress { get; set; } - - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)] - public List BlockedPaymentMethods { get; set; } - - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - [DataMember(Name = "captureDelayHours", EmitDefaultValue = false)] - public int? CaptureDelayHours { get; set; } - - /// - /// Gets or Sets Company - /// - [DataMember(Name = "company", EmitDefaultValue = false)] - public Company Company { get; set; } - - /// - /// The shopper's two-letter country code. - /// - /// The shopper's two-letter country code. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "deliverAt", EmitDefaultValue = false)] - public DateTime DeliverAt { get; set; } - - /// - /// Gets or Sets DeliveryAddress - /// - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public DeliveryAddress DeliveryAddress { get; set; } - - /// - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). - /// - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). - [DataMember(Name = "enableOneClick", EmitDefaultValue = false)] - public bool? EnableOneClick { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - /// - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - [DataMember(Name = "enablePayOut", EmitDefaultValue = false)] - public bool? EnablePayOut { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. - /// - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. - [DataMember(Name = "enableRecurring", EmitDefaultValue = false)] - public bool? EnableRecurring { get; set; } - - /// - /// The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. - /// - /// The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. - [DataMember(Name = "expiresAt", EmitDefaultValue = false)] - public DateTime ExpiresAt { get; set; } - - /// - /// Gets or Sets FundOrigin - /// - [DataMember(Name = "fundOrigin", EmitDefaultValue = false)] - public FundOrigin FundOrigin { get; set; } - - /// - /// Gets or Sets FundRecipient - /// - [DataMember(Name = "fundRecipient", EmitDefaultValue = false)] - public FundRecipient FundRecipient { get; set; } - - /// - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. - /// - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. - [DataMember(Name = "installmentOptions", EmitDefaultValue = false)] - public Dictionary InstallmentOptions { get; set; } - - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// Gets or Sets Mandate - /// - [DataMember(Name = "mandate", EmitDefaultValue = false)] - public Mandate Mandate { get; set; } - - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - [DataMember(Name = "merchantOrderReference", EmitDefaultValue = false)] - public string MerchantOrderReference { get; set; } - - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets MpiData - /// - [DataMember(Name = "mpiData", EmitDefaultValue = false)] - public ThreeDSecureData MpiData { get; set; } - - /// - /// Gets or Sets PlatformChargebackLogic - /// - [DataMember(Name = "platformChargebackLogic", EmitDefaultValue = false)] - public PlatformChargebackLogic PlatformChargebackLogic { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public string RecurringExpiry { get; set; } - - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer. - /// - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer. - [DataMember(Name = "redirectFromIssuerMethod", EmitDefaultValue = false)] - public string RedirectFromIssuerMethod { get; set; } - - /// - /// Specifies the redirect method (GET or POST) when redirecting to the issuer. - /// - /// Specifies the redirect method (GET or POST) when redirecting to the issuer. - [DataMember(Name = "redirectToIssuerMethod", EmitDefaultValue = false)] - public string RedirectToIssuerMethod { get; set; } - - /// - /// The reference to uniquely identify a payment. - /// - /// The reference to uniquely identify a payment. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. - /// - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. - [DataMember(Name = "returnUrl", IsRequired = false, EmitDefaultValue = false)] - public string ReturnUrl { get; set; } - - /// - /// Gets or Sets RiskData - /// - [DataMember(Name = "riskData", EmitDefaultValue = false)] - public RiskData RiskData { get; set; } - - /// - /// The shopper's email address. - /// - /// The shopper's email address. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "shopperIP", EmitDefaultValue = false)] - public string ShopperIP { get; set; } - - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// Set to true to show the payment amount per installment. - /// - /// Set to true to show the payment amount per installment. - [DataMember(Name = "showInstallmentAmount", EmitDefaultValue = false)] - public bool? ShowInstallmentAmount { get; set; } - - /// - /// Set to **true** to show a button that lets the shopper remove a stored payment method. - /// - /// Set to **true** to show a button that lets the shopper remove a stored payment method. - [DataMember(Name = "showRemovePaymentMethodButton", EmitDefaultValue = false)] - public bool? ShowRemovePaymentMethodButton { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - [DataMember(Name = "splitCardFundingSources", EmitDefaultValue = false)] - public bool? SplitCardFundingSources { get; set; } - - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). - /// - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). - [DataMember(Name = "storePaymentMethod", EmitDefaultValue = false)] - public bool? StorePaymentMethod { get; set; } - - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. - /// - /// Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. - [DataMember(Name = "themeId", EmitDefaultValue = false)] - public string ThemeId { get; set; } - - /// - /// Gets or Sets ThreeDS2RequestData - /// - [DataMember(Name = "threeDS2RequestData", EmitDefaultValue = false)] - public CheckoutSessionThreeDS2RequestData ThreeDS2RequestData { get; set; } - - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - [DataMember(Name = "threeDSAuthenticationOnly", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v69. Use `authenticationData.authenticationOnly` instead.")] - public bool? ThreeDSAuthenticationOnly { get; set; } - - /// - /// Set to true if the payment should be routed to a trusted MID. - /// - /// Set to true if the payment should be routed to a trusted MID. - [DataMember(Name = "trustedShopper", EmitDefaultValue = false)] - public bool? TrustedShopper { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateCheckoutSessionRequest {\n"); - sb.Append(" AccountInfo: ").Append(AccountInfo).Append("\n"); - sb.Append(" AdditionalAmount: ").Append(AdditionalAmount).Append("\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" AllowedPaymentMethods: ").Append(AllowedPaymentMethods).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" AuthenticationData: ").Append(AuthenticationData).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" BlockedPaymentMethods: ").Append(BlockedPaymentMethods).Append("\n"); - sb.Append(" CaptureDelayHours: ").Append(CaptureDelayHours).Append("\n"); - sb.Append(" Channel: ").Append(Channel).Append("\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DeliverAt: ").Append(DeliverAt).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" EnableOneClick: ").Append(EnableOneClick).Append("\n"); - sb.Append(" EnablePayOut: ").Append(EnablePayOut).Append("\n"); - sb.Append(" EnableRecurring: ").Append(EnableRecurring).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" FundOrigin: ").Append(FundOrigin).Append("\n"); - sb.Append(" FundRecipient: ").Append(FundRecipient).Append("\n"); - sb.Append(" InstallmentOptions: ").Append(InstallmentOptions).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" Mandate: ").Append(Mandate).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantOrderReference: ").Append(MerchantOrderReference).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" Mode: ").Append(Mode).Append("\n"); - sb.Append(" MpiData: ").Append(MpiData).Append("\n"); - sb.Append(" PlatformChargebackLogic: ").Append(PlatformChargebackLogic).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" RedirectFromIssuerMethod: ").Append(RedirectFromIssuerMethod).Append("\n"); - sb.Append(" RedirectToIssuerMethod: ").Append(RedirectToIssuerMethod).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); - sb.Append(" RiskData: ").Append(RiskData).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" ShowInstallmentAmount: ").Append(ShowInstallmentAmount).Append("\n"); - sb.Append(" ShowRemovePaymentMethodButton: ").Append(ShowRemovePaymentMethodButton).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" SplitCardFundingSources: ").Append(SplitCardFundingSources).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StoreFiltrationMode: ").Append(StoreFiltrationMode).Append("\n"); - sb.Append(" StorePaymentMethod: ").Append(StorePaymentMethod).Append("\n"); - sb.Append(" StorePaymentMethodMode: ").Append(StorePaymentMethodMode).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" ThemeId: ").Append(ThemeId).Append("\n"); - sb.Append(" ThreeDS2RequestData: ").Append(ThreeDS2RequestData).Append("\n"); - sb.Append(" ThreeDSAuthenticationOnly: ").Append(ThreeDSAuthenticationOnly).Append("\n"); - sb.Append(" TrustedShopper: ").Append(TrustedShopper).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCheckoutSessionRequest); - } - - /// - /// Returns true if CreateCheckoutSessionRequest instances are equal - /// - /// Instance of CreateCheckoutSessionRequest to be compared - /// Boolean - public bool Equals(CreateCheckoutSessionRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountInfo == input.AccountInfo || - (this.AccountInfo != null && - this.AccountInfo.Equals(input.AccountInfo)) - ) && - ( - this.AdditionalAmount == input.AdditionalAmount || - (this.AdditionalAmount != null && - this.AdditionalAmount.Equals(input.AdditionalAmount)) - ) && - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.AuthenticationData == input.AuthenticationData || - (this.AuthenticationData != null && - this.AuthenticationData.Equals(input.AuthenticationData)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.BlockedPaymentMethods == input.BlockedPaymentMethods || - this.BlockedPaymentMethods != null && - input.BlockedPaymentMethods != null && - this.BlockedPaymentMethods.SequenceEqual(input.BlockedPaymentMethods) - ) && - ( - this.CaptureDelayHours == input.CaptureDelayHours || - this.CaptureDelayHours.Equals(input.CaptureDelayHours) - ) && - ( - this.Channel == input.Channel || - this.Channel.Equals(input.Channel) - ) && - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DeliverAt == input.DeliverAt || - (this.DeliverAt != null && - this.DeliverAt.Equals(input.DeliverAt)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.EnableOneClick == input.EnableOneClick || - this.EnableOneClick.Equals(input.EnableOneClick) - ) && - ( - this.EnablePayOut == input.EnablePayOut || - this.EnablePayOut.Equals(input.EnablePayOut) - ) && - ( - this.EnableRecurring == input.EnableRecurring || - this.EnableRecurring.Equals(input.EnableRecurring) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.FundOrigin == input.FundOrigin || - (this.FundOrigin != null && - this.FundOrigin.Equals(input.FundOrigin)) - ) && - ( - this.FundRecipient == input.FundRecipient || - (this.FundRecipient != null && - this.FundRecipient.Equals(input.FundRecipient)) - ) && - ( - this.InstallmentOptions == input.InstallmentOptions || - this.InstallmentOptions != null && - input.InstallmentOptions != null && - this.InstallmentOptions.SequenceEqual(input.InstallmentOptions) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.Mandate == input.Mandate || - (this.Mandate != null && - this.Mandate.Equals(input.Mandate)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantOrderReference == input.MerchantOrderReference || - (this.MerchantOrderReference != null && - this.MerchantOrderReference.Equals(input.MerchantOrderReference)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Mode == input.Mode || - this.Mode.Equals(input.Mode) - ) && - ( - this.MpiData == input.MpiData || - (this.MpiData != null && - this.MpiData.Equals(input.MpiData)) - ) && - ( - this.PlatformChargebackLogic == input.PlatformChargebackLogic || - (this.PlatformChargebackLogic != null && - this.PlatformChargebackLogic.Equals(input.PlatformChargebackLogic)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.RedirectFromIssuerMethod == input.RedirectFromIssuerMethod || - (this.RedirectFromIssuerMethod != null && - this.RedirectFromIssuerMethod.Equals(input.RedirectFromIssuerMethod)) - ) && - ( - this.RedirectToIssuerMethod == input.RedirectToIssuerMethod || - (this.RedirectToIssuerMethod != null && - this.RedirectToIssuerMethod.Equals(input.RedirectToIssuerMethod)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ) && - ( - this.RiskData == input.RiskData || - (this.RiskData != null && - this.RiskData.Equals(input.RiskData)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperIP == input.ShopperIP || - (this.ShopperIP != null && - this.ShopperIP.Equals(input.ShopperIP)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.ShowInstallmentAmount == input.ShowInstallmentAmount || - this.ShowInstallmentAmount.Equals(input.ShowInstallmentAmount) - ) && - ( - this.ShowRemovePaymentMethodButton == input.ShowRemovePaymentMethodButton || - this.ShowRemovePaymentMethodButton.Equals(input.ShowRemovePaymentMethodButton) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.SplitCardFundingSources == input.SplitCardFundingSources || - this.SplitCardFundingSources.Equals(input.SplitCardFundingSources) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreFiltrationMode == input.StoreFiltrationMode || - this.StoreFiltrationMode.Equals(input.StoreFiltrationMode) - ) && - ( - this.StorePaymentMethod == input.StorePaymentMethod || - this.StorePaymentMethod.Equals(input.StorePaymentMethod) - ) && - ( - this.StorePaymentMethodMode == input.StorePaymentMethodMode || - this.StorePaymentMethodMode.Equals(input.StorePaymentMethodMode) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.ThemeId == input.ThemeId || - (this.ThemeId != null && - this.ThemeId.Equals(input.ThemeId)) - ) && - ( - this.ThreeDS2RequestData == input.ThreeDS2RequestData || - (this.ThreeDS2RequestData != null && - this.ThreeDS2RequestData.Equals(input.ThreeDS2RequestData)) - ) && - ( - this.ThreeDSAuthenticationOnly == input.ThreeDSAuthenticationOnly || - this.ThreeDSAuthenticationOnly.Equals(input.ThreeDSAuthenticationOnly) - ) && - ( - this.TrustedShopper == input.TrustedShopper || - this.TrustedShopper.Equals(input.TrustedShopper) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountInfo != null) - { - hashCode = (hashCode * 59) + this.AccountInfo.GetHashCode(); - } - if (this.AdditionalAmount != null) - { - hashCode = (hashCode * 59) + this.AdditionalAmount.GetHashCode(); - } - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.AuthenticationData != null) - { - hashCode = (hashCode * 59) + this.AuthenticationData.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.BlockedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.BlockedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CaptureDelayHours.GetHashCode(); - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DeliverAt != null) - { - hashCode = (hashCode * 59) + this.DeliverAt.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EnableOneClick.GetHashCode(); - hashCode = (hashCode * 59) + this.EnablePayOut.GetHashCode(); - hashCode = (hashCode * 59) + this.EnableRecurring.GetHashCode(); - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.FundOrigin != null) - { - hashCode = (hashCode * 59) + this.FundOrigin.GetHashCode(); - } - if (this.FundRecipient != null) - { - hashCode = (hashCode * 59) + this.FundRecipient.GetHashCode(); - } - if (this.InstallmentOptions != null) - { - hashCode = (hashCode * 59) + this.InstallmentOptions.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.Mandate != null) - { - hashCode = (hashCode * 59) + this.Mandate.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantOrderReference != null) - { - hashCode = (hashCode * 59) + this.MerchantOrderReference.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Mode.GetHashCode(); - if (this.MpiData != null) - { - hashCode = (hashCode * 59) + this.MpiData.GetHashCode(); - } - if (this.PlatformChargebackLogic != null) - { - hashCode = (hashCode * 59) + this.PlatformChargebackLogic.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.RedirectFromIssuerMethod != null) - { - hashCode = (hashCode * 59) + this.RedirectFromIssuerMethod.GetHashCode(); - } - if (this.RedirectToIssuerMethod != null) - { - hashCode = (hashCode * 59) + this.RedirectToIssuerMethod.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - if (this.RiskData != null) - { - hashCode = (hashCode * 59) + this.RiskData.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperIP != null) - { - hashCode = (hashCode * 59) + this.ShopperIP.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShowInstallmentAmount.GetHashCode(); - hashCode = (hashCode * 59) + this.ShowRemovePaymentMethodButton.GetHashCode(); - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SplitCardFundingSources.GetHashCode(); - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StoreFiltrationMode.GetHashCode(); - hashCode = (hashCode * 59) + this.StorePaymentMethod.GetHashCode(); - hashCode = (hashCode * 59) + this.StorePaymentMethodMode.GetHashCode(); - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.ThemeId != null) - { - hashCode = (hashCode * 59) + this.ThemeId.GetHashCode(); - } - if (this.ThreeDS2RequestData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2RequestData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSAuthenticationOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.TrustedShopper.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ReturnUrl (string) maxLength - if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); - } - - // ShopperReference (string) maxLength - if (this.ShopperReference != null && this.ShopperReference.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be less than 256.", new [] { "ShopperReference" }); - } - - // ShopperReference (string) minLength - if (this.ShopperReference != null && this.ShopperReference.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs b/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs deleted file mode 100644 index 2e2d58a66..000000000 --- a/Adyen/Model/Checkout/CreateCheckoutSessionResponse.cs +++ /dev/null @@ -1,1437 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CreateCheckoutSessionResponse - /// - [DataContract(Name = "CreateCheckoutSessionResponse")] - public partial class CreateCheckoutSessionResponse : IEquatable, IValidatableObject - { - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** - [JsonConverter(typeof(StringEnumConverter))] - public enum ChannelEnum - { - /// - /// Enum IOS for value: iOS - /// - [EnumMember(Value = "iOS")] - IOS = 1, - - /// - /// Enum Android for value: Android - /// - [EnumMember(Value = "Android")] - Android = 2, - - /// - /// Enum Web for value: Web - /// - [EnumMember(Value = "Web")] - Web = 3 - - } - - - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web** - [DataMember(Name = "channel", EmitDefaultValue = false)] - public ChannelEnum? Channel { get; set; } - /// - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - /// - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - [JsonConverter(typeof(StringEnumConverter))] - public enum ModeEnum - { - /// - /// Enum Embedded for value: embedded - /// - [EnumMember(Value = "embedded")] - Embedded = 1, - - /// - /// Enum Hosted for value: hosted - /// - [EnumMember(Value = "hosted")] - Hosted = 2 - - } - - - /// - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - /// - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration - [DataMember(Name = "mode", EmitDefaultValue = false)] - public ModeEnum? Mode { get; set; } - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - [JsonConverter(typeof(StringEnumConverter))] - public enum StoreFiltrationModeEnum - { - /// - /// Enum Exclusive for value: exclusive - /// - [EnumMember(Value = "exclusive")] - Exclusive = 1, - - /// - /// Enum Inclusive for value: inclusive - /// - [EnumMember(Value = "inclusive")] - Inclusive = 2, - - /// - /// Enum SkipFilter for value: skipFilter - /// - [EnumMember(Value = "skipFilter")] - SkipFilter = 3 - - } - - - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - [DataMember(Name = "storeFiltrationMode", EmitDefaultValue = false)] - public StoreFiltrationModeEnum? StoreFiltrationMode { get; set; } - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. - [JsonConverter(typeof(StringEnumConverter))] - public enum StorePaymentMethodModeEnum - { - /// - /// Enum AskForConsent for value: askForConsent - /// - [EnumMember(Value = "askForConsent")] - AskForConsent = 1, - - /// - /// Enum Disabled for value: disabled - /// - [EnumMember(Value = "disabled")] - Disabled = 2, - - /// - /// Enum Enabled for value: enabled - /// - [EnumMember(Value = "enabled")] - Enabled = 3 - - } - - - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. - [DataMember(Name = "storePaymentMethodMode", EmitDefaultValue = false)] - public StorePaymentMethodModeEnum? StorePaymentMethodMode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateCheckoutSessionResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// accountInfo. - /// additionalAmount. - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.. - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// amount (required). - /// applicationInfo. - /// authenticationData. - /// billingAddress. - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// The delay between the authorisation and scheduled auto-capture, specified in hours.. - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * **iOS** * **Android** * **Web**. - /// company. - /// The shopper's two-letter country code.. - /// The shopper's date of birth in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.. - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.. - /// deliveryAddress. - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition).. - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts.. - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments.. - /// The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. (required). - /// fundOrigin. - /// fundRecipient. - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options.. - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip.. - /// mandate. - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.. - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. . - /// Indicates the type of front end integration. Possible values: * **embedded** (default): Drop-in or Components integration * **hosted**: Hosted Checkout integration (default to ModeEnum.Embedded). - /// mpiData. - /// platformChargebackLogic. - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.. - /// Minimum number of days between authorisations. Only for 3D Secure 2.. - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. . - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer.. - /// Specifies the redirect method (GET or POST) when redirecting to the issuer.. - /// The reference to uniquely identify a payment. (required). - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. (required). - /// riskData. - /// The payment session data you need to pass to your front end.. - /// The shopper's email address.. - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).. - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// The combination of a language code and a country code to specify the language to be used in the payment.. - /// shopperName. - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. - /// Set to true to show the payment amount per installment.. - /// Set to **true** to show a button that lets the shopper remove a stored payment method.. - /// The shopper's social security number.. - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. (default to false). - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).. - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment.. - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned.. - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types).. - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent.. - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication.. - /// Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area.. - /// threeDS2RequestData. - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. (default to false). - /// Set to true if the payment should be routed to a trusted MID.. - /// The URL for the Hosted Checkout page. Redirect the shopper to this URL so they can make the payment.. - public CreateCheckoutSessionResponse(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), BillingAddress billingAddress = default(BillingAddress), List blockedPaymentMethods = default(List), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), Company company = default(Company), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), DeliveryAddress deliveryAddress = default(DeliveryAddress), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), DateTime expiresAt = default(DateTime), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), Dictionary installmentOptions = default(Dictionary), List lineItems = default(List), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), ModeEnum? mode = ModeEnum.Embedded, ThreeDSecureData mpiData = default(ThreeDSecureData), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string sessionData = default(string), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), bool? showInstallmentAmount = default(bool?), bool? showRemovePaymentMethodButton = default(bool?), string socialSecurityNumber = default(string), bool? splitCardFundingSources = false, List splits = default(List), string store = default(string), StoreFiltrationModeEnum? storeFiltrationMode = default(StoreFiltrationModeEnum?), bool? storePaymentMethod = default(bool?), StorePaymentMethodModeEnum? storePaymentMethodMode = default(StorePaymentMethodModeEnum?), string telephoneNumber = default(string), string themeId = default(string), CheckoutSessionThreeDS2RequestData threeDS2RequestData = default(CheckoutSessionThreeDS2RequestData), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?), string url = default(string)) - { - this.Amount = amount; - this.ExpiresAt = expiresAt; - this.MerchantAccount = merchantAccount; - this.Reference = reference; - this.ReturnUrl = returnUrl; - this.AccountInfo = accountInfo; - this.AdditionalAmount = additionalAmount; - this.AdditionalData = additionalData; - this.AllowedPaymentMethods = allowedPaymentMethods; - this.ApplicationInfo = applicationInfo; - this.AuthenticationData = authenticationData; - this.BillingAddress = billingAddress; - this.BlockedPaymentMethods = blockedPaymentMethods; - this.CaptureDelayHours = captureDelayHours; - this.Channel = channel; - this.Company = company; - this.CountryCode = countryCode; - this.DateOfBirth = dateOfBirth; - this.DeliverAt = deliverAt; - this.DeliveryAddress = deliveryAddress; - this.EnableOneClick = enableOneClick; - this.EnablePayOut = enablePayOut; - this.EnableRecurring = enableRecurring; - this.FundOrigin = fundOrigin; - this.FundRecipient = fundRecipient; - this.InstallmentOptions = installmentOptions; - this.LineItems = lineItems; - this.Mandate = mandate; - this.Mcc = mcc; - this.MerchantOrderReference = merchantOrderReference; - this.Metadata = metadata; - this.Mode = mode; - this.MpiData = mpiData; - this.PlatformChargebackLogic = platformChargebackLogic; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.RecurringProcessingModel = recurringProcessingModel; - this.RedirectFromIssuerMethod = redirectFromIssuerMethod; - this.RedirectToIssuerMethod = redirectToIssuerMethod; - this.RiskData = riskData; - this.SessionData = sessionData; - this.ShopperEmail = shopperEmail; - this.ShopperIP = shopperIP; - this.ShopperInteraction = shopperInteraction; - this.ShopperLocale = shopperLocale; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.ShopperStatement = shopperStatement; - this.ShowInstallmentAmount = showInstallmentAmount; - this.ShowRemovePaymentMethodButton = showRemovePaymentMethodButton; - this.SocialSecurityNumber = socialSecurityNumber; - this.SplitCardFundingSources = splitCardFundingSources; - this.Splits = splits; - this.Store = store; - this.StoreFiltrationMode = storeFiltrationMode; - this.StorePaymentMethod = storePaymentMethod; - this.StorePaymentMethodMode = storePaymentMethodMode; - this.TelephoneNumber = telephoneNumber; - this.ThemeId = themeId; - this.ThreeDS2RequestData = threeDS2RequestData; - this.ThreeDSAuthenticationOnly = threeDSAuthenticationOnly; - this.TrustedShopper = trustedShopper; - this.Url = url; - } - - /// - /// Gets or Sets AccountInfo - /// - [DataMember(Name = "accountInfo", EmitDefaultValue = false)] - public AccountInfo AccountInfo { get; set; } - - /// - /// Gets or Sets AdditionalAmount - /// - [DataMember(Name = "additionalAmount", EmitDefaultValue = false)] - public Amount AdditionalAmount { get; set; } - - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "allowedPaymentMethods", EmitDefaultValue = false)] - public List AllowedPaymentMethods { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets AuthenticationData - /// - [DataMember(Name = "authenticationData", EmitDefaultValue = false)] - public AuthenticationData AuthenticationData { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public BillingAddress BillingAddress { get; set; } - - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)] - public List BlockedPaymentMethods { get; set; } - - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - [DataMember(Name = "captureDelayHours", EmitDefaultValue = false)] - public int? CaptureDelayHours { get; set; } - - /// - /// Gets or Sets Company - /// - [DataMember(Name = "company", EmitDefaultValue = false)] - public Company Company { get; set; } - - /// - /// The shopper's two-letter country code. - /// - /// The shopper's two-letter country code. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The shopper's date of birth in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - /// - /// The shopper's date of birth in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - public DateTime DateOfBirth { get; set; } - - /// - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "deliverAt", EmitDefaultValue = false)] - public DateTime DeliverAt { get; set; } - - /// - /// Gets or Sets DeliveryAddress - /// - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public DeliveryAddress DeliveryAddress { get; set; } - - /// - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). - /// - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). - [DataMember(Name = "enableOneClick", EmitDefaultValue = false)] - public bool? EnableOneClick { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - /// - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - [DataMember(Name = "enablePayOut", EmitDefaultValue = false)] - public bool? EnablePayOut { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. - /// - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. - [DataMember(Name = "enableRecurring", EmitDefaultValue = false)] - public bool? EnableRecurring { get; set; } - - /// - /// The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. - /// - /// The date the session expires in [ISO8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. When not specified, the expiry date is set to 1 hour after session creation. You cannot set the session expiry to more than 24 hours after session creation. - [DataMember(Name = "expiresAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime ExpiresAt { get; set; } - - /// - /// Gets or Sets FundOrigin - /// - [DataMember(Name = "fundOrigin", EmitDefaultValue = false)] - public FundOrigin FundOrigin { get; set; } - - /// - /// Gets or Sets FundRecipient - /// - [DataMember(Name = "fundRecipient", EmitDefaultValue = false)] - public FundRecipient FundRecipient { get; set; } - - /// - /// A unique identifier of the session. - /// - /// A unique identifier of the session. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. - /// - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. - [DataMember(Name = "installmentOptions", EmitDefaultValue = false)] - public Dictionary InstallmentOptions { get; set; } - - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// Gets or Sets Mandate - /// - [DataMember(Name = "mandate", EmitDefaultValue = false)] - public Mandate Mandate { get; set; } - - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - [DataMember(Name = "merchantOrderReference", EmitDefaultValue = false)] - public string MerchantOrderReference { get; set; } - - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. * Maximum 20 characters per key. * Maximum 80 characters per value. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets MpiData - /// - [DataMember(Name = "mpiData", EmitDefaultValue = false)] - public ThreeDSecureData MpiData { get; set; } - - /// - /// Gets or Sets PlatformChargebackLogic - /// - [DataMember(Name = "platformChargebackLogic", EmitDefaultValue = false)] - public PlatformChargebackLogic PlatformChargebackLogic { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public string RecurringExpiry { get; set; } - - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer. - /// - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer. - [DataMember(Name = "redirectFromIssuerMethod", EmitDefaultValue = false)] - public string RedirectFromIssuerMethod { get; set; } - - /// - /// Specifies the redirect method (GET or POST) when redirecting to the issuer. - /// - /// Specifies the redirect method (GET or POST) when redirecting to the issuer. - [DataMember(Name = "redirectToIssuerMethod", EmitDefaultValue = false)] - public string RedirectToIssuerMethod { get; set; } - - /// - /// The reference to uniquely identify a payment. - /// - /// The reference to uniquely identify a payment. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. - /// - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. - [DataMember(Name = "returnUrl", IsRequired = false, EmitDefaultValue = false)] - public string ReturnUrl { get; set; } - - /// - /// Gets or Sets RiskData - /// - [DataMember(Name = "riskData", EmitDefaultValue = false)] - public RiskData RiskData { get; set; } - - /// - /// The payment session data you need to pass to your front end. - /// - /// The payment session data you need to pass to your front end. - [DataMember(Name = "sessionData", EmitDefaultValue = false)] - public string SessionData { get; set; } - - /// - /// The shopper's email address. - /// - /// The shopper's email address. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "shopperIP", EmitDefaultValue = false)] - public string ShopperIP { get; set; } - - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// Set to true to show the payment amount per installment. - /// - /// Set to true to show the payment amount per installment. - [DataMember(Name = "showInstallmentAmount", EmitDefaultValue = false)] - public bool? ShowInstallmentAmount { get; set; } - - /// - /// Set to **true** to show a button that lets the shopper remove a stored payment method. - /// - /// Set to **true** to show a button that lets the shopper remove a stored payment method. - [DataMember(Name = "showRemovePaymentMethodButton", EmitDefaultValue = false)] - public bool? ShowRemovePaymentMethodButton { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - [DataMember(Name = "splitCardFundingSources", EmitDefaultValue = false)] - public bool? SplitCardFundingSources { get; set; } - - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). - /// - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). - [DataMember(Name = "storePaymentMethod", EmitDefaultValue = false)] - public bool? StorePaymentMethod { get; set; } - - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. - /// - /// Sets a custom theme for [Hosted Checkout](https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Hosted+Checkout). The value can be any of the **Theme ID** values from your Customer Area. - [DataMember(Name = "themeId", EmitDefaultValue = false)] - public string ThemeId { get; set; } - - /// - /// Gets or Sets ThreeDS2RequestData - /// - [DataMember(Name = "threeDS2RequestData", EmitDefaultValue = false)] - public CheckoutSessionThreeDS2RequestData ThreeDS2RequestData { get; set; } - - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - [DataMember(Name = "threeDSAuthenticationOnly", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v69. Use `authenticationData.authenticationOnly` instead.")] - public bool? ThreeDSAuthenticationOnly { get; set; } - - /// - /// Set to true if the payment should be routed to a trusted MID. - /// - /// Set to true if the payment should be routed to a trusted MID. - [DataMember(Name = "trustedShopper", EmitDefaultValue = false)] - public bool? TrustedShopper { get; set; } - - /// - /// The URL for the Hosted Checkout page. Redirect the shopper to this URL so they can make the payment. - /// - /// The URL for the Hosted Checkout page. Redirect the shopper to this URL so they can make the payment. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateCheckoutSessionResponse {\n"); - sb.Append(" AccountInfo: ").Append(AccountInfo).Append("\n"); - sb.Append(" AdditionalAmount: ").Append(AdditionalAmount).Append("\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" AllowedPaymentMethods: ").Append(AllowedPaymentMethods).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" AuthenticationData: ").Append(AuthenticationData).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" BlockedPaymentMethods: ").Append(BlockedPaymentMethods).Append("\n"); - sb.Append(" CaptureDelayHours: ").Append(CaptureDelayHours).Append("\n"); - sb.Append(" Channel: ").Append(Channel).Append("\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DeliverAt: ").Append(DeliverAt).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" EnableOneClick: ").Append(EnableOneClick).Append("\n"); - sb.Append(" EnablePayOut: ").Append(EnablePayOut).Append("\n"); - sb.Append(" EnableRecurring: ").Append(EnableRecurring).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" FundOrigin: ").Append(FundOrigin).Append("\n"); - sb.Append(" FundRecipient: ").Append(FundRecipient).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" InstallmentOptions: ").Append(InstallmentOptions).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" Mandate: ").Append(Mandate).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantOrderReference: ").Append(MerchantOrderReference).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" Mode: ").Append(Mode).Append("\n"); - sb.Append(" MpiData: ").Append(MpiData).Append("\n"); - sb.Append(" PlatformChargebackLogic: ").Append(PlatformChargebackLogic).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" RedirectFromIssuerMethod: ").Append(RedirectFromIssuerMethod).Append("\n"); - sb.Append(" RedirectToIssuerMethod: ").Append(RedirectToIssuerMethod).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); - sb.Append(" RiskData: ").Append(RiskData).Append("\n"); - sb.Append(" SessionData: ").Append(SessionData).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" ShowInstallmentAmount: ").Append(ShowInstallmentAmount).Append("\n"); - sb.Append(" ShowRemovePaymentMethodButton: ").Append(ShowRemovePaymentMethodButton).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" SplitCardFundingSources: ").Append(SplitCardFundingSources).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StoreFiltrationMode: ").Append(StoreFiltrationMode).Append("\n"); - sb.Append(" StorePaymentMethod: ").Append(StorePaymentMethod).Append("\n"); - sb.Append(" StorePaymentMethodMode: ").Append(StorePaymentMethodMode).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" ThemeId: ").Append(ThemeId).Append("\n"); - sb.Append(" ThreeDS2RequestData: ").Append(ThreeDS2RequestData).Append("\n"); - sb.Append(" ThreeDSAuthenticationOnly: ").Append(ThreeDSAuthenticationOnly).Append("\n"); - sb.Append(" TrustedShopper: ").Append(TrustedShopper).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCheckoutSessionResponse); - } - - /// - /// Returns true if CreateCheckoutSessionResponse instances are equal - /// - /// Instance of CreateCheckoutSessionResponse to be compared - /// Boolean - public bool Equals(CreateCheckoutSessionResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountInfo == input.AccountInfo || - (this.AccountInfo != null && - this.AccountInfo.Equals(input.AccountInfo)) - ) && - ( - this.AdditionalAmount == input.AdditionalAmount || - (this.AdditionalAmount != null && - this.AdditionalAmount.Equals(input.AdditionalAmount)) - ) && - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.AuthenticationData == input.AuthenticationData || - (this.AuthenticationData != null && - this.AuthenticationData.Equals(input.AuthenticationData)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.BlockedPaymentMethods == input.BlockedPaymentMethods || - this.BlockedPaymentMethods != null && - input.BlockedPaymentMethods != null && - this.BlockedPaymentMethods.SequenceEqual(input.BlockedPaymentMethods) - ) && - ( - this.CaptureDelayHours == input.CaptureDelayHours || - this.CaptureDelayHours.Equals(input.CaptureDelayHours) - ) && - ( - this.Channel == input.Channel || - this.Channel.Equals(input.Channel) - ) && - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DeliverAt == input.DeliverAt || - (this.DeliverAt != null && - this.DeliverAt.Equals(input.DeliverAt)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.EnableOneClick == input.EnableOneClick || - this.EnableOneClick.Equals(input.EnableOneClick) - ) && - ( - this.EnablePayOut == input.EnablePayOut || - this.EnablePayOut.Equals(input.EnablePayOut) - ) && - ( - this.EnableRecurring == input.EnableRecurring || - this.EnableRecurring.Equals(input.EnableRecurring) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.FundOrigin == input.FundOrigin || - (this.FundOrigin != null && - this.FundOrigin.Equals(input.FundOrigin)) - ) && - ( - this.FundRecipient == input.FundRecipient || - (this.FundRecipient != null && - this.FundRecipient.Equals(input.FundRecipient)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.InstallmentOptions == input.InstallmentOptions || - this.InstallmentOptions != null && - input.InstallmentOptions != null && - this.InstallmentOptions.SequenceEqual(input.InstallmentOptions) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.Mandate == input.Mandate || - (this.Mandate != null && - this.Mandate.Equals(input.Mandate)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantOrderReference == input.MerchantOrderReference || - (this.MerchantOrderReference != null && - this.MerchantOrderReference.Equals(input.MerchantOrderReference)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Mode == input.Mode || - this.Mode.Equals(input.Mode) - ) && - ( - this.MpiData == input.MpiData || - (this.MpiData != null && - this.MpiData.Equals(input.MpiData)) - ) && - ( - this.PlatformChargebackLogic == input.PlatformChargebackLogic || - (this.PlatformChargebackLogic != null && - this.PlatformChargebackLogic.Equals(input.PlatformChargebackLogic)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.RedirectFromIssuerMethod == input.RedirectFromIssuerMethod || - (this.RedirectFromIssuerMethod != null && - this.RedirectFromIssuerMethod.Equals(input.RedirectFromIssuerMethod)) - ) && - ( - this.RedirectToIssuerMethod == input.RedirectToIssuerMethod || - (this.RedirectToIssuerMethod != null && - this.RedirectToIssuerMethod.Equals(input.RedirectToIssuerMethod)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ) && - ( - this.RiskData == input.RiskData || - (this.RiskData != null && - this.RiskData.Equals(input.RiskData)) - ) && - ( - this.SessionData == input.SessionData || - (this.SessionData != null && - this.SessionData.Equals(input.SessionData)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperIP == input.ShopperIP || - (this.ShopperIP != null && - this.ShopperIP.Equals(input.ShopperIP)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.ShowInstallmentAmount == input.ShowInstallmentAmount || - this.ShowInstallmentAmount.Equals(input.ShowInstallmentAmount) - ) && - ( - this.ShowRemovePaymentMethodButton == input.ShowRemovePaymentMethodButton || - this.ShowRemovePaymentMethodButton.Equals(input.ShowRemovePaymentMethodButton) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.SplitCardFundingSources == input.SplitCardFundingSources || - this.SplitCardFundingSources.Equals(input.SplitCardFundingSources) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreFiltrationMode == input.StoreFiltrationMode || - this.StoreFiltrationMode.Equals(input.StoreFiltrationMode) - ) && - ( - this.StorePaymentMethod == input.StorePaymentMethod || - this.StorePaymentMethod.Equals(input.StorePaymentMethod) - ) && - ( - this.StorePaymentMethodMode == input.StorePaymentMethodMode || - this.StorePaymentMethodMode.Equals(input.StorePaymentMethodMode) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.ThemeId == input.ThemeId || - (this.ThemeId != null && - this.ThemeId.Equals(input.ThemeId)) - ) && - ( - this.ThreeDS2RequestData == input.ThreeDS2RequestData || - (this.ThreeDS2RequestData != null && - this.ThreeDS2RequestData.Equals(input.ThreeDS2RequestData)) - ) && - ( - this.ThreeDSAuthenticationOnly == input.ThreeDSAuthenticationOnly || - this.ThreeDSAuthenticationOnly.Equals(input.ThreeDSAuthenticationOnly) - ) && - ( - this.TrustedShopper == input.TrustedShopper || - this.TrustedShopper.Equals(input.TrustedShopper) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountInfo != null) - { - hashCode = (hashCode * 59) + this.AccountInfo.GetHashCode(); - } - if (this.AdditionalAmount != null) - { - hashCode = (hashCode * 59) + this.AdditionalAmount.GetHashCode(); - } - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.AuthenticationData != null) - { - hashCode = (hashCode * 59) + this.AuthenticationData.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.BlockedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.BlockedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CaptureDelayHours.GetHashCode(); - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DeliverAt != null) - { - hashCode = (hashCode * 59) + this.DeliverAt.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EnableOneClick.GetHashCode(); - hashCode = (hashCode * 59) + this.EnablePayOut.GetHashCode(); - hashCode = (hashCode * 59) + this.EnableRecurring.GetHashCode(); - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.FundOrigin != null) - { - hashCode = (hashCode * 59) + this.FundOrigin.GetHashCode(); - } - if (this.FundRecipient != null) - { - hashCode = (hashCode * 59) + this.FundRecipient.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.InstallmentOptions != null) - { - hashCode = (hashCode * 59) + this.InstallmentOptions.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.Mandate != null) - { - hashCode = (hashCode * 59) + this.Mandate.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantOrderReference != null) - { - hashCode = (hashCode * 59) + this.MerchantOrderReference.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Mode.GetHashCode(); - if (this.MpiData != null) - { - hashCode = (hashCode * 59) + this.MpiData.GetHashCode(); - } - if (this.PlatformChargebackLogic != null) - { - hashCode = (hashCode * 59) + this.PlatformChargebackLogic.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.RedirectFromIssuerMethod != null) - { - hashCode = (hashCode * 59) + this.RedirectFromIssuerMethod.GetHashCode(); - } - if (this.RedirectToIssuerMethod != null) - { - hashCode = (hashCode * 59) + this.RedirectToIssuerMethod.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - if (this.RiskData != null) - { - hashCode = (hashCode * 59) + this.RiskData.GetHashCode(); - } - if (this.SessionData != null) - { - hashCode = (hashCode * 59) + this.SessionData.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperIP != null) - { - hashCode = (hashCode * 59) + this.ShopperIP.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShowInstallmentAmount.GetHashCode(); - hashCode = (hashCode * 59) + this.ShowRemovePaymentMethodButton.GetHashCode(); - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SplitCardFundingSources.GetHashCode(); - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StoreFiltrationMode.GetHashCode(); - hashCode = (hashCode * 59) + this.StorePaymentMethod.GetHashCode(); - hashCode = (hashCode * 59) + this.StorePaymentMethodMode.GetHashCode(); - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.ThemeId != null) - { - hashCode = (hashCode * 59) + this.ThemeId.GetHashCode(); - } - if (this.ThreeDS2RequestData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2RequestData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSAuthenticationOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.TrustedShopper.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ReturnUrl (string) maxLength - if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); - } - - // ShopperReference (string) maxLength - if (this.ShopperReference != null && this.ShopperReference.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be less than 256.", new [] { "ShopperReference" }); - } - - // ShopperReference (string) minLength - if (this.ShopperReference != null && this.ShopperReference.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CreateOrderRequest.cs b/Adyen/Model/Checkout/CreateOrderRequest.cs deleted file mode 100644 index 383c79ee2..000000000 --- a/Adyen/Model/Checkout/CreateOrderRequest.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CreateOrderRequest - /// - [DataContract(Name = "CreateOrderRequest")] - public partial class CreateOrderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateOrderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.. - /// The merchant account identifier, with which you want to process the order. (required). - /// A custom reference identifying the order. (required). - public CreateOrderRequest(Amount amount = default(Amount), string expiresAt = default(string), string merchantAccount = default(string), string reference = default(string)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.Reference = reference; - this.ExpiresAt = expiresAt; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - /// - /// The date when the order should expire. If not provided, the default expiry duration is 1 day. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "expiresAt", EmitDefaultValue = false)] - public string ExpiresAt { get; set; } - - /// - /// The merchant account identifier, with which you want to process the order. - /// - /// The merchant account identifier, with which you want to process the order. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// A custom reference identifying the order. - /// - /// A custom reference identifying the order. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateOrderRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateOrderRequest); - } - - /// - /// Returns true if CreateOrderRequest instances are equal - /// - /// Instance of CreateOrderRequest to be compared - /// Boolean - public bool Equals(CreateOrderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/CreateOrderResponse.cs b/Adyen/Model/Checkout/CreateOrderResponse.cs deleted file mode 100644 index 00e5cbc82..000000000 --- a/Adyen/Model/Checkout/CreateOrderResponse.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// CreateOrderResponse - /// - [DataContract(Name = "CreateOrderResponse")] - public partial class CreateOrderResponse : IEquatable, IValidatableObject - { - /// - /// The result of the order creation request. The value is always **Success**. - /// - /// The result of the order creation request. The value is always **Success**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 1 - - } - - - /// - /// The result of the order creation request. The value is always **Success**. - /// - /// The result of the order creation request. The value is always **Success**. - [DataMember(Name = "resultCode", IsRequired = false, EmitDefaultValue = false)] - public ResultCodeEnum ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateOrderResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.. - /// amount (required). - /// The date that the order will expire. (required). - /// fraudResult. - /// The encrypted data that will be used by merchant for adding payments to the order. (required). - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// The reference provided by merchant for creating the order.. - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).. - /// remainingAmount (required). - /// The result of the order creation request. The value is always **Success**. (required). - public CreateOrderResponse(Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), string expiresAt = default(string), FraudResult fraudResult = default(FraudResult), string orderData = default(string), string pspReference = default(string), string reference = default(string), string refusalReason = default(string), Amount remainingAmount = default(Amount), ResultCodeEnum resultCode = default(ResultCodeEnum)) - { - this.Amount = amount; - this.ExpiresAt = expiresAt; - this.OrderData = orderData; - this.RemainingAmount = remainingAmount; - this.ResultCode = resultCode; - this.AdditionalData = additionalData; - this.FraudResult = fraudResult; - this.PspReference = pspReference; - this.Reference = reference; - this.RefusalReason = refusalReason; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The date that the order will expire. - /// - /// The date that the order will expire. - [DataMember(Name = "expiresAt", IsRequired = false, EmitDefaultValue = false)] - public string ExpiresAt { get; set; } - - /// - /// Gets or Sets FraudResult - /// - [DataMember(Name = "fraudResult", EmitDefaultValue = false)] - public FraudResult FraudResult { get; set; } - - /// - /// The encrypted data that will be used by merchant for adding payments to the order. - /// - /// The encrypted data that will be used by merchant for adding payments to the order. - [DataMember(Name = "orderData", IsRequired = false, EmitDefaultValue = false)] - public string OrderData { get; set; } - - /// - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The reference provided by merchant for creating the order. - /// - /// The reference provided by merchant for creating the order. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Gets or Sets RemainingAmount - /// - [DataMember(Name = "remainingAmount", IsRequired = false, EmitDefaultValue = false)] - public Amount RemainingAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateOrderResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" FraudResult: ").Append(FraudResult).Append("\n"); - sb.Append(" OrderData: ").Append(OrderData).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" RemainingAmount: ").Append(RemainingAmount).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateOrderResponse); - } - - /// - /// Returns true if CreateOrderResponse instances are equal - /// - /// Instance of CreateOrderResponse to be compared - /// Boolean - public bool Equals(CreateOrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.FraudResult == input.FraudResult || - (this.FraudResult != null && - this.FraudResult.Equals(input.FraudResult)) - ) && - ( - this.OrderData == input.OrderData || - (this.OrderData != null && - this.OrderData.Equals(input.OrderData)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.RemainingAmount == input.RemainingAmount || - (this.RemainingAmount != null && - this.RemainingAmount.Equals(input.RemainingAmount)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.FraudResult != null) - { - hashCode = (hashCode * 59) + this.FraudResult.GetHashCode(); - } - if (this.OrderData != null) - { - hashCode = (hashCode * 59) + this.OrderData.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - if (this.RemainingAmount != null) - { - hashCode = (hashCode * 59) + this.RemainingAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DeliveryAddress.cs b/Adyen/Model/Checkout/DeliveryAddress.cs deleted file mode 100644 index 06985b57d..000000000 --- a/Adyen/Model/Checkout/DeliveryAddress.cs +++ /dev/null @@ -1,289 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DeliveryAddress - /// - [DataContract(Name = "DeliveryAddress")] - public partial class DeliveryAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeliveryAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Maximum length: 3000 characters. (required). - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// firstName. - /// The number or name of the house. Maximum length: 3000 characters. (required). - /// lastName. - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). - public DeliveryAddress(string city = default(string), string country = default(string), string firstName = default(string), string houseNumberOrName = default(string), string lastName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.City = city; - this.Country = country; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.Street = street; - this.FirstName = firstName; - this.LastName = lastName; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Maximum length: 3000 characters. - /// - /// The name of the city. Maximum length: 3000 characters. - [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// Gets or Sets FirstName - /// - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The number or name of the house. Maximum length: 3000 characters. - /// - /// The number or name of the house. Maximum length: 3000 characters. - [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// Gets or Sets LastName - /// - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeliveryAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeliveryAddress); - } - - /// - /// Returns true if DeliveryAddress instances are equal - /// - /// Instance of DeliveryAddress to be compared - /// Boolean - public bool Equals(DeliveryAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) maxLength - if (this.City != null && this.City.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); - } - - // HouseNumberOrName (string) maxLength - if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); - } - - // StateOrProvince (string) maxLength - if (this.StateOrProvince != null && this.StateOrProvince.Length > 1000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StateOrProvince, length must be less than 1000.", new [] { "StateOrProvince" }); - } - - // Street (string) maxLength - if (this.Street != null && this.Street.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DeliveryMethod.cs b/Adyen/Model/Checkout/DeliveryMethod.cs deleted file mode 100644 index 7b1b8867a..000000000 --- a/Adyen/Model/Checkout/DeliveryMethod.cs +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DeliveryMethod - /// - [DataContract(Name = "DeliveryMethod")] - public partial class DeliveryMethod : IEquatable, IValidatableObject - { - /// - /// The type of the delivery method. - /// - /// The type of the delivery method. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Shipping for value: Shipping - /// - [EnumMember(Value = "Shipping")] - Shipping = 1 - - } - - - /// - /// The type of the delivery method. - /// - /// The type of the delivery method. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The name of the delivery method as shown to the shopper.. - /// The reference of the delivery method.. - /// If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time.. - /// The type of the delivery method.. - public DeliveryMethod(Amount amount = default(Amount), string description = default(string), string reference = default(string), bool? selected = default(bool?), TypeEnum? type = default(TypeEnum?)) - { - this.Amount = amount; - this.Description = description; - this.Reference = reference; - this.Selected = selected; - this.Type = type; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The name of the delivery method as shown to the shopper. - /// - /// The name of the delivery method as shown to the shopper. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The reference of the delivery method. - /// - /// The reference of the delivery method. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time. - /// - /// If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time. - [DataMember(Name = "selected", EmitDefaultValue = false)] - public bool? Selected { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeliveryMethod {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Selected: ").Append(Selected).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeliveryMethod); - } - - /// - /// Returns true if DeliveryMethod instances are equal - /// - /// Instance of DeliveryMethod to be compared - /// Boolean - public bool Equals(DeliveryMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Selected == input.Selected || - this.Selected.Equals(input.Selected) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Selected.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DetailsRequestAuthenticationData.cs b/Adyen/Model/Checkout/DetailsRequestAuthenticationData.cs deleted file mode 100644 index ee3580d0d..000000000 --- a/Adyen/Model/Checkout/DetailsRequestAuthenticationData.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DetailsRequestAuthenticationData - /// - [DataContract(Name = "DetailsRequestAuthenticationData")] - public partial class DetailsRequestAuthenticationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. (default to false). - public DetailsRequestAuthenticationData(bool? authenticationOnly = false) - { - this.AuthenticationOnly = authenticationOnly; - } - - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - [DataMember(Name = "authenticationOnly", EmitDefaultValue = false)] - public bool? AuthenticationOnly { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DetailsRequestAuthenticationData {\n"); - sb.Append(" AuthenticationOnly: ").Append(AuthenticationOnly).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DetailsRequestAuthenticationData); - } - - /// - /// Returns true if DetailsRequestAuthenticationData instances are equal - /// - /// Instance of DetailsRequestAuthenticationData to be compared - /// Boolean - public bool Equals(DetailsRequestAuthenticationData input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthenticationOnly == input.AuthenticationOnly || - this.AuthenticationOnly.Equals(input.AuthenticationOnly) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AuthenticationOnly.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DeviceRenderOptions.cs b/Adyen/Model/Checkout/DeviceRenderOptions.cs deleted file mode 100644 index a74655b04..000000000 --- a/Adyen/Model/Checkout/DeviceRenderOptions.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DeviceRenderOptions - /// - [DataContract(Name = "DeviceRenderOptions")] - public partial class DeviceRenderOptions : IEquatable, IValidatableObject - { - /// - /// Supported SDK interface types. Allowed values: * native * html * both - /// - /// Supported SDK interface types. Allowed values: * native * html * both - [JsonConverter(typeof(StringEnumConverter))] - public enum SdkInterfaceEnum - { - /// - /// Enum Native for value: native - /// - [EnumMember(Value = "native")] - Native = 1, - - /// - /// Enum Html for value: html - /// - [EnumMember(Value = "html")] - Html = 2, - - /// - /// Enum Both for value: both - /// - [EnumMember(Value = "both")] - Both = 3 - - } - - - /// - /// Supported SDK interface types. Allowed values: * native * html * both - /// - /// Supported SDK interface types. Allowed values: * native * html * both - [DataMember(Name = "sdkInterface", EmitDefaultValue = false)] - public SdkInterfaceEnum? SdkInterface { get; set; } - /// - /// Defines SdkUiType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SdkUiTypeEnum - { - /// - /// Enum MultiSelect for value: multiSelect - /// - [EnumMember(Value = "multiSelect")] - MultiSelect = 1, - - /// - /// Enum OtherHtml for value: otherHtml - /// - [EnumMember(Value = "otherHtml")] - OtherHtml = 2, - - /// - /// Enum OutOfBand for value: outOfBand - /// - [EnumMember(Value = "outOfBand")] - OutOfBand = 3, - - /// - /// Enum SingleSelect for value: singleSelect - /// - [EnumMember(Value = "singleSelect")] - SingleSelect = 4, - - /// - /// Enum Text for value: text - /// - [EnumMember(Value = "text")] - Text = 5 - - } - - - - /// - /// UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect - /// - /// UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect - [DataMember(Name = "sdkUiType", EmitDefaultValue = false)] - public List SdkUiType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Supported SDK interface types. Allowed values: * native * html * both (default to SdkInterfaceEnum.Both). - /// UI types supported for displaying specific challenges. Allowed values: * text * singleSelect * outOfBand * otherHtml * multiSelect. - public DeviceRenderOptions(SdkInterfaceEnum? sdkInterface = SdkInterfaceEnum.Both, List sdkUiType = default(List)) - { - this.SdkInterface = sdkInterface; - this.SdkUiType = sdkUiType; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeviceRenderOptions {\n"); - sb.Append(" SdkInterface: ").Append(SdkInterface).Append("\n"); - sb.Append(" SdkUiType: ").Append(SdkUiType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeviceRenderOptions); - } - - /// - /// Returns true if DeviceRenderOptions instances are equal - /// - /// Instance of DeviceRenderOptions to be compared - /// Boolean - public bool Equals(DeviceRenderOptions input) - { - if (input == null) - { - return false; - } - return - ( - this.SdkInterface == input.SdkInterface || - this.SdkInterface.Equals(input.SdkInterface) - ) && - ( - this.SdkUiType == input.SdkUiType || - this.SdkUiType.SequenceEqual(input.SdkUiType) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.SdkInterface.GetHashCode(); - hashCode = (hashCode * 59) + this.SdkUiType.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DokuDetails.cs b/Adyen/Model/Checkout/DokuDetails.cs deleted file mode 100644 index b35178f38..000000000 --- a/Adyen/Model/Checkout/DokuDetails.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DokuDetails - /// - [DataContract(Name = "DokuDetails")] - public partial class DokuDetails : IEquatable, IValidatableObject - { - /// - /// **doku** - /// - /// **doku** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum MandiriVa for value: doku_mandiri_va - /// - [EnumMember(Value = "doku_mandiri_va")] - MandiriVa = 1, - - /// - /// Enum CimbVa for value: doku_cimb_va - /// - [EnumMember(Value = "doku_cimb_va")] - CimbVa = 2, - - /// - /// Enum DanamonVa for value: doku_danamon_va - /// - [EnumMember(Value = "doku_danamon_va")] - DanamonVa = 3, - - /// - /// Enum BniVa for value: doku_bni_va - /// - [EnumMember(Value = "doku_bni_va")] - BniVa = 4, - - /// - /// Enum PermataLiteAtm for value: doku_permata_lite_atm - /// - [EnumMember(Value = "doku_permata_lite_atm")] - PermataLiteAtm = 5, - - /// - /// Enum BriVa for value: doku_bri_va - /// - [EnumMember(Value = "doku_bri_va")] - BriVa = 6, - - /// - /// Enum BcaVa for value: doku_bca_va - /// - [EnumMember(Value = "doku_bca_va")] - BcaVa = 7, - - /// - /// Enum Alfamart for value: doku_alfamart - /// - [EnumMember(Value = "doku_alfamart")] - Alfamart = 8, - - /// - /// Enum Indomaret for value: doku_indomaret - /// - [EnumMember(Value = "doku_indomaret")] - Indomaret = 9, - - /// - /// Enum Wallet for value: doku_wallet - /// - [EnumMember(Value = "doku_wallet")] - Wallet = 10, - - /// - /// Enum Ovo for value: doku_ovo - /// - [EnumMember(Value = "doku_ovo")] - Ovo = 11 - - } - - - /// - /// **doku** - /// - /// **doku** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DokuDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The shopper's first name. (required). - /// The shopper's last name. (required). - /// The shopper's email. (required). - /// **doku** (required). - public DokuDetails(string checkoutAttemptId = default(string), string firstName = default(string), string lastName = default(string), string shopperEmail = default(string), TypeEnum type = default(TypeEnum)) - { - this.FirstName = firstName; - this.LastName = lastName; - this.ShopperEmail = shopperEmail; - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The shopper's first name. - /// - /// The shopper's first name. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The shopper's last name. - /// - /// The shopper's last name. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// The shopper's email. - /// - /// The shopper's email. - [DataMember(Name = "shopperEmail", IsRequired = false, EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DokuDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DokuDetails); - } - - /// - /// Returns true if DokuDetails instances are equal - /// - /// Instance of DokuDetails to be compared - /// Boolean - public bool Equals(DokuDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Donation.cs b/Adyen/Model/Checkout/Donation.cs deleted file mode 100644 index 5f360c5ed..000000000 --- a/Adyen/Model/Checkout/Donation.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Donation - /// - [DataContract(Name = "Donation")] - public partial class Donation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Donation() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). (required). - /// The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types). Possible values: * **roundup**: a donation where the original transaction amount is rounded up as a donation. * **fixedAmounts**: a donation where you show fixed donations amounts that the shopper can select from. (required). - /// The maximum amount a transaction can be rounded up to make a donation. This field is only present when `donationType` is **roundup**.. - /// The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types). Possible values: * **roundup**: a donation where the original transaction amount is rounded up as a donation. * **fixedAmounts**: a donation where you show fixed donation amounts that the shopper can select from. (required). - /// The fixed donation amounts in [minor units](https://docs.adyen.com/development-resources/currency-codes//#minor-units). This field is only present when `donationType` is **fixedAmounts**.. - public Donation(string currency = default(string), string donationType = default(string), long? maxRoundupAmount = default(long?), string type = default(string), List values = default(List)) - { - this.Currency = currency; - this.DonationType = donationType; - this.Type = type; - this.MaxRoundupAmount = maxRoundupAmount; - this.Values = values; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types). Possible values: * **roundup**: a donation where the original transaction amount is rounded up as a donation. * **fixedAmounts**: a donation where you show fixed donations amounts that the shopper can select from. - /// - /// The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types). Possible values: * **roundup**: a donation where the original transaction amount is rounded up as a donation. * **fixedAmounts**: a donation where you show fixed donations amounts that the shopper can select from. - [DataMember(Name = "donationType", IsRequired = false, EmitDefaultValue = false)] - public string DonationType { get; set; } - - /// - /// The maximum amount a transaction can be rounded up to make a donation. This field is only present when `donationType` is **roundup**. - /// - /// The maximum amount a transaction can be rounded up to make a donation. This field is only present when `donationType` is **roundup**. - [DataMember(Name = "maxRoundupAmount", EmitDefaultValue = false)] - public long? MaxRoundupAmount { get; set; } - - /// - /// The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types). Possible values: * **roundup**: a donation where the original transaction amount is rounded up as a donation. * **fixedAmounts**: a donation where you show fixed donation amounts that the shopper can select from. - /// - /// The [type of donation](https://docs.adyen.com/online-payments/donations/#donation-types). Possible values: * **roundup**: a donation where the original transaction amount is rounded up as a donation. * **fixedAmounts**: a donation where you show fixed donation amounts that the shopper can select from. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// The fixed donation amounts in [minor units](https://docs.adyen.com/development-resources/currency-codes//#minor-units). This field is only present when `donationType` is **fixedAmounts**. - /// - /// The fixed donation amounts in [minor units](https://docs.adyen.com/development-resources/currency-codes//#minor-units). This field is only present when `donationType` is **fixedAmounts**. - [DataMember(Name = "values", EmitDefaultValue = false)] - public List Values { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Donation {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" DonationType: ").Append(DonationType).Append("\n"); - sb.Append(" MaxRoundupAmount: ").Append(MaxRoundupAmount).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Values: ").Append(Values).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Donation); - } - - /// - /// Returns true if Donation instances are equal - /// - /// Instance of Donation to be compared - /// Boolean - public bool Equals(Donation input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.DonationType == input.DonationType || - (this.DonationType != null && - this.DonationType.Equals(input.DonationType)) - ) && - ( - this.MaxRoundupAmount == input.MaxRoundupAmount || - this.MaxRoundupAmount.Equals(input.MaxRoundupAmount) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Values == input.Values || - this.Values != null && - input.Values != null && - this.Values.SequenceEqual(input.Values) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.DonationType != null) - { - hashCode = (hashCode * 59) + this.DonationType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MaxRoundupAmount.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Values != null) - { - hashCode = (hashCode * 59) + this.Values.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DonationCampaign.cs b/Adyen/Model/Checkout/DonationCampaign.cs deleted file mode 100644 index 86c7db288..000000000 --- a/Adyen/Model/Checkout/DonationCampaign.cs +++ /dev/null @@ -1,317 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DonationCampaign - /// - [DataContract(Name = "DonationCampaign")] - public partial class DonationCampaign : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// amounts. - /// The URL for the banner of the nonprofit or campaign.. - /// The name of the donation campaign... - /// The cause of the nonprofit.. - /// donation. - /// The unique campaign ID of the donation campaign.. - /// The URL for the logo of the nonprofit.. - /// The description of the nonprofit.. - /// The name of the nonprofit organization that receives the donation.. - /// The website URL of the nonprofit.. - /// The URL of the terms and conditions page of the nonprofit and the campaign.. - public DonationCampaign(Amounts amounts = default(Amounts), string bannerUrl = default(string), string campaignName = default(string), string causeName = default(string), Donation donation = default(Donation), string id = default(string), string logoUrl = default(string), string nonprofitDescription = default(string), string nonprofitName = default(string), string nonprofitUrl = default(string), string termsAndConditionsUrl = default(string)) - { - this.Amounts = amounts; - this.BannerUrl = bannerUrl; - this.CampaignName = campaignName; - this.CauseName = causeName; - this.Donation = donation; - this.Id = id; - this.LogoUrl = logoUrl; - this.NonprofitDescription = nonprofitDescription; - this.NonprofitName = nonprofitName; - this.NonprofitUrl = nonprofitUrl; - this.TermsAndConditionsUrl = termsAndConditionsUrl; - } - - /// - /// Gets or Sets Amounts - /// - [DataMember(Name = "amounts", EmitDefaultValue = false)] - public Amounts Amounts { get; set; } - - /// - /// The URL for the banner of the nonprofit or campaign. - /// - /// The URL for the banner of the nonprofit or campaign. - [DataMember(Name = "bannerUrl", EmitDefaultValue = false)] - public string BannerUrl { get; set; } - - /// - /// The name of the donation campaign.. - /// - /// The name of the donation campaign.. - [DataMember(Name = "campaignName", EmitDefaultValue = false)] - public string CampaignName { get; set; } - - /// - /// The cause of the nonprofit. - /// - /// The cause of the nonprofit. - [DataMember(Name = "causeName", EmitDefaultValue = false)] - public string CauseName { get; set; } - - /// - /// Gets or Sets Donation - /// - [DataMember(Name = "donation", EmitDefaultValue = false)] - public Donation Donation { get; set; } - - /// - /// The unique campaign ID of the donation campaign. - /// - /// The unique campaign ID of the donation campaign. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The URL for the logo of the nonprofit. - /// - /// The URL for the logo of the nonprofit. - [DataMember(Name = "logoUrl", EmitDefaultValue = false)] - public string LogoUrl { get; set; } - - /// - /// The description of the nonprofit. - /// - /// The description of the nonprofit. - [DataMember(Name = "nonprofitDescription", EmitDefaultValue = false)] - public string NonprofitDescription { get; set; } - - /// - /// The name of the nonprofit organization that receives the donation. - /// - /// The name of the nonprofit organization that receives the donation. - [DataMember(Name = "nonprofitName", EmitDefaultValue = false)] - public string NonprofitName { get; set; } - - /// - /// The website URL of the nonprofit. - /// - /// The website URL of the nonprofit. - [DataMember(Name = "nonprofitUrl", EmitDefaultValue = false)] - public string NonprofitUrl { get; set; } - - /// - /// The URL of the terms and conditions page of the nonprofit and the campaign. - /// - /// The URL of the terms and conditions page of the nonprofit and the campaign. - [DataMember(Name = "termsAndConditionsUrl", EmitDefaultValue = false)] - public string TermsAndConditionsUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DonationCampaign {\n"); - sb.Append(" Amounts: ").Append(Amounts).Append("\n"); - sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n"); - sb.Append(" CampaignName: ").Append(CampaignName).Append("\n"); - sb.Append(" CauseName: ").Append(CauseName).Append("\n"); - sb.Append(" Donation: ").Append(Donation).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LogoUrl: ").Append(LogoUrl).Append("\n"); - sb.Append(" NonprofitDescription: ").Append(NonprofitDescription).Append("\n"); - sb.Append(" NonprofitName: ").Append(NonprofitName).Append("\n"); - sb.Append(" NonprofitUrl: ").Append(NonprofitUrl).Append("\n"); - sb.Append(" TermsAndConditionsUrl: ").Append(TermsAndConditionsUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DonationCampaign); - } - - /// - /// Returns true if DonationCampaign instances are equal - /// - /// Instance of DonationCampaign to be compared - /// Boolean - public bool Equals(DonationCampaign input) - { - if (input == null) - { - return false; - } - return - ( - this.Amounts == input.Amounts || - (this.Amounts != null && - this.Amounts.Equals(input.Amounts)) - ) && - ( - this.BannerUrl == input.BannerUrl || - (this.BannerUrl != null && - this.BannerUrl.Equals(input.BannerUrl)) - ) && - ( - this.CampaignName == input.CampaignName || - (this.CampaignName != null && - this.CampaignName.Equals(input.CampaignName)) - ) && - ( - this.CauseName == input.CauseName || - (this.CauseName != null && - this.CauseName.Equals(input.CauseName)) - ) && - ( - this.Donation == input.Donation || - (this.Donation != null && - this.Donation.Equals(input.Donation)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LogoUrl == input.LogoUrl || - (this.LogoUrl != null && - this.LogoUrl.Equals(input.LogoUrl)) - ) && - ( - this.NonprofitDescription == input.NonprofitDescription || - (this.NonprofitDescription != null && - this.NonprofitDescription.Equals(input.NonprofitDescription)) - ) && - ( - this.NonprofitName == input.NonprofitName || - (this.NonprofitName != null && - this.NonprofitName.Equals(input.NonprofitName)) - ) && - ( - this.NonprofitUrl == input.NonprofitUrl || - (this.NonprofitUrl != null && - this.NonprofitUrl.Equals(input.NonprofitUrl)) - ) && - ( - this.TermsAndConditionsUrl == input.TermsAndConditionsUrl || - (this.TermsAndConditionsUrl != null && - this.TermsAndConditionsUrl.Equals(input.TermsAndConditionsUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amounts != null) - { - hashCode = (hashCode * 59) + this.Amounts.GetHashCode(); - } - if (this.BannerUrl != null) - { - hashCode = (hashCode * 59) + this.BannerUrl.GetHashCode(); - } - if (this.CampaignName != null) - { - hashCode = (hashCode * 59) + this.CampaignName.GetHashCode(); - } - if (this.CauseName != null) - { - hashCode = (hashCode * 59) + this.CauseName.GetHashCode(); - } - if (this.Donation != null) - { - hashCode = (hashCode * 59) + this.Donation.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LogoUrl != null) - { - hashCode = (hashCode * 59) + this.LogoUrl.GetHashCode(); - } - if (this.NonprofitDescription != null) - { - hashCode = (hashCode * 59) + this.NonprofitDescription.GetHashCode(); - } - if (this.NonprofitName != null) - { - hashCode = (hashCode * 59) + this.NonprofitName.GetHashCode(); - } - if (this.NonprofitUrl != null) - { - hashCode = (hashCode * 59) + this.NonprofitUrl.GetHashCode(); - } - if (this.TermsAndConditionsUrl != null) - { - hashCode = (hashCode * 59) + this.TermsAndConditionsUrl.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DonationCampaignsRequest.cs b/Adyen/Model/Checkout/DonationCampaignsRequest.cs deleted file mode 100644 index 3a223fac1..000000000 --- a/Adyen/Model/Checkout/DonationCampaignsRequest.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DonationCampaignsRequest - /// - [DataContract(Name = "DonationCampaignsRequest")] - public partial class DonationCampaignsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DonationCampaignsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). (required). - /// Locale on the shopper interaction device.. - /// Your merchant account identifier. (required). - public DonationCampaignsRequest(string currency = default(string), string locale = default(string), string merchantAccount = default(string)) - { - this.Currency = currency; - this.MerchantAccount = merchantAccount; - this.Locale = locale; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes/). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// Locale on the shopper interaction device. - /// - /// Locale on the shopper interaction device. - [DataMember(Name = "locale", EmitDefaultValue = false)] - public string Locale { get; set; } - - /// - /// Your merchant account identifier. - /// - /// Your merchant account identifier. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DonationCampaignsRequest {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Locale: ").Append(Locale).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DonationCampaignsRequest); - } - - /// - /// Returns true if DonationCampaignsRequest instances are equal - /// - /// Instance of DonationCampaignsRequest to be compared - /// Boolean - public bool Equals(DonationCampaignsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Locale == input.Locale || - (this.Locale != null && - this.Locale.Equals(input.Locale)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Locale != null) - { - hashCode = (hashCode * 59) + this.Locale.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DonationCampaignsResponse.cs b/Adyen/Model/Checkout/DonationCampaignsResponse.cs deleted file mode 100644 index 3793ecbb6..000000000 --- a/Adyen/Model/Checkout/DonationCampaignsResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DonationCampaignsResponse - /// - [DataContract(Name = "DonationCampaignsResponse")] - public partial class DonationCampaignsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of active donation campaigns for your merchant account.. - public DonationCampaignsResponse(List donationCampaigns = default(List)) - { - this.DonationCampaigns = donationCampaigns; - } - - /// - /// List of active donation campaigns for your merchant account. - /// - /// List of active donation campaigns for your merchant account. - [DataMember(Name = "donationCampaigns", EmitDefaultValue = false)] - public List DonationCampaigns { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DonationCampaignsResponse {\n"); - sb.Append(" DonationCampaigns: ").Append(DonationCampaigns).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DonationCampaignsResponse); - } - - /// - /// Returns true if DonationCampaignsResponse instances are equal - /// - /// Instance of DonationCampaignsResponse to be compared - /// Boolean - public bool Equals(DonationCampaignsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DonationCampaigns == input.DonationCampaigns || - this.DonationCampaigns != null && - input.DonationCampaigns != null && - this.DonationCampaigns.SequenceEqual(input.DonationCampaigns) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DonationCampaigns != null) - { - hashCode = (hashCode * 59) + this.DonationCampaigns.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DonationPaymentMethod.cs b/Adyen/Model/Checkout/DonationPaymentMethod.cs deleted file mode 100644 index 4049c4ae2..000000000 --- a/Adyen/Model/Checkout/DonationPaymentMethod.cs +++ /dev/null @@ -1,380 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Checkout -{ - /// - /// The type and required details of a payment method to use. - /// - [JsonConverter(typeof(DonationPaymentMethodJsonConverter))] - [DataContract(Name = "DonationPaymentMethod")] - public partial class DonationPaymentMethod : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ApplePayDonations. - public DonationPaymentMethod(ApplePayDonations actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CardDonations. - public DonationPaymentMethod(CardDonations actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of GooglePayDonations. - public DonationPaymentMethod(GooglePayDonations actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IdealDonations. - public DonationPaymentMethod(IdealDonations actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PayWithGoogleDonations. - public DonationPaymentMethod(PayWithGoogleDonations actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(ApplePayDonations)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CardDonations)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(GooglePayDonations)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IdealDonations)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PayWithGoogleDonations)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: ApplePayDonations, CardDonations, GooglePayDonations, IdealDonations, PayWithGoogleDonations"); - } - } - } - - /// - /// Get the actual instance of `ApplePayDonations`. If the actual instance is not `ApplePayDonations`, - /// the InvalidClassException will be thrown - /// - /// An instance of ApplePayDonations - public ApplePayDonations GetApplePayDonations() - { - return (ApplePayDonations)this.ActualInstance; - } - - /// - /// Get the actual instance of `CardDonations`. If the actual instance is not `CardDonations`, - /// the InvalidClassException will be thrown - /// - /// An instance of CardDonations - public CardDonations GetCardDonations() - { - return (CardDonations)this.ActualInstance; - } - - /// - /// Get the actual instance of `GooglePayDonations`. If the actual instance is not `GooglePayDonations`, - /// the InvalidClassException will be thrown - /// - /// An instance of GooglePayDonations - public GooglePayDonations GetGooglePayDonations() - { - return (GooglePayDonations)this.ActualInstance; - } - - /// - /// Get the actual instance of `IdealDonations`. If the actual instance is not `IdealDonations`, - /// the InvalidClassException will be thrown - /// - /// An instance of IdealDonations - public IdealDonations GetIdealDonations() - { - return (IdealDonations)this.ActualInstance; - } - - /// - /// Get the actual instance of `PayWithGoogleDonations`. If the actual instance is not `PayWithGoogleDonations`, - /// the InvalidClassException will be thrown - /// - /// An instance of PayWithGoogleDonations - public PayWithGoogleDonations GetPayWithGoogleDonations() - { - return (PayWithGoogleDonations)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DonationPaymentMethod {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, DonationPaymentMethod.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of DonationPaymentMethod - /// - /// JSON string - /// An instance of DonationPaymentMethod - public static DonationPaymentMethod FromJson(string jsonString) - { - DonationPaymentMethod newDonationPaymentMethod = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newDonationPaymentMethod; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the ApplePayDonations type enums - if (ContainsValue(type)) - { - newDonationPaymentMethod = new DonationPaymentMethod(JsonConvert.DeserializeObject(jsonString, DonationPaymentMethod.SerializerSettings)); - matchedTypes.Add("ApplePayDonations"); - match++; - } - // Check if the jsonString type enum matches the CardDonations type enums - if (ContainsValue(type)) - { - newDonationPaymentMethod = new DonationPaymentMethod(JsonConvert.DeserializeObject(jsonString, DonationPaymentMethod.SerializerSettings)); - matchedTypes.Add("CardDonations"); - match++; - } - // Check if the jsonString type enum matches the GooglePayDonations type enums - if (ContainsValue(type)) - { - newDonationPaymentMethod = new DonationPaymentMethod(JsonConvert.DeserializeObject(jsonString, DonationPaymentMethod.SerializerSettings)); - matchedTypes.Add("GooglePayDonations"); - match++; - } - // Check if the jsonString type enum matches the IdealDonations type enums - if (ContainsValue(type)) - { - newDonationPaymentMethod = new DonationPaymentMethod(JsonConvert.DeserializeObject(jsonString, DonationPaymentMethod.SerializerSettings)); - matchedTypes.Add("IdealDonations"); - match++; - } - // Check if the jsonString type enum matches the PayWithGoogleDonations type enums - if (ContainsValue(type)) - { - newDonationPaymentMethod = new DonationPaymentMethod(JsonConvert.DeserializeObject(jsonString, DonationPaymentMethod.SerializerSettings)); - matchedTypes.Add("PayWithGoogleDonations"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newDonationPaymentMethod; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DonationPaymentMethod); - } - - /// - /// Returns true if DonationPaymentMethod instances are equal - /// - /// Instance of DonationPaymentMethod to be compared - /// Boolean - public bool Equals(DonationPaymentMethod input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for DonationPaymentMethod - /// - public class DonationPaymentMethodJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(DonationPaymentMethod).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return DonationPaymentMethod.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Checkout/DonationPaymentRequest.cs b/Adyen/Model/Checkout/DonationPaymentRequest.cs deleted file mode 100644 index 1fd2eef0b..000000000 --- a/Adyen/Model/Checkout/DonationPaymentRequest.cs +++ /dev/null @@ -1,1019 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DonationPaymentRequest - /// - [DataContract(Name = "DonationPaymentRequest")] - public partial class DonationPaymentRequest : IEquatable, IValidatableObject - { - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - [JsonConverter(typeof(StringEnumConverter))] - public enum ChannelEnum - { - /// - /// Enum IOS for value: iOS - /// - [EnumMember(Value = "iOS")] - IOS = 1, - - /// - /// Enum Android for value: Android - /// - [EnumMember(Value = "Android")] - Android = 2, - - /// - /// Enum Web for value: Web - /// - [EnumMember(Value = "Web")] - Web = 3 - - } - - - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - [DataMember(Name = "channel", EmitDefaultValue = false)] - public ChannelEnum? Channel { get; set; } - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorization rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorization (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorization rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorization (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorization rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorization (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorization rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorization (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DonationPaymentRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// accountInfo. - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.. - /// amount (required). - /// applicationInfo. - /// authenticationData. - /// billingAddress. - /// browserInfo. - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web. - /// Checkout attempt ID that corresponds to the Id generated by the client SDK for tracking user payment journey.. - /// Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey.. - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE. - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD. - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00. - /// deliveryAddress. - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting).. - /// Donation account to which the transaction is credited.. - /// The donation campaign ID received in the `/donationCampaigns` call.. - /// PSP reference of the transaction from which the donation token is generated. Required when `donationToken` is provided.. - /// Donation token received in the `/payments` call.. - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// merchantRiskIndicator. - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. . - /// mpiData. - /// > Required for browser-based (`channel` **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash.. - /// paymentMethod (required). - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. . - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer.. - /// Specifies the redirect method (GET or POST) when redirecting to the issuer.. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required). - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. (required). - /// The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00. - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`.. - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).. - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorization rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorization (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// The combination of a language code and a country code to specify the language to be used in the payment.. - /// shopperName. - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.. - /// The shopper's social security number.. - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication.. - /// threeDS2RequestData. - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. (default to false). - public DonationPaymentRequest(AccountInfo accountInfo = default(AccountInfo), Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), BillingAddress billingAddress = default(BillingAddress), BrowserInfo browserInfo = default(BrowserInfo), ChannelEnum? channel = default(ChannelEnum?), string checkoutAttemptId = default(string), string conversionId = default(string), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), DeliveryAddress deliveryAddress = default(DeliveryAddress), string deviceFingerprint = default(string), string donationAccount = default(string), string donationCampaignId = default(string), string donationOriginalPspReference = default(string), string donationToken = default(string), List lineItems = default(List), string merchantAccount = default(string), MerchantRiskIndicator merchantRiskIndicator = default(MerchantRiskIndicator), Dictionary metadata = default(Dictionary), ThreeDSecureData mpiData = default(ThreeDSecureData), string origin = default(string), DonationPaymentMethod paymentMethod = default(DonationPaymentMethod), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), string sessionValidity = default(string), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string socialSecurityNumber = default(string), string telephoneNumber = default(string), ThreeDS2RequestFields threeDS2RequestData = default(ThreeDS2RequestFields), bool? threeDSAuthenticationOnly = false) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.Reference = reference; - this.ReturnUrl = returnUrl; - this.AccountInfo = accountInfo; - this.AdditionalData = additionalData; - this.ApplicationInfo = applicationInfo; - this.AuthenticationData = authenticationData; - this.BillingAddress = billingAddress; - this.BrowserInfo = browserInfo; - this.Channel = channel; - this.CheckoutAttemptId = checkoutAttemptId; - this.ConversionId = conversionId; - this.CountryCode = countryCode; - this.DateOfBirth = dateOfBirth; - this.DeliverAt = deliverAt; - this.DeliveryAddress = deliveryAddress; - this.DeviceFingerprint = deviceFingerprint; - this.DonationAccount = donationAccount; - this.DonationCampaignId = donationCampaignId; - this.DonationOriginalPspReference = donationOriginalPspReference; - this.DonationToken = donationToken; - this.LineItems = lineItems; - this.MerchantRiskIndicator = merchantRiskIndicator; - this.Metadata = metadata; - this.MpiData = mpiData; - this.Origin = origin; - this.RecurringProcessingModel = recurringProcessingModel; - this.RedirectFromIssuerMethod = redirectFromIssuerMethod; - this.RedirectToIssuerMethod = redirectToIssuerMethod; - this.SessionValidity = sessionValidity; - this.ShopperEmail = shopperEmail; - this.ShopperIP = shopperIP; - this.ShopperInteraction = shopperInteraction; - this.ShopperLocale = shopperLocale; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.SocialSecurityNumber = socialSecurityNumber; - this.TelephoneNumber = telephoneNumber; - this.ThreeDS2RequestData = threeDS2RequestData; - this.ThreeDSAuthenticationOnly = threeDSAuthenticationOnly; - } - - /// - /// Gets or Sets AccountInfo - /// - [DataMember(Name = "accountInfo", EmitDefaultValue = false)] - public AccountInfo AccountInfo { get; set; } - - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets AuthenticationData - /// - [DataMember(Name = "authenticationData", EmitDefaultValue = false)] - public AuthenticationData AuthenticationData { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public BillingAddress BillingAddress { get; set; } - - /// - /// Gets or Sets BrowserInfo - /// - [DataMember(Name = "browserInfo", EmitDefaultValue = false)] - public BrowserInfo BrowserInfo { get; set; } - - /// - /// Checkout attempt ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - /// - /// Checkout attempt ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - /// - /// Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - [DataMember(Name = "conversionId", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use `checkoutAttemptId` instead")] - public string ConversionId { get; set; } - - /// - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE - /// - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - public DateTime DateOfBirth { get; set; } - - /// - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - /// - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - [DataMember(Name = "deliverAt", EmitDefaultValue = false)] - public DateTime DeliverAt { get; set; } - - /// - /// Gets or Sets DeliveryAddress - /// - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public DeliveryAddress DeliveryAddress { get; set; } - - /// - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - /// - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - [DataMember(Name = "deviceFingerprint", EmitDefaultValue = false)] - public string DeviceFingerprint { get; set; } - - /// - /// Donation account to which the transaction is credited. - /// - /// Donation account to which the transaction is credited. - [DataMember(Name = "donationAccount", EmitDefaultValue = false)] - public string DonationAccount { get; set; } - - /// - /// The donation campaign ID received in the `/donationCampaigns` call. - /// - /// The donation campaign ID received in the `/donationCampaigns` call. - [DataMember(Name = "donationCampaignId", EmitDefaultValue = false)] - public string DonationCampaignId { get; set; } - - /// - /// PSP reference of the transaction from which the donation token is generated. Required when `donationToken` is provided. - /// - /// PSP reference of the transaction from which the donation token is generated. Required when `donationToken` is provided. - [DataMember(Name = "donationOriginalPspReference", EmitDefaultValue = false)] - public string DonationOriginalPspReference { get; set; } - - /// - /// Donation token received in the `/payments` call. - /// - /// Donation token received in the `/payments` call. - [DataMember(Name = "donationToken", EmitDefaultValue = false)] - public string DonationToken { get; set; } - - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets MerchantRiskIndicator - /// - [DataMember(Name = "merchantRiskIndicator", EmitDefaultValue = false)] - public MerchantRiskIndicator MerchantRiskIndicator { get; set; } - - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets MpiData - /// - [DataMember(Name = "mpiData", EmitDefaultValue = false)] - public ThreeDSecureData MpiData { get; set; } - - /// - /// > Required for browser-based (`channel` **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash. - /// - /// > Required for browser-based (`channel` **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash. - [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } - - /// - /// Gets or Sets PaymentMethod - /// - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public DonationPaymentMethod PaymentMethod { get; set; } - - /// - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer. - /// - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer. - [DataMember(Name = "redirectFromIssuerMethod", EmitDefaultValue = false)] - public string RedirectFromIssuerMethod { get; set; } - - /// - /// Specifies the redirect method (GET or POST) when redirecting to the issuer. - /// - /// Specifies the redirect method (GET or POST) when redirecting to the issuer. - [DataMember(Name = "redirectToIssuerMethod", EmitDefaultValue = false)] - public string RedirectToIssuerMethod { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. - /// - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. - [DataMember(Name = "returnUrl", IsRequired = false, EmitDefaultValue = false)] - public string ReturnUrl { get; set; } - - /// - /// The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 - /// - /// The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 - [DataMember(Name = "sessionValidity", EmitDefaultValue = false)] - public string SessionValidity { get; set; } - - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "shopperIP", EmitDefaultValue = false)] - public string ShopperIP { get; set; } - - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Gets or Sets ThreeDS2RequestData - /// - [DataMember(Name = "threeDS2RequestData", EmitDefaultValue = false)] - public ThreeDS2RequestFields ThreeDS2RequestData { get; set; } - - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorization.Default: **false**. - [DataMember(Name = "threeDSAuthenticationOnly", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v69. Use `authenticationData.authenticationOnly` instead.")] - public bool? ThreeDSAuthenticationOnly { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DonationPaymentRequest {\n"); - sb.Append(" AccountInfo: ").Append(AccountInfo).Append("\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" AuthenticationData: ").Append(AuthenticationData).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" BrowserInfo: ").Append(BrowserInfo).Append("\n"); - sb.Append(" Channel: ").Append(Channel).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" ConversionId: ").Append(ConversionId).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DeliverAt: ").Append(DeliverAt).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" DeviceFingerprint: ").Append(DeviceFingerprint).Append("\n"); - sb.Append(" DonationAccount: ").Append(DonationAccount).Append("\n"); - sb.Append(" DonationCampaignId: ").Append(DonationCampaignId).Append("\n"); - sb.Append(" DonationOriginalPspReference: ").Append(DonationOriginalPspReference).Append("\n"); - sb.Append(" DonationToken: ").Append(DonationToken).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantRiskIndicator: ").Append(MerchantRiskIndicator).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MpiData: ").Append(MpiData).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" RedirectFromIssuerMethod: ").Append(RedirectFromIssuerMethod).Append("\n"); - sb.Append(" RedirectToIssuerMethod: ").Append(RedirectToIssuerMethod).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); - sb.Append(" SessionValidity: ").Append(SessionValidity).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" ThreeDS2RequestData: ").Append(ThreeDS2RequestData).Append("\n"); - sb.Append(" ThreeDSAuthenticationOnly: ").Append(ThreeDSAuthenticationOnly).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DonationPaymentRequest); - } - - /// - /// Returns true if DonationPaymentRequest instances are equal - /// - /// Instance of DonationPaymentRequest to be compared - /// Boolean - public bool Equals(DonationPaymentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountInfo == input.AccountInfo || - (this.AccountInfo != null && - this.AccountInfo.Equals(input.AccountInfo)) - ) && - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.AuthenticationData == input.AuthenticationData || - (this.AuthenticationData != null && - this.AuthenticationData.Equals(input.AuthenticationData)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.BrowserInfo == input.BrowserInfo || - (this.BrowserInfo != null && - this.BrowserInfo.Equals(input.BrowserInfo)) - ) && - ( - this.Channel == input.Channel || - this.Channel.Equals(input.Channel) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.ConversionId == input.ConversionId || - (this.ConversionId != null && - this.ConversionId.Equals(input.ConversionId)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DeliverAt == input.DeliverAt || - (this.DeliverAt != null && - this.DeliverAt.Equals(input.DeliverAt)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.DeviceFingerprint == input.DeviceFingerprint || - (this.DeviceFingerprint != null && - this.DeviceFingerprint.Equals(input.DeviceFingerprint)) - ) && - ( - this.DonationAccount == input.DonationAccount || - (this.DonationAccount != null && - this.DonationAccount.Equals(input.DonationAccount)) - ) && - ( - this.DonationCampaignId == input.DonationCampaignId || - (this.DonationCampaignId != null && - this.DonationCampaignId.Equals(input.DonationCampaignId)) - ) && - ( - this.DonationOriginalPspReference == input.DonationOriginalPspReference || - (this.DonationOriginalPspReference != null && - this.DonationOriginalPspReference.Equals(input.DonationOriginalPspReference)) - ) && - ( - this.DonationToken == input.DonationToken || - (this.DonationToken != null && - this.DonationToken.Equals(input.DonationToken)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantRiskIndicator == input.MerchantRiskIndicator || - (this.MerchantRiskIndicator != null && - this.MerchantRiskIndicator.Equals(input.MerchantRiskIndicator)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MpiData == input.MpiData || - (this.MpiData != null && - this.MpiData.Equals(input.MpiData)) - ) && - ( - this.Origin == input.Origin || - (this.Origin != null && - this.Origin.Equals(input.Origin)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.RedirectFromIssuerMethod == input.RedirectFromIssuerMethod || - (this.RedirectFromIssuerMethod != null && - this.RedirectFromIssuerMethod.Equals(input.RedirectFromIssuerMethod)) - ) && - ( - this.RedirectToIssuerMethod == input.RedirectToIssuerMethod || - (this.RedirectToIssuerMethod != null && - this.RedirectToIssuerMethod.Equals(input.RedirectToIssuerMethod)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ) && - ( - this.SessionValidity == input.SessionValidity || - (this.SessionValidity != null && - this.SessionValidity.Equals(input.SessionValidity)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperIP == input.ShopperIP || - (this.ShopperIP != null && - this.ShopperIP.Equals(input.ShopperIP)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.ThreeDS2RequestData == input.ThreeDS2RequestData || - (this.ThreeDS2RequestData != null && - this.ThreeDS2RequestData.Equals(input.ThreeDS2RequestData)) - ) && - ( - this.ThreeDSAuthenticationOnly == input.ThreeDSAuthenticationOnly || - this.ThreeDSAuthenticationOnly.Equals(input.ThreeDSAuthenticationOnly) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountInfo != null) - { - hashCode = (hashCode * 59) + this.AccountInfo.GetHashCode(); - } - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.AuthenticationData != null) - { - hashCode = (hashCode * 59) + this.AuthenticationData.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.BrowserInfo != null) - { - hashCode = (hashCode * 59) + this.BrowserInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.ConversionId != null) - { - hashCode = (hashCode * 59) + this.ConversionId.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DeliverAt != null) - { - hashCode = (hashCode * 59) + this.DeliverAt.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.DeviceFingerprint != null) - { - hashCode = (hashCode * 59) + this.DeviceFingerprint.GetHashCode(); - } - if (this.DonationAccount != null) - { - hashCode = (hashCode * 59) + this.DonationAccount.GetHashCode(); - } - if (this.DonationCampaignId != null) - { - hashCode = (hashCode * 59) + this.DonationCampaignId.GetHashCode(); - } - if (this.DonationOriginalPspReference != null) - { - hashCode = (hashCode * 59) + this.DonationOriginalPspReference.GetHashCode(); - } - if (this.DonationToken != null) - { - hashCode = (hashCode * 59) + this.DonationToken.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantRiskIndicator != null) - { - hashCode = (hashCode * 59) + this.MerchantRiskIndicator.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MpiData != null) - { - hashCode = (hashCode * 59) + this.MpiData.GetHashCode(); - } - if (this.Origin != null) - { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.RedirectFromIssuerMethod != null) - { - hashCode = (hashCode * 59) + this.RedirectFromIssuerMethod.GetHashCode(); - } - if (this.RedirectToIssuerMethod != null) - { - hashCode = (hashCode * 59) + this.RedirectToIssuerMethod.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - if (this.SessionValidity != null) - { - hashCode = (hashCode * 59) + this.SessionValidity.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperIP != null) - { - hashCode = (hashCode * 59) + this.ShopperIP.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.ThreeDS2RequestData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2RequestData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSAuthenticationOnly.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CountryCode (string) maxLength - if (this.CountryCode != null && this.CountryCode.Length > 100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 100.", new [] { "CountryCode" }); - } - - // DeviceFingerprint (string) maxLength - if (this.DeviceFingerprint != null && this.DeviceFingerprint.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DeviceFingerprint, length must be less than 5000.", new [] { "DeviceFingerprint" }); - } - - // Origin (string) maxLength - if (this.Origin != null && this.Origin.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, length must be less than 80.", new [] { "Origin" }); - } - - // ReturnUrl (string) maxLength - if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); - } - - // ShopperIP (string) maxLength - if (this.ShopperIP != null && this.ShopperIP.Length > 1000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperIP, length must be less than 1000.", new [] { "ShopperIP" }); - } - - // ShopperReference (string) maxLength - if (this.ShopperReference != null && this.ShopperReference.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be less than 256.", new [] { "ShopperReference" }); - } - - // ShopperReference (string) minLength - if (this.ShopperReference != null && this.ShopperReference.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DonationPaymentResponse.cs b/Adyen/Model/Checkout/DonationPaymentResponse.cs deleted file mode 100644 index 66364902b..000000000 --- a/Adyen/Model/Checkout/DonationPaymentResponse.cs +++ /dev/null @@ -1,264 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DonationPaymentResponse - /// - [DataContract(Name = "DonationPaymentResponse")] - public partial class DonationPaymentResponse : IEquatable, IValidatableObject - { - /// - /// The status of the donation transaction. Possible values: * **completed** * **pending** * **refused** - /// - /// The status of the donation transaction. Possible values: * **completed** * **pending** * **refused** - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Completed for value: completed - /// - [EnumMember(Value = "completed")] - Completed = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 3 - - } - - - /// - /// The status of the donation transaction. Possible values: * **completed** * **pending** * **refused** - /// - /// The status of the donation transaction. Possible values: * **completed** * **pending** * **refused** - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The Adyen account name of your charity. We will provide you with this account name once your chosen charity has been [onboarded](https://docs.adyen.com/online-payments/donations#onboarding).. - /// Your unique resource identifier.. - /// The merchant account identifier, with which you want to process the transaction.. - /// payment. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters.. - /// The status of the donation transaction. Possible values: * **completed** * **pending** * **refused**. - public DonationPaymentResponse(Amount amount = default(Amount), string donationAccount = default(string), string id = default(string), string merchantAccount = default(string), PaymentResponse payment = default(PaymentResponse), string reference = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.Amount = amount; - this.DonationAccount = donationAccount; - this.Id = id; - this.MerchantAccount = merchantAccount; - this.Payment = payment; - this.Reference = reference; - this.Status = status; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The Adyen account name of your charity. We will provide you with this account name once your chosen charity has been [onboarded](https://docs.adyen.com/online-payments/donations#onboarding). - /// - /// The Adyen account name of your charity. We will provide you with this account name once your chosen charity has been [onboarded](https://docs.adyen.com/online-payments/donations#onboarding). - [DataMember(Name = "donationAccount", EmitDefaultValue = false)] - public string DonationAccount { get; set; } - - /// - /// Your unique resource identifier. - /// - /// Your unique resource identifier. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets Payment - /// - [DataMember(Name = "payment", EmitDefaultValue = false)] - public PaymentResponse Payment { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DonationPaymentResponse {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" DonationAccount: ").Append(DonationAccount).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Payment: ").Append(Payment).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DonationPaymentResponse); - } - - /// - /// Returns true if DonationPaymentResponse instances are equal - /// - /// Instance of DonationPaymentResponse to be compared - /// Boolean - public bool Equals(DonationPaymentResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.DonationAccount == input.DonationAccount || - (this.DonationAccount != null && - this.DonationAccount.Equals(input.DonationAccount)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Payment == input.Payment || - (this.Payment != null && - this.Payment.Equals(input.Payment)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.DonationAccount != null) - { - hashCode = (hashCode * 59) + this.DonationAccount.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Payment != null) - { - hashCode = (hashCode * 59) + this.Payment.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/DragonpayDetails.cs b/Adyen/Model/Checkout/DragonpayDetails.cs deleted file mode 100644 index a0392b39d..000000000 --- a/Adyen/Model/Checkout/DragonpayDetails.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// DragonpayDetails - /// - [DataContract(Name = "DragonpayDetails")] - public partial class DragonpayDetails : IEquatable, IValidatableObject - { - /// - /// **dragonpay** - /// - /// **dragonpay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Ebanking for value: dragonpay_ebanking - /// - [EnumMember(Value = "dragonpay_ebanking")] - Ebanking = 1, - - /// - /// Enum OtcBanking for value: dragonpay_otc_banking - /// - [EnumMember(Value = "dragonpay_otc_banking")] - OtcBanking = 2, - - /// - /// Enum OtcNonBanking for value: dragonpay_otc_non_banking - /// - [EnumMember(Value = "dragonpay_otc_non_banking")] - OtcNonBanking = 3, - - /// - /// Enum OtcPhilippines for value: dragonpay_otc_philippines - /// - [EnumMember(Value = "dragonpay_otc_philippines")] - OtcPhilippines = 4 - - } - - - /// - /// **dragonpay** - /// - /// **dragonpay** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DragonpayDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The Dragonpay issuer value of the shopper's selected bank. Set this to an **id** of a Dragonpay issuer to preselect it. (required). - /// The shopper’s email address.. - /// **dragonpay** (required). - public DragonpayDetails(string checkoutAttemptId = default(string), string issuer = default(string), string shopperEmail = default(string), TypeEnum type = default(TypeEnum)) - { - this.Issuer = issuer; - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - this.ShopperEmail = shopperEmail; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The Dragonpay issuer value of the shopper's selected bank. Set this to an **id** of a Dragonpay issuer to preselect it. - /// - /// The Dragonpay issuer value of the shopper's selected bank. Set this to an **id** of a Dragonpay issuer to preselect it. - [DataMember(Name = "issuer", IsRequired = false, EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// The shopper’s email address. - /// - /// The shopper’s email address. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DragonpayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DragonpayDetails); - } - - /// - /// Returns true if DragonpayDetails instances are equal - /// - /// Instance of DragonpayDetails to be compared - /// Boolean - public bool Equals(DragonpayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/EBankingFinlandDetails.cs b/Adyen/Model/Checkout/EBankingFinlandDetails.cs deleted file mode 100644 index 1bd64ad57..000000000 --- a/Adyen/Model/Checkout/EBankingFinlandDetails.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// EBankingFinlandDetails - /// - [DataContract(Name = "EBankingFinlandDetails")] - public partial class EBankingFinlandDetails : IEquatable, IValidatableObject - { - /// - /// **ebanking_FI** - /// - /// **ebanking_FI** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum EbankingFI for value: ebanking_FI - /// - [EnumMember(Value = "ebanking_FI")] - EbankingFI = 1 - - } - - - /// - /// **ebanking_FI** - /// - /// **ebanking_FI** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EBankingFinlandDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The Ebanking Finland issuer value of the shopper's selected bank.. - /// **ebanking_FI** (required) (default to TypeEnum.EbankingFI). - public EBankingFinlandDetails(string checkoutAttemptId = default(string), string issuer = default(string), TypeEnum type = TypeEnum.EbankingFI) - { - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - this.Issuer = issuer; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The Ebanking Finland issuer value of the shopper's selected bank. - /// - /// The Ebanking Finland issuer value of the shopper's selected bank. - [DataMember(Name = "issuer", EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EBankingFinlandDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EBankingFinlandDetails); - } - - /// - /// Returns true if EBankingFinlandDetails instances are equal - /// - /// Instance of EBankingFinlandDetails to be compared - /// Boolean - public bool Equals(EBankingFinlandDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/EcontextVoucherDetails.cs b/Adyen/Model/Checkout/EcontextVoucherDetails.cs deleted file mode 100644 index 4365ff260..000000000 --- a/Adyen/Model/Checkout/EcontextVoucherDetails.cs +++ /dev/null @@ -1,264 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// EcontextVoucherDetails - /// - [DataContract(Name = "EcontextVoucherDetails")] - public partial class EcontextVoucherDetails : IEquatable, IValidatableObject - { - /// - /// **econtextvoucher** - /// - /// **econtextvoucher** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum EcontextSevenEleven for value: econtext_seven_eleven - /// - [EnumMember(Value = "econtext_seven_eleven")] - EcontextSevenEleven = 1, - - /// - /// Enum EcontextOnline for value: econtext_online - /// - [EnumMember(Value = "econtext_online")] - EcontextOnline = 2, - - /// - /// Enum Econtext for value: econtext - /// - [EnumMember(Value = "econtext")] - Econtext = 3, - - /// - /// Enum EcontextStores for value: econtext_stores - /// - [EnumMember(Value = "econtext_stores")] - EcontextStores = 4, - - /// - /// Enum EcontextAtm for value: econtext_atm - /// - [EnumMember(Value = "econtext_atm")] - EcontextAtm = 5 - - } - - - /// - /// **econtextvoucher** - /// - /// **econtextvoucher** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EcontextVoucherDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The shopper's first name. (required). - /// The shopper's last name. (required). - /// The shopper's email. (required). - /// The shopper's contact number. It must have an international number format, for example **+31 20 779 1846**. Formats like **+31 (0)20 779 1846** or **0031 20 779 1846** are not accepted. (required). - /// **econtextvoucher** (required). - public EcontextVoucherDetails(string checkoutAttemptId = default(string), string firstName = default(string), string lastName = default(string), string shopperEmail = default(string), string telephoneNumber = default(string), TypeEnum type = default(TypeEnum)) - { - this.FirstName = firstName; - this.LastName = lastName; - this.ShopperEmail = shopperEmail; - this.TelephoneNumber = telephoneNumber; - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The shopper's first name. - /// - /// The shopper's first name. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The shopper's last name. - /// - /// The shopper's last name. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// The shopper's email. - /// - /// The shopper's email. - [DataMember(Name = "shopperEmail", IsRequired = false, EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The shopper's contact number. It must have an international number format, for example **+31 20 779 1846**. Formats like **+31 (0)20 779 1846** or **0031 20 779 1846** are not accepted. - /// - /// The shopper's contact number. It must have an international number format, for example **+31 20 779 1846**. Formats like **+31 (0)20 779 1846** or **0031 20 779 1846** are not accepted. - [DataMember(Name = "telephoneNumber", IsRequired = false, EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EcontextVoucherDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EcontextVoucherDetails); - } - - /// - /// Returns true if EcontextVoucherDetails instances are equal - /// - /// Instance of EcontextVoucherDetails to be compared - /// Boolean - public bool Equals(EcontextVoucherDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/EftDetails.cs b/Adyen/Model/Checkout/EftDetails.cs deleted file mode 100644 index 326b7600f..000000000 --- a/Adyen/Model/Checkout/EftDetails.cs +++ /dev/null @@ -1,280 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// EftDetails - /// - [DataContract(Name = "EftDetails")] - public partial class EftDetails : IEquatable, IValidatableObject - { - /// - /// **eft** - /// - /// **eft** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum EftDirectdebitCA for value: eft_directdebit_CA - /// - [EnumMember(Value = "eft_directdebit_CA")] - EftDirectdebitCA = 1 - - } - - - /// - /// **eft** - /// - /// **eft** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators).. - /// The financial institution code.. - /// The bank routing number of the account.. - /// The checkout attempt identifier.. - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **eft** (default to TypeEnum.EftDirectdebitCA). - public EftDetails(string bankAccountNumber = default(string), string bankCode = default(string), string bankLocationId = default(string), string checkoutAttemptId = default(string), string ownerName = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.EftDirectdebitCA) - { - this.BankAccountNumber = bankAccountNumber; - this.BankCode = bankCode; - this.BankLocationId = bankLocationId; - this.CheckoutAttemptId = checkoutAttemptId; - this.OwnerName = ownerName; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The bank account number (without separators). - /// - /// The bank account number (without separators). - [DataMember(Name = "bankAccountNumber", EmitDefaultValue = false)] - public string BankAccountNumber { get; set; } - - /// - /// The financial institution code. - /// - /// The financial institution code. - [DataMember(Name = "bankCode", EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// The bank routing number of the account. - /// - /// The bank routing number of the account. - [DataMember(Name = "bankLocationId", EmitDefaultValue = false)] - public string BankLocationId { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EftDetails {\n"); - sb.Append(" BankAccountNumber: ").Append(BankAccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" BankLocationId: ").Append(BankLocationId).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EftDetails); - } - - /// - /// Returns true if EftDetails instances are equal - /// - /// Instance of EftDetails to be compared - /// Boolean - public bool Equals(EftDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccountNumber == input.BankAccountNumber || - (this.BankAccountNumber != null && - this.BankAccountNumber.Equals(input.BankAccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.BankLocationId == input.BankLocationId || - (this.BankLocationId != null && - this.BankLocationId.Equals(input.BankLocationId)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccountNumber != null) - { - hashCode = (hashCode * 59) + this.BankAccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - if (this.BankLocationId != null) - { - hashCode = (hashCode * 59) + this.BankLocationId.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/EncryptedOrderData.cs b/Adyen/Model/Checkout/EncryptedOrderData.cs deleted file mode 100644 index 0f73d11a0..000000000 --- a/Adyen/Model/Checkout/EncryptedOrderData.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// EncryptedOrderData - /// - [DataContract(Name = "EncryptedOrderData")] - public partial class EncryptedOrderData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EncryptedOrderData() { } - /// - /// Initializes a new instance of the class. - /// - /// The encrypted order data. (required). - /// The `pspReference` that belongs to the order. (required). - public EncryptedOrderData(string orderData = default(string), string pspReference = default(string)) - { - this.OrderData = orderData; - this.PspReference = pspReference; - } - - /// - /// The encrypted order data. - /// - /// The encrypted order data. - [DataMember(Name = "orderData", IsRequired = false, EmitDefaultValue = false)] - public string OrderData { get; set; } - - /// - /// The `pspReference` that belongs to the order. - /// - /// The `pspReference` that belongs to the order. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EncryptedOrderData {\n"); - sb.Append(" OrderData: ").Append(OrderData).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EncryptedOrderData); - } - - /// - /// Returns true if EncryptedOrderData instances are equal - /// - /// Instance of EncryptedOrderData to be compared - /// Boolean - public bool Equals(EncryptedOrderData input) - { - if (input == null) - { - return false; - } - return - ( - this.OrderData == input.OrderData || - (this.OrderData != null && - this.OrderData.Equals(input.OrderData)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OrderData != null) - { - hashCode = (hashCode * 59) + this.OrderData.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // OrderData (string) maxLength - if (this.OrderData != null && this.OrderData.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for OrderData, length must be less than 5000.", new [] { "OrderData" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/EnhancedSchemeData.cs b/Adyen/Model/Checkout/EnhancedSchemeData.cs deleted file mode 100644 index 9a272d4c1..000000000 --- a/Adyen/Model/Checkout/EnhancedSchemeData.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// EnhancedSchemeData - /// - [DataContract(Name = "EnhancedSchemeData")] - public partial class EnhancedSchemeData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// airline. - public EnhancedSchemeData(Airline airline = default(Airline)) - { - this.Airline = airline; - } - - /// - /// Gets or Sets Airline - /// - [DataMember(Name = "airline", EmitDefaultValue = false)] - public Airline Airline { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EnhancedSchemeData {\n"); - sb.Append(" Airline: ").Append(Airline).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnhancedSchemeData); - } - - /// - /// Returns true if EnhancedSchemeData instances are equal - /// - /// Instance of EnhancedSchemeData to be compared - /// Boolean - public bool Equals(EnhancedSchemeData input) - { - if (input == null) - { - return false; - } - return - ( - this.Airline == input.Airline || - (this.Airline != null && - this.Airline.Equals(input.Airline)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Airline != null) - { - hashCode = (hashCode * 59) + this.Airline.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ExternalPlatform.cs b/Adyen/Model/Checkout/ExternalPlatform.cs deleted file mode 100644 index 755539a78..000000000 --- a/Adyen/Model/Checkout/ExternalPlatform.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ExternalPlatform - /// - [DataContract(Name = "ExternalPlatform")] - public partial class ExternalPlatform : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// External platform integrator.. - /// Name of the field. For example, Name of External Platform.. - /// Version of the field. For example, Version of External Platform.. - public ExternalPlatform(string integrator = default(string), string name = default(string), string version = default(string)) - { - this.Integrator = integrator; - this.Name = name; - this.Version = version; - } - - /// - /// External platform integrator. - /// - /// External platform integrator. - [DataMember(Name = "integrator", EmitDefaultValue = false)] - public string Integrator { get; set; } - - /// - /// Name of the field. For example, Name of External Platform. - /// - /// Name of the field. For example, Name of External Platform. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Version of the field. For example, Version of External Platform. - /// - /// Version of the field. For example, Version of External Platform. - [DataMember(Name = "version", EmitDefaultValue = false)] - public string Version { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ExternalPlatform {\n"); - sb.Append(" Integrator: ").Append(Integrator).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ExternalPlatform); - } - - /// - /// Returns true if ExternalPlatform instances are equal - /// - /// Instance of ExternalPlatform to be compared - /// Boolean - public bool Equals(ExternalPlatform input) - { - if (input == null) - { - return false; - } - return - ( - this.Integrator == input.Integrator || - (this.Integrator != null && - this.Integrator.Equals(input.Integrator)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Version == input.Version || - (this.Version != null && - this.Version.Equals(input.Version)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Integrator != null) - { - hashCode = (hashCode * 59) + this.Integrator.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Version != null) - { - hashCode = (hashCode * 59) + this.Version.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/FastlaneDetails.cs b/Adyen/Model/Checkout/FastlaneDetails.cs deleted file mode 100644 index 4eb2cce34..000000000 --- a/Adyen/Model/Checkout/FastlaneDetails.cs +++ /dev/null @@ -1,228 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// FastlaneDetails - /// - [DataContract(Name = "FastlaneDetails")] - public partial class FastlaneDetails : IEquatable, IValidatableObject - { - /// - /// **fastlane** - /// - /// **fastlane** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Fastlane for value: fastlane - /// - [EnumMember(Value = "fastlane")] - Fastlane = 1 - - } - - - /// - /// **fastlane** - /// - /// **fastlane** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FastlaneDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The encoded fastlane data blob (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **fastlane** (required) (default to TypeEnum.Fastlane). - public FastlaneDetails(string checkoutAttemptId = default(string), string fastlaneData = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = TypeEnum.Fastlane) - { - this.FastlaneData = fastlaneData; - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The encoded fastlane data blob - /// - /// The encoded fastlane data blob - [DataMember(Name = "fastlaneData", IsRequired = false, EmitDefaultValue = false)] - public string FastlaneData { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FastlaneDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FastlaneData: ").Append(FastlaneData).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FastlaneDetails); - } - - /// - /// Returns true if FastlaneDetails instances are equal - /// - /// Instance of FastlaneDetails to be compared - /// Boolean - public bool Equals(FastlaneDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FastlaneData == input.FastlaneData || - (this.FastlaneData != null && - this.FastlaneData.Equals(input.FastlaneData)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.FastlaneData != null) - { - hashCode = (hashCode * 59) + this.FastlaneData.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ForexQuote.cs b/Adyen/Model/Checkout/ForexQuote.cs deleted file mode 100644 index 67180acfc..000000000 --- a/Adyen/Model/Checkout/ForexQuote.cs +++ /dev/null @@ -1,335 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ForexQuote - /// - [DataContract(Name = "ForexQuote")] - public partial class ForexQuote : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ForexQuote() { } - /// - /// Initializes a new instance of the class. - /// - /// The account name.. - /// The account type.. - /// baseAmount. - /// The base points. (required). - /// buy. - /// interbank. - /// The reference assigned to the forex quote request.. - /// sell. - /// The signature to validate the integrity.. - /// The source of the forex quote.. - /// The type of forex.. - /// The date until which the forex quote is valid. (required). - public ForexQuote(string account = default(string), string accountType = default(string), Amount baseAmount = default(Amount), int? basePoints = default(int?), Amount buy = default(Amount), Amount interbank = default(Amount), string reference = default(string), Amount sell = default(Amount), string signature = default(string), string source = default(string), string type = default(string), DateTime validTill = default(DateTime)) - { - this.BasePoints = basePoints; - this.ValidTill = validTill; - this.Account = account; - this.AccountType = accountType; - this.BaseAmount = baseAmount; - this.Buy = buy; - this.Interbank = interbank; - this.Reference = reference; - this.Sell = sell; - this.Signature = signature; - this.Source = source; - this.Type = type; - } - - /// - /// The account name. - /// - /// The account name. - [DataMember(Name = "account", EmitDefaultValue = false)] - public string Account { get; set; } - - /// - /// The account type. - /// - /// The account type. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public string AccountType { get; set; } - - /// - /// Gets or Sets BaseAmount - /// - [DataMember(Name = "baseAmount", EmitDefaultValue = false)] - public Amount BaseAmount { get; set; } - - /// - /// The base points. - /// - /// The base points. - [DataMember(Name = "basePoints", IsRequired = false, EmitDefaultValue = false)] - public int? BasePoints { get; set; } - - /// - /// Gets or Sets Buy - /// - [DataMember(Name = "buy", EmitDefaultValue = false)] - public Amount Buy { get; set; } - - /// - /// Gets or Sets Interbank - /// - [DataMember(Name = "interbank", EmitDefaultValue = false)] - public Amount Interbank { get; set; } - - /// - /// The reference assigned to the forex quote request. - /// - /// The reference assigned to the forex quote request. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets Sell - /// - [DataMember(Name = "sell", EmitDefaultValue = false)] - public Amount Sell { get; set; } - - /// - /// The signature to validate the integrity. - /// - /// The signature to validate the integrity. - [DataMember(Name = "signature", EmitDefaultValue = false)] - public string Signature { get; set; } - - /// - /// The source of the forex quote. - /// - /// The source of the forex quote. - [DataMember(Name = "source", EmitDefaultValue = false)] - public string Source { get; set; } - - /// - /// The type of forex. - /// - /// The type of forex. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// The date until which the forex quote is valid. - /// - /// The date until which the forex quote is valid. - [DataMember(Name = "validTill", IsRequired = false, EmitDefaultValue = false)] - public DateTime ValidTill { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ForexQuote {\n"); - sb.Append(" Account: ").Append(Account).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" BaseAmount: ").Append(BaseAmount).Append("\n"); - sb.Append(" BasePoints: ").Append(BasePoints).Append("\n"); - sb.Append(" Buy: ").Append(Buy).Append("\n"); - sb.Append(" Interbank: ").Append(Interbank).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Sell: ").Append(Sell).Append("\n"); - sb.Append(" Signature: ").Append(Signature).Append("\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" ValidTill: ").Append(ValidTill).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ForexQuote); - } - - /// - /// Returns true if ForexQuote instances are equal - /// - /// Instance of ForexQuote to be compared - /// Boolean - public bool Equals(ForexQuote input) - { - if (input == null) - { - return false; - } - return - ( - this.Account == input.Account || - (this.Account != null && - this.Account.Equals(input.Account)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.BaseAmount == input.BaseAmount || - (this.BaseAmount != null && - this.BaseAmount.Equals(input.BaseAmount)) - ) && - ( - this.BasePoints == input.BasePoints || - this.BasePoints.Equals(input.BasePoints) - ) && - ( - this.Buy == input.Buy || - (this.Buy != null && - this.Buy.Equals(input.Buy)) - ) && - ( - this.Interbank == input.Interbank || - (this.Interbank != null && - this.Interbank.Equals(input.Interbank)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Sell == input.Sell || - (this.Sell != null && - this.Sell.Equals(input.Sell)) - ) && - ( - this.Signature == input.Signature || - (this.Signature != null && - this.Signature.Equals(input.Signature)) - ) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.ValidTill == input.ValidTill || - (this.ValidTill != null && - this.ValidTill.Equals(input.ValidTill)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Account != null) - { - hashCode = (hashCode * 59) + this.Account.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.BaseAmount != null) - { - hashCode = (hashCode * 59) + this.BaseAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.BasePoints.GetHashCode(); - if (this.Buy != null) - { - hashCode = (hashCode * 59) + this.Buy.GetHashCode(); - } - if (this.Interbank != null) - { - hashCode = (hashCode * 59) + this.Interbank.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Sell != null) - { - hashCode = (hashCode * 59) + this.Sell.GetHashCode(); - } - if (this.Signature != null) - { - hashCode = (hashCode * 59) + this.Signature.GetHashCode(); - } - if (this.Source != null) - { - hashCode = (hashCode * 59) + this.Source.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.ValidTill != null) - { - hashCode = (hashCode * 59) + this.ValidTill.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/FraudCheckResult.cs b/Adyen/Model/Checkout/FraudCheckResult.cs deleted file mode 100644 index 74901ba76..000000000 --- a/Adyen/Model/Checkout/FraudCheckResult.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// FraudCheckResult - /// - [DataContract(Name = "FraudCheckResult")] - public partial class FraudCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FraudCheckResult() { } - /// - /// Initializes a new instance of the class. - /// - /// The fraud score generated by the risk check. (required). - /// The ID of the risk check. (required). - /// The name of the risk check. (required). - public FraudCheckResult(int? accountScore = default(int?), int? checkId = default(int?), string name = default(string)) - { - this.AccountScore = accountScore; - this.CheckId = checkId; - this.Name = name; - } - - /// - /// The fraud score generated by the risk check. - /// - /// The fraud score generated by the risk check. - [DataMember(Name = "accountScore", IsRequired = false, EmitDefaultValue = false)] - public int? AccountScore { get; set; } - - /// - /// The ID of the risk check. - /// - /// The ID of the risk check. - [DataMember(Name = "checkId", IsRequired = false, EmitDefaultValue = false)] - public int? CheckId { get; set; } - - /// - /// The name of the risk check. - /// - /// The name of the risk check. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FraudCheckResult {\n"); - sb.Append(" AccountScore: ").Append(AccountScore).Append("\n"); - sb.Append(" CheckId: ").Append(CheckId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FraudCheckResult); - } - - /// - /// Returns true if FraudCheckResult instances are equal - /// - /// Instance of FraudCheckResult to be compared - /// Boolean - public bool Equals(FraudCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountScore == input.AccountScore || - this.AccountScore.Equals(input.AccountScore) - ) && - ( - this.CheckId == input.CheckId || - this.CheckId.Equals(input.CheckId) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountScore.GetHashCode(); - hashCode = (hashCode * 59) + this.CheckId.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/FraudResult.cs b/Adyen/Model/Checkout/FraudResult.cs deleted file mode 100644 index bc85adb54..000000000 --- a/Adyen/Model/Checkout/FraudResult.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// FraudResult - /// - [DataContract(Name = "FraudResult")] - public partial class FraudResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FraudResult() { } - /// - /// Initializes a new instance of the class. - /// - /// The total fraud score generated by the risk checks. (required). - /// The result of the individual risk checks.. - public FraudResult(int? accountScore = default(int?), List results = default(List)) - { - this.AccountScore = accountScore; - this.Results = results; - } - - /// - /// The total fraud score generated by the risk checks. - /// - /// The total fraud score generated by the risk checks. - [DataMember(Name = "accountScore", IsRequired = false, EmitDefaultValue = false)] - public int? AccountScore { get; set; } - - /// - /// The result of the individual risk checks. - /// - /// The result of the individual risk checks. - [DataMember(Name = "results", EmitDefaultValue = false)] - public List Results { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FraudResult {\n"); - sb.Append(" AccountScore: ").Append(AccountScore).Append("\n"); - sb.Append(" Results: ").Append(Results).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FraudResult); - } - - /// - /// Returns true if FraudResult instances are equal - /// - /// Instance of FraudResult to be compared - /// Boolean - public bool Equals(FraudResult input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountScore == input.AccountScore || - this.AccountScore.Equals(input.AccountScore) - ) && - ( - this.Results == input.Results || - this.Results != null && - input.Results != null && - this.Results.SequenceEqual(input.Results) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountScore.GetHashCode(); - if (this.Results != null) - { - hashCode = (hashCode * 59) + this.Results.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/FundOrigin.cs b/Adyen/Model/Checkout/FundOrigin.cs deleted file mode 100644 index a21b41e7b..000000000 --- a/Adyen/Model/Checkout/FundOrigin.cs +++ /dev/null @@ -1,203 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// FundOrigin - /// - [DataContract(Name = "FundOrigin")] - public partial class FundOrigin : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// billingAddress. - /// The email address of the person funding the money.. - /// shopperName. - /// The phone number of the person funding the money.. - /// The unique identifier of the wallet where the funds are coming from.. - public FundOrigin(Address billingAddress = default(Address), string shopperEmail = default(string), Name shopperName = default(Name), string telephoneNumber = default(string), string walletIdentifier = default(string)) - { - this.BillingAddress = billingAddress; - this.ShopperEmail = shopperEmail; - this.ShopperName = shopperName; - this.TelephoneNumber = telephoneNumber; - this.WalletIdentifier = walletIdentifier; - } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// The email address of the person funding the money. - /// - /// The email address of the person funding the money. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// The phone number of the person funding the money. - /// - /// The phone number of the person funding the money. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// The unique identifier of the wallet where the funds are coming from. - /// - /// The unique identifier of the wallet where the funds are coming from. - [DataMember(Name = "walletIdentifier", EmitDefaultValue = false)] - public string WalletIdentifier { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FundOrigin {\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" WalletIdentifier: ").Append(WalletIdentifier).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FundOrigin); - } - - /// - /// Returns true if FundOrigin instances are equal - /// - /// Instance of FundOrigin to be compared - /// Boolean - public bool Equals(FundOrigin input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.WalletIdentifier == input.WalletIdentifier || - (this.WalletIdentifier != null && - this.WalletIdentifier.Equals(input.WalletIdentifier)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.WalletIdentifier != null) - { - hashCode = (hashCode * 59) + this.WalletIdentifier.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/FundRecipient.cs b/Adyen/Model/Checkout/FundRecipient.cs deleted file mode 100644 index eb14fa2e7..000000000 --- a/Adyen/Model/Checkout/FundRecipient.cs +++ /dev/null @@ -1,387 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// FundRecipient - /// - [DataContract(Name = "FundRecipient")] - public partial class FundRecipient : IEquatable, IValidatableObject - { - /// - /// The purpose of a digital wallet transaction. - /// - /// The purpose of a digital wallet transaction. - [JsonConverter(typeof(StringEnumConverter))] - public enum WalletPurposeEnum - { - /// - /// Enum IdentifiedBoleto for value: identifiedBoleto - /// - [EnumMember(Value = "identifiedBoleto")] - IdentifiedBoleto = 1, - - /// - /// Enum TransferDifferentWallet for value: transferDifferentWallet - /// - [EnumMember(Value = "transferDifferentWallet")] - TransferDifferentWallet = 2, - - /// - /// Enum TransferOwnWallet for value: transferOwnWallet - /// - [EnumMember(Value = "transferOwnWallet")] - TransferOwnWallet = 3, - - /// - /// Enum TransferSameWallet for value: transferSameWallet - /// - [EnumMember(Value = "transferSameWallet")] - TransferSameWallet = 4, - - /// - /// Enum UnidentifiedBoleto for value: unidentifiedBoleto - /// - [EnumMember(Value = "unidentifiedBoleto")] - UnidentifiedBoleto = 5 - - } - - - /// - /// The purpose of a digital wallet transaction. - /// - /// The purpose of a digital wallet transaction. - [DataMember(Name = "walletPurpose", EmitDefaultValue = false)] - public WalletPurposeEnum? WalletPurpose { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The IBAN of the bank account where the funds are being transferred to.. - /// billingAddress. - /// paymentMethod. - /// The email address of the shopper.. - /// shopperName. - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// subMerchant. - /// The telephone number of the shopper.. - /// The unique identifier for the wallet the funds are being transferred to. You can use the shopper reference or any other identifier.. - /// The tax identifier of the person receiving the funds.. - /// The purpose of a digital wallet transaction.. - public FundRecipient(string iBAN = default(string), Address billingAddress = default(Address), CardDetails paymentMethod = default(CardDetails), string shopperEmail = default(string), Name shopperName = default(Name), string shopperReference = default(string), string storedPaymentMethodId = default(string), SubMerchant subMerchant = default(SubMerchant), string telephoneNumber = default(string), string walletIdentifier = default(string), string walletOwnerTaxId = default(string), WalletPurposeEnum? walletPurpose = default(WalletPurposeEnum?)) - { - this.IBAN = iBAN; - this.BillingAddress = billingAddress; - this.PaymentMethod = paymentMethod; - this.ShopperEmail = shopperEmail; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.SubMerchant = subMerchant; - this.TelephoneNumber = telephoneNumber; - this.WalletIdentifier = walletIdentifier; - this.WalletOwnerTaxId = walletOwnerTaxId; - this.WalletPurpose = walletPurpose; - } - - /// - /// The IBAN of the bank account where the funds are being transferred to. - /// - /// The IBAN of the bank account where the funds are being transferred to. - [DataMember(Name = "IBAN", EmitDefaultValue = false)] - public string IBAN { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// Gets or Sets PaymentMethod - /// - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public CardDetails PaymentMethod { get; set; } - - /// - /// The email address of the shopper. - /// - /// The email address of the shopper. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Gets or Sets SubMerchant - /// - [DataMember(Name = "subMerchant", EmitDefaultValue = false)] - public SubMerchant SubMerchant { get; set; } - - /// - /// The telephone number of the shopper. - /// - /// The telephone number of the shopper. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// The unique identifier for the wallet the funds are being transferred to. You can use the shopper reference or any other identifier. - /// - /// The unique identifier for the wallet the funds are being transferred to. You can use the shopper reference or any other identifier. - [DataMember(Name = "walletIdentifier", EmitDefaultValue = false)] - public string WalletIdentifier { get; set; } - - /// - /// The tax identifier of the person receiving the funds. - /// - /// The tax identifier of the person receiving the funds. - [DataMember(Name = "walletOwnerTaxId", EmitDefaultValue = false)] - public string WalletOwnerTaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FundRecipient {\n"); - sb.Append(" IBAN: ").Append(IBAN).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" SubMerchant: ").Append(SubMerchant).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" WalletIdentifier: ").Append(WalletIdentifier).Append("\n"); - sb.Append(" WalletOwnerTaxId: ").Append(WalletOwnerTaxId).Append("\n"); - sb.Append(" WalletPurpose: ").Append(WalletPurpose).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FundRecipient); - } - - /// - /// Returns true if FundRecipient instances are equal - /// - /// Instance of FundRecipient to be compared - /// Boolean - public bool Equals(FundRecipient input) - { - if (input == null) - { - return false; - } - return - ( - this.IBAN == input.IBAN || - (this.IBAN != null && - this.IBAN.Equals(input.IBAN)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.SubMerchant == input.SubMerchant || - (this.SubMerchant != null && - this.SubMerchant.Equals(input.SubMerchant)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.WalletIdentifier == input.WalletIdentifier || - (this.WalletIdentifier != null && - this.WalletIdentifier.Equals(input.WalletIdentifier)) - ) && - ( - this.WalletOwnerTaxId == input.WalletOwnerTaxId || - (this.WalletOwnerTaxId != null && - this.WalletOwnerTaxId.Equals(input.WalletOwnerTaxId)) - ) && - ( - this.WalletPurpose == input.WalletPurpose || - this.WalletPurpose.Equals(input.WalletPurpose) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IBAN != null) - { - hashCode = (hashCode * 59) + this.IBAN.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.SubMerchant != null) - { - hashCode = (hashCode * 59) + this.SubMerchant.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.WalletIdentifier != null) - { - hashCode = (hashCode * 59) + this.WalletIdentifier.GetHashCode(); - } - if (this.WalletOwnerTaxId != null) - { - hashCode = (hashCode * 59) + this.WalletOwnerTaxId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.WalletPurpose.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ShopperReference (string) maxLength - if (this.ShopperReference != null && this.ShopperReference.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be less than 256.", new [] { "ShopperReference" }); - } - - // ShopperReference (string) minLength - if (this.ShopperReference != null && this.ShopperReference.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.cs b/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.cs deleted file mode 100644 index 1723bfce3..000000000 --- a/Adyen/Model/Checkout/GenericIssuerPaymentMethodDetails.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// GenericIssuerPaymentMethodDetails - /// - [DataContract(Name = "GenericIssuerPaymentMethodDetails")] - public partial class GenericIssuerPaymentMethodDetails : IEquatable, IValidatableObject - { - /// - /// **genericissuer** - /// - /// **genericissuer** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum OnlineBankingPL for value: onlineBanking_PL - /// - [EnumMember(Value = "onlineBanking_PL")] - OnlineBankingPL = 1, - - /// - /// Enum Eps for value: eps - /// - [EnumMember(Value = "eps")] - Eps = 2, - - /// - /// Enum OnlineBankingSK for value: onlineBanking_SK - /// - [EnumMember(Value = "onlineBanking_SK")] - OnlineBankingSK = 3, - - /// - /// Enum OnlineBankingCZ for value: onlineBanking_CZ - /// - [EnumMember(Value = "onlineBanking_CZ")] - OnlineBankingCZ = 4 - - } - - - /// - /// **genericissuer** - /// - /// **genericissuer** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GenericIssuerPaymentMethodDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The issuer id of the shopper's selected bank. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **genericissuer** (required). - public GenericIssuerPaymentMethodDetails(string checkoutAttemptId = default(string), string issuer = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = default(TypeEnum)) - { - this.Issuer = issuer; - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The issuer id of the shopper's selected bank. - /// - /// The issuer id of the shopper's selected bank. - [DataMember(Name = "issuer", IsRequired = false, EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GenericIssuerPaymentMethodDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GenericIssuerPaymentMethodDetails); - } - - /// - /// Returns true if GenericIssuerPaymentMethodDetails instances are equal - /// - /// Instance of GenericIssuerPaymentMethodDetails to be compared - /// Boolean - public bool Equals(GenericIssuerPaymentMethodDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/GooglePayDetails.cs b/Adyen/Model/Checkout/GooglePayDetails.cs deleted file mode 100644 index ece11396a..000000000 --- a/Adyen/Model/Checkout/GooglePayDetails.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// GooglePayDetails - /// - [DataContract(Name = "GooglePayDetails")] - public partial class GooglePayDetails : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **googlepay**, **paywithgoogle** - /// - /// **googlepay**, **paywithgoogle** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Googlepay for value: googlepay - /// - [EnumMember(Value = "googlepay")] - Googlepay = 1 - - } - - - /// - /// **googlepay**, **paywithgoogle** - /// - /// **googlepay**, **paywithgoogle** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GooglePayDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// The selected payment card network. . - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.. - /// **googlepay**, **paywithgoogle** (default to TypeEnum.Googlepay). - public GooglePayDetails(string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string googlePayCardNetwork = default(string), string googlePayToken = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Googlepay) - { - this.GooglePayToken = googlePayToken; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.GooglePayCardNetwork = googlePayCardNetwork; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.ThreeDS2SdkVersion = threeDS2SdkVersion; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The selected payment card network. - /// - /// The selected payment card network. - [DataMember(Name = "googlePayCardNetwork", EmitDefaultValue = false)] - public string GooglePayCardNetwork { get; set; } - - /// - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - /// - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - [DataMember(Name = "googlePayToken", IsRequired = false, EmitDefaultValue = false)] - public string GooglePayToken { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - [DataMember(Name = "threeDS2SdkVersion", EmitDefaultValue = false)] - public string ThreeDS2SdkVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GooglePayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" GooglePayCardNetwork: ").Append(GooglePayCardNetwork).Append("\n"); - sb.Append(" GooglePayToken: ").Append(GooglePayToken).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" ThreeDS2SdkVersion: ").Append(ThreeDS2SdkVersion).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GooglePayDetails); - } - - /// - /// Returns true if GooglePayDetails instances are equal - /// - /// Instance of GooglePayDetails to be compared - /// Boolean - public bool Equals(GooglePayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.GooglePayCardNetwork == input.GooglePayCardNetwork || - (this.GooglePayCardNetwork != null && - this.GooglePayCardNetwork.Equals(input.GooglePayCardNetwork)) - ) && - ( - this.GooglePayToken == input.GooglePayToken || - (this.GooglePayToken != null && - this.GooglePayToken.Equals(input.GooglePayToken)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.ThreeDS2SdkVersion == input.ThreeDS2SdkVersion || - (this.ThreeDS2SdkVersion != null && - this.ThreeDS2SdkVersion.Equals(input.ThreeDS2SdkVersion)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.GooglePayCardNetwork != null) - { - hashCode = (hashCode * 59) + this.GooglePayCardNetwork.GetHashCode(); - } - if (this.GooglePayToken != null) - { - hashCode = (hashCode * 59) + this.GooglePayToken.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.ThreeDS2SdkVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2SdkVersion.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // GooglePayToken (string) maxLength - if (this.GooglePayToken != null && this.GooglePayToken.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GooglePayToken, length must be less than 10000.", new [] { "GooglePayToken" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - // ThreeDS2SdkVersion (string) maxLength - if (this.ThreeDS2SdkVersion != null && this.ThreeDS2SdkVersion.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDS2SdkVersion, length must be less than 12.", new [] { "ThreeDS2SdkVersion" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/GooglePayDonations.cs b/Adyen/Model/Checkout/GooglePayDonations.cs deleted file mode 100644 index 610475245..000000000 --- a/Adyen/Model/Checkout/GooglePayDonations.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// GooglePayDonations - /// - [DataContract(Name = "GooglePayDonations")] - public partial class GooglePayDonations : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **googlepay**, **paywithgoogle** - /// - /// **googlepay**, **paywithgoogle** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Googlepay for value: googlepay - /// - [EnumMember(Value = "googlepay")] - Googlepay = 1 - - } - - - /// - /// **googlepay**, **paywithgoogle** - /// - /// **googlepay**, **paywithgoogle** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GooglePayDonations() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// The selected payment card network. . - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.. - /// **googlepay**, **paywithgoogle** (default to TypeEnum.Googlepay). - public GooglePayDonations(string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string googlePayCardNetwork = default(string), string googlePayToken = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Googlepay) - { - this.GooglePayToken = googlePayToken; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.GooglePayCardNetwork = googlePayCardNetwork; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.ThreeDS2SdkVersion = threeDS2SdkVersion; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The selected payment card network. - /// - /// The selected payment card network. - [DataMember(Name = "googlePayCardNetwork", EmitDefaultValue = false)] - public string GooglePayCardNetwork { get; set; } - - /// - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - /// - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - [DataMember(Name = "googlePayToken", IsRequired = false, EmitDefaultValue = false)] - public string GooglePayToken { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - [DataMember(Name = "threeDS2SdkVersion", EmitDefaultValue = false)] - public string ThreeDS2SdkVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GooglePayDonations {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" GooglePayCardNetwork: ").Append(GooglePayCardNetwork).Append("\n"); - sb.Append(" GooglePayToken: ").Append(GooglePayToken).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" ThreeDS2SdkVersion: ").Append(ThreeDS2SdkVersion).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GooglePayDonations); - } - - /// - /// Returns true if GooglePayDonations instances are equal - /// - /// Instance of GooglePayDonations to be compared - /// Boolean - public bool Equals(GooglePayDonations input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.GooglePayCardNetwork == input.GooglePayCardNetwork || - (this.GooglePayCardNetwork != null && - this.GooglePayCardNetwork.Equals(input.GooglePayCardNetwork)) - ) && - ( - this.GooglePayToken == input.GooglePayToken || - (this.GooglePayToken != null && - this.GooglePayToken.Equals(input.GooglePayToken)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.ThreeDS2SdkVersion == input.ThreeDS2SdkVersion || - (this.ThreeDS2SdkVersion != null && - this.ThreeDS2SdkVersion.Equals(input.ThreeDS2SdkVersion)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.GooglePayCardNetwork != null) - { - hashCode = (hashCode * 59) + this.GooglePayCardNetwork.GetHashCode(); - } - if (this.GooglePayToken != null) - { - hashCode = (hashCode * 59) + this.GooglePayToken.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.ThreeDS2SdkVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2SdkVersion.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // GooglePayToken (string) maxLength - if (this.GooglePayToken != null && this.GooglePayToken.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GooglePayToken, length must be less than 10000.", new [] { "GooglePayToken" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - // ThreeDS2SdkVersion (string) maxLength - if (this.ThreeDS2SdkVersion != null && this.ThreeDS2SdkVersion.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDS2SdkVersion, length must be less than 12.", new [] { "ThreeDS2SdkVersion" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/IdealDetails.cs b/Adyen/Model/Checkout/IdealDetails.cs deleted file mode 100644 index 5468a7ffd..000000000 --- a/Adyen/Model/Checkout/IdealDetails.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// IdealDetails - /// - [DataContract(Name = "IdealDetails")] - public partial class IdealDetails : IEquatable, IValidatableObject - { - /// - /// **ideal** - /// - /// **ideal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Ideal for value: ideal - /// - [EnumMember(Value = "ideal")] - Ideal = 1 - - } - - - /// - /// **ideal** - /// - /// **ideal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **ideal** (default to TypeEnum.Ideal). - public IdealDetails(string checkoutAttemptId = default(string), string issuer = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Ideal) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.Issuer = issuer; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. - /// - /// The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. - [DataMember(Name = "issuer", EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IdealDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IdealDetails); - } - - /// - /// Returns true if IdealDetails instances are equal - /// - /// Instance of IdealDetails to be compared - /// Boolean - public bool Equals(IdealDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/IdealDonations.cs b/Adyen/Model/Checkout/IdealDonations.cs deleted file mode 100644 index 421a40fa4..000000000 --- a/Adyen/Model/Checkout/IdealDonations.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// IdealDonations - /// - [DataContract(Name = "IdealDonations")] - public partial class IdealDonations : IEquatable, IValidatableObject - { - /// - /// **ideal** - /// - /// **ideal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Ideal for value: ideal - /// - [EnumMember(Value = "ideal")] - Ideal = 1 - - } - - - /// - /// **ideal** - /// - /// **ideal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **ideal** (default to TypeEnum.Ideal). - public IdealDonations(string checkoutAttemptId = default(string), string issuer = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Ideal) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.Issuer = issuer; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. - /// - /// The iDEAL issuer value of the shopper's selected bank. Set this to an **id** of an iDEAL issuer to preselect it. - [DataMember(Name = "issuer", EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IdealDonations {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IdealDonations); - } - - /// - /// Returns true if IdealDonations instances are equal - /// - /// Instance of IdealDonations to be compared - /// Boolean - public bool Equals(IdealDonations input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/InputDetail.cs b/Adyen/Model/Checkout/InputDetail.cs deleted file mode 100644 index 5d3c25f0a..000000000 --- a/Adyen/Model/Checkout/InputDetail.cs +++ /dev/null @@ -1,282 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// InputDetail - /// - [DataContract(Name = "InputDetail")] - public partial class InputDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Configuration parameters for the required input.. - /// Input details can also be provided recursively.. - /// Input details can also be provided recursively (deprecated).. - /// In case of a select, the URL from which to query the items.. - /// In case of a select, the items to choose from.. - /// The value to provide in the result.. - /// True if this input value is optional.. - /// The type of the required input.. - /// The value can be pre-filled, if available.. - public InputDetail(Dictionary configuration = default(Dictionary), List details = default(List), List inputDetails = default(List), string itemSearchUrl = default(string), List items = default(List), string key = default(string), bool? optional = default(bool?), string type = default(string), string value = default(string)) - { - this._Configuration = configuration; - this.Details = details; - this.InputDetails = inputDetails; - this.ItemSearchUrl = itemSearchUrl; - this.Items = items; - this.Key = key; - this.Optional = optional; - this.Type = type; - this.Value = value; - } - - /// - /// Configuration parameters for the required input. - /// - /// Configuration parameters for the required input. - [DataMember(Name = "configuration", EmitDefaultValue = false)] - public Dictionary _Configuration { get; set; } - - /// - /// Input details can also be provided recursively. - /// - /// Input details can also be provided recursively. - [DataMember(Name = "details", EmitDefaultValue = false)] - public List Details { get; set; } - - /// - /// Input details can also be provided recursively (deprecated). - /// - /// Input details can also be provided recursively (deprecated). - [DataMember(Name = "inputDetails", EmitDefaultValue = false)] - [Obsolete("")] - public List InputDetails { get; set; } - - /// - /// In case of a select, the URL from which to query the items. - /// - /// In case of a select, the URL from which to query the items. - [DataMember(Name = "itemSearchUrl", EmitDefaultValue = false)] - public string ItemSearchUrl { get; set; } - - /// - /// In case of a select, the items to choose from. - /// - /// In case of a select, the items to choose from. - [DataMember(Name = "items", EmitDefaultValue = false)] - public List Items { get; set; } - - /// - /// The value to provide in the result. - /// - /// The value to provide in the result. - [DataMember(Name = "key", EmitDefaultValue = false)] - public string Key { get; set; } - - /// - /// True if this input value is optional. - /// - /// True if this input value is optional. - [DataMember(Name = "optional", EmitDefaultValue = false)] - public bool? Optional { get; set; } - - /// - /// The type of the required input. - /// - /// The type of the required input. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// The value can be pre-filled, if available. - /// - /// The value can be pre-filled, if available. - [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InputDetail {\n"); - sb.Append(" _Configuration: ").Append(_Configuration).Append("\n"); - sb.Append(" Details: ").Append(Details).Append("\n"); - sb.Append(" InputDetails: ").Append(InputDetails).Append("\n"); - sb.Append(" ItemSearchUrl: ").Append(ItemSearchUrl).Append("\n"); - sb.Append(" Items: ").Append(Items).Append("\n"); - sb.Append(" Key: ").Append(Key).Append("\n"); - sb.Append(" Optional: ").Append(Optional).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InputDetail); - } - - /// - /// Returns true if InputDetail instances are equal - /// - /// Instance of InputDetail to be compared - /// Boolean - public bool Equals(InputDetail input) - { - if (input == null) - { - return false; - } - return - ( - this._Configuration == input._Configuration || - this._Configuration != null && - input._Configuration != null && - this._Configuration.SequenceEqual(input._Configuration) - ) && - ( - this.Details == input.Details || - this.Details != null && - input.Details != null && - this.Details.SequenceEqual(input.Details) - ) && - ( - this.InputDetails == input.InputDetails || - this.InputDetails != null && - input.InputDetails != null && - this.InputDetails.SequenceEqual(input.InputDetails) - ) && - ( - this.ItemSearchUrl == input.ItemSearchUrl || - (this.ItemSearchUrl != null && - this.ItemSearchUrl.Equals(input.ItemSearchUrl)) - ) && - ( - this.Items == input.Items || - this.Items != null && - input.Items != null && - this.Items.SequenceEqual(input.Items) - ) && - ( - this.Key == input.Key || - (this.Key != null && - this.Key.Equals(input.Key)) - ) && - ( - this.Optional == input.Optional || - this.Optional.Equals(input.Optional) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Configuration != null) - { - hashCode = (hashCode * 59) + this._Configuration.GetHashCode(); - } - if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } - if (this.InputDetails != null) - { - hashCode = (hashCode * 59) + this.InputDetails.GetHashCode(); - } - if (this.ItemSearchUrl != null) - { - hashCode = (hashCode * 59) + this.ItemSearchUrl.GetHashCode(); - } - if (this.Items != null) - { - hashCode = (hashCode * 59) + this.Items.GetHashCode(); - } - if (this.Key != null) - { - hashCode = (hashCode * 59) + this.Key.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Optional.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/InstallmentOption.cs b/Adyen/Model/Checkout/InstallmentOption.cs deleted file mode 100644 index e3fbf4b0b..000000000 --- a/Adyen/Model/Checkout/InstallmentOption.cs +++ /dev/null @@ -1,244 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// InstallmentOption - /// - [DataContract(Name = "InstallmentOption")] - public partial class InstallmentOption : IEquatable, IValidatableObject - { - /// - /// Defines Plans - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PlansEnum - { - /// - /// Enum Bonus for value: bonus - /// - [EnumMember(Value = "bonus")] - Bonus = 1, - - /// - /// Enum BuynowPaylater for value: buynow_paylater - /// - [EnumMember(Value = "buynow_paylater")] - BuynowPaylater = 2, - - /// - /// Enum InteresRefundPrctg for value: interes_refund_prctg - /// - [EnumMember(Value = "interes_refund_prctg")] - InteresRefundPrctg = 3, - - /// - /// Enum InterestBonus for value: interest_bonus - /// - [EnumMember(Value = "interest_bonus")] - InterestBonus = 4, - - /// - /// Enum NointeresRefundPrctg for value: nointeres_refund_prctg - /// - [EnumMember(Value = "nointeres_refund_prctg")] - NointeresRefundPrctg = 5, - - /// - /// Enum NointerestBonus for value: nointerest_bonus - /// - [EnumMember(Value = "nointerest_bonus")] - NointerestBonus = 6, - - /// - /// Enum RefundPrctg for value: refund_prctg - /// - [EnumMember(Value = "refund_prctg")] - RefundPrctg = 7, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 8, - - /// - /// Enum Revolving for value: revolving - /// - [EnumMember(Value = "revolving")] - Revolving = 9, - - /// - /// Enum WithInterest for value: with_interest - /// - [EnumMember(Value = "with_interest")] - WithInterest = 10 - - } - - - - /// - /// Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving** - /// - /// Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving** - [DataMember(Name = "plans", EmitDefaultValue = false)] - public List Plans { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The maximum number of installments offered for this payment method.. - /// Defines the type of installment plan. If not set, defaults to **regular**. Possible values: * **regular** * **revolving**. - /// Preselected number of installments offered for this payment method.. - /// An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`.. - public InstallmentOption(int? maxValue = default(int?), List plans = default(List), int? preselectedValue = default(int?), List values = default(List)) - { - this.MaxValue = maxValue; - this.Plans = plans; - this.PreselectedValue = preselectedValue; - this.Values = values; - } - - /// - /// The maximum number of installments offered for this payment method. - /// - /// The maximum number of installments offered for this payment method. - [DataMember(Name = "maxValue", EmitDefaultValue = false)] - public int? MaxValue { get; set; } - - /// - /// Preselected number of installments offered for this payment method. - /// - /// Preselected number of installments offered for this payment method. - [DataMember(Name = "preselectedValue", EmitDefaultValue = false)] - public int? PreselectedValue { get; set; } - - /// - /// An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`. - /// - /// An array of the number of installments that the shopper can choose from. For example, **[2,3,5]**. This cannot be specified simultaneously with `maxValue`. - [DataMember(Name = "values", EmitDefaultValue = false)] - public List Values { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InstallmentOption {\n"); - sb.Append(" MaxValue: ").Append(MaxValue).Append("\n"); - sb.Append(" Plans: ").Append(Plans).Append("\n"); - sb.Append(" PreselectedValue: ").Append(PreselectedValue).Append("\n"); - sb.Append(" Values: ").Append(Values).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InstallmentOption); - } - - /// - /// Returns true if InstallmentOption instances are equal - /// - /// Instance of InstallmentOption to be compared - /// Boolean - public bool Equals(InstallmentOption input) - { - if (input == null) - { - return false; - } - return - ( - this.MaxValue == input.MaxValue || - this.MaxValue.Equals(input.MaxValue) - ) && - ( - this.Plans == input.Plans || - this.Plans.SequenceEqual(input.Plans) - ) && - ( - this.PreselectedValue == input.PreselectedValue || - this.PreselectedValue.Equals(input.PreselectedValue) - ) && - ( - this.Values == input.Values || - this.Values != null && - input.Values != null && - this.Values.SequenceEqual(input.Values) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.MaxValue.GetHashCode(); - hashCode = (hashCode * 59) + this.Plans.GetHashCode(); - hashCode = (hashCode * 59) + this.PreselectedValue.GetHashCode(); - if (this.Values != null) - { - hashCode = (hashCode * 59) + this.Values.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Installments.cs b/Adyen/Model/Checkout/Installments.cs deleted file mode 100644 index 9d589e83c..000000000 --- a/Adyen/Model/Checkout/Installments.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Installments - /// - [DataContract(Name = "Installments")] - public partial class Installments : IEquatable, IValidatableObject - { - /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. - /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. - [JsonConverter(typeof(StringEnumConverter))] - public enum PlanEnum - { - /// - /// Enum Bonus for value: bonus - /// - [EnumMember(Value = "bonus")] - Bonus = 1, - - /// - /// Enum BuynowPaylater for value: buynow_paylater - /// - [EnumMember(Value = "buynow_paylater")] - BuynowPaylater = 2, - - /// - /// Enum InteresRefundPrctg for value: interes_refund_prctg - /// - [EnumMember(Value = "interes_refund_prctg")] - InteresRefundPrctg = 3, - - /// - /// Enum InterestBonus for value: interest_bonus - /// - [EnumMember(Value = "interest_bonus")] - InterestBonus = 4, - - /// - /// Enum NointeresRefundPrctg for value: nointeres_refund_prctg - /// - [EnumMember(Value = "nointeres_refund_prctg")] - NointeresRefundPrctg = 5, - - /// - /// Enum NointerestBonus for value: nointerest_bonus - /// - [EnumMember(Value = "nointerest_bonus")] - NointerestBonus = 6, - - /// - /// Enum RefundPrctg for value: refund_prctg - /// - [EnumMember(Value = "refund_prctg")] - RefundPrctg = 7, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 8, - - /// - /// Enum Revolving for value: revolving - /// - [EnumMember(Value = "revolving")] - Revolving = 9, - - /// - /// Enum WithInterest for value: with_interest - /// - [EnumMember(Value = "with_interest")] - WithInterest = 10 - - } - - - /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. - /// - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. - [DataMember(Name = "plan", EmitDefaultValue = false)] - public PlanEnum? Plan { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Installments() { } - /// - /// Initializes a new instance of the class. - /// - /// Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) . - /// The installment plan, used for [card installments in Japan](https://docs.adyen.com/payment-methods/cards/credit-card-installments#make-a-payment-japan). and [Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico). By default, this is set to **regular**. . - /// Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico. (required). - public Installments(int? extra = default(int?), PlanEnum? plan = default(PlanEnum?), int? value = default(int?)) - { - this.Value = value; - this.Extra = extra; - this.Plan = plan; - } - - /// - /// Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) - /// - /// Defines the bonus percentage, refund percentage or if the transaction is Buy now Pay later. Used for [card installments in Mexico](https://docs.adyen.com/payment-methods/cards/credit-card-installments/#getting-paid-mexico) - [DataMember(Name = "extra", EmitDefaultValue = false)] - public int? Extra { get; set; } - - /// - /// Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico. - /// - /// Defines the number of installments. Usually, the maximum allowed number of installments is capped. For example, it may not be possible to split a payment in more than 24 installments. The acquirer sets this upper limit, so its value may vary. This value can be zero for Installments processed in Mexico. - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public int? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Installments {\n"); - sb.Append(" Extra: ").Append(Extra).Append("\n"); - sb.Append(" Plan: ").Append(Plan).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Installments); - } - - /// - /// Returns true if Installments instances are equal - /// - /// Instance of Installments to be compared - /// Boolean - public bool Equals(Installments input) - { - if (input == null) - { - return false; - } - return - ( - this.Extra == input.Extra || - this.Extra.Equals(input.Extra) - ) && - ( - this.Plan == input.Plan || - this.Plan.Equals(input.Plan) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Extra.GetHashCode(); - hashCode = (hashCode * 59) + this.Plan.GetHashCode(); - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Item.cs b/Adyen/Model/Checkout/Item.cs deleted file mode 100644 index 5576c9b63..000000000 --- a/Adyen/Model/Checkout/Item.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Item - /// - [DataContract(Name = "Item")] - public partial class Item : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The value to provide in the result.. - /// The display name.. - public Item(string id = default(string), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// The value to provide in the result. - /// - /// The value to provide in the result. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The display name. - /// - /// The display name. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Item {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Item); - } - - /// - /// Returns true if Item instances are equal - /// - /// Instance of Item to be compared - /// Boolean - public bool Equals(Item input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/KlarnaDetails.cs b/Adyen/Model/Checkout/KlarnaDetails.cs deleted file mode 100644 index 49d130722..000000000 --- a/Adyen/Model/Checkout/KlarnaDetails.cs +++ /dev/null @@ -1,321 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// KlarnaDetails - /// - [DataContract(Name = "KlarnaDetails")] - public partial class KlarnaDetails : IEquatable, IValidatableObject - { - /// - /// **klarna** - /// - /// **klarna** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Klarna for value: klarna - /// - [EnumMember(Value = "klarna")] - Klarna = 1, - - /// - /// Enum Klarnapayments for value: klarnapayments - /// - [EnumMember(Value = "klarnapayments")] - Klarnapayments = 2, - - /// - /// Enum KlarnapaymentsAccount for value: klarnapayments_account - /// - [EnumMember(Value = "klarnapayments_account")] - KlarnapaymentsAccount = 3, - - /// - /// Enum KlarnapaymentsB2b for value: klarnapayments_b2b - /// - [EnumMember(Value = "klarnapayments_b2b")] - KlarnapaymentsB2b = 4, - - /// - /// Enum KlarnaPaynow for value: klarna_paynow - /// - [EnumMember(Value = "klarna_paynow")] - KlarnaPaynow = 5, - - /// - /// Enum KlarnaAccount for value: klarna_account - /// - [EnumMember(Value = "klarna_account")] - KlarnaAccount = 6, - - /// - /// Enum KlarnaB2b for value: klarna_b2b - /// - [EnumMember(Value = "klarna_b2b")] - KlarnaB2b = 7 - - } - - - /// - /// **klarna** - /// - /// **klarna** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected KlarnaDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The address where to send the invoice.. - /// The checkout attempt identifier.. - /// The address where the goods should be delivered.. - /// Shopper name, date of birth, phone number, and email address.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The type of flow to initiate.. - /// **klarna** (required) (default to TypeEnum.Klarna). - public KlarnaDetails(string billingAddress = default(string), string checkoutAttemptId = default(string), string deliveryAddress = default(string), string personalDetails = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string subtype = default(string), TypeEnum type = TypeEnum.Klarna) - { - this.Type = type; - this.BillingAddress = billingAddress; - this.CheckoutAttemptId = checkoutAttemptId; - this.DeliveryAddress = deliveryAddress; - this.PersonalDetails = personalDetails; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Subtype = subtype; - } - - /// - /// The address where to send the invoice. - /// - /// The address where to send the invoice. - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public string BillingAddress { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The address where the goods should be delivered. - /// - /// The address where the goods should be delivered. - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public string DeliveryAddress { get; set; } - - /// - /// Shopper name, date of birth, phone number, and email address. - /// - /// Shopper name, date of birth, phone number, and email address. - [DataMember(Name = "personalDetails", EmitDefaultValue = false)] - public string PersonalDetails { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The type of flow to initiate. - /// - /// The type of flow to initiate. - [DataMember(Name = "subtype", EmitDefaultValue = false)] - public string Subtype { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KlarnaDetails {\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" PersonalDetails: ").Append(PersonalDetails).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Subtype: ").Append(Subtype).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KlarnaDetails); - } - - /// - /// Returns true if KlarnaDetails instances are equal - /// - /// Instance of KlarnaDetails to be compared - /// Boolean - public bool Equals(KlarnaDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.PersonalDetails == input.PersonalDetails || - (this.PersonalDetails != null && - this.PersonalDetails.Equals(input.PersonalDetails)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Subtype == input.Subtype || - (this.Subtype != null && - this.Subtype.Equals(input.Subtype)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.PersonalDetails != null) - { - hashCode = (hashCode * 59) + this.PersonalDetails.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.Subtype != null) - { - hashCode = (hashCode * 59) + this.Subtype.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Leg.cs b/Adyen/Model/Checkout/Leg.cs deleted file mode 100644 index 72aa82eca..000000000 --- a/Adyen/Model/Checkout/Leg.cs +++ /dev/null @@ -1,277 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Leg - /// - [DataContract(Name = "Leg")] - public partial class Leg : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not start with a space or be all spaces. * Must not be all zeros.. - /// Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use local time of departure airport. * minLength: 16 characters * maxLength: 16 characters. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros.. - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character. - public Leg(string carrierCode = default(string), string classOfTravel = default(string), DateTime dateOfTravel = default(DateTime), string departureAirportCode = default(string), long? departureTax = default(long?), string destinationAirportCode = default(string), string fareBasisCode = default(string), string flightNumber = default(string), string stopOverCode = default(string)) - { - this.CarrierCode = carrierCode; - this.ClassOfTravel = classOfTravel; - this.DateOfTravel = dateOfTravel; - this.DepartureAirportCode = departureAirportCode; - this.DepartureTax = departureTax; - this.DestinationAirportCode = destinationAirportCode; - this.FareBasisCode = fareBasisCode; - this.FlightNumber = flightNumber; - this.StopOverCode = stopOverCode; - } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 2-letter accounting code (PAX) that identifies the carrier. This field is required if the airline data includes leg details. * Example: KLM = KL * minLength: 2 characters * maxLength: 2 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "carrierCode", EmitDefaultValue = false)] - public string CarrierCode { get; set; } - - /// - /// A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// A one-letter travel class identifier. The following are common: * F: first class * J: business class * Y: economy class * W: premium economy * Encoding: ASCII * minLength: 1 character * maxLength: 1 character * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "classOfTravel", EmitDefaultValue = false)] - public string ClassOfTravel { get; set; } - - /// - /// Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use local time of departure airport. * minLength: 16 characters * maxLength: 16 characters - /// - /// Date and time of travel in format `yyyy-MM-ddTHH:mm`. * Use local time of departure airport. * minLength: 16 characters * maxLength: 16 characters - [DataMember(Name = "dateOfTravel", EmitDefaultValue = false)] - public DateTime DateOfTravel { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) three-letter airport code of the departure airport. This field is required if the airline data includes leg details. * Encoding: ASCII * Example: Amsterdam = AMS * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "departureAirportCode", EmitDefaultValue = false)] - public string DepartureAirportCode { get; set; } - - /// - /// The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros. - /// - /// The amount of [departure tax](https://en.wikipedia.org/wiki/Departure_tax) charged, in [minor units](https://docs.adyen.com/development-resources/currency-codes). * Encoding: Numeric * minLength: 1 * maxLength: 11 * Must not be all zeros. - [DataMember(Name = "departureTax", EmitDefaultValue = false)] - public long? DepartureTax { get; set; } - - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The [IATA](https://www.iata.org/services/pages/codes.aspx) 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. * Example: Amsterdam = AMS * Encoding: ASCII * minLength: 3 characters * maxLength: 3 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "destinationAirportCode", EmitDefaultValue = false)] - public string DestinationAirportCode { get; set; } - - /// - /// The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The [fare basis code](https://en.wikipedia.org/wiki/Fare_basis_code), alphanumeric. * minLength: 1 character * maxLength: 6 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "fareBasisCode", EmitDefaultValue = false)] - public string FareBasisCode { get; set; } - - /// - /// The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The flight identifier. * minLength: 1 character * maxLength: 5 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "flightNumber", EmitDefaultValue = false)] - public string FlightNumber { get; set; } - - /// - /// A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character - /// - /// A one-letter code that indicates whether the passenger is entitled to make a stopover. Can be a space, O if the passenger is entitled to make a stopover, or X if they are not. * Encoding: ASCII * minLength: 1 character * maxLength: 1 character - [DataMember(Name = "stopOverCode", EmitDefaultValue = false)] - public string StopOverCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Leg {\n"); - sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); - sb.Append(" ClassOfTravel: ").Append(ClassOfTravel).Append("\n"); - sb.Append(" DateOfTravel: ").Append(DateOfTravel).Append("\n"); - sb.Append(" DepartureAirportCode: ").Append(DepartureAirportCode).Append("\n"); - sb.Append(" DepartureTax: ").Append(DepartureTax).Append("\n"); - sb.Append(" DestinationAirportCode: ").Append(DestinationAirportCode).Append("\n"); - sb.Append(" FareBasisCode: ").Append(FareBasisCode).Append("\n"); - sb.Append(" FlightNumber: ").Append(FlightNumber).Append("\n"); - sb.Append(" StopOverCode: ").Append(StopOverCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Leg); - } - - /// - /// Returns true if Leg instances are equal - /// - /// Instance of Leg to be compared - /// Boolean - public bool Equals(Leg input) - { - if (input == null) - { - return false; - } - return - ( - this.CarrierCode == input.CarrierCode || - (this.CarrierCode != null && - this.CarrierCode.Equals(input.CarrierCode)) - ) && - ( - this.ClassOfTravel == input.ClassOfTravel || - (this.ClassOfTravel != null && - this.ClassOfTravel.Equals(input.ClassOfTravel)) - ) && - ( - this.DateOfTravel == input.DateOfTravel || - (this.DateOfTravel != null && - this.DateOfTravel.Equals(input.DateOfTravel)) - ) && - ( - this.DepartureAirportCode == input.DepartureAirportCode || - (this.DepartureAirportCode != null && - this.DepartureAirportCode.Equals(input.DepartureAirportCode)) - ) && - ( - this.DepartureTax == input.DepartureTax || - this.DepartureTax.Equals(input.DepartureTax) - ) && - ( - this.DestinationAirportCode == input.DestinationAirportCode || - (this.DestinationAirportCode != null && - this.DestinationAirportCode.Equals(input.DestinationAirportCode)) - ) && - ( - this.FareBasisCode == input.FareBasisCode || - (this.FareBasisCode != null && - this.FareBasisCode.Equals(input.FareBasisCode)) - ) && - ( - this.FlightNumber == input.FlightNumber || - (this.FlightNumber != null && - this.FlightNumber.Equals(input.FlightNumber)) - ) && - ( - this.StopOverCode == input.StopOverCode || - (this.StopOverCode != null && - this.StopOverCode.Equals(input.StopOverCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CarrierCode != null) - { - hashCode = (hashCode * 59) + this.CarrierCode.GetHashCode(); - } - if (this.ClassOfTravel != null) - { - hashCode = (hashCode * 59) + this.ClassOfTravel.GetHashCode(); - } - if (this.DateOfTravel != null) - { - hashCode = (hashCode * 59) + this.DateOfTravel.GetHashCode(); - } - if (this.DepartureAirportCode != null) - { - hashCode = (hashCode * 59) + this.DepartureAirportCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DepartureTax.GetHashCode(); - if (this.DestinationAirportCode != null) - { - hashCode = (hashCode * 59) + this.DestinationAirportCode.GetHashCode(); - } - if (this.FareBasisCode != null) - { - hashCode = (hashCode * 59) + this.FareBasisCode.GetHashCode(); - } - if (this.FlightNumber != null) - { - hashCode = (hashCode * 59) + this.FlightNumber.GetHashCode(); - } - if (this.StopOverCode != null) - { - hashCode = (hashCode * 59) + this.StopOverCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/LineItem.cs b/Adyen/Model/Checkout/LineItem.cs deleted file mode 100644 index 987a173fa..000000000 --- a/Adyen/Model/Checkout/LineItem.cs +++ /dev/null @@ -1,438 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// LineItem - /// - [DataContract(Name = "LineItem")] - public partial class LineItem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Item amount excluding the tax, in minor units.. - /// Item amount including the tax, in minor units.. - /// Brand of the item.. - /// Color of the item.. - /// Description of the line item.. - /// ID of the line item.. - /// Link to the picture of the purchased item.. - /// Item category, used by the payment methods PayPal and Ratepay.. - /// Manufacturer of the item.. - /// Marketplace seller id.. - /// Link to the purchased item.. - /// Number of items.. - /// Email associated with the given product in the basket (usually in electronic gift cards).. - /// Size of the item.. - /// Stock keeping unit.. - /// Tax amount, in minor units.. - /// Tax percentage, in minor units.. - /// Universal Product Code.. - public LineItem(long? amountExcludingTax = default(long?), long? amountIncludingTax = default(long?), string brand = default(string), string color = default(string), string description = default(string), string id = default(string), string imageUrl = default(string), string itemCategory = default(string), string manufacturer = default(string), string marketplaceSellerId = default(string), string productUrl = default(string), long? quantity = default(long?), string receiverEmail = default(string), string size = default(string), string sku = default(string), long? taxAmount = default(long?), long? taxPercentage = default(long?), string upc = default(string)) - { - this.AmountExcludingTax = amountExcludingTax; - this.AmountIncludingTax = amountIncludingTax; - this.Brand = brand; - this.Color = color; - this.Description = description; - this.Id = id; - this.ImageUrl = imageUrl; - this.ItemCategory = itemCategory; - this.Manufacturer = manufacturer; - this.MarketplaceSellerId = marketplaceSellerId; - this.ProductUrl = productUrl; - this.Quantity = quantity; - this.ReceiverEmail = receiverEmail; - this.Size = size; - this.Sku = sku; - this.TaxAmount = taxAmount; - this.TaxPercentage = taxPercentage; - this.Upc = upc; - } - - /// - /// Item amount excluding the tax, in minor units. - /// - /// Item amount excluding the tax, in minor units. - [DataMember(Name = "amountExcludingTax", EmitDefaultValue = false)] - public long? AmountExcludingTax { get; set; } - - /// - /// Item amount including the tax, in minor units. - /// - /// Item amount including the tax, in minor units. - [DataMember(Name = "amountIncludingTax", EmitDefaultValue = false)] - public long? AmountIncludingTax { get; set; } - - /// - /// Brand of the item. - /// - /// Brand of the item. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// Color of the item. - /// - /// Color of the item. - [DataMember(Name = "color", EmitDefaultValue = false)] - public string Color { get; set; } - - /// - /// Description of the line item. - /// - /// Description of the line item. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// ID of the line item. - /// - /// ID of the line item. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Link to the picture of the purchased item. - /// - /// Link to the picture of the purchased item. - [DataMember(Name = "imageUrl", EmitDefaultValue = false)] - public string ImageUrl { get; set; } - - /// - /// Item category, used by the payment methods PayPal and Ratepay. - /// - /// Item category, used by the payment methods PayPal and Ratepay. - [DataMember(Name = "itemCategory", EmitDefaultValue = false)] - public string ItemCategory { get; set; } - - /// - /// Manufacturer of the item. - /// - /// Manufacturer of the item. - [DataMember(Name = "manufacturer", EmitDefaultValue = false)] - public string Manufacturer { get; set; } - - /// - /// Marketplace seller id. - /// - /// Marketplace seller id. - [DataMember(Name = "marketplaceSellerId", EmitDefaultValue = false)] - public string MarketplaceSellerId { get; set; } - - /// - /// Link to the purchased item. - /// - /// Link to the purchased item. - [DataMember(Name = "productUrl", EmitDefaultValue = false)] - public string ProductUrl { get; set; } - - /// - /// Number of items. - /// - /// Number of items. - [DataMember(Name = "quantity", EmitDefaultValue = false)] - public long? Quantity { get; set; } - - /// - /// Email associated with the given product in the basket (usually in electronic gift cards). - /// - /// Email associated with the given product in the basket (usually in electronic gift cards). - [DataMember(Name = "receiverEmail", EmitDefaultValue = false)] - public string ReceiverEmail { get; set; } - - /// - /// Size of the item. - /// - /// Size of the item. - [DataMember(Name = "size", EmitDefaultValue = false)] - public string Size { get; set; } - - /// - /// Stock keeping unit. - /// - /// Stock keeping unit. - [DataMember(Name = "sku", EmitDefaultValue = false)] - public string Sku { get; set; } - - /// - /// Tax amount, in minor units. - /// - /// Tax amount, in minor units. - [DataMember(Name = "taxAmount", EmitDefaultValue = false)] - public long? TaxAmount { get; set; } - - /// - /// Tax percentage, in minor units. - /// - /// Tax percentage, in minor units. - [DataMember(Name = "taxPercentage", EmitDefaultValue = false)] - public long? TaxPercentage { get; set; } - - /// - /// Universal Product Code. - /// - /// Universal Product Code. - [DataMember(Name = "upc", EmitDefaultValue = false)] - public string Upc { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LineItem {\n"); - sb.Append(" AmountExcludingTax: ").Append(AmountExcludingTax).Append("\n"); - sb.Append(" AmountIncludingTax: ").Append(AmountIncludingTax).Append("\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); - sb.Append(" ItemCategory: ").Append(ItemCategory).Append("\n"); - sb.Append(" Manufacturer: ").Append(Manufacturer).Append("\n"); - sb.Append(" MarketplaceSellerId: ").Append(MarketplaceSellerId).Append("\n"); - sb.Append(" ProductUrl: ").Append(ProductUrl).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ReceiverEmail: ").Append(ReceiverEmail).Append("\n"); - sb.Append(" Size: ").Append(Size).Append("\n"); - sb.Append(" Sku: ").Append(Sku).Append("\n"); - sb.Append(" TaxAmount: ").Append(TaxAmount).Append("\n"); - sb.Append(" TaxPercentage: ").Append(TaxPercentage).Append("\n"); - sb.Append(" Upc: ").Append(Upc).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LineItem); - } - - /// - /// Returns true if LineItem instances are equal - /// - /// Instance of LineItem to be compared - /// Boolean - public bool Equals(LineItem input) - { - if (input == null) - { - return false; - } - return - ( - this.AmountExcludingTax == input.AmountExcludingTax || - this.AmountExcludingTax.Equals(input.AmountExcludingTax) - ) && - ( - this.AmountIncludingTax == input.AmountIncludingTax || - this.AmountIncludingTax.Equals(input.AmountIncludingTax) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ImageUrl == input.ImageUrl || - (this.ImageUrl != null && - this.ImageUrl.Equals(input.ImageUrl)) - ) && - ( - this.ItemCategory == input.ItemCategory || - (this.ItemCategory != null && - this.ItemCategory.Equals(input.ItemCategory)) - ) && - ( - this.Manufacturer == input.Manufacturer || - (this.Manufacturer != null && - this.Manufacturer.Equals(input.Manufacturer)) - ) && - ( - this.MarketplaceSellerId == input.MarketplaceSellerId || - (this.MarketplaceSellerId != null && - this.MarketplaceSellerId.Equals(input.MarketplaceSellerId)) - ) && - ( - this.ProductUrl == input.ProductUrl || - (this.ProductUrl != null && - this.ProductUrl.Equals(input.ProductUrl)) - ) && - ( - this.Quantity == input.Quantity || - this.Quantity.Equals(input.Quantity) - ) && - ( - this.ReceiverEmail == input.ReceiverEmail || - (this.ReceiverEmail != null && - this.ReceiverEmail.Equals(input.ReceiverEmail)) - ) && - ( - this.Size == input.Size || - (this.Size != null && - this.Size.Equals(input.Size)) - ) && - ( - this.Sku == input.Sku || - (this.Sku != null && - this.Sku.Equals(input.Sku)) - ) && - ( - this.TaxAmount == input.TaxAmount || - this.TaxAmount.Equals(input.TaxAmount) - ) && - ( - this.TaxPercentage == input.TaxPercentage || - this.TaxPercentage.Equals(input.TaxPercentage) - ) && - ( - this.Upc == input.Upc || - (this.Upc != null && - this.Upc.Equals(input.Upc)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AmountExcludingTax.GetHashCode(); - hashCode = (hashCode * 59) + this.AmountIncludingTax.GetHashCode(); - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ImageUrl != null) - { - hashCode = (hashCode * 59) + this.ImageUrl.GetHashCode(); - } - if (this.ItemCategory != null) - { - hashCode = (hashCode * 59) + this.ItemCategory.GetHashCode(); - } - if (this.Manufacturer != null) - { - hashCode = (hashCode * 59) + this.Manufacturer.GetHashCode(); - } - if (this.MarketplaceSellerId != null) - { - hashCode = (hashCode * 59) + this.MarketplaceSellerId.GetHashCode(); - } - if (this.ProductUrl != null) - { - hashCode = (hashCode * 59) + this.ProductUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ReceiverEmail != null) - { - hashCode = (hashCode * 59) + this.ReceiverEmail.GetHashCode(); - } - if (this.Size != null) - { - hashCode = (hashCode * 59) + this.Size.GetHashCode(); - } - if (this.Sku != null) - { - hashCode = (hashCode * 59) + this.Sku.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TaxAmount.GetHashCode(); - hashCode = (hashCode * 59) + this.TaxPercentage.GetHashCode(); - if (this.Upc != null) - { - hashCode = (hashCode * 59) + this.Upc.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 10000.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.cs b/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.cs deleted file mode 100644 index f91f5d14d..000000000 --- a/Adyen/Model/Checkout/ListStoredPaymentMethodsResponse.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ListStoredPaymentMethodsResponse - /// - [DataContract(Name = "ListStoredPaymentMethodsResponse")] - public partial class ListStoredPaymentMethodsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Your merchant account.. - /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.. - /// List of all stored payment methods.. - public ListStoredPaymentMethodsResponse(string merchantAccount = default(string), string shopperReference = default(string), List storedPaymentMethods = default(List)) - { - this.MerchantAccount = merchantAccount; - this.ShopperReference = shopperReference; - this.StoredPaymentMethods = storedPaymentMethods; - } - - /// - /// Your merchant account. - /// - /// Your merchant account. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// List of all stored payment methods. - /// - /// List of all stored payment methods. - [DataMember(Name = "storedPaymentMethods", EmitDefaultValue = false)] - public List StoredPaymentMethods { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListStoredPaymentMethodsResponse {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" StoredPaymentMethods: ").Append(StoredPaymentMethods).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListStoredPaymentMethodsResponse); - } - - /// - /// Returns true if ListStoredPaymentMethodsResponse instances are equal - /// - /// Instance of ListStoredPaymentMethodsResponse to be compared - /// Boolean - public bool Equals(ListStoredPaymentMethodsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.StoredPaymentMethods == input.StoredPaymentMethods || - this.StoredPaymentMethods != null && - input.StoredPaymentMethods != null && - this.StoredPaymentMethods.SequenceEqual(input.StoredPaymentMethods) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.StoredPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethods.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Mandate.cs b/Adyen/Model/Checkout/Mandate.cs deleted file mode 100644 index 8a41d68e2..000000000 --- a/Adyen/Model/Checkout/Mandate.cs +++ /dev/null @@ -1,379 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Mandate - /// - [DataContract(Name = "Mandate")] - public partial class Mandate : IEquatable, IValidatableObject - { - /// - /// The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. - /// - /// The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. - [JsonConverter(typeof(StringEnumConverter))] - public enum AmountRuleEnum - { - /// - /// Enum Max for value: max - /// - [EnumMember(Value = "max")] - Max = 1, - - /// - /// Enum Exact for value: exact - /// - [EnumMember(Value = "exact")] - Exact = 2 - - } - - - /// - /// The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. - /// - /// The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. - [DataMember(Name = "amountRule", EmitDefaultValue = false)] - public AmountRuleEnum? AmountRule { get; set; } - /// - /// The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. - /// - /// The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. - [JsonConverter(typeof(StringEnumConverter))] - public enum BillingAttemptsRuleEnum - { - /// - /// Enum On for value: on - /// - [EnumMember(Value = "on")] - On = 1, - - /// - /// Enum Before for value: before - /// - [EnumMember(Value = "before")] - Before = 2, - - /// - /// Enum After for value: after - /// - [EnumMember(Value = "after")] - After = 3 - - } - - - /// - /// The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. - /// - /// The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. - [DataMember(Name = "billingAttemptsRule", EmitDefaultValue = false)] - public BillingAttemptsRuleEnum? BillingAttemptsRule { get; set; } - /// - /// The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. - /// - /// The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FrequencyEnum - { - /// - /// Enum Adhoc for value: adhoc - /// - [EnumMember(Value = "adhoc")] - Adhoc = 1, - - /// - /// Enum Daily for value: daily - /// - [EnumMember(Value = "daily")] - Daily = 2, - - /// - /// Enum Weekly for value: weekly - /// - [EnumMember(Value = "weekly")] - Weekly = 3, - - /// - /// Enum BiWeekly for value: biWeekly - /// - [EnumMember(Value = "biWeekly")] - BiWeekly = 4, - - /// - /// Enum Monthly for value: monthly - /// - [EnumMember(Value = "monthly")] - Monthly = 5, - - /// - /// Enum Quarterly for value: quarterly - /// - [EnumMember(Value = "quarterly")] - Quarterly = 6, - - /// - /// Enum HalfYearly for value: halfYearly - /// - [EnumMember(Value = "halfYearly")] - HalfYearly = 7, - - /// - /// Enum Yearly for value: yearly - /// - [EnumMember(Value = "yearly")] - Yearly = 8 - - } - - - /// - /// The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. - /// - /// The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. - [DataMember(Name = "frequency", IsRequired = false, EmitDefaultValue = false)] - public FrequencyEnum Frequency { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Mandate() { } - /// - /// Initializes a new instance of the class. - /// - /// The billing amount (in minor units) of the recurring transactions. (required). - /// The limitation rule of the billing amount. Possible values: * **max**: The transaction amount can not exceed the `amount`. * **exact**: The transaction amount should be the same as the `amount`. . - /// The rule to specify the period, within which the recurring debit can happen, relative to the mandate recurring date. Possible values: * **on**: On a specific date. * **before**: Before and on a specific date. * **after**: On and after a specific date. . - /// The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`.. - /// The number of transactions that can be performed within the given frequency.. - /// End date of the billing plan, in YYYY-MM-DD format. (required). - /// The frequency with which a shopper should be charged. Possible values: **adhoc**, **daily**, **weekly**, **biWeekly**, **monthly**, **quarterly**, **halfYearly**, **yearly**. (required). - /// The message shown by UPI to the shopper on the approval screen.. - /// Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date.. - public Mandate(string amount = default(string), AmountRuleEnum? amountRule = default(AmountRuleEnum?), BillingAttemptsRuleEnum? billingAttemptsRule = default(BillingAttemptsRuleEnum?), string billingDay = default(string), string count = default(string), string endsAt = default(string), FrequencyEnum frequency = default(FrequencyEnum), string remarks = default(string), string startsAt = default(string)) - { - this.Amount = amount; - this.EndsAt = endsAt; - this.Frequency = frequency; - this.AmountRule = amountRule; - this.BillingAttemptsRule = billingAttemptsRule; - this.BillingDay = billingDay; - this.Count = count; - this.Remarks = remarks; - this.StartsAt = startsAt; - } - - /// - /// The billing amount (in minor units) of the recurring transactions. - /// - /// The billing amount (in minor units) of the recurring transactions. - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public string Amount { get; set; } - - /// - /// The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. - /// - /// The number of the day, on which the recurring debit can happen. Should be within the same calendar month as the mandate recurring date. Possible values: 1-31 based on the `frequency`. - [DataMember(Name = "billingDay", EmitDefaultValue = false)] - public string BillingDay { get; set; } - - /// - /// The number of transactions that can be performed within the given frequency. - /// - /// The number of transactions that can be performed within the given frequency. - [DataMember(Name = "count", EmitDefaultValue = false)] - public string Count { get; set; } - - /// - /// End date of the billing plan, in YYYY-MM-DD format. - /// - /// End date of the billing plan, in YYYY-MM-DD format. - [DataMember(Name = "endsAt", IsRequired = false, EmitDefaultValue = false)] - public string EndsAt { get; set; } - - /// - /// The message shown by UPI to the shopper on the approval screen. - /// - /// The message shown by UPI to the shopper on the approval screen. - [DataMember(Name = "remarks", EmitDefaultValue = false)] - public string Remarks { get; set; } - - /// - /// Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date. - /// - /// Start date of the billing plan, in YYYY-MM-DD format. By default, the transaction date. - [DataMember(Name = "startsAt", EmitDefaultValue = false)] - public string StartsAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Mandate {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" AmountRule: ").Append(AmountRule).Append("\n"); - sb.Append(" BillingAttemptsRule: ").Append(BillingAttemptsRule).Append("\n"); - sb.Append(" BillingDay: ").Append(BillingDay).Append("\n"); - sb.Append(" Count: ").Append(Count).Append("\n"); - sb.Append(" EndsAt: ").Append(EndsAt).Append("\n"); - sb.Append(" Frequency: ").Append(Frequency).Append("\n"); - sb.Append(" Remarks: ").Append(Remarks).Append("\n"); - sb.Append(" StartsAt: ").Append(StartsAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Mandate); - } - - /// - /// Returns true if Mandate instances are equal - /// - /// Instance of Mandate to be compared - /// Boolean - public bool Equals(Mandate input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.AmountRule == input.AmountRule || - this.AmountRule.Equals(input.AmountRule) - ) && - ( - this.BillingAttemptsRule == input.BillingAttemptsRule || - this.BillingAttemptsRule.Equals(input.BillingAttemptsRule) - ) && - ( - this.BillingDay == input.BillingDay || - (this.BillingDay != null && - this.BillingDay.Equals(input.BillingDay)) - ) && - ( - this.Count == input.Count || - (this.Count != null && - this.Count.Equals(input.Count)) - ) && - ( - this.EndsAt == input.EndsAt || - (this.EndsAt != null && - this.EndsAt.Equals(input.EndsAt)) - ) && - ( - this.Frequency == input.Frequency || - this.Frequency.Equals(input.Frequency) - ) && - ( - this.Remarks == input.Remarks || - (this.Remarks != null && - this.Remarks.Equals(input.Remarks)) - ) && - ( - this.StartsAt == input.StartsAt || - (this.StartsAt != null && - this.StartsAt.Equals(input.StartsAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AmountRule.GetHashCode(); - hashCode = (hashCode * 59) + this.BillingAttemptsRule.GetHashCode(); - if (this.BillingDay != null) - { - hashCode = (hashCode * 59) + this.BillingDay.GetHashCode(); - } - if (this.Count != null) - { - hashCode = (hashCode * 59) + this.Count.GetHashCode(); - } - if (this.EndsAt != null) - { - hashCode = (hashCode * 59) + this.EndsAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Frequency.GetHashCode(); - if (this.Remarks != null) - { - hashCode = (hashCode * 59) + this.Remarks.GetHashCode(); - } - if (this.StartsAt != null) - { - hashCode = (hashCode * 59) + this.StartsAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/MasterpassDetails.cs b/Adyen/Model/Checkout/MasterpassDetails.cs deleted file mode 100644 index c78db8bd8..000000000 --- a/Adyen/Model/Checkout/MasterpassDetails.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// MasterpassDetails - /// - [DataContract(Name = "MasterpassDetails")] - public partial class MasterpassDetails : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **masterpass** - /// - /// **masterpass** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Masterpass for value: masterpass - /// - [EnumMember(Value = "masterpass")] - Masterpass = 1 - - } - - - /// - /// **masterpass** - /// - /// **masterpass** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MasterpassDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// The Masterpass transaction ID. (required). - /// **masterpass** (default to TypeEnum.Masterpass). - public MasterpassDetails(string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string masterpassTransactionId = default(string), TypeEnum? type = TypeEnum.Masterpass) - { - this.MasterpassTransactionId = masterpassTransactionId; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The Masterpass transaction ID. - /// - /// The Masterpass transaction ID. - [DataMember(Name = "masterpassTransactionId", IsRequired = false, EmitDefaultValue = false)] - public string MasterpassTransactionId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MasterpassDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" MasterpassTransactionId: ").Append(MasterpassTransactionId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MasterpassDetails); - } - - /// - /// Returns true if MasterpassDetails instances are equal - /// - /// Instance of MasterpassDetails to be compared - /// Boolean - public bool Equals(MasterpassDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.MasterpassTransactionId == input.MasterpassTransactionId || - (this.MasterpassTransactionId != null && - this.MasterpassTransactionId.Equals(input.MasterpassTransactionId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.MasterpassTransactionId != null) - { - hashCode = (hashCode * 59) + this.MasterpassTransactionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/MbwayDetails.cs b/Adyen/Model/Checkout/MbwayDetails.cs deleted file mode 100644 index 01098eacb..000000000 --- a/Adyen/Model/Checkout/MbwayDetails.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// MbwayDetails - /// - [DataContract(Name = "MbwayDetails")] - public partial class MbwayDetails : IEquatable, IValidatableObject - { - /// - /// **mbway** - /// - /// **mbway** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Mbway for value: mbway - /// - [EnumMember(Value = "mbway")] - Mbway = 1 - - } - - - /// - /// **mbway** - /// - /// **mbway** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MbwayDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// shopperEmail (required). - /// telephoneNumber (required). - /// **mbway** (default to TypeEnum.Mbway). - public MbwayDetails(string checkoutAttemptId = default(string), string shopperEmail = default(string), string telephoneNumber = default(string), TypeEnum? type = TypeEnum.Mbway) - { - this.ShopperEmail = shopperEmail; - this.TelephoneNumber = telephoneNumber; - this.CheckoutAttemptId = checkoutAttemptId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Gets or Sets ShopperEmail - /// - [DataMember(Name = "shopperEmail", IsRequired = false, EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Gets or Sets TelephoneNumber - /// - [DataMember(Name = "telephoneNumber", IsRequired = false, EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MbwayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MbwayDetails); - } - - /// - /// Returns true if MbwayDetails instances are equal - /// - /// Instance of MbwayDetails to be compared - /// Boolean - public bool Equals(MbwayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/MerchantDevice.cs b/Adyen/Model/Checkout/MerchantDevice.cs deleted file mode 100644 index 099896191..000000000 --- a/Adyen/Model/Checkout/MerchantDevice.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// MerchantDevice - /// - [DataContract(Name = "MerchantDevice")] - public partial class MerchantDevice : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Operating system running on the merchant device.. - /// Version of the operating system on the merchant device.. - /// Merchant device reference.. - public MerchantDevice(string os = default(string), string osVersion = default(string), string reference = default(string)) - { - this.Os = os; - this.OsVersion = osVersion; - this.Reference = reference; - } - - /// - /// Operating system running on the merchant device. - /// - /// Operating system running on the merchant device. - [DataMember(Name = "os", EmitDefaultValue = false)] - public string Os { get; set; } - - /// - /// Version of the operating system on the merchant device. - /// - /// Version of the operating system on the merchant device. - [DataMember(Name = "osVersion", EmitDefaultValue = false)] - public string OsVersion { get; set; } - - /// - /// Merchant device reference. - /// - /// Merchant device reference. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantDevice {\n"); - sb.Append(" Os: ").Append(Os).Append("\n"); - sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantDevice); - } - - /// - /// Returns true if MerchantDevice instances are equal - /// - /// Instance of MerchantDevice to be compared - /// Boolean - public bool Equals(MerchantDevice input) - { - if (input == null) - { - return false; - } - return - ( - this.Os == input.Os || - (this.Os != null && - this.Os.Equals(input.Os)) - ) && - ( - this.OsVersion == input.OsVersion || - (this.OsVersion != null && - this.OsVersion.Equals(input.OsVersion)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Os != null) - { - hashCode = (hashCode * 59) + this.Os.GetHashCode(); - } - if (this.OsVersion != null) - { - hashCode = (hashCode * 59) + this.OsVersion.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/MerchantRiskIndicator.cs b/Adyen/Model/Checkout/MerchantRiskIndicator.cs deleted file mode 100644 index 0c4728a09..000000000 --- a/Adyen/Model/Checkout/MerchantRiskIndicator.cs +++ /dev/null @@ -1,442 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// MerchantRiskIndicator - /// - [DataContract(Name = "MerchantRiskIndicator")] - public partial class MerchantRiskIndicator : IEquatable, IValidatableObject - { - /// - /// Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other` - /// - /// Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other` - [JsonConverter(typeof(StringEnumConverter))] - public enum DeliveryAddressIndicatorEnum - { - /// - /// Enum ShipToBillingAddress for value: shipToBillingAddress - /// - [EnumMember(Value = "shipToBillingAddress")] - ShipToBillingAddress = 1, - - /// - /// Enum ShipToVerifiedAddress for value: shipToVerifiedAddress - /// - [EnumMember(Value = "shipToVerifiedAddress")] - ShipToVerifiedAddress = 2, - - /// - /// Enum ShipToNewAddress for value: shipToNewAddress - /// - [EnumMember(Value = "shipToNewAddress")] - ShipToNewAddress = 3, - - /// - /// Enum ShipToStore for value: shipToStore - /// - [EnumMember(Value = "shipToStore")] - ShipToStore = 4, - - /// - /// Enum DigitalGoods for value: digitalGoods - /// - [EnumMember(Value = "digitalGoods")] - DigitalGoods = 5, - - /// - /// Enum GoodsNotShipped for value: goodsNotShipped - /// - [EnumMember(Value = "goodsNotShipped")] - GoodsNotShipped = 6, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 7 - - } - - - /// - /// Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other` - /// - /// Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other` - [DataMember(Name = "deliveryAddressIndicator", EmitDefaultValue = false)] - public DeliveryAddressIndicatorEnum? DeliveryAddressIndicator { get; set; } - /// - /// The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` - /// - /// The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` - [JsonConverter(typeof(StringEnumConverter))] - public enum DeliveryTimeframeEnum - { - /// - /// Enum ElectronicDelivery for value: electronicDelivery - /// - [EnumMember(Value = "electronicDelivery")] - ElectronicDelivery = 1, - - /// - /// Enum SameDayShipping for value: sameDayShipping - /// - [EnumMember(Value = "sameDayShipping")] - SameDayShipping = 2, - - /// - /// Enum OvernightShipping for value: overnightShipping - /// - [EnumMember(Value = "overnightShipping")] - OvernightShipping = 3, - - /// - /// Enum TwoOrMoreDaysShipping for value: twoOrMoreDaysShipping - /// - [EnumMember(Value = "twoOrMoreDaysShipping")] - TwoOrMoreDaysShipping = 4 - - } - - - /// - /// The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` - /// - /// The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping` - [DataMember(Name = "deliveryTimeframe", EmitDefaultValue = false)] - public DeliveryTimeframeEnum? DeliveryTimeframe { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Whether the chosen delivery address is identical to the billing address.. - /// Indicator regarding the delivery address. Allowed values: * `shipToBillingAddress` * `shipToVerifiedAddress` * `shipToNewAddress` * `shipToStore` * `digitalGoods` * `goodsNotShipped` * `other`. - /// The delivery email address (for digital goods).. - /// For Electronic delivery, the email address to which the merchandise was delivered. Maximum length: 254 characters.. - /// The estimated delivery time for the shopper to receive the goods. Allowed values: * `electronicDelivery` * `sameDayShipping` * `overnightShipping` * `twoOrMoreDaysShipping`. - /// giftCardAmount. - /// For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased.. - /// For prepaid or gift card purchase, [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) three-digit currency code of the gift card, other than those listed in Table A.5 of the EMVCo 3D Secure Protocol and Core Functions Specification.. - /// For pre-order purchases, the expected date this product will be available to the shopper.. - /// Indicator for whether this transaction is for pre-ordering a product.. - /// Indicates whether Cardholder is placing an order for merchandise with a future availability or release date.. - /// Indicator for whether the shopper has already purchased the same items in the past.. - /// Indicates whether the cardholder is reordering previously purchased merchandise.. - /// Indicates shipping method chosen for the transaction.. - public MerchantRiskIndicator(bool? addressMatch = default(bool?), DeliveryAddressIndicatorEnum? deliveryAddressIndicator = default(DeliveryAddressIndicatorEnum?), string deliveryEmail = default(string), string deliveryEmailAddress = default(string), DeliveryTimeframeEnum? deliveryTimeframe = default(DeliveryTimeframeEnum?), Amount giftCardAmount = default(Amount), int? giftCardCount = default(int?), string giftCardCurr = default(string), DateTime preOrderDate = default(DateTime), bool? preOrderPurchase = default(bool?), string preOrderPurchaseInd = default(string), bool? reorderItems = default(bool?), string reorderItemsInd = default(string), string shipIndicator = default(string)) - { - this.AddressMatch = addressMatch; - this.DeliveryAddressIndicator = deliveryAddressIndicator; - this.DeliveryEmail = deliveryEmail; - this.DeliveryEmailAddress = deliveryEmailAddress; - this.DeliveryTimeframe = deliveryTimeframe; - this.GiftCardAmount = giftCardAmount; - this.GiftCardCount = giftCardCount; - this.GiftCardCurr = giftCardCurr; - this.PreOrderDate = preOrderDate; - this.PreOrderPurchase = preOrderPurchase; - this.PreOrderPurchaseInd = preOrderPurchaseInd; - this.ReorderItems = reorderItems; - this.ReorderItemsInd = reorderItemsInd; - this.ShipIndicator = shipIndicator; - } - - /// - /// Whether the chosen delivery address is identical to the billing address. - /// - /// Whether the chosen delivery address is identical to the billing address. - [DataMember(Name = "addressMatch", EmitDefaultValue = false)] - public bool? AddressMatch { get; set; } - - /// - /// The delivery email address (for digital goods). - /// - /// The delivery email address (for digital goods). - [DataMember(Name = "deliveryEmail", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use `deliveryEmailAddress` instead.")] - public string DeliveryEmail { get; set; } - - /// - /// For Electronic delivery, the email address to which the merchandise was delivered. Maximum length: 254 characters. - /// - /// For Electronic delivery, the email address to which the merchandise was delivered. Maximum length: 254 characters. - [DataMember(Name = "deliveryEmailAddress", EmitDefaultValue = false)] - public string DeliveryEmailAddress { get; set; } - - /// - /// Gets or Sets GiftCardAmount - /// - [DataMember(Name = "giftCardAmount", EmitDefaultValue = false)] - public Amount GiftCardAmount { get; set; } - - /// - /// For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. - /// - /// For prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. - [DataMember(Name = "giftCardCount", EmitDefaultValue = false)] - public int? GiftCardCount { get; set; } - - /// - /// For prepaid or gift card purchase, [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) three-digit currency code of the gift card, other than those listed in Table A.5 of the EMVCo 3D Secure Protocol and Core Functions Specification. - /// - /// For prepaid or gift card purchase, [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) three-digit currency code of the gift card, other than those listed in Table A.5 of the EMVCo 3D Secure Protocol and Core Functions Specification. - [DataMember(Name = "giftCardCurr", EmitDefaultValue = false)] - public string GiftCardCurr { get; set; } - - /// - /// For pre-order purchases, the expected date this product will be available to the shopper. - /// - /// For pre-order purchases, the expected date this product will be available to the shopper. - [DataMember(Name = "preOrderDate", EmitDefaultValue = false)] - public DateTime PreOrderDate { get; set; } - - /// - /// Indicator for whether this transaction is for pre-ordering a product. - /// - /// Indicator for whether this transaction is for pre-ordering a product. - [DataMember(Name = "preOrderPurchase", EmitDefaultValue = false)] - public bool? PreOrderPurchase { get; set; } - - /// - /// Indicates whether Cardholder is placing an order for merchandise with a future availability or release date. - /// - /// Indicates whether Cardholder is placing an order for merchandise with a future availability or release date. - [DataMember(Name = "preOrderPurchaseInd", EmitDefaultValue = false)] - public string PreOrderPurchaseInd { get; set; } - - /// - /// Indicator for whether the shopper has already purchased the same items in the past. - /// - /// Indicator for whether the shopper has already purchased the same items in the past. - [DataMember(Name = "reorderItems", EmitDefaultValue = false)] - public bool? ReorderItems { get; set; } - - /// - /// Indicates whether the cardholder is reordering previously purchased merchandise. - /// - /// Indicates whether the cardholder is reordering previously purchased merchandise. - [DataMember(Name = "reorderItemsInd", EmitDefaultValue = false)] - public string ReorderItemsInd { get; set; } - - /// - /// Indicates shipping method chosen for the transaction. - /// - /// Indicates shipping method chosen for the transaction. - [DataMember(Name = "shipIndicator", EmitDefaultValue = false)] - public string ShipIndicator { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantRiskIndicator {\n"); - sb.Append(" AddressMatch: ").Append(AddressMatch).Append("\n"); - sb.Append(" DeliveryAddressIndicator: ").Append(DeliveryAddressIndicator).Append("\n"); - sb.Append(" DeliveryEmail: ").Append(DeliveryEmail).Append("\n"); - sb.Append(" DeliveryEmailAddress: ").Append(DeliveryEmailAddress).Append("\n"); - sb.Append(" DeliveryTimeframe: ").Append(DeliveryTimeframe).Append("\n"); - sb.Append(" GiftCardAmount: ").Append(GiftCardAmount).Append("\n"); - sb.Append(" GiftCardCount: ").Append(GiftCardCount).Append("\n"); - sb.Append(" GiftCardCurr: ").Append(GiftCardCurr).Append("\n"); - sb.Append(" PreOrderDate: ").Append(PreOrderDate).Append("\n"); - sb.Append(" PreOrderPurchase: ").Append(PreOrderPurchase).Append("\n"); - sb.Append(" PreOrderPurchaseInd: ").Append(PreOrderPurchaseInd).Append("\n"); - sb.Append(" ReorderItems: ").Append(ReorderItems).Append("\n"); - sb.Append(" ReorderItemsInd: ").Append(ReorderItemsInd).Append("\n"); - sb.Append(" ShipIndicator: ").Append(ShipIndicator).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantRiskIndicator); - } - - /// - /// Returns true if MerchantRiskIndicator instances are equal - /// - /// Instance of MerchantRiskIndicator to be compared - /// Boolean - public bool Equals(MerchantRiskIndicator input) - { - if (input == null) - { - return false; - } - return - ( - this.AddressMatch == input.AddressMatch || - this.AddressMatch.Equals(input.AddressMatch) - ) && - ( - this.DeliveryAddressIndicator == input.DeliveryAddressIndicator || - this.DeliveryAddressIndicator.Equals(input.DeliveryAddressIndicator) - ) && - ( - this.DeliveryEmail == input.DeliveryEmail || - (this.DeliveryEmail != null && - this.DeliveryEmail.Equals(input.DeliveryEmail)) - ) && - ( - this.DeliveryEmailAddress == input.DeliveryEmailAddress || - (this.DeliveryEmailAddress != null && - this.DeliveryEmailAddress.Equals(input.DeliveryEmailAddress)) - ) && - ( - this.DeliveryTimeframe == input.DeliveryTimeframe || - this.DeliveryTimeframe.Equals(input.DeliveryTimeframe) - ) && - ( - this.GiftCardAmount == input.GiftCardAmount || - (this.GiftCardAmount != null && - this.GiftCardAmount.Equals(input.GiftCardAmount)) - ) && - ( - this.GiftCardCount == input.GiftCardCount || - this.GiftCardCount.Equals(input.GiftCardCount) - ) && - ( - this.GiftCardCurr == input.GiftCardCurr || - (this.GiftCardCurr != null && - this.GiftCardCurr.Equals(input.GiftCardCurr)) - ) && - ( - this.PreOrderDate == input.PreOrderDate || - (this.PreOrderDate != null && - this.PreOrderDate.Equals(input.PreOrderDate)) - ) && - ( - this.PreOrderPurchase == input.PreOrderPurchase || - this.PreOrderPurchase.Equals(input.PreOrderPurchase) - ) && - ( - this.PreOrderPurchaseInd == input.PreOrderPurchaseInd || - (this.PreOrderPurchaseInd != null && - this.PreOrderPurchaseInd.Equals(input.PreOrderPurchaseInd)) - ) && - ( - this.ReorderItems == input.ReorderItems || - this.ReorderItems.Equals(input.ReorderItems) - ) && - ( - this.ReorderItemsInd == input.ReorderItemsInd || - (this.ReorderItemsInd != null && - this.ReorderItemsInd.Equals(input.ReorderItemsInd)) - ) && - ( - this.ShipIndicator == input.ShipIndicator || - (this.ShipIndicator != null && - this.ShipIndicator.Equals(input.ShipIndicator)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AddressMatch.GetHashCode(); - hashCode = (hashCode * 59) + this.DeliveryAddressIndicator.GetHashCode(); - if (this.DeliveryEmail != null) - { - hashCode = (hashCode * 59) + this.DeliveryEmail.GetHashCode(); - } - if (this.DeliveryEmailAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryEmailAddress.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DeliveryTimeframe.GetHashCode(); - if (this.GiftCardAmount != null) - { - hashCode = (hashCode * 59) + this.GiftCardAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.GiftCardCount.GetHashCode(); - if (this.GiftCardCurr != null) - { - hashCode = (hashCode * 59) + this.GiftCardCurr.GetHashCode(); - } - if (this.PreOrderDate != null) - { - hashCode = (hashCode * 59) + this.PreOrderDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PreOrderPurchase.GetHashCode(); - if (this.PreOrderPurchaseInd != null) - { - hashCode = (hashCode * 59) + this.PreOrderPurchaseInd.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReorderItems.GetHashCode(); - if (this.ReorderItemsInd != null) - { - hashCode = (hashCode * 59) + this.ReorderItemsInd.GetHashCode(); - } - if (this.ShipIndicator != null) - { - hashCode = (hashCode * 59) + this.ShipIndicator.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // DeliveryEmailAddress (string) maxLength - if (this.DeliveryEmailAddress != null && this.DeliveryEmailAddress.Length > 254) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DeliveryEmailAddress, length must be less than 254.", new [] { "DeliveryEmailAddress" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/MobilePayDetails.cs b/Adyen/Model/Checkout/MobilePayDetails.cs deleted file mode 100644 index 6b6e06a05..000000000 --- a/Adyen/Model/Checkout/MobilePayDetails.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// MobilePayDetails - /// - [DataContract(Name = "MobilePayDetails")] - public partial class MobilePayDetails : IEquatable, IValidatableObject - { - /// - /// **mobilepay** - /// - /// **mobilepay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Mobilepay for value: mobilepay - /// - [EnumMember(Value = "mobilepay")] - Mobilepay = 1 - - } - - - /// - /// **mobilepay** - /// - /// **mobilepay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// **mobilepay** (default to TypeEnum.Mobilepay). - public MobilePayDetails(string checkoutAttemptId = default(string), TypeEnum? type = TypeEnum.Mobilepay) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MobilePayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MobilePayDetails); - } - - /// - /// Returns true if MobilePayDetails instances are equal - /// - /// Instance of MobilePayDetails to be compared - /// Boolean - public bool Equals(MobilePayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/MolPayDetails.cs b/Adyen/Model/Checkout/MolPayDetails.cs deleted file mode 100644 index e6b7f6a2d..000000000 --- a/Adyen/Model/Checkout/MolPayDetails.cs +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// MolPayDetails - /// - [DataContract(Name = "MolPayDetails")] - public partial class MolPayDetails : IEquatable, IValidatableObject - { - /// - /// **molpay** - /// - /// **molpay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum FpxMY for value: molpay_ebanking_fpx_MY - /// - [EnumMember(Value = "molpay_ebanking_fpx_MY")] - FpxMY = 1, - - /// - /// Enum TH for value: molpay_ebanking_TH - /// - [EnumMember(Value = "molpay_ebanking_TH")] - TH = 2 - - } - - - /// - /// **molpay** - /// - /// **molpay** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MolPayDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The shopper's bank. Specify this with the issuer value that corresponds to this bank. (required). - /// **molpay** (required). - public MolPayDetails(string checkoutAttemptId = default(string), string issuer = default(string), TypeEnum type = default(TypeEnum)) - { - this.Issuer = issuer; - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The shopper's bank. Specify this with the issuer value that corresponds to this bank. - /// - /// The shopper's bank. Specify this with the issuer value that corresponds to this bank. - [DataMember(Name = "issuer", IsRequired = false, EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MolPayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MolPayDetails); - } - - /// - /// Returns true if MolPayDetails instances are equal - /// - /// Instance of MolPayDetails to be compared - /// Boolean - public bool Equals(MolPayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Name.cs b/Adyen/Model/Checkout/Name.cs deleted file mode 100644 index 0839df0a6..000000000 --- a/Adyen/Model/Checkout/Name.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Name - /// - [DataContract(Name = "Name")] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// The first name. (required). - /// The last name. (required). - public Name(string firstName = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/OpenInvoiceDetails.cs b/Adyen/Model/Checkout/OpenInvoiceDetails.cs deleted file mode 100644 index 18a35115f..000000000 --- a/Adyen/Model/Checkout/OpenInvoiceDetails.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// OpenInvoiceDetails - /// - [DataContract(Name = "OpenInvoiceDetails")] - public partial class OpenInvoiceDetails : IEquatable, IValidatableObject - { - /// - /// **openinvoice** - /// - /// **openinvoice** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Openinvoice for value: openinvoice - /// - [EnumMember(Value = "openinvoice")] - Openinvoice = 1, - - /// - /// Enum AfterpayDirectdebit for value: afterpay_directdebit - /// - [EnumMember(Value = "afterpay_directdebit")] - AfterpayDirectdebit = 2, - - /// - /// Enum AtomePos for value: atome_pos - /// - [EnumMember(Value = "atome_pos")] - AtomePos = 3 - - } - - - /// - /// **openinvoice** - /// - /// **openinvoice** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The address where to send the invoice.. - /// The checkout attempt identifier.. - /// The address where the goods should be delivered.. - /// Shopper name, date of birth, phone number, and email address.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **openinvoice** (default to TypeEnum.Openinvoice). - public OpenInvoiceDetails(string billingAddress = default(string), string checkoutAttemptId = default(string), string deliveryAddress = default(string), string personalDetails = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Openinvoice) - { - this.BillingAddress = billingAddress; - this.CheckoutAttemptId = checkoutAttemptId; - this.DeliveryAddress = deliveryAddress; - this.PersonalDetails = personalDetails; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The address where to send the invoice. - /// - /// The address where to send the invoice. - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public string BillingAddress { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The address where the goods should be delivered. - /// - /// The address where the goods should be delivered. - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public string DeliveryAddress { get; set; } - - /// - /// Shopper name, date of birth, phone number, and email address. - /// - /// Shopper name, date of birth, phone number, and email address. - [DataMember(Name = "personalDetails", EmitDefaultValue = false)] - public string PersonalDetails { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OpenInvoiceDetails {\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" PersonalDetails: ").Append(PersonalDetails).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OpenInvoiceDetails); - } - - /// - /// Returns true if OpenInvoiceDetails instances are equal - /// - /// Instance of OpenInvoiceDetails to be compared - /// Boolean - public bool Equals(OpenInvoiceDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.PersonalDetails == input.PersonalDetails || - (this.PersonalDetails != null && - this.PersonalDetails.Equals(input.PersonalDetails)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.PersonalDetails != null) - { - hashCode = (hashCode * 59) + this.PersonalDetails.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Passenger.cs b/Adyen/Model/Checkout/Passenger.cs deleted file mode 100644 index 63cc593c3..000000000 --- a/Adyen/Model/Checkout/Passenger.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Passenger - /// - [DataContract(Name = "Passenger")] - public partial class Passenger : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10. - /// The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII. - /// The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII. - /// The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters. - /// The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters. - public Passenger(DateTime dateOfBirth = default(DateTime), string firstName = default(string), string lastName = default(string), string phoneNumber = default(string), string travellerType = default(string)) - { - this.DateOfBirth = dateOfBirth; - this.FirstName = firstName; - this.LastName = lastName; - this.PhoneNumber = phoneNumber; - this.TravellerType = travellerType; - } - - /// - /// The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10 - /// - /// The passenger's date of birth. * Format `yyyy-MM-dd` * minLength: 10 * maxLength: 10 - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII - /// - /// The passenger's first name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII - /// - /// The passenger's last name. > This field is required if the airline data includes passenger details or leg details. * Encoding: ASCII - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters - /// - /// The passenger's phone number, including country code. This is an alphanumeric field that can include the '+' and '-' signs. * Encoding: ASCII * minLength: 3 characters * maxLength: 30 characters - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters - /// - /// The IATA passenger type code (PTC). * Encoding: ASCII * minLength: 3 characters * maxLength: 6 characters - [DataMember(Name = "travellerType", EmitDefaultValue = false)] - public string TravellerType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Passenger {\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" TravellerType: ").Append(TravellerType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Passenger); - } - - /// - /// Returns true if Passenger instances are equal - /// - /// Instance of Passenger to be compared - /// Boolean - public bool Equals(Passenger input) - { - if (input == null) - { - return false; - } - return - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.TravellerType == input.TravellerType || - (this.TravellerType != null && - this.TravellerType.Equals(input.TravellerType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.TravellerType != null) - { - hashCode = (hashCode * 59) + this.TravellerType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.cs b/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.cs deleted file mode 100644 index 4daaccd99..000000000 --- a/Adyen/Model/Checkout/PayByBankAISDirectDebitDetails.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PayByBankAISDirectDebitDetails - /// - [DataContract(Name = "PayByBankAISDirectDebitDetails")] - public partial class PayByBankAISDirectDebitDetails : IEquatable, IValidatableObject - { - /// - /// **paybybank_AIS_DD** - /// - /// **paybybank_AIS_DD** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PaybybankAISDD for value: paybybank_AIS_DD - /// - [EnumMember(Value = "paybybank_AIS_DD")] - PaybybankAISDD = 1 - - } - - - /// - /// **paybybank_AIS_DD** - /// - /// **paybybank_AIS_DD** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayByBankAISDirectDebitDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **paybybank_AIS_DD** (required) (default to TypeEnum.PaybybankAISDD). - public PayByBankAISDirectDebitDetails(string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = TypeEnum.PaybybankAISDD) - { - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayByBankAISDirectDebitDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayByBankAISDirectDebitDetails); - } - - /// - /// Returns true if PayByBankAISDirectDebitDetails instances are equal - /// - /// Instance of PayByBankAISDirectDebitDetails to be compared - /// Boolean - public bool Equals(PayByBankAISDirectDebitDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PayByBankDetails.cs b/Adyen/Model/Checkout/PayByBankDetails.cs deleted file mode 100644 index b34dca7de..000000000 --- a/Adyen/Model/Checkout/PayByBankDetails.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PayByBankDetails - /// - [DataContract(Name = "PayByBankDetails")] - public partial class PayByBankDetails : IEquatable, IValidatableObject - { - /// - /// **paybybank** - /// - /// **paybybank** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Paybybank for value: paybybank - /// - [EnumMember(Value = "paybybank")] - Paybybank = 1 - - } - - - /// - /// **paybybank** - /// - /// **paybybank** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayByBankDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The PayByBank issuer value of the shopper's selected bank.. - /// **paybybank** (required) (default to TypeEnum.Paybybank). - public PayByBankDetails(string checkoutAttemptId = default(string), string issuer = default(string), TypeEnum type = TypeEnum.Paybybank) - { - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - this.Issuer = issuer; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The PayByBank issuer value of the shopper's selected bank. - /// - /// The PayByBank issuer value of the shopper's selected bank. - [DataMember(Name = "issuer", EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayByBankDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayByBankDetails); - } - - /// - /// Returns true if PayByBankDetails instances are equal - /// - /// Instance of PayByBankDetails to be compared - /// Boolean - public bool Equals(PayByBankDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PayPalDetails.cs b/Adyen/Model/Checkout/PayPalDetails.cs deleted file mode 100644 index 3faf34a69..000000000 --- a/Adyen/Model/Checkout/PayPalDetails.cs +++ /dev/null @@ -1,327 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PayPalDetails - /// - [DataContract(Name = "PayPalDetails")] - public partial class PayPalDetails : IEquatable, IValidatableObject - { - /// - /// The type of flow to initiate. - /// - /// The type of flow to initiate. - [JsonConverter(typeof(StringEnumConverter))] - public enum SubtypeEnum - { - /// - /// Enum Express for value: express - /// - [EnumMember(Value = "express")] - Express = 1, - - /// - /// Enum Redirect for value: redirect - /// - [EnumMember(Value = "redirect")] - Redirect = 2, - - /// - /// Enum Sdk for value: sdk - /// - [EnumMember(Value = "sdk")] - Sdk = 3 - - } - - - /// - /// The type of flow to initiate. - /// - /// The type of flow to initiate. - [DataMember(Name = "subtype", EmitDefaultValue = false)] - public SubtypeEnum? Subtype { get; set; } - /// - /// **paypal** - /// - /// **paypal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Paypal for value: paypal - /// - [EnumMember(Value = "paypal")] - Paypal = 1 - - } - - - /// - /// **paypal** - /// - /// **paypal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayPalDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The unique ID associated with the order.. - /// IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED. - /// The unique ID associated with the payer.. - /// PAYPAL or PAYPAL_CREDIT. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The type of flow to initiate.. - /// **paypal** (required) (default to TypeEnum.Paypal). - public PayPalDetails(string checkoutAttemptId = default(string), string orderID = default(string), string payeePreferred = default(string), string payerID = default(string), string payerSelected = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), SubtypeEnum? subtype = default(SubtypeEnum?), TypeEnum type = TypeEnum.Paypal) - { - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - this.OrderID = orderID; - this.PayeePreferred = payeePreferred; - this.PayerID = payerID; - this.PayerSelected = payerSelected; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Subtype = subtype; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The unique ID associated with the order. - /// - /// The unique ID associated with the order. - [DataMember(Name = "orderID", EmitDefaultValue = false)] - public string OrderID { get; set; } - - /// - /// IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED - /// - /// IMMEDIATE_PAYMENT_REQUIRED or UNRESTRICTED - [DataMember(Name = "payeePreferred", EmitDefaultValue = false)] - public string PayeePreferred { get; set; } - - /// - /// The unique ID associated with the payer. - /// - /// The unique ID associated with the payer. - [DataMember(Name = "payerID", EmitDefaultValue = false)] - public string PayerID { get; set; } - - /// - /// PAYPAL or PAYPAL_CREDIT - /// - /// PAYPAL or PAYPAL_CREDIT - [DataMember(Name = "payerSelected", EmitDefaultValue = false)] - public string PayerSelected { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayPalDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" OrderID: ").Append(OrderID).Append("\n"); - sb.Append(" PayeePreferred: ").Append(PayeePreferred).Append("\n"); - sb.Append(" PayerID: ").Append(PayerID).Append("\n"); - sb.Append(" PayerSelected: ").Append(PayerSelected).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Subtype: ").Append(Subtype).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayPalDetails); - } - - /// - /// Returns true if PayPalDetails instances are equal - /// - /// Instance of PayPalDetails to be compared - /// Boolean - public bool Equals(PayPalDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.OrderID == input.OrderID || - (this.OrderID != null && - this.OrderID.Equals(input.OrderID)) - ) && - ( - this.PayeePreferred == input.PayeePreferred || - (this.PayeePreferred != null && - this.PayeePreferred.Equals(input.PayeePreferred)) - ) && - ( - this.PayerID == input.PayerID || - (this.PayerID != null && - this.PayerID.Equals(input.PayerID)) - ) && - ( - this.PayerSelected == input.PayerSelected || - (this.PayerSelected != null && - this.PayerSelected.Equals(input.PayerSelected)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Subtype == input.Subtype || - this.Subtype.Equals(input.Subtype) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.OrderID != null) - { - hashCode = (hashCode * 59) + this.OrderID.GetHashCode(); - } - if (this.PayeePreferred != null) - { - hashCode = (hashCode * 59) + this.PayeePreferred.GetHashCode(); - } - if (this.PayerID != null) - { - hashCode = (hashCode * 59) + this.PayerID.GetHashCode(); - } - if (this.PayerSelected != null) - { - hashCode = (hashCode * 59) + this.PayerSelected.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Subtype.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PayPayDetails.cs b/Adyen/Model/Checkout/PayPayDetails.cs deleted file mode 100644 index 796bc2287..000000000 --- a/Adyen/Model/Checkout/PayPayDetails.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PayPayDetails - /// - [DataContract(Name = "PayPayDetails")] - public partial class PayPayDetails : IEquatable, IValidatableObject - { - /// - /// **paypay** - /// - /// **paypay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Paypay for value: paypay - /// - [EnumMember(Value = "paypay")] - Paypay = 1 - - } - - - /// - /// **paypay** - /// - /// **paypay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **paypay** (default to TypeEnum.Paypay). - public PayPayDetails(string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Paypay) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayPayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayPayDetails); - } - - /// - /// Returns true if PayPayDetails instances are equal - /// - /// Instance of PayPayDetails to be compared - /// Boolean - public bool Equals(PayPayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PayToDetails.cs b/Adyen/Model/Checkout/PayToDetails.cs deleted file mode 100644 index 718ee3940..000000000 --- a/Adyen/Model/Checkout/PayToDetails.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PayToDetails - /// - [DataContract(Name = "PayToDetails")] - public partial class PayToDetails : IEquatable, IValidatableObject - { - /// - /// **payto** - /// - /// **payto** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Payto for value: payto - /// - [EnumMember(Value = "payto")] - Payto = 1 - - } - - - /// - /// **payto** - /// - /// **payto** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The shopper's banking details or payId reference, used to complete payment.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **payto** (default to TypeEnum.Payto). - public PayToDetails(string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string shopperAccountIdentifier = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Payto) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperAccountIdentifier = shopperAccountIdentifier; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// The shopper's banking details or payId reference, used to complete payment. - /// - /// The shopper's banking details or payId reference, used to complete payment. - [DataMember(Name = "shopperAccountIdentifier", EmitDefaultValue = false)] - public string ShopperAccountIdentifier { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayToDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperAccountIdentifier: ").Append(ShopperAccountIdentifier).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayToDetails); - } - - /// - /// Returns true if PayToDetails instances are equal - /// - /// Instance of PayToDetails to be compared - /// Boolean - public bool Equals(PayToDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperAccountIdentifier == input.ShopperAccountIdentifier || - (this.ShopperAccountIdentifier != null && - this.ShopperAccountIdentifier.Equals(input.ShopperAccountIdentifier)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperAccountIdentifier != null) - { - hashCode = (hashCode * 59) + this.ShopperAccountIdentifier.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PayUUpiDetails.cs b/Adyen/Model/Checkout/PayUUpiDetails.cs deleted file mode 100644 index e61d26df4..000000000 --- a/Adyen/Model/Checkout/PayUUpiDetails.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PayUUpiDetails - /// - [DataContract(Name = "PayUUpiDetails")] - public partial class PayUUpiDetails : IEquatable, IValidatableObject - { - /// - /// **payu_IN_upi** - /// - /// **payu_IN_upi** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PayuINUpi for value: payu_IN_upi - /// - [EnumMember(Value = "payu_IN_upi")] - PayuINUpi = 1 - - } - - - /// - /// **payu_IN_upi** - /// - /// **payu_IN_upi** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayUUpiDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **payu_IN_upi** (required) (default to TypeEnum.PayuINUpi). - /// The virtual payment address for UPI.. - public PayUUpiDetails(string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = TypeEnum.PayuINUpi, string virtualPaymentAddress = default(string)) - { - this.Type = type; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperNotificationReference = shopperNotificationReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.VirtualPaymentAddress = virtualPaymentAddress; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - [DataMember(Name = "shopperNotificationReference", EmitDefaultValue = false)] - public string ShopperNotificationReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The virtual payment address for UPI. - /// - /// The virtual payment address for UPI. - [DataMember(Name = "virtualPaymentAddress", EmitDefaultValue = false)] - public string VirtualPaymentAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayUUpiDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperNotificationReference: ").Append(ShopperNotificationReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VirtualPaymentAddress: ").Append(VirtualPaymentAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayUUpiDetails); - } - - /// - /// Returns true if PayUUpiDetails instances are equal - /// - /// Instance of PayUUpiDetails to be compared - /// Boolean - public bool Equals(PayUUpiDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperNotificationReference == input.ShopperNotificationReference || - (this.ShopperNotificationReference != null && - this.ShopperNotificationReference.Equals(input.ShopperNotificationReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.VirtualPaymentAddress == input.VirtualPaymentAddress || - (this.VirtualPaymentAddress != null && - this.VirtualPaymentAddress.Equals(input.VirtualPaymentAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperNotificationReference != null) - { - hashCode = (hashCode * 59) + this.ShopperNotificationReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.VirtualPaymentAddress != null) - { - hashCode = (hashCode * 59) + this.VirtualPaymentAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PayWithGoogleDetails.cs b/Adyen/Model/Checkout/PayWithGoogleDetails.cs deleted file mode 100644 index 39b4bfc98..000000000 --- a/Adyen/Model/Checkout/PayWithGoogleDetails.cs +++ /dev/null @@ -1,295 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PayWithGoogleDetails - /// - [DataContract(Name = "PayWithGoogleDetails")] - public partial class PayWithGoogleDetails : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **paywithgoogle** - /// - /// **paywithgoogle** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Paywithgoogle for value: paywithgoogle - /// - [EnumMember(Value = "paywithgoogle")] - Paywithgoogle = 1 - - } - - - /// - /// **paywithgoogle** - /// - /// **paywithgoogle** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayWithGoogleDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.. - /// **paywithgoogle** (default to TypeEnum.Paywithgoogle). - public PayWithGoogleDetails(string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string googlePayToken = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Paywithgoogle) - { - this.GooglePayToken = googlePayToken; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.ThreeDS2SdkVersion = threeDS2SdkVersion; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - /// - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - [DataMember(Name = "googlePayToken", IsRequired = false, EmitDefaultValue = false)] - public string GooglePayToken { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - [DataMember(Name = "threeDS2SdkVersion", EmitDefaultValue = false)] - public string ThreeDS2SdkVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayWithGoogleDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" GooglePayToken: ").Append(GooglePayToken).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" ThreeDS2SdkVersion: ").Append(ThreeDS2SdkVersion).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayWithGoogleDetails); - } - - /// - /// Returns true if PayWithGoogleDetails instances are equal - /// - /// Instance of PayWithGoogleDetails to be compared - /// Boolean - public bool Equals(PayWithGoogleDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.GooglePayToken == input.GooglePayToken || - (this.GooglePayToken != null && - this.GooglePayToken.Equals(input.GooglePayToken)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.ThreeDS2SdkVersion == input.ThreeDS2SdkVersion || - (this.ThreeDS2SdkVersion != null && - this.ThreeDS2SdkVersion.Equals(input.ThreeDS2SdkVersion)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.GooglePayToken != null) - { - hashCode = (hashCode * 59) + this.GooglePayToken.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.ThreeDS2SdkVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2SdkVersion.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // GooglePayToken (string) maxLength - if (this.GooglePayToken != null && this.GooglePayToken.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GooglePayToken, length must be less than 5000.", new [] { "GooglePayToken" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - // ThreeDS2SdkVersion (string) maxLength - if (this.ThreeDS2SdkVersion != null && this.ThreeDS2SdkVersion.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDS2SdkVersion, length must be less than 12.", new [] { "ThreeDS2SdkVersion" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PayWithGoogleDonations.cs b/Adyen/Model/Checkout/PayWithGoogleDonations.cs deleted file mode 100644 index 3062f2d61..000000000 --- a/Adyen/Model/Checkout/PayWithGoogleDonations.cs +++ /dev/null @@ -1,295 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PayWithGoogleDonations - /// - [DataContract(Name = "PayWithGoogleDonations")] - public partial class PayWithGoogleDonations : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **paywithgoogle** - /// - /// **paywithgoogle** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Paywithgoogle for value: paywithgoogle - /// - [EnumMember(Value = "paywithgoogle")] - Paywithgoogle = 1 - - } - - - /// - /// **paywithgoogle** - /// - /// **paywithgoogle** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayWithGoogleDonations() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK.. - /// **paywithgoogle** (default to TypeEnum.Paywithgoogle). - public PayWithGoogleDonations(string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string googlePayToken = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string threeDS2SdkVersion = default(string), TypeEnum? type = TypeEnum.Paywithgoogle) - { - this.GooglePayToken = googlePayToken; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.ThreeDS2SdkVersion = threeDS2SdkVersion; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - /// - /// The `token` that you obtained from the [Google Pay API](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) `PaymentData` response. - [DataMember(Name = "googlePayToken", IsRequired = false, EmitDefaultValue = false)] - public string GooglePayToken { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - /// - /// Required for mobile integrations. Version of the 3D Secure 2 mobile SDK. - [DataMember(Name = "threeDS2SdkVersion", EmitDefaultValue = false)] - public string ThreeDS2SdkVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayWithGoogleDonations {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" GooglePayToken: ").Append(GooglePayToken).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" ThreeDS2SdkVersion: ").Append(ThreeDS2SdkVersion).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayWithGoogleDonations); - } - - /// - /// Returns true if PayWithGoogleDonations instances are equal - /// - /// Instance of PayWithGoogleDonations to be compared - /// Boolean - public bool Equals(PayWithGoogleDonations input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.GooglePayToken == input.GooglePayToken || - (this.GooglePayToken != null && - this.GooglePayToken.Equals(input.GooglePayToken)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.ThreeDS2SdkVersion == input.ThreeDS2SdkVersion || - (this.ThreeDS2SdkVersion != null && - this.ThreeDS2SdkVersion.Equals(input.ThreeDS2SdkVersion)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.GooglePayToken != null) - { - hashCode = (hashCode * 59) + this.GooglePayToken.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.ThreeDS2SdkVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2SdkVersion.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // GooglePayToken (string) maxLength - if (this.GooglePayToken != null && this.GooglePayToken.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for GooglePayToken, length must be less than 5000.", new [] { "GooglePayToken" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - // ThreeDS2SdkVersion (string) maxLength - if (this.ThreeDS2SdkVersion != null && this.ThreeDS2SdkVersion.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDS2SdkVersion, length must be less than 12.", new [] { "ThreeDS2SdkVersion" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Payment.cs b/Adyen/Model/Checkout/Payment.cs deleted file mode 100644 index 05d8a43c4..000000000 --- a/Adyen/Model/Checkout/Payment.cs +++ /dev/null @@ -1,195 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Payment - /// - [DataContract(Name = "Payment")] - public partial class Payment : IEquatable, IValidatableObject - { - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Authorised for value: Authorised - /// - [EnumMember(Value = "Authorised")] - Authorised = 1 - - } - - - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// paymentMethod. - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request.. - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. . - public Payment(Amount amount = default(Amount), ResponsePaymentMethod paymentMethod = default(ResponsePaymentMethod), string pspReference = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?)) - { - this.Amount = amount; - this.PaymentMethod = paymentMethod; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets PaymentMethod - /// - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public ResponsePaymentMethod PaymentMethod { get; set; } - - /// - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request. - /// - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique. Use this reference when you communicate with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Payment {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Payment); - } - - /// - /// Returns true if Payment instances are equal - /// - /// Instance of Payment to be compared - /// Boolean - public bool Equals(Payment input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentAmountUpdateRequest.cs b/Adyen/Model/Checkout/PaymentAmountUpdateRequest.cs deleted file mode 100644 index 61f584801..000000000 --- a/Adyen/Model/Checkout/PaymentAmountUpdateRequest.cs +++ /dev/null @@ -1,289 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentAmountUpdateRequest - /// - [DataContract(Name = "PaymentAmountUpdateRequest")] - public partial class PaymentAmountUpdateRequest : IEquatable, IValidatableObject - { - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - [JsonConverter(typeof(StringEnumConverter))] - public enum IndustryUsageEnum - { - /// - /// Enum DelayedCharge for value: delayedCharge - /// - [EnumMember(Value = "delayedCharge")] - DelayedCharge = 1, - - /// - /// Enum Installment for value: installment - /// - [EnumMember(Value = "installment")] - Installment = 2, - - /// - /// Enum NoShow for value: noShow - /// - [EnumMember(Value = "noShow")] - NoShow = 3 - - } - - - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - [DataMember(Name = "industryUsage", EmitDefaultValue = false)] - public IndustryUsageEnum? IndustryUsage { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentAmountUpdateRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// applicationInfo. - /// enhancedSchemeData. - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment**. - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.. - /// The merchant account that is used to process the payment. (required). - /// Your reference for the amount update request. Maximum length: 80 characters.. - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/process-payments) or [platforms](https://docs.adyen.com/platforms/process-payments).. - public PaymentAmountUpdateRequest(Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), EnhancedSchemeData enhancedSchemeData = default(EnhancedSchemeData), IndustryUsageEnum? industryUsage = default(IndustryUsageEnum?), List lineItems = default(List), string merchantAccount = default(string), string reference = default(string), List splits = default(List)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.ApplicationInfo = applicationInfo; - this.EnhancedSchemeData = enhancedSchemeData; - this.IndustryUsage = industryUsage; - this.LineItems = lineItems; - this.Reference = reference; - this.Splits = splits; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets EnhancedSchemeData - /// - [DataMember(Name = "enhancedSchemeData", EmitDefaultValue = false)] - public EnhancedSchemeData EnhancedSchemeData { get; set; } - - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Your reference for the amount update request. Maximum length: 80 characters. - /// - /// Your reference for the amount update request. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/process-payments) or [platforms](https://docs.adyen.com/platforms/process-payments). - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/process-payments) or [platforms](https://docs.adyen.com/platforms/process-payments). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentAmountUpdateRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" EnhancedSchemeData: ").Append(EnhancedSchemeData).Append("\n"); - sb.Append(" IndustryUsage: ").Append(IndustryUsage).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentAmountUpdateRequest); - } - - /// - /// Returns true if PaymentAmountUpdateRequest instances are equal - /// - /// Instance of PaymentAmountUpdateRequest to be compared - /// Boolean - public bool Equals(PaymentAmountUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.EnhancedSchemeData == input.EnhancedSchemeData || - (this.EnhancedSchemeData != null && - this.EnhancedSchemeData.Equals(input.EnhancedSchemeData)) - ) && - ( - this.IndustryUsage == input.IndustryUsage || - this.IndustryUsage.Equals(input.IndustryUsage) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.EnhancedSchemeData != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IndustryUsage.GetHashCode(); - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentAmountUpdateResponse.cs b/Adyen/Model/Checkout/PaymentAmountUpdateResponse.cs deleted file mode 100644 index 12681ad55..000000000 --- a/Adyen/Model/Checkout/PaymentAmountUpdateResponse.cs +++ /dev/null @@ -1,321 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentAmountUpdateResponse - /// - [DataContract(Name = "PaymentAmountUpdateResponse")] - public partial class PaymentAmountUpdateResponse : IEquatable, IValidatableObject - { - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - [JsonConverter(typeof(StringEnumConverter))] - public enum IndustryUsageEnum - { - /// - /// Enum DelayedCharge for value: delayedCharge - /// - [EnumMember(Value = "delayedCharge")] - DelayedCharge = 1, - - /// - /// Enum Installment for value: installment - /// - [EnumMember(Value = "installment")] - Installment = 2, - - /// - /// Enum NoShow for value: noShow - /// - [EnumMember(Value = "noShow")] - NoShow = 3 - - } - - - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - [DataMember(Name = "industryUsage", EmitDefaultValue = false)] - public IndustryUsageEnum? IndustryUsage { get; set; } - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 1 - - } - - - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentAmountUpdateResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment**. - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.. - /// The merchant account that is used to process the payment. (required). - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to update. (required). - /// Adyen's 16-character reference associated with the amount update request. (required). - /// Your reference for the amount update request. Maximum length: 80 characters. (required). - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/process-payments) or [platforms](https://docs.adyen.com/platforms/process-payments).. - /// The status of your request. This will always have the value **received**. (required). - public PaymentAmountUpdateResponse(Amount amount = default(Amount), IndustryUsageEnum? industryUsage = default(IndustryUsageEnum?), List lineItems = default(List), string merchantAccount = default(string), string paymentPspReference = default(string), string pspReference = default(string), string reference = default(string), List splits = default(List), StatusEnum status = default(StatusEnum)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.PaymentPspReference = paymentPspReference; - this.PspReference = pspReference; - this.Reference = reference; - this.Status = status; - this.IndustryUsage = industryUsage; - this.LineItems = lineItems; - this.Splits = splits; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to update. - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to update. - [DataMember(Name = "paymentPspReference", IsRequired = false, EmitDefaultValue = false)] - public string PaymentPspReference { get; set; } - - /// - /// Adyen's 16-character reference associated with the amount update request. - /// - /// Adyen's 16-character reference associated with the amount update request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Your reference for the amount update request. Maximum length: 80 characters. - /// - /// Your reference for the amount update request. Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/process-payments) or [platforms](https://docs.adyen.com/platforms/process-payments). - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/process-payments) or [platforms](https://docs.adyen.com/platforms/process-payments). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentAmountUpdateResponse {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" IndustryUsage: ").Append(IndustryUsage).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentPspReference: ").Append(PaymentPspReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentAmountUpdateResponse); - } - - /// - /// Returns true if PaymentAmountUpdateResponse instances are equal - /// - /// Instance of PaymentAmountUpdateResponse to be compared - /// Boolean - public bool Equals(PaymentAmountUpdateResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.IndustryUsage == input.IndustryUsage || - this.IndustryUsage.Equals(input.IndustryUsage) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentPspReference == input.PaymentPspReference || - (this.PaymentPspReference != null && - this.PaymentPspReference.Equals(input.PaymentPspReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IndustryUsage.GetHashCode(); - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentPspReference != null) - { - hashCode = (hashCode * 59) + this.PaymentPspReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentCancelRequest.cs b/Adyen/Model/Checkout/PaymentCancelRequest.cs deleted file mode 100644 index f31c3bf0b..000000000 --- a/Adyen/Model/Checkout/PaymentCancelRequest.cs +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentCancelRequest - /// - [DataContract(Name = "PaymentCancelRequest")] - public partial class PaymentCancelRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentCancelRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// applicationInfo. - /// enhancedSchemeData. - /// The merchant account that is used to process the payment. (required). - /// Your reference for the cancel request. Maximum length: 80 characters.. - public PaymentCancelRequest(ApplicationInfo applicationInfo = default(ApplicationInfo), EnhancedSchemeData enhancedSchemeData = default(EnhancedSchemeData), string merchantAccount = default(string), string reference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.ApplicationInfo = applicationInfo; - this.EnhancedSchemeData = enhancedSchemeData; - this.Reference = reference; - } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets EnhancedSchemeData - /// - [DataMember(Name = "enhancedSchemeData", EmitDefaultValue = false)] - public EnhancedSchemeData EnhancedSchemeData { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Your reference for the cancel request. Maximum length: 80 characters. - /// - /// Your reference for the cancel request. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentCancelRequest {\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" EnhancedSchemeData: ").Append(EnhancedSchemeData).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentCancelRequest); - } - - /// - /// Returns true if PaymentCancelRequest instances are equal - /// - /// Instance of PaymentCancelRequest to be compared - /// Boolean - public bool Equals(PaymentCancelRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.EnhancedSchemeData == input.EnhancedSchemeData || - (this.EnhancedSchemeData != null && - this.EnhancedSchemeData.Equals(input.EnhancedSchemeData)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.EnhancedSchemeData != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeData.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentCancelResponse.cs b/Adyen/Model/Checkout/PaymentCancelResponse.cs deleted file mode 100644 index 97fee4ab7..000000000 --- a/Adyen/Model/Checkout/PaymentCancelResponse.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentCancelResponse - /// - [DataContract(Name = "PaymentCancelResponse")] - public partial class PaymentCancelResponse : IEquatable, IValidatableObject - { - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 1 - - } - - - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentCancelResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account that is used to process the payment. (required). - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to cancel. (required). - /// Adyen's 16-character reference associated with the cancel request. (required). - /// Your reference for the cancel request.. - /// The status of your request. This will always have the value **received**. (required). - public PaymentCancelResponse(string merchantAccount = default(string), string paymentPspReference = default(string), string pspReference = default(string), string reference = default(string), StatusEnum status = default(StatusEnum)) - { - this.MerchantAccount = merchantAccount; - this.PaymentPspReference = paymentPspReference; - this.PspReference = pspReference; - this.Status = status; - this.Reference = reference; - } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to cancel. - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to cancel. - [DataMember(Name = "paymentPspReference", IsRequired = false, EmitDefaultValue = false)] - public string PaymentPspReference { get; set; } - - /// - /// Adyen's 16-character reference associated with the cancel request. - /// - /// Adyen's 16-character reference associated with the cancel request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Your reference for the cancel request. - /// - /// Your reference for the cancel request. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentCancelResponse {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentPspReference: ").Append(PaymentPspReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentCancelResponse); - } - - /// - /// Returns true if PaymentCancelResponse instances are equal - /// - /// Instance of PaymentCancelResponse to be compared - /// Boolean - public bool Equals(PaymentCancelResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentPspReference == input.PaymentPspReference || - (this.PaymentPspReference != null && - this.PaymentPspReference.Equals(input.PaymentPspReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentPspReference != null) - { - hashCode = (hashCode * 59) + this.PaymentPspReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentCaptureRequest.cs b/Adyen/Model/Checkout/PaymentCaptureRequest.cs deleted file mode 100644 index 7b9a3c0b7..000000000 --- a/Adyen/Model/Checkout/PaymentCaptureRequest.cs +++ /dev/null @@ -1,285 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentCaptureRequest - /// - [DataContract(Name = "PaymentCaptureRequest")] - public partial class PaymentCaptureRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentCaptureRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// applicationInfo. - /// enhancedSchemeData. - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.. - /// The merchant account that is used to process the payment. (required). - /// platformChargebackLogic. - /// Your reference for the capture request. Maximum length: 80 characters.. - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).. - /// A List of sub-merchants.. - public PaymentCaptureRequest(Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), EnhancedSchemeData enhancedSchemeData = default(EnhancedSchemeData), List lineItems = default(List), string merchantAccount = default(string), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string reference = default(string), List splits = default(List), List subMerchants = default(List)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.ApplicationInfo = applicationInfo; - this.EnhancedSchemeData = enhancedSchemeData; - this.LineItems = lineItems; - this.PlatformChargebackLogic = platformChargebackLogic; - this.Reference = reference; - this.Splits = splits; - this.SubMerchants = subMerchants; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets EnhancedSchemeData - /// - [DataMember(Name = "enhancedSchemeData", EmitDefaultValue = false)] - public EnhancedSchemeData EnhancedSchemeData { get; set; } - - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets PlatformChargebackLogic - /// - [DataMember(Name = "platformChargebackLogic", EmitDefaultValue = false)] - public PlatformChargebackLogic PlatformChargebackLogic { get; set; } - - /// - /// Your reference for the capture request. Maximum length: 80 characters. - /// - /// Your reference for the capture request. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/). - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// A List of sub-merchants. - /// - /// A List of sub-merchants. - [DataMember(Name = "subMerchants", EmitDefaultValue = false)] - public List SubMerchants { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentCaptureRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" EnhancedSchemeData: ").Append(EnhancedSchemeData).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PlatformChargebackLogic: ").Append(PlatformChargebackLogic).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" SubMerchants: ").Append(SubMerchants).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentCaptureRequest); - } - - /// - /// Returns true if PaymentCaptureRequest instances are equal - /// - /// Instance of PaymentCaptureRequest to be compared - /// Boolean - public bool Equals(PaymentCaptureRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.EnhancedSchemeData == input.EnhancedSchemeData || - (this.EnhancedSchemeData != null && - this.EnhancedSchemeData.Equals(input.EnhancedSchemeData)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PlatformChargebackLogic == input.PlatformChargebackLogic || - (this.PlatformChargebackLogic != null && - this.PlatformChargebackLogic.Equals(input.PlatformChargebackLogic)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.SubMerchants == input.SubMerchants || - this.SubMerchants != null && - input.SubMerchants != null && - this.SubMerchants.SequenceEqual(input.SubMerchants) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.EnhancedSchemeData != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeData.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PlatformChargebackLogic != null) - { - hashCode = (hashCode * 59) + this.PlatformChargebackLogic.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - if (this.SubMerchants != null) - { - hashCode = (hashCode * 59) + this.SubMerchants.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentCaptureResponse.cs b/Adyen/Model/Checkout/PaymentCaptureResponse.cs deleted file mode 100644 index 9f8c1ab45..000000000 --- a/Adyen/Model/Checkout/PaymentCaptureResponse.cs +++ /dev/null @@ -1,317 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentCaptureResponse - /// - [DataContract(Name = "PaymentCaptureResponse")] - public partial class PaymentCaptureResponse : IEquatable, IValidatableObject - { - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 1 - - } - - - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentCaptureResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.. - /// The merchant account that is used to process the payment. (required). - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to capture. (required). - /// platformChargebackLogic. - /// Adyen's 16-character reference associated with the capture request. (required). - /// Your reference for the capture request.. - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).. - /// The status of your request. This will always have the value **received**. (required). - /// List of sub-merchants.. - public PaymentCaptureResponse(Amount amount = default(Amount), List lineItems = default(List), string merchantAccount = default(string), string paymentPspReference = default(string), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string pspReference = default(string), string reference = default(string), List splits = default(List), StatusEnum status = default(StatusEnum), List subMerchants = default(List)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.PaymentPspReference = paymentPspReference; - this.PspReference = pspReference; - this.Status = status; - this.LineItems = lineItems; - this.PlatformChargebackLogic = platformChargebackLogic; - this.Reference = reference; - this.Splits = splits; - this.SubMerchants = subMerchants; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to capture. - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to capture. - [DataMember(Name = "paymentPspReference", IsRequired = false, EmitDefaultValue = false)] - public string PaymentPspReference { get; set; } - - /// - /// Gets or Sets PlatformChargebackLogic - /// - [DataMember(Name = "platformChargebackLogic", EmitDefaultValue = false)] - public PlatformChargebackLogic PlatformChargebackLogic { get; set; } - - /// - /// Adyen's 16-character reference associated with the capture request. - /// - /// Adyen's 16-character reference associated with the capture request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Your reference for the capture request. - /// - /// Your reference for the capture request. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/). - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// List of sub-merchants. - /// - /// List of sub-merchants. - [DataMember(Name = "subMerchants", EmitDefaultValue = false)] - public List SubMerchants { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentCaptureResponse {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentPspReference: ").Append(PaymentPspReference).Append("\n"); - sb.Append(" PlatformChargebackLogic: ").Append(PlatformChargebackLogic).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" SubMerchants: ").Append(SubMerchants).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentCaptureResponse); - } - - /// - /// Returns true if PaymentCaptureResponse instances are equal - /// - /// Instance of PaymentCaptureResponse to be compared - /// Boolean - public bool Equals(PaymentCaptureResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentPspReference == input.PaymentPspReference || - (this.PaymentPspReference != null && - this.PaymentPspReference.Equals(input.PaymentPspReference)) - ) && - ( - this.PlatformChargebackLogic == input.PlatformChargebackLogic || - (this.PlatformChargebackLogic != null && - this.PlatformChargebackLogic.Equals(input.PlatformChargebackLogic)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.SubMerchants == input.SubMerchants || - this.SubMerchants != null && - input.SubMerchants != null && - this.SubMerchants.SequenceEqual(input.SubMerchants) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentPspReference != null) - { - hashCode = (hashCode * 59) + this.PaymentPspReference.GetHashCode(); - } - if (this.PlatformChargebackLogic != null) - { - hashCode = (hashCode * 59) + this.PlatformChargebackLogic.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.SubMerchants != null) - { - hashCode = (hashCode * 59) + this.SubMerchants.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentCompletionDetails.cs b/Adyen/Model/Checkout/PaymentCompletionDetails.cs deleted file mode 100644 index 499717c02..000000000 --- a/Adyen/Model/Checkout/PaymentCompletionDetails.cs +++ /dev/null @@ -1,543 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentCompletionDetails - /// - [DataContract(Name = "PaymentCompletionDetails")] - public partial class PaymentCompletionDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A payment session identifier returned by the card issuer.. - /// (3D) Payment Authentication Request data for the card issuer.. - /// (3D) Payment Authentication Response data by the card issuer.. - /// authorizationToken. - /// PayPal-generated token for recurring payments.. - /// The SMS verification code collected from the shopper.. - /// PayPal-generated third party access token.. - /// A random number sent to the mobile phone number of the shopper to verify the payment.. - /// PayPal-assigned ID for the order.. - /// PayPal-assigned ID for the payer (shopper).. - /// Payload appended to the `returnURL` as a result of the redirect.. - /// PayPal-generated ID for the payment.. - /// Value passed from the WeChat MiniProgram `wx.requestPayment` **complete** callback. Possible values: any value starting with `requestPayment:`.. - /// The result of the redirect as appended to the `returnURL`.. - /// Value you received from the WeChat Pay SDK.. - /// The query string as appended to the `returnURL` when using direct issuer links .. - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameters: `transStatus`, `authorisationToken`.. - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameter: `transStatus`.. - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameter: `threeDSCompInd`.. - /// PayPalv2-generated token for recurring payments.. - public PaymentCompletionDetails(string mD = default(string), string paReq = default(string), string paRes = default(string), string authorizationToken = default(string), string billingToken = default(string), string cupsecureplusSmscode = default(string), string facilitatorAccessToken = default(string), string oneTimePasscode = default(string), string orderID = default(string), string payerID = default(string), string payload = default(string), string paymentID = default(string), string paymentStatus = default(string), string redirectResult = default(string), string resultCode = default(string), string returnUrlQueryString = default(string), string threeDSResult = default(string), string threeds2ChallengeResult = default(string), string threeds2Fingerprint = default(string), string vaultToken = default(string)) - { - this.MD = mD; - this.PaReq = paReq; - this.PaRes = paRes; - this.AuthorizationToken = authorizationToken; - this.BillingToken = billingToken; - this.CupsecureplusSmscode = cupsecureplusSmscode; - this.FacilitatorAccessToken = facilitatorAccessToken; - this.OneTimePasscode = oneTimePasscode; - this.OrderID = orderID; - this.PayerID = payerID; - this.Payload = payload; - this.PaymentID = paymentID; - this.PaymentStatus = paymentStatus; - this.RedirectResult = redirectResult; - this.ResultCode = resultCode; - this.ReturnUrlQueryString = returnUrlQueryString; - this.ThreeDSResult = threeDSResult; - this.Threeds2ChallengeResult = threeds2ChallengeResult; - this.Threeds2Fingerprint = threeds2Fingerprint; - this.VaultToken = vaultToken; - } - - /// - /// A payment session identifier returned by the card issuer. - /// - /// A payment session identifier returned by the card issuer. - [DataMember(Name = "MD", EmitDefaultValue = false)] - public string MD { get; set; } - - /// - /// (3D) Payment Authentication Request data for the card issuer. - /// - /// (3D) Payment Authentication Request data for the card issuer. - [DataMember(Name = "PaReq", EmitDefaultValue = false)] - public string PaReq { get; set; } - - /// - /// (3D) Payment Authentication Response data by the card issuer. - /// - /// (3D) Payment Authentication Response data by the card issuer. - [DataMember(Name = "PaRes", EmitDefaultValue = false)] - public string PaRes { get; set; } - - /// - /// Gets or Sets AuthorizationToken - /// - [DataMember(Name = "authorization_token", EmitDefaultValue = false)] - public string AuthorizationToken { get; set; } - - /// - /// PayPal-generated token for recurring payments. - /// - /// PayPal-generated token for recurring payments. - [DataMember(Name = "billingToken", EmitDefaultValue = false)] - public string BillingToken { get; set; } - - /// - /// The SMS verification code collected from the shopper. - /// - /// The SMS verification code collected from the shopper. - [DataMember(Name = "cupsecureplus.smscode", EmitDefaultValue = false)] - public string CupsecureplusSmscode { get; set; } - - /// - /// PayPal-generated third party access token. - /// - /// PayPal-generated third party access token. - [DataMember(Name = "facilitatorAccessToken", EmitDefaultValue = false)] - public string FacilitatorAccessToken { get; set; } - - /// - /// A random number sent to the mobile phone number of the shopper to verify the payment. - /// - /// A random number sent to the mobile phone number of the shopper to verify the payment. - [DataMember(Name = "oneTimePasscode", EmitDefaultValue = false)] - public string OneTimePasscode { get; set; } - - /// - /// PayPal-assigned ID for the order. - /// - /// PayPal-assigned ID for the order. - [DataMember(Name = "orderID", EmitDefaultValue = false)] - public string OrderID { get; set; } - - /// - /// PayPal-assigned ID for the payer (shopper). - /// - /// PayPal-assigned ID for the payer (shopper). - [DataMember(Name = "payerID", EmitDefaultValue = false)] - public string PayerID { get; set; } - - /// - /// Payload appended to the `returnURL` as a result of the redirect. - /// - /// Payload appended to the `returnURL` as a result of the redirect. - [DataMember(Name = "payload", EmitDefaultValue = false)] - public string Payload { get; set; } - - /// - /// PayPal-generated ID for the payment. - /// - /// PayPal-generated ID for the payment. - [DataMember(Name = "paymentID", EmitDefaultValue = false)] - public string PaymentID { get; set; } - - /// - /// Value passed from the WeChat MiniProgram `wx.requestPayment` **complete** callback. Possible values: any value starting with `requestPayment:`. - /// - /// Value passed from the WeChat MiniProgram `wx.requestPayment` **complete** callback. Possible values: any value starting with `requestPayment:`. - [DataMember(Name = "paymentStatus", EmitDefaultValue = false)] - public string PaymentStatus { get; set; } - - /// - /// The result of the redirect as appended to the `returnURL`. - /// - /// The result of the redirect as appended to the `returnURL`. - [DataMember(Name = "redirectResult", EmitDefaultValue = false)] - public string RedirectResult { get; set; } - - /// - /// Value you received from the WeChat Pay SDK. - /// - /// Value you received from the WeChat Pay SDK. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// The query string as appended to the `returnURL` when using direct issuer links . - /// - /// The query string as appended to the `returnURL` when using direct issuer links . - [DataMember(Name = "returnUrlQueryString", EmitDefaultValue = false)] - public string ReturnUrlQueryString { get; set; } - - /// - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameters: `transStatus`, `authorisationToken`. - /// - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameters: `transStatus`, `authorisationToken`. - [DataMember(Name = "threeDSResult", EmitDefaultValue = false)] - public string ThreeDSResult { get; set; } - - /// - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameter: `transStatus`. - /// - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameter: `transStatus`. - [DataMember(Name = "threeds2.challengeResult", EmitDefaultValue = false)] - public string Threeds2ChallengeResult { get; set; } - - /// - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameter: `threeDSCompInd`. - /// - /// Base64-encoded string returned by the Component after the challenge flow. It contains the following parameter: `threeDSCompInd`. - [DataMember(Name = "threeds2.fingerprint", EmitDefaultValue = false)] - public string Threeds2Fingerprint { get; set; } - - /// - /// PayPalv2-generated token for recurring payments. - /// - /// PayPalv2-generated token for recurring payments. - [DataMember(Name = "vaultToken", EmitDefaultValue = false)] - public string VaultToken { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentCompletionDetails {\n"); - sb.Append(" MD: ").Append(MD).Append("\n"); - sb.Append(" PaReq: ").Append(PaReq).Append("\n"); - sb.Append(" PaRes: ").Append(PaRes).Append("\n"); - sb.Append(" AuthorizationToken: ").Append(AuthorizationToken).Append("\n"); - sb.Append(" BillingToken: ").Append(BillingToken).Append("\n"); - sb.Append(" CupsecureplusSmscode: ").Append(CupsecureplusSmscode).Append("\n"); - sb.Append(" FacilitatorAccessToken: ").Append(FacilitatorAccessToken).Append("\n"); - sb.Append(" OneTimePasscode: ").Append(OneTimePasscode).Append("\n"); - sb.Append(" OrderID: ").Append(OrderID).Append("\n"); - sb.Append(" PayerID: ").Append(PayerID).Append("\n"); - sb.Append(" Payload: ").Append(Payload).Append("\n"); - sb.Append(" PaymentID: ").Append(PaymentID).Append("\n"); - sb.Append(" PaymentStatus: ").Append(PaymentStatus).Append("\n"); - sb.Append(" RedirectResult: ").Append(RedirectResult).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ReturnUrlQueryString: ").Append(ReturnUrlQueryString).Append("\n"); - sb.Append(" ThreeDSResult: ").Append(ThreeDSResult).Append("\n"); - sb.Append(" Threeds2ChallengeResult: ").Append(Threeds2ChallengeResult).Append("\n"); - sb.Append(" Threeds2Fingerprint: ").Append(Threeds2Fingerprint).Append("\n"); - sb.Append(" VaultToken: ").Append(VaultToken).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentCompletionDetails); - } - - /// - /// Returns true if PaymentCompletionDetails instances are equal - /// - /// Instance of PaymentCompletionDetails to be compared - /// Boolean - public bool Equals(PaymentCompletionDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.MD == input.MD || - (this.MD != null && - this.MD.Equals(input.MD)) - ) && - ( - this.PaReq == input.PaReq || - (this.PaReq != null && - this.PaReq.Equals(input.PaReq)) - ) && - ( - this.PaRes == input.PaRes || - (this.PaRes != null && - this.PaRes.Equals(input.PaRes)) - ) && - ( - this.AuthorizationToken == input.AuthorizationToken || - (this.AuthorizationToken != null && - this.AuthorizationToken.Equals(input.AuthorizationToken)) - ) && - ( - this.BillingToken == input.BillingToken || - (this.BillingToken != null && - this.BillingToken.Equals(input.BillingToken)) - ) && - ( - this.CupsecureplusSmscode == input.CupsecureplusSmscode || - (this.CupsecureplusSmscode != null && - this.CupsecureplusSmscode.Equals(input.CupsecureplusSmscode)) - ) && - ( - this.FacilitatorAccessToken == input.FacilitatorAccessToken || - (this.FacilitatorAccessToken != null && - this.FacilitatorAccessToken.Equals(input.FacilitatorAccessToken)) - ) && - ( - this.OneTimePasscode == input.OneTimePasscode || - (this.OneTimePasscode != null && - this.OneTimePasscode.Equals(input.OneTimePasscode)) - ) && - ( - this.OrderID == input.OrderID || - (this.OrderID != null && - this.OrderID.Equals(input.OrderID)) - ) && - ( - this.PayerID == input.PayerID || - (this.PayerID != null && - this.PayerID.Equals(input.PayerID)) - ) && - ( - this.Payload == input.Payload || - (this.Payload != null && - this.Payload.Equals(input.Payload)) - ) && - ( - this.PaymentID == input.PaymentID || - (this.PaymentID != null && - this.PaymentID.Equals(input.PaymentID)) - ) && - ( - this.PaymentStatus == input.PaymentStatus || - (this.PaymentStatus != null && - this.PaymentStatus.Equals(input.PaymentStatus)) - ) && - ( - this.RedirectResult == input.RedirectResult || - (this.RedirectResult != null && - this.RedirectResult.Equals(input.RedirectResult)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.ReturnUrlQueryString == input.ReturnUrlQueryString || - (this.ReturnUrlQueryString != null && - this.ReturnUrlQueryString.Equals(input.ReturnUrlQueryString)) - ) && - ( - this.ThreeDSResult == input.ThreeDSResult || - (this.ThreeDSResult != null && - this.ThreeDSResult.Equals(input.ThreeDSResult)) - ) && - ( - this.Threeds2ChallengeResult == input.Threeds2ChallengeResult || - (this.Threeds2ChallengeResult != null && - this.Threeds2ChallengeResult.Equals(input.Threeds2ChallengeResult)) - ) && - ( - this.Threeds2Fingerprint == input.Threeds2Fingerprint || - (this.Threeds2Fingerprint != null && - this.Threeds2Fingerprint.Equals(input.Threeds2Fingerprint)) - ) && - ( - this.VaultToken == input.VaultToken || - (this.VaultToken != null && - this.VaultToken.Equals(input.VaultToken)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MD != null) - { - hashCode = (hashCode * 59) + this.MD.GetHashCode(); - } - if (this.PaReq != null) - { - hashCode = (hashCode * 59) + this.PaReq.GetHashCode(); - } - if (this.PaRes != null) - { - hashCode = (hashCode * 59) + this.PaRes.GetHashCode(); - } - if (this.AuthorizationToken != null) - { - hashCode = (hashCode * 59) + this.AuthorizationToken.GetHashCode(); - } - if (this.BillingToken != null) - { - hashCode = (hashCode * 59) + this.BillingToken.GetHashCode(); - } - if (this.CupsecureplusSmscode != null) - { - hashCode = (hashCode * 59) + this.CupsecureplusSmscode.GetHashCode(); - } - if (this.FacilitatorAccessToken != null) - { - hashCode = (hashCode * 59) + this.FacilitatorAccessToken.GetHashCode(); - } - if (this.OneTimePasscode != null) - { - hashCode = (hashCode * 59) + this.OneTimePasscode.GetHashCode(); - } - if (this.OrderID != null) - { - hashCode = (hashCode * 59) + this.OrderID.GetHashCode(); - } - if (this.PayerID != null) - { - hashCode = (hashCode * 59) + this.PayerID.GetHashCode(); - } - if (this.Payload != null) - { - hashCode = (hashCode * 59) + this.Payload.GetHashCode(); - } - if (this.PaymentID != null) - { - hashCode = (hashCode * 59) + this.PaymentID.GetHashCode(); - } - if (this.PaymentStatus != null) - { - hashCode = (hashCode * 59) + this.PaymentStatus.GetHashCode(); - } - if (this.RedirectResult != null) - { - hashCode = (hashCode * 59) + this.RedirectResult.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - if (this.ReturnUrlQueryString != null) - { - hashCode = (hashCode * 59) + this.ReturnUrlQueryString.GetHashCode(); - } - if (this.ThreeDSResult != null) - { - hashCode = (hashCode * 59) + this.ThreeDSResult.GetHashCode(); - } - if (this.Threeds2ChallengeResult != null) - { - hashCode = (hashCode * 59) + this.Threeds2ChallengeResult.GetHashCode(); - } - if (this.Threeds2Fingerprint != null) - { - hashCode = (hashCode * 59) + this.Threeds2Fingerprint.GetHashCode(); - } - if (this.VaultToken != null) - { - hashCode = (hashCode * 59) + this.VaultToken.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // MD (string) maxLength - if (this.MD != null && this.MD.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MD, length must be less than 20000.", new [] { "MD" }); - } - - // PaReq (string) maxLength - if (this.PaReq != null && this.PaReq.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PaReq, length must be less than 20000.", new [] { "PaReq" }); - } - - // PaRes (string) maxLength - if (this.PaRes != null && this.PaRes.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PaRes, length must be less than 20000.", new [] { "PaRes" }); - } - - // Payload (string) maxLength - if (this.Payload != null && this.Payload.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Payload, length must be less than 20000.", new [] { "Payload" }); - } - - // RedirectResult (string) maxLength - if (this.RedirectResult != null && this.RedirectResult.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RedirectResult, length must be less than 20000.", new [] { "RedirectResult" }); - } - - // ReturnUrlQueryString (string) maxLength - if (this.ReturnUrlQueryString != null && this.ReturnUrlQueryString.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrlQueryString, length must be less than 20000.", new [] { "ReturnUrlQueryString" }); - } - - // ThreeDSResult (string) maxLength - if (this.ThreeDSResult != null && this.ThreeDSResult.Length > 50000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDSResult, length must be less than 50000.", new [] { "ThreeDSResult" }); - } - - // Threeds2ChallengeResult (string) maxLength - if (this.Threeds2ChallengeResult != null && this.Threeds2ChallengeResult.Length > 50000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Threeds2ChallengeResult, length must be less than 50000.", new [] { "Threeds2ChallengeResult" }); - } - - // Threeds2Fingerprint (string) maxLength - if (this.Threeds2Fingerprint != null && this.Threeds2Fingerprint.Length > 100000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Threeds2Fingerprint, length must be less than 100000.", new [] { "Threeds2Fingerprint" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentDetails.cs b/Adyen/Model/Checkout/PaymentDetails.cs deleted file mode 100644 index cf6bec41d..000000000 --- a/Adyen/Model/Checkout/PaymentDetails.cs +++ /dev/null @@ -1,687 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentDetails - /// - [DataContract(Name = "PaymentDetails")] - public partial class PaymentDetails : IEquatable, IValidatableObject - { - /// - /// The payment method type. - /// - /// The payment method type. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Alipay for value: alipay - /// - [EnumMember(Value = "alipay")] - Alipay = 1, - - /// - /// Enum Multibanco for value: multibanco - /// - [EnumMember(Value = "multibanco")] - Multibanco = 2, - - /// - /// Enum BankTransferIBAN for value: bankTransfer_IBAN - /// - [EnumMember(Value = "bankTransfer_IBAN")] - BankTransferIBAN = 3, - - /// - /// Enum Paybright for value: paybright - /// - [EnumMember(Value = "paybright")] - Paybright = 4, - - /// - /// Enum Paynow for value: paynow - /// - [EnumMember(Value = "paynow")] - Paynow = 5, - - /// - /// Enum AffirmPos for value: affirm_pos - /// - [EnumMember(Value = "affirm_pos")] - AffirmPos = 6, - - /// - /// Enum Trustly for value: trustly - /// - [EnumMember(Value = "trustly")] - Trustly = 7, - - /// - /// Enum Trustlyvector for value: trustlyvector - /// - [EnumMember(Value = "trustlyvector")] - Trustlyvector = 8, - - /// - /// Enum Oney for value: oney - /// - [EnumMember(Value = "oney")] - Oney = 9, - - /// - /// Enum Facilypay for value: facilypay - /// - [EnumMember(Value = "facilypay")] - Facilypay = 10, - - /// - /// Enum Facilypay3x for value: facilypay_3x - /// - [EnumMember(Value = "facilypay_3x")] - Facilypay3x = 11, - - /// - /// Enum Facilypay4x for value: facilypay_4x - /// - [EnumMember(Value = "facilypay_4x")] - Facilypay4x = 12, - - /// - /// Enum Facilypay6x for value: facilypay_6x - /// - [EnumMember(Value = "facilypay_6x")] - Facilypay6x = 13, - - /// - /// Enum Facilypay10x for value: facilypay_10x - /// - [EnumMember(Value = "facilypay_10x")] - Facilypay10x = 14, - - /// - /// Enum Facilypay12x for value: facilypay_12x - /// - [EnumMember(Value = "facilypay_12x")] - Facilypay12x = 15, - - /// - /// Enum Unionpay for value: unionpay - /// - [EnumMember(Value = "unionpay")] - Unionpay = 16, - - /// - /// Enum KcpBanktransfer for value: kcp_banktransfer - /// - [EnumMember(Value = "kcp_banktransfer")] - KcpBanktransfer = 17, - - /// - /// Enum KcpPayco for value: kcp_payco - /// - [EnumMember(Value = "kcp_payco")] - KcpPayco = 18, - - /// - /// Enum KcpCreditcard for value: kcp_creditcard - /// - [EnumMember(Value = "kcp_creditcard")] - KcpCreditcard = 19, - - /// - /// Enum WechatpaySDK for value: wechatpaySDK - /// - [EnumMember(Value = "wechatpaySDK")] - WechatpaySDK = 20, - - /// - /// Enum WechatpayQR for value: wechatpayQR - /// - [EnumMember(Value = "wechatpayQR")] - WechatpayQR = 21, - - /// - /// Enum WechatpayWeb for value: wechatpayWeb - /// - [EnumMember(Value = "wechatpayWeb")] - WechatpayWeb = 22, - - /// - /// Enum MolpayBoost for value: molpay_boost - /// - [EnumMember(Value = "molpay_boost")] - MolpayBoost = 23, - - /// - /// Enum WalletIN for value: wallet_IN - /// - [EnumMember(Value = "wallet_IN")] - WalletIN = 24, - - /// - /// Enum PayuINCashcard for value: payu_IN_cashcard - /// - [EnumMember(Value = "payu_IN_cashcard")] - PayuINCashcard = 25, - - /// - /// Enum PayuINNb for value: payu_IN_nb - /// - [EnumMember(Value = "payu_IN_nb")] - PayuINNb = 26, - - /// - /// Enum UpiQr for value: upi_qr - /// - [EnumMember(Value = "upi_qr")] - UpiQr = 27, - - /// - /// Enum Paytm for value: paytm - /// - [EnumMember(Value = "paytm")] - Paytm = 28, - - /// - /// Enum MolpayEbankingVN for value: molpay_ebanking_VN - /// - [EnumMember(Value = "molpay_ebanking_VN")] - MolpayEbankingVN = 29, - - /// - /// Enum MolpayEbankingMY for value: molpay_ebanking_MY - /// - [EnumMember(Value = "molpay_ebanking_MY")] - MolpayEbankingMY = 30, - - /// - /// Enum MolpayEbankingDirectMY for value: molpay_ebanking_direct_MY - /// - [EnumMember(Value = "molpay_ebanking_direct_MY")] - MolpayEbankingDirectMY = 31, - - /// - /// Enum Swish for value: swish - /// - [EnumMember(Value = "swish")] - Swish = 32, - - /// - /// Enum Bizum for value: bizum - /// - [EnumMember(Value = "bizum")] - Bizum = 33, - - /// - /// Enum Walley for value: walley - /// - [EnumMember(Value = "walley")] - Walley = 34, - - /// - /// Enum WalleyB2b for value: walley_b2b - /// - [EnumMember(Value = "walley_b2b")] - WalleyB2b = 35, - - /// - /// Enum Alma for value: alma - /// - [EnumMember(Value = "alma")] - Alma = 36, - - /// - /// Enum Paypo for value: paypo - /// - [EnumMember(Value = "paypo")] - Paypo = 37, - - /// - /// Enum Scalapay for value: scalapay - /// - [EnumMember(Value = "scalapay")] - Scalapay = 38, - - /// - /// Enum Scalapay3x for value: scalapay_3x - /// - [EnumMember(Value = "scalapay_3x")] - Scalapay3x = 39, - - /// - /// Enum Scalapay4x for value: scalapay_4x - /// - [EnumMember(Value = "scalapay_4x")] - Scalapay4x = 40, - - /// - /// Enum MolpayFpx for value: molpay_fpx - /// - [EnumMember(Value = "molpay_fpx")] - MolpayFpx = 41, - - /// - /// Enum Payme for value: payme - /// - [EnumMember(Value = "payme")] - Payme = 42, - - /// - /// Enum PaymePos for value: payme_pos - /// - [EnumMember(Value = "payme_pos")] - PaymePos = 43, - - /// - /// Enum Konbini for value: konbini - /// - [EnumMember(Value = "konbini")] - Konbini = 44, - - /// - /// Enum DirectEbanking for value: directEbanking - /// - [EnumMember(Value = "directEbanking")] - DirectEbanking = 45, - - /// - /// Enum Boletobancario for value: boletobancario - /// - [EnumMember(Value = "boletobancario")] - Boletobancario = 46, - - /// - /// Enum Neteller for value: neteller - /// - [EnumMember(Value = "neteller")] - Neteller = 47, - - /// - /// Enum Cashticket for value: cashticket - /// - [EnumMember(Value = "cashticket")] - Cashticket = 48, - - /// - /// Enum Ikano for value: ikano - /// - [EnumMember(Value = "ikano")] - Ikano = 49, - - /// - /// Enum Karenmillen for value: karenmillen - /// - [EnumMember(Value = "karenmillen")] - Karenmillen = 50, - - /// - /// Enum Oasis for value: oasis - /// - [EnumMember(Value = "oasis")] - Oasis = 51, - - /// - /// Enum Warehouse for value: warehouse - /// - [EnumMember(Value = "warehouse")] - Warehouse = 52, - - /// - /// Enum PrimeiropayBoleto for value: primeiropay_boleto - /// - [EnumMember(Value = "primeiropay_boleto")] - PrimeiropayBoleto = 53, - - /// - /// Enum Mada for value: mada - /// - [EnumMember(Value = "mada")] - Mada = 54, - - /// - /// Enum Benefit for value: benefit - /// - [EnumMember(Value = "benefit")] - Benefit = 55, - - /// - /// Enum Knet for value: knet - /// - [EnumMember(Value = "knet")] - Knet = 56, - - /// - /// Enum Omannet for value: omannet - /// - [EnumMember(Value = "omannet")] - Omannet = 57, - - /// - /// Enum GopayWallet for value: gopay_wallet - /// - [EnumMember(Value = "gopay_wallet")] - GopayWallet = 58, - - /// - /// Enum KcpNaverpay for value: kcp_naverpay - /// - [EnumMember(Value = "kcp_naverpay")] - KcpNaverpay = 59, - - /// - /// Enum OnlinebankingIN for value: onlinebanking_IN - /// - [EnumMember(Value = "onlinebanking_IN")] - OnlinebankingIN = 60, - - /// - /// Enum Fawry for value: fawry - /// - [EnumMember(Value = "fawry")] - Fawry = 61, - - /// - /// Enum Atome for value: atome - /// - [EnumMember(Value = "atome")] - Atome = 62, - - /// - /// Enum Moneybookers for value: moneybookers - /// - [EnumMember(Value = "moneybookers")] - Moneybookers = 63, - - /// - /// Enum Naps for value: naps - /// - [EnumMember(Value = "naps")] - Naps = 64, - - /// - /// Enum Nordea for value: nordea - /// - [EnumMember(Value = "nordea")] - Nordea = 65, - - /// - /// Enum BoletobancarioBradesco for value: boletobancario_bradesco - /// - [EnumMember(Value = "boletobancario_bradesco")] - BoletobancarioBradesco = 66, - - /// - /// Enum BoletobancarioItau for value: boletobancario_itau - /// - [EnumMember(Value = "boletobancario_itau")] - BoletobancarioItau = 67, - - /// - /// Enum BoletobancarioSantander for value: boletobancario_santander - /// - [EnumMember(Value = "boletobancario_santander")] - BoletobancarioSantander = 68, - - /// - /// Enum BoletobancarioBancodobrasil for value: boletobancario_bancodobrasil - /// - [EnumMember(Value = "boletobancario_bancodobrasil")] - BoletobancarioBancodobrasil = 69, - - /// - /// Enum BoletobancarioHsbc for value: boletobancario_hsbc - /// - [EnumMember(Value = "boletobancario_hsbc")] - BoletobancarioHsbc = 70, - - /// - /// Enum MolpayMaybank2u for value: molpay_maybank2u - /// - [EnumMember(Value = "molpay_maybank2u")] - MolpayMaybank2u = 71, - - /// - /// Enum MolpayCimb for value: molpay_cimb - /// - [EnumMember(Value = "molpay_cimb")] - MolpayCimb = 72, - - /// - /// Enum MolpayRhb for value: molpay_rhb - /// - [EnumMember(Value = "molpay_rhb")] - MolpayRhb = 73, - - /// - /// Enum MolpayAmb for value: molpay_amb - /// - [EnumMember(Value = "molpay_amb")] - MolpayAmb = 74, - - /// - /// Enum MolpayHlb for value: molpay_hlb - /// - [EnumMember(Value = "molpay_hlb")] - MolpayHlb = 75, - - /// - /// Enum MolpayAffinEpg for value: molpay_affin_epg - /// - [EnumMember(Value = "molpay_affin_epg")] - MolpayAffinEpg = 76, - - /// - /// Enum MolpayBankislam for value: molpay_bankislam - /// - [EnumMember(Value = "molpay_bankislam")] - MolpayBankislam = 77, - - /// - /// Enum MolpayPublicbank for value: molpay_publicbank - /// - [EnumMember(Value = "molpay_publicbank")] - MolpayPublicbank = 78, - - /// - /// Enum FpxAgrobank for value: fpx_agrobank - /// - [EnumMember(Value = "fpx_agrobank")] - FpxAgrobank = 79, - - /// - /// Enum Touchngo for value: touchngo - /// - [EnumMember(Value = "touchngo")] - Touchngo = 80, - - /// - /// Enum Maybank2uMae for value: maybank2u_mae - /// - [EnumMember(Value = "maybank2u_mae")] - Maybank2uMae = 81, - - /// - /// Enum Duitnow for value: duitnow - /// - [EnumMember(Value = "duitnow")] - Duitnow = 82, - - /// - /// Enum Promptpay for value: promptpay - /// - [EnumMember(Value = "promptpay")] - Promptpay = 83, - - /// - /// Enum TwintPos for value: twint_pos - /// - [EnumMember(Value = "twint_pos")] - TwintPos = 84, - - /// - /// Enum AlipayHk for value: alipay_hk - /// - [EnumMember(Value = "alipay_hk")] - AlipayHk = 85, - - /// - /// Enum AlipayHkWeb for value: alipay_hk_web - /// - [EnumMember(Value = "alipay_hk_web")] - AlipayHkWeb = 86, - - /// - /// Enum AlipayHkWap for value: alipay_hk_wap - /// - [EnumMember(Value = "alipay_hk_wap")] - AlipayHkWap = 87, - - /// - /// Enum AlipayWap for value: alipay_wap - /// - [EnumMember(Value = "alipay_wap")] - AlipayWap = 88, - - /// - /// Enum Balanceplatform for value: balanceplatform - /// - [EnumMember(Value = "balanceplatform")] - Balanceplatform = 89 - - } - - - /// - /// The payment method type. - /// - /// The payment method type. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The payment method type.. - public PaymentDetails(string checkoutAttemptId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentDetails); - } - - /// - /// Returns true if PaymentDetails instances are equal - /// - /// Instance of PaymentDetails to be compared - /// Boolean - public bool Equals(PaymentDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentDetailsRequest.cs b/Adyen/Model/Checkout/PaymentDetailsRequest.cs deleted file mode 100644 index 0761390a4..000000000 --- a/Adyen/Model/Checkout/PaymentDetailsRequest.cs +++ /dev/null @@ -1,192 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentDetailsRequest - /// - [DataContract(Name = "PaymentDetailsRequest")] - public partial class PaymentDetailsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentDetailsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// authenticationData. - /// details (required). - /// Encoded payment data. For [authorizing a payment after using 3D Secure 2 Authentication-only](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only/#authorise-the-payment-with-adyen): If you received `resultCode`: **AuthenticationNotRequired** in the `/payments` response, use the `threeDSPaymentData` from the same response. If you received `resultCode`: **AuthenticationFinished** in the `/payments` response, use the `action.paymentData` from the same response.. - /// Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously.. - public PaymentDetailsRequest(DetailsRequestAuthenticationData authenticationData = default(DetailsRequestAuthenticationData), PaymentCompletionDetails details = default(PaymentCompletionDetails), string paymentData = default(string), bool? threeDSAuthenticationOnly = default(bool?)) - { - this.Details = details; - this.AuthenticationData = authenticationData; - this.PaymentData = paymentData; - this.ThreeDSAuthenticationOnly = threeDSAuthenticationOnly; - } - - /// - /// Gets or Sets AuthenticationData - /// - [DataMember(Name = "authenticationData", EmitDefaultValue = false)] - public DetailsRequestAuthenticationData AuthenticationData { get; set; } - - /// - /// Gets or Sets Details - /// - [DataMember(Name = "details", IsRequired = false, EmitDefaultValue = false)] - public PaymentCompletionDetails Details { get; set; } - - /// - /// Encoded payment data. For [authorizing a payment after using 3D Secure 2 Authentication-only](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only/#authorise-the-payment-with-adyen): If you received `resultCode`: **AuthenticationNotRequired** in the `/payments` response, use the `threeDSPaymentData` from the same response. If you received `resultCode`: **AuthenticationFinished** in the `/payments` response, use the `action.paymentData` from the same response. - /// - /// Encoded payment data. For [authorizing a payment after using 3D Secure 2 Authentication-only](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only/#authorise-the-payment-with-adyen): If you received `resultCode`: **AuthenticationNotRequired** in the `/payments` response, use the `threeDSPaymentData` from the same response. If you received `resultCode`: **AuthenticationFinished** in the `/payments` response, use the `action.paymentData` from the same response. - [DataMember(Name = "paymentData", EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously. - /// - /// Change the `authenticationOnly` indicator originally set in the `/payments` request. Only needs to be set if you want to modify the value set previously. - [DataMember(Name = "threeDSAuthenticationOnly", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v69. Use `authenticationData.authenticationOnly` instead.")] - public bool? ThreeDSAuthenticationOnly { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentDetailsRequest {\n"); - sb.Append(" AuthenticationData: ").Append(AuthenticationData).Append("\n"); - sb.Append(" Details: ").Append(Details).Append("\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" ThreeDSAuthenticationOnly: ").Append(ThreeDSAuthenticationOnly).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentDetailsRequest); - } - - /// - /// Returns true if PaymentDetailsRequest instances are equal - /// - /// Instance of PaymentDetailsRequest to be compared - /// Boolean - public bool Equals(PaymentDetailsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthenticationData == input.AuthenticationData || - (this.AuthenticationData != null && - this.AuthenticationData.Equals(input.AuthenticationData)) - ) && - ( - this.Details == input.Details || - (this.Details != null && - this.Details.Equals(input.Details)) - ) && - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.ThreeDSAuthenticationOnly == input.ThreeDSAuthenticationOnly || - this.ThreeDSAuthenticationOnly.Equals(input.ThreeDSAuthenticationOnly) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthenticationData != null) - { - hashCode = (hashCode * 59) + this.AuthenticationData.GetHashCode(); - } - if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSAuthenticationOnly.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // PaymentData (string) maxLength - if (this.PaymentData != null && this.PaymentData.Length > 200000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PaymentData, length must be less than 200000.", new [] { "PaymentData" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentDetailsResponse.cs b/Adyen/Model/Checkout/PaymentDetailsResponse.cs deleted file mode 100644 index 857e1cd3b..000000000 --- a/Adyen/Model/Checkout/PaymentDetailsResponse.cs +++ /dev/null @@ -1,479 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentDetailsResponse - /// - [DataContract(Name = "PaymentDetailsResponse")] - public partial class PaymentDetailsResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum AuthenticationFinished for value: AuthenticationFinished - /// - [EnumMember(Value = "AuthenticationFinished")] - AuthenticationFinished = 1, - - /// - /// Enum AuthenticationNotRequired for value: AuthenticationNotRequired - /// - [EnumMember(Value = "AuthenticationNotRequired")] - AuthenticationNotRequired = 2, - - /// - /// Enum Authorised for value: Authorised - /// - [EnumMember(Value = "Authorised")] - Authorised = 3, - - /// - /// Enum Cancelled for value: Cancelled - /// - [EnumMember(Value = "Cancelled")] - Cancelled = 4, - - /// - /// Enum ChallengeShopper for value: ChallengeShopper - /// - [EnumMember(Value = "ChallengeShopper")] - ChallengeShopper = 5, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 6, - - /// - /// Enum IdentifyShopper for value: IdentifyShopper - /// - [EnumMember(Value = "IdentifyShopper")] - IdentifyShopper = 7, - - /// - /// Enum PartiallyAuthorised for value: PartiallyAuthorised - /// - [EnumMember(Value = "PartiallyAuthorised")] - PartiallyAuthorised = 8, - - /// - /// Enum Pending for value: Pending - /// - [EnumMember(Value = "Pending")] - Pending = 9, - - /// - /// Enum PresentToShopper for value: PresentToShopper - /// - [EnumMember(Value = "PresentToShopper")] - PresentToShopper = 10, - - /// - /// Enum Received for value: Received - /// - [EnumMember(Value = "Received")] - Received = 11, - - /// - /// Enum RedirectShopper for value: RedirectShopper - /// - [EnumMember(Value = "RedirectShopper")] - RedirectShopper = 12, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 13, - - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 14 - - } - - - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.. - /// amount. - /// Donation Token containing payment details for Adyen Giving.. - /// fraudResult. - /// The reference used during the /payments request.. - /// order. - /// paymentMethod. - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).. - /// Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).. - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state.. - /// The shopperLocale.. - /// threeDS2ResponseData. - /// threeDS2Result. - /// When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`.. - public PaymentDetailsResponse(Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), string donationToken = default(string), FraudResult fraudResult = default(FraudResult), string merchantReference = default(string), CheckoutOrderResponse order = default(CheckoutOrderResponse), ResponsePaymentMethod paymentMethod = default(ResponsePaymentMethod), string pspReference = default(string), string refusalReason = default(string), string refusalReasonCode = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?), string shopperLocale = default(string), ThreeDS2ResponseData threeDS2ResponseData = default(ThreeDS2ResponseData), ThreeDS2Result threeDS2Result = default(ThreeDS2Result), string threeDSPaymentData = default(string)) - { - this.AdditionalData = additionalData; - this.Amount = amount; - this.DonationToken = donationToken; - this.FraudResult = fraudResult; - this.MerchantReference = merchantReference; - this.Order = order; - this.PaymentMethod = paymentMethod; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.RefusalReasonCode = refusalReasonCode; - this.ResultCode = resultCode; - this.ShopperLocale = shopperLocale; - this.ThreeDS2ResponseData = threeDS2ResponseData; - this.ThreeDS2Result = threeDS2Result; - this.ThreeDSPaymentData = threeDSPaymentData; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Donation Token containing payment details for Adyen Giving. - /// - /// Donation Token containing payment details for Adyen Giving. - [DataMember(Name = "donationToken", EmitDefaultValue = false)] - public string DonationToken { get; set; } - - /// - /// Gets or Sets FraudResult - /// - [DataMember(Name = "fraudResult", EmitDefaultValue = false)] - public FraudResult FraudResult { get; set; } - - /// - /// The reference used during the /payments request. - /// - /// The reference used during the /payments request. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// Gets or Sets Order - /// - [DataMember(Name = "order", EmitDefaultValue = false)] - public CheckoutOrderResponse Order { get; set; } - - /// - /// Gets or Sets PaymentMethod - /// - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public ResponsePaymentMethod PaymentMethod { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - /// - /// Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - [DataMember(Name = "refusalReasonCode", EmitDefaultValue = false)] - public string RefusalReasonCode { get; set; } - - /// - /// The shopperLocale. - /// - /// The shopperLocale. - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ThreeDS2ResponseData - /// - [DataMember(Name = "threeDS2ResponseData", EmitDefaultValue = false)] - public ThreeDS2ResponseData ThreeDS2ResponseData { get; set; } - - /// - /// Gets or Sets ThreeDS2Result - /// - [DataMember(Name = "threeDS2Result", EmitDefaultValue = false)] - public ThreeDS2Result ThreeDS2Result { get; set; } - - /// - /// When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`. - /// - /// When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`. - [DataMember(Name = "threeDSPaymentData", EmitDefaultValue = false)] - public string ThreeDSPaymentData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentDetailsResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" DonationToken: ").Append(DonationToken).Append("\n"); - sb.Append(" FraudResult: ").Append(FraudResult).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" Order: ").Append(Order).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" RefusalReasonCode: ").Append(RefusalReasonCode).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ThreeDS2ResponseData: ").Append(ThreeDS2ResponseData).Append("\n"); - sb.Append(" ThreeDS2Result: ").Append(ThreeDS2Result).Append("\n"); - sb.Append(" ThreeDSPaymentData: ").Append(ThreeDSPaymentData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentDetailsResponse); - } - - /// - /// Returns true if PaymentDetailsResponse instances are equal - /// - /// Instance of PaymentDetailsResponse to be compared - /// Boolean - public bool Equals(PaymentDetailsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.DonationToken == input.DonationToken || - (this.DonationToken != null && - this.DonationToken.Equals(input.DonationToken)) - ) && - ( - this.FraudResult == input.FraudResult || - (this.FraudResult != null && - this.FraudResult.Equals(input.FraudResult)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.Order == input.Order || - (this.Order != null && - this.Order.Equals(input.Order)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.RefusalReasonCode == input.RefusalReasonCode || - (this.RefusalReasonCode != null && - this.RefusalReasonCode.Equals(input.RefusalReasonCode)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ThreeDS2ResponseData == input.ThreeDS2ResponseData || - (this.ThreeDS2ResponseData != null && - this.ThreeDS2ResponseData.Equals(input.ThreeDS2ResponseData)) - ) && - ( - this.ThreeDS2Result == input.ThreeDS2Result || - (this.ThreeDS2Result != null && - this.ThreeDS2Result.Equals(input.ThreeDS2Result)) - ) && - ( - this.ThreeDSPaymentData == input.ThreeDSPaymentData || - (this.ThreeDSPaymentData != null && - this.ThreeDSPaymentData.Equals(input.ThreeDSPaymentData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.DonationToken != null) - { - hashCode = (hashCode * 59) + this.DonationToken.GetHashCode(); - } - if (this.FraudResult != null) - { - hashCode = (hashCode * 59) + this.FraudResult.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.Order != null) - { - hashCode = (hashCode * 59) + this.Order.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - if (this.RefusalReasonCode != null) - { - hashCode = (hashCode * 59) + this.RefusalReasonCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ThreeDS2ResponseData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2ResponseData.GetHashCode(); - } - if (this.ThreeDS2Result != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2Result.GetHashCode(); - } - if (this.ThreeDSPaymentData != null) - { - hashCode = (hashCode * 59) + this.ThreeDSPaymentData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentLinkRequest.cs b/Adyen/Model/Checkout/PaymentLinkRequest.cs deleted file mode 100644 index b21f923cb..000000000 --- a/Adyen/Model/Checkout/PaymentLinkRequest.cs +++ /dev/null @@ -1,1037 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentLinkRequest - /// - [DataContract(Name = "PaymentLinkRequest")] - public partial class PaymentLinkRequest : IEquatable, IValidatableObject - { - /// - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// Defines RequiredShopperFields - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RequiredShopperFieldsEnum - { - /// - /// Enum BillingAddress for value: billingAddress - /// - [EnumMember(Value = "billingAddress")] - BillingAddress = 1, - - /// - /// Enum DeliveryAddress for value: deliveryAddress - /// - [EnumMember(Value = "deliveryAddress")] - DeliveryAddress = 2, - - /// - /// Enum ShopperEmail for value: shopperEmail - /// - [EnumMember(Value = "shopperEmail")] - ShopperEmail = 3, - - /// - /// Enum ShopperName for value: shopperName - /// - [EnumMember(Value = "shopperName")] - ShopperName = 4, - - /// - /// Enum TelephoneNumber for value: telephoneNumber - /// - [EnumMember(Value = "telephoneNumber")] - TelephoneNumber = 5 - - } - - - - /// - /// List of fields that the shopper has to provide on the payment page before completing the payment. For more information, refer to [Provide shopper information](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#shopper-information). Possible values: * **billingAddress** – The address where to send the invoice. * **deliveryAddress** – The address where the purchased goods should be delivered. * **shopperEmail** – The shopper's email address. * **shopperName** – The shopper's full name. * **telephoneNumber** – The shopper's phone number. - /// - /// List of fields that the shopper has to provide on the payment page before completing the payment. For more information, refer to [Provide shopper information](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#shopper-information). Possible values: * **billingAddress** – The address where to send the invoice. * **deliveryAddress** – The address where the purchased goods should be delivered. * **shopperEmail** – The shopper's email address. * **shopperName** – The shopper's full name. * **telephoneNumber** – The shopper's phone number. - [DataMember(Name = "requiredShopperFields", EmitDefaultValue = false)] - public List RequiredShopperFields { get; set; } - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. - [JsonConverter(typeof(StringEnumConverter))] - public enum StorePaymentMethodModeEnum - { - /// - /// Enum AskForConsent for value: askForConsent - /// - [EnumMember(Value = "askForConsent")] - AskForConsent = 1, - - /// - /// Enum Disabled for value: disabled - /// - [EnumMember(Value = "disabled")] - Disabled = 2, - - /// - /// Enum Enabled for value: enabled - /// - [EnumMember(Value = "enabled")] - Enabled = 3 - - } - - - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. - [DataMember(Name = "storePaymentMethodMode", EmitDefaultValue = false)] - public StorePaymentMethodModeEnum? StorePaymentMethodMode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentLinkRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// amount (required). - /// applicationInfo. - /// billingAddress. - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// The delay between the authorisation and scheduled auto-capture, specified in hours.. - /// The shopper's two-letter country code.. - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD. - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.. - /// deliveryAddress. - /// A short description visible on the payment page. Maximum length: 280 characters.. - /// The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created.. - /// fundOrigin. - /// fundRecipient. - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options.. - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip.. - /// Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture).. - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.. - /// The merchant account identifier for which the payment link is created. (required). - /// This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle.. - /// Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID.. - /// platformChargebackLogic. - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. . - /// A reference that is used to uniquely identify the payment in future communications about the payment status. (required). - /// List of fields that the shopper has to provide on the payment page before completing the payment. For more information, refer to [Provide shopper information](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#shopper-information). Possible values: * **billingAddress** – The address where to send the invoice. * **deliveryAddress** – The address where the purchased goods should be delivered. * **shopperEmail** – The shopper's email address. * **shopperName** – The shopper's full name. * **telephoneNumber** – The shopper's phone number. . - /// Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL.. - /// Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only.. - /// riskData. - /// The shopper's email address.. - /// The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language).. - /// shopperName. - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. - /// Set to **false** to hide the button that lets the shopper remove a stored payment method. (default to true). - /// The shopper's social security number.. - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. (default to false). - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).. - /// The physical store, for which this payment is processed.. - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter.. - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication.. - /// A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area.. - /// threeDS2RequestData. - public PaymentLinkRequest(List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), Address billingAddress = default(Address), List blockedPaymentMethods = default(List), int? captureDelayHours = default(int?), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), Address deliveryAddress = default(Address), string description = default(string), DateTime expiresAt = default(DateTime), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), Dictionary installmentOptions = default(Dictionary), List lineItems = default(List), bool? manualCapture = default(bool?), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string reference = default(string), List requiredShopperFields = default(List), string returnUrl = default(string), bool? reusable = default(bool?), RiskData riskData = default(RiskData), string shopperEmail = default(string), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), bool? showRemovePaymentMethodButton = true, string socialSecurityNumber = default(string), bool? splitCardFundingSources = false, List splits = default(List), string store = default(string), StorePaymentMethodModeEnum? storePaymentMethodMode = default(StorePaymentMethodModeEnum?), string telephoneNumber = default(string), string themeId = default(string), CheckoutSessionThreeDS2RequestData threeDS2RequestData = default(CheckoutSessionThreeDS2RequestData)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.Reference = reference; - this.AllowedPaymentMethods = allowedPaymentMethods; - this.ApplicationInfo = applicationInfo; - this.BillingAddress = billingAddress; - this.BlockedPaymentMethods = blockedPaymentMethods; - this.CaptureDelayHours = captureDelayHours; - this.CountryCode = countryCode; - this.DateOfBirth = dateOfBirth; - this.DeliverAt = deliverAt; - this.DeliveryAddress = deliveryAddress; - this.Description = description; - this.ExpiresAt = expiresAt; - this.FundOrigin = fundOrigin; - this.FundRecipient = fundRecipient; - this.InstallmentOptions = installmentOptions; - this.LineItems = lineItems; - this.ManualCapture = manualCapture; - this.Mcc = mcc; - this.MerchantOrderReference = merchantOrderReference; - this.Metadata = metadata; - this.PlatformChargebackLogic = platformChargebackLogic; - this.RecurringProcessingModel = recurringProcessingModel; - this.RequiredShopperFields = requiredShopperFields; - this.ReturnUrl = returnUrl; - this.Reusable = reusable; - this.RiskData = riskData; - this.ShopperEmail = shopperEmail; - this.ShopperLocale = shopperLocale; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.ShopperStatement = shopperStatement; - this.ShowRemovePaymentMethodButton = showRemovePaymentMethodButton; - this.SocialSecurityNumber = socialSecurityNumber; - this.SplitCardFundingSources = splitCardFundingSources; - this.Splits = splits; - this.Store = store; - this.StorePaymentMethodMode = storePaymentMethodMode; - this.TelephoneNumber = telephoneNumber; - this.ThemeId = themeId; - this.ThreeDS2RequestData = threeDS2RequestData; - } - - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "allowedPaymentMethods", EmitDefaultValue = false)] - public List AllowedPaymentMethods { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)] - public List BlockedPaymentMethods { get; set; } - - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - [DataMember(Name = "captureDelayHours", EmitDefaultValue = false)] - public int? CaptureDelayHours { get; set; } - - /// - /// The shopper's two-letter country code. - /// - /// The shopper's two-letter country code. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "deliverAt", EmitDefaultValue = false)] - public DateTime DeliverAt { get; set; } - - /// - /// Gets or Sets DeliveryAddress - /// - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public Address DeliveryAddress { get; set; } - - /// - /// A short description visible on the payment page. Maximum length: 280 characters. - /// - /// A short description visible on the payment page. Maximum length: 280 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. - /// - /// The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. - [DataMember(Name = "expiresAt", EmitDefaultValue = false)] - public DateTime ExpiresAt { get; set; } - - /// - /// Gets or Sets FundOrigin - /// - [DataMember(Name = "fundOrigin", EmitDefaultValue = false)] - public FundOrigin FundOrigin { get; set; } - - /// - /// Gets or Sets FundRecipient - /// - [DataMember(Name = "fundRecipient", EmitDefaultValue = false)] - public FundRecipient FundRecipient { get; set; } - - /// - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. - /// - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. - [DataMember(Name = "installmentOptions", EmitDefaultValue = false)] - public Dictionary InstallmentOptions { get; set; } - - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip. - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture). - /// - /// Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture). - [DataMember(Name = "manualCapture", EmitDefaultValue = false)] - public bool? ManualCapture { get; set; } - - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The merchant account identifier for which the payment link is created. - /// - /// The merchant account identifier for which the payment link is created. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. - [DataMember(Name = "merchantOrderReference", EmitDefaultValue = false)] - public string MerchantOrderReference { get; set; } - - /// - /// Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID. - /// - /// Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets PlatformChargebackLogic - /// - [DataMember(Name = "platformChargebackLogic", EmitDefaultValue = false)] - public PlatformChargebackLogic PlatformChargebackLogic { get; set; } - - /// - /// A reference that is used to uniquely identify the payment in future communications about the payment status. - /// - /// A reference that is used to uniquely identify the payment in future communications about the payment status. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. - /// - /// Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. - [DataMember(Name = "returnUrl", EmitDefaultValue = false)] - public string ReturnUrl { get; set; } - - /// - /// Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. - /// - /// Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. - [DataMember(Name = "reusable", EmitDefaultValue = false)] - public bool? Reusable { get; set; } - - /// - /// Gets or Sets RiskData - /// - [DataMember(Name = "riskData", EmitDefaultValue = false)] - public RiskData RiskData { get; set; } - - /// - /// The shopper's email address. - /// - /// The shopper's email address. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). - /// - /// The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// Set to **false** to hide the button that lets the shopper remove a stored payment method. - /// - /// Set to **false** to hide the button that lets the shopper remove a stored payment method. - [DataMember(Name = "showRemovePaymentMethodButton", EmitDefaultValue = false)] - public bool? ShowRemovePaymentMethodButton { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - [DataMember(Name = "splitCardFundingSources", EmitDefaultValue = false)] - public bool? SplitCardFundingSources { get; set; } - - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// The physical store, for which this payment is processed. - /// - /// The physical store, for which this payment is processed. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area. - /// - /// A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area. - [DataMember(Name = "themeId", EmitDefaultValue = false)] - public string ThemeId { get; set; } - - /// - /// Gets or Sets ThreeDS2RequestData - /// - [DataMember(Name = "threeDS2RequestData", EmitDefaultValue = false)] - public CheckoutSessionThreeDS2RequestData ThreeDS2RequestData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentLinkRequest {\n"); - sb.Append(" AllowedPaymentMethods: ").Append(AllowedPaymentMethods).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" BlockedPaymentMethods: ").Append(BlockedPaymentMethods).Append("\n"); - sb.Append(" CaptureDelayHours: ").Append(CaptureDelayHours).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DeliverAt: ").Append(DeliverAt).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" FundOrigin: ").Append(FundOrigin).Append("\n"); - sb.Append(" FundRecipient: ").Append(FundRecipient).Append("\n"); - sb.Append(" InstallmentOptions: ").Append(InstallmentOptions).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" ManualCapture: ").Append(ManualCapture).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantOrderReference: ").Append(MerchantOrderReference).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PlatformChargebackLogic: ").Append(PlatformChargebackLogic).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" RequiredShopperFields: ").Append(RequiredShopperFields).Append("\n"); - sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); - sb.Append(" Reusable: ").Append(Reusable).Append("\n"); - sb.Append(" RiskData: ").Append(RiskData).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" ShowRemovePaymentMethodButton: ").Append(ShowRemovePaymentMethodButton).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" SplitCardFundingSources: ").Append(SplitCardFundingSources).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StorePaymentMethodMode: ").Append(StorePaymentMethodMode).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" ThemeId: ").Append(ThemeId).Append("\n"); - sb.Append(" ThreeDS2RequestData: ").Append(ThreeDS2RequestData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentLinkRequest); - } - - /// - /// Returns true if PaymentLinkRequest instances are equal - /// - /// Instance of PaymentLinkRequest to be compared - /// Boolean - public bool Equals(PaymentLinkRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.BlockedPaymentMethods == input.BlockedPaymentMethods || - this.BlockedPaymentMethods != null && - input.BlockedPaymentMethods != null && - this.BlockedPaymentMethods.SequenceEqual(input.BlockedPaymentMethods) - ) && - ( - this.CaptureDelayHours == input.CaptureDelayHours || - this.CaptureDelayHours.Equals(input.CaptureDelayHours) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DeliverAt == input.DeliverAt || - (this.DeliverAt != null && - this.DeliverAt.Equals(input.DeliverAt)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.FundOrigin == input.FundOrigin || - (this.FundOrigin != null && - this.FundOrigin.Equals(input.FundOrigin)) - ) && - ( - this.FundRecipient == input.FundRecipient || - (this.FundRecipient != null && - this.FundRecipient.Equals(input.FundRecipient)) - ) && - ( - this.InstallmentOptions == input.InstallmentOptions || - this.InstallmentOptions != null && - input.InstallmentOptions != null && - this.InstallmentOptions.SequenceEqual(input.InstallmentOptions) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.ManualCapture == input.ManualCapture || - this.ManualCapture.Equals(input.ManualCapture) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantOrderReference == input.MerchantOrderReference || - (this.MerchantOrderReference != null && - this.MerchantOrderReference.Equals(input.MerchantOrderReference)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PlatformChargebackLogic == input.PlatformChargebackLogic || - (this.PlatformChargebackLogic != null && - this.PlatformChargebackLogic.Equals(input.PlatformChargebackLogic)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.RequiredShopperFields == input.RequiredShopperFields || - this.RequiredShopperFields.SequenceEqual(input.RequiredShopperFields) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ) && - ( - this.Reusable == input.Reusable || - this.Reusable.Equals(input.Reusable) - ) && - ( - this.RiskData == input.RiskData || - (this.RiskData != null && - this.RiskData.Equals(input.RiskData)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.ShowRemovePaymentMethodButton == input.ShowRemovePaymentMethodButton || - this.ShowRemovePaymentMethodButton.Equals(input.ShowRemovePaymentMethodButton) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.SplitCardFundingSources == input.SplitCardFundingSources || - this.SplitCardFundingSources.Equals(input.SplitCardFundingSources) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StorePaymentMethodMode == input.StorePaymentMethodMode || - this.StorePaymentMethodMode.Equals(input.StorePaymentMethodMode) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.ThemeId == input.ThemeId || - (this.ThemeId != null && - this.ThemeId.Equals(input.ThemeId)) - ) && - ( - this.ThreeDS2RequestData == input.ThreeDS2RequestData || - (this.ThreeDS2RequestData != null && - this.ThreeDS2RequestData.Equals(input.ThreeDS2RequestData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.BlockedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.BlockedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CaptureDelayHours.GetHashCode(); - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DeliverAt != null) - { - hashCode = (hashCode * 59) + this.DeliverAt.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.FundOrigin != null) - { - hashCode = (hashCode * 59) + this.FundOrigin.GetHashCode(); - } - if (this.FundRecipient != null) - { - hashCode = (hashCode * 59) + this.FundRecipient.GetHashCode(); - } - if (this.InstallmentOptions != null) - { - hashCode = (hashCode * 59) + this.InstallmentOptions.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ManualCapture.GetHashCode(); - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantOrderReference != null) - { - hashCode = (hashCode * 59) + this.MerchantOrderReference.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PlatformChargebackLogic != null) - { - hashCode = (hashCode * 59) + this.PlatformChargebackLogic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RequiredShopperFields.GetHashCode(); - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Reusable.GetHashCode(); - if (this.RiskData != null) - { - hashCode = (hashCode * 59) + this.RiskData.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShowRemovePaymentMethodButton.GetHashCode(); - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SplitCardFundingSources.GetHashCode(); - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StorePaymentMethodMode.GetHashCode(); - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.ThemeId != null) - { - hashCode = (hashCode * 59) + this.ThemeId.GetHashCode(); - } - if (this.ThreeDS2RequestData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2RequestData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CountryCode (string) maxLength - if (this.CountryCode != null && this.CountryCode.Length > 100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 100.", new [] { "CountryCode" }); - } - - // Mcc (string) maxLength - if (this.Mcc != null && this.Mcc.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Mcc, length must be less than 16.", new [] { "Mcc" }); - } - - // MerchantOrderReference (string) maxLength - if (this.MerchantOrderReference != null && this.MerchantOrderReference.Length > 1000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MerchantOrderReference, length must be less than 1000.", new [] { "MerchantOrderReference" }); - } - - // ReturnUrl (string) maxLength - if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); - } - - // ShopperEmail (string) maxLength - if (this.ShopperEmail != null && this.ShopperEmail.Length > 500) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperEmail, length must be less than 500.", new [] { "ShopperEmail" }); - } - - // ShopperLocale (string) maxLength - if (this.ShopperLocale != null && this.ShopperLocale.Length > 32) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperLocale, length must be less than 32.", new [] { "ShopperLocale" }); - } - - // ShopperReference (string) maxLength - if (this.ShopperReference != null && this.ShopperReference.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be less than 256.", new [] { "ShopperReference" }); - } - - // ShopperReference (string) minLength - if (this.ShopperReference != null && this.ShopperReference.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); - } - - // ShopperStatement (string) maxLength - if (this.ShopperStatement != null && this.ShopperStatement.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperStatement, length must be less than 10000.", new [] { "ShopperStatement" }); - } - - // SocialSecurityNumber (string) maxLength - if (this.SocialSecurityNumber != null && this.SocialSecurityNumber.Length > 32) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SocialSecurityNumber, length must be less than 32.", new [] { "SocialSecurityNumber" }); - } - - // TelephoneNumber (string) maxLength - if (this.TelephoneNumber != null && this.TelephoneNumber.Length > 32) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TelephoneNumber, length must be less than 32.", new [] { "TelephoneNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentLinkResponse.cs b/Adyen/Model/Checkout/PaymentLinkResponse.cs deleted file mode 100644 index 6895075ad..000000000 --- a/Adyen/Model/Checkout/PaymentLinkResponse.cs +++ /dev/null @@ -1,1144 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentLinkResponse - /// - [DataContract(Name = "PaymentLinkResponse")] - public partial class PaymentLinkResponse : IEquatable, IValidatableObject - { - /// - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// Defines RequiredShopperFields - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RequiredShopperFieldsEnum - { - /// - /// Enum BillingAddress for value: billingAddress - /// - [EnumMember(Value = "billingAddress")] - BillingAddress = 1, - - /// - /// Enum DeliveryAddress for value: deliveryAddress - /// - [EnumMember(Value = "deliveryAddress")] - DeliveryAddress = 2, - - /// - /// Enum ShopperEmail for value: shopperEmail - /// - [EnumMember(Value = "shopperEmail")] - ShopperEmail = 3, - - /// - /// Enum ShopperName for value: shopperName - /// - [EnumMember(Value = "shopperName")] - ShopperName = 4, - - /// - /// Enum TelephoneNumber for value: telephoneNumber - /// - [EnumMember(Value = "telephoneNumber")] - TelephoneNumber = 5 - - } - - - - /// - /// List of fields that the shopper has to provide on the payment page before completing the payment. For more information, refer to [Provide shopper information](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#shopper-information). Possible values: * **billingAddress** – The address where to send the invoice. * **deliveryAddress** – The address where the purchased goods should be delivered. * **shopperEmail** – The shopper's email address. * **shopperName** – The shopper's full name. * **telephoneNumber** – The shopper's phone number. - /// - /// List of fields that the shopper has to provide on the payment page before completing the payment. For more information, refer to [Provide shopper information](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#shopper-information). Possible values: * **billingAddress** – The address where to send the invoice. * **deliveryAddress** – The address where the purchased goods should be delivered. * **shopperEmail** – The shopper's email address. * **shopperName** – The shopper's full name. * **telephoneNumber** – The shopper's phone number. - [DataMember(Name = "requiredShopperFields", EmitDefaultValue = false)] - public List RequiredShopperFields { get; set; } - /// - /// Status of the payment link. Possible values: * **active**: The link can be used to make payments. * **expired**: The expiry date for the payment link has passed. Shoppers can no longer use the link to make payments. * **completed**: The shopper completed the payment. * **paymentPending**: The shopper is in the process of making the payment. Applies to payment methods with an asynchronous flow. - /// - /// Status of the payment link. Possible values: * **active**: The link can be used to make payments. * **expired**: The expiry date for the payment link has passed. Shoppers can no longer use the link to make payments. * **completed**: The shopper completed the payment. * **paymentPending**: The shopper is in the process of making the payment. Applies to payment methods with an asynchronous flow. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Completed for value: completed - /// - [EnumMember(Value = "completed")] - Completed = 2, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 3, - - /// - /// Enum Paid for value: paid - /// - [EnumMember(Value = "paid")] - Paid = 4, - - /// - /// Enum PaymentPending for value: paymentPending - /// - [EnumMember(Value = "paymentPending")] - PaymentPending = 5 - - } - - - /// - /// Status of the payment link. Possible values: * **active**: The link can be used to make payments. * **expired**: The expiry date for the payment link has passed. Shoppers can no longer use the link to make payments. * **completed**: The shopper completed the payment. * **paymentPending**: The shopper is in the process of making the payment. Applies to payment methods with an asynchronous flow. - /// - /// Status of the payment link. Possible values: * **active**: The link can be used to make payments. * **expired**: The expiry date for the payment link has passed. Shoppers can no longer use the link to make payments. * **completed**: The shopper completed the payment. * **paymentPending**: The shopper is in the process of making the payment. Applies to payment methods with an asynchronous flow. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. - [JsonConverter(typeof(StringEnumConverter))] - public enum StorePaymentMethodModeEnum - { - /// - /// Enum AskForConsent for value: askForConsent - /// - [EnumMember(Value = "askForConsent")] - AskForConsent = 1, - - /// - /// Enum Disabled for value: disabled - /// - [EnumMember(Value = "disabled")] - Disabled = 2, - - /// - /// Enum Enabled for value: enabled - /// - [EnumMember(Value = "enabled")] - Enabled = 3 - - } - - - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. - /// - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter. - [DataMember(Name = "storePaymentMethodMode", EmitDefaultValue = false)] - public StorePaymentMethodModeEnum? StorePaymentMethodMode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentLinkResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// amount (required). - /// applicationInfo. - /// billingAddress. - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// The delay between the authorisation and scheduled auto-capture, specified in hours.. - /// The shopper's two-letter country code.. - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD. - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.. - /// deliveryAddress. - /// A short description visible on the payment page. Maximum length: 280 characters.. - /// The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created.. - /// fundOrigin. - /// fundRecipient. - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options.. - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip.. - /// Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture).. - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.. - /// The merchant account identifier for which the payment link is created. (required). - /// This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle.. - /// Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID.. - /// platformChargebackLogic. - /// Defines a recurring payment type. Required when `storePaymentMethodMode` is set to **askForConsent** or **enabled**. Possible values: * **Subscription** – A transaction for a fixed or variable amount, which follows a fixed schedule. * **CardOnFile** – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * **UnscheduledCardOnFile** – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or has variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. . - /// A reference that is used to uniquely identify the payment in future communications about the payment status. (required). - /// List of fields that the shopper has to provide on the payment page before completing the payment. For more information, refer to [Provide shopper information](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#shopper-information). Possible values: * **billingAddress** – The address where to send the invoice. * **deliveryAddress** – The address where the purchased goods should be delivered. * **shopperEmail** – The shopper's email address. * **shopperName** – The shopper's full name. * **telephoneNumber** – The shopper's phone number. . - /// Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL.. - /// Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only.. - /// riskData. - /// The shopper's email address.. - /// The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language).. - /// shopperName. - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. - /// Set to **false** to hide the button that lets the shopper remove a stored payment method. (default to true). - /// The shopper's social security number.. - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. (default to false). - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).. - /// Status of the payment link. Possible values: * **active**: The link can be used to make payments. * **expired**: The expiry date for the payment link has passed. Shoppers can no longer use the link to make payments. * **completed**: The shopper completed the payment. * **paymentPending**: The shopper is in the process of making the payment. Applies to payment methods with an asynchronous flow. (required). - /// The physical store, for which this payment is processed.. - /// Indicates if the details of the payment method will be stored for the shopper. Possible values: * **disabled** – No details will be stored (default). * **askForConsent** – If the `shopperReference` is provided, the UI lets the shopper choose if they want their payment details to be stored. * **enabled** – If the `shopperReference` is provided, the details will be stored without asking the shopper for consent. When set to **askForConsent** or **enabled**, you must also include the `recurringProcessingModel` parameter.. - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication.. - /// A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area.. - /// threeDS2RequestData. - /// The date when the payment link status was updated. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**.. - public PaymentLinkResponse(List allowedPaymentMethods = default(List), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), Address billingAddress = default(Address), List blockedPaymentMethods = default(List), int? captureDelayHours = default(int?), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), DateTime deliverAt = default(DateTime), Address deliveryAddress = default(Address), string description = default(string), DateTime expiresAt = default(DateTime), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), Dictionary installmentOptions = default(Dictionary), List lineItems = default(List), bool? manualCapture = default(bool?), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), Dictionary metadata = default(Dictionary), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string reference = default(string), List requiredShopperFields = default(List), string returnUrl = default(string), bool? reusable = default(bool?), RiskData riskData = default(RiskData), string shopperEmail = default(string), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), bool? showRemovePaymentMethodButton = true, string socialSecurityNumber = default(string), bool? splitCardFundingSources = false, List splits = default(List), StatusEnum status = default(StatusEnum), string store = default(string), StorePaymentMethodModeEnum? storePaymentMethodMode = default(StorePaymentMethodModeEnum?), string telephoneNumber = default(string), string themeId = default(string), CheckoutSessionThreeDS2RequestData threeDS2RequestData = default(CheckoutSessionThreeDS2RequestData), DateTime updatedAt = default(DateTime)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.Reference = reference; - this.Status = status; - this.AllowedPaymentMethods = allowedPaymentMethods; - this.ApplicationInfo = applicationInfo; - this.BillingAddress = billingAddress; - this.BlockedPaymentMethods = blockedPaymentMethods; - this.CaptureDelayHours = captureDelayHours; - this.CountryCode = countryCode; - this.DateOfBirth = dateOfBirth; - this.DeliverAt = deliverAt; - this.DeliveryAddress = deliveryAddress; - this.Description = description; - this.ExpiresAt = expiresAt; - this.FundOrigin = fundOrigin; - this.FundRecipient = fundRecipient; - this.InstallmentOptions = installmentOptions; - this.LineItems = lineItems; - this.ManualCapture = manualCapture; - this.Mcc = mcc; - this.MerchantOrderReference = merchantOrderReference; - this.Metadata = metadata; - this.PlatformChargebackLogic = platformChargebackLogic; - this.RecurringProcessingModel = recurringProcessingModel; - this.RequiredShopperFields = requiredShopperFields; - this.ReturnUrl = returnUrl; - this.Reusable = reusable; - this.RiskData = riskData; - this.ShopperEmail = shopperEmail; - this.ShopperLocale = shopperLocale; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.ShopperStatement = shopperStatement; - this.ShowRemovePaymentMethodButton = showRemovePaymentMethodButton; - this.SocialSecurityNumber = socialSecurityNumber; - this.SplitCardFundingSources = splitCardFundingSources; - this.Splits = splits; - this.Store = store; - this.StorePaymentMethodMode = storePaymentMethodMode; - this.TelephoneNumber = telephoneNumber; - this.ThemeId = themeId; - this.ThreeDS2RequestData = threeDS2RequestData; - this.UpdatedAt = updatedAt; - } - - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "allowedPaymentMethods", EmitDefaultValue = false)] - public List AllowedPaymentMethods { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)] - public List BlockedPaymentMethods { get; set; } - - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - [DataMember(Name = "captureDelayHours", EmitDefaultValue = false)] - public int? CaptureDelayHours { get; set; } - - /// - /// The shopper's two-letter country code. - /// - /// The shopper's two-letter country code. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the purchased goods should be delivered. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "deliverAt", EmitDefaultValue = false)] - public DateTime DeliverAt { get; set; } - - /// - /// Gets or Sets DeliveryAddress - /// - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public Address DeliveryAddress { get; set; } - - /// - /// A short description visible on the payment page. Maximum length: 280 characters. - /// - /// A short description visible on the payment page. Maximum length: 280 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. - /// - /// The date when the payment link expires. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format with time zone offset: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. The maximum expiry date is 70 days after the payment link is created. If not provided, the payment link expires 24 hours after it was created. - [DataMember(Name = "expiresAt", EmitDefaultValue = false)] - public DateTime ExpiresAt { get; set; } - - /// - /// Gets or Sets FundOrigin - /// - [DataMember(Name = "fundOrigin", EmitDefaultValue = false)] - public FundOrigin FundOrigin { get; set; } - - /// - /// Gets or Sets FundRecipient - /// - [DataMember(Name = "fundRecipient", EmitDefaultValue = false)] - public FundRecipient FundRecipient { get; set; } - - /// - /// A unique identifier of the payment link. - /// - /// A unique identifier of the payment link. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. - /// - /// A set of key-value pairs that specifies the installment options available per payment method. The key must be a payment method name in lowercase. For example, **card** to specify installment options for all cards, or **visa** or **mc**. The value must be an object containing the installment options. - [DataMember(Name = "installmentOptions", EmitDefaultValue = false)] - public Dictionary InstallmentOptions { get; set; } - - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip. - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. This parameter is required for open invoice (_buy now, pay later_) payment methods such Afterpay, Clearpay, Klarna, RatePay, Riverty, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture). - /// - /// Indicates if the payment must be [captured manually](https://docs.adyen.com/online-payments/capture). - [DataMember(Name = "manualCapture", EmitDefaultValue = false)] - public bool? ManualCapture { get; set; } - - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The merchant account identifier for which the payment link is created. - /// - /// The merchant account identifier for which the payment link is created. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (for example, order auth-rate). The reference should be unique per billing cycle. - [DataMember(Name = "merchantOrderReference", EmitDefaultValue = false)] - public string MerchantOrderReference { get; set; } - - /// - /// Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID. - /// - /// Metadata consists of entries, each of which includes a key and a value. Limitations: * Maximum 20 key-value pairs per request. Otherwise, error \"177\" occurs: \"Metadata size exceeds limit\" * Maximum 20 characters per key. Otherwise, error \"178\" occurs: \"Metadata key size exceeds limit\" * A key cannot have the name `checkout.linkId`. Any value that you provide with this key is going to be replaced by the real payment link ID. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets PlatformChargebackLogic - /// - [DataMember(Name = "platformChargebackLogic", EmitDefaultValue = false)] - public PlatformChargebackLogic PlatformChargebackLogic { get; set; } - - /// - /// A reference that is used to uniquely identify the payment in future communications about the payment status. - /// - /// A reference that is used to uniquely identify the payment in future communications about the payment status. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. - /// - /// Website URL used for redirection after payment is completed. If provided, a **Continue** button will be shown on the payment page. If shoppers select the button, they are redirected to the specified URL. - [DataMember(Name = "returnUrl", EmitDefaultValue = false)] - public string ReturnUrl { get; set; } - - /// - /// Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. - /// - /// Indicates whether the payment link can be reused for multiple payments. If not provided, this defaults to **false** which means the link can be used for one successful payment only. - [DataMember(Name = "reusable", EmitDefaultValue = false)] - public bool? Reusable { get; set; } - - /// - /// Gets or Sets RiskData - /// - [DataMember(Name = "riskData", EmitDefaultValue = false)] - public RiskData RiskData { get; set; } - - /// - /// The shopper's email address. - /// - /// The shopper's email address. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). - /// - /// The language to be used in the payment page, specified by a combination of a language and country code. For example, `en-US`. For a list of shopper locales that Pay by Link supports, refer to [Language and localization](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#language). - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// Set to **false** to hide the button that lets the shopper remove a stored payment method. - /// - /// Set to **false** to hide the button that lets the shopper remove a stored payment method. - [DataMember(Name = "showRemovePaymentMethodButton", EmitDefaultValue = false)] - public bool? ShowRemovePaymentMethodButton { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - [DataMember(Name = "splitCardFundingSources", EmitDefaultValue = false)] - public bool? SplitCardFundingSources { get; set; } - - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// The physical store, for which this payment is processed. - /// - /// The physical store, for which this payment is processed. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area. - /// - /// A [theme](https://docs.adyen.com/unified-commerce/pay-by-link/payment-links/api#themes) to customize the appearance of the payment page. If not specified, the payment page is rendered according to the theme set as default in your Customer Area. - [DataMember(Name = "themeId", EmitDefaultValue = false)] - public string ThemeId { get; set; } - - /// - /// Gets or Sets ThreeDS2RequestData - /// - [DataMember(Name = "threeDS2RequestData", EmitDefaultValue = false)] - public CheckoutSessionThreeDS2RequestData ThreeDS2RequestData { get; set; } - - /// - /// The date when the payment link status was updated. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - /// - /// The date when the payment link status was updated. [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format: YYYY-MM-DDThh:mm:ss+TZD, for example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "updatedAt", EmitDefaultValue = false)] - public DateTime UpdatedAt { get; set; } - - /// - /// The URL at which the shopper can complete the payment. - /// - /// The URL at which the shopper can complete the payment. - [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] - public string Url { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentLinkResponse {\n"); - sb.Append(" AllowedPaymentMethods: ").Append(AllowedPaymentMethods).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" BlockedPaymentMethods: ").Append(BlockedPaymentMethods).Append("\n"); - sb.Append(" CaptureDelayHours: ").Append(CaptureDelayHours).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DeliverAt: ").Append(DeliverAt).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" FundOrigin: ").Append(FundOrigin).Append("\n"); - sb.Append(" FundRecipient: ").Append(FundRecipient).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" InstallmentOptions: ").Append(InstallmentOptions).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" ManualCapture: ").Append(ManualCapture).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantOrderReference: ").Append(MerchantOrderReference).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PlatformChargebackLogic: ").Append(PlatformChargebackLogic).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" RequiredShopperFields: ").Append(RequiredShopperFields).Append("\n"); - sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); - sb.Append(" Reusable: ").Append(Reusable).Append("\n"); - sb.Append(" RiskData: ").Append(RiskData).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" ShowRemovePaymentMethodButton: ").Append(ShowRemovePaymentMethodButton).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" SplitCardFundingSources: ").Append(SplitCardFundingSources).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StorePaymentMethodMode: ").Append(StorePaymentMethodMode).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" ThemeId: ").Append(ThemeId).Append("\n"); - sb.Append(" ThreeDS2RequestData: ").Append(ThreeDS2RequestData).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentLinkResponse); - } - - /// - /// Returns true if PaymentLinkResponse instances are equal - /// - /// Instance of PaymentLinkResponse to be compared - /// Boolean - public bool Equals(PaymentLinkResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.BlockedPaymentMethods == input.BlockedPaymentMethods || - this.BlockedPaymentMethods != null && - input.BlockedPaymentMethods != null && - this.BlockedPaymentMethods.SequenceEqual(input.BlockedPaymentMethods) - ) && - ( - this.CaptureDelayHours == input.CaptureDelayHours || - this.CaptureDelayHours.Equals(input.CaptureDelayHours) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DeliverAt == input.DeliverAt || - (this.DeliverAt != null && - this.DeliverAt.Equals(input.DeliverAt)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.FundOrigin == input.FundOrigin || - (this.FundOrigin != null && - this.FundOrigin.Equals(input.FundOrigin)) - ) && - ( - this.FundRecipient == input.FundRecipient || - (this.FundRecipient != null && - this.FundRecipient.Equals(input.FundRecipient)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.InstallmentOptions == input.InstallmentOptions || - this.InstallmentOptions != null && - input.InstallmentOptions != null && - this.InstallmentOptions.SequenceEqual(input.InstallmentOptions) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.ManualCapture == input.ManualCapture || - this.ManualCapture.Equals(input.ManualCapture) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantOrderReference == input.MerchantOrderReference || - (this.MerchantOrderReference != null && - this.MerchantOrderReference.Equals(input.MerchantOrderReference)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PlatformChargebackLogic == input.PlatformChargebackLogic || - (this.PlatformChargebackLogic != null && - this.PlatformChargebackLogic.Equals(input.PlatformChargebackLogic)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.RequiredShopperFields == input.RequiredShopperFields || - this.RequiredShopperFields.SequenceEqual(input.RequiredShopperFields) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ) && - ( - this.Reusable == input.Reusable || - this.Reusable.Equals(input.Reusable) - ) && - ( - this.RiskData == input.RiskData || - (this.RiskData != null && - this.RiskData.Equals(input.RiskData)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.ShowRemovePaymentMethodButton == input.ShowRemovePaymentMethodButton || - this.ShowRemovePaymentMethodButton.Equals(input.ShowRemovePaymentMethodButton) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.SplitCardFundingSources == input.SplitCardFundingSources || - this.SplitCardFundingSources.Equals(input.SplitCardFundingSources) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StorePaymentMethodMode == input.StorePaymentMethodMode || - this.StorePaymentMethodMode.Equals(input.StorePaymentMethodMode) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.ThemeId == input.ThemeId || - (this.ThemeId != null && - this.ThemeId.Equals(input.ThemeId)) - ) && - ( - this.ThreeDS2RequestData == input.ThreeDS2RequestData || - (this.ThreeDS2RequestData != null && - this.ThreeDS2RequestData.Equals(input.ThreeDS2RequestData)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.BlockedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.BlockedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CaptureDelayHours.GetHashCode(); - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DeliverAt != null) - { - hashCode = (hashCode * 59) + this.DeliverAt.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.FundOrigin != null) - { - hashCode = (hashCode * 59) + this.FundOrigin.GetHashCode(); - } - if (this.FundRecipient != null) - { - hashCode = (hashCode * 59) + this.FundRecipient.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.InstallmentOptions != null) - { - hashCode = (hashCode * 59) + this.InstallmentOptions.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ManualCapture.GetHashCode(); - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantOrderReference != null) - { - hashCode = (hashCode * 59) + this.MerchantOrderReference.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PlatformChargebackLogic != null) - { - hashCode = (hashCode * 59) + this.PlatformChargebackLogic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RequiredShopperFields.GetHashCode(); - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Reusable.GetHashCode(); - if (this.RiskData != null) - { - hashCode = (hashCode * 59) + this.RiskData.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShowRemovePaymentMethodButton.GetHashCode(); - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SplitCardFundingSources.GetHashCode(); - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StorePaymentMethodMode.GetHashCode(); - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.ThemeId != null) - { - hashCode = (hashCode * 59) + this.ThemeId.GetHashCode(); - } - if (this.ThreeDS2RequestData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2RequestData.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CountryCode (string) maxLength - if (this.CountryCode != null && this.CountryCode.Length > 100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 100.", new [] { "CountryCode" }); - } - - // Mcc (string) maxLength - if (this.Mcc != null && this.Mcc.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Mcc, length must be less than 16.", new [] { "Mcc" }); - } - - // MerchantOrderReference (string) maxLength - if (this.MerchantOrderReference != null && this.MerchantOrderReference.Length > 1000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MerchantOrderReference, length must be less than 1000.", new [] { "MerchantOrderReference" }); - } - - // ReturnUrl (string) maxLength - if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); - } - - // ShopperEmail (string) maxLength - if (this.ShopperEmail != null && this.ShopperEmail.Length > 500) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperEmail, length must be less than 500.", new [] { "ShopperEmail" }); - } - - // ShopperLocale (string) maxLength - if (this.ShopperLocale != null && this.ShopperLocale.Length > 32) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperLocale, length must be less than 32.", new [] { "ShopperLocale" }); - } - - // ShopperReference (string) maxLength - if (this.ShopperReference != null && this.ShopperReference.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be less than 256.", new [] { "ShopperReference" }); - } - - // ShopperReference (string) minLength - if (this.ShopperReference != null && this.ShopperReference.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); - } - - // ShopperStatement (string) maxLength - if (this.ShopperStatement != null && this.ShopperStatement.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperStatement, length must be less than 10000.", new [] { "ShopperStatement" }); - } - - // SocialSecurityNumber (string) maxLength - if (this.SocialSecurityNumber != null && this.SocialSecurityNumber.Length > 32) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SocialSecurityNumber, length must be less than 32.", new [] { "SocialSecurityNumber" }); - } - - // TelephoneNumber (string) maxLength - if (this.TelephoneNumber != null && this.TelephoneNumber.Length > 32) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TelephoneNumber, length must be less than 32.", new [] { "TelephoneNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentMethod.cs b/Adyen/Model/Checkout/PaymentMethod.cs deleted file mode 100644 index 14a47b70b..000000000 --- a/Adyen/Model/Checkout/PaymentMethod.cs +++ /dev/null @@ -1,337 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentMethod - /// - [DataContract(Name = "PaymentMethod")] - public partial class PaymentMethod : IEquatable, IValidatableObject - { - /// - /// The funding source of the payment method. - /// - /// The funding source of the payment method. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source of the payment method. - /// - /// The funding source of the payment method. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// A list of apps for this payment method.. - /// Brand for the selected gift card. For example: plastix, hmclub.. - /// List of possible brands. For example: visa, mc.. - /// The configuration of the payment method.. - /// The funding source of the payment method.. - /// group. - /// All input details to be provided to complete the payment with this payment method.. - /// A list of issuers for this payment method.. - /// The displayable name of this payment method.. - /// Indicates whether this payment method should be promoted or not.. - /// The unique payment method code.. - public PaymentMethod(List apps = default(List), string brand = default(string), List brands = default(List), Dictionary configuration = default(Dictionary), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), PaymentMethodGroup group = default(PaymentMethodGroup), List inputDetails = default(List), List issuers = default(List), string name = default(string), bool? promoted = default(bool?), string type = default(string)) - { - this.Apps = apps; - this.Brand = brand; - this.Brands = brands; - this._Configuration = configuration; - this.FundingSource = fundingSource; - this.Group = group; - this.InputDetails = inputDetails; - this.Issuers = issuers; - this.Name = name; - this.Promoted = promoted; - this.Type = type; - } - - /// - /// A list of apps for this payment method. - /// - /// A list of apps for this payment method. - [DataMember(Name = "apps", EmitDefaultValue = false)] - public List Apps { get; set; } - - /// - /// Brand for the selected gift card. For example: plastix, hmclub. - /// - /// Brand for the selected gift card. For example: plastix, hmclub. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// List of possible brands. For example: visa, mc. - /// - /// List of possible brands. For example: visa, mc. - [DataMember(Name = "brands", EmitDefaultValue = false)] - public List Brands { get; set; } - - /// - /// The configuration of the payment method. - /// - /// The configuration of the payment method. - [DataMember(Name = "configuration", EmitDefaultValue = false)] - public Dictionary _Configuration { get; set; } - - /// - /// Gets or Sets Group - /// - [DataMember(Name = "group", EmitDefaultValue = false)] - public PaymentMethodGroup Group { get; set; } - - /// - /// All input details to be provided to complete the payment with this payment method. - /// - /// All input details to be provided to complete the payment with this payment method. - [DataMember(Name = "inputDetails", EmitDefaultValue = false)] - [Obsolete("")] - public List InputDetails { get; set; } - - /// - /// A list of issuers for this payment method. - /// - /// A list of issuers for this payment method. - [DataMember(Name = "issuers", EmitDefaultValue = false)] - public List Issuers { get; set; } - - /// - /// The displayable name of this payment method. - /// - /// The displayable name of this payment method. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Indicates whether this payment method should be promoted or not. - /// - /// Indicates whether this payment method should be promoted or not. - [DataMember(Name = "promoted", EmitDefaultValue = false)] - public bool? Promoted { get; set; } - - /// - /// The unique payment method code. - /// - /// The unique payment method code. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethod {\n"); - sb.Append(" Apps: ").Append(Apps).Append("\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" Brands: ").Append(Brands).Append("\n"); - sb.Append(" _Configuration: ").Append(_Configuration).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" InputDetails: ").Append(InputDetails).Append("\n"); - sb.Append(" Issuers: ").Append(Issuers).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Promoted: ").Append(Promoted).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethod); - } - - /// - /// Returns true if PaymentMethod instances are equal - /// - /// Instance of PaymentMethod to be compared - /// Boolean - public bool Equals(PaymentMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Apps == input.Apps || - this.Apps != null && - input.Apps != null && - this.Apps.SequenceEqual(input.Apps) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Brands == input.Brands || - this.Brands != null && - input.Brands != null && - this.Brands.SequenceEqual(input.Brands) - ) && - ( - this._Configuration == input._Configuration || - this._Configuration != null && - input._Configuration != null && - this._Configuration.SequenceEqual(input._Configuration) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.Group == input.Group || - (this.Group != null && - this.Group.Equals(input.Group)) - ) && - ( - this.InputDetails == input.InputDetails || - this.InputDetails != null && - input.InputDetails != null && - this.InputDetails.SequenceEqual(input.InputDetails) - ) && - ( - this.Issuers == input.Issuers || - this.Issuers != null && - input.Issuers != null && - this.Issuers.SequenceEqual(input.Issuers) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Promoted == input.Promoted || - this.Promoted.Equals(input.Promoted) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Apps != null) - { - hashCode = (hashCode * 59) + this.Apps.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Brands != null) - { - hashCode = (hashCode * 59) + this.Brands.GetHashCode(); - } - if (this._Configuration != null) - { - hashCode = (hashCode * 59) + this._Configuration.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.Group != null) - { - hashCode = (hashCode * 59) + this.Group.GetHashCode(); - } - if (this.InputDetails != null) - { - hashCode = (hashCode * 59) + this.InputDetails.GetHashCode(); - } - if (this.Issuers != null) - { - hashCode = (hashCode * 59) + this.Issuers.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Promoted.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentMethodGroup.cs b/Adyen/Model/Checkout/PaymentMethodGroup.cs deleted file mode 100644 index 4feff3ada..000000000 --- a/Adyen/Model/Checkout/PaymentMethodGroup.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentMethodGroup - /// - [DataContract(Name = "PaymentMethodGroup")] - public partial class PaymentMethodGroup : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The name of the group.. - /// Echo data to be used if the payment method is displayed as part of this group.. - /// The unique code of the group.. - public PaymentMethodGroup(string name = default(string), string paymentMethodData = default(string), string type = default(string)) - { - this.Name = name; - this.PaymentMethodData = paymentMethodData; - this.Type = type; - } - - /// - /// The name of the group. - /// - /// The name of the group. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Echo data to be used if the payment method is displayed as part of this group. - /// - /// Echo data to be used if the payment method is displayed as part of this group. - [DataMember(Name = "paymentMethodData", EmitDefaultValue = false)] - public string PaymentMethodData { get; set; } - - /// - /// The unique code of the group. - /// - /// The unique code of the group. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodGroup {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PaymentMethodData: ").Append(PaymentMethodData).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodGroup); - } - - /// - /// Returns true if PaymentMethodGroup instances are equal - /// - /// Instance of PaymentMethodGroup to be compared - /// Boolean - public bool Equals(PaymentMethodGroup input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PaymentMethodData == input.PaymentMethodData || - (this.PaymentMethodData != null && - this.PaymentMethodData.Equals(input.PaymentMethodData)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PaymentMethodData != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodData.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentMethodIssuer.cs b/Adyen/Model/Checkout/PaymentMethodIssuer.cs deleted file mode 100644 index 82fae51a2..000000000 --- a/Adyen/Model/Checkout/PaymentMethodIssuer.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentMethodIssuer - /// - [DataContract(Name = "PaymentMethodIssuer")] - public partial class PaymentMethodIssuer : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethodIssuer() { } - /// - /// Initializes a new instance of the class. - /// - /// A boolean value indicating whether this issuer is unavailable. Can be `true` whenever the issuer is offline. (default to false). - /// The unique identifier of this issuer, to submit in requests to /payments. (required). - /// A localized name of the issuer. (required). - public PaymentMethodIssuer(bool? disabled = false, string id = default(string), string name = default(string)) - { - this.Id = id; - this.Name = name; - this.Disabled = disabled; - } - - /// - /// A boolean value indicating whether this issuer is unavailable. Can be `true` whenever the issuer is offline. - /// - /// A boolean value indicating whether this issuer is unavailable. Can be `true` whenever the issuer is offline. - [DataMember(Name = "disabled", EmitDefaultValue = false)] - public bool? Disabled { get; set; } - - /// - /// The unique identifier of this issuer, to submit in requests to /payments. - /// - /// The unique identifier of this issuer, to submit in requests to /payments. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// A localized name of the issuer. - /// - /// A localized name of the issuer. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodIssuer {\n"); - sb.Append(" Disabled: ").Append(Disabled).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodIssuer); - } - - /// - /// Returns true if PaymentMethodIssuer instances are equal - /// - /// Instance of PaymentMethodIssuer to be compared - /// Boolean - public bool Equals(PaymentMethodIssuer input) - { - if (input == null) - { - return false; - } - return - ( - this.Disabled == input.Disabled || - this.Disabled.Equals(input.Disabled) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Disabled.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentMethodToStore.cs b/Adyen/Model/Checkout/PaymentMethodToStore.cs deleted file mode 100644 index a42d81f91..000000000 --- a/Adyen/Model/Checkout/PaymentMethodToStore.cs +++ /dev/null @@ -1,368 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentMethodToStore - /// - [DataContract(Name = "PaymentMethodToStore")] - public partial class PaymentMethodToStore : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**.. - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// The encrypted card.. - /// The encrypted card number.. - /// The encrypted card expiry month.. - /// The encrypted card expiry year.. - /// The encrypted card verification code.. - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// The name of the card holder.. - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide).. - /// Set to **scheme**.. - public PaymentMethodToStore(string brand = default(string), string cvc = default(string), string encryptedCard = default(string), string encryptedCardNumber = default(string), string encryptedExpiryMonth = default(string), string encryptedExpiryYear = default(string), string encryptedSecurityCode = default(string), string expiryMonth = default(string), string expiryYear = default(string), string holderName = default(string), string number = default(string), string type = default(string)) - { - this.Brand = brand; - this.Cvc = cvc; - this.EncryptedCard = encryptedCard; - this.EncryptedCardNumber = encryptedCardNumber; - this.EncryptedExpiryMonth = encryptedExpiryMonth; - this.EncryptedExpiryYear = encryptedExpiryYear; - this.EncryptedSecurityCode = encryptedSecurityCode; - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.HolderName = holderName; - this.Number = number; - this.Type = type; - } - - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**. - /// - /// Secondary brand of the card. For example: **plastix**, **hmclub**. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card verification code. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "cvc", EmitDefaultValue = false)] - public string Cvc { get; set; } - - /// - /// The encrypted card. - /// - /// The encrypted card. - [DataMember(Name = "encryptedCard", EmitDefaultValue = false)] - public string EncryptedCard { get; set; } - - /// - /// The encrypted card number. - /// - /// The encrypted card number. - [DataMember(Name = "encryptedCardNumber", EmitDefaultValue = false)] - public string EncryptedCardNumber { get; set; } - - /// - /// The encrypted card expiry month. - /// - /// The encrypted card expiry month. - [DataMember(Name = "encryptedExpiryMonth", EmitDefaultValue = false)] - public string EncryptedExpiryMonth { get; set; } - - /// - /// The encrypted card expiry year. - /// - /// The encrypted card expiry year. - [DataMember(Name = "encryptedExpiryYear", EmitDefaultValue = false)] - public string EncryptedExpiryYear { get; set; } - - /// - /// The encrypted card verification code. - /// - /// The encrypted card verification code. - [DataMember(Name = "encryptedSecurityCode", EmitDefaultValue = false)] - public string EncryptedSecurityCode { get; set; } - - /// - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card expiry month. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card expiry year. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The name of the card holder. - /// - /// The name of the card holder. - [DataMember(Name = "holderName", EmitDefaultValue = false)] - public string HolderName { get; set; } - - /// - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - /// - /// The card number. Only collect raw card data if you are [fully PCI compliant](https://docs.adyen.com/development-resources/pci-dss-compliance-guide). - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Set to **scheme**. - /// - /// Set to **scheme**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodToStore {\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" Cvc: ").Append(Cvc).Append("\n"); - sb.Append(" EncryptedCard: ").Append(EncryptedCard).Append("\n"); - sb.Append(" EncryptedCardNumber: ").Append(EncryptedCardNumber).Append("\n"); - sb.Append(" EncryptedExpiryMonth: ").Append(EncryptedExpiryMonth).Append("\n"); - sb.Append(" EncryptedExpiryYear: ").Append(EncryptedExpiryYear).Append("\n"); - sb.Append(" EncryptedSecurityCode: ").Append(EncryptedSecurityCode).Append("\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" HolderName: ").Append(HolderName).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodToStore); - } - - /// - /// Returns true if PaymentMethodToStore instances are equal - /// - /// Instance of PaymentMethodToStore to be compared - /// Boolean - public bool Equals(PaymentMethodToStore input) - { - if (input == null) - { - return false; - } - return - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.EncryptedCard == input.EncryptedCard || - (this.EncryptedCard != null && - this.EncryptedCard.Equals(input.EncryptedCard)) - ) && - ( - this.EncryptedCardNumber == input.EncryptedCardNumber || - (this.EncryptedCardNumber != null && - this.EncryptedCardNumber.Equals(input.EncryptedCardNumber)) - ) && - ( - this.EncryptedExpiryMonth == input.EncryptedExpiryMonth || - (this.EncryptedExpiryMonth != null && - this.EncryptedExpiryMonth.Equals(input.EncryptedExpiryMonth)) - ) && - ( - this.EncryptedExpiryYear == input.EncryptedExpiryYear || - (this.EncryptedExpiryYear != null && - this.EncryptedExpiryYear.Equals(input.EncryptedExpiryYear)) - ) && - ( - this.EncryptedSecurityCode == input.EncryptedSecurityCode || - (this.EncryptedSecurityCode != null && - this.EncryptedSecurityCode.Equals(input.EncryptedSecurityCode)) - ) && - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.HolderName == input.HolderName || - (this.HolderName != null && - this.HolderName.Equals(input.HolderName)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.EncryptedCard != null) - { - hashCode = (hashCode * 59) + this.EncryptedCard.GetHashCode(); - } - if (this.EncryptedCardNumber != null) - { - hashCode = (hashCode * 59) + this.EncryptedCardNumber.GetHashCode(); - } - if (this.EncryptedExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.EncryptedExpiryMonth.GetHashCode(); - } - if (this.EncryptedExpiryYear != null) - { - hashCode = (hashCode * 59) + this.EncryptedExpiryYear.GetHashCode(); - } - if (this.EncryptedSecurityCode != null) - { - hashCode = (hashCode * 59) + this.EncryptedSecurityCode.GetHashCode(); - } - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.HolderName != null) - { - hashCode = (hashCode * 59) + this.HolderName.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // EncryptedCard (string) maxLength - if (this.EncryptedCard != null && this.EncryptedCard.Length > 40000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedCard, length must be less than 40000.", new [] { "EncryptedCard" }); - } - - // EncryptedCardNumber (string) maxLength - if (this.EncryptedCardNumber != null && this.EncryptedCardNumber.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedCardNumber, length must be less than 15000.", new [] { "EncryptedCardNumber" }); - } - - // EncryptedExpiryMonth (string) maxLength - if (this.EncryptedExpiryMonth != null && this.EncryptedExpiryMonth.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedExpiryMonth, length must be less than 15000.", new [] { "EncryptedExpiryMonth" }); - } - - // EncryptedExpiryYear (string) maxLength - if (this.EncryptedExpiryYear != null && this.EncryptedExpiryYear.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedExpiryYear, length must be less than 15000.", new [] { "EncryptedExpiryYear" }); - } - - // EncryptedSecurityCode (string) maxLength - if (this.EncryptedSecurityCode != null && this.EncryptedSecurityCode.Length > 15000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for EncryptedSecurityCode, length must be less than 15000.", new [] { "EncryptedSecurityCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentMethodUPIApps.cs b/Adyen/Model/Checkout/PaymentMethodUPIApps.cs deleted file mode 100644 index b7af1ba93..000000000 --- a/Adyen/Model/Checkout/PaymentMethodUPIApps.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentMethodUPIApps - /// - [DataContract(Name = "PaymentMethodUPIApps")] - public partial class PaymentMethodUPIApps : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethodUPIApps() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of this app, to submit in requests to /payments. (required). - /// A localized name of the app. (required). - public PaymentMethodUPIApps(string id = default(string), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// The unique identifier of this app, to submit in requests to /payments. - /// - /// The unique identifier of this app, to submit in requests to /payments. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// A localized name of the app. - /// - /// A localized name of the app. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodUPIApps {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodUPIApps); - } - - /// - /// Returns true if PaymentMethodUPIApps instances are equal - /// - /// Instance of PaymentMethodUPIApps to be compared - /// Boolean - public bool Equals(PaymentMethodUPIApps input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentMethodsRequest.cs b/Adyen/Model/Checkout/PaymentMethodsRequest.cs deleted file mode 100644 index 19f498a3a..000000000 --- a/Adyen/Model/Checkout/PaymentMethodsRequest.cs +++ /dev/null @@ -1,517 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentMethodsRequest - /// - [DataContract(Name = "PaymentMethodsRequest")] - public partial class PaymentMethodsRequest : IEquatable, IValidatableObject - { - /// - /// The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web - /// - /// The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web - [JsonConverter(typeof(StringEnumConverter))] - public enum ChannelEnum - { - /// - /// Enum IOS for value: iOS - /// - [EnumMember(Value = "iOS")] - IOS = 1, - - /// - /// Enum Android for value: Android - /// - [EnumMember(Value = "Android")] - Android = 2, - - /// - /// Enum Web for value: Web - /// - [EnumMember(Value = "Web")] - Web = 3 - - } - - - /// - /// The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web - /// - /// The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web - [DataMember(Name = "channel", EmitDefaultValue = false)] - public ChannelEnum? Channel { get; set; } - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - [JsonConverter(typeof(StringEnumConverter))] - public enum StoreFiltrationModeEnum - { - /// - /// Enum Exclusive for value: exclusive - /// - [EnumMember(Value = "exclusive")] - Exclusive = 1, - - /// - /// Enum Inclusive for value: inclusive - /// - [EnumMember(Value = "inclusive")] - Inclusive = 2, - - /// - /// Enum SkipFilter for value: skipFilter - /// - [EnumMember(Value = "skipFilter")] - SkipFilter = 3 - - } - - - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - /// - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned. - [DataMember(Name = "storeFiltrationMode", EmitDefaultValue = false)] - public StoreFiltrationModeEnum? StoreFiltrationMode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethodsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.. - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// amount. - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]`. - /// browserInfo. - /// The platform where a payment transaction takes place. This field can be used for filtering out payment methods that are only available on specific platforms. Possible values: * iOS * Android * Web. - /// The shopper's country code.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// order. - /// A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates.. - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`.. - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).. - /// The combination of a language code and a country code to specify the language to be used in the payment.. - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. (default to false). - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment.. - /// Specifies how payment methods should be filtered based on the 'store' parameter: - 'exclusive': Only payment methods belonging to the specified 'store' are returned. - 'inclusive': Payment methods from the 'store' and those not associated with any other store are returned.. - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication.. - public PaymentMethodsRequest(Dictionary additionalData = default(Dictionary), List allowedPaymentMethods = default(List), Amount amount = default(Amount), List blockedPaymentMethods = default(List), BrowserInfo browserInfo = default(BrowserInfo), ChannelEnum? channel = default(ChannelEnum?), string countryCode = default(string), string merchantAccount = default(string), EncryptedOrderData order = default(EncryptedOrderData), string shopperConversionId = default(string), string shopperEmail = default(string), string shopperIP = default(string), string shopperLocale = default(string), string shopperReference = default(string), bool? splitCardFundingSources = false, string store = default(string), StoreFiltrationModeEnum? storeFiltrationMode = default(StoreFiltrationModeEnum?), string telephoneNumber = default(string)) - { - this.MerchantAccount = merchantAccount; - this.AdditionalData = additionalData; - this.AllowedPaymentMethods = allowedPaymentMethods; - this.Amount = amount; - this.BlockedPaymentMethods = blockedPaymentMethods; - this.BrowserInfo = browserInfo; - this.Channel = channel; - this.CountryCode = countryCode; - this.Order = order; - this.ShopperConversionId = shopperConversionId; - this.ShopperEmail = shopperEmail; - this.ShopperIP = shopperIP; - this.ShopperLocale = shopperLocale; - this.ShopperReference = shopperReference; - this.SplitCardFundingSources = splitCardFundingSources; - this.Store = store; - this.StoreFiltrationMode = storeFiltrationMode; - this.TelephoneNumber = telephoneNumber; - } - - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be presented to the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"allowedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "allowedPaymentMethods", EmitDefaultValue = false)] - public List AllowedPaymentMethods { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - /// - /// List of payment methods to be hidden from the shopper. To refer to payment methods, use their [payment method type](https://docs.adyen.com/payment-methods/payment-method-types). Example: `\"blockedPaymentMethods\":[\"ideal\",\"applepay\"]` - [DataMember(Name = "blockedPaymentMethods", EmitDefaultValue = false)] - public List BlockedPaymentMethods { get; set; } - - /// - /// Gets or Sets BrowserInfo - /// - [DataMember(Name = "browserInfo", EmitDefaultValue = false)] - public BrowserInfo BrowserInfo { get; set; } - - /// - /// The shopper's country code. - /// - /// The shopper's country code. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets Order - /// - [DataMember(Name = "order", EmitDefaultValue = false)] - public EncryptedOrderData Order { get; set; } - - /// - /// A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates. - /// - /// A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates. - [DataMember(Name = "shopperConversionId", EmitDefaultValue = false)] - public string ShopperConversionId { get; set; } - - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "shopperIP", EmitDefaultValue = false)] - public string ShopperIP { get; set; } - - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - /// - /// Boolean value indicating whether the card payment method should be split into separate debit and credit options. - [DataMember(Name = "splitCardFundingSources", EmitDefaultValue = false)] - public bool? SplitCardFundingSources { get; set; } - - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodsRequest {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" AllowedPaymentMethods: ").Append(AllowedPaymentMethods).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BlockedPaymentMethods: ").Append(BlockedPaymentMethods).Append("\n"); - sb.Append(" BrowserInfo: ").Append(BrowserInfo).Append("\n"); - sb.Append(" Channel: ").Append(Channel).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Order: ").Append(Order).Append("\n"); - sb.Append(" ShopperConversionId: ").Append(ShopperConversionId).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" SplitCardFundingSources: ").Append(SplitCardFundingSources).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StoreFiltrationMode: ").Append(StoreFiltrationMode).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodsRequest); - } - - /// - /// Returns true if PaymentMethodsRequest instances are equal - /// - /// Instance of PaymentMethodsRequest to be compared - /// Boolean - public bool Equals(PaymentMethodsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BlockedPaymentMethods == input.BlockedPaymentMethods || - this.BlockedPaymentMethods != null && - input.BlockedPaymentMethods != null && - this.BlockedPaymentMethods.SequenceEqual(input.BlockedPaymentMethods) - ) && - ( - this.BrowserInfo == input.BrowserInfo || - (this.BrowserInfo != null && - this.BrowserInfo.Equals(input.BrowserInfo)) - ) && - ( - this.Channel == input.Channel || - this.Channel.Equals(input.Channel) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Order == input.Order || - (this.Order != null && - this.Order.Equals(input.Order)) - ) && - ( - this.ShopperConversionId == input.ShopperConversionId || - (this.ShopperConversionId != null && - this.ShopperConversionId.Equals(input.ShopperConversionId)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperIP == input.ShopperIP || - (this.ShopperIP != null && - this.ShopperIP.Equals(input.ShopperIP)) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.SplitCardFundingSources == input.SplitCardFundingSources || - this.SplitCardFundingSources.Equals(input.SplitCardFundingSources) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreFiltrationMode == input.StoreFiltrationMode || - this.StoreFiltrationMode.Equals(input.StoreFiltrationMode) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BlockedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.BlockedPaymentMethods.GetHashCode(); - } - if (this.BrowserInfo != null) - { - hashCode = (hashCode * 59) + this.BrowserInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Order != null) - { - hashCode = (hashCode * 59) + this.Order.GetHashCode(); - } - if (this.ShopperConversionId != null) - { - hashCode = (hashCode * 59) + this.ShopperConversionId.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperIP != null) - { - hashCode = (hashCode * 59) + this.ShopperIP.GetHashCode(); - } - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SplitCardFundingSources.GetHashCode(); - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StoreFiltrationMode.GetHashCode(); - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ShopperConversionId (string) maxLength - if (this.ShopperConversionId != null && this.ShopperConversionId.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperConversionId, length must be less than 256.", new [] { "ShopperConversionId" }); - } - - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 16.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentMethodsResponse.cs b/Adyen/Model/Checkout/PaymentMethodsResponse.cs deleted file mode 100644 index 28780af40..000000000 --- a/Adyen/Model/Checkout/PaymentMethodsResponse.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentMethodsResponse - /// - [DataContract(Name = "PaymentMethodsResponse")] - public partial class PaymentMethodsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Detailed list of payment methods required to generate payment forms.. - /// List of all stored payment methods.. - public PaymentMethodsResponse(List paymentMethods = default(List), List storedPaymentMethods = default(List)) - { - this.PaymentMethods = paymentMethods; - this.StoredPaymentMethods = storedPaymentMethods; - } - - /// - /// Detailed list of payment methods required to generate payment forms. - /// - /// Detailed list of payment methods required to generate payment forms. - [DataMember(Name = "paymentMethods", EmitDefaultValue = false)] - public List PaymentMethods { get; set; } - - /// - /// List of all stored payment methods. - /// - /// List of all stored payment methods. - [DataMember(Name = "storedPaymentMethods", EmitDefaultValue = false)] - public List StoredPaymentMethods { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodsResponse {\n"); - sb.Append(" PaymentMethods: ").Append(PaymentMethods).Append("\n"); - sb.Append(" StoredPaymentMethods: ").Append(StoredPaymentMethods).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodsResponse); - } - - /// - /// Returns true if PaymentMethodsResponse instances are equal - /// - /// Instance of PaymentMethodsResponse to be compared - /// Boolean - public bool Equals(PaymentMethodsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.PaymentMethods == input.PaymentMethods || - this.PaymentMethods != null && - input.PaymentMethods != null && - this.PaymentMethods.SequenceEqual(input.PaymentMethods) - ) && - ( - this.StoredPaymentMethods == input.StoredPaymentMethods || - this.StoredPaymentMethods != null && - input.StoredPaymentMethods != null && - this.StoredPaymentMethods.SequenceEqual(input.StoredPaymentMethods) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PaymentMethods != null) - { - hashCode = (hashCode * 59) + this.PaymentMethods.GetHashCode(); - } - if (this.StoredPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethods.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentRefundRequest.cs b/Adyen/Model/Checkout/PaymentRefundRequest.cs deleted file mode 100644 index a5652d910..000000000 --- a/Adyen/Model/Checkout/PaymentRefundRequest.cs +++ /dev/null @@ -1,339 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentRefundRequest - /// - [DataContract(Name = "PaymentRefundRequest")] - public partial class PaymentRefundRequest : IEquatable, IValidatableObject - { - /// - /// The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER** - /// - /// The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER** - [JsonConverter(typeof(StringEnumConverter))] - public enum MerchantRefundReasonEnum - { - /// - /// Enum FRAUD for value: FRAUD - /// - [EnumMember(Value = "FRAUD")] - FRAUD = 1, - - /// - /// Enum CUSTOMERREQUEST for value: CUSTOMER REQUEST - /// - [EnumMember(Value = "CUSTOMER REQUEST")] - CUSTOMERREQUEST = 2, - - /// - /// Enum RETURN for value: RETURN - /// - [EnumMember(Value = "RETURN")] - RETURN = 3, - - /// - /// Enum DUPLICATE for value: DUPLICATE - /// - [EnumMember(Value = "DUPLICATE")] - DUPLICATE = 4, - - /// - /// Enum OTHER for value: OTHER - /// - [EnumMember(Value = "OTHER")] - OTHER = 5 - - } - - - /// - /// The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER** - /// - /// The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER** - [DataMember(Name = "merchantRefundReason", EmitDefaultValue = false)] - public MerchantRefundReasonEnum? MerchantRefundReason { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentRefundRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// applicationInfo. - /// This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.. - /// enhancedSchemeData. - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.. - /// The merchant account that is used to process the payment. (required). - /// The reason for the refund request. Possible values: * **FRAUD** * **CUSTOMER REQUEST** * **RETURN** * **DUPLICATE** * **OTHER** . - /// Your reference for the refund request. Maximum length: 80 characters.. - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).. - /// The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.. - public PaymentRefundRequest(Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), string capturePspReference = default(string), EnhancedSchemeData enhancedSchemeData = default(EnhancedSchemeData), List lineItems = default(List), string merchantAccount = default(string), MerchantRefundReasonEnum? merchantRefundReason = default(MerchantRefundReasonEnum?), string reference = default(string), List splits = default(List), string store = default(string)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.ApplicationInfo = applicationInfo; - this.CapturePspReference = capturePspReference; - this.EnhancedSchemeData = enhancedSchemeData; - this.LineItems = lineItems; - this.MerchantRefundReason = merchantRefundReason; - this.Reference = reference; - this.Splits = splits; - this.Store = store; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. - /// - /// This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. - [DataMember(Name = "capturePspReference", EmitDefaultValue = false)] - public string CapturePspReference { get; set; } - - /// - /// Gets or Sets EnhancedSchemeData - /// - [DataMember(Name = "enhancedSchemeData", EmitDefaultValue = false)] - public EnhancedSchemeData EnhancedSchemeData { get; set; } - - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Your reference for the refund request. Maximum length: 80 characters. - /// - /// Your reference for the refund request. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/). - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. - /// - /// The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentRefundRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" CapturePspReference: ").Append(CapturePspReference).Append("\n"); - sb.Append(" EnhancedSchemeData: ").Append(EnhancedSchemeData).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantRefundReason: ").Append(MerchantRefundReason).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentRefundRequest); - } - - /// - /// Returns true if PaymentRefundRequest instances are equal - /// - /// Instance of PaymentRefundRequest to be compared - /// Boolean - public bool Equals(PaymentRefundRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.CapturePspReference == input.CapturePspReference || - (this.CapturePspReference != null && - this.CapturePspReference.Equals(input.CapturePspReference)) - ) && - ( - this.EnhancedSchemeData == input.EnhancedSchemeData || - (this.EnhancedSchemeData != null && - this.EnhancedSchemeData.Equals(input.EnhancedSchemeData)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantRefundReason == input.MerchantRefundReason || - this.MerchantRefundReason.Equals(input.MerchantRefundReason) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.CapturePspReference != null) - { - hashCode = (hashCode * 59) + this.CapturePspReference.GetHashCode(); - } - if (this.EnhancedSchemeData != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeData.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MerchantRefundReason.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentRefundResponse.cs b/Adyen/Model/Checkout/PaymentRefundResponse.cs deleted file mode 100644 index a4478de85..000000000 --- a/Adyen/Model/Checkout/PaymentRefundResponse.cs +++ /dev/null @@ -1,371 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentRefundResponse - /// - [DataContract(Name = "PaymentRefundResponse")] - public partial class PaymentRefundResponse : IEquatable, IValidatableObject - { - /// - /// Your reason for the refund request. - /// - /// Your reason for the refund request. - [JsonConverter(typeof(StringEnumConverter))] - public enum MerchantRefundReasonEnum - { - /// - /// Enum FRAUD for value: FRAUD - /// - [EnumMember(Value = "FRAUD")] - FRAUD = 1, - - /// - /// Enum CUSTOMERREQUEST for value: CUSTOMER REQUEST - /// - [EnumMember(Value = "CUSTOMER REQUEST")] - CUSTOMERREQUEST = 2, - - /// - /// Enum RETURN for value: RETURN - /// - [EnumMember(Value = "RETURN")] - RETURN = 3, - - /// - /// Enum DUPLICATE for value: DUPLICATE - /// - [EnumMember(Value = "DUPLICATE")] - DUPLICATE = 4, - - /// - /// Enum OTHER for value: OTHER - /// - [EnumMember(Value = "OTHER")] - OTHER = 5 - - } - - - /// - /// Your reason for the refund request. - /// - /// Your reason for the refund request. - [DataMember(Name = "merchantRefundReason", EmitDefaultValue = false)] - public MerchantRefundReasonEnum? MerchantRefundReason { get; set; } - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 1 - - } - - - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentRefundResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund.. - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip.. - /// The merchant account that is used to process the payment. (required). - /// Your reason for the refund request.. - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to refund. (required). - /// Adyen's 16-character reference associated with the refund request. (required). - /// Your reference for the refund request.. - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/).. - /// The status of your request. This will always have the value **received**. (required). - /// The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails.. - public PaymentRefundResponse(Amount amount = default(Amount), string capturePspReference = default(string), List lineItems = default(List), string merchantAccount = default(string), MerchantRefundReasonEnum? merchantRefundReason = default(MerchantRefundReasonEnum?), string paymentPspReference = default(string), string pspReference = default(string), string reference = default(string), List splits = default(List), StatusEnum status = default(StatusEnum), string store = default(string)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.PaymentPspReference = paymentPspReference; - this.PspReference = pspReference; - this.Status = status; - this.CapturePspReference = capturePspReference; - this.LineItems = lineItems; - this.MerchantRefundReason = merchantRefundReason; - this.Reference = reference; - this.Splits = splits; - this.Store = store; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. - /// - /// This is only available for PayPal refunds. The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the specific capture to refund. - [DataMember(Name = "capturePspReference", EmitDefaultValue = false)] - public string CapturePspReference { get; set; } - - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - /// - /// Price and product information of the refunded items, required for [partial refunds](https://docs.adyen.com/online-payments/refund#refund-a-payment). > This field is required for partial refunds with 3x 4x Oney, Affirm, Afterpay, Atome, Clearpay, Klarna, Ratepay, Walley, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to refund. - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to refund. - [DataMember(Name = "paymentPspReference", IsRequired = false, EmitDefaultValue = false)] - public string PaymentPspReference { get; set; } - - /// - /// Adyen's 16-character reference associated with the refund request. - /// - /// Adyen's 16-character reference associated with the refund request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Your reference for the refund request. - /// - /// Your reference for the refund request. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/). - /// - /// An array of objects specifying how the amount should be split between accounts when using Adyen for Platforms. For more information, see how to process payments for [marketplaces](https://docs.adyen.com/marketplaces/split-payments) or [platforms](https://docs.adyen.com/platforms/online-payments/split-payments/). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. - /// - /// The online store or [physical store](https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/#create-stores) that is processing the refund. This must be the same as the store name configured in your Customer Area. Otherwise, you get an error and the refund fails. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentRefundResponse {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" CapturePspReference: ").Append(CapturePspReference).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantRefundReason: ").Append(MerchantRefundReason).Append("\n"); - sb.Append(" PaymentPspReference: ").Append(PaymentPspReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentRefundResponse); - } - - /// - /// Returns true if PaymentRefundResponse instances are equal - /// - /// Instance of PaymentRefundResponse to be compared - /// Boolean - public bool Equals(PaymentRefundResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.CapturePspReference == input.CapturePspReference || - (this.CapturePspReference != null && - this.CapturePspReference.Equals(input.CapturePspReference)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantRefundReason == input.MerchantRefundReason || - this.MerchantRefundReason.Equals(input.MerchantRefundReason) - ) && - ( - this.PaymentPspReference == input.PaymentPspReference || - (this.PaymentPspReference != null && - this.PaymentPspReference.Equals(input.PaymentPspReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.CapturePspReference != null) - { - hashCode = (hashCode * 59) + this.CapturePspReference.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MerchantRefundReason.GetHashCode(); - if (this.PaymentPspReference != null) - { - hashCode = (hashCode * 59) + this.PaymentPspReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentRequest.cs b/Adyen/Model/Checkout/PaymentRequest.cs deleted file mode 100644 index ddb2751e2..000000000 --- a/Adyen/Model/Checkout/PaymentRequest.cs +++ /dev/null @@ -1,1628 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentRequest - /// - [DataContract(Name = "PaymentRequest")] - public partial class PaymentRequest : IEquatable, IValidatableObject - { - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - [JsonConverter(typeof(StringEnumConverter))] - public enum ChannelEnum - { - /// - /// Enum IOS for value: iOS - /// - [EnumMember(Value = "iOS")] - IOS = 1, - - /// - /// Enum Android for value: Android - /// - [EnumMember(Value = "Android")] - Android = 2, - - /// - /// Enum Web for value: Web - /// - [EnumMember(Value = "Web")] - Web = 3 - - } - - - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - /// - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web - [DataMember(Name = "channel", EmitDefaultValue = false)] - public ChannelEnum? Channel { get; set; } - /// - /// The type of the entity the payment is processed for. - /// - /// The type of the entity the payment is processed for. - [JsonConverter(typeof(StringEnumConverter))] - public enum EntityTypeEnum - { - /// - /// Enum NaturalPerson for value: NaturalPerson - /// - [EnumMember(Value = "NaturalPerson")] - NaturalPerson = 1, - - /// - /// Enum CompanyName for value: CompanyName - /// - [EnumMember(Value = "CompanyName")] - CompanyName = 2 - - } - - - /// - /// The type of the entity the payment is processed for. - /// - /// The type of the entity the payment is processed for. - [DataMember(Name = "entityType", EmitDefaultValue = false)] - public EntityTypeEnum? EntityType { get; set; } - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - [JsonConverter(typeof(StringEnumConverter))] - public enum IndustryUsageEnum - { - /// - /// Enum DelayedCharge for value: delayedCharge - /// - [EnumMember(Value = "delayedCharge")] - DelayedCharge = 1, - - /// - /// Enum Installment for value: installment - /// - [EnumMember(Value = "installment")] - Installment = 2, - - /// - /// Enum NoShow for value: noShow - /// - [EnumMember(Value = "noShow")] - NoShow = 3 - - } - - - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - /// - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment** - [DataMember(Name = "industryUsage", EmitDefaultValue = false)] - public IndustryUsageEnum? IndustryUsage { get; set; } - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// accountInfo. - /// additionalAmount. - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value.. - /// amount (required). - /// applicationInfo. - /// authenticationData. - /// bankAccount. - /// billingAddress. - /// browserInfo. - /// The delay between the authorisation and scheduled auto-capture, specified in hours.. - /// The platform where a payment transaction takes place. This field is optional for filtering out payment methods that are only available on specific platforms. If this value is not set, then we will try to infer it from the `sdkVersion` or `token`. Possible values: * iOS * Android * Web. - /// Checkout attempt ID that corresponds to the Id generated by the client SDK for tracking user payment journey.. - /// company. - /// Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey.. - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE. - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD. - /// dccQuote. - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00. - /// deliveryAddress. - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00. - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting).. - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition).. - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts.. - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments.. - /// enhancedSchemeData. - /// The type of the entity the payment is processed for.. - /// An integer value that is added to the normal fraud score. The value can be either positive or negative.. - /// fundOrigin. - /// fundRecipient. - /// The reason for the amount update. Possible values: * **delayedCharge** * **noShow** * **installment**. - /// installments. - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip.. - /// The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters.. - /// mandate. - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`.. - /// merchantRiskIndicator. - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. . - /// mpiData. - /// order. - /// When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead.. - /// > Required for browser-based (`channel` **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash.. - /// paymentMethod (required). - /// platformChargebackLogic. - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.. - /// Minimum number of days between authorisations. Only for 3D Secure 2.. - /// Defines a recurring payment type. Required when creating a token to store payment details or using stored payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. . - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer.. - /// Specifies the redirect method (GET or POST) when redirecting to the issuer.. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required). - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. (required). - /// riskData. - /// The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00. - /// A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates.. - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`.. - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).. - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// The combination of a language code and a country code to specify the language to be used in the payment.. - /// shopperName. - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address.. - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. - /// The shopper's social security number.. - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split).. - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment.. - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types).. - /// This field contains additional information on the submerchant, who is onboarded to an acquirer through a payment facilitator or aggregator. - /// surcharge. - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication.. - /// threeDS2RequestData. - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorisation.Default: **false**. (default to false). - /// Set to true if the payment should be routed to a trusted MID.. - public PaymentRequest(AccountInfo accountInfo = default(AccountInfo), Amount additionalAmount = default(Amount), Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), ApplicationInfo applicationInfo = default(ApplicationInfo), AuthenticationData authenticationData = default(AuthenticationData), CheckoutBankAccount bankAccount = default(CheckoutBankAccount), BillingAddress billingAddress = default(BillingAddress), BrowserInfo browserInfo = default(BrowserInfo), int? captureDelayHours = default(int?), ChannelEnum? channel = default(ChannelEnum?), string checkoutAttemptId = default(string), Company company = default(Company), string conversionId = default(string), string countryCode = default(string), DateTime dateOfBirth = default(DateTime), ForexQuote dccQuote = default(ForexQuote), DateTime deliverAt = default(DateTime), DeliveryAddress deliveryAddress = default(DeliveryAddress), DateTime deliveryDate = default(DateTime), string deviceFingerprint = default(string), bool? enableOneClick = default(bool?), bool? enablePayOut = default(bool?), bool? enableRecurring = default(bool?), EnhancedSchemeData enhancedSchemeData = default(EnhancedSchemeData), EntityTypeEnum? entityType = default(EntityTypeEnum?), int? fraudOffset = default(int?), FundOrigin fundOrigin = default(FundOrigin), FundRecipient fundRecipient = default(FundRecipient), IndustryUsageEnum? industryUsage = default(IndustryUsageEnum?), Installments installments = default(Installments), List lineItems = default(List), Dictionary localizedShopperStatement = default(Dictionary), Mandate mandate = default(Mandate), string mcc = default(string), string merchantAccount = default(string), string merchantOrderReference = default(string), MerchantRiskIndicator merchantRiskIndicator = default(MerchantRiskIndicator), Dictionary metadata = default(Dictionary), ThreeDSecureData mpiData = default(ThreeDSecureData), EncryptedOrderData order = default(EncryptedOrderData), string orderReference = default(string), string origin = default(string), CheckoutPaymentMethod paymentMethod = default(CheckoutPaymentMethod), PlatformChargebackLogic platformChargebackLogic = default(PlatformChargebackLogic), string recurringExpiry = default(string), string recurringFrequency = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string redirectFromIssuerMethod = default(string), string redirectToIssuerMethod = default(string), string reference = default(string), string returnUrl = default(string), RiskData riskData = default(RiskData), string sessionValidity = default(string), string shopperConversionId = default(string), string shopperEmail = default(string), string shopperIP = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperLocale = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), string socialSecurityNumber = default(string), List splits = default(List), string store = default(string), bool? storePaymentMethod = default(bool?), List subMerchants = default(List), Surcharge surcharge = default(Surcharge), string telephoneNumber = default(string), ThreeDS2RequestFields threeDS2RequestData = default(ThreeDS2RequestFields), bool? threeDSAuthenticationOnly = false, bool? trustedShopper = default(bool?)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.Reference = reference; - this.ReturnUrl = returnUrl; - this.AccountInfo = accountInfo; - this.AdditionalAmount = additionalAmount; - this.AdditionalData = additionalData; - this.ApplicationInfo = applicationInfo; - this.AuthenticationData = authenticationData; - this.BankAccount = bankAccount; - this.BillingAddress = billingAddress; - this.BrowserInfo = browserInfo; - this.CaptureDelayHours = captureDelayHours; - this.Channel = channel; - this.CheckoutAttemptId = checkoutAttemptId; - this.Company = company; - this.ConversionId = conversionId; - this.CountryCode = countryCode; - this.DateOfBirth = dateOfBirth; - this.DccQuote = dccQuote; - this.DeliverAt = deliverAt; - this.DeliveryAddress = deliveryAddress; - this.DeliveryDate = deliveryDate; - this.DeviceFingerprint = deviceFingerprint; - this.EnableOneClick = enableOneClick; - this.EnablePayOut = enablePayOut; - this.EnableRecurring = enableRecurring; - this.EnhancedSchemeData = enhancedSchemeData; - this.EntityType = entityType; - this.FraudOffset = fraudOffset; - this.FundOrigin = fundOrigin; - this.FundRecipient = fundRecipient; - this.IndustryUsage = industryUsage; - this.Installments = installments; - this.LineItems = lineItems; - this.LocalizedShopperStatement = localizedShopperStatement; - this.Mandate = mandate; - this.Mcc = mcc; - this.MerchantOrderReference = merchantOrderReference; - this.MerchantRiskIndicator = merchantRiskIndicator; - this.Metadata = metadata; - this.MpiData = mpiData; - this.Order = order; - this.OrderReference = orderReference; - this.Origin = origin; - this.PlatformChargebackLogic = platformChargebackLogic; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.RecurringProcessingModel = recurringProcessingModel; - this.RedirectFromIssuerMethod = redirectFromIssuerMethod; - this.RedirectToIssuerMethod = redirectToIssuerMethod; - this.RiskData = riskData; - this.SessionValidity = sessionValidity; - this.ShopperConversionId = shopperConversionId; - this.ShopperEmail = shopperEmail; - this.ShopperIP = shopperIP; - this.ShopperInteraction = shopperInteraction; - this.ShopperLocale = shopperLocale; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.ShopperStatement = shopperStatement; - this.SocialSecurityNumber = socialSecurityNumber; - this.Splits = splits; - this.Store = store; - this.StorePaymentMethod = storePaymentMethod; - this.SubMerchants = subMerchants; - this.Surcharge = surcharge; - this.TelephoneNumber = telephoneNumber; - this.ThreeDS2RequestData = threeDS2RequestData; - this.ThreeDSAuthenticationOnly = threeDSAuthenticationOnly; - this.TrustedShopper = trustedShopper; - } - - /// - /// Gets or Sets AccountInfo - /// - [DataMember(Name = "accountInfo", EmitDefaultValue = false)] - public AccountInfo AccountInfo { get; set; } - - /// - /// Gets or Sets AdditionalAmount - /// - [DataMember(Name = "additionalAmount", EmitDefaultValue = false)] - public Amount AdditionalAmount { get; set; } - - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - /// - /// This field contains additional data, which may be required for a particular payment request. The `additionalData` object consists of entries, each of which includes the key and value. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets AuthenticationData - /// - [DataMember(Name = "authenticationData", EmitDefaultValue = false)] - public AuthenticationData AuthenticationData { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public CheckoutBankAccount BankAccount { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public BillingAddress BillingAddress { get; set; } - - /// - /// Gets or Sets BrowserInfo - /// - [DataMember(Name = "browserInfo", EmitDefaultValue = false)] - public BrowserInfo BrowserInfo { get; set; } - - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - /// - /// The delay between the authorisation and scheduled auto-capture, specified in hours. - [DataMember(Name = "captureDelayHours", EmitDefaultValue = false)] - public int? CaptureDelayHours { get; set; } - - /// - /// Checkout attempt ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - /// - /// Checkout attempt ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Gets or Sets Company - /// - [DataMember(Name = "company", EmitDefaultValue = false)] - public Company Company { get; set; } - - /// - /// Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - /// - /// Conversion ID that corresponds to the Id generated by the client SDK for tracking user payment journey. - [DataMember(Name = "conversionId", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use `checkoutAttemptId` instead")] - public string ConversionId { get; set; } - - /// - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE - /// - /// The shopper country. Format: [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) Example: NL or DE - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - /// - /// The shopper's date of birth. Format [ISO-8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DD - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - public DateTime DateOfBirth { get; set; } - - /// - /// Gets or Sets DccQuote - /// - [DataMember(Name = "dccQuote", EmitDefaultValue = false)] - public ForexQuote DccQuote { get; set; } - - /// - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - /// - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - [DataMember(Name = "deliverAt", EmitDefaultValue = false)] - public DateTime DeliverAt { get; set; } - - /// - /// Gets or Sets DeliveryAddress - /// - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public DeliveryAddress DeliveryAddress { get; set; } - - /// - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - /// - /// The date and time the purchased goods should be delivered. Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): YYYY-MM-DDThh:mm:ss.sssTZD Example: 2017-07-17T13:42:40.428+01:00 - [DataMember(Name = "deliveryDate", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v70. Use `deliverAt` instead.")] - public DateTime DeliveryDate { get; set; } - - /// - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - /// - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - [DataMember(Name = "deviceFingerprint", EmitDefaultValue = false)] - public string DeviceFingerprint { get; set; } - - /// - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). - /// - /// When true and `shopperReference` is provided, the shopper will be asked if the payment details should be stored for future [one-click payments](https://docs.adyen.com/get-started-with-adyen/payment-glossary/#one-click-payments-definition). - [DataMember(Name = "enableOneClick", EmitDefaultValue = false)] - public bool? EnableOneClick { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - /// - /// When true and `shopperReference` is provided, the payment details will be tokenized for payouts. - [DataMember(Name = "enablePayOut", EmitDefaultValue = false)] - public bool? EnablePayOut { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. - /// - /// When true and `shopperReference` is provided, the payment details will be stored for [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types) where the shopper is not present, such as subscription or automatic top-up payments. - [DataMember(Name = "enableRecurring", EmitDefaultValue = false)] - public bool? EnableRecurring { get; set; } - - /// - /// Gets or Sets EnhancedSchemeData - /// - [DataMember(Name = "enhancedSchemeData", EmitDefaultValue = false)] - public EnhancedSchemeData EnhancedSchemeData { get; set; } - - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - [DataMember(Name = "fraudOffset", EmitDefaultValue = false)] - public int? FraudOffset { get; set; } - - /// - /// Gets or Sets FundOrigin - /// - [DataMember(Name = "fundOrigin", EmitDefaultValue = false)] - public FundOrigin FundOrigin { get; set; } - - /// - /// Gets or Sets FundRecipient - /// - [DataMember(Name = "fundRecipient", EmitDefaultValue = false)] - public FundRecipient FundRecipient { get; set; } - - /// - /// Gets or Sets Installments - /// - [DataMember(Name = "installments", EmitDefaultValue = false)] - public Installments Installments { get; set; } - - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. - /// - /// Price and product information about the purchased items, to be included on the invoice sent to the shopper. > This field is required for 3x 4x Oney, Affirm, Afterpay, Clearpay, Klarna, Ratepay, Riverty, and Zip. - [DataMember(Name = "lineItems", EmitDefaultValue = false)] - public List LineItems { get; set; } - - /// - /// The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. - /// - /// The `localizedShopperStatement` field lets you use dynamic values for your shopper statement in a local character set. If not supplied, left empty, or for cross-border transactions, **shopperStatement** is used. Adyen currently supports the ja-Kana character set for Visa and Mastercard payments in Japan using Japanese cards. This character set supports: * UTF-8 based Katakana, capital letters, numbers and special characters. * Half-width or full-width characters. - [DataMember(Name = "localizedShopperStatement", EmitDefaultValue = false)] - public Dictionary LocalizedShopperStatement { get; set; } - - /// - /// Gets or Sets Mandate - /// - [DataMember(Name = "mandate", EmitDefaultValue = false)] - public Mandate Mandate { get; set; } - - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - /// - /// The [merchant category code](https://en.wikipedia.org/wiki/Merchant_category_code) (MCC) is a four-digit number, which relates to a particular market segment. This code reflects the predominant activity that is conducted by the merchant. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - /// - /// This reference allows linking multiple transactions to each other for reporting purposes (i.e. order auth-rate). The reference should be unique per billing cycle. The same merchant order reference should never be reused after the first authorised attempt. If used, this field should be supplied for all incoming authorisations. > We strongly recommend you send the `merchantOrderReference` value to benefit from linking payment requests when authorisation retries take place. In addition, we recommend you provide `retry.orderAttemptNumber`, `retry.chainAttemptNumber`, and `retry.skipRetry` values in `PaymentRequest.additionalData`. - [DataMember(Name = "merchantOrderReference", EmitDefaultValue = false)] - public string MerchantOrderReference { get; set; } - - /// - /// Gets or Sets MerchantRiskIndicator - /// - [DataMember(Name = "merchantRiskIndicator", EmitDefaultValue = false)] - public MerchantRiskIndicator MerchantRiskIndicator { get; set; } - - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - /// - /// Metadata consists of entries, each of which includes a key and a value. Limits: * Maximum 20 key-value pairs per request. When exceeding, the \"177\" error occurs: \"Metadata size exceeds limit\". * Maximum 20 characters per key. * Maximum 80 characters per value. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Gets or Sets MpiData - /// - [DataMember(Name = "mpiData", EmitDefaultValue = false)] - public ThreeDSecureData MpiData { get; set; } - - /// - /// Gets or Sets Order - /// - [DataMember(Name = "order", EmitDefaultValue = false)] - public EncryptedOrderData Order { get; set; } - - /// - /// When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - /// - /// When you are doing multiple partial (gift card) payments, this is the `pspReference` of the first payment. We use this to link the multiple payments to each other. As your own reference for linking multiple payments, use the `merchantOrderReference`instead. - [DataMember(Name = "orderReference", EmitDefaultValue = false)] - public string OrderReference { get; set; } - - /// - /// > Required for browser-based (`channel` **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash. - /// - /// > Required for browser-based (`channel` **Web**) 3D Secure 2 transactions.Set this to the origin URL of the page where you are rendering the Drop-in/Component. Do not include subdirectories and a trailing slash. - [DataMember(Name = "origin", EmitDefaultValue = false)] - public string Origin { get; set; } - - /// - /// Gets or Sets PaymentMethod - /// - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public CheckoutPaymentMethod PaymentMethod { get; set; } - - /// - /// Gets or Sets PlatformChargebackLogic - /// - [DataMember(Name = "platformChargebackLogic", EmitDefaultValue = false)] - public PlatformChargebackLogic PlatformChargebackLogic { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public string RecurringExpiry { get; set; } - - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer. - /// - /// Specifies the redirect method (GET or POST) when redirecting back from the issuer. - [DataMember(Name = "redirectFromIssuerMethod", EmitDefaultValue = false)] - public string RedirectFromIssuerMethod { get; set; } - - /// - /// Specifies the redirect method (GET or POST) when redirecting to the issuer. - /// - /// Specifies the redirect method (GET or POST) when redirecting to the issuer. - [DataMember(Name = "redirectToIssuerMethod", EmitDefaultValue = false)] - public string RedirectToIssuerMethod { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. - /// - /// The URL to return to in case of a redirection. The format depends on the channel. * For web, include the protocol `http://` or `https://`. You can also include your own additional query parameters, for example, shopper ID or order reference number. Example: `https://your-company.com/checkout?shopperOrder=12xy` * For iOS, use the custom URL for your app. To know more about setting custom URL schemes, refer to the [Apple Developer documentation](https://developer.apple.com/documentation/uikit/inter-process_communication/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app). Example: `my-app://` * For Android, use a custom URL handled by an Activity on your app. You can configure it with an [intent filter](https://developer.android.com/guide/components/intents-filters). Example: `my-app://your.package.name` If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. We strongly recommend that you use a maximum of 1024 characters. > The URL must not include personally identifiable information (PII), for example name or email address. - [DataMember(Name = "returnUrl", IsRequired = false, EmitDefaultValue = false)] - public string ReturnUrl { get; set; } - - /// - /// Gets or Sets RiskData - /// - [DataMember(Name = "riskData", EmitDefaultValue = false)] - public RiskData RiskData { get; set; } - - /// - /// The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 - /// - /// The date and time until when the session remains valid, in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format. For example: 2020-07-18T15:42:40.428+01:00 - [DataMember(Name = "sessionValidity", EmitDefaultValue = false)] - public string SessionValidity { get; set; } - - /// - /// A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates. - /// - /// A unique ID that can be used to associate `/paymentMethods` and `/payments` requests with the same shopper transaction, offering insights into conversion rates. - [DataMember(Name = "shopperConversionId", EmitDefaultValue = false)] - public string ShopperConversionId { get; set; } - - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > Required for Visa and JCB transactions that require 3D Secure 2 authentication if you did not include the `telephoneNumber`. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The shopper's IP address. We recommend that you provide this data, as it is used in a number of risk checks (for instance, number of payment attempts or location-based checks).> Required for Visa and JCB transactions that require 3D Secure 2 authentication for all web and mobile integrations, if you did not include the `shopperEmail`. For native mobile integrations, the field is required to support cases where authentication is routed to the redirect flow. This field is also mandatory for some merchants depending on your business model. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "shopperIP", EmitDefaultValue = false)] - public string ShopperIP { get; set; } - - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - /// - /// The combination of a language code and a country code to specify the language to be used in the payment. - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - /// - /// An array of objects specifying how to split a payment when using [Adyen for Platforms](https://docs.adyen.com/platforms/process-payments#providing-split-information), [Classic Platforms integration](https://docs.adyen.com/classic-platforms/processing-payments#providing-split-information), or [Issuing](https://docs.adyen.com/issuing/manage-funds#split). - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - /// - /// Required for Adyen for Platforms integrations if you are a platform model. This is your [reference](https://docs.adyen.com/api-explorer/Management/3/post/merchants/(merchantId)/stores#request-reference) (on [balance platform](https://docs.adyen.com/platforms)) or the [storeReference](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccountHolder#request-accountHolderDetails-storeDetails-storeReference) (in the [classic integration](https://docs.adyen.com/classic-platforms/processing-payments/route-payment-to-store/#route-a-payment-to-a-store)) for the ecommerce or point-of-sale store that is processing the payment. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). - /// - /// When true and `shopperReference` is provided, the payment details will be stored for future [recurring payments](https://docs.adyen.com/online-payments/tokenization/#recurring-payment-types). - [DataMember(Name = "storePaymentMethod", EmitDefaultValue = false)] - public bool? StorePaymentMethod { get; set; } - - /// - /// This field contains additional information on the submerchant, who is onboarded to an acquirer through a payment facilitator or aggregator - /// - /// This field contains additional information on the submerchant, who is onboarded to an acquirer through a payment facilitator or aggregator - [DataMember(Name = "subMerchants", EmitDefaultValue = false)] - public List SubMerchants { get; set; } - - /// - /// Gets or Sets Surcharge - /// - [DataMember(Name = "surcharge", EmitDefaultValue = false)] - public Surcharge Surcharge { get; set; } - - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - /// - /// The shopper's telephone number. > Required for Visa and JCB transactions that require 3D Secure 2 authentication, if you did not include the `shopperEmail`. The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Gets or Sets ThreeDS2RequestData - /// - [DataMember(Name = "threeDS2RequestData", EmitDefaultValue = false)] - public ThreeDS2RequestFields ThreeDS2RequestData { get; set; } - - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorisation.Default: **false**. - /// - /// Required to trigger the [authentication-only flow](https://docs.adyen.com/online-payments/3d-secure/authentication-only/). If set to **true**, you will only perform the 3D Secure 2 authentication, and will not proceed to the payment authorisation.Default: **false**. - [DataMember(Name = "threeDSAuthenticationOnly", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v69. Use `authenticationData.authenticationOnly` instead.")] - public bool? ThreeDSAuthenticationOnly { get; set; } - - /// - /// Set to true if the payment should be routed to a trusted MID. - /// - /// Set to true if the payment should be routed to a trusted MID. - [DataMember(Name = "trustedShopper", EmitDefaultValue = false)] - public bool? TrustedShopper { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentRequest {\n"); - sb.Append(" AccountInfo: ").Append(AccountInfo).Append("\n"); - sb.Append(" AdditionalAmount: ").Append(AdditionalAmount).Append("\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" AuthenticationData: ").Append(AuthenticationData).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" BrowserInfo: ").Append(BrowserInfo).Append("\n"); - sb.Append(" CaptureDelayHours: ").Append(CaptureDelayHours).Append("\n"); - sb.Append(" Channel: ").Append(Channel).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" ConversionId: ").Append(ConversionId).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DccQuote: ").Append(DccQuote).Append("\n"); - sb.Append(" DeliverAt: ").Append(DeliverAt).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" DeliveryDate: ").Append(DeliveryDate).Append("\n"); - sb.Append(" DeviceFingerprint: ").Append(DeviceFingerprint).Append("\n"); - sb.Append(" EnableOneClick: ").Append(EnableOneClick).Append("\n"); - sb.Append(" EnablePayOut: ").Append(EnablePayOut).Append("\n"); - sb.Append(" EnableRecurring: ").Append(EnableRecurring).Append("\n"); - sb.Append(" EnhancedSchemeData: ").Append(EnhancedSchemeData).Append("\n"); - sb.Append(" EntityType: ").Append(EntityType).Append("\n"); - sb.Append(" FraudOffset: ").Append(FraudOffset).Append("\n"); - sb.Append(" FundOrigin: ").Append(FundOrigin).Append("\n"); - sb.Append(" FundRecipient: ").Append(FundRecipient).Append("\n"); - sb.Append(" IndustryUsage: ").Append(IndustryUsage).Append("\n"); - sb.Append(" Installments: ").Append(Installments).Append("\n"); - sb.Append(" LineItems: ").Append(LineItems).Append("\n"); - sb.Append(" LocalizedShopperStatement: ").Append(LocalizedShopperStatement).Append("\n"); - sb.Append(" Mandate: ").Append(Mandate).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantOrderReference: ").Append(MerchantOrderReference).Append("\n"); - sb.Append(" MerchantRiskIndicator: ").Append(MerchantRiskIndicator).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MpiData: ").Append(MpiData).Append("\n"); - sb.Append(" Order: ").Append(Order).Append("\n"); - sb.Append(" OrderReference: ").Append(OrderReference).Append("\n"); - sb.Append(" Origin: ").Append(Origin).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" PlatformChargebackLogic: ").Append(PlatformChargebackLogic).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" RedirectFromIssuerMethod: ").Append(RedirectFromIssuerMethod).Append("\n"); - sb.Append(" RedirectToIssuerMethod: ").Append(RedirectToIssuerMethod).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); - sb.Append(" RiskData: ").Append(RiskData).Append("\n"); - sb.Append(" SessionValidity: ").Append(SessionValidity).Append("\n"); - sb.Append(" ShopperConversionId: ").Append(ShopperConversionId).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StorePaymentMethod: ").Append(StorePaymentMethod).Append("\n"); - sb.Append(" SubMerchants: ").Append(SubMerchants).Append("\n"); - sb.Append(" Surcharge: ").Append(Surcharge).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" ThreeDS2RequestData: ").Append(ThreeDS2RequestData).Append("\n"); - sb.Append(" ThreeDSAuthenticationOnly: ").Append(ThreeDSAuthenticationOnly).Append("\n"); - sb.Append(" TrustedShopper: ").Append(TrustedShopper).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentRequest); - } - - /// - /// Returns true if PaymentRequest instances are equal - /// - /// Instance of PaymentRequest to be compared - /// Boolean - public bool Equals(PaymentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountInfo == input.AccountInfo || - (this.AccountInfo != null && - this.AccountInfo.Equals(input.AccountInfo)) - ) && - ( - this.AdditionalAmount == input.AdditionalAmount || - (this.AdditionalAmount != null && - this.AdditionalAmount.Equals(input.AdditionalAmount)) - ) && - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.AuthenticationData == input.AuthenticationData || - (this.AuthenticationData != null && - this.AuthenticationData.Equals(input.AuthenticationData)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.BrowserInfo == input.BrowserInfo || - (this.BrowserInfo != null && - this.BrowserInfo.Equals(input.BrowserInfo)) - ) && - ( - this.CaptureDelayHours == input.CaptureDelayHours || - this.CaptureDelayHours.Equals(input.CaptureDelayHours) - ) && - ( - this.Channel == input.Channel || - this.Channel.Equals(input.Channel) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.ConversionId == input.ConversionId || - (this.ConversionId != null && - this.ConversionId.Equals(input.ConversionId)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DccQuote == input.DccQuote || - (this.DccQuote != null && - this.DccQuote.Equals(input.DccQuote)) - ) && - ( - this.DeliverAt == input.DeliverAt || - (this.DeliverAt != null && - this.DeliverAt.Equals(input.DeliverAt)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.DeliveryDate == input.DeliveryDate || - (this.DeliveryDate != null && - this.DeliveryDate.Equals(input.DeliveryDate)) - ) && - ( - this.DeviceFingerprint == input.DeviceFingerprint || - (this.DeviceFingerprint != null && - this.DeviceFingerprint.Equals(input.DeviceFingerprint)) - ) && - ( - this.EnableOneClick == input.EnableOneClick || - this.EnableOneClick.Equals(input.EnableOneClick) - ) && - ( - this.EnablePayOut == input.EnablePayOut || - this.EnablePayOut.Equals(input.EnablePayOut) - ) && - ( - this.EnableRecurring == input.EnableRecurring || - this.EnableRecurring.Equals(input.EnableRecurring) - ) && - ( - this.EnhancedSchemeData == input.EnhancedSchemeData || - (this.EnhancedSchemeData != null && - this.EnhancedSchemeData.Equals(input.EnhancedSchemeData)) - ) && - ( - this.EntityType == input.EntityType || - this.EntityType.Equals(input.EntityType) - ) && - ( - this.FraudOffset == input.FraudOffset || - this.FraudOffset.Equals(input.FraudOffset) - ) && - ( - this.FundOrigin == input.FundOrigin || - (this.FundOrigin != null && - this.FundOrigin.Equals(input.FundOrigin)) - ) && - ( - this.FundRecipient == input.FundRecipient || - (this.FundRecipient != null && - this.FundRecipient.Equals(input.FundRecipient)) - ) && - ( - this.IndustryUsage == input.IndustryUsage || - this.IndustryUsage.Equals(input.IndustryUsage) - ) && - ( - this.Installments == input.Installments || - (this.Installments != null && - this.Installments.Equals(input.Installments)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.LocalizedShopperStatement == input.LocalizedShopperStatement || - this.LocalizedShopperStatement != null && - input.LocalizedShopperStatement != null && - this.LocalizedShopperStatement.SequenceEqual(input.LocalizedShopperStatement) - ) && - ( - this.Mandate == input.Mandate || - (this.Mandate != null && - this.Mandate.Equals(input.Mandate)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantOrderReference == input.MerchantOrderReference || - (this.MerchantOrderReference != null && - this.MerchantOrderReference.Equals(input.MerchantOrderReference)) - ) && - ( - this.MerchantRiskIndicator == input.MerchantRiskIndicator || - (this.MerchantRiskIndicator != null && - this.MerchantRiskIndicator.Equals(input.MerchantRiskIndicator)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MpiData == input.MpiData || - (this.MpiData != null && - this.MpiData.Equals(input.MpiData)) - ) && - ( - this.Order == input.Order || - (this.Order != null && - this.Order.Equals(input.Order)) - ) && - ( - this.OrderReference == input.OrderReference || - (this.OrderReference != null && - this.OrderReference.Equals(input.OrderReference)) - ) && - ( - this.Origin == input.Origin || - (this.Origin != null && - this.Origin.Equals(input.Origin)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.PlatformChargebackLogic == input.PlatformChargebackLogic || - (this.PlatformChargebackLogic != null && - this.PlatformChargebackLogic.Equals(input.PlatformChargebackLogic)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.RedirectFromIssuerMethod == input.RedirectFromIssuerMethod || - (this.RedirectFromIssuerMethod != null && - this.RedirectFromIssuerMethod.Equals(input.RedirectFromIssuerMethod)) - ) && - ( - this.RedirectToIssuerMethod == input.RedirectToIssuerMethod || - (this.RedirectToIssuerMethod != null && - this.RedirectToIssuerMethod.Equals(input.RedirectToIssuerMethod)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ) && - ( - this.RiskData == input.RiskData || - (this.RiskData != null && - this.RiskData.Equals(input.RiskData)) - ) && - ( - this.SessionValidity == input.SessionValidity || - (this.SessionValidity != null && - this.SessionValidity.Equals(input.SessionValidity)) - ) && - ( - this.ShopperConversionId == input.ShopperConversionId || - (this.ShopperConversionId != null && - this.ShopperConversionId.Equals(input.ShopperConversionId)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperIP == input.ShopperIP || - (this.ShopperIP != null && - this.ShopperIP.Equals(input.ShopperIP)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StorePaymentMethod == input.StorePaymentMethod || - this.StorePaymentMethod.Equals(input.StorePaymentMethod) - ) && - ( - this.SubMerchants == input.SubMerchants || - this.SubMerchants != null && - input.SubMerchants != null && - this.SubMerchants.SequenceEqual(input.SubMerchants) - ) && - ( - this.Surcharge == input.Surcharge || - (this.Surcharge != null && - this.Surcharge.Equals(input.Surcharge)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.ThreeDS2RequestData == input.ThreeDS2RequestData || - (this.ThreeDS2RequestData != null && - this.ThreeDS2RequestData.Equals(input.ThreeDS2RequestData)) - ) && - ( - this.ThreeDSAuthenticationOnly == input.ThreeDSAuthenticationOnly || - this.ThreeDSAuthenticationOnly.Equals(input.ThreeDSAuthenticationOnly) - ) && - ( - this.TrustedShopper == input.TrustedShopper || - this.TrustedShopper.Equals(input.TrustedShopper) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountInfo != null) - { - hashCode = (hashCode * 59) + this.AccountInfo.GetHashCode(); - } - if (this.AdditionalAmount != null) - { - hashCode = (hashCode * 59) + this.AdditionalAmount.GetHashCode(); - } - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.AuthenticationData != null) - { - hashCode = (hashCode * 59) + this.AuthenticationData.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.BrowserInfo != null) - { - hashCode = (hashCode * 59) + this.BrowserInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CaptureDelayHours.GetHashCode(); - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.ConversionId != null) - { - hashCode = (hashCode * 59) + this.ConversionId.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DccQuote != null) - { - hashCode = (hashCode * 59) + this.DccQuote.GetHashCode(); - } - if (this.DeliverAt != null) - { - hashCode = (hashCode * 59) + this.DeliverAt.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.DeliveryDate != null) - { - hashCode = (hashCode * 59) + this.DeliveryDate.GetHashCode(); - } - if (this.DeviceFingerprint != null) - { - hashCode = (hashCode * 59) + this.DeviceFingerprint.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EnableOneClick.GetHashCode(); - hashCode = (hashCode * 59) + this.EnablePayOut.GetHashCode(); - hashCode = (hashCode * 59) + this.EnableRecurring.GetHashCode(); - if (this.EnhancedSchemeData != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EntityType.GetHashCode(); - hashCode = (hashCode * 59) + this.FraudOffset.GetHashCode(); - if (this.FundOrigin != null) - { - hashCode = (hashCode * 59) + this.FundOrigin.GetHashCode(); - } - if (this.FundRecipient != null) - { - hashCode = (hashCode * 59) + this.FundRecipient.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IndustryUsage.GetHashCode(); - if (this.Installments != null) - { - hashCode = (hashCode * 59) + this.Installments.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.LocalizedShopperStatement != null) - { - hashCode = (hashCode * 59) + this.LocalizedShopperStatement.GetHashCode(); - } - if (this.Mandate != null) - { - hashCode = (hashCode * 59) + this.Mandate.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantOrderReference != null) - { - hashCode = (hashCode * 59) + this.MerchantOrderReference.GetHashCode(); - } - if (this.MerchantRiskIndicator != null) - { - hashCode = (hashCode * 59) + this.MerchantRiskIndicator.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MpiData != null) - { - hashCode = (hashCode * 59) + this.MpiData.GetHashCode(); - } - if (this.Order != null) - { - hashCode = (hashCode * 59) + this.Order.GetHashCode(); - } - if (this.OrderReference != null) - { - hashCode = (hashCode * 59) + this.OrderReference.GetHashCode(); - } - if (this.Origin != null) - { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.PlatformChargebackLogic != null) - { - hashCode = (hashCode * 59) + this.PlatformChargebackLogic.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.RedirectFromIssuerMethod != null) - { - hashCode = (hashCode * 59) + this.RedirectFromIssuerMethod.GetHashCode(); - } - if (this.RedirectToIssuerMethod != null) - { - hashCode = (hashCode * 59) + this.RedirectToIssuerMethod.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - if (this.RiskData != null) - { - hashCode = (hashCode * 59) + this.RiskData.GetHashCode(); - } - if (this.SessionValidity != null) - { - hashCode = (hashCode * 59) + this.SessionValidity.GetHashCode(); - } - if (this.ShopperConversionId != null) - { - hashCode = (hashCode * 59) + this.ShopperConversionId.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperIP != null) - { - hashCode = (hashCode * 59) + this.ShopperIP.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StorePaymentMethod.GetHashCode(); - if (this.SubMerchants != null) - { - hashCode = (hashCode * 59) + this.SubMerchants.GetHashCode(); - } - if (this.Surcharge != null) - { - hashCode = (hashCode * 59) + this.Surcharge.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - if (this.ThreeDS2RequestData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2RequestData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSAuthenticationOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.TrustedShopper.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CheckoutAttemptId (string) maxLength - if (this.CheckoutAttemptId != null && this.CheckoutAttemptId.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CheckoutAttemptId, length must be less than 256.", new [] { "CheckoutAttemptId" }); - } - - // CountryCode (string) maxLength - if (this.CountryCode != null && this.CountryCode.Length > 100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CountryCode, length must be less than 100.", new [] { "CountryCode" }); - } - - // DeviceFingerprint (string) maxLength - if (this.DeviceFingerprint != null && this.DeviceFingerprint.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DeviceFingerprint, length must be less than 5000.", new [] { "DeviceFingerprint" }); - } - - // MerchantOrderReference (string) maxLength - if (this.MerchantOrderReference != null && this.MerchantOrderReference.Length > 1000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MerchantOrderReference, length must be less than 1000.", new [] { "MerchantOrderReference" }); - } - - // Origin (string) maxLength - if (this.Origin != null && this.Origin.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Origin, length must be less than 80.", new [] { "Origin" }); - } - - // ReturnUrl (string) maxLength - if (this.ReturnUrl != null && this.ReturnUrl.Length > 8000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReturnUrl, length must be less than 8000.", new [] { "ReturnUrl" }); - } - - // ShopperConversionId (string) maxLength - if (this.ShopperConversionId != null && this.ShopperConversionId.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperConversionId, length must be less than 256.", new [] { "ShopperConversionId" }); - } - - // ShopperIP (string) maxLength - if (this.ShopperIP != null && this.ShopperIP.Length > 1000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperIP, length must be less than 1000.", new [] { "ShopperIP" }); - } - - // ShopperReference (string) maxLength - if (this.ShopperReference != null && this.ShopperReference.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be less than 256.", new [] { "ShopperReference" }); - } - - // ShopperReference (string) minLength - if (this.ShopperReference != null && this.ShopperReference.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); - } - - // ShopperStatement (string) maxLength - if (this.ShopperStatement != null && this.ShopperStatement.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperStatement, length must be less than 10000.", new [] { "ShopperStatement" }); - } - - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 64.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentResponse.cs b/Adyen/Model/Checkout/PaymentResponse.cs deleted file mode 100644 index ed9e81655..000000000 --- a/Adyen/Model/Checkout/PaymentResponse.cs +++ /dev/null @@ -1,478 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentResponse - /// - [DataContract(Name = "PaymentResponse")] - public partial class PaymentResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum AuthenticationFinished for value: AuthenticationFinished - /// - [EnumMember(Value = "AuthenticationFinished")] - AuthenticationFinished = 1, - - /// - /// Enum AuthenticationNotRequired for value: AuthenticationNotRequired - /// - [EnumMember(Value = "AuthenticationNotRequired")] - AuthenticationNotRequired = 2, - - /// - /// Enum Authorised for value: Authorised - /// - [EnumMember(Value = "Authorised")] - Authorised = 3, - - /// - /// Enum Cancelled for value: Cancelled - /// - [EnumMember(Value = "Cancelled")] - Cancelled = 4, - - /// - /// Enum ChallengeShopper for value: ChallengeShopper - /// - [EnumMember(Value = "ChallengeShopper")] - ChallengeShopper = 5, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 6, - - /// - /// Enum IdentifyShopper for value: IdentifyShopper - /// - [EnumMember(Value = "IdentifyShopper")] - IdentifyShopper = 7, - - /// - /// Enum PartiallyAuthorised for value: PartiallyAuthorised - /// - [EnumMember(Value = "PartiallyAuthorised")] - PartiallyAuthorised = 8, - - /// - /// Enum Pending for value: Pending - /// - [EnumMember(Value = "Pending")] - Pending = 9, - - /// - /// Enum PresentToShopper for value: PresentToShopper - /// - [EnumMember(Value = "PresentToShopper")] - PresentToShopper = 10, - - /// - /// Enum Received for value: Received - /// - [EnumMember(Value = "Received")] - Received = 11, - - /// - /// Enum RedirectShopper for value: RedirectShopper - /// - [EnumMember(Value = "RedirectShopper")] - RedirectShopper = 12, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 13, - - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 14 - - } - - - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// action. - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.. - /// amount. - /// Donation Token containing payment details for Adyen Giving.. - /// fraudResult. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters.. - /// order. - /// paymentMethod. - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > For payment methods that require a redirect or additional action, you will get this value in the `/payments/details` response.. - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).. - /// Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).. - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state.. - /// threeDS2ResponseData. - /// threeDS2Result. - /// When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`.. - public PaymentResponse(PaymentResponseAction action = default(PaymentResponseAction), Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), string donationToken = default(string), FraudResult fraudResult = default(FraudResult), string merchantReference = default(string), CheckoutOrderResponse order = default(CheckoutOrderResponse), ResponsePaymentMethod paymentMethod = default(ResponsePaymentMethod), string pspReference = default(string), string refusalReason = default(string), string refusalReasonCode = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?), ThreeDS2ResponseData threeDS2ResponseData = default(ThreeDS2ResponseData), ThreeDS2Result threeDS2Result = default(ThreeDS2Result), string threeDSPaymentData = default(string)) - { - this.Action = action; - this.AdditionalData = additionalData; - this.Amount = amount; - this.DonationToken = donationToken; - this.FraudResult = fraudResult; - this.MerchantReference = merchantReference; - this.Order = order; - this.PaymentMethod = paymentMethod; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.RefusalReasonCode = refusalReasonCode; - this.ResultCode = resultCode; - this.ThreeDS2ResponseData = threeDS2ResponseData; - this.ThreeDS2Result = threeDS2Result; - this.ThreeDSPaymentData = threeDSPaymentData; - } - - /// - /// Gets or Sets Action - /// - [DataMember(Name = "action", EmitDefaultValue = false)] - public PaymentResponseAction Action { get; set; } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Donation Token containing payment details for Adyen Giving. - /// - /// Donation Token containing payment details for Adyen Giving. - [DataMember(Name = "donationToken", EmitDefaultValue = false)] - public string DonationToken { get; set; } - - /// - /// Gets or Sets FraudResult - /// - [DataMember(Name = "fraudResult", EmitDefaultValue = false)] - public FraudResult FraudResult { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// Gets or Sets Order - /// - [DataMember(Name = "order", EmitDefaultValue = false)] - public CheckoutOrderResponse Order { get; set; } - - /// - /// Gets or Sets PaymentMethod - /// - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public ResponsePaymentMethod PaymentMethod { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > For payment methods that require a redirect or additional action, you will get this value in the `/payments/details` response. - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. > For payment methods that require a redirect or additional action, you will get this value in the `/payments/details` response. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - /// - /// Code that specifies the refusal reason. For more information, see [Authorisation refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - [DataMember(Name = "refusalReasonCode", EmitDefaultValue = false)] - public string RefusalReasonCode { get; set; } - - /// - /// Gets or Sets ThreeDS2ResponseData - /// - [DataMember(Name = "threeDS2ResponseData", EmitDefaultValue = false)] - public ThreeDS2ResponseData ThreeDS2ResponseData { get; set; } - - /// - /// Gets or Sets ThreeDS2Result - /// - [DataMember(Name = "threeDS2Result", EmitDefaultValue = false)] - public ThreeDS2Result ThreeDS2Result { get; set; } - - /// - /// When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`. - /// - /// When non-empty, contains a value that you must submit to the `/payments/details` endpoint as `paymentData`. - [DataMember(Name = "threeDSPaymentData", EmitDefaultValue = false)] - public string ThreeDSPaymentData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentResponse {\n"); - sb.Append(" Action: ").Append(Action).Append("\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" DonationToken: ").Append(DonationToken).Append("\n"); - sb.Append(" FraudResult: ").Append(FraudResult).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" Order: ").Append(Order).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" RefusalReasonCode: ").Append(RefusalReasonCode).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ThreeDS2ResponseData: ").Append(ThreeDS2ResponseData).Append("\n"); - sb.Append(" ThreeDS2Result: ").Append(ThreeDS2Result).Append("\n"); - sb.Append(" ThreeDSPaymentData: ").Append(ThreeDSPaymentData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentResponse); - } - - /// - /// Returns true if PaymentResponse instances are equal - /// - /// Instance of PaymentResponse to be compared - /// Boolean - public bool Equals(PaymentResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Action == input.Action || - (this.Action != null && - this.Action.Equals(input.Action)) - ) && - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.DonationToken == input.DonationToken || - (this.DonationToken != null && - this.DonationToken.Equals(input.DonationToken)) - ) && - ( - this.FraudResult == input.FraudResult || - (this.FraudResult != null && - this.FraudResult.Equals(input.FraudResult)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.Order == input.Order || - (this.Order != null && - this.Order.Equals(input.Order)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.RefusalReasonCode == input.RefusalReasonCode || - (this.RefusalReasonCode != null && - this.RefusalReasonCode.Equals(input.RefusalReasonCode)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.ThreeDS2ResponseData == input.ThreeDS2ResponseData || - (this.ThreeDS2ResponseData != null && - this.ThreeDS2ResponseData.Equals(input.ThreeDS2ResponseData)) - ) && - ( - this.ThreeDS2Result == input.ThreeDS2Result || - (this.ThreeDS2Result != null && - this.ThreeDS2Result.Equals(input.ThreeDS2Result)) - ) && - ( - this.ThreeDSPaymentData == input.ThreeDSPaymentData || - (this.ThreeDSPaymentData != null && - this.ThreeDSPaymentData.Equals(input.ThreeDSPaymentData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Action != null) - { - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - } - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.DonationToken != null) - { - hashCode = (hashCode * 59) + this.DonationToken.GetHashCode(); - } - if (this.FraudResult != null) - { - hashCode = (hashCode * 59) + this.FraudResult.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.Order != null) - { - hashCode = (hashCode * 59) + this.Order.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - if (this.RefusalReasonCode != null) - { - hashCode = (hashCode * 59) + this.RefusalReasonCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.ThreeDS2ResponseData != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2ResponseData.GetHashCode(); - } - if (this.ThreeDS2Result != null) - { - hashCode = (hashCode * 59) + this.ThreeDS2Result.GetHashCode(); - } - if (this.ThreeDSPaymentData != null) - { - hashCode = (hashCode * 59) + this.ThreeDSPaymentData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentResponseAction.cs b/Adyen/Model/Checkout/PaymentResponseAction.cs deleted file mode 100644 index 9069a7e40..000000000 --- a/Adyen/Model/Checkout/PaymentResponseAction.cs +++ /dev/null @@ -1,512 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Checkout -{ - /// - /// Action to be taken for completing the payment. - /// - [JsonConverter(typeof(PaymentResponseActionJsonConverter))] - [DataContract(Name = "PaymentResponse_action")] - public partial class PaymentResponseAction : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutAwaitAction. - public PaymentResponseAction(CheckoutAwaitAction actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutBankTransferAction. - public PaymentResponseAction(CheckoutBankTransferAction actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutDelegatedAuthenticationAction. - public PaymentResponseAction(CheckoutDelegatedAuthenticationAction actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutNativeRedirectAction. - public PaymentResponseAction(CheckoutNativeRedirectAction actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutQrCodeAction. - public PaymentResponseAction(CheckoutQrCodeAction actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutRedirectAction. - public PaymentResponseAction(CheckoutRedirectAction actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutSDKAction. - public PaymentResponseAction(CheckoutSDKAction actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutThreeDS2Action. - public PaymentResponseAction(CheckoutThreeDS2Action actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CheckoutVoucherAction. - public PaymentResponseAction(CheckoutVoucherAction actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(CheckoutAwaitAction)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CheckoutBankTransferAction)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CheckoutDelegatedAuthenticationAction)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CheckoutNativeRedirectAction)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CheckoutQrCodeAction)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CheckoutRedirectAction)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CheckoutSDKAction)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CheckoutThreeDS2Action)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CheckoutVoucherAction)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: CheckoutAwaitAction, CheckoutBankTransferAction, CheckoutDelegatedAuthenticationAction, CheckoutNativeRedirectAction, CheckoutQrCodeAction, CheckoutRedirectAction, CheckoutSDKAction, CheckoutThreeDS2Action, CheckoutVoucherAction"); - } - } - } - - /// - /// Get the actual instance of `CheckoutAwaitAction`. If the actual instance is not `CheckoutAwaitAction`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutAwaitAction - public CheckoutAwaitAction GetCheckoutAwaitAction() - { - return (CheckoutAwaitAction)this.ActualInstance; - } - - /// - /// Get the actual instance of `CheckoutBankTransferAction`. If the actual instance is not `CheckoutBankTransferAction`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutBankTransferAction - public CheckoutBankTransferAction GetCheckoutBankTransferAction() - { - return (CheckoutBankTransferAction)this.ActualInstance; - } - - /// - /// Get the actual instance of `CheckoutDelegatedAuthenticationAction`. If the actual instance is not `CheckoutDelegatedAuthenticationAction`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutDelegatedAuthenticationAction - public CheckoutDelegatedAuthenticationAction GetCheckoutDelegatedAuthenticationAction() - { - return (CheckoutDelegatedAuthenticationAction)this.ActualInstance; - } - - /// - /// Get the actual instance of `CheckoutNativeRedirectAction`. If the actual instance is not `CheckoutNativeRedirectAction`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutNativeRedirectAction - public CheckoutNativeRedirectAction GetCheckoutNativeRedirectAction() - { - return (CheckoutNativeRedirectAction)this.ActualInstance; - } - - /// - /// Get the actual instance of `CheckoutQrCodeAction`. If the actual instance is not `CheckoutQrCodeAction`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutQrCodeAction - public CheckoutQrCodeAction GetCheckoutQrCodeAction() - { - return (CheckoutQrCodeAction)this.ActualInstance; - } - - /// - /// Get the actual instance of `CheckoutRedirectAction`. If the actual instance is not `CheckoutRedirectAction`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutRedirectAction - public CheckoutRedirectAction GetCheckoutRedirectAction() - { - return (CheckoutRedirectAction)this.ActualInstance; - } - - /// - /// Get the actual instance of `CheckoutSDKAction`. If the actual instance is not `CheckoutSDKAction`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutSDKAction - public CheckoutSDKAction GetCheckoutSDKAction() - { - return (CheckoutSDKAction)this.ActualInstance; - } - - /// - /// Get the actual instance of `CheckoutThreeDS2Action`. If the actual instance is not `CheckoutThreeDS2Action`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutThreeDS2Action - public CheckoutThreeDS2Action GetCheckoutThreeDS2Action() - { - return (CheckoutThreeDS2Action)this.ActualInstance; - } - - /// - /// Get the actual instance of `CheckoutVoucherAction`. If the actual instance is not `CheckoutVoucherAction`, - /// the InvalidClassException will be thrown - /// - /// An instance of CheckoutVoucherAction - public CheckoutVoucherAction GetCheckoutVoucherAction() - { - return (CheckoutVoucherAction)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class PaymentResponseAction {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, PaymentResponseAction.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of PaymentResponseAction - /// - /// JSON string - /// An instance of PaymentResponseAction - public static PaymentResponseAction FromJson(string jsonString) - { - PaymentResponseAction newPaymentResponseAction = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newPaymentResponseAction; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the CheckoutAwaitAction type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutAwaitAction"); - match++; - } - // Check if the jsonString type enum matches the CheckoutBankTransferAction type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutBankTransferAction"); - match++; - } - // Check if the jsonString type enum matches the CheckoutDelegatedAuthenticationAction type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutDelegatedAuthenticationAction"); - match++; - } - // Check if the jsonString type enum matches the CheckoutNativeRedirectAction type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutNativeRedirectAction"); - match++; - } - // Check if the jsonString type enum matches the CheckoutQrCodeAction type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutQrCodeAction"); - match++; - } - // Check if the jsonString type enum matches the CheckoutRedirectAction type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutRedirectAction"); - match++; - } - // Check if the jsonString type enum matches the CheckoutSDKAction type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutSDKAction"); - match++; - } - // Check if the jsonString type enum matches the CheckoutThreeDS2Action type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutThreeDS2Action"); - match++; - } - // Check if the jsonString type enum matches the CheckoutVoucherAction type enums - if (ContainsValue(type)) - { - newPaymentResponseAction = new PaymentResponseAction(JsonConvert.DeserializeObject(jsonString, PaymentResponseAction.SerializerSettings)); - matchedTypes.Add("CheckoutVoucherAction"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newPaymentResponseAction; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentResponseAction); - } - - /// - /// Returns true if PaymentResponseAction instances are equal - /// - /// Instance of PaymentResponseAction to be compared - /// Boolean - public bool Equals(PaymentResponseAction input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for PaymentResponseAction - /// - public class PaymentResponseActionJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(PaymentResponseAction).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return PaymentResponseAction.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentReversalRequest.cs b/Adyen/Model/Checkout/PaymentReversalRequest.cs deleted file mode 100644 index 7202748ad..000000000 --- a/Adyen/Model/Checkout/PaymentReversalRequest.cs +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentReversalRequest - /// - [DataContract(Name = "PaymentReversalRequest")] - public partial class PaymentReversalRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentReversalRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// applicationInfo. - /// enhancedSchemeData. - /// The merchant account that is used to process the payment. (required). - /// Your reference for the reversal request. Maximum length: 80 characters.. - public PaymentReversalRequest(ApplicationInfo applicationInfo = default(ApplicationInfo), EnhancedSchemeData enhancedSchemeData = default(EnhancedSchemeData), string merchantAccount = default(string), string reference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.ApplicationInfo = applicationInfo; - this.EnhancedSchemeData = enhancedSchemeData; - this.Reference = reference; - } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets EnhancedSchemeData - /// - [DataMember(Name = "enhancedSchemeData", EmitDefaultValue = false)] - public EnhancedSchemeData EnhancedSchemeData { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Your reference for the reversal request. Maximum length: 80 characters. - /// - /// Your reference for the reversal request. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentReversalRequest {\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" EnhancedSchemeData: ").Append(EnhancedSchemeData).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentReversalRequest); - } - - /// - /// Returns true if PaymentReversalRequest instances are equal - /// - /// Instance of PaymentReversalRequest to be compared - /// Boolean - public bool Equals(PaymentReversalRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.EnhancedSchemeData == input.EnhancedSchemeData || - (this.EnhancedSchemeData != null && - this.EnhancedSchemeData.Equals(input.EnhancedSchemeData)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.EnhancedSchemeData != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeData.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaymentReversalResponse.cs b/Adyen/Model/Checkout/PaymentReversalResponse.cs deleted file mode 100644 index b3d5f5be3..000000000 --- a/Adyen/Model/Checkout/PaymentReversalResponse.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaymentReversalResponse - /// - [DataContract(Name = "PaymentReversalResponse")] - public partial class PaymentReversalResponse : IEquatable, IValidatableObject - { - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 1 - - } - - - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentReversalResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account that is used to process the payment. (required). - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to reverse. (required). - /// Adyen's 16-character reference associated with the reversal request. (required). - /// Your reference for the reversal request.. - /// The status of your request. This will always have the value **received**. (required). - public PaymentReversalResponse(string merchantAccount = default(string), string paymentPspReference = default(string), string pspReference = default(string), string reference = default(string), StatusEnum status = default(StatusEnum)) - { - this.MerchantAccount = merchantAccount; - this.PaymentPspReference = paymentPspReference; - this.PspReference = pspReference; - this.Status = status; - this.Reference = reference; - } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to reverse. - /// - /// The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment to reverse. - [DataMember(Name = "paymentPspReference", IsRequired = false, EmitDefaultValue = false)] - public string PaymentPspReference { get; set; } - - /// - /// Adyen's 16-character reference associated with the reversal request. - /// - /// Adyen's 16-character reference associated with the reversal request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Your reference for the reversal request. - /// - /// Your reference for the reversal request. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentReversalResponse {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentPspReference: ").Append(PaymentPspReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentReversalResponse); - } - - /// - /// Returns true if PaymentReversalResponse instances are equal - /// - /// Instance of PaymentReversalResponse to be compared - /// Boolean - public bool Equals(PaymentReversalResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentPspReference == input.PaymentPspReference || - (this.PaymentPspReference != null && - this.PaymentPspReference.Equals(input.PaymentPspReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentPspReference != null) - { - hashCode = (hashCode * 59) + this.PaymentPspReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaypalUpdateOrderRequest.cs b/Adyen/Model/Checkout/PaypalUpdateOrderRequest.cs deleted file mode 100644 index 3ef2ab0e2..000000000 --- a/Adyen/Model/Checkout/PaypalUpdateOrderRequest.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaypalUpdateOrderRequest - /// - [DataContract(Name = "PaypalUpdateOrderRequest")] - public partial class PaypalUpdateOrderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The list of new delivery methods and the cost of each.. - /// The `paymentData` from the client side. This value changes every time you make a `/paypal/updateOrder` request.. - /// The original `pspReference` from the `/payments` response.. - /// The original `sessionId` from the `/sessions` response.. - /// taxTotal. - public PaypalUpdateOrderRequest(Amount amount = default(Amount), List deliveryMethods = default(List), string paymentData = default(string), string pspReference = default(string), string sessionId = default(string), TaxTotal taxTotal = default(TaxTotal)) - { - this.Amount = amount; - this.DeliveryMethods = deliveryMethods; - this.PaymentData = paymentData; - this.PspReference = pspReference; - this.SessionId = sessionId; - this.TaxTotal = taxTotal; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The list of new delivery methods and the cost of each. - /// - /// The list of new delivery methods and the cost of each. - [DataMember(Name = "deliveryMethods", EmitDefaultValue = false)] - public List DeliveryMethods { get; set; } - - /// - /// The `paymentData` from the client side. This value changes every time you make a `/paypal/updateOrder` request. - /// - /// The `paymentData` from the client side. This value changes every time you make a `/paypal/updateOrder` request. - [DataMember(Name = "paymentData", EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// The original `pspReference` from the `/payments` response. - /// - /// The original `pspReference` from the `/payments` response. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The original `sessionId` from the `/sessions` response. - /// - /// The original `sessionId` from the `/sessions` response. - [DataMember(Name = "sessionId", EmitDefaultValue = false)] - public string SessionId { get; set; } - - /// - /// Gets or Sets TaxTotal - /// - [DataMember(Name = "taxTotal", EmitDefaultValue = false)] - public TaxTotal TaxTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaypalUpdateOrderRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" DeliveryMethods: ").Append(DeliveryMethods).Append("\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" SessionId: ").Append(SessionId).Append("\n"); - sb.Append(" TaxTotal: ").Append(TaxTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaypalUpdateOrderRequest); - } - - /// - /// Returns true if PaypalUpdateOrderRequest instances are equal - /// - /// Instance of PaypalUpdateOrderRequest to be compared - /// Boolean - public bool Equals(PaypalUpdateOrderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.DeliveryMethods == input.DeliveryMethods || - this.DeliveryMethods != null && - input.DeliveryMethods != null && - this.DeliveryMethods.SequenceEqual(input.DeliveryMethods) - ) && - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.SessionId == input.SessionId || - (this.SessionId != null && - this.SessionId.Equals(input.SessionId)) - ) && - ( - this.TaxTotal == input.TaxTotal || - (this.TaxTotal != null && - this.TaxTotal.Equals(input.TaxTotal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.DeliveryMethods != null) - { - hashCode = (hashCode * 59) + this.DeliveryMethods.GetHashCode(); - } - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.SessionId != null) - { - hashCode = (hashCode * 59) + this.SessionId.GetHashCode(); - } - if (this.TaxTotal != null) - { - hashCode = (hashCode * 59) + this.TaxTotal.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PaypalUpdateOrderResponse.cs b/Adyen/Model/Checkout/PaypalUpdateOrderResponse.cs deleted file mode 100644 index 40dfdec71..000000000 --- a/Adyen/Model/Checkout/PaypalUpdateOrderResponse.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PaypalUpdateOrderResponse - /// - [DataContract(Name = "PaypalUpdateOrderResponse")] - public partial class PaypalUpdateOrderResponse : IEquatable, IValidatableObject - { - /// - /// The status of the request. This indicates whether the order was successfully updated with PayPal. - /// - /// The status of the request. This indicates whether the order was successfully updated with PayPal. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 1, - - /// - /// Enum Success for value: success - /// - [EnumMember(Value = "success")] - Success = 2 - - } - - - /// - /// The status of the request. This indicates whether the order was successfully updated with PayPal. - /// - /// The status of the request. This indicates whether the order was successfully updated with PayPal. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaypalUpdateOrderResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The updated paymentData. (required). - /// The status of the request. This indicates whether the order was successfully updated with PayPal. (required). - public PaypalUpdateOrderResponse(string paymentData = default(string), StatusEnum status = default(StatusEnum)) - { - this.PaymentData = paymentData; - this.Status = status; - } - - /// - /// The updated paymentData. - /// - /// The updated paymentData. - [DataMember(Name = "paymentData", IsRequired = false, EmitDefaultValue = false)] - public string PaymentData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaypalUpdateOrderResponse {\n"); - sb.Append(" PaymentData: ").Append(PaymentData).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaypalUpdateOrderResponse); - } - - /// - /// Returns true if PaypalUpdateOrderResponse instances are equal - /// - /// Instance of PaypalUpdateOrderResponse to be compared - /// Boolean - public bool Equals(PaypalUpdateOrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.PaymentData == input.PaymentData || - (this.PaymentData != null && - this.PaymentData.Equals(input.PaymentData)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PaymentData != null) - { - hashCode = (hashCode * 59) + this.PaymentData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Phone.cs b/Adyen/Model/Checkout/Phone.cs deleted file mode 100644 index 64fcbc46e..000000000 --- a/Adyen/Model/Checkout/Phone.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Phone - /// - [DataContract(Name = "Phone")] - public partial class Phone : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Country code. Length: 1–3 characters.. - /// Subscriber number. Maximum length: 15 characters.. - public Phone(string cc = default(string), string subscriber = default(string)) - { - this.Cc = cc; - this.Subscriber = subscriber; - } - - /// - /// Country code. Length: 1–3 characters. - /// - /// Country code. Length: 1–3 characters. - [DataMember(Name = "cc", EmitDefaultValue = false)] - public string Cc { get; set; } - - /// - /// Subscriber number. Maximum length: 15 characters. - /// - /// Subscriber number. Maximum length: 15 characters. - [DataMember(Name = "subscriber", EmitDefaultValue = false)] - public string Subscriber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Phone {\n"); - sb.Append(" Cc: ").Append(Cc).Append("\n"); - sb.Append(" Subscriber: ").Append(Subscriber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Phone); - } - - /// - /// Returns true if Phone instances are equal - /// - /// Instance of Phone to be compared - /// Boolean - public bool Equals(Phone input) - { - if (input == null) - { - return false; - } - return - ( - this.Cc == input.Cc || - (this.Cc != null && - this.Cc.Equals(input.Cc)) - ) && - ( - this.Subscriber == input.Subscriber || - (this.Subscriber != null && - this.Subscriber.Equals(input.Subscriber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cc != null) - { - hashCode = (hashCode * 59) + this.Cc.GetHashCode(); - } - if (this.Subscriber != null) - { - hashCode = (hashCode * 59) + this.Subscriber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Cc (string) maxLength - if (this.Cc != null && this.Cc.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cc, length must be less than 3.", new [] { "Cc" }); - } - - // Cc (string) minLength - if (this.Cc != null && this.Cc.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cc, length must be greater than 1.", new [] { "Cc" }); - } - - // Subscriber (string) maxLength - if (this.Subscriber != null && this.Subscriber.Length > 15) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Subscriber, length must be less than 15.", new [] { "Subscriber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PixDetails.cs b/Adyen/Model/Checkout/PixDetails.cs deleted file mode 100644 index f72f7e641..000000000 --- a/Adyen/Model/Checkout/PixDetails.cs +++ /dev/null @@ -1,222 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PixDetails - /// - [DataContract(Name = "PixDetails")] - public partial class PixDetails : IEquatable, IValidatableObject - { - /// - /// The payment method type. - /// - /// The payment method type. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Pix for value: pix - /// - [EnumMember(Value = "pix")] - Pix = 1 - - } - - - /// - /// The payment method type. - /// - /// The payment method type. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// pixRecurring. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The payment method type.. - public PixDetails(string checkoutAttemptId = default(string), PixRecurring pixRecurring = default(PixRecurring), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.PixRecurring = pixRecurring; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Gets or Sets PixRecurring - /// - [DataMember(Name = "pixRecurring", EmitDefaultValue = false)] - public PixRecurring PixRecurring { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PixDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" PixRecurring: ").Append(PixRecurring).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PixDetails); - } - - /// - /// Returns true if PixDetails instances are equal - /// - /// Instance of PixDetails to be compared - /// Boolean - public bool Equals(PixDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.PixRecurring == input.PixRecurring || - (this.PixRecurring != null && - this.PixRecurring.Equals(input.PixRecurring)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.PixRecurring != null) - { - hashCode = (hashCode * 59) + this.PixRecurring.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PixRecurring.cs b/Adyen/Model/Checkout/PixRecurring.cs deleted file mode 100644 index fd084618e..000000000 --- a/Adyen/Model/Checkout/PixRecurring.cs +++ /dev/null @@ -1,325 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PixRecurring - /// - [DataContract(Name = "PixRecurring")] - public partial class PixRecurring : IEquatable, IValidatableObject - { - /// - /// The frequency at which the shopper will be charged. - /// - /// The frequency at which the shopper will be charged. - [JsonConverter(typeof(StringEnumConverter))] - public enum FrequencyEnum - { - /// - /// Enum Weekly for value: weekly - /// - [EnumMember(Value = "weekly")] - Weekly = 1, - - /// - /// Enum Monthly for value: monthly - /// - [EnumMember(Value = "monthly")] - Monthly = 2, - - /// - /// Enum Quarterly for value: quarterly - /// - [EnumMember(Value = "quarterly")] - Quarterly = 3, - - /// - /// Enum HalfYearly for value: half-yearly - /// - [EnumMember(Value = "half-yearly")] - HalfYearly = 4, - - /// - /// Enum Yearly for value: yearly - /// - [EnumMember(Value = "yearly")] - Yearly = 5 - - } - - - /// - /// The frequency at which the shopper will be charged. - /// - /// The frequency at which the shopper will be charged. - [DataMember(Name = "frequency", EmitDefaultValue = false)] - public FrequencyEnum? Frequency { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The date on which the shopper's payment method will be charged, in YYYY-MM-DD format.. - /// Flag used to define whether liquidation can happen only on business days. - /// End date of the billing plan, in YYYY-MM-DD format. The end date must align with the frequency and the start date of the billing plan. If left blank, the subscription will continue indefinitely unless it is cancelled by the shopper.. - /// The frequency at which the shopper will be charged.. - /// minAmount. - /// The pspReference for the failed recurring payment. Find this in AUTHORISATION webhook you received after the billing date.. - /// recurringAmount. - /// The text that that will be shown on the shopper's bank statement for the recurring payments. We recommend to add a descriptive text about the subscription to let your shoppers recognize your recurring payments. Maximum length: 35 characters.. - /// When set to true, you can retry for failed recurring payments. The default value is true.. - /// Start date of the billing plan, in YYYY-MM-DD format. The default value is the transaction date.. - public PixRecurring(string billingDate = default(string), bool? businessDayOnly = default(bool?), string endsAt = default(string), FrequencyEnum? frequency = default(FrequencyEnum?), Amount minAmount = default(Amount), string originalPspReference = default(string), Amount recurringAmount = default(Amount), string recurringStatement = default(string), bool? retryPolicy = default(bool?), string startsAt = default(string)) - { - this.BillingDate = billingDate; - this.BusinessDayOnly = businessDayOnly; - this.EndsAt = endsAt; - this.Frequency = frequency; - this.MinAmount = minAmount; - this.OriginalPspReference = originalPspReference; - this.RecurringAmount = recurringAmount; - this.RecurringStatement = recurringStatement; - this.RetryPolicy = retryPolicy; - this.StartsAt = startsAt; - } - - /// - /// The date on which the shopper's payment method will be charged, in YYYY-MM-DD format. - /// - /// The date on which the shopper's payment method will be charged, in YYYY-MM-DD format. - [DataMember(Name = "billingDate", EmitDefaultValue = false)] - public string BillingDate { get; set; } - - /// - /// Flag used to define whether liquidation can happen only on business days - /// - /// Flag used to define whether liquidation can happen only on business days - [DataMember(Name = "businessDayOnly", EmitDefaultValue = false)] - public bool? BusinessDayOnly { get; set; } - - /// - /// End date of the billing plan, in YYYY-MM-DD format. The end date must align with the frequency and the start date of the billing plan. If left blank, the subscription will continue indefinitely unless it is cancelled by the shopper. - /// - /// End date of the billing plan, in YYYY-MM-DD format. The end date must align with the frequency and the start date of the billing plan. If left blank, the subscription will continue indefinitely unless it is cancelled by the shopper. - [DataMember(Name = "endsAt", EmitDefaultValue = false)] - public string EndsAt { get; set; } - - /// - /// Gets or Sets MinAmount - /// - [DataMember(Name = "minAmount", EmitDefaultValue = false)] - public Amount MinAmount { get; set; } - - /// - /// The pspReference for the failed recurring payment. Find this in AUTHORISATION webhook you received after the billing date. - /// - /// The pspReference for the failed recurring payment. Find this in AUTHORISATION webhook you received after the billing date. - [DataMember(Name = "originalPspReference", EmitDefaultValue = false)] - public string OriginalPspReference { get; set; } - - /// - /// Gets or Sets RecurringAmount - /// - [DataMember(Name = "recurringAmount", EmitDefaultValue = false)] - public Amount RecurringAmount { get; set; } - - /// - /// The text that that will be shown on the shopper's bank statement for the recurring payments. We recommend to add a descriptive text about the subscription to let your shoppers recognize your recurring payments. Maximum length: 35 characters. - /// - /// The text that that will be shown on the shopper's bank statement for the recurring payments. We recommend to add a descriptive text about the subscription to let your shoppers recognize your recurring payments. Maximum length: 35 characters. - [DataMember(Name = "recurringStatement", EmitDefaultValue = false)] - public string RecurringStatement { get; set; } - - /// - /// When set to true, you can retry for failed recurring payments. The default value is true. - /// - /// When set to true, you can retry for failed recurring payments. The default value is true. - [DataMember(Name = "retryPolicy", EmitDefaultValue = false)] - public bool? RetryPolicy { get; set; } - - /// - /// Start date of the billing plan, in YYYY-MM-DD format. The default value is the transaction date. - /// - /// Start date of the billing plan, in YYYY-MM-DD format. The default value is the transaction date. - [DataMember(Name = "startsAt", EmitDefaultValue = false)] - public string StartsAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PixRecurring {\n"); - sb.Append(" BillingDate: ").Append(BillingDate).Append("\n"); - sb.Append(" BusinessDayOnly: ").Append(BusinessDayOnly).Append("\n"); - sb.Append(" EndsAt: ").Append(EndsAt).Append("\n"); - sb.Append(" Frequency: ").Append(Frequency).Append("\n"); - sb.Append(" MinAmount: ").Append(MinAmount).Append("\n"); - sb.Append(" OriginalPspReference: ").Append(OriginalPspReference).Append("\n"); - sb.Append(" RecurringAmount: ").Append(RecurringAmount).Append("\n"); - sb.Append(" RecurringStatement: ").Append(RecurringStatement).Append("\n"); - sb.Append(" RetryPolicy: ").Append(RetryPolicy).Append("\n"); - sb.Append(" StartsAt: ").Append(StartsAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PixRecurring); - } - - /// - /// Returns true if PixRecurring instances are equal - /// - /// Instance of PixRecurring to be compared - /// Boolean - public bool Equals(PixRecurring input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingDate == input.BillingDate || - (this.BillingDate != null && - this.BillingDate.Equals(input.BillingDate)) - ) && - ( - this.BusinessDayOnly == input.BusinessDayOnly || - this.BusinessDayOnly.Equals(input.BusinessDayOnly) - ) && - ( - this.EndsAt == input.EndsAt || - (this.EndsAt != null && - this.EndsAt.Equals(input.EndsAt)) - ) && - ( - this.Frequency == input.Frequency || - this.Frequency.Equals(input.Frequency) - ) && - ( - this.MinAmount == input.MinAmount || - (this.MinAmount != null && - this.MinAmount.Equals(input.MinAmount)) - ) && - ( - this.OriginalPspReference == input.OriginalPspReference || - (this.OriginalPspReference != null && - this.OriginalPspReference.Equals(input.OriginalPspReference)) - ) && - ( - this.RecurringAmount == input.RecurringAmount || - (this.RecurringAmount != null && - this.RecurringAmount.Equals(input.RecurringAmount)) - ) && - ( - this.RecurringStatement == input.RecurringStatement || - (this.RecurringStatement != null && - this.RecurringStatement.Equals(input.RecurringStatement)) - ) && - ( - this.RetryPolicy == input.RetryPolicy || - this.RetryPolicy.Equals(input.RetryPolicy) - ) && - ( - this.StartsAt == input.StartsAt || - (this.StartsAt != null && - this.StartsAt.Equals(input.StartsAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingDate != null) - { - hashCode = (hashCode * 59) + this.BillingDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.BusinessDayOnly.GetHashCode(); - if (this.EndsAt != null) - { - hashCode = (hashCode * 59) + this.EndsAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Frequency.GetHashCode(); - if (this.MinAmount != null) - { - hashCode = (hashCode * 59) + this.MinAmount.GetHashCode(); - } - if (this.OriginalPspReference != null) - { - hashCode = (hashCode * 59) + this.OriginalPspReference.GetHashCode(); - } - if (this.RecurringAmount != null) - { - hashCode = (hashCode * 59) + this.RecurringAmount.GetHashCode(); - } - if (this.RecurringStatement != null) - { - hashCode = (hashCode * 59) + this.RecurringStatement.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RetryPolicy.GetHashCode(); - if (this.StartsAt != null) - { - hashCode = (hashCode * 59) + this.StartsAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PlatformChargebackLogic.cs b/Adyen/Model/Checkout/PlatformChargebackLogic.cs deleted file mode 100644 index c5ba7356d..000000000 --- a/Adyen/Model/Checkout/PlatformChargebackLogic.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PlatformChargebackLogic - /// - [DataContract(Name = "PlatformChargebackLogic")] - public partial class PlatformChargebackLogic : IEquatable, IValidatableObject - { - /// - /// The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - /// - /// The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - [JsonConverter(typeof(StringEnumConverter))] - public enum BehaviorEnum - { - /// - /// Enum DeductAccordingToSplitRatio for value: deductAccordingToSplitRatio - /// - [EnumMember(Value = "deductAccordingToSplitRatio")] - DeductAccordingToSplitRatio = 1, - - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 2, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 3 - - } - - - /// - /// The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - /// - /// The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - [DataMember(Name = "behavior", EmitDefaultValue = false)] - public BehaviorEnum? Behavior { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The method of handling the chargeback. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**.. - /// The unique identifier of the balance account to which the chargeback fees are booked. By default, the chargeback fees are booked to your liable balance account.. - /// The unique identifier of the balance account against which the disputed amount is booked. Required if `behavior` is **deductFromOneBalanceAccount**.. - public PlatformChargebackLogic(BehaviorEnum? behavior = default(BehaviorEnum?), string costAllocationAccount = default(string), string targetAccount = default(string)) - { - this.Behavior = behavior; - this.CostAllocationAccount = costAllocationAccount; - this.TargetAccount = targetAccount; - } - - /// - /// The unique identifier of the balance account to which the chargeback fees are booked. By default, the chargeback fees are booked to your liable balance account. - /// - /// The unique identifier of the balance account to which the chargeback fees are booked. By default, the chargeback fees are booked to your liable balance account. - [DataMember(Name = "costAllocationAccount", EmitDefaultValue = false)] - public string CostAllocationAccount { get; set; } - - /// - /// The unique identifier of the balance account against which the disputed amount is booked. Required if `behavior` is **deductFromOneBalanceAccount**. - /// - /// The unique identifier of the balance account against which the disputed amount is booked. Required if `behavior` is **deductFromOneBalanceAccount**. - [DataMember(Name = "targetAccount", EmitDefaultValue = false)] - public string TargetAccount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PlatformChargebackLogic {\n"); - sb.Append(" Behavior: ").Append(Behavior).Append("\n"); - sb.Append(" CostAllocationAccount: ").Append(CostAllocationAccount).Append("\n"); - sb.Append(" TargetAccount: ").Append(TargetAccount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlatformChargebackLogic); - } - - /// - /// Returns true if PlatformChargebackLogic instances are equal - /// - /// Instance of PlatformChargebackLogic to be compared - /// Boolean - public bool Equals(PlatformChargebackLogic input) - { - if (input == null) - { - return false; - } - return - ( - this.Behavior == input.Behavior || - this.Behavior.Equals(input.Behavior) - ) && - ( - this.CostAllocationAccount == input.CostAllocationAccount || - (this.CostAllocationAccount != null && - this.CostAllocationAccount.Equals(input.CostAllocationAccount)) - ) && - ( - this.TargetAccount == input.TargetAccount || - (this.TargetAccount != null && - this.TargetAccount.Equals(input.TargetAccount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Behavior.GetHashCode(); - if (this.CostAllocationAccount != null) - { - hashCode = (hashCode * 59) + this.CostAllocationAccount.GetHashCode(); - } - if (this.TargetAccount != null) - { - hashCode = (hashCode * 59) + this.TargetAccount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/PseDetails.cs b/Adyen/Model/Checkout/PseDetails.cs deleted file mode 100644 index 1d09e8d45..000000000 --- a/Adyen/Model/Checkout/PseDetails.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// PseDetails - /// - [DataContract(Name = "PseDetails")] - public partial class PseDetails : IEquatable, IValidatableObject - { - /// - /// The payment method type. - /// - /// The payment method type. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PsePayulatam for value: pse_payulatam - /// - [EnumMember(Value = "pse_payulatam")] - PsePayulatam = 1 - - } - - - /// - /// The payment method type. - /// - /// The payment method type. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PseDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The shopper's bank. (required). - /// The checkout attempt identifier.. - /// The client type. (required). - /// The identification code. (required). - /// The identification type. (required). - /// The payment method type.. - public PseDetails(string bank = default(string), string checkoutAttemptId = default(string), string clientType = default(string), string identification = default(string), string identificationType = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Bank = bank; - this.ClientType = clientType; - this.Identification = identification; - this.IdentificationType = identificationType; - this.CheckoutAttemptId = checkoutAttemptId; - this.Type = type; - } - - /// - /// The shopper's bank. - /// - /// The shopper's bank. - [DataMember(Name = "bank", IsRequired = false, EmitDefaultValue = false)] - public string Bank { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The client type. - /// - /// The client type. - [DataMember(Name = "clientType", IsRequired = false, EmitDefaultValue = false)] - public string ClientType { get; set; } - - /// - /// The identification code. - /// - /// The identification code. - [DataMember(Name = "identification", IsRequired = false, EmitDefaultValue = false)] - public string Identification { get; set; } - - /// - /// The identification type. - /// - /// The identification type. - [DataMember(Name = "identificationType", IsRequired = false, EmitDefaultValue = false)] - public string IdentificationType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PseDetails {\n"); - sb.Append(" Bank: ").Append(Bank).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" ClientType: ").Append(ClientType).Append("\n"); - sb.Append(" Identification: ").Append(Identification).Append("\n"); - sb.Append(" IdentificationType: ").Append(IdentificationType).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PseDetails); - } - - /// - /// Returns true if PseDetails instances are equal - /// - /// Instance of PseDetails to be compared - /// Boolean - public bool Equals(PseDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.ClientType == input.ClientType || - (this.ClientType != null && - this.ClientType.Equals(input.ClientType)) - ) && - ( - this.Identification == input.Identification || - (this.Identification != null && - this.Identification.Equals(input.Identification)) - ) && - ( - this.IdentificationType == input.IdentificationType || - (this.IdentificationType != null && - this.IdentificationType.Equals(input.IdentificationType)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.ClientType != null) - { - hashCode = (hashCode * 59) + this.ClientType.GetHashCode(); - } - if (this.Identification != null) - { - hashCode = (hashCode * 59) + this.Identification.GetHashCode(); - } - if (this.IdentificationType != null) - { - hashCode = (hashCode * 59) + this.IdentificationType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/RakutenPayDetails.cs b/Adyen/Model/Checkout/RakutenPayDetails.cs deleted file mode 100644 index ee4929ddb..000000000 --- a/Adyen/Model/Checkout/RakutenPayDetails.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// RakutenPayDetails - /// - [DataContract(Name = "RakutenPayDetails")] - public partial class RakutenPayDetails : IEquatable, IValidatableObject - { - /// - /// **rakutenpay** - /// - /// **rakutenpay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Rakutenpay for value: rakutenpay - /// - [EnumMember(Value = "rakutenpay")] - Rakutenpay = 1 - - } - - - /// - /// **rakutenpay** - /// - /// **rakutenpay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **rakutenpay** (default to TypeEnum.Rakutenpay). - public RakutenPayDetails(string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Rakutenpay) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RakutenPayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RakutenPayDetails); - } - - /// - /// Returns true if RakutenPayDetails instances are equal - /// - /// Instance of RakutenPayDetails to be compared - /// Boolean - public bool Equals(RakutenPayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/RatepayDetails.cs b/Adyen/Model/Checkout/RatepayDetails.cs deleted file mode 100644 index a91182132..000000000 --- a/Adyen/Model/Checkout/RatepayDetails.cs +++ /dev/null @@ -1,272 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// RatepayDetails - /// - [DataContract(Name = "RatepayDetails")] - public partial class RatepayDetails : IEquatable, IValidatableObject - { - /// - /// **ratepay** - /// - /// **ratepay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Ratepay for value: ratepay - /// - [EnumMember(Value = "ratepay")] - Ratepay = 1, - - /// - /// Enum RatepayDirectdebit for value: ratepay_directdebit - /// - [EnumMember(Value = "ratepay_directdebit")] - RatepayDirectdebit = 2 - - } - - - /// - /// **ratepay** - /// - /// **ratepay** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RatepayDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The address where to send the invoice.. - /// The checkout attempt identifier.. - /// The address where the goods should be delivered.. - /// Shopper name, date of birth, phone number, and email address.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **ratepay** (required) (default to TypeEnum.Ratepay). - public RatepayDetails(string billingAddress = default(string), string checkoutAttemptId = default(string), string deliveryAddress = default(string), string personalDetails = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = TypeEnum.Ratepay) - { - this.Type = type; - this.BillingAddress = billingAddress; - this.CheckoutAttemptId = checkoutAttemptId; - this.DeliveryAddress = deliveryAddress; - this.PersonalDetails = personalDetails; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// The address where to send the invoice. - /// - /// The address where to send the invoice. - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public string BillingAddress { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The address where the goods should be delivered. - /// - /// The address where the goods should be delivered. - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public string DeliveryAddress { get; set; } - - /// - /// Shopper name, date of birth, phone number, and email address. - /// - /// Shopper name, date of birth, phone number, and email address. - [DataMember(Name = "personalDetails", EmitDefaultValue = false)] - public string PersonalDetails { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RatepayDetails {\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" PersonalDetails: ").Append(PersonalDetails).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RatepayDetails); - } - - /// - /// Returns true if RatepayDetails instances are equal - /// - /// Instance of RatepayDetails to be compared - /// Boolean - public bool Equals(RatepayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.PersonalDetails == input.PersonalDetails || - (this.PersonalDetails != null && - this.PersonalDetails.Equals(input.PersonalDetails)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.PersonalDetails != null) - { - hashCode = (hashCode * 59) + this.PersonalDetails.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Recurring.cs b/Adyen/Model/Checkout/Recurring.cs deleted file mode 100644 index 27e435f8c..000000000 --- a/Adyen/Model/Checkout/Recurring.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Recurring - /// - [DataContract(Name = "Recurring")] - public partial class Recurring : IEquatable, IValidatableObject - { - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - [JsonConverter(typeof(StringEnumConverter))] - public enum ContractEnum - { - /// - /// Enum ONECLICK for value: ONECLICK - /// - [EnumMember(Value = "ONECLICK")] - ONECLICK = 1, - - /// - /// Enum RECURRING for value: RECURRING - /// - [EnumMember(Value = "RECURRING")] - RECURRING = 2, - - /// - /// Enum PAYOUT for value: PAYOUT - /// - [EnumMember(Value = "PAYOUT")] - PAYOUT = 3 - - } - - - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - [DataMember(Name = "contract", EmitDefaultValue = false)] - public ContractEnum? Contract { get; set; } - /// - /// The name of the token service. - /// - /// The name of the token service. - [JsonConverter(typeof(StringEnumConverter))] - public enum TokenServiceEnum - { - /// - /// Enum VISATOKENSERVICE for value: VISATOKENSERVICE - /// - [EnumMember(Value = "VISATOKENSERVICE")] - VISATOKENSERVICE = 1, - - /// - /// Enum MCTOKENSERVICE for value: MCTOKENSERVICE - /// - [EnumMember(Value = "MCTOKENSERVICE")] - MCTOKENSERVICE = 2, - - /// - /// Enum AMEXTOKENSERVICE for value: AMEXTOKENSERVICE - /// - [EnumMember(Value = "AMEXTOKENSERVICE")] - AMEXTOKENSERVICE = 3, - - /// - /// Enum TOKENSHARING for value: TOKEN_SHARING - /// - [EnumMember(Value = "TOKEN_SHARING")] - TOKENSHARING = 4 - - } - - - /// - /// The name of the token service. - /// - /// The name of the token service. - [DataMember(Name = "tokenService", EmitDefaultValue = false)] - public TokenServiceEnum? TokenService { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts).. - /// A descriptive name for this detail.. - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.. - /// Minimum number of days between authorisations. Only for 3D Secure 2.. - /// The name of the token service.. - public Recurring(ContractEnum? contract = default(ContractEnum?), string recurringDetailName = default(string), DateTime recurringExpiry = default(DateTime), string recurringFrequency = default(string), TokenServiceEnum? tokenService = default(TokenServiceEnum?)) - { - this.Contract = contract; - this.RecurringDetailName = recurringDetailName; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.TokenService = tokenService; - } - - /// - /// A descriptive name for this detail. - /// - /// A descriptive name for this detail. - [DataMember(Name = "recurringDetailName", EmitDefaultValue = false)] - public string RecurringDetailName { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public DateTime RecurringExpiry { get; set; } - - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Recurring {\n"); - sb.Append(" Contract: ").Append(Contract).Append("\n"); - sb.Append(" RecurringDetailName: ").Append(RecurringDetailName).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" TokenService: ").Append(TokenService).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Recurring); - } - - /// - /// Returns true if Recurring instances are equal - /// - /// Instance of Recurring to be compared - /// Boolean - public bool Equals(Recurring input) - { - if (input == null) - { - return false; - } - return - ( - this.Contract == input.Contract || - this.Contract.Equals(input.Contract) - ) && - ( - this.RecurringDetailName == input.RecurringDetailName || - (this.RecurringDetailName != null && - this.RecurringDetailName.Equals(input.RecurringDetailName)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.TokenService == input.TokenService || - this.TokenService.Equals(input.TokenService) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Contract.GetHashCode(); - if (this.RecurringDetailName != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailName.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TokenService.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.cs b/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.cs deleted file mode 100644 index 2daefcefe..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalData3DSecure.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalData3DSecure - /// - [DataContract(Name = "ResponseAdditionalData3DSecure")] - public partial class ResponseAdditionalData3DSecure : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. . - /// The Cardholder Authentication Verification Value (CAVV) for the 3D Secure authentication session, as a Base64-encoded 20-byte array.. - /// The CAVV algorithm used.. - /// Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** . - /// Indicates whether a card is enrolled for 3D Secure 2.. - public ResponseAdditionalData3DSecure(string cardHolderInfo = default(string), string cavv = default(string), string cavvAlgorithm = default(string), string scaExemptionRequested = default(string), bool? threeds2CardEnrolled = default(bool?)) - { - this.CardHolderInfo = cardHolderInfo; - this.Cavv = cavv; - this.CavvAlgorithm = cavvAlgorithm; - this.ScaExemptionRequested = scaExemptionRequested; - this.Threeds2CardEnrolled = threeds2CardEnrolled; - } - - /// - /// Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. - /// - /// Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. - [DataMember(Name = "cardHolderInfo", EmitDefaultValue = false)] - public string CardHolderInfo { get; set; } - - /// - /// The Cardholder Authentication Verification Value (CAVV) for the 3D Secure authentication session, as a Base64-encoded 20-byte array. - /// - /// The Cardholder Authentication Verification Value (CAVV) for the 3D Secure authentication session, as a Base64-encoded 20-byte array. - [DataMember(Name = "cavv", EmitDefaultValue = false)] - public string Cavv { get; set; } - - /// - /// The CAVV algorithm used. - /// - /// The CAVV algorithm used. - [DataMember(Name = "cavvAlgorithm", EmitDefaultValue = false)] - public string CavvAlgorithm { get; set; } - - /// - /// Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** - /// - /// Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** - [DataMember(Name = "scaExemptionRequested", EmitDefaultValue = false)] - public string ScaExemptionRequested { get; set; } - - /// - /// Indicates whether a card is enrolled for 3D Secure 2. - /// - /// Indicates whether a card is enrolled for 3D Secure 2. - [DataMember(Name = "threeds2.cardEnrolled", EmitDefaultValue = false)] - public bool? Threeds2CardEnrolled { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalData3DSecure {\n"); - sb.Append(" CardHolderInfo: ").Append(CardHolderInfo).Append("\n"); - sb.Append(" Cavv: ").Append(Cavv).Append("\n"); - sb.Append(" CavvAlgorithm: ").Append(CavvAlgorithm).Append("\n"); - sb.Append(" ScaExemptionRequested: ").Append(ScaExemptionRequested).Append("\n"); - sb.Append(" Threeds2CardEnrolled: ").Append(Threeds2CardEnrolled).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalData3DSecure); - } - - /// - /// Returns true if ResponseAdditionalData3DSecure instances are equal - /// - /// Instance of ResponseAdditionalData3DSecure to be compared - /// Boolean - public bool Equals(ResponseAdditionalData3DSecure input) - { - if (input == null) - { - return false; - } - return - ( - this.CardHolderInfo == input.CardHolderInfo || - (this.CardHolderInfo != null && - this.CardHolderInfo.Equals(input.CardHolderInfo)) - ) && - ( - this.Cavv == input.Cavv || - (this.Cavv != null && - this.Cavv.Equals(input.Cavv)) - ) && - ( - this.CavvAlgorithm == input.CavvAlgorithm || - (this.CavvAlgorithm != null && - this.CavvAlgorithm.Equals(input.CavvAlgorithm)) - ) && - ( - this.ScaExemptionRequested == input.ScaExemptionRequested || - (this.ScaExemptionRequested != null && - this.ScaExemptionRequested.Equals(input.ScaExemptionRequested)) - ) && - ( - this.Threeds2CardEnrolled == input.Threeds2CardEnrolled || - this.Threeds2CardEnrolled.Equals(input.Threeds2CardEnrolled) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardHolderInfo != null) - { - hashCode = (hashCode * 59) + this.CardHolderInfo.GetHashCode(); - } - if (this.Cavv != null) - { - hashCode = (hashCode * 59) + this.Cavv.GetHashCode(); - } - if (this.CavvAlgorithm != null) - { - hashCode = (hashCode * 59) + this.CavvAlgorithm.GetHashCode(); - } - if (this.ScaExemptionRequested != null) - { - hashCode = (hashCode * 59) + this.ScaExemptionRequested.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Threeds2CardEnrolled.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.cs b/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.cs deleted file mode 100644 index 360cc1be5..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalDataBillingAddress.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalDataBillingAddress - /// - [DataContract(Name = "ResponseAdditionalDataBillingAddress")] - public partial class ResponseAdditionalDataBillingAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The billing address city passed in the payment request.. - /// The billing address country passed in the payment request. Example: NL. - /// The billing address house number or name passed in the payment request.. - /// The billing address postal code passed in the payment request. Example: 1011 DJ. - /// The billing address state or province passed in the payment request. Example: NH. - /// The billing address street passed in the payment request.. - public ResponseAdditionalDataBillingAddress(string billingAddressCity = default(string), string billingAddressCountry = default(string), string billingAddressHouseNumberOrName = default(string), string billingAddressPostalCode = default(string), string billingAddressStateOrProvince = default(string), string billingAddressStreet = default(string)) - { - this.BillingAddressCity = billingAddressCity; - this.BillingAddressCountry = billingAddressCountry; - this.BillingAddressHouseNumberOrName = billingAddressHouseNumberOrName; - this.BillingAddressPostalCode = billingAddressPostalCode; - this.BillingAddressStateOrProvince = billingAddressStateOrProvince; - this.BillingAddressStreet = billingAddressStreet; - } - - /// - /// The billing address city passed in the payment request. - /// - /// The billing address city passed in the payment request. - [DataMember(Name = "billingAddress.city", EmitDefaultValue = false)] - public string BillingAddressCity { get; set; } - - /// - /// The billing address country passed in the payment request. Example: NL - /// - /// The billing address country passed in the payment request. Example: NL - [DataMember(Name = "billingAddress.country", EmitDefaultValue = false)] - public string BillingAddressCountry { get; set; } - - /// - /// The billing address house number or name passed in the payment request. - /// - /// The billing address house number or name passed in the payment request. - [DataMember(Name = "billingAddress.houseNumberOrName", EmitDefaultValue = false)] - public string BillingAddressHouseNumberOrName { get; set; } - - /// - /// The billing address postal code passed in the payment request. Example: 1011 DJ - /// - /// The billing address postal code passed in the payment request. Example: 1011 DJ - [DataMember(Name = "billingAddress.postalCode", EmitDefaultValue = false)] - public string BillingAddressPostalCode { get; set; } - - /// - /// The billing address state or province passed in the payment request. Example: NH - /// - /// The billing address state or province passed in the payment request. Example: NH - [DataMember(Name = "billingAddress.stateOrProvince", EmitDefaultValue = false)] - public string BillingAddressStateOrProvince { get; set; } - - /// - /// The billing address street passed in the payment request. - /// - /// The billing address street passed in the payment request. - [DataMember(Name = "billingAddress.street", EmitDefaultValue = false)] - public string BillingAddressStreet { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataBillingAddress {\n"); - sb.Append(" BillingAddressCity: ").Append(BillingAddressCity).Append("\n"); - sb.Append(" BillingAddressCountry: ").Append(BillingAddressCountry).Append("\n"); - sb.Append(" BillingAddressHouseNumberOrName: ").Append(BillingAddressHouseNumberOrName).Append("\n"); - sb.Append(" BillingAddressPostalCode: ").Append(BillingAddressPostalCode).Append("\n"); - sb.Append(" BillingAddressStateOrProvince: ").Append(BillingAddressStateOrProvince).Append("\n"); - sb.Append(" BillingAddressStreet: ").Append(BillingAddressStreet).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataBillingAddress); - } - - /// - /// Returns true if ResponseAdditionalDataBillingAddress instances are equal - /// - /// Instance of ResponseAdditionalDataBillingAddress to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataBillingAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingAddressCity == input.BillingAddressCity || - (this.BillingAddressCity != null && - this.BillingAddressCity.Equals(input.BillingAddressCity)) - ) && - ( - this.BillingAddressCountry == input.BillingAddressCountry || - (this.BillingAddressCountry != null && - this.BillingAddressCountry.Equals(input.BillingAddressCountry)) - ) && - ( - this.BillingAddressHouseNumberOrName == input.BillingAddressHouseNumberOrName || - (this.BillingAddressHouseNumberOrName != null && - this.BillingAddressHouseNumberOrName.Equals(input.BillingAddressHouseNumberOrName)) - ) && - ( - this.BillingAddressPostalCode == input.BillingAddressPostalCode || - (this.BillingAddressPostalCode != null && - this.BillingAddressPostalCode.Equals(input.BillingAddressPostalCode)) - ) && - ( - this.BillingAddressStateOrProvince == input.BillingAddressStateOrProvince || - (this.BillingAddressStateOrProvince != null && - this.BillingAddressStateOrProvince.Equals(input.BillingAddressStateOrProvince)) - ) && - ( - this.BillingAddressStreet == input.BillingAddressStreet || - (this.BillingAddressStreet != null && - this.BillingAddressStreet.Equals(input.BillingAddressStreet)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingAddressCity != null) - { - hashCode = (hashCode * 59) + this.BillingAddressCity.GetHashCode(); - } - if (this.BillingAddressCountry != null) - { - hashCode = (hashCode * 59) + this.BillingAddressCountry.GetHashCode(); - } - if (this.BillingAddressHouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.BillingAddressHouseNumberOrName.GetHashCode(); - } - if (this.BillingAddressPostalCode != null) - { - hashCode = (hashCode * 59) + this.BillingAddressPostalCode.GetHashCode(); - } - if (this.BillingAddressStateOrProvince != null) - { - hashCode = (hashCode * 59) + this.BillingAddressStateOrProvince.GetHashCode(); - } - if (this.BillingAddressStreet != null) - { - hashCode = (hashCode * 59) + this.BillingAddressStreet.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalDataCard.cs b/Adyen/Model/Checkout/ResponseAdditionalDataCard.cs deleted file mode 100644 index 98107c5d3..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalDataCard.cs +++ /dev/null @@ -1,352 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalDataCard - /// - [DataContract(Name = "ResponseAdditionalDataCard")] - public partial class ResponseAdditionalDataCard : IEquatable, IValidatableObject - { - /// - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit - /// - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit - [JsonConverter(typeof(StringEnumConverter))] - public enum CardProductIdEnum - { - /// - /// Enum A for value: A - /// - [EnumMember(Value = "A")] - A = 1, - - /// - /// Enum B for value: B - /// - [EnumMember(Value = "B")] - B = 2, - - /// - /// Enum C for value: C - /// - [EnumMember(Value = "C")] - C = 3, - - /// - /// Enum D for value: D - /// - [EnumMember(Value = "D")] - D = 4, - - /// - /// Enum F for value: F - /// - [EnumMember(Value = "F")] - F = 5, - - /// - /// Enum MCC for value: MCC - /// - [EnumMember(Value = "MCC")] - MCC = 6, - - /// - /// Enum MCE for value: MCE - /// - [EnumMember(Value = "MCE")] - MCE = 7, - - /// - /// Enum MCF for value: MCF - /// - [EnumMember(Value = "MCF")] - MCF = 8, - - /// - /// Enum MCG for value: MCG - /// - [EnumMember(Value = "MCG")] - MCG = 9, - - /// - /// Enum MCH for value: MCH - /// - [EnumMember(Value = "MCH")] - MCH = 10, - - /// - /// Enum MCI for value: MCI - /// - [EnumMember(Value = "MCI")] - MCI = 11 - - } - - - /// - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit - /// - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit - [DataMember(Name = "cardProductId", EmitDefaultValue = false)] - public CardProductIdEnum? CardProductId { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The first six digits of the card number. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with a six-digit BIN. Example: 521234. - /// The cardholder name passed in the payment request.. - /// The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available.. - /// The country where the card was issued. Example: US. - /// The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD. - /// The card payment method used for the transaction. Example: amex. - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit . - /// The last four digits of a card number. > Returned only in case of a card payment.. - /// The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423. - public ResponseAdditionalDataCard(string cardBin = default(string), string cardHolderName = default(string), string cardIssuingBank = default(string), string cardIssuingCountry = default(string), string cardIssuingCurrency = default(string), string cardPaymentMethod = default(string), CardProductIdEnum? cardProductId = default(CardProductIdEnum?), string cardSummary = default(string), string issuerBin = default(string)) - { - this.CardBin = cardBin; - this.CardHolderName = cardHolderName; - this.CardIssuingBank = cardIssuingBank; - this.CardIssuingCountry = cardIssuingCountry; - this.CardIssuingCurrency = cardIssuingCurrency; - this.CardPaymentMethod = cardPaymentMethod; - this.CardProductId = cardProductId; - this.CardSummary = cardSummary; - this.IssuerBin = issuerBin; - } - - /// - /// The first six digits of the card number. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with a six-digit BIN. Example: 521234 - /// - /// The first six digits of the card number. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with a six-digit BIN. Example: 521234 - [DataMember(Name = "cardBin", EmitDefaultValue = false)] - public string CardBin { get; set; } - - /// - /// The cardholder name passed in the payment request. - /// - /// The cardholder name passed in the payment request. - [DataMember(Name = "cardHolderName", EmitDefaultValue = false)] - public string CardHolderName { get; set; } - - /// - /// The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available. - /// - /// The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available. - [DataMember(Name = "cardIssuingBank", EmitDefaultValue = false)] - public string CardIssuingBank { get; set; } - - /// - /// The country where the card was issued. Example: US - /// - /// The country where the card was issued. Example: US - [DataMember(Name = "cardIssuingCountry", EmitDefaultValue = false)] - public string CardIssuingCountry { get; set; } - - /// - /// The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD - /// - /// The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD - [DataMember(Name = "cardIssuingCurrency", EmitDefaultValue = false)] - public string CardIssuingCurrency { get; set; } - - /// - /// The card payment method used for the transaction. Example: amex - /// - /// The card payment method used for the transaction. Example: amex - [DataMember(Name = "cardPaymentMethod", EmitDefaultValue = false)] - public string CardPaymentMethod { get; set; } - - /// - /// The last four digits of a card number. > Returned only in case of a card payment. - /// - /// The last four digits of a card number. > Returned only in case of a card payment. - [DataMember(Name = "cardSummary", EmitDefaultValue = false)] - public string CardSummary { get; set; } - - /// - /// The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423 - /// - /// The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423 - [DataMember(Name = "issuerBin", EmitDefaultValue = false)] - public string IssuerBin { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataCard {\n"); - sb.Append(" CardBin: ").Append(CardBin).Append("\n"); - sb.Append(" CardHolderName: ").Append(CardHolderName).Append("\n"); - sb.Append(" CardIssuingBank: ").Append(CardIssuingBank).Append("\n"); - sb.Append(" CardIssuingCountry: ").Append(CardIssuingCountry).Append("\n"); - sb.Append(" CardIssuingCurrency: ").Append(CardIssuingCurrency).Append("\n"); - sb.Append(" CardPaymentMethod: ").Append(CardPaymentMethod).Append("\n"); - sb.Append(" CardProductId: ").Append(CardProductId).Append("\n"); - sb.Append(" CardSummary: ").Append(CardSummary).Append("\n"); - sb.Append(" IssuerBin: ").Append(IssuerBin).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataCard); - } - - /// - /// Returns true if ResponseAdditionalDataCard instances are equal - /// - /// Instance of ResponseAdditionalDataCard to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataCard input) - { - if (input == null) - { - return false; - } - return - ( - this.CardBin == input.CardBin || - (this.CardBin != null && - this.CardBin.Equals(input.CardBin)) - ) && - ( - this.CardHolderName == input.CardHolderName || - (this.CardHolderName != null && - this.CardHolderName.Equals(input.CardHolderName)) - ) && - ( - this.CardIssuingBank == input.CardIssuingBank || - (this.CardIssuingBank != null && - this.CardIssuingBank.Equals(input.CardIssuingBank)) - ) && - ( - this.CardIssuingCountry == input.CardIssuingCountry || - (this.CardIssuingCountry != null && - this.CardIssuingCountry.Equals(input.CardIssuingCountry)) - ) && - ( - this.CardIssuingCurrency == input.CardIssuingCurrency || - (this.CardIssuingCurrency != null && - this.CardIssuingCurrency.Equals(input.CardIssuingCurrency)) - ) && - ( - this.CardPaymentMethod == input.CardPaymentMethod || - (this.CardPaymentMethod != null && - this.CardPaymentMethod.Equals(input.CardPaymentMethod)) - ) && - ( - this.CardProductId == input.CardProductId || - this.CardProductId.Equals(input.CardProductId) - ) && - ( - this.CardSummary == input.CardSummary || - (this.CardSummary != null && - this.CardSummary.Equals(input.CardSummary)) - ) && - ( - this.IssuerBin == input.IssuerBin || - (this.IssuerBin != null && - this.IssuerBin.Equals(input.IssuerBin)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardBin != null) - { - hashCode = (hashCode * 59) + this.CardBin.GetHashCode(); - } - if (this.CardHolderName != null) - { - hashCode = (hashCode * 59) + this.CardHolderName.GetHashCode(); - } - if (this.CardIssuingBank != null) - { - hashCode = (hashCode * 59) + this.CardIssuingBank.GetHashCode(); - } - if (this.CardIssuingCountry != null) - { - hashCode = (hashCode * 59) + this.CardIssuingCountry.GetHashCode(); - } - if (this.CardIssuingCurrency != null) - { - hashCode = (hashCode * 59) + this.CardIssuingCurrency.GetHashCode(); - } - if (this.CardPaymentMethod != null) - { - hashCode = (hashCode * 59) + this.CardPaymentMethod.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CardProductId.GetHashCode(); - if (this.CardSummary != null) - { - hashCode = (hashCode * 59) + this.CardSummary.GetHashCode(); - } - if (this.IssuerBin != null) - { - hashCode = (hashCode * 59) + this.IssuerBin.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalDataCommon.cs b/Adyen/Model/Checkout/ResponseAdditionalDataCommon.cs deleted file mode 100644 index 914418d3a..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalDataCommon.cs +++ /dev/null @@ -1,1407 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalDataCommon - /// - [DataContract(Name = "ResponseAdditionalDataCommon")] - public partial class ResponseAdditionalDataCommon : IEquatable, IValidatableObject - { - /// - /// The fraud result properties of the payment. - /// - /// The fraud result properties of the payment. - [JsonConverter(typeof(StringEnumConverter))] - public enum FraudResultTypeEnum - { - /// - /// Enum GREEN for value: GREEN - /// - [EnumMember(Value = "GREEN")] - GREEN = 1, - - /// - /// Enum FRAUD for value: FRAUD - /// - [EnumMember(Value = "FRAUD")] - FRAUD = 2 - - } - - - /// - /// The fraud result properties of the payment. - /// - /// The fraud result properties of the payment. - [DataMember(Name = "fraudResultType", EmitDefaultValue = false)] - public FraudResultTypeEnum? FraudResultType { get; set; } - /// - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh - /// - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh - [JsonConverter(typeof(StringEnumConverter))] - public enum FraudRiskLevelEnum - { - /// - /// Enum VeryLow for value: veryLow - /// - [EnumMember(Value = "veryLow")] - VeryLow = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 4, - - /// - /// Enum VeryHigh for value: veryHigh - /// - [EnumMember(Value = "veryHigh")] - VeryHigh = 5 - - } - - - /// - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh - /// - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh - [DataMember(Name = "fraudRiskLevel", EmitDefaultValue = false)] - public FraudRiskLevelEnum? FraudRiskLevel { get; set; } - /// - /// The processing model used for the recurring transaction. - /// - /// The processing model used for the recurring transaction. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// The processing model used for the recurring transaction. - /// - /// The processing model used for the recurring transaction. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. - /// - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. - [JsonConverter(typeof(StringEnumConverter))] - public enum TokenizationStoreOperationTypeEnum - { - /// - /// Enum Created for value: created - /// - [EnumMember(Value = "created")] - Created = 1, - - /// - /// Enum Updated for value: updated - /// - [EnumMember(Value = "updated")] - Updated = 2, - - /// - /// Enum AlreadyExisting for value: alreadyExisting - /// - [EnumMember(Value = "alreadyExisting")] - AlreadyExisting = 3 - - } - - - /// - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. - /// - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. - [DataMember(Name = "tokenization.store.operationType", EmitDefaultValue = false)] - public TokenizationStoreOperationTypeEnum? TokenizationStoreOperationType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions.. - /// The name of the acquirer processing the payment request. Example: TestPmmAcquirer. - /// The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9. - /// The Adyen alias of the card. Example: H167852639363479. - /// The type of the card alias. Example: Default. - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747. - /// Merchant ID known by the acquirer.. - /// The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).. - /// Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes).. - /// The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs).. - /// Raw AVS result received from the acquirer, where available. Example: D. - /// BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions.. - /// Includes the co-branded card information.. - /// The result of CVC verification.. - /// The raw result of CVC verification.. - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction.. - /// The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02. - /// The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment.. - /// The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR. - /// The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units.. - /// The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair.. - /// Indicates if the payment is sent to manual review.. - /// The fraud result properties of the payment.. - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are: * veryLow * low * medium * high * veryHigh . - /// Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**.. - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\".. - /// Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card. - /// Indicates if the card is used for business purposes only.. - /// The issuing country of the card based on the BIN list that Adyen maintains. Example: JP. - /// A Boolean value indicating whether a liability shift was offered for this payment.. - /// The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field.. - /// The Merchant Advice Code (MAC) can be returned by Mastercard issuers for refused payments. If present, the MAC contains information about why the payment failed, and whether it can be retried. For more information see [Mastercard Merchant Advice Codes](https://docs.adyen.com/development-resources/raw-acquirer-responses#mastercard-merchant-advice-codes).. - /// The reference provided for the transaction.. - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID.. - /// The owner name of a bank account. Only relevant for SEPA Direct Debit transactions.. - /// The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters.. - /// The payment method used in the transaction.. - /// The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro. - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown). - /// The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder. - /// Message to be displayed on the terminal.. - /// The recurring contract types applicable to the transaction.. - /// The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team.. - /// The reference that uniquely identifies the recurring transaction.. - /// The provided reference of the shopper for a recurring transaction.. - /// The processing model used for the recurring transaction.. - /// If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true. - /// Raw refusal reason received from the acquirer, where available. Example: AUTHORISED. - /// The amount of the payment request.. - /// The currency of the payment request.. - /// The shopper interaction type of the payment request. Example: Ecommerce. - /// The shopperReference passed in the payment request. Example: AdyenTestShopperXX. - /// The terminal ID used in a point-of-sale payment. Example: 06022622. - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true. - /// The raw 3DS authentication result from the card issuer. Example: N. - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true. - /// The raw enrollment result from the 3DS directory services of the card schemes. Example: Y. - /// The 3D Secure 2 version.. - /// The reference for the shopper that you sent when tokenizing the payment details.. - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. . - /// The reference that uniquely identifies tokenized payment details.. - /// The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field.. - /// The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA=. - public ResponseAdditionalDataCommon(string acquirerAccountCode = default(string), string acquirerCode = default(string), string acquirerReference = default(string), string alias = default(string), string aliasType = default(string), string authCode = default(string), string authorisationMid = default(string), string authorisedAmountCurrency = default(string), string authorisedAmountValue = default(string), string avsResult = default(string), string avsResultRaw = default(string), string bic = default(string), string coBrandedWith = default(string), string cvcResult = default(string), string cvcResultRaw = default(string), string dsTransID = default(string), string eci = default(string), string expiryDate = default(string), string extraCostsCurrency = default(string), string extraCostsValue = default(string), string fraudCheckItemNrFraudCheckname = default(string), string fraudManualReview = default(string), FraudResultTypeEnum? fraudResultType = default(FraudResultTypeEnum?), FraudRiskLevelEnum? fraudRiskLevel = default(FraudRiskLevelEnum?), string fundingSource = default(string), string fundsAvailability = default(string), string inferredRefusalReason = default(string), string isCardCommercial = default(string), string issuerCountry = default(string), string liabilityShift = default(string), string mcBankNetReferenceNumber = default(string), string merchantAdviceCode = default(string), string merchantReference = default(string), string networkTxReference = default(string), string ownerName = default(string), string paymentAccountReference = default(string), string paymentMethod = default(string), string paymentMethodVariant = default(string), string payoutEligible = default(string), string realtimeAccountUpdaterStatus = default(string), string receiptFreeText = default(string), string recurringContractTypes = default(string), string recurringFirstPspReference = default(string), string recurringRecurringDetailReference = default(string), string recurringShopperReference = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string referred = default(string), string refusalReasonRaw = default(string), string requestAmount = default(string), string requestCurrencyCode = default(string), string shopperInteraction = default(string), string shopperReference = default(string), string terminalId = default(string), string threeDAuthenticated = default(string), string threeDAuthenticatedResponse = default(string), string threeDOffered = default(string), string threeDOfferedResponse = default(string), string threeDSVersion = default(string), string tokenizationShopperReference = default(string), TokenizationStoreOperationTypeEnum? tokenizationStoreOperationType = default(TokenizationStoreOperationTypeEnum?), string tokenizationStoredPaymentMethodId = default(string), string visaTransactionId = default(string), string xid = default(string)) - { - this.AcquirerAccountCode = acquirerAccountCode; - this.AcquirerCode = acquirerCode; - this.AcquirerReference = acquirerReference; - this.Alias = alias; - this.AliasType = aliasType; - this.AuthCode = authCode; - this.AuthorisationMid = authorisationMid; - this.AuthorisedAmountCurrency = authorisedAmountCurrency; - this.AuthorisedAmountValue = authorisedAmountValue; - this.AvsResult = avsResult; - this.AvsResultRaw = avsResultRaw; - this.Bic = bic; - this.CoBrandedWith = coBrandedWith; - this.CvcResult = cvcResult; - this.CvcResultRaw = cvcResultRaw; - this.DsTransID = dsTransID; - this.Eci = eci; - this.ExpiryDate = expiryDate; - this.ExtraCostsCurrency = extraCostsCurrency; - this.ExtraCostsValue = extraCostsValue; - this.FraudCheckItemNrFraudCheckname = fraudCheckItemNrFraudCheckname; - this.FraudManualReview = fraudManualReview; - this.FraudResultType = fraudResultType; - this.FraudRiskLevel = fraudRiskLevel; - this.FundingSource = fundingSource; - this.FundsAvailability = fundsAvailability; - this.InferredRefusalReason = inferredRefusalReason; - this.IsCardCommercial = isCardCommercial; - this.IssuerCountry = issuerCountry; - this.LiabilityShift = liabilityShift; - this.McBankNetReferenceNumber = mcBankNetReferenceNumber; - this.MerchantAdviceCode = merchantAdviceCode; - this.MerchantReference = merchantReference; - this.NetworkTxReference = networkTxReference; - this.OwnerName = ownerName; - this.PaymentAccountReference = paymentAccountReference; - this.PaymentMethod = paymentMethod; - this.PaymentMethodVariant = paymentMethodVariant; - this.PayoutEligible = payoutEligible; - this.RealtimeAccountUpdaterStatus = realtimeAccountUpdaterStatus; - this.ReceiptFreeText = receiptFreeText; - this.RecurringContractTypes = recurringContractTypes; - this.RecurringFirstPspReference = recurringFirstPspReference; - this.RecurringRecurringDetailReference = recurringRecurringDetailReference; - this.RecurringShopperReference = recurringShopperReference; - this.RecurringProcessingModel = recurringProcessingModel; - this.Referred = referred; - this.RefusalReasonRaw = refusalReasonRaw; - this.RequestAmount = requestAmount; - this.RequestCurrencyCode = requestCurrencyCode; - this.ShopperInteraction = shopperInteraction; - this.ShopperReference = shopperReference; - this.TerminalId = terminalId; - this.ThreeDAuthenticated = threeDAuthenticated; - this.ThreeDAuthenticatedResponse = threeDAuthenticatedResponse; - this.ThreeDOffered = threeDOffered; - this.ThreeDOfferedResponse = threeDOfferedResponse; - this.ThreeDSVersion = threeDSVersion; - this.TokenizationShopperReference = tokenizationShopperReference; - this.TokenizationStoreOperationType = tokenizationStoreOperationType; - this.TokenizationStoredPaymentMethodId = tokenizationStoredPaymentMethodId; - this.VisaTransactionId = visaTransactionId; - this.Xid = xid; - } - - /// - /// The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions. - /// - /// The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions. - [DataMember(Name = "acquirerAccountCode", EmitDefaultValue = false)] - public string AcquirerAccountCode { get; set; } - - /// - /// The name of the acquirer processing the payment request. Example: TestPmmAcquirer - /// - /// The name of the acquirer processing the payment request. Example: TestPmmAcquirer - [DataMember(Name = "acquirerCode", EmitDefaultValue = false)] - public string AcquirerCode { get; set; } - - /// - /// The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9 - /// - /// The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9 - [DataMember(Name = "acquirerReference", EmitDefaultValue = false)] - public string AcquirerReference { get; set; } - - /// - /// The Adyen alias of the card. Example: H167852639363479 - /// - /// The Adyen alias of the card. Example: H167852639363479 - [DataMember(Name = "alias", EmitDefaultValue = false)] - public string Alias { get; set; } - - /// - /// The type of the card alias. Example: Default - /// - /// The type of the card alias. Example: Default - [DataMember(Name = "aliasType", EmitDefaultValue = false)] - public string AliasType { get; set; } - - /// - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747 - /// - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747 - [DataMember(Name = "authCode", EmitDefaultValue = false)] - public string AuthCode { get; set; } - - /// - /// Merchant ID known by the acquirer. - /// - /// Merchant ID known by the acquirer. - [DataMember(Name = "authorisationMid", EmitDefaultValue = false)] - public string AuthorisationMid { get; set; } - - /// - /// The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "authorisedAmountCurrency", EmitDefaultValue = false)] - public string AuthorisedAmountCurrency { get; set; } - - /// - /// Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - /// - /// Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "authorisedAmountValue", EmitDefaultValue = false)] - public string AuthorisedAmountValue { get; set; } - - /// - /// The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs). - /// - /// The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs). - [DataMember(Name = "avsResult", EmitDefaultValue = false)] - public string AvsResult { get; set; } - - /// - /// Raw AVS result received from the acquirer, where available. Example: D - /// - /// Raw AVS result received from the acquirer, where available. Example: D - [DataMember(Name = "avsResultRaw", EmitDefaultValue = false)] - public string AvsResultRaw { get; set; } - - /// - /// BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions. - /// - /// BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions. - [DataMember(Name = "bic", EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Includes the co-branded card information. - /// - /// Includes the co-branded card information. - [DataMember(Name = "coBrandedWith", EmitDefaultValue = false)] - public string CoBrandedWith { get; set; } - - /// - /// The result of CVC verification. - /// - /// The result of CVC verification. - [DataMember(Name = "cvcResult", EmitDefaultValue = false)] - public string CvcResult { get; set; } - - /// - /// The raw result of CVC verification. - /// - /// The raw result of CVC verification. - [DataMember(Name = "cvcResultRaw", EmitDefaultValue = false)] - public string CvcResultRaw { get; set; } - - /// - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction. - /// - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction. - [DataMember(Name = "dsTransID", EmitDefaultValue = false)] - public string DsTransID { get; set; } - - /// - /// The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02 - /// - /// The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02 - [DataMember(Name = "eci", EmitDefaultValue = false)] - public string Eci { get; set; } - - /// - /// The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment. - /// - /// The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment. - [DataMember(Name = "expiryDate", EmitDefaultValue = false)] - public string ExpiryDate { get; set; } - - /// - /// The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR - /// - /// The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR - [DataMember(Name = "extraCostsCurrency", EmitDefaultValue = false)] - public string ExtraCostsCurrency { get; set; } - - /// - /// The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units. - /// - /// The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units. - [DataMember(Name = "extraCostsValue", EmitDefaultValue = false)] - public string ExtraCostsValue { get; set; } - - /// - /// The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair. - /// - /// The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair. - [DataMember(Name = "fraudCheck-[itemNr]-[FraudCheckname]", EmitDefaultValue = false)] - public string FraudCheckItemNrFraudCheckname { get; set; } - - /// - /// Indicates if the payment is sent to manual review. - /// - /// Indicates if the payment is sent to manual review. - [DataMember(Name = "fraudManualReview", EmitDefaultValue = false)] - public string FraudManualReview { get; set; } - - /// - /// Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. - /// - /// Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public string FundingSource { get; set; } - - /// - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\". - /// - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\". - [DataMember(Name = "fundsAvailability", EmitDefaultValue = false)] - public string FundsAvailability { get; set; } - - /// - /// Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card - /// - /// Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card - [DataMember(Name = "inferredRefusalReason", EmitDefaultValue = false)] - public string InferredRefusalReason { get; set; } - - /// - /// Indicates if the card is used for business purposes only. - /// - /// Indicates if the card is used for business purposes only. - [DataMember(Name = "isCardCommercial", EmitDefaultValue = false)] - public string IsCardCommercial { get; set; } - - /// - /// The issuing country of the card based on the BIN list that Adyen maintains. Example: JP - /// - /// The issuing country of the card based on the BIN list that Adyen maintains. Example: JP - [DataMember(Name = "issuerCountry", EmitDefaultValue = false)] - public string IssuerCountry { get; set; } - - /// - /// A Boolean value indicating whether a liability shift was offered for this payment. - /// - /// A Boolean value indicating whether a liability shift was offered for this payment. - [DataMember(Name = "liabilityShift", EmitDefaultValue = false)] - public string LiabilityShift { get; set; } - - /// - /// The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field. - /// - /// The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field. - [DataMember(Name = "mcBankNetReferenceNumber", EmitDefaultValue = false)] - public string McBankNetReferenceNumber { get; set; } - - /// - /// The Merchant Advice Code (MAC) can be returned by Mastercard issuers for refused payments. If present, the MAC contains information about why the payment failed, and whether it can be retried. For more information see [Mastercard Merchant Advice Codes](https://docs.adyen.com/development-resources/raw-acquirer-responses#mastercard-merchant-advice-codes). - /// - /// The Merchant Advice Code (MAC) can be returned by Mastercard issuers for refused payments. If present, the MAC contains information about why the payment failed, and whether it can be retried. For more information see [Mastercard Merchant Advice Codes](https://docs.adyen.com/development-resources/raw-acquirer-responses#mastercard-merchant-advice-codes). - [DataMember(Name = "merchantAdviceCode", EmitDefaultValue = false)] - public string MerchantAdviceCode { get; set; } - - /// - /// The reference provided for the transaction. - /// - /// The reference provided for the transaction. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - [DataMember(Name = "networkTxReference", EmitDefaultValue = false)] - public string NetworkTxReference { get; set; } - - /// - /// The owner name of a bank account. Only relevant for SEPA Direct Debit transactions. - /// - /// The owner name of a bank account. Only relevant for SEPA Direct Debit transactions. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters. - /// - /// The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters. - [DataMember(Name = "paymentAccountReference", EmitDefaultValue = false)] - public string PaymentAccountReference { get; set; } - - /// - /// The payment method used in the transaction. - /// - /// The payment method used in the transaction. - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public string PaymentMethod { get; set; } - - /// - /// The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro - /// - /// The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro - [DataMember(Name = "paymentMethodVariant", EmitDefaultValue = false)] - public string PaymentMethodVariant { get; set; } - - /// - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) - /// - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) - [DataMember(Name = "payoutEligible", EmitDefaultValue = false)] - public string PayoutEligible { get; set; } - - /// - /// The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder - /// - /// The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder - [DataMember(Name = "realtimeAccountUpdaterStatus", EmitDefaultValue = false)] - public string RealtimeAccountUpdaterStatus { get; set; } - - /// - /// Message to be displayed on the terminal. - /// - /// Message to be displayed on the terminal. - [DataMember(Name = "receiptFreeText", EmitDefaultValue = false)] - public string ReceiptFreeText { get; set; } - - /// - /// The recurring contract types applicable to the transaction. - /// - /// The recurring contract types applicable to the transaction. - [DataMember(Name = "recurring.contractTypes", EmitDefaultValue = false)] - public string RecurringContractTypes { get; set; } - - /// - /// The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. - /// - /// The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. - [DataMember(Name = "recurring.firstPspReference", EmitDefaultValue = false)] - public string RecurringFirstPspReference { get; set; } - - /// - /// The reference that uniquely identifies the recurring transaction. - /// - /// The reference that uniquely identifies the recurring transaction. - [DataMember(Name = "recurring.recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use tokenization.storedPaymentMethodId instead.")] - public string RecurringRecurringDetailReference { get; set; } - - /// - /// The provided reference of the shopper for a recurring transaction. - /// - /// The provided reference of the shopper for a recurring transaction. - [DataMember(Name = "recurring.shopperReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use tokenization.shopperReference instead.")] - public string RecurringShopperReference { get; set; } - - /// - /// If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true - /// - /// If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true - [DataMember(Name = "referred", EmitDefaultValue = false)] - public string Referred { get; set; } - - /// - /// Raw refusal reason received from the acquirer, where available. Example: AUTHORISED - /// - /// Raw refusal reason received from the acquirer, where available. Example: AUTHORISED - [DataMember(Name = "refusalReasonRaw", EmitDefaultValue = false)] - public string RefusalReasonRaw { get; set; } - - /// - /// The amount of the payment request. - /// - /// The amount of the payment request. - [DataMember(Name = "requestAmount", EmitDefaultValue = false)] - public string RequestAmount { get; set; } - - /// - /// The currency of the payment request. - /// - /// The currency of the payment request. - [DataMember(Name = "requestCurrencyCode", EmitDefaultValue = false)] - public string RequestCurrencyCode { get; set; } - - /// - /// The shopper interaction type of the payment request. Example: Ecommerce - /// - /// The shopper interaction type of the payment request. Example: Ecommerce - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public string ShopperInteraction { get; set; } - - /// - /// The shopperReference passed in the payment request. Example: AdyenTestShopperXX - /// - /// The shopperReference passed in the payment request. Example: AdyenTestShopperXX - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The terminal ID used in a point-of-sale payment. Example: 06022622 - /// - /// The terminal ID used in a point-of-sale payment. Example: 06022622 - [DataMember(Name = "terminalId", EmitDefaultValue = false)] - public string TerminalId { get; set; } - - /// - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - /// - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - [DataMember(Name = "threeDAuthenticated", EmitDefaultValue = false)] - public string ThreeDAuthenticated { get; set; } - - /// - /// The raw 3DS authentication result from the card issuer. Example: N - /// - /// The raw 3DS authentication result from the card issuer. Example: N - [DataMember(Name = "threeDAuthenticatedResponse", EmitDefaultValue = false)] - public string ThreeDAuthenticatedResponse { get; set; } - - /// - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true - /// - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true - [DataMember(Name = "threeDOffered", EmitDefaultValue = false)] - public string ThreeDOffered { get; set; } - - /// - /// The raw enrollment result from the 3DS directory services of the card schemes. Example: Y - /// - /// The raw enrollment result from the 3DS directory services of the card schemes. Example: Y - [DataMember(Name = "threeDOfferedResponse", EmitDefaultValue = false)] - public string ThreeDOfferedResponse { get; set; } - - /// - /// The 3D Secure 2 version. - /// - /// The 3D Secure 2 version. - [DataMember(Name = "threeDSVersion", EmitDefaultValue = false)] - public string ThreeDSVersion { get; set; } - - /// - /// The reference for the shopper that you sent when tokenizing the payment details. - /// - /// The reference for the shopper that you sent when tokenizing the payment details. - [DataMember(Name = "tokenization.shopperReference", EmitDefaultValue = false)] - public string TokenizationShopperReference { get; set; } - - /// - /// The reference that uniquely identifies tokenized payment details. - /// - /// The reference that uniquely identifies tokenized payment details. - [DataMember(Name = "tokenization.storedPaymentMethodId", EmitDefaultValue = false)] - public string TokenizationStoredPaymentMethodId { get; set; } - - /// - /// The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field. - /// - /// The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field. - [DataMember(Name = "visaTransactionId", EmitDefaultValue = false)] - public string VisaTransactionId { get; set; } - - /// - /// The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= - /// - /// The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= - [DataMember(Name = "xid", EmitDefaultValue = false)] - public string Xid { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataCommon {\n"); - sb.Append(" AcquirerAccountCode: ").Append(AcquirerAccountCode).Append("\n"); - sb.Append(" AcquirerCode: ").Append(AcquirerCode).Append("\n"); - sb.Append(" AcquirerReference: ").Append(AcquirerReference).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" AliasType: ").Append(AliasType).Append("\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" AuthorisationMid: ").Append(AuthorisationMid).Append("\n"); - sb.Append(" AuthorisedAmountCurrency: ").Append(AuthorisedAmountCurrency).Append("\n"); - sb.Append(" AuthorisedAmountValue: ").Append(AuthorisedAmountValue).Append("\n"); - sb.Append(" AvsResult: ").Append(AvsResult).Append("\n"); - sb.Append(" AvsResultRaw: ").Append(AvsResultRaw).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" CoBrandedWith: ").Append(CoBrandedWith).Append("\n"); - sb.Append(" CvcResult: ").Append(CvcResult).Append("\n"); - sb.Append(" CvcResultRaw: ").Append(CvcResultRaw).Append("\n"); - sb.Append(" DsTransID: ").Append(DsTransID).Append("\n"); - sb.Append(" Eci: ").Append(Eci).Append("\n"); - sb.Append(" ExpiryDate: ").Append(ExpiryDate).Append("\n"); - sb.Append(" ExtraCostsCurrency: ").Append(ExtraCostsCurrency).Append("\n"); - sb.Append(" ExtraCostsValue: ").Append(ExtraCostsValue).Append("\n"); - sb.Append(" FraudCheckItemNrFraudCheckname: ").Append(FraudCheckItemNrFraudCheckname).Append("\n"); - sb.Append(" FraudManualReview: ").Append(FraudManualReview).Append("\n"); - sb.Append(" FraudResultType: ").Append(FraudResultType).Append("\n"); - sb.Append(" FraudRiskLevel: ").Append(FraudRiskLevel).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" FundsAvailability: ").Append(FundsAvailability).Append("\n"); - sb.Append(" InferredRefusalReason: ").Append(InferredRefusalReason).Append("\n"); - sb.Append(" IsCardCommercial: ").Append(IsCardCommercial).Append("\n"); - sb.Append(" IssuerCountry: ").Append(IssuerCountry).Append("\n"); - sb.Append(" LiabilityShift: ").Append(LiabilityShift).Append("\n"); - sb.Append(" McBankNetReferenceNumber: ").Append(McBankNetReferenceNumber).Append("\n"); - sb.Append(" MerchantAdviceCode: ").Append(MerchantAdviceCode).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" NetworkTxReference: ").Append(NetworkTxReference).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" PaymentAccountReference: ").Append(PaymentAccountReference).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" PaymentMethodVariant: ").Append(PaymentMethodVariant).Append("\n"); - sb.Append(" PayoutEligible: ").Append(PayoutEligible).Append("\n"); - sb.Append(" RealtimeAccountUpdaterStatus: ").Append(RealtimeAccountUpdaterStatus).Append("\n"); - sb.Append(" ReceiptFreeText: ").Append(ReceiptFreeText).Append("\n"); - sb.Append(" RecurringContractTypes: ").Append(RecurringContractTypes).Append("\n"); - sb.Append(" RecurringFirstPspReference: ").Append(RecurringFirstPspReference).Append("\n"); - sb.Append(" RecurringRecurringDetailReference: ").Append(RecurringRecurringDetailReference).Append("\n"); - sb.Append(" RecurringShopperReference: ").Append(RecurringShopperReference).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" Referred: ").Append(Referred).Append("\n"); - sb.Append(" RefusalReasonRaw: ").Append(RefusalReasonRaw).Append("\n"); - sb.Append(" RequestAmount: ").Append(RequestAmount).Append("\n"); - sb.Append(" RequestCurrencyCode: ").Append(RequestCurrencyCode).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" TerminalId: ").Append(TerminalId).Append("\n"); - sb.Append(" ThreeDAuthenticated: ").Append(ThreeDAuthenticated).Append("\n"); - sb.Append(" ThreeDAuthenticatedResponse: ").Append(ThreeDAuthenticatedResponse).Append("\n"); - sb.Append(" ThreeDOffered: ").Append(ThreeDOffered).Append("\n"); - sb.Append(" ThreeDOfferedResponse: ").Append(ThreeDOfferedResponse).Append("\n"); - sb.Append(" ThreeDSVersion: ").Append(ThreeDSVersion).Append("\n"); - sb.Append(" TokenizationShopperReference: ").Append(TokenizationShopperReference).Append("\n"); - sb.Append(" TokenizationStoreOperationType: ").Append(TokenizationStoreOperationType).Append("\n"); - sb.Append(" TokenizationStoredPaymentMethodId: ").Append(TokenizationStoredPaymentMethodId).Append("\n"); - sb.Append(" VisaTransactionId: ").Append(VisaTransactionId).Append("\n"); - sb.Append(" Xid: ").Append(Xid).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataCommon); - } - - /// - /// Returns true if ResponseAdditionalDataCommon instances are equal - /// - /// Instance of ResponseAdditionalDataCommon to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataCommon input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquirerAccountCode == input.AcquirerAccountCode || - (this.AcquirerAccountCode != null && - this.AcquirerAccountCode.Equals(input.AcquirerAccountCode)) - ) && - ( - this.AcquirerCode == input.AcquirerCode || - (this.AcquirerCode != null && - this.AcquirerCode.Equals(input.AcquirerCode)) - ) && - ( - this.AcquirerReference == input.AcquirerReference || - (this.AcquirerReference != null && - this.AcquirerReference.Equals(input.AcquirerReference)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.AliasType == input.AliasType || - (this.AliasType != null && - this.AliasType.Equals(input.AliasType)) - ) && - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.AuthorisationMid == input.AuthorisationMid || - (this.AuthorisationMid != null && - this.AuthorisationMid.Equals(input.AuthorisationMid)) - ) && - ( - this.AuthorisedAmountCurrency == input.AuthorisedAmountCurrency || - (this.AuthorisedAmountCurrency != null && - this.AuthorisedAmountCurrency.Equals(input.AuthorisedAmountCurrency)) - ) && - ( - this.AuthorisedAmountValue == input.AuthorisedAmountValue || - (this.AuthorisedAmountValue != null && - this.AuthorisedAmountValue.Equals(input.AuthorisedAmountValue)) - ) && - ( - this.AvsResult == input.AvsResult || - (this.AvsResult != null && - this.AvsResult.Equals(input.AvsResult)) - ) && - ( - this.AvsResultRaw == input.AvsResultRaw || - (this.AvsResultRaw != null && - this.AvsResultRaw.Equals(input.AvsResultRaw)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.CoBrandedWith == input.CoBrandedWith || - (this.CoBrandedWith != null && - this.CoBrandedWith.Equals(input.CoBrandedWith)) - ) && - ( - this.CvcResult == input.CvcResult || - (this.CvcResult != null && - this.CvcResult.Equals(input.CvcResult)) - ) && - ( - this.CvcResultRaw == input.CvcResultRaw || - (this.CvcResultRaw != null && - this.CvcResultRaw.Equals(input.CvcResultRaw)) - ) && - ( - this.DsTransID == input.DsTransID || - (this.DsTransID != null && - this.DsTransID.Equals(input.DsTransID)) - ) && - ( - this.Eci == input.Eci || - (this.Eci != null && - this.Eci.Equals(input.Eci)) - ) && - ( - this.ExpiryDate == input.ExpiryDate || - (this.ExpiryDate != null && - this.ExpiryDate.Equals(input.ExpiryDate)) - ) && - ( - this.ExtraCostsCurrency == input.ExtraCostsCurrency || - (this.ExtraCostsCurrency != null && - this.ExtraCostsCurrency.Equals(input.ExtraCostsCurrency)) - ) && - ( - this.ExtraCostsValue == input.ExtraCostsValue || - (this.ExtraCostsValue != null && - this.ExtraCostsValue.Equals(input.ExtraCostsValue)) - ) && - ( - this.FraudCheckItemNrFraudCheckname == input.FraudCheckItemNrFraudCheckname || - (this.FraudCheckItemNrFraudCheckname != null && - this.FraudCheckItemNrFraudCheckname.Equals(input.FraudCheckItemNrFraudCheckname)) - ) && - ( - this.FraudManualReview == input.FraudManualReview || - (this.FraudManualReview != null && - this.FraudManualReview.Equals(input.FraudManualReview)) - ) && - ( - this.FraudResultType == input.FraudResultType || - this.FraudResultType.Equals(input.FraudResultType) - ) && - ( - this.FraudRiskLevel == input.FraudRiskLevel || - this.FraudRiskLevel.Equals(input.FraudRiskLevel) - ) && - ( - this.FundingSource == input.FundingSource || - (this.FundingSource != null && - this.FundingSource.Equals(input.FundingSource)) - ) && - ( - this.FundsAvailability == input.FundsAvailability || - (this.FundsAvailability != null && - this.FundsAvailability.Equals(input.FundsAvailability)) - ) && - ( - this.InferredRefusalReason == input.InferredRefusalReason || - (this.InferredRefusalReason != null && - this.InferredRefusalReason.Equals(input.InferredRefusalReason)) - ) && - ( - this.IsCardCommercial == input.IsCardCommercial || - (this.IsCardCommercial != null && - this.IsCardCommercial.Equals(input.IsCardCommercial)) - ) && - ( - this.IssuerCountry == input.IssuerCountry || - (this.IssuerCountry != null && - this.IssuerCountry.Equals(input.IssuerCountry)) - ) && - ( - this.LiabilityShift == input.LiabilityShift || - (this.LiabilityShift != null && - this.LiabilityShift.Equals(input.LiabilityShift)) - ) && - ( - this.McBankNetReferenceNumber == input.McBankNetReferenceNumber || - (this.McBankNetReferenceNumber != null && - this.McBankNetReferenceNumber.Equals(input.McBankNetReferenceNumber)) - ) && - ( - this.MerchantAdviceCode == input.MerchantAdviceCode || - (this.MerchantAdviceCode != null && - this.MerchantAdviceCode.Equals(input.MerchantAdviceCode)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.NetworkTxReference == input.NetworkTxReference || - (this.NetworkTxReference != null && - this.NetworkTxReference.Equals(input.NetworkTxReference)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.PaymentAccountReference == input.PaymentAccountReference || - (this.PaymentAccountReference != null && - this.PaymentAccountReference.Equals(input.PaymentAccountReference)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.PaymentMethodVariant == input.PaymentMethodVariant || - (this.PaymentMethodVariant != null && - this.PaymentMethodVariant.Equals(input.PaymentMethodVariant)) - ) && - ( - this.PayoutEligible == input.PayoutEligible || - (this.PayoutEligible != null && - this.PayoutEligible.Equals(input.PayoutEligible)) - ) && - ( - this.RealtimeAccountUpdaterStatus == input.RealtimeAccountUpdaterStatus || - (this.RealtimeAccountUpdaterStatus != null && - this.RealtimeAccountUpdaterStatus.Equals(input.RealtimeAccountUpdaterStatus)) - ) && - ( - this.ReceiptFreeText == input.ReceiptFreeText || - (this.ReceiptFreeText != null && - this.ReceiptFreeText.Equals(input.ReceiptFreeText)) - ) && - ( - this.RecurringContractTypes == input.RecurringContractTypes || - (this.RecurringContractTypes != null && - this.RecurringContractTypes.Equals(input.RecurringContractTypes)) - ) && - ( - this.RecurringFirstPspReference == input.RecurringFirstPspReference || - (this.RecurringFirstPspReference != null && - this.RecurringFirstPspReference.Equals(input.RecurringFirstPspReference)) - ) && - ( - this.RecurringRecurringDetailReference == input.RecurringRecurringDetailReference || - (this.RecurringRecurringDetailReference != null && - this.RecurringRecurringDetailReference.Equals(input.RecurringRecurringDetailReference)) - ) && - ( - this.RecurringShopperReference == input.RecurringShopperReference || - (this.RecurringShopperReference != null && - this.RecurringShopperReference.Equals(input.RecurringShopperReference)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.Referred == input.Referred || - (this.Referred != null && - this.Referred.Equals(input.Referred)) - ) && - ( - this.RefusalReasonRaw == input.RefusalReasonRaw || - (this.RefusalReasonRaw != null && - this.RefusalReasonRaw.Equals(input.RefusalReasonRaw)) - ) && - ( - this.RequestAmount == input.RequestAmount || - (this.RequestAmount != null && - this.RequestAmount.Equals(input.RequestAmount)) - ) && - ( - this.RequestCurrencyCode == input.RequestCurrencyCode || - (this.RequestCurrencyCode != null && - this.RequestCurrencyCode.Equals(input.RequestCurrencyCode)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - (this.ShopperInteraction != null && - this.ShopperInteraction.Equals(input.ShopperInteraction)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.TerminalId == input.TerminalId || - (this.TerminalId != null && - this.TerminalId.Equals(input.TerminalId)) - ) && - ( - this.ThreeDAuthenticated == input.ThreeDAuthenticated || - (this.ThreeDAuthenticated != null && - this.ThreeDAuthenticated.Equals(input.ThreeDAuthenticated)) - ) && - ( - this.ThreeDAuthenticatedResponse == input.ThreeDAuthenticatedResponse || - (this.ThreeDAuthenticatedResponse != null && - this.ThreeDAuthenticatedResponse.Equals(input.ThreeDAuthenticatedResponse)) - ) && - ( - this.ThreeDOffered == input.ThreeDOffered || - (this.ThreeDOffered != null && - this.ThreeDOffered.Equals(input.ThreeDOffered)) - ) && - ( - this.ThreeDOfferedResponse == input.ThreeDOfferedResponse || - (this.ThreeDOfferedResponse != null && - this.ThreeDOfferedResponse.Equals(input.ThreeDOfferedResponse)) - ) && - ( - this.ThreeDSVersion == input.ThreeDSVersion || - (this.ThreeDSVersion != null && - this.ThreeDSVersion.Equals(input.ThreeDSVersion)) - ) && - ( - this.TokenizationShopperReference == input.TokenizationShopperReference || - (this.TokenizationShopperReference != null && - this.TokenizationShopperReference.Equals(input.TokenizationShopperReference)) - ) && - ( - this.TokenizationStoreOperationType == input.TokenizationStoreOperationType || - this.TokenizationStoreOperationType.Equals(input.TokenizationStoreOperationType) - ) && - ( - this.TokenizationStoredPaymentMethodId == input.TokenizationStoredPaymentMethodId || - (this.TokenizationStoredPaymentMethodId != null && - this.TokenizationStoredPaymentMethodId.Equals(input.TokenizationStoredPaymentMethodId)) - ) && - ( - this.VisaTransactionId == input.VisaTransactionId || - (this.VisaTransactionId != null && - this.VisaTransactionId.Equals(input.VisaTransactionId)) - ) && - ( - this.Xid == input.Xid || - (this.Xid != null && - this.Xid.Equals(input.Xid)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcquirerAccountCode != null) - { - hashCode = (hashCode * 59) + this.AcquirerAccountCode.GetHashCode(); - } - if (this.AcquirerCode != null) - { - hashCode = (hashCode * 59) + this.AcquirerCode.GetHashCode(); - } - if (this.AcquirerReference != null) - { - hashCode = (hashCode * 59) + this.AcquirerReference.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.AliasType != null) - { - hashCode = (hashCode * 59) + this.AliasType.GetHashCode(); - } - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.AuthorisationMid != null) - { - hashCode = (hashCode * 59) + this.AuthorisationMid.GetHashCode(); - } - if (this.AuthorisedAmountCurrency != null) - { - hashCode = (hashCode * 59) + this.AuthorisedAmountCurrency.GetHashCode(); - } - if (this.AuthorisedAmountValue != null) - { - hashCode = (hashCode * 59) + this.AuthorisedAmountValue.GetHashCode(); - } - if (this.AvsResult != null) - { - hashCode = (hashCode * 59) + this.AvsResult.GetHashCode(); - } - if (this.AvsResultRaw != null) - { - hashCode = (hashCode * 59) + this.AvsResultRaw.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - if (this.CoBrandedWith != null) - { - hashCode = (hashCode * 59) + this.CoBrandedWith.GetHashCode(); - } - if (this.CvcResult != null) - { - hashCode = (hashCode * 59) + this.CvcResult.GetHashCode(); - } - if (this.CvcResultRaw != null) - { - hashCode = (hashCode * 59) + this.CvcResultRaw.GetHashCode(); - } - if (this.DsTransID != null) - { - hashCode = (hashCode * 59) + this.DsTransID.GetHashCode(); - } - if (this.Eci != null) - { - hashCode = (hashCode * 59) + this.Eci.GetHashCode(); - } - if (this.ExpiryDate != null) - { - hashCode = (hashCode * 59) + this.ExpiryDate.GetHashCode(); - } - if (this.ExtraCostsCurrency != null) - { - hashCode = (hashCode * 59) + this.ExtraCostsCurrency.GetHashCode(); - } - if (this.ExtraCostsValue != null) - { - hashCode = (hashCode * 59) + this.ExtraCostsValue.GetHashCode(); - } - if (this.FraudCheckItemNrFraudCheckname != null) - { - hashCode = (hashCode * 59) + this.FraudCheckItemNrFraudCheckname.GetHashCode(); - } - if (this.FraudManualReview != null) - { - hashCode = (hashCode * 59) + this.FraudManualReview.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FraudResultType.GetHashCode(); - hashCode = (hashCode * 59) + this.FraudRiskLevel.GetHashCode(); - if (this.FundingSource != null) - { - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - } - if (this.FundsAvailability != null) - { - hashCode = (hashCode * 59) + this.FundsAvailability.GetHashCode(); - } - if (this.InferredRefusalReason != null) - { - hashCode = (hashCode * 59) + this.InferredRefusalReason.GetHashCode(); - } - if (this.IsCardCommercial != null) - { - hashCode = (hashCode * 59) + this.IsCardCommercial.GetHashCode(); - } - if (this.IssuerCountry != null) - { - hashCode = (hashCode * 59) + this.IssuerCountry.GetHashCode(); - } - if (this.LiabilityShift != null) - { - hashCode = (hashCode * 59) + this.LiabilityShift.GetHashCode(); - } - if (this.McBankNetReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.McBankNetReferenceNumber.GetHashCode(); - } - if (this.MerchantAdviceCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAdviceCode.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.NetworkTxReference != null) - { - hashCode = (hashCode * 59) + this.NetworkTxReference.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.PaymentAccountReference != null) - { - hashCode = (hashCode * 59) + this.PaymentAccountReference.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.PaymentMethodVariant != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodVariant.GetHashCode(); - } - if (this.PayoutEligible != null) - { - hashCode = (hashCode * 59) + this.PayoutEligible.GetHashCode(); - } - if (this.RealtimeAccountUpdaterStatus != null) - { - hashCode = (hashCode * 59) + this.RealtimeAccountUpdaterStatus.GetHashCode(); - } - if (this.ReceiptFreeText != null) - { - hashCode = (hashCode * 59) + this.ReceiptFreeText.GetHashCode(); - } - if (this.RecurringContractTypes != null) - { - hashCode = (hashCode * 59) + this.RecurringContractTypes.GetHashCode(); - } - if (this.RecurringFirstPspReference != null) - { - hashCode = (hashCode * 59) + this.RecurringFirstPspReference.GetHashCode(); - } - if (this.RecurringRecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringRecurringDetailReference.GetHashCode(); - } - if (this.RecurringShopperReference != null) - { - hashCode = (hashCode * 59) + this.RecurringShopperReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.Referred != null) - { - hashCode = (hashCode * 59) + this.Referred.GetHashCode(); - } - if (this.RefusalReasonRaw != null) - { - hashCode = (hashCode * 59) + this.RefusalReasonRaw.GetHashCode(); - } - if (this.RequestAmount != null) - { - hashCode = (hashCode * 59) + this.RequestAmount.GetHashCode(); - } - if (this.RequestCurrencyCode != null) - { - hashCode = (hashCode * 59) + this.RequestCurrencyCode.GetHashCode(); - } - if (this.ShopperInteraction != null) - { - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.TerminalId != null) - { - hashCode = (hashCode * 59) + this.TerminalId.GetHashCode(); - } - if (this.ThreeDAuthenticated != null) - { - hashCode = (hashCode * 59) + this.ThreeDAuthenticated.GetHashCode(); - } - if (this.ThreeDAuthenticatedResponse != null) - { - hashCode = (hashCode * 59) + this.ThreeDAuthenticatedResponse.GetHashCode(); - } - if (this.ThreeDOffered != null) - { - hashCode = (hashCode * 59) + this.ThreeDOffered.GetHashCode(); - } - if (this.ThreeDOfferedResponse != null) - { - hashCode = (hashCode * 59) + this.ThreeDOfferedResponse.GetHashCode(); - } - if (this.ThreeDSVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDSVersion.GetHashCode(); - } - if (this.TokenizationShopperReference != null) - { - hashCode = (hashCode * 59) + this.TokenizationShopperReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TokenizationStoreOperationType.GetHashCode(); - if (this.TokenizationStoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.TokenizationStoredPaymentMethodId.GetHashCode(); - } - if (this.VisaTransactionId != null) - { - hashCode = (hashCode * 59) + this.VisaTransactionId.GetHashCode(); - } - if (this.Xid != null) - { - hashCode = (hashCode * 59) + this.Xid.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.cs b/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.cs deleted file mode 100644 index 10fb4a993..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalDataDomesticError.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalDataDomesticError - /// - [DataContract(Name = "ResponseAdditionalDataDomesticError")] - public partial class ResponseAdditionalDataDomesticError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan.. - /// The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan.. - public ResponseAdditionalDataDomesticError(string domesticRefusalReasonRaw = default(string), string domesticShopperAdvice = default(string)) - { - this.DomesticRefusalReasonRaw = domesticRefusalReasonRaw; - this.DomesticShopperAdvice = domesticShopperAdvice; - } - - /// - /// The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. - /// - /// The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. - [DataMember(Name = "domesticRefusalReasonRaw", EmitDefaultValue = false)] - public string DomesticRefusalReasonRaw { get; set; } - - /// - /// The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. - /// - /// The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. - [DataMember(Name = "domesticShopperAdvice", EmitDefaultValue = false)] - public string DomesticShopperAdvice { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataDomesticError {\n"); - sb.Append(" DomesticRefusalReasonRaw: ").Append(DomesticRefusalReasonRaw).Append("\n"); - sb.Append(" DomesticShopperAdvice: ").Append(DomesticShopperAdvice).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataDomesticError); - } - - /// - /// Returns true if ResponseAdditionalDataDomesticError instances are equal - /// - /// Instance of ResponseAdditionalDataDomesticError to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataDomesticError input) - { - if (input == null) - { - return false; - } - return - ( - this.DomesticRefusalReasonRaw == input.DomesticRefusalReasonRaw || - (this.DomesticRefusalReasonRaw != null && - this.DomesticRefusalReasonRaw.Equals(input.DomesticRefusalReasonRaw)) - ) && - ( - this.DomesticShopperAdvice == input.DomesticShopperAdvice || - (this.DomesticShopperAdvice != null && - this.DomesticShopperAdvice.Equals(input.DomesticShopperAdvice)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DomesticRefusalReasonRaw != null) - { - hashCode = (hashCode * 59) + this.DomesticRefusalReasonRaw.GetHashCode(); - } - if (this.DomesticShopperAdvice != null) - { - hashCode = (hashCode * 59) + this.DomesticShopperAdvice.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.cs b/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.cs deleted file mode 100644 index b2ce6fc11..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalDataInstallments.cs +++ /dev/null @@ -1,338 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalDataInstallments - /// - [DataContract(Name = "ResponseAdditionalDataInstallments")] - public partial class ResponseAdditionalDataInstallments : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Type of installment. The value of `installmentType` should be **IssuerFinanced**.. - /// Annual interest rate.. - /// First Installment Amount in minor units.. - /// Installment fee amount in minor units.. - /// Interest rate for the installment period.. - /// Maximum number of installments possible for this payment.. - /// Minimum number of installments possible for this payment.. - /// Total number of installments possible for this payment.. - /// Subsequent Installment Amount in minor units.. - /// Total amount in minor units.. - /// Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments. - /// The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments.. - public ResponseAdditionalDataInstallments(string installmentPaymentDataInstallmentType = default(string), string installmentPaymentDataOptionItemNrAnnualPercentageRate = default(string), string installmentPaymentDataOptionItemNrFirstInstallmentAmount = default(string), string installmentPaymentDataOptionItemNrInstallmentFee = default(string), string installmentPaymentDataOptionItemNrInterestRate = default(string), string installmentPaymentDataOptionItemNrMaximumNumberOfInstallments = default(string), string installmentPaymentDataOptionItemNrMinimumNumberOfInstallments = default(string), string installmentPaymentDataOptionItemNrNumberOfInstallments = default(string), string installmentPaymentDataOptionItemNrSubsequentInstallmentAmount = default(string), string installmentPaymentDataOptionItemNrTotalAmountDue = default(string), string installmentPaymentDataPaymentOptions = default(string), string installmentsValue = default(string)) - { - this.InstallmentPaymentDataInstallmentType = installmentPaymentDataInstallmentType; - this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate = installmentPaymentDataOptionItemNrAnnualPercentageRate; - this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount = installmentPaymentDataOptionItemNrFirstInstallmentAmount; - this.InstallmentPaymentDataOptionItemNrInstallmentFee = installmentPaymentDataOptionItemNrInstallmentFee; - this.InstallmentPaymentDataOptionItemNrInterestRate = installmentPaymentDataOptionItemNrInterestRate; - this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments = installmentPaymentDataOptionItemNrMaximumNumberOfInstallments; - this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments = installmentPaymentDataOptionItemNrMinimumNumberOfInstallments; - this.InstallmentPaymentDataOptionItemNrNumberOfInstallments = installmentPaymentDataOptionItemNrNumberOfInstallments; - this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount = installmentPaymentDataOptionItemNrSubsequentInstallmentAmount; - this.InstallmentPaymentDataOptionItemNrTotalAmountDue = installmentPaymentDataOptionItemNrTotalAmountDue; - this.InstallmentPaymentDataPaymentOptions = installmentPaymentDataPaymentOptions; - this.InstallmentsValue = installmentsValue; - } - - /// - /// Type of installment. The value of `installmentType` should be **IssuerFinanced**. - /// - /// Type of installment. The value of `installmentType` should be **IssuerFinanced**. - [DataMember(Name = "installmentPaymentData.installmentType", EmitDefaultValue = false)] - public string InstallmentPaymentDataInstallmentType { get; set; } - - /// - /// Annual interest rate. - /// - /// Annual interest rate. - [DataMember(Name = "installmentPaymentData.option[itemNr].annualPercentageRate", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrAnnualPercentageRate { get; set; } - - /// - /// First Installment Amount in minor units. - /// - /// First Installment Amount in minor units. - [DataMember(Name = "installmentPaymentData.option[itemNr].firstInstallmentAmount", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrFirstInstallmentAmount { get; set; } - - /// - /// Installment fee amount in minor units. - /// - /// Installment fee amount in minor units. - [DataMember(Name = "installmentPaymentData.option[itemNr].installmentFee", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrInstallmentFee { get; set; } - - /// - /// Interest rate for the installment period. - /// - /// Interest rate for the installment period. - [DataMember(Name = "installmentPaymentData.option[itemNr].interestRate", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrInterestRate { get; set; } - - /// - /// Maximum number of installments possible for this payment. - /// - /// Maximum number of installments possible for this payment. - [DataMember(Name = "installmentPaymentData.option[itemNr].maximumNumberOfInstallments", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments { get; set; } - - /// - /// Minimum number of installments possible for this payment. - /// - /// Minimum number of installments possible for this payment. - [DataMember(Name = "installmentPaymentData.option[itemNr].minimumNumberOfInstallments", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments { get; set; } - - /// - /// Total number of installments possible for this payment. - /// - /// Total number of installments possible for this payment. - [DataMember(Name = "installmentPaymentData.option[itemNr].numberOfInstallments", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrNumberOfInstallments { get; set; } - - /// - /// Subsequent Installment Amount in minor units. - /// - /// Subsequent Installment Amount in minor units. - [DataMember(Name = "installmentPaymentData.option[itemNr].subsequentInstallmentAmount", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount { get; set; } - - /// - /// Total amount in minor units. - /// - /// Total amount in minor units. - [DataMember(Name = "installmentPaymentData.option[itemNr].totalAmountDue", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrTotalAmountDue { get; set; } - - /// - /// Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments - /// - /// Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments - [DataMember(Name = "installmentPaymentData.paymentOptions", EmitDefaultValue = false)] - public string InstallmentPaymentDataPaymentOptions { get; set; } - - /// - /// The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments. - /// - /// The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments. - [DataMember(Name = "installments.value", EmitDefaultValue = false)] - public string InstallmentsValue { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataInstallments {\n"); - sb.Append(" InstallmentPaymentDataInstallmentType: ").Append(InstallmentPaymentDataInstallmentType).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrAnnualPercentageRate: ").Append(InstallmentPaymentDataOptionItemNrAnnualPercentageRate).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrFirstInstallmentAmount: ").Append(InstallmentPaymentDataOptionItemNrFirstInstallmentAmount).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrInstallmentFee: ").Append(InstallmentPaymentDataOptionItemNrInstallmentFee).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrInterestRate: ").Append(InstallmentPaymentDataOptionItemNrInterestRate).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments: ").Append(InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments: ").Append(InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrNumberOfInstallments: ").Append(InstallmentPaymentDataOptionItemNrNumberOfInstallments).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount: ").Append(InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrTotalAmountDue: ").Append(InstallmentPaymentDataOptionItemNrTotalAmountDue).Append("\n"); - sb.Append(" InstallmentPaymentDataPaymentOptions: ").Append(InstallmentPaymentDataPaymentOptions).Append("\n"); - sb.Append(" InstallmentsValue: ").Append(InstallmentsValue).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataInstallments); - } - - /// - /// Returns true if ResponseAdditionalDataInstallments instances are equal - /// - /// Instance of ResponseAdditionalDataInstallments to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataInstallments input) - { - if (input == null) - { - return false; - } - return - ( - this.InstallmentPaymentDataInstallmentType == input.InstallmentPaymentDataInstallmentType || - (this.InstallmentPaymentDataInstallmentType != null && - this.InstallmentPaymentDataInstallmentType.Equals(input.InstallmentPaymentDataInstallmentType)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate == input.InstallmentPaymentDataOptionItemNrAnnualPercentageRate || - (this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate != null && - this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate.Equals(input.InstallmentPaymentDataOptionItemNrAnnualPercentageRate)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount == input.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount || - (this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount != null && - this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount.Equals(input.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrInstallmentFee == input.InstallmentPaymentDataOptionItemNrInstallmentFee || - (this.InstallmentPaymentDataOptionItemNrInstallmentFee != null && - this.InstallmentPaymentDataOptionItemNrInstallmentFee.Equals(input.InstallmentPaymentDataOptionItemNrInstallmentFee)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrInterestRate == input.InstallmentPaymentDataOptionItemNrInterestRate || - (this.InstallmentPaymentDataOptionItemNrInterestRate != null && - this.InstallmentPaymentDataOptionItemNrInterestRate.Equals(input.InstallmentPaymentDataOptionItemNrInterestRate)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments == input.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments || - (this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments != null && - this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments.Equals(input.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments == input.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments || - (this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments != null && - this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments.Equals(input.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrNumberOfInstallments == input.InstallmentPaymentDataOptionItemNrNumberOfInstallments || - (this.InstallmentPaymentDataOptionItemNrNumberOfInstallments != null && - this.InstallmentPaymentDataOptionItemNrNumberOfInstallments.Equals(input.InstallmentPaymentDataOptionItemNrNumberOfInstallments)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount == input.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount || - (this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount != null && - this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount.Equals(input.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrTotalAmountDue == input.InstallmentPaymentDataOptionItemNrTotalAmountDue || - (this.InstallmentPaymentDataOptionItemNrTotalAmountDue != null && - this.InstallmentPaymentDataOptionItemNrTotalAmountDue.Equals(input.InstallmentPaymentDataOptionItemNrTotalAmountDue)) - ) && - ( - this.InstallmentPaymentDataPaymentOptions == input.InstallmentPaymentDataPaymentOptions || - (this.InstallmentPaymentDataPaymentOptions != null && - this.InstallmentPaymentDataPaymentOptions.Equals(input.InstallmentPaymentDataPaymentOptions)) - ) && - ( - this.InstallmentsValue == input.InstallmentsValue || - (this.InstallmentsValue != null && - this.InstallmentsValue.Equals(input.InstallmentsValue)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InstallmentPaymentDataInstallmentType != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataInstallmentType.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrInstallmentFee != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrInstallmentFee.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrInterestRate != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrInterestRate.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrNumberOfInstallments != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrNumberOfInstallments.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrTotalAmountDue != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrTotalAmountDue.GetHashCode(); - } - if (this.InstallmentPaymentDataPaymentOptions != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataPaymentOptions.GetHashCode(); - } - if (this.InstallmentsValue != null) - { - hashCode = (hashCode * 59) + this.InstallmentsValue.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.cs b/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.cs deleted file mode 100644 index e97413b9f..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalDataNetworkTokens.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalDataNetworkTokens - /// - [DataContract(Name = "ResponseAdditionalDataNetworkTokens")] - public partial class ResponseAdditionalDataNetworkTokens : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether a network token is available for the specified card.. - /// The Bank Identification Number of a tokenized card, which is the first six digits of a card number.. - /// The last four digits of a network token.. - public ResponseAdditionalDataNetworkTokens(string networkTokenAvailable = default(string), string networkTokenBin = default(string), string networkTokenTokenSummary = default(string)) - { - this.NetworkTokenAvailable = networkTokenAvailable; - this.NetworkTokenBin = networkTokenBin; - this.NetworkTokenTokenSummary = networkTokenTokenSummary; - } - - /// - /// Indicates whether a network token is available for the specified card. - /// - /// Indicates whether a network token is available for the specified card. - [DataMember(Name = "networkToken.available", EmitDefaultValue = false)] - public string NetworkTokenAvailable { get; set; } - - /// - /// The Bank Identification Number of a tokenized card, which is the first six digits of a card number. - /// - /// The Bank Identification Number of a tokenized card, which is the first six digits of a card number. - [DataMember(Name = "networkToken.bin", EmitDefaultValue = false)] - public string NetworkTokenBin { get; set; } - - /// - /// The last four digits of a network token. - /// - /// The last four digits of a network token. - [DataMember(Name = "networkToken.tokenSummary", EmitDefaultValue = false)] - public string NetworkTokenTokenSummary { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataNetworkTokens {\n"); - sb.Append(" NetworkTokenAvailable: ").Append(NetworkTokenAvailable).Append("\n"); - sb.Append(" NetworkTokenBin: ").Append(NetworkTokenBin).Append("\n"); - sb.Append(" NetworkTokenTokenSummary: ").Append(NetworkTokenTokenSummary).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataNetworkTokens); - } - - /// - /// Returns true if ResponseAdditionalDataNetworkTokens instances are equal - /// - /// Instance of ResponseAdditionalDataNetworkTokens to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataNetworkTokens input) - { - if (input == null) - { - return false; - } - return - ( - this.NetworkTokenAvailable == input.NetworkTokenAvailable || - (this.NetworkTokenAvailable != null && - this.NetworkTokenAvailable.Equals(input.NetworkTokenAvailable)) - ) && - ( - this.NetworkTokenBin == input.NetworkTokenBin || - (this.NetworkTokenBin != null && - this.NetworkTokenBin.Equals(input.NetworkTokenBin)) - ) && - ( - this.NetworkTokenTokenSummary == input.NetworkTokenTokenSummary || - (this.NetworkTokenTokenSummary != null && - this.NetworkTokenTokenSummary.Equals(input.NetworkTokenTokenSummary)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NetworkTokenAvailable != null) - { - hashCode = (hashCode * 59) + this.NetworkTokenAvailable.GetHashCode(); - } - if (this.NetworkTokenBin != null) - { - hashCode = (hashCode * 59) + this.NetworkTokenBin.GetHashCode(); - } - if (this.NetworkTokenTokenSummary != null) - { - hashCode = (hashCode * 59) + this.NetworkTokenTokenSummary.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalDataOpi.cs b/Adyen/Model/Checkout/ResponseAdditionalDataOpi.cs deleted file mode 100644 index 9fd739dcf..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalDataOpi.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalDataOpi - /// - [DataContract(Name = "ResponseAdditionalDataOpi")] - public partial class ResponseAdditionalDataOpi : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce).. - public ResponseAdditionalDataOpi(string opiTransToken = default(string)) - { - this.OpiTransToken = opiTransToken; - } - - /// - /// Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). - /// - /// Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). - [DataMember(Name = "opi.transToken", EmitDefaultValue = false)] - public string OpiTransToken { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataOpi {\n"); - sb.Append(" OpiTransToken: ").Append(OpiTransToken).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataOpi); - } - - /// - /// Returns true if ResponseAdditionalDataOpi instances are equal - /// - /// Instance of ResponseAdditionalDataOpi to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataOpi input) - { - if (input == null) - { - return false; - } - return - ( - this.OpiTransToken == input.OpiTransToken || - (this.OpiTransToken != null && - this.OpiTransToken.Equals(input.OpiTransToken)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OpiTransToken != null) - { - hashCode = (hashCode * 59) + this.OpiTransToken.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponseAdditionalDataSepa.cs b/Adyen/Model/Checkout/ResponseAdditionalDataSepa.cs deleted file mode 100644 index 5144c6cef..000000000 --- a/Adyen/Model/Checkout/ResponseAdditionalDataSepa.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponseAdditionalDataSepa - /// - [DataContract(Name = "ResponseAdditionalDataSepa")] - public partial class ResponseAdditionalDataSepa : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The transaction signature date. Format: yyyy-MM-dd. - /// Its value corresponds to the pspReference value of the transaction.. - /// This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF. - public ResponseAdditionalDataSepa(string sepadirectdebitDateOfSignature = default(string), string sepadirectdebitMandateId = default(string), string sepadirectdebitSequenceType = default(string)) - { - this.SepadirectdebitDateOfSignature = sepadirectdebitDateOfSignature; - this.SepadirectdebitMandateId = sepadirectdebitMandateId; - this.SepadirectdebitSequenceType = sepadirectdebitSequenceType; - } - - /// - /// The transaction signature date. Format: yyyy-MM-dd - /// - /// The transaction signature date. Format: yyyy-MM-dd - [DataMember(Name = "sepadirectdebit.dateOfSignature", EmitDefaultValue = false)] - public string SepadirectdebitDateOfSignature { get; set; } - - /// - /// Its value corresponds to the pspReference value of the transaction. - /// - /// Its value corresponds to the pspReference value of the transaction. - [DataMember(Name = "sepadirectdebit.mandateId", EmitDefaultValue = false)] - public string SepadirectdebitMandateId { get; set; } - - /// - /// This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF - /// - /// This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF - [DataMember(Name = "sepadirectdebit.sequenceType", EmitDefaultValue = false)] - public string SepadirectdebitSequenceType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataSepa {\n"); - sb.Append(" SepadirectdebitDateOfSignature: ").Append(SepadirectdebitDateOfSignature).Append("\n"); - sb.Append(" SepadirectdebitMandateId: ").Append(SepadirectdebitMandateId).Append("\n"); - sb.Append(" SepadirectdebitSequenceType: ").Append(SepadirectdebitSequenceType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataSepa); - } - - /// - /// Returns true if ResponseAdditionalDataSepa instances are equal - /// - /// Instance of ResponseAdditionalDataSepa to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataSepa input) - { - if (input == null) - { - return false; - } - return - ( - this.SepadirectdebitDateOfSignature == input.SepadirectdebitDateOfSignature || - (this.SepadirectdebitDateOfSignature != null && - this.SepadirectdebitDateOfSignature.Equals(input.SepadirectdebitDateOfSignature)) - ) && - ( - this.SepadirectdebitMandateId == input.SepadirectdebitMandateId || - (this.SepadirectdebitMandateId != null && - this.SepadirectdebitMandateId.Equals(input.SepadirectdebitMandateId)) - ) && - ( - this.SepadirectdebitSequenceType == input.SepadirectdebitSequenceType || - (this.SepadirectdebitSequenceType != null && - this.SepadirectdebitSequenceType.Equals(input.SepadirectdebitSequenceType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SepadirectdebitDateOfSignature != null) - { - hashCode = (hashCode * 59) + this.SepadirectdebitDateOfSignature.GetHashCode(); - } - if (this.SepadirectdebitMandateId != null) - { - hashCode = (hashCode * 59) + this.SepadirectdebitMandateId.GetHashCode(); - } - if (this.SepadirectdebitSequenceType != null) - { - hashCode = (hashCode * 59) + this.SepadirectdebitSequenceType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ResponsePaymentMethod.cs b/Adyen/Model/Checkout/ResponsePaymentMethod.cs deleted file mode 100644 index 075e3ae29..000000000 --- a/Adyen/Model/Checkout/ResponsePaymentMethod.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ResponsePaymentMethod - /// - [DataContract(Name = "ResponsePaymentMethod")] - public partial class ResponsePaymentMethod : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The card brand that the shopper used to pay. Only returned if `paymentMethod.type` is **scheme**.. - /// The `paymentMethod.type` value used in the request.. - public ResponsePaymentMethod(string brand = default(string), string type = default(string)) - { - this.Brand = brand; - this.Type = type; - } - - /// - /// The card brand that the shopper used to pay. Only returned if `paymentMethod.type` is **scheme**. - /// - /// The card brand that the shopper used to pay. Only returned if `paymentMethod.type` is **scheme**. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The `paymentMethod.type` value used in the request. - /// - /// The `paymentMethod.type` value used in the request. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponsePaymentMethod {\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponsePaymentMethod); - } - - /// - /// Returns true if ResponsePaymentMethod instances are equal - /// - /// Instance of ResponsePaymentMethod to be compared - /// Boolean - public bool Equals(ResponsePaymentMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/RiskData.cs b/Adyen/Model/Checkout/RiskData.cs deleted file mode 100644 index d24cacd18..000000000 --- a/Adyen/Model/Checkout/RiskData.cs +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// RiskData - /// - [DataContract(Name = "RiskData")] - public partial class RiskData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains client-side data, like the device fingerprint, cookies, and specific browser settings.. - /// Any custom fields used as part of the input to configured risk rules.. - /// An integer value that is added to the normal fraud score. The value can be either positive or negative.. - /// The risk profile to assign to this payment. When left empty, the merchant-level account's default risk profile will be applied.. - public RiskData(string clientData = default(string), Dictionary customFields = default(Dictionary), int? fraudOffset = default(int?), string profileReference = default(string)) - { - this.ClientData = clientData; - this.CustomFields = customFields; - this.FraudOffset = fraudOffset; - this.ProfileReference = profileReference; - } - - /// - /// Contains client-side data, like the device fingerprint, cookies, and specific browser settings. - /// - /// Contains client-side data, like the device fingerprint, cookies, and specific browser settings. - [DataMember(Name = "clientData", EmitDefaultValue = false)] - public string ClientData { get; set; } - - /// - /// Any custom fields used as part of the input to configured risk rules. - /// - /// Any custom fields used as part of the input to configured risk rules. - [DataMember(Name = "customFields", EmitDefaultValue = false)] - public Dictionary CustomFields { get; set; } - - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - [DataMember(Name = "fraudOffset", EmitDefaultValue = false)] - public int? FraudOffset { get; set; } - - /// - /// The risk profile to assign to this payment. When left empty, the merchant-level account's default risk profile will be applied. - /// - /// The risk profile to assign to this payment. When left empty, the merchant-level account's default risk profile will be applied. - [DataMember(Name = "profileReference", EmitDefaultValue = false)] - public string ProfileReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RiskData {\n"); - sb.Append(" ClientData: ").Append(ClientData).Append("\n"); - sb.Append(" CustomFields: ").Append(CustomFields).Append("\n"); - sb.Append(" FraudOffset: ").Append(FraudOffset).Append("\n"); - sb.Append(" ProfileReference: ").Append(ProfileReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RiskData); - } - - /// - /// Returns true if RiskData instances are equal - /// - /// Instance of RiskData to be compared - /// Boolean - public bool Equals(RiskData input) - { - if (input == null) - { - return false; - } - return - ( - this.ClientData == input.ClientData || - (this.ClientData != null && - this.ClientData.Equals(input.ClientData)) - ) && - ( - this.CustomFields == input.CustomFields || - this.CustomFields != null && - input.CustomFields != null && - this.CustomFields.SequenceEqual(input.CustomFields) - ) && - ( - this.FraudOffset == input.FraudOffset || - this.FraudOffset.Equals(input.FraudOffset) - ) && - ( - this.ProfileReference == input.ProfileReference || - (this.ProfileReference != null && - this.ProfileReference.Equals(input.ProfileReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClientData != null) - { - hashCode = (hashCode * 59) + this.ClientData.GetHashCode(); - } - if (this.CustomFields != null) - { - hashCode = (hashCode * 59) + this.CustomFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FraudOffset.GetHashCode(); - if (this.ProfileReference != null) - { - hashCode = (hashCode * 59) + this.ProfileReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ClientData (string) maxLength - if (this.ClientData != null && this.ClientData.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClientData, length must be less than 5000.", new [] { "ClientData" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/RivertyDetails.cs b/Adyen/Model/Checkout/RivertyDetails.cs deleted file mode 100644 index 7b43f55cf..000000000 --- a/Adyen/Model/Checkout/RivertyDetails.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// RivertyDetails - /// - [DataContract(Name = "RivertyDetails")] - public partial class RivertyDetails : IEquatable, IValidatableObject - { - /// - /// **riverty** - /// - /// **riverty** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Riverty for value: riverty - /// - [EnumMember(Value = "riverty")] - Riverty = 1, - - /// - /// Enum RivertyAccount for value: riverty_account - /// - [EnumMember(Value = "riverty_account")] - RivertyAccount = 2, - - /// - /// Enum SepadirectdebitRiverty for value: sepadirectdebit_riverty - /// - [EnumMember(Value = "sepadirectdebit_riverty")] - SepadirectdebitRiverty = 3 - - } - - - /// - /// **riverty** - /// - /// **riverty** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RivertyDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The address where to send the invoice.. - /// The checkout attempt identifier.. - /// The address where the goods should be delivered.. - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting).. - /// The iban number of the customer . - /// Shopper name, date of birth, phone number, and email address.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The payment method subtype.. - /// **riverty** (required) (default to TypeEnum.Riverty). - public RivertyDetails(string billingAddress = default(string), string checkoutAttemptId = default(string), string deliveryAddress = default(string), string deviceFingerprint = default(string), string iban = default(string), string personalDetails = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string subtype = default(string), TypeEnum type = TypeEnum.Riverty) - { - this.Type = type; - this.BillingAddress = billingAddress; - this.CheckoutAttemptId = checkoutAttemptId; - this.DeliveryAddress = deliveryAddress; - this.DeviceFingerprint = deviceFingerprint; - this.Iban = iban; - this.PersonalDetails = personalDetails; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Subtype = subtype; - } - - /// - /// The address where to send the invoice. - /// - /// The address where to send the invoice. - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public string BillingAddress { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The address where the goods should be delivered. - /// - /// The address where the goods should be delivered. - [DataMember(Name = "deliveryAddress", EmitDefaultValue = false)] - public string DeliveryAddress { get; set; } - - /// - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - /// - /// A string containing the shopper's device fingerprint. For more information, refer to [Device fingerprinting](https://docs.adyen.com/risk-management/device-fingerprinting). - [DataMember(Name = "deviceFingerprint", EmitDefaultValue = false)] - public string DeviceFingerprint { get; set; } - - /// - /// The iban number of the customer - /// - /// The iban number of the customer - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// Shopper name, date of birth, phone number, and email address. - /// - /// Shopper name, date of birth, phone number, and email address. - [DataMember(Name = "personalDetails", EmitDefaultValue = false)] - public string PersonalDetails { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The payment method subtype. - /// - /// The payment method subtype. - [DataMember(Name = "subtype", EmitDefaultValue = false)] - public string Subtype { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RivertyDetails {\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" DeliveryAddress: ").Append(DeliveryAddress).Append("\n"); - sb.Append(" DeviceFingerprint: ").Append(DeviceFingerprint).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" PersonalDetails: ").Append(PersonalDetails).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Subtype: ").Append(Subtype).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RivertyDetails); - } - - /// - /// Returns true if RivertyDetails instances are equal - /// - /// Instance of RivertyDetails to be compared - /// Boolean - public bool Equals(RivertyDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.DeliveryAddress == input.DeliveryAddress || - (this.DeliveryAddress != null && - this.DeliveryAddress.Equals(input.DeliveryAddress)) - ) && - ( - this.DeviceFingerprint == input.DeviceFingerprint || - (this.DeviceFingerprint != null && - this.DeviceFingerprint.Equals(input.DeviceFingerprint)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.PersonalDetails == input.PersonalDetails || - (this.PersonalDetails != null && - this.PersonalDetails.Equals(input.PersonalDetails)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Subtype == input.Subtype || - (this.Subtype != null && - this.Subtype.Equals(input.Subtype)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.DeliveryAddress != null) - { - hashCode = (hashCode * 59) + this.DeliveryAddress.GetHashCode(); - } - if (this.DeviceFingerprint != null) - { - hashCode = (hashCode * 59) + this.DeviceFingerprint.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.PersonalDetails != null) - { - hashCode = (hashCode * 59) + this.PersonalDetails.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.Subtype != null) - { - hashCode = (hashCode * 59) + this.Subtype.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // DeviceFingerprint (string) maxLength - if (this.DeviceFingerprint != null && this.DeviceFingerprint.Length > 5000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DeviceFingerprint, length must be less than 5000.", new [] { "DeviceFingerprint" }); - } - - // Iban (string) maxLength - if (this.Iban != null && this.Iban.Length > 34) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Iban, length must be less than 34.", new [] { "Iban" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/SDKEphemPubKey.cs b/Adyen/Model/Checkout/SDKEphemPubKey.cs deleted file mode 100644 index b8e7c7c98..000000000 --- a/Adyen/Model/Checkout/SDKEphemPubKey.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// SDKEphemPubKey - /// - [DataContract(Name = "SDKEphemPubKey")] - public partial class SDKEphemPubKey : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The `crv` value as received from the 3D Secure 2 SDK.. - /// The `kty` value as received from the 3D Secure 2 SDK.. - /// The `x` value as received from the 3D Secure 2 SDK.. - /// The `y` value as received from the 3D Secure 2 SDK.. - public SDKEphemPubKey(string crv = default(string), string kty = default(string), string x = default(string), string y = default(string)) - { - this.Crv = crv; - this.Kty = kty; - this.X = x; - this.Y = y; - } - - /// - /// The `crv` value as received from the 3D Secure 2 SDK. - /// - /// The `crv` value as received from the 3D Secure 2 SDK. - [DataMember(Name = "crv", EmitDefaultValue = false)] - public string Crv { get; set; } - - /// - /// The `kty` value as received from the 3D Secure 2 SDK. - /// - /// The `kty` value as received from the 3D Secure 2 SDK. - [DataMember(Name = "kty", EmitDefaultValue = false)] - public string Kty { get; set; } - - /// - /// The `x` value as received from the 3D Secure 2 SDK. - /// - /// The `x` value as received from the 3D Secure 2 SDK. - [DataMember(Name = "x", EmitDefaultValue = false)] - public string X { get; set; } - - /// - /// The `y` value as received from the 3D Secure 2 SDK. - /// - /// The `y` value as received from the 3D Secure 2 SDK. - [DataMember(Name = "y", EmitDefaultValue = false)] - public string Y { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SDKEphemPubKey {\n"); - sb.Append(" Crv: ").Append(Crv).Append("\n"); - sb.Append(" Kty: ").Append(Kty).Append("\n"); - sb.Append(" X: ").Append(X).Append("\n"); - sb.Append(" Y: ").Append(Y).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SDKEphemPubKey); - } - - /// - /// Returns true if SDKEphemPubKey instances are equal - /// - /// Instance of SDKEphemPubKey to be compared - /// Boolean - public bool Equals(SDKEphemPubKey input) - { - if (input == null) - { - return false; - } - return - ( - this.Crv == input.Crv || - (this.Crv != null && - this.Crv.Equals(input.Crv)) - ) && - ( - this.Kty == input.Kty || - (this.Kty != null && - this.Kty.Equals(input.Kty)) - ) && - ( - this.X == input.X || - (this.X != null && - this.X.Equals(input.X)) - ) && - ( - this.Y == input.Y || - (this.Y != null && - this.Y.Equals(input.Y)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Crv != null) - { - hashCode = (hashCode * 59) + this.Crv.GetHashCode(); - } - if (this.Kty != null) - { - hashCode = (hashCode * 59) + this.Kty.GetHashCode(); - } - if (this.X != null) - { - hashCode = (hashCode * 59) + this.X.GetHashCode(); - } - if (this.Y != null) - { - hashCode = (hashCode * 59) + this.Y.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/SamsungPayDetails.cs b/Adyen/Model/Checkout/SamsungPayDetails.cs deleted file mode 100644 index 06b92a3df..000000000 --- a/Adyen/Model/Checkout/SamsungPayDetails.cs +++ /dev/null @@ -1,270 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// SamsungPayDetails - /// - [DataContract(Name = "SamsungPayDetails")] - public partial class SamsungPayDetails : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **samsungpay** - /// - /// **samsungpay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Samsungpay for value: samsungpay - /// - [EnumMember(Value = "samsungpay")] - Samsungpay = 1 - - } - - - /// - /// **samsungpay** - /// - /// **samsungpay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SamsungPayDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The payload you received from the Samsung Pay SDK response. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **samsungpay** (default to TypeEnum.Samsungpay). - public SamsungPayDetails(string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string recurringDetailReference = default(string), string samsungPayToken = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Samsungpay) - { - this.SamsungPayToken = samsungPayToken; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// The payload you received from the Samsung Pay SDK response. - /// - /// The payload you received from the Samsung Pay SDK response. - [DataMember(Name = "samsungPayToken", IsRequired = false, EmitDefaultValue = false)] - public string SamsungPayToken { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SamsungPayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" SamsungPayToken: ").Append(SamsungPayToken).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SamsungPayDetails); - } - - /// - /// Returns true if SamsungPayDetails instances are equal - /// - /// Instance of SamsungPayDetails to be compared - /// Boolean - public bool Equals(SamsungPayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.SamsungPayToken == input.SamsungPayToken || - (this.SamsungPayToken != null && - this.SamsungPayToken.Equals(input.SamsungPayToken)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.SamsungPayToken != null) - { - hashCode = (hashCode * 59) + this.SamsungPayToken.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // SamsungPayToken (string) maxLength - if (this.SamsungPayToken != null && this.SamsungPayToken.Length > 10000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SamsungPayToken, length must be less than 10000.", new [] { "SamsungPayToken" }); - } - - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/SepaDirectDebitDetails.cs b/Adyen/Model/Checkout/SepaDirectDebitDetails.cs deleted file mode 100644 index ccb9c3096..000000000 --- a/Adyen/Model/Checkout/SepaDirectDebitDetails.cs +++ /dev/null @@ -1,272 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// SepaDirectDebitDetails - /// - [DataContract(Name = "SepaDirectDebitDetails")] - public partial class SepaDirectDebitDetails : IEquatable, IValidatableObject - { - /// - /// **sepadirectdebit** - /// - /// **sepadirectdebit** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Sepadirectdebit for value: sepadirectdebit - /// - [EnumMember(Value = "sepadirectdebit")] - Sepadirectdebit = 1, - - /// - /// Enum SepadirectdebitAmazonpay for value: sepadirectdebit_amazonpay - /// - [EnumMember(Value = "sepadirectdebit_amazonpay")] - SepadirectdebitAmazonpay = 2 - - } - - - /// - /// **sepadirectdebit** - /// - /// **sepadirectdebit** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SepaDirectDebitDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The International Bank Account Number (IBAN). (required). - /// The name of the bank account holder. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts.. - /// **sepadirectdebit** (default to TypeEnum.Sepadirectdebit). - public SepaDirectDebitDetails(string checkoutAttemptId = default(string), string iban = default(string), string ownerName = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string transferInstrumentId = default(string), TypeEnum? type = TypeEnum.Sepadirectdebit) - { - this.Iban = iban; - this.OwnerName = ownerName; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.TransferInstrumentId = transferInstrumentId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The International Bank Account Number (IBAN). - /// - /// The International Bank Account Number (IBAN). - [DataMember(Name = "iban", IsRequired = false, EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The name of the bank account holder. - /// - /// The name of the bank account holder. - [DataMember(Name = "ownerName", IsRequired = false, EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts. - /// - /// The unique identifier of your user's verified transfer instrument, which you can use to top up their balance accounts. - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SepaDirectDebitDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SepaDirectDebitDetails); - } - - /// - /// Returns true if SepaDirectDebitDetails instances are equal - /// - /// Instance of SepaDirectDebitDetails to be compared - /// Boolean - public bool Equals(SepaDirectDebitDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ServiceError.cs b/Adyen/Model/Checkout/ServiceError.cs deleted file mode 100644 index 5878afc9f..000000000 --- a/Adyen/Model/Checkout/ServiceError.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.. - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(Dictionary additionalData = default(Dictionary), string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.AdditionalData = additionalData; - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/SessionResultResponse.cs b/Adyen/Model/Checkout/SessionResultResponse.cs deleted file mode 100644 index 60a5fe465..000000000 --- a/Adyen/Model/Checkout/SessionResultResponse.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// SessionResultResponse - /// - [DataContract(Name = "SessionResultResponse")] - public partial class SessionResultResponse : IEquatable, IValidatableObject - { - /// - /// The status of the session. The status included in the response doesn't get updated. Don't make the request again to check for payment status updates. Possible values: * **completed**: the shopper completed the payment, and the payment was authorized. * **paymentPending**: the shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow, like voucher payments where the shopper completes the payment in a physical shop. * **refused**: the session has been refused, because of too many refused payment attempts. The shopper can no longer complete the payment with this session. * **canceled**: the shopper canceled the payment. * **expired**: the session expired. The shopper can no longer complete the payment with this session. By default, the session expires one hour after it is created. - /// - /// The status of the session. The status included in the response doesn't get updated. Don't make the request again to check for payment status updates. Possible values: * **completed**: the shopper completed the payment, and the payment was authorized. * **paymentPending**: the shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow, like voucher payments where the shopper completes the payment in a physical shop. * **refused**: the session has been refused, because of too many refused payment attempts. The shopper can no longer complete the payment with this session. * **canceled**: the shopper canceled the payment. * **expired**: the session expired. The shopper can no longer complete the payment with this session. By default, the session expires one hour after it is created. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Canceled for value: canceled - /// - [EnumMember(Value = "canceled")] - Canceled = 2, - - /// - /// Enum Completed for value: completed - /// - [EnumMember(Value = "completed")] - Completed = 3, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 4, - - /// - /// Enum PaymentPending for value: paymentPending - /// - [EnumMember(Value = "paymentPending")] - PaymentPending = 5, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 6 - - } - - - /// - /// The status of the session. The status included in the response doesn't get updated. Don't make the request again to check for payment status updates. Possible values: * **completed**: the shopper completed the payment, and the payment was authorized. * **paymentPending**: the shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow, like voucher payments where the shopper completes the payment in a physical shop. * **refused**: the session has been refused, because of too many refused payment attempts. The shopper can no longer complete the payment with this session. * **canceled**: the shopper canceled the payment. * **expired**: the session expired. The shopper can no longer complete the payment with this session. By default, the session expires one hour after it is created. - /// - /// The status of the session. The status included in the response doesn't get updated. Don't make the request again to check for payment status updates. Possible values: * **completed**: the shopper completed the payment, and the payment was authorized. * **paymentPending**: the shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow, like voucher payments where the shopper completes the payment in a physical shop. * **refused**: the session has been refused, because of too many refused payment attempts. The shopper can no longer complete the payment with this session. * **canceled**: the shopper canceled the payment. * **expired**: the session expired. The shopper can no longer complete the payment with this session. By default, the session expires one hour after it is created. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some fields are included only if you enable them. To enable these fields in your Customer Area, go to **Developers** > **Additional data**.. - /// A unique identifier of the session.. - /// A list of all authorised payments done for this session.. - /// The unique reference that you provided in the original `/sessions` request. This identifies the payment and is used in all communication with you about the payment status.. - /// The status of the session. The status included in the response doesn't get updated. Don't make the request again to check for payment status updates. Possible values: * **completed**: the shopper completed the payment, and the payment was authorized. * **paymentPending**: the shopper is in the process of making the payment. This applies to payment methods with an asynchronous flow, like voucher payments where the shopper completes the payment in a physical shop. * **refused**: the session has been refused, because of too many refused payment attempts. The shopper can no longer complete the payment with this session. * **canceled**: the shopper canceled the payment. * **expired**: the session expired. The shopper can no longer complete the payment with this session. By default, the session expires one hour after it is created.. - public SessionResultResponse(Dictionary additionalData = default(Dictionary), string id = default(string), List payments = default(List), string reference = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.AdditionalData = additionalData; - this.Id = id; - this.Payments = payments; - this.Reference = reference; - this.Status = status; - } - - /// - /// Contains additional information about the payment. Some fields are included only if you enable them. To enable these fields in your Customer Area, go to **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some fields are included only if you enable them. To enable these fields in your Customer Area, go to **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// A unique identifier of the session. - /// - /// A unique identifier of the session. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// A list of all authorised payments done for this session. - /// - /// A list of all authorised payments done for this session. - [DataMember(Name = "payments", EmitDefaultValue = false)] - public List Payments { get; set; } - - /// - /// The unique reference that you provided in the original `/sessions` request. This identifies the payment and is used in all communication with you about the payment status. - /// - /// The unique reference that you provided in the original `/sessions` request. This identifies the payment and is used in all communication with you about the payment status. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SessionResultResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Payments: ").Append(Payments).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SessionResultResponse); - } - - /// - /// Returns true if SessionResultResponse instances are equal - /// - /// Instance of SessionResultResponse to be compared - /// Boolean - public bool Equals(SessionResultResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Payments == input.Payments || - this.Payments != null && - input.Payments != null && - this.Payments.SequenceEqual(input.Payments) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Payments != null) - { - hashCode = (hashCode * 59) + this.Payments.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ShopperInteractionDevice.cs b/Adyen/Model/Checkout/ShopperInteractionDevice.cs deleted file mode 100644 index 7a43e370e..000000000 --- a/Adyen/Model/Checkout/ShopperInteractionDevice.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ShopperInteractionDevice - /// - [DataContract(Name = "ShopperInteractionDevice")] - public partial class ShopperInteractionDevice : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Locale on the shopper interaction device.. - /// Operating system running on the shopper interaction device.. - /// Version of the operating system on the shopper interaction device.. - public ShopperInteractionDevice(string locale = default(string), string os = default(string), string osVersion = default(string)) - { - this.Locale = locale; - this.Os = os; - this.OsVersion = osVersion; - } - - /// - /// Locale on the shopper interaction device. - /// - /// Locale on the shopper interaction device. - [DataMember(Name = "locale", EmitDefaultValue = false)] - public string Locale { get; set; } - - /// - /// Operating system running on the shopper interaction device. - /// - /// Operating system running on the shopper interaction device. - [DataMember(Name = "os", EmitDefaultValue = false)] - public string Os { get; set; } - - /// - /// Version of the operating system on the shopper interaction device. - /// - /// Version of the operating system on the shopper interaction device. - [DataMember(Name = "osVersion", EmitDefaultValue = false)] - public string OsVersion { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ShopperInteractionDevice {\n"); - sb.Append(" Locale: ").Append(Locale).Append("\n"); - sb.Append(" Os: ").Append(Os).Append("\n"); - sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ShopperInteractionDevice); - } - - /// - /// Returns true if ShopperInteractionDevice instances are equal - /// - /// Instance of ShopperInteractionDevice to be compared - /// Boolean - public bool Equals(ShopperInteractionDevice input) - { - if (input == null) - { - return false; - } - return - ( - this.Locale == input.Locale || - (this.Locale != null && - this.Locale.Equals(input.Locale)) - ) && - ( - this.Os == input.Os || - (this.Os != null && - this.Os.Equals(input.Os)) - ) && - ( - this.OsVersion == input.OsVersion || - (this.OsVersion != null && - this.OsVersion.Equals(input.OsVersion)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Locale != null) - { - hashCode = (hashCode * 59) + this.Locale.GetHashCode(); - } - if (this.Os != null) - { - hashCode = (hashCode * 59) + this.Os.GetHashCode(); - } - if (this.OsVersion != null) - { - hashCode = (hashCode * 59) + this.OsVersion.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Split.cs b/Adyen/Model/Checkout/Split.cs deleted file mode 100644 index 77a2a02b3..000000000 --- a/Adyen/Model/Checkout/Split.cs +++ /dev/null @@ -1,310 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Split - /// - [DataContract(Name = "Split")] - public partial class Split : IEquatable, IValidatableObject - { - /// - /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. - /// - /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AcquiringFees for value: AcquiringFees - /// - [EnumMember(Value = "AcquiringFees")] - AcquiringFees = 1, - - /// - /// Enum AdyenCommission for value: AdyenCommission - /// - [EnumMember(Value = "AdyenCommission")] - AdyenCommission = 2, - - /// - /// Enum AdyenFees for value: AdyenFees - /// - [EnumMember(Value = "AdyenFees")] - AdyenFees = 3, - - /// - /// Enum AdyenMarkup for value: AdyenMarkup - /// - [EnumMember(Value = "AdyenMarkup")] - AdyenMarkup = 4, - - /// - /// Enum BalanceAccount for value: BalanceAccount - /// - [EnumMember(Value = "BalanceAccount")] - BalanceAccount = 5, - - /// - /// Enum Commission for value: Commission - /// - [EnumMember(Value = "Commission")] - Commission = 6, - - /// - /// Enum Default for value: Default - /// - [EnumMember(Value = "Default")] - Default = 7, - - /// - /// Enum Interchange for value: Interchange - /// - [EnumMember(Value = "Interchange")] - Interchange = 8, - - /// - /// Enum MarketPlace for value: MarketPlace - /// - [EnumMember(Value = "MarketPlace")] - MarketPlace = 9, - - /// - /// Enum PaymentFee for value: PaymentFee - /// - [EnumMember(Value = "PaymentFee")] - PaymentFee = 10, - - /// - /// Enum Remainder for value: Remainder - /// - [EnumMember(Value = "Remainder")] - Remainder = 11, - - /// - /// Enum SchemeFee for value: SchemeFee - /// - [EnumMember(Value = "SchemeFee")] - SchemeFee = 12, - - /// - /// Enum Surcharge for value: Surcharge - /// - [EnumMember(Value = "Surcharge")] - Surcharge = 13, - - /// - /// Enum Tip for value: Tip - /// - [EnumMember(Value = "Tip")] - Tip = 14, - - /// - /// Enum TopUp for value: TopUp - /// - [EnumMember(Value = "TopUp")] - TopUp = 15, - - /// - /// Enum VAT for value: VAT - /// - [EnumMember(Value = "VAT")] - VAT = 16 - - } - - - /// - /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. - /// - /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Split() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/classic-platforms): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked.. - /// amount. - /// Your description for the split item.. - /// Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports.. - /// The part of the payment you want to book to the specified `account`. Possible values for the [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): * **BalanceAccount**: books part of the payment (specified in `amount`) to the specified `account`. * Transaction fees types that you can book to the specified `account`: * **AcquiringFees**: the aggregated amount of the interchange and scheme fees. * **PaymentFee**: the aggregated amount of all transaction fees. * **AdyenFees**: the aggregated amount of Adyen's commission and markup fees. * **AdyenCommission**: the transaction fees due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **AdyenMarkup**: the transaction fees due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained). * **Interchange**: the fees paid to the issuer for each payment made with the card network. * **SchemeFee**: the fees paid to the card scheme for using their network. * **Commission**: your platform's commission on the payment (specified in `amount`), booked to your liable balance account. * **Remainder**: the amount left over after a currency conversion, booked to the specified `account`. * **TopUp**: allows you and your users to top up balance accounts using direct debit, card payments, or other payment methods. * **VAT**: the value-added tax charged on the payment, booked to your platforms liable balance account. * **Commission**: your platform's commission (specified in `amount`) on the payment, booked to your liable balance account. * **Default**: in very specific use cases, allows you to book the specified `amount` to the specified `account`. For more information, contact Adyen support. Possible values for the [Classic Platforms integration](https://docs.adyen.com/classic-platforms): **Commission**, **Default**, **MarketPlace**, **PaymentFee**, **VAT**. (required). - public Split(string account = default(string), SplitAmount amount = default(SplitAmount), string description = default(string), string reference = default(string), TypeEnum type = default(TypeEnum)) - { - this.Type = type; - this.Account = account; - this.Amount = amount; - this.Description = description; - this.Reference = reference; - } - - /// - /// The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/classic-platforms): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked. - /// - /// The unique identifier of the account to which the split amount is booked. Required if `type` is **MarketPlace** or **BalanceAccount**. * [Classic Platforms integration](https://docs.adyen.com/classic-platforms): The [`accountCode`](https://docs.adyen.com/api-explorer/Account/latest/post/updateAccount#request-accountCode) of the account to which the split amount is booked. * [Balance Platform](https://docs.adyen.com/adyen-for-platforms-model): The [`balanceAccountId`](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/balanceAccounts/_id_#path-id) of the account to which the split amount is booked. - [DataMember(Name = "account", EmitDefaultValue = false)] - public string Account { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public SplitAmount Amount { get; set; } - - /// - /// Your description for the split item. - /// - /// Your description for the split item. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. - /// - /// Your unique reference for the part of the payment booked to the specified `account`. This is required if `type` is **MarketPlace** ([Classic Platforms integration](https://docs.adyen.com/classic-platforms)) or **BalanceAccount** ([Balance Platform](https://docs.adyen.com/adyen-for-platforms-model)). For the other types, we also recommend providing a **unique** reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Split {\n"); - sb.Append(" Account: ").Append(Account).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Split); - } - - /// - /// Returns true if Split instances are equal - /// - /// Instance of Split to be compared - /// Boolean - public bool Equals(Split input) - { - if (input == null) - { - return false; - } - return - ( - this.Account == input.Account || - (this.Account != null && - this.Account.Equals(input.Account)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Account != null) - { - hashCode = (hashCode * 59) + this.Account.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/SplitAmount.cs b/Adyen/Model/Checkout/SplitAmount.cs deleted file mode 100644 index 667576485..000000000 --- a/Adyen/Model/Checkout/SplitAmount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// SplitAmount - /// - [DataContract(Name = "SplitAmount")] - public partial class SplitAmount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SplitAmount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). By default, this is the original payment currency.. - /// The value of the split amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). (required). - public SplitAmount(string currency = default(string), long? value = default(long?)) - { - this.Value = value; - this.Currency = currency; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). By default, this is the original payment currency. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). By default, this is the original payment currency. - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The value of the split amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The value of the split amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SplitAmount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SplitAmount); - } - - /// - /// Returns true if SplitAmount instances are equal - /// - /// Instance of SplitAmount to be compared - /// Boolean - public bool Equals(SplitAmount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/StandalonePaymentCancelRequest.cs b/Adyen/Model/Checkout/StandalonePaymentCancelRequest.cs deleted file mode 100644 index 0f75335d7..000000000 --- a/Adyen/Model/Checkout/StandalonePaymentCancelRequest.cs +++ /dev/null @@ -1,208 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// StandalonePaymentCancelRequest - /// - [DataContract(Name = "StandalonePaymentCancelRequest")] - public partial class StandalonePaymentCancelRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StandalonePaymentCancelRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// applicationInfo. - /// enhancedSchemeData. - /// The merchant account that is used to process the payment. (required). - /// The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment that you want to cancel. (required). - /// Your reference for the cancel request. Maximum length: 80 characters.. - public StandalonePaymentCancelRequest(ApplicationInfo applicationInfo = default(ApplicationInfo), EnhancedSchemeData enhancedSchemeData = default(EnhancedSchemeData), string merchantAccount = default(string), string paymentReference = default(string), string reference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.PaymentReference = paymentReference; - this.ApplicationInfo = applicationInfo; - this.EnhancedSchemeData = enhancedSchemeData; - this.Reference = reference; - } - - /// - /// Gets or Sets ApplicationInfo - /// - [DataMember(Name = "applicationInfo", EmitDefaultValue = false)] - public ApplicationInfo ApplicationInfo { get; set; } - - /// - /// Gets or Sets EnhancedSchemeData - /// - [DataMember(Name = "enhancedSchemeData", EmitDefaultValue = false)] - public EnhancedSchemeData EnhancedSchemeData { get; set; } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment that you want to cancel. - /// - /// The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment that you want to cancel. - [DataMember(Name = "paymentReference", IsRequired = false, EmitDefaultValue = false)] - public string PaymentReference { get; set; } - - /// - /// Your reference for the cancel request. Maximum length: 80 characters. - /// - /// Your reference for the cancel request. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StandalonePaymentCancelRequest {\n"); - sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); - sb.Append(" EnhancedSchemeData: ").Append(EnhancedSchemeData).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentReference: ").Append(PaymentReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StandalonePaymentCancelRequest); - } - - /// - /// Returns true if StandalonePaymentCancelRequest instances are equal - /// - /// Instance of StandalonePaymentCancelRequest to be compared - /// Boolean - public bool Equals(StandalonePaymentCancelRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ApplicationInfo == input.ApplicationInfo || - (this.ApplicationInfo != null && - this.ApplicationInfo.Equals(input.ApplicationInfo)) - ) && - ( - this.EnhancedSchemeData == input.EnhancedSchemeData || - (this.EnhancedSchemeData != null && - this.EnhancedSchemeData.Equals(input.EnhancedSchemeData)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentReference == input.PaymentReference || - (this.PaymentReference != null && - this.PaymentReference.Equals(input.PaymentReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApplicationInfo != null) - { - hashCode = (hashCode * 59) + this.ApplicationInfo.GetHashCode(); - } - if (this.EnhancedSchemeData != null) - { - hashCode = (hashCode * 59) + this.EnhancedSchemeData.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentReference != null) - { - hashCode = (hashCode * 59) + this.PaymentReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/StandalonePaymentCancelResponse.cs b/Adyen/Model/Checkout/StandalonePaymentCancelResponse.cs deleted file mode 100644 index bc43a844c..000000000 --- a/Adyen/Model/Checkout/StandalonePaymentCancelResponse.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// StandalonePaymentCancelResponse - /// - [DataContract(Name = "StandalonePaymentCancelResponse")] - public partial class StandalonePaymentCancelResponse : IEquatable, IValidatableObject - { - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 1 - - } - - - /// - /// The status of your request. This will always have the value **received**. - /// - /// The status of your request. This will always have the value **received**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StandalonePaymentCancelResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account that is used to process the payment. (required). - /// The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment to cancel. (required). - /// Adyen's 16-character reference associated with the cancel request. (required). - /// Your reference for the cancel request.. - /// The status of your request. This will always have the value **received**. (required). - public StandalonePaymentCancelResponse(string merchantAccount = default(string), string paymentReference = default(string), string pspReference = default(string), string reference = default(string), StatusEnum status = default(StatusEnum)) - { - this.MerchantAccount = merchantAccount; - this.PaymentReference = paymentReference; - this.PspReference = pspReference; - this.Status = status; - this.Reference = reference; - } - - /// - /// The merchant account that is used to process the payment. - /// - /// The merchant account that is used to process the payment. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment to cancel. - /// - /// The [`reference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_reference) of the payment to cancel. - [DataMember(Name = "paymentReference", IsRequired = false, EmitDefaultValue = false)] - public string PaymentReference { get; set; } - - /// - /// Adyen's 16-character reference associated with the cancel request. - /// - /// Adyen's 16-character reference associated with the cancel request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Your reference for the cancel request. - /// - /// Your reference for the cancel request. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StandalonePaymentCancelResponse {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentReference: ").Append(PaymentReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StandalonePaymentCancelResponse); - } - - /// - /// Returns true if StandalonePaymentCancelResponse instances are equal - /// - /// Instance of StandalonePaymentCancelResponse to be compared - /// Boolean - public bool Equals(StandalonePaymentCancelResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentReference == input.PaymentReference || - (this.PaymentReference != null && - this.PaymentReference.Equals(input.PaymentReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentReference != null) - { - hashCode = (hashCode * 59) + this.PaymentReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/StoredPaymentMethod.cs b/Adyen/Model/Checkout/StoredPaymentMethod.cs deleted file mode 100644 index eee217536..000000000 --- a/Adyen/Model/Checkout/StoredPaymentMethod.cs +++ /dev/null @@ -1,435 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// StoredPaymentMethod - /// - [DataContract(Name = "StoredPaymentMethod")] - public partial class StoredPaymentMethod : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators).. - /// The location id of the bank. The field value is `nil` in most cases.. - /// The brand of the card.. - /// The two-digit month when the card expires. - /// The last two digits of the year the card expires. For example, **22** for the year 2022.. - /// The unique payment method code.. - /// The IBAN of the bank account.. - /// A unique identifier of this stored payment method.. - /// The shopper’s issuer account label. - /// The last four digits of the PAN.. - /// The display name of the stored payment method.. - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID.. - /// The name of the bank account holder.. - /// The shopper’s email address.. - /// The supported recurring processing models for this stored payment method.. - /// The supported shopper interactions for this stored payment method.. - /// The type of payment method.. - public StoredPaymentMethod(string bankAccountNumber = default(string), string bankLocationId = default(string), string brand = default(string), string expiryMonth = default(string), string expiryYear = default(string), string holderName = default(string), string iban = default(string), string id = default(string), string label = default(string), string lastFour = default(string), string name = default(string), string networkTxReference = default(string), string ownerName = default(string), string shopperEmail = default(string), List supportedRecurringProcessingModels = default(List), List supportedShopperInteractions = default(List), string type = default(string)) - { - this.BankAccountNumber = bankAccountNumber; - this.BankLocationId = bankLocationId; - this.Brand = brand; - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.HolderName = holderName; - this.Iban = iban; - this.Id = id; - this.Label = label; - this.LastFour = lastFour; - this.Name = name; - this.NetworkTxReference = networkTxReference; - this.OwnerName = ownerName; - this.ShopperEmail = shopperEmail; - this.SupportedRecurringProcessingModels = supportedRecurringProcessingModels; - this.SupportedShopperInteractions = supportedShopperInteractions; - this.Type = type; - } - - /// - /// The bank account number (without separators). - /// - /// The bank account number (without separators). - [DataMember(Name = "bankAccountNumber", EmitDefaultValue = false)] - public string BankAccountNumber { get; set; } - - /// - /// The location id of the bank. The field value is `nil` in most cases. - /// - /// The location id of the bank. The field value is `nil` in most cases. - [DataMember(Name = "bankLocationId", EmitDefaultValue = false)] - public string BankLocationId { get; set; } - - /// - /// The brand of the card. - /// - /// The brand of the card. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The two-digit month when the card expires - /// - /// The two-digit month when the card expires - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The last two digits of the year the card expires. For example, **22** for the year 2022. - /// - /// The last two digits of the year the card expires. For example, **22** for the year 2022. - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The unique payment method code. - /// - /// The unique payment method code. - [DataMember(Name = "holderName", EmitDefaultValue = false)] - public string HolderName { get; set; } - - /// - /// The IBAN of the bank account. - /// - /// The IBAN of the bank account. - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// A unique identifier of this stored payment method. - /// - /// A unique identifier of this stored payment method. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The shopper’s issuer account label - /// - /// The shopper’s issuer account label - [DataMember(Name = "label", EmitDefaultValue = false)] - public string Label { get; set; } - - /// - /// The last four digits of the PAN. - /// - /// The last four digits of the PAN. - [DataMember(Name = "lastFour", EmitDefaultValue = false)] - public string LastFour { get; set; } - - /// - /// The display name of the stored payment method. - /// - /// The display name of the stored payment method. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - [DataMember(Name = "networkTxReference", EmitDefaultValue = false)] - public string NetworkTxReference { get; set; } - - /// - /// The name of the bank account holder. - /// - /// The name of the bank account holder. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The shopper’s email address. - /// - /// The shopper’s email address. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The supported recurring processing models for this stored payment method. - /// - /// The supported recurring processing models for this stored payment method. - [DataMember(Name = "supportedRecurringProcessingModels", EmitDefaultValue = false)] - public List SupportedRecurringProcessingModels { get; set; } - - /// - /// The supported shopper interactions for this stored payment method. - /// - /// The supported shopper interactions for this stored payment method. - [DataMember(Name = "supportedShopperInteractions", EmitDefaultValue = false)] - public List SupportedShopperInteractions { get; set; } - - /// - /// The type of payment method. - /// - /// The type of payment method. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredPaymentMethod {\n"); - sb.Append(" BankAccountNumber: ").Append(BankAccountNumber).Append("\n"); - sb.Append(" BankLocationId: ").Append(BankLocationId).Append("\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" HolderName: ").Append(HolderName).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Label: ").Append(Label).Append("\n"); - sb.Append(" LastFour: ").Append(LastFour).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" NetworkTxReference: ").Append(NetworkTxReference).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" SupportedRecurringProcessingModels: ").Append(SupportedRecurringProcessingModels).Append("\n"); - sb.Append(" SupportedShopperInteractions: ").Append(SupportedShopperInteractions).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredPaymentMethod); - } - - /// - /// Returns true if StoredPaymentMethod instances are equal - /// - /// Instance of StoredPaymentMethod to be compared - /// Boolean - public bool Equals(StoredPaymentMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccountNumber == input.BankAccountNumber || - (this.BankAccountNumber != null && - this.BankAccountNumber.Equals(input.BankAccountNumber)) - ) && - ( - this.BankLocationId == input.BankLocationId || - (this.BankLocationId != null && - this.BankLocationId.Equals(input.BankLocationId)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.HolderName == input.HolderName || - (this.HolderName != null && - this.HolderName.Equals(input.HolderName)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Label == input.Label || - (this.Label != null && - this.Label.Equals(input.Label)) - ) && - ( - this.LastFour == input.LastFour || - (this.LastFour != null && - this.LastFour.Equals(input.LastFour)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NetworkTxReference == input.NetworkTxReference || - (this.NetworkTxReference != null && - this.NetworkTxReference.Equals(input.NetworkTxReference)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.SupportedRecurringProcessingModels == input.SupportedRecurringProcessingModels || - this.SupportedRecurringProcessingModels != null && - input.SupportedRecurringProcessingModels != null && - this.SupportedRecurringProcessingModels.SequenceEqual(input.SupportedRecurringProcessingModels) - ) && - ( - this.SupportedShopperInteractions == input.SupportedShopperInteractions || - this.SupportedShopperInteractions != null && - input.SupportedShopperInteractions != null && - this.SupportedShopperInteractions.SequenceEqual(input.SupportedShopperInteractions) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccountNumber != null) - { - hashCode = (hashCode * 59) + this.BankAccountNumber.GetHashCode(); - } - if (this.BankLocationId != null) - { - hashCode = (hashCode * 59) + this.BankLocationId.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.HolderName != null) - { - hashCode = (hashCode * 59) + this.HolderName.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Label != null) - { - hashCode = (hashCode * 59) + this.Label.GetHashCode(); - } - if (this.LastFour != null) - { - hashCode = (hashCode * 59) + this.LastFour.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.NetworkTxReference != null) - { - hashCode = (hashCode * 59) + this.NetworkTxReference.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.SupportedRecurringProcessingModels != null) - { - hashCode = (hashCode * 59) + this.SupportedRecurringProcessingModels.GetHashCode(); - } - if (this.SupportedShopperInteractions != null) - { - hashCode = (hashCode * 59) + this.SupportedShopperInteractions.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/StoredPaymentMethodDetails.cs b/Adyen/Model/Checkout/StoredPaymentMethodDetails.cs deleted file mode 100644 index fb8f4885f..000000000 --- a/Adyen/Model/Checkout/StoredPaymentMethodDetails.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// StoredPaymentMethodDetails - /// - [DataContract(Name = "StoredPaymentMethodDetails")] - public partial class StoredPaymentMethodDetails : IEquatable, IValidatableObject - { - /// - /// The payment method type. - /// - /// The payment method type. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BcmcMobile for value: bcmc_mobile - /// - [EnumMember(Value = "bcmc_mobile")] - BcmcMobile = 1, - - /// - /// Enum BcmcMobileQR for value: bcmc_mobile_QR - /// - [EnumMember(Value = "bcmc_mobile_QR")] - BcmcMobileQR = 2, - - /// - /// Enum BcmcMobileApp for value: bcmc_mobile_app - /// - [EnumMember(Value = "bcmc_mobile_app")] - BcmcMobileApp = 3, - - /// - /// Enum MomoWallet for value: momo_wallet - /// - [EnumMember(Value = "momo_wallet")] - MomoWallet = 4, - - /// - /// Enum MomoWalletApp for value: momo_wallet_app - /// - [EnumMember(Value = "momo_wallet_app")] - MomoWalletApp = 5, - - /// - /// Enum PaymayaWallet for value: paymaya_wallet - /// - [EnumMember(Value = "paymaya_wallet")] - PaymayaWallet = 6, - - /// - /// Enum GrabpaySG for value: grabpay_SG - /// - [EnumMember(Value = "grabpay_SG")] - GrabpaySG = 7, - - /// - /// Enum GrabpayMY for value: grabpay_MY - /// - [EnumMember(Value = "grabpay_MY")] - GrabpayMY = 8, - - /// - /// Enum GrabpayTH for value: grabpay_TH - /// - [EnumMember(Value = "grabpay_TH")] - GrabpayTH = 9, - - /// - /// Enum GrabpayID for value: grabpay_ID - /// - [EnumMember(Value = "grabpay_ID")] - GrabpayID = 10, - - /// - /// Enum GrabpayVN for value: grabpay_VN - /// - [EnumMember(Value = "grabpay_VN")] - GrabpayVN = 11, - - /// - /// Enum GrabpayPH for value: grabpay_PH - /// - [EnumMember(Value = "grabpay_PH")] - GrabpayPH = 12, - - /// - /// Enum Oxxo for value: oxxo - /// - [EnumMember(Value = "oxxo")] - Oxxo = 13, - - /// - /// Enum Gcash for value: gcash - /// - [EnumMember(Value = "gcash")] - Gcash = 14, - - /// - /// Enum Dana for value: dana - /// - [EnumMember(Value = "dana")] - Dana = 15, - - /// - /// Enum Kakaopay for value: kakaopay - /// - [EnumMember(Value = "kakaopay")] - Kakaopay = 16, - - /// - /// Enum Truemoney for value: truemoney - /// - [EnumMember(Value = "truemoney")] - Truemoney = 17, - - /// - /// Enum Paysafecard for value: paysafecard - /// - [EnumMember(Value = "paysafecard")] - Paysafecard = 18 - - } - - - /// - /// The payment method type. - /// - /// The payment method type. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The payment method type.. - public StoredPaymentMethodDetails(string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredPaymentMethodDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredPaymentMethodDetails); - } - - /// - /// Returns true if StoredPaymentMethodDetails instances are equal - /// - /// Instance of StoredPaymentMethodDetails to be compared - /// Boolean - public bool Equals(StoredPaymentMethodDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/StoredPaymentMethodRequest.cs b/Adyen/Model/Checkout/StoredPaymentMethodRequest.cs deleted file mode 100644 index 5d0410d79..000000000 --- a/Adyen/Model/Checkout/StoredPaymentMethodRequest.cs +++ /dev/null @@ -1,251 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// StoredPaymentMethodRequest - /// - [DataContract(Name = "StoredPaymentMethodRequest")] - public partial class StoredPaymentMethodRequest : IEquatable, IValidatableObject - { - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "recurringProcessingModel", IsRequired = false, EmitDefaultValue = false)] - public RecurringProcessingModelEnum RecurringProcessingModel { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoredPaymentMethodRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account identifier, with which you want to process the transaction. (required). - /// paymentMethod (required). - /// Defines a recurring payment type. Required when creating a token to store payment details. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. (required). - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks.. - /// The IP address of a shopper.. - /// A unique identifier for the shopper (for example, user ID or account ID). (required). - public StoredPaymentMethodRequest(string merchantAccount = default(string), PaymentMethodToStore paymentMethod = default(PaymentMethodToStore), RecurringProcessingModelEnum recurringProcessingModel = default(RecurringProcessingModelEnum), string shopperEmail = default(string), string shopperIP = default(string), string shopperReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.RecurringProcessingModel = recurringProcessingModel; - this.ShopperReference = shopperReference; - this.ShopperEmail = shopperEmail; - this.ShopperIP = shopperIP; - } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets PaymentMethod - /// - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public PaymentMethodToStore PaymentMethod { get; set; } - - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// The IP address of a shopper. - /// - /// The IP address of a shopper. - [DataMember(Name = "shopperIP", EmitDefaultValue = false)] - public string ShopperIP { get; set; } - - /// - /// A unique identifier for the shopper (for example, user ID or account ID). - /// - /// A unique identifier for the shopper (for example, user ID or account ID). - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredPaymentMethodRequest {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperIP: ").Append(ShopperIP).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredPaymentMethodRequest); - } - - /// - /// Returns true if StoredPaymentMethodRequest instances are equal - /// - /// Instance of StoredPaymentMethodRequest to be compared - /// Boolean - public bool Equals(StoredPaymentMethodRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperIP == input.ShopperIP || - (this.ShopperIP != null && - this.ShopperIP.Equals(input.ShopperIP)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperIP != null) - { - hashCode = (hashCode * 59) + this.ShopperIP.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/StoredPaymentMethodResource.cs b/Adyen/Model/Checkout/StoredPaymentMethodResource.cs deleted file mode 100644 index 8ec3b3ef6..000000000 --- a/Adyen/Model/Checkout/StoredPaymentMethodResource.cs +++ /dev/null @@ -1,446 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// StoredPaymentMethodResource - /// - [DataContract(Name = "StoredPaymentMethodResource")] - public partial class StoredPaymentMethodResource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The brand of the card.. - /// The month the card expires.. - /// The last two digits of the year the card expires. For example, **22** for the year 2022.. - /// The response code returned by an external system (for example after a provisioning operation).. - /// The token reference of a linked token in an external system (for example a network token reference).. - /// The unique payment method code.. - /// The IBAN of the bank account.. - /// A unique identifier of this stored payment method.. - /// The name of the issuer of token or card.. - /// The last four digits of the PAN.. - /// The display name of the stored payment method.. - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID.. - /// The name of the bank account holder.. - /// The shopper’s email address.. - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount.. - /// The type of payment method.. - public StoredPaymentMethodResource(string brand = default(string), string expiryMonth = default(string), string expiryYear = default(string), string externalResponseCode = default(string), string externalTokenReference = default(string), string holderName = default(string), string iban = default(string), string id = default(string), string issuerName = default(string), string lastFour = default(string), string name = default(string), string networkTxReference = default(string), string ownerName = default(string), string shopperEmail = default(string), string shopperReference = default(string), List supportedRecurringProcessingModels = default(List), string type = default(string)) - { - this.Brand = brand; - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.ExternalResponseCode = externalResponseCode; - this.ExternalTokenReference = externalTokenReference; - this.HolderName = holderName; - this.Iban = iban; - this.Id = id; - this.IssuerName = issuerName; - this.LastFour = lastFour; - this.Name = name; - this.NetworkTxReference = networkTxReference; - this.OwnerName = ownerName; - this.ShopperEmail = shopperEmail; - this.ShopperReference = shopperReference; - this.SupportedRecurringProcessingModels = supportedRecurringProcessingModels; - this.Type = type; - } - - /// - /// The brand of the card. - /// - /// The brand of the card. - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The month the card expires. - /// - /// The month the card expires. - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The last two digits of the year the card expires. For example, **22** for the year 2022. - /// - /// The last two digits of the year the card expires. For example, **22** for the year 2022. - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The response code returned by an external system (for example after a provisioning operation). - /// - /// The response code returned by an external system (for example after a provisioning operation). - [DataMember(Name = "externalResponseCode", EmitDefaultValue = false)] - public string ExternalResponseCode { get; set; } - - /// - /// The token reference of a linked token in an external system (for example a network token reference). - /// - /// The token reference of a linked token in an external system (for example a network token reference). - [DataMember(Name = "externalTokenReference", EmitDefaultValue = false)] - public string ExternalTokenReference { get; set; } - - /// - /// The unique payment method code. - /// - /// The unique payment method code. - [DataMember(Name = "holderName", EmitDefaultValue = false)] - public string HolderName { get; set; } - - /// - /// The IBAN of the bank account. - /// - /// The IBAN of the bank account. - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// A unique identifier of this stored payment method. - /// - /// A unique identifier of this stored payment method. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The name of the issuer of token or card. - /// - /// The name of the issuer of token or card. - [DataMember(Name = "issuerName", EmitDefaultValue = false)] - public string IssuerName { get; set; } - - /// - /// The last four digits of the PAN. - /// - /// The last four digits of the PAN. - [DataMember(Name = "lastFour", EmitDefaultValue = false)] - public string LastFour { get; set; } - - /// - /// The display name of the stored payment method. - /// - /// The display name of the stored payment method. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - [DataMember(Name = "networkTxReference", EmitDefaultValue = false)] - public string NetworkTxReference { get; set; } - - /// - /// The name of the bank account holder. - /// - /// The name of the bank account holder. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The shopper’s email address. - /// - /// The shopper’s email address. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - /// - /// Defines a recurring payment type. Allowed values: * `Subscription` – A transaction for a fixed or variable amount, which follows a fixed schedule. * `CardOnFile` – With a card-on-file (CoF) transaction, card details are stored to enable one-click or omnichannel journeys, or simply to streamline the checkout process. Any subscription not following a fixed schedule is also considered a card-on-file transaction. * `UnscheduledCardOnFile` – An unscheduled card-on-file (UCoF) transaction is a transaction that occurs on a non-fixed schedule and/or have variable amounts. For example, automatic top-ups when a cardholder's balance drops below a certain amount. - [DataMember(Name = "supportedRecurringProcessingModels", EmitDefaultValue = false)] - public List SupportedRecurringProcessingModels { get; set; } - - /// - /// The type of payment method. - /// - /// The type of payment method. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredPaymentMethodResource {\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" ExternalResponseCode: ").Append(ExternalResponseCode).Append("\n"); - sb.Append(" ExternalTokenReference: ").Append(ExternalTokenReference).Append("\n"); - sb.Append(" HolderName: ").Append(HolderName).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" IssuerName: ").Append(IssuerName).Append("\n"); - sb.Append(" LastFour: ").Append(LastFour).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" NetworkTxReference: ").Append(NetworkTxReference).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" SupportedRecurringProcessingModels: ").Append(SupportedRecurringProcessingModels).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredPaymentMethodResource); - } - - /// - /// Returns true if StoredPaymentMethodResource instances are equal - /// - /// Instance of StoredPaymentMethodResource to be compared - /// Boolean - public bool Equals(StoredPaymentMethodResource input) - { - if (input == null) - { - return false; - } - return - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.ExternalResponseCode == input.ExternalResponseCode || - (this.ExternalResponseCode != null && - this.ExternalResponseCode.Equals(input.ExternalResponseCode)) - ) && - ( - this.ExternalTokenReference == input.ExternalTokenReference || - (this.ExternalTokenReference != null && - this.ExternalTokenReference.Equals(input.ExternalTokenReference)) - ) && - ( - this.HolderName == input.HolderName || - (this.HolderName != null && - this.HolderName.Equals(input.HolderName)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuerName == input.IssuerName || - (this.IssuerName != null && - this.IssuerName.Equals(input.IssuerName)) - ) && - ( - this.LastFour == input.LastFour || - (this.LastFour != null && - this.LastFour.Equals(input.LastFour)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NetworkTxReference == input.NetworkTxReference || - (this.NetworkTxReference != null && - this.NetworkTxReference.Equals(input.NetworkTxReference)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.SupportedRecurringProcessingModels == input.SupportedRecurringProcessingModels || - this.SupportedRecurringProcessingModels != null && - input.SupportedRecurringProcessingModels != null && - this.SupportedRecurringProcessingModels.SequenceEqual(input.SupportedRecurringProcessingModels) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.ExternalResponseCode != null) - { - hashCode = (hashCode * 59) + this.ExternalResponseCode.GetHashCode(); - } - if (this.ExternalTokenReference != null) - { - hashCode = (hashCode * 59) + this.ExternalTokenReference.GetHashCode(); - } - if (this.HolderName != null) - { - hashCode = (hashCode * 59) + this.HolderName.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuerName != null) - { - hashCode = (hashCode * 59) + this.IssuerName.GetHashCode(); - } - if (this.LastFour != null) - { - hashCode = (hashCode * 59) + this.LastFour.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.NetworkTxReference != null) - { - hashCode = (hashCode * 59) + this.NetworkTxReference.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.SupportedRecurringProcessingModels != null) - { - hashCode = (hashCode * 59) + this.SupportedRecurringProcessingModels.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ShopperReference (string) maxLength - if (this.ShopperReference != null && this.ShopperReference.Length > 256) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be less than 256.", new [] { "ShopperReference" }); - } - - // ShopperReference (string) minLength - if (this.ShopperReference != null && this.ShopperReference.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ShopperReference, length must be greater than 3.", new [] { "ShopperReference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/SubInputDetail.cs b/Adyen/Model/Checkout/SubInputDetail.cs deleted file mode 100644 index 2784e2215..000000000 --- a/Adyen/Model/Checkout/SubInputDetail.cs +++ /dev/null @@ -1,222 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// SubInputDetail - /// - [DataContract(Name = "SubInputDetail")] - public partial class SubInputDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Configuration parameters for the required input.. - /// In case of a select, the items to choose from.. - /// The value to provide in the result.. - /// True if this input is optional to provide.. - /// The type of the required input.. - /// The value can be pre-filled, if available.. - public SubInputDetail(Dictionary configuration = default(Dictionary), List items = default(List), string key = default(string), bool? optional = default(bool?), string type = default(string), string value = default(string)) - { - this._Configuration = configuration; - this.Items = items; - this.Key = key; - this.Optional = optional; - this.Type = type; - this.Value = value; - } - - /// - /// Configuration parameters for the required input. - /// - /// Configuration parameters for the required input. - [DataMember(Name = "configuration", EmitDefaultValue = false)] - public Dictionary _Configuration { get; set; } - - /// - /// In case of a select, the items to choose from. - /// - /// In case of a select, the items to choose from. - [DataMember(Name = "items", EmitDefaultValue = false)] - public List Items { get; set; } - - /// - /// The value to provide in the result. - /// - /// The value to provide in the result. - [DataMember(Name = "key", EmitDefaultValue = false)] - public string Key { get; set; } - - /// - /// True if this input is optional to provide. - /// - /// True if this input is optional to provide. - [DataMember(Name = "optional", EmitDefaultValue = false)] - public bool? Optional { get; set; } - - /// - /// The type of the required input. - /// - /// The type of the required input. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// The value can be pre-filled, if available. - /// - /// The value can be pre-filled, if available. - [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SubInputDetail {\n"); - sb.Append(" _Configuration: ").Append(_Configuration).Append("\n"); - sb.Append(" Items: ").Append(Items).Append("\n"); - sb.Append(" Key: ").Append(Key).Append("\n"); - sb.Append(" Optional: ").Append(Optional).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubInputDetail); - } - - /// - /// Returns true if SubInputDetail instances are equal - /// - /// Instance of SubInputDetail to be compared - /// Boolean - public bool Equals(SubInputDetail input) - { - if (input == null) - { - return false; - } - return - ( - this._Configuration == input._Configuration || - this._Configuration != null && - input._Configuration != null && - this._Configuration.SequenceEqual(input._Configuration) - ) && - ( - this.Items == input.Items || - this.Items != null && - input.Items != null && - this.Items.SequenceEqual(input.Items) - ) && - ( - this.Key == input.Key || - (this.Key != null && - this.Key.Equals(input.Key)) - ) && - ( - this.Optional == input.Optional || - this.Optional.Equals(input.Optional) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Configuration != null) - { - hashCode = (hashCode * 59) + this._Configuration.GetHashCode(); - } - if (this.Items != null) - { - hashCode = (hashCode * 59) + this.Items.GetHashCode(); - } - if (this.Key != null) - { - hashCode = (hashCode * 59) + this.Key.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Optional.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/SubMerchant.cs b/Adyen/Model/Checkout/SubMerchant.cs deleted file mode 100644 index 54d64c8a9..000000000 --- a/Adyen/Model/Checkout/SubMerchant.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// SubMerchant - /// - [DataContract(Name = "SubMerchant")] - public partial class SubMerchant : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The city of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 13 characters. - /// The three-letter country code of the sub-merchant's address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters. - /// The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits. - /// The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters. - /// The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ. - public SubMerchant(string city = default(string), string country = default(string), string mcc = default(string), string name = default(string), string taxId = default(string)) - { - this.City = city; - this.Country = country; - this.Mcc = mcc; - this.Name = name; - this.TaxId = taxId; - } - - /// - /// The city of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 13 characters - /// - /// The city of the sub-merchant's address. * Format: Alphanumeric * Maximum length: 13 characters - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The three-letter country code of the sub-merchant's address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters - /// - /// The three-letter country code of the sub-merchant's address. For example, **BRA** for Brazil. * Format: [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) * Fixed length: 3 characters - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits - /// - /// The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters - /// - /// The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. * Format: Alphanumeric * Maximum length: 22 characters - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ - /// - /// The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SubMerchant {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubMerchant); - } - - /// - /// Returns true if SubMerchant instances are equal - /// - /// Instance of SubMerchant to be compared - /// Boolean - public bool Equals(SubMerchant input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/SubMerchantInfo.cs b/Adyen/Model/Checkout/SubMerchantInfo.cs deleted file mode 100644 index b6faa1053..000000000 --- a/Adyen/Model/Checkout/SubMerchantInfo.cs +++ /dev/null @@ -1,315 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// SubMerchantInfo - /// - [DataContract(Name = "SubMerchantInfo")] - public partial class SubMerchantInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// address. - /// amount. - /// Required for transactions performed by registered payment facilitators. The email associated with the sub-merchant's account.. - /// Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters. - /// Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits. - /// Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters. - /// Required for transactions performed by registered payment facilitators. The phone number associated with the sub-merchant's account.. - /// registeredSince. - /// Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ. - /// Required for transactions performed by registered payment facilitators. The sub-merchant's URL on the platform, i.e. the sub-merchant's shop.. - public SubMerchantInfo(BillingAddress address = default(BillingAddress), Amount amount = default(Amount), string email = default(string), string id = default(string), string mcc = default(string), string name = default(string), string phoneNumber = default(string), string registeredSince = default(string), string taxId = default(string), string url = default(string)) - { - this.Address = address; - this.Amount = amount; - this.Email = email; - this.Id = id; - this.Mcc = mcc; - this.Name = name; - this.PhoneNumber = phoneNumber; - this.RegisteredSince = registeredSince; - this.TaxId = taxId; - this.Url = url; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public BillingAddress Address { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The email associated with the sub-merchant's account. - /// - /// Required for transactions performed by registered payment facilitators. The email associated with the sub-merchant's account. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters - /// - /// Required for transactions performed by registered payment facilitators. A unique identifier that you create for the sub-merchant, used by schemes to identify the sub-merchant. * Format: Alphanumeric * Maximum length: 15 characters - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits - /// - /// Required for transactions performed by registered payment facilitators. The sub-merchant's 4-digit Merchant Category Code (MCC). * Format: Numeric * Fixed length: 4 digits - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters - /// - /// Required for transactions performed by registered payment facilitators. The name of the sub-merchant. Based on scheme specifications, this value will overwrite the shopper statement that will appear in the card statement. Exception: for acquirers in Brazil, this value does not overwrite the shopper statement. * Format: Alphanumeric * Maximum length: 22 characters - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The phone number associated with the sub-merchant's account. - /// - /// Required for transactions performed by registered payment facilitators. The phone number associated with the sub-merchant's account. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// Gets or Sets RegisteredSince - /// - [DataMember(Name = "registeredSince", EmitDefaultValue = false)] - public string RegisteredSince { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ - /// - /// Required for transactions performed by registered payment facilitators. The tax ID of the sub-merchant. * Format: Numeric * Fixed length: 11 digits for the CPF or 14 digits for the CNPJ - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Required for transactions performed by registered payment facilitators. The sub-merchant's URL on the platform, i.e. the sub-merchant's shop. - /// - /// Required for transactions performed by registered payment facilitators. The sub-merchant's URL on the platform, i.e. the sub-merchant's shop. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SubMerchantInfo {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" RegisteredSince: ").Append(RegisteredSince).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubMerchantInfo); - } - - /// - /// Returns true if SubMerchantInfo instances are equal - /// - /// Instance of SubMerchantInfo to be compared - /// Boolean - public bool Equals(SubMerchantInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.RegisteredSince == input.RegisteredSince || - (this.RegisteredSince != null && - this.RegisteredSince.Equals(input.RegisteredSince)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.RegisteredSince != null) - { - hashCode = (hashCode * 59) + this.RegisteredSince.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Email (string) maxLength - if (this.Email != null && this.Email.Length > 320) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Email, length must be less than 320.", new [] { "Email" }); - } - - // PhoneNumber (string) maxLength - if (this.PhoneNumber != null && this.PhoneNumber.Length > 20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PhoneNumber, length must be less than 20.", new [] { "PhoneNumber" }); - } - - // Url (string) maxLength - if (this.Url != null && this.Url.Length > 320) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Url, length must be less than 320.", new [] { "Url" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Surcharge.cs b/Adyen/Model/Checkout/Surcharge.cs deleted file mode 100644 index 83eaed16b..000000000 --- a/Adyen/Model/Checkout/Surcharge.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Surcharge - /// - [DataContract(Name = "Surcharge")] - public partial class Surcharge : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Surcharge() { } - /// - /// Initializes a new instance of the class. - /// - /// The [surcharge](https://docs.adyen.com/online-payments/surcharge/) amount to apply to the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). When you apply surcharge, include the surcharge in the `amount.value` field. Review our [Surcharge compliance guide](https://docs.adyen.com/development-resources/surcharge-compliance/) to learn about how to comply with regulatory requirements when applying surcharge. (required). - public Surcharge(long? value = default(long?)) - { - this.Value = value; - } - - /// - /// The [surcharge](https://docs.adyen.com/online-payments/surcharge/) amount to apply to the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). When you apply surcharge, include the surcharge in the `amount.value` field. Review our [Surcharge compliance guide](https://docs.adyen.com/development-resources/surcharge-compliance/) to learn about how to comply with regulatory requirements when applying surcharge. - /// - /// The [surcharge](https://docs.adyen.com/online-payments/surcharge/) amount to apply to the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). When you apply surcharge, include the surcharge in the `amount.value` field. Review our [Surcharge compliance guide](https://docs.adyen.com/development-resources/surcharge-compliance/) to learn about how to comply with regulatory requirements when applying surcharge. - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Surcharge {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Surcharge); - } - - /// - /// Returns true if Surcharge instances are equal - /// - /// Instance of Surcharge to be compared - /// Boolean - public bool Equals(Surcharge input) - { - if (input == null) - { - return false; - } - return - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/TaxTotal.cs b/Adyen/Model/Checkout/TaxTotal.cs deleted file mode 100644 index 793064969..000000000 --- a/Adyen/Model/Checkout/TaxTotal.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// TaxTotal - /// - [DataContract(Name = "TaxTotal")] - public partial class TaxTotal : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// amount. - public TaxTotal(Amount amount = default(Amount)) - { - this.Amount = amount; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TaxTotal {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TaxTotal); - } - - /// - /// Returns true if TaxTotal instances are equal - /// - /// Instance of TaxTotal to be compared - /// Boolean - public bool Equals(TaxTotal input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ThreeDS2RequestData.cs b/Adyen/Model/Checkout/ThreeDS2RequestData.cs deleted file mode 100644 index 97da42098..000000000 --- a/Adyen/Model/Checkout/ThreeDS2RequestData.cs +++ /dev/null @@ -1,1036 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ThreeDS2RequestData - /// - [DataContract(Name = "ThreeDS2RequestData")] - public partial class ThreeDS2RequestData : IEquatable, IValidatableObject - { - /// - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - /// - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - [JsonConverter(typeof(StringEnumConverter))] - public enum AcctTypeEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3 - - } - - - /// - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - /// - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - [DataMember(Name = "acctType", EmitDefaultValue = false)] - public AcctTypeEnum? AcctType { get; set; } - /// - /// Indicates whether the cardholder shipping address and cardholder billing address are the same. Allowed values: * **Y** — Shipping address matches billing address. * **N** — Shipping address does not match billing address. - /// - /// Indicates whether the cardholder shipping address and cardholder billing address are the same. Allowed values: * **Y** — Shipping address matches billing address. * **N** — Shipping address does not match billing address. - [JsonConverter(typeof(StringEnumConverter))] - public enum AddrMatchEnum - { - /// - /// Enum Y for value: Y - /// - [EnumMember(Value = "Y")] - Y = 1, - - /// - /// Enum N for value: N - /// - [EnumMember(Value = "N")] - N = 2 - - } - - - /// - /// Indicates whether the cardholder shipping address and cardholder billing address are the same. Allowed values: * **Y** — Shipping address matches billing address. * **N** — Shipping address does not match billing address. - /// - /// Indicates whether the cardholder shipping address and cardholder billing address are the same. Allowed values: * **Y** — Shipping address matches billing address. * **N** — Shipping address does not match billing address. - [DataMember(Name = "addrMatch", EmitDefaultValue = false)] - public AddrMatchEnum? AddrMatch { get; set; } - /// - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - /// - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - [JsonConverter(typeof(StringEnumConverter))] - public enum ChallengeIndicatorEnum - { - /// - /// Enum NoPreference for value: noPreference - /// - [EnumMember(Value = "noPreference")] - NoPreference = 1, - - /// - /// Enum RequestNoChallenge for value: requestNoChallenge - /// - [EnumMember(Value = "requestNoChallenge")] - RequestNoChallenge = 2, - - /// - /// Enum RequestChallenge for value: requestChallenge - /// - [EnumMember(Value = "requestChallenge")] - RequestChallenge = 3, - - /// - /// Enum RequestChallengeAsMandate for value: requestChallengeAsMandate - /// - [EnumMember(Value = "requestChallengeAsMandate")] - RequestChallengeAsMandate = 4 - - } - - - /// - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - /// - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - [DataMember(Name = "challengeIndicator", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use `threeDSRequestorChallengeInd` instead.")] - public ChallengeIndicatorEnum? ChallengeIndicator { get; set; } - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - [JsonConverter(typeof(StringEnumConverter))] - public enum ThreeDSRequestorChallengeIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 6 - - } - - - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - [DataMember(Name = "threeDSRequestorChallengeInd", EmitDefaultValue = false)] - public ThreeDSRequestorChallengeIndEnum? ThreeDSRequestorChallengeInd { get; set; } - /// - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - /// - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - [JsonConverter(typeof(StringEnumConverter))] - public enum TransTypeEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 2, - - /// - /// Enum _10 for value: 10 - /// - [EnumMember(Value = "10")] - _10 = 3, - - /// - /// Enum _11 for value: 11 - /// - [EnumMember(Value = "11")] - _11 = 4, - - /// - /// Enum _28 for value: 28 - /// - [EnumMember(Value = "28")] - _28 = 5 - - } - - - /// - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - /// - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - [DataMember(Name = "transType", EmitDefaultValue = false)] - public TransTypeEnum? TransType { get; set; } - /// - /// Identify the type of the transaction being authenticated. - /// - /// Identify the type of the transaction being authenticated. - [JsonConverter(typeof(StringEnumConverter))] - public enum TransactionTypeEnum - { - /// - /// Enum GoodsOrServicePurchase for value: goodsOrServicePurchase - /// - [EnumMember(Value = "goodsOrServicePurchase")] - GoodsOrServicePurchase = 1, - - /// - /// Enum CheckAcceptance for value: checkAcceptance - /// - [EnumMember(Value = "checkAcceptance")] - CheckAcceptance = 2, - - /// - /// Enum AccountFunding for value: accountFunding - /// - [EnumMember(Value = "accountFunding")] - AccountFunding = 3, - - /// - /// Enum QuasiCashTransaction for value: quasiCashTransaction - /// - [EnumMember(Value = "quasiCashTransaction")] - QuasiCashTransaction = 4, - - /// - /// Enum PrepaidActivationAndLoad for value: prepaidActivationAndLoad - /// - [EnumMember(Value = "prepaidActivationAndLoad")] - PrepaidActivationAndLoad = 5 - - } - - - /// - /// Identify the type of the transaction being authenticated. - /// - /// Identify the type of the transaction being authenticated. - [DataMember(Name = "transactionType", EmitDefaultValue = false)] - public TransactionTypeEnum? TransactionType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ThreeDS2RequestData() { } - /// - /// Initializes a new instance of the class. - /// - /// acctInfo. - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform.. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform.. - /// Indicates whether the cardholder shipping address and cardholder billing address are the same. Allowed values: * **Y** — Shipping address matches billing address. * **N** — Shipping address does not match billing address.. - /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. (default to false). - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` . - /// The environment of the shopper. Allowed values: * `app` * `browser` (required). - /// deviceRenderOptions. - /// homePhone. - /// Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme.. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account.. - /// The `messageVersion` value indicating the 3D Secure 2 protocol version.. - /// mobilePhone. - /// URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**.. - /// Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS.. - /// Indicates the type of payment for which an authentication is requested (message extension). - /// Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters.. - /// Date after which no further authorisations shall be performed. Format: YYYYMMDD. - /// Indicates the minimum number of days between authorisations. Maximum length: 4 characters.. - /// The `sdkAppID` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**.. - /// The `sdkEncData` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**.. - /// sdkEphemPubKey. - /// The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. (default to 60). - /// The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**.. - /// The `sdkTransID` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**.. - /// Version of the 3D Secure 2 mobile SDK. Only for `deviceChannel` set to **app**.. - /// Completion indicator for the device fingerprinting.. - /// Indicates the type of Authentication request.. - /// threeDSRequestorAuthenticationInfo. - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2.. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2.. - /// threeDSRequestorPriorAuthenticationInfo. - /// URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process.. - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load. - /// Identify the type of the transaction being authenticated.. - /// The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0.. - /// workPhone. - public ThreeDS2RequestData(AcctInfo acctInfo = default(AcctInfo), AcctTypeEnum? acctType = default(AcctTypeEnum?), string acquirerBIN = default(string), string acquirerMerchantID = default(string), AddrMatchEnum? addrMatch = default(AddrMatchEnum?), bool? authenticationOnly = false, ChallengeIndicatorEnum? challengeIndicator = default(ChallengeIndicatorEnum?), string deviceChannel = default(string), DeviceRenderOptions deviceRenderOptions = default(DeviceRenderOptions), Phone homePhone = default(Phone), string mcc = default(string), string merchantName = default(string), string messageVersion = default(string), Phone mobilePhone = default(Phone), string notificationURL = default(string), bool? payTokenInd = default(bool?), string paymentAuthenticationUseCase = default(string), string purchaseInstalData = default(string), string recurringExpiry = default(string), string recurringFrequency = default(string), string sdkAppID = default(string), string sdkEncData = default(string), SDKEphemPubKey sdkEphemPubKey = default(SDKEphemPubKey), int? sdkMaxTimeout = 60, string sdkReferenceNumber = default(string), string sdkTransID = default(string), string sdkVersion = default(string), string threeDSCompInd = default(string), string threeDSRequestorAuthenticationInd = default(string), ThreeDSRequestorAuthenticationInfo threeDSRequestorAuthenticationInfo = default(ThreeDSRequestorAuthenticationInfo), ThreeDSRequestorChallengeIndEnum? threeDSRequestorChallengeInd = default(ThreeDSRequestorChallengeIndEnum?), string threeDSRequestorID = default(string), string threeDSRequestorName = default(string), ThreeDSRequestorPriorAuthenticationInfo threeDSRequestorPriorAuthenticationInfo = default(ThreeDSRequestorPriorAuthenticationInfo), string threeDSRequestorURL = default(string), TransTypeEnum? transType = default(TransTypeEnum?), TransactionTypeEnum? transactionType = default(TransactionTypeEnum?), string whiteListStatus = default(string), Phone workPhone = default(Phone)) - { - this.DeviceChannel = deviceChannel; - this.AcctInfo = acctInfo; - this.AcctType = acctType; - this.AcquirerBIN = acquirerBIN; - this.AcquirerMerchantID = acquirerMerchantID; - this.AddrMatch = addrMatch; - this.AuthenticationOnly = authenticationOnly; - this.ChallengeIndicator = challengeIndicator; - this.DeviceRenderOptions = deviceRenderOptions; - this.HomePhone = homePhone; - this.Mcc = mcc; - this.MerchantName = merchantName; - this.MessageVersion = messageVersion; - this.MobilePhone = mobilePhone; - this.NotificationURL = notificationURL; - this.PayTokenInd = payTokenInd; - this.PaymentAuthenticationUseCase = paymentAuthenticationUseCase; - this.PurchaseInstalData = purchaseInstalData; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.SdkAppID = sdkAppID; - this.SdkEncData = sdkEncData; - this.SdkEphemPubKey = sdkEphemPubKey; - this.SdkMaxTimeout = sdkMaxTimeout; - this.SdkReferenceNumber = sdkReferenceNumber; - this.SdkTransID = sdkTransID; - this.SdkVersion = sdkVersion; - this.ThreeDSCompInd = threeDSCompInd; - this.ThreeDSRequestorAuthenticationInd = threeDSRequestorAuthenticationInd; - this.ThreeDSRequestorAuthenticationInfo = threeDSRequestorAuthenticationInfo; - this.ThreeDSRequestorChallengeInd = threeDSRequestorChallengeInd; - this.ThreeDSRequestorID = threeDSRequestorID; - this.ThreeDSRequestorName = threeDSRequestorName; - this.ThreeDSRequestorPriorAuthenticationInfo = threeDSRequestorPriorAuthenticationInfo; - this.ThreeDSRequestorURL = threeDSRequestorURL; - this.TransType = transType; - this.TransactionType = transactionType; - this.WhiteListStatus = whiteListStatus; - this.WorkPhone = workPhone; - } - - /// - /// Gets or Sets AcctInfo - /// - [DataMember(Name = "acctInfo", EmitDefaultValue = false)] - public AcctInfo AcctInfo { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - [DataMember(Name = "acquirerBIN", EmitDefaultValue = false)] - public string AcquirerBIN { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - [DataMember(Name = "acquirerMerchantID", EmitDefaultValue = false)] - public string AcquirerMerchantID { get; set; } - - /// - /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - /// - /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - [DataMember(Name = "authenticationOnly", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v50. Use `threeDSAuthenticationOnly` instead.")] - public bool? AuthenticationOnly { get; set; } - - /// - /// The environment of the shopper. Allowed values: * `app` * `browser` - /// - /// The environment of the shopper. Allowed values: * `app` * `browser` - [DataMember(Name = "deviceChannel", IsRequired = false, EmitDefaultValue = false)] - public string DeviceChannel { get; set; } - - /// - /// Gets or Sets DeviceRenderOptions - /// - [DataMember(Name = "deviceRenderOptions", EmitDefaultValue = false)] - public DeviceRenderOptions DeviceRenderOptions { get; set; } - - /// - /// Gets or Sets HomePhone - /// - [DataMember(Name = "homePhone", EmitDefaultValue = false)] - public Phone HomePhone { get; set; } - - /// - /// Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. - /// - /// Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. - [DataMember(Name = "merchantName", EmitDefaultValue = false)] - public string MerchantName { get; set; } - - /// - /// The `messageVersion` value indicating the 3D Secure 2 protocol version. - /// - /// The `messageVersion` value indicating the 3D Secure 2 protocol version. - [DataMember(Name = "messageVersion", EmitDefaultValue = false)] - public string MessageVersion { get; set; } - - /// - /// Gets or Sets MobilePhone - /// - [DataMember(Name = "mobilePhone", EmitDefaultValue = false)] - public Phone MobilePhone { get; set; } - - /// - /// URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. - /// - /// URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. - [DataMember(Name = "notificationURL", EmitDefaultValue = false)] - public string NotificationURL { get; set; } - - /// - /// Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS. - /// - /// Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS. - [DataMember(Name = "payTokenInd", EmitDefaultValue = false)] - public bool? PayTokenInd { get; set; } - - /// - /// Indicates the type of payment for which an authentication is requested (message extension) - /// - /// Indicates the type of payment for which an authentication is requested (message extension) - [DataMember(Name = "paymentAuthenticationUseCase", EmitDefaultValue = false)] - public string PaymentAuthenticationUseCase { get; set; } - - /// - /// Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters. - /// - /// Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters. - [DataMember(Name = "purchaseInstalData", EmitDefaultValue = false)] - public string PurchaseInstalData { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Format: YYYYMMDD - /// - /// Date after which no further authorisations shall be performed. Format: YYYYMMDD - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public string RecurringExpiry { get; set; } - - /// - /// Indicates the minimum number of days between authorisations. Maximum length: 4 characters. - /// - /// Indicates the minimum number of days between authorisations. Maximum length: 4 characters. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// The `sdkAppID` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. - /// - /// The `sdkAppID` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. - [DataMember(Name = "sdkAppID", EmitDefaultValue = false)] - public string SdkAppID { get; set; } - - /// - /// The `sdkEncData` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. - /// - /// The `sdkEncData` value as received from the 3D Secure 2 SDK. Required for `deviceChannel` set to **app**. - [DataMember(Name = "sdkEncData", EmitDefaultValue = false)] - public string SdkEncData { get; set; } - - /// - /// Gets or Sets SdkEphemPubKey - /// - [DataMember(Name = "sdkEphemPubKey", EmitDefaultValue = false)] - public SDKEphemPubKey SdkEphemPubKey { get; set; } - - /// - /// The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. - /// - /// The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. - [DataMember(Name = "sdkMaxTimeout", EmitDefaultValue = false)] - public int? SdkMaxTimeout { get; set; } - - /// - /// The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. - /// - /// The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. - [DataMember(Name = "sdkReferenceNumber", EmitDefaultValue = false)] - public string SdkReferenceNumber { get; set; } - - /// - /// The `sdkTransID` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. - /// - /// The `sdkTransID` value as received from the 3D Secure 2 SDK. Only for `deviceChannel` set to **app**. - [DataMember(Name = "sdkTransID", EmitDefaultValue = false)] - public string SdkTransID { get; set; } - - /// - /// Version of the 3D Secure 2 mobile SDK. Only for `deviceChannel` set to **app**. - /// - /// Version of the 3D Secure 2 mobile SDK. Only for `deviceChannel` set to **app**. - [DataMember(Name = "sdkVersion", EmitDefaultValue = false)] - public string SdkVersion { get; set; } - - /// - /// Completion indicator for the device fingerprinting. - /// - /// Completion indicator for the device fingerprinting. - [DataMember(Name = "threeDSCompInd", EmitDefaultValue = false)] - public string ThreeDSCompInd { get; set; } - - /// - /// Indicates the type of Authentication request. - /// - /// Indicates the type of Authentication request. - [DataMember(Name = "threeDSRequestorAuthenticationInd", EmitDefaultValue = false)] - public string ThreeDSRequestorAuthenticationInd { get; set; } - - /// - /// Gets or Sets ThreeDSRequestorAuthenticationInfo - /// - [DataMember(Name = "threeDSRequestorAuthenticationInfo", EmitDefaultValue = false)] - public ThreeDSRequestorAuthenticationInfo ThreeDSRequestorAuthenticationInfo { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. - [DataMember(Name = "threeDSRequestorID", EmitDefaultValue = false)] - public string ThreeDSRequestorID { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. - [DataMember(Name = "threeDSRequestorName", EmitDefaultValue = false)] - public string ThreeDSRequestorName { get; set; } - - /// - /// Gets or Sets ThreeDSRequestorPriorAuthenticationInfo - /// - [DataMember(Name = "threeDSRequestorPriorAuthenticationInfo", EmitDefaultValue = false)] - public ThreeDSRequestorPriorAuthenticationInfo ThreeDSRequestorPriorAuthenticationInfo { get; set; } - - /// - /// URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. - /// - /// URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. - [DataMember(Name = "threeDSRequestorURL", EmitDefaultValue = false)] - public string ThreeDSRequestorURL { get; set; } - - /// - /// The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. - /// - /// The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. - [DataMember(Name = "whiteListStatus", EmitDefaultValue = false)] - public string WhiteListStatus { get; set; } - - /// - /// Gets or Sets WorkPhone - /// - [DataMember(Name = "workPhone", EmitDefaultValue = false)] - public Phone WorkPhone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDS2RequestData {\n"); - sb.Append(" AcctInfo: ").Append(AcctInfo).Append("\n"); - sb.Append(" AcctType: ").Append(AcctType).Append("\n"); - sb.Append(" AcquirerBIN: ").Append(AcquirerBIN).Append("\n"); - sb.Append(" AcquirerMerchantID: ").Append(AcquirerMerchantID).Append("\n"); - sb.Append(" AddrMatch: ").Append(AddrMatch).Append("\n"); - sb.Append(" AuthenticationOnly: ").Append(AuthenticationOnly).Append("\n"); - sb.Append(" ChallengeIndicator: ").Append(ChallengeIndicator).Append("\n"); - sb.Append(" DeviceChannel: ").Append(DeviceChannel).Append("\n"); - sb.Append(" DeviceRenderOptions: ").Append(DeviceRenderOptions).Append("\n"); - sb.Append(" HomePhone: ").Append(HomePhone).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantName: ").Append(MerchantName).Append("\n"); - sb.Append(" MessageVersion: ").Append(MessageVersion).Append("\n"); - sb.Append(" MobilePhone: ").Append(MobilePhone).Append("\n"); - sb.Append(" NotificationURL: ").Append(NotificationURL).Append("\n"); - sb.Append(" PayTokenInd: ").Append(PayTokenInd).Append("\n"); - sb.Append(" PaymentAuthenticationUseCase: ").Append(PaymentAuthenticationUseCase).Append("\n"); - sb.Append(" PurchaseInstalData: ").Append(PurchaseInstalData).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" SdkAppID: ").Append(SdkAppID).Append("\n"); - sb.Append(" SdkEncData: ").Append(SdkEncData).Append("\n"); - sb.Append(" SdkEphemPubKey: ").Append(SdkEphemPubKey).Append("\n"); - sb.Append(" SdkMaxTimeout: ").Append(SdkMaxTimeout).Append("\n"); - sb.Append(" SdkReferenceNumber: ").Append(SdkReferenceNumber).Append("\n"); - sb.Append(" SdkTransID: ").Append(SdkTransID).Append("\n"); - sb.Append(" SdkVersion: ").Append(SdkVersion).Append("\n"); - sb.Append(" ThreeDSCompInd: ").Append(ThreeDSCompInd).Append("\n"); - sb.Append(" ThreeDSRequestorAuthenticationInd: ").Append(ThreeDSRequestorAuthenticationInd).Append("\n"); - sb.Append(" ThreeDSRequestorAuthenticationInfo: ").Append(ThreeDSRequestorAuthenticationInfo).Append("\n"); - sb.Append(" ThreeDSRequestorChallengeInd: ").Append(ThreeDSRequestorChallengeInd).Append("\n"); - sb.Append(" ThreeDSRequestorID: ").Append(ThreeDSRequestorID).Append("\n"); - sb.Append(" ThreeDSRequestorName: ").Append(ThreeDSRequestorName).Append("\n"); - sb.Append(" ThreeDSRequestorPriorAuthenticationInfo: ").Append(ThreeDSRequestorPriorAuthenticationInfo).Append("\n"); - sb.Append(" ThreeDSRequestorURL: ").Append(ThreeDSRequestorURL).Append("\n"); - sb.Append(" TransType: ").Append(TransType).Append("\n"); - sb.Append(" TransactionType: ").Append(TransactionType).Append("\n"); - sb.Append(" WhiteListStatus: ").Append(WhiteListStatus).Append("\n"); - sb.Append(" WorkPhone: ").Append(WorkPhone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDS2RequestData); - } - - /// - /// Returns true if ThreeDS2RequestData instances are equal - /// - /// Instance of ThreeDS2RequestData to be compared - /// Boolean - public bool Equals(ThreeDS2RequestData input) - { - if (input == null) - { - return false; - } - return - ( - this.AcctInfo == input.AcctInfo || - (this.AcctInfo != null && - this.AcctInfo.Equals(input.AcctInfo)) - ) && - ( - this.AcctType == input.AcctType || - this.AcctType.Equals(input.AcctType) - ) && - ( - this.AcquirerBIN == input.AcquirerBIN || - (this.AcquirerBIN != null && - this.AcquirerBIN.Equals(input.AcquirerBIN)) - ) && - ( - this.AcquirerMerchantID == input.AcquirerMerchantID || - (this.AcquirerMerchantID != null && - this.AcquirerMerchantID.Equals(input.AcquirerMerchantID)) - ) && - ( - this.AddrMatch == input.AddrMatch || - this.AddrMatch.Equals(input.AddrMatch) - ) && - ( - this.AuthenticationOnly == input.AuthenticationOnly || - this.AuthenticationOnly.Equals(input.AuthenticationOnly) - ) && - ( - this.ChallengeIndicator == input.ChallengeIndicator || - this.ChallengeIndicator.Equals(input.ChallengeIndicator) - ) && - ( - this.DeviceChannel == input.DeviceChannel || - (this.DeviceChannel != null && - this.DeviceChannel.Equals(input.DeviceChannel)) - ) && - ( - this.DeviceRenderOptions == input.DeviceRenderOptions || - (this.DeviceRenderOptions != null && - this.DeviceRenderOptions.Equals(input.DeviceRenderOptions)) - ) && - ( - this.HomePhone == input.HomePhone || - (this.HomePhone != null && - this.HomePhone.Equals(input.HomePhone)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantName == input.MerchantName || - (this.MerchantName != null && - this.MerchantName.Equals(input.MerchantName)) - ) && - ( - this.MessageVersion == input.MessageVersion || - (this.MessageVersion != null && - this.MessageVersion.Equals(input.MessageVersion)) - ) && - ( - this.MobilePhone == input.MobilePhone || - (this.MobilePhone != null && - this.MobilePhone.Equals(input.MobilePhone)) - ) && - ( - this.NotificationURL == input.NotificationURL || - (this.NotificationURL != null && - this.NotificationURL.Equals(input.NotificationURL)) - ) && - ( - this.PayTokenInd == input.PayTokenInd || - this.PayTokenInd.Equals(input.PayTokenInd) - ) && - ( - this.PaymentAuthenticationUseCase == input.PaymentAuthenticationUseCase || - (this.PaymentAuthenticationUseCase != null && - this.PaymentAuthenticationUseCase.Equals(input.PaymentAuthenticationUseCase)) - ) && - ( - this.PurchaseInstalData == input.PurchaseInstalData || - (this.PurchaseInstalData != null && - this.PurchaseInstalData.Equals(input.PurchaseInstalData)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.SdkAppID == input.SdkAppID || - (this.SdkAppID != null && - this.SdkAppID.Equals(input.SdkAppID)) - ) && - ( - this.SdkEncData == input.SdkEncData || - (this.SdkEncData != null && - this.SdkEncData.Equals(input.SdkEncData)) - ) && - ( - this.SdkEphemPubKey == input.SdkEphemPubKey || - (this.SdkEphemPubKey != null && - this.SdkEphemPubKey.Equals(input.SdkEphemPubKey)) - ) && - ( - this.SdkMaxTimeout == input.SdkMaxTimeout || - this.SdkMaxTimeout.Equals(input.SdkMaxTimeout) - ) && - ( - this.SdkReferenceNumber == input.SdkReferenceNumber || - (this.SdkReferenceNumber != null && - this.SdkReferenceNumber.Equals(input.SdkReferenceNumber)) - ) && - ( - this.SdkTransID == input.SdkTransID || - (this.SdkTransID != null && - this.SdkTransID.Equals(input.SdkTransID)) - ) && - ( - this.SdkVersion == input.SdkVersion || - (this.SdkVersion != null && - this.SdkVersion.Equals(input.SdkVersion)) - ) && - ( - this.ThreeDSCompInd == input.ThreeDSCompInd || - (this.ThreeDSCompInd != null && - this.ThreeDSCompInd.Equals(input.ThreeDSCompInd)) - ) && - ( - this.ThreeDSRequestorAuthenticationInd == input.ThreeDSRequestorAuthenticationInd || - (this.ThreeDSRequestorAuthenticationInd != null && - this.ThreeDSRequestorAuthenticationInd.Equals(input.ThreeDSRequestorAuthenticationInd)) - ) && - ( - this.ThreeDSRequestorAuthenticationInfo == input.ThreeDSRequestorAuthenticationInfo || - (this.ThreeDSRequestorAuthenticationInfo != null && - this.ThreeDSRequestorAuthenticationInfo.Equals(input.ThreeDSRequestorAuthenticationInfo)) - ) && - ( - this.ThreeDSRequestorChallengeInd == input.ThreeDSRequestorChallengeInd || - this.ThreeDSRequestorChallengeInd.Equals(input.ThreeDSRequestorChallengeInd) - ) && - ( - this.ThreeDSRequestorID == input.ThreeDSRequestorID || - (this.ThreeDSRequestorID != null && - this.ThreeDSRequestorID.Equals(input.ThreeDSRequestorID)) - ) && - ( - this.ThreeDSRequestorName == input.ThreeDSRequestorName || - (this.ThreeDSRequestorName != null && - this.ThreeDSRequestorName.Equals(input.ThreeDSRequestorName)) - ) && - ( - this.ThreeDSRequestorPriorAuthenticationInfo == input.ThreeDSRequestorPriorAuthenticationInfo || - (this.ThreeDSRequestorPriorAuthenticationInfo != null && - this.ThreeDSRequestorPriorAuthenticationInfo.Equals(input.ThreeDSRequestorPriorAuthenticationInfo)) - ) && - ( - this.ThreeDSRequestorURL == input.ThreeDSRequestorURL || - (this.ThreeDSRequestorURL != null && - this.ThreeDSRequestorURL.Equals(input.ThreeDSRequestorURL)) - ) && - ( - this.TransType == input.TransType || - this.TransType.Equals(input.TransType) - ) && - ( - this.TransactionType == input.TransactionType || - this.TransactionType.Equals(input.TransactionType) - ) && - ( - this.WhiteListStatus == input.WhiteListStatus || - (this.WhiteListStatus != null && - this.WhiteListStatus.Equals(input.WhiteListStatus)) - ) && - ( - this.WorkPhone == input.WorkPhone || - (this.WorkPhone != null && - this.WorkPhone.Equals(input.WorkPhone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcctInfo != null) - { - hashCode = (hashCode * 59) + this.AcctInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AcctType.GetHashCode(); - if (this.AcquirerBIN != null) - { - hashCode = (hashCode * 59) + this.AcquirerBIN.GetHashCode(); - } - if (this.AcquirerMerchantID != null) - { - hashCode = (hashCode * 59) + this.AcquirerMerchantID.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AddrMatch.GetHashCode(); - hashCode = (hashCode * 59) + this.AuthenticationOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.ChallengeIndicator.GetHashCode(); - if (this.DeviceChannel != null) - { - hashCode = (hashCode * 59) + this.DeviceChannel.GetHashCode(); - } - if (this.DeviceRenderOptions != null) - { - hashCode = (hashCode * 59) + this.DeviceRenderOptions.GetHashCode(); - } - if (this.HomePhone != null) - { - hashCode = (hashCode * 59) + this.HomePhone.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantName != null) - { - hashCode = (hashCode * 59) + this.MerchantName.GetHashCode(); - } - if (this.MessageVersion != null) - { - hashCode = (hashCode * 59) + this.MessageVersion.GetHashCode(); - } - if (this.MobilePhone != null) - { - hashCode = (hashCode * 59) + this.MobilePhone.GetHashCode(); - } - if (this.NotificationURL != null) - { - hashCode = (hashCode * 59) + this.NotificationURL.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayTokenInd.GetHashCode(); - if (this.PaymentAuthenticationUseCase != null) - { - hashCode = (hashCode * 59) + this.PaymentAuthenticationUseCase.GetHashCode(); - } - if (this.PurchaseInstalData != null) - { - hashCode = (hashCode * 59) + this.PurchaseInstalData.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - if (this.SdkAppID != null) - { - hashCode = (hashCode * 59) + this.SdkAppID.GetHashCode(); - } - if (this.SdkEncData != null) - { - hashCode = (hashCode * 59) + this.SdkEncData.GetHashCode(); - } - if (this.SdkEphemPubKey != null) - { - hashCode = (hashCode * 59) + this.SdkEphemPubKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SdkMaxTimeout.GetHashCode(); - if (this.SdkReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.SdkReferenceNumber.GetHashCode(); - } - if (this.SdkTransID != null) - { - hashCode = (hashCode * 59) + this.SdkTransID.GetHashCode(); - } - if (this.SdkVersion != null) - { - hashCode = (hashCode * 59) + this.SdkVersion.GetHashCode(); - } - if (this.ThreeDSCompInd != null) - { - hashCode = (hashCode * 59) + this.ThreeDSCompInd.GetHashCode(); - } - if (this.ThreeDSRequestorAuthenticationInd != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorAuthenticationInd.GetHashCode(); - } - if (this.ThreeDSRequestorAuthenticationInfo != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorAuthenticationInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSRequestorChallengeInd.GetHashCode(); - if (this.ThreeDSRequestorID != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorID.GetHashCode(); - } - if (this.ThreeDSRequestorName != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorName.GetHashCode(); - } - if (this.ThreeDSRequestorPriorAuthenticationInfo != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorPriorAuthenticationInfo.GetHashCode(); - } - if (this.ThreeDSRequestorURL != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorURL.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TransType.GetHashCode(); - hashCode = (hashCode * 59) + this.TransactionType.GetHashCode(); - if (this.WhiteListStatus != null) - { - hashCode = (hashCode * 59) + this.WhiteListStatus.GetHashCode(); - } - if (this.WorkPhone != null) - { - hashCode = (hashCode * 59) + this.WorkPhone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // PurchaseInstalData (string) maxLength - if (this.PurchaseInstalData != null && this.PurchaseInstalData.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PurchaseInstalData, length must be less than 3.", new [] { "PurchaseInstalData" }); - } - - // PurchaseInstalData (string) minLength - if (this.PurchaseInstalData != null && this.PurchaseInstalData.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PurchaseInstalData, length must be greater than 1.", new [] { "PurchaseInstalData" }); - } - - // RecurringFrequency (string) maxLength - if (this.RecurringFrequency != null && this.RecurringFrequency.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RecurringFrequency, length must be less than 4.", new [] { "RecurringFrequency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ThreeDS2RequestFields.cs b/Adyen/Model/Checkout/ThreeDS2RequestFields.cs deleted file mode 100644 index f53902a61..000000000 --- a/Adyen/Model/Checkout/ThreeDS2RequestFields.cs +++ /dev/null @@ -1,974 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ThreeDS2RequestFields - /// - [DataContract(Name = "ThreeDS2RequestFields")] - public partial class ThreeDS2RequestFields : IEquatable, IValidatableObject - { - /// - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - /// - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - [JsonConverter(typeof(StringEnumConverter))] - public enum AcctTypeEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3 - - } - - - /// - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - /// - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit - [DataMember(Name = "acctType", EmitDefaultValue = false)] - public AcctTypeEnum? AcctType { get; set; } - /// - /// Indicates whether the cardholder shipping Address and cardholder billing address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. - /// - /// Indicates whether the cardholder shipping Address and cardholder billing address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. - [JsonConverter(typeof(StringEnumConverter))] - public enum AddrMatchEnum - { - /// - /// Enum Y for value: Y - /// - [EnumMember(Value = "Y")] - Y = 1, - - /// - /// Enum N for value: N - /// - [EnumMember(Value = "N")] - N = 2 - - } - - - /// - /// Indicates whether the cardholder shipping Address and cardholder billing address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. - /// - /// Indicates whether the cardholder shipping Address and cardholder billing address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address. - [DataMember(Name = "addrMatch", EmitDefaultValue = false)] - public AddrMatchEnum? AddrMatch { get; set; } - /// - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - /// - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - [JsonConverter(typeof(StringEnumConverter))] - public enum ChallengeIndicatorEnum - { - /// - /// Enum NoPreference for value: noPreference - /// - [EnumMember(Value = "noPreference")] - NoPreference = 1, - - /// - /// Enum RequestNoChallenge for value: requestNoChallenge - /// - [EnumMember(Value = "requestNoChallenge")] - RequestNoChallenge = 2, - - /// - /// Enum RequestChallenge for value: requestChallenge - /// - [EnumMember(Value = "requestChallenge")] - RequestChallenge = 3, - - /// - /// Enum RequestChallengeAsMandate for value: requestChallengeAsMandate - /// - [EnumMember(Value = "requestChallengeAsMandate")] - RequestChallengeAsMandate = 4 - - } - - - /// - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - /// - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` - [DataMember(Name = "challengeIndicator", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v68. Use `threeDSRequestorChallengeInd` instead.")] - public ChallengeIndicatorEnum? ChallengeIndicator { get; set; } - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - [JsonConverter(typeof(StringEnumConverter))] - public enum ThreeDSRequestorChallengeIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 6 - - } - - - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - [DataMember(Name = "threeDSRequestorChallengeInd", EmitDefaultValue = false)] - public ThreeDSRequestorChallengeIndEnum? ThreeDSRequestorChallengeInd { get; set; } - /// - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - /// - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - [JsonConverter(typeof(StringEnumConverter))] - public enum TransTypeEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 2, - - /// - /// Enum _10 for value: 10 - /// - [EnumMember(Value = "10")] - _10 = 3, - - /// - /// Enum _11 for value: 11 - /// - [EnumMember(Value = "11")] - _11 = 4, - - /// - /// Enum _28 for value: 28 - /// - [EnumMember(Value = "28")] - _28 = 5 - - } - - - /// - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - /// - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load - [DataMember(Name = "transType", EmitDefaultValue = false)] - public TransTypeEnum? TransType { get; set; } - /// - /// Identify the type of the transaction being authenticated. - /// - /// Identify the type of the transaction being authenticated. - [JsonConverter(typeof(StringEnumConverter))] - public enum TransactionTypeEnum - { - /// - /// Enum GoodsOrServicePurchase for value: goodsOrServicePurchase - /// - [EnumMember(Value = "goodsOrServicePurchase")] - GoodsOrServicePurchase = 1, - - /// - /// Enum CheckAcceptance for value: checkAcceptance - /// - [EnumMember(Value = "checkAcceptance")] - CheckAcceptance = 2, - - /// - /// Enum AccountFunding for value: accountFunding - /// - [EnumMember(Value = "accountFunding")] - AccountFunding = 3, - - /// - /// Enum QuasiCashTransaction for value: quasiCashTransaction - /// - [EnumMember(Value = "quasiCashTransaction")] - QuasiCashTransaction = 4, - - /// - /// Enum PrepaidActivationAndLoad for value: prepaidActivationAndLoad - /// - [EnumMember(Value = "prepaidActivationAndLoad")] - PrepaidActivationAndLoad = 5 - - } - - - /// - /// Identify the type of the transaction being authenticated. - /// - /// Identify the type of the transaction being authenticated. - [DataMember(Name = "transactionType", EmitDefaultValue = false)] - public TransactionTypeEnum? TransactionType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// acctInfo. - /// Indicates the type of account. For example, for a multi-account card product. Length: 2 characters. Allowed values: * **01** — Not applicable * **02** — Credit * **03** — Debit. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform.. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform.. - /// Indicates whether the cardholder shipping Address and cardholder billing address are the same. Allowed values: * **Y** — Shipping Address matches Billing Address. * **N** — Shipping Address does not match Billing Address.. - /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. (default to false). - /// Possibility to specify a preference for receiving a challenge from the issuer. Allowed values: * `noPreference` * `requestNoChallenge` * `requestChallenge` * `requestChallengeAsMandate` . - /// deviceRenderOptions. - /// homePhone. - /// Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme.. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account.. - /// The `messageVersion` value indicating the 3D Secure 2 protocol version.. - /// mobilePhone. - /// URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**.. - /// Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS.. - /// Indicates the type of payment for which an authentication is requested (message extension). - /// Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters.. - /// Date after which no further authorisations shall be performed. Format: YYYYMMDD. - /// Indicates the minimum number of days between authorisations. Maximum length: 4 characters.. - /// The `sdkAppID` value as received from the 3D Secure 2 SDK.. - /// sdkEphemPubKey. - /// The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. (default to 60). - /// The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK.. - /// The `sdkTransID` value as received from the 3D Secure 2 SDK.. - /// Completion indicator for the device fingerprinting.. - /// Indicates the type of Authentication request.. - /// threeDSRequestorAuthenticationInfo. - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2.. - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2.. - /// threeDSRequestorPriorAuthenticationInfo. - /// URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process.. - /// Identifies the type of transaction being authenticated. Length: 2 characters. Allowed values: * **01** — Goods/Service Purchase * **03** — Check Acceptance * **10** — Account Funding * **11** — Quasi-Cash Transaction * **28** — Prepaid Activation and Load. - /// Identify the type of the transaction being authenticated.. - /// The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0.. - /// workPhone. - public ThreeDS2RequestFields(AcctInfo acctInfo = default(AcctInfo), AcctTypeEnum? acctType = default(AcctTypeEnum?), string acquirerBIN = default(string), string acquirerMerchantID = default(string), AddrMatchEnum? addrMatch = default(AddrMatchEnum?), bool? authenticationOnly = false, ChallengeIndicatorEnum? challengeIndicator = default(ChallengeIndicatorEnum?), DeviceRenderOptions deviceRenderOptions = default(DeviceRenderOptions), Phone homePhone = default(Phone), string mcc = default(string), string merchantName = default(string), string messageVersion = default(string), Phone mobilePhone = default(Phone), string notificationURL = default(string), bool? payTokenInd = default(bool?), string paymentAuthenticationUseCase = default(string), string purchaseInstalData = default(string), string recurringExpiry = default(string), string recurringFrequency = default(string), string sdkAppID = default(string), SDKEphemPubKey sdkEphemPubKey = default(SDKEphemPubKey), int? sdkMaxTimeout = 60, string sdkReferenceNumber = default(string), string sdkTransID = default(string), string threeDSCompInd = default(string), string threeDSRequestorAuthenticationInd = default(string), ThreeDSRequestorAuthenticationInfo threeDSRequestorAuthenticationInfo = default(ThreeDSRequestorAuthenticationInfo), ThreeDSRequestorChallengeIndEnum? threeDSRequestorChallengeInd = default(ThreeDSRequestorChallengeIndEnum?), string threeDSRequestorID = default(string), string threeDSRequestorName = default(string), ThreeDSRequestorPriorAuthenticationInfo threeDSRequestorPriorAuthenticationInfo = default(ThreeDSRequestorPriorAuthenticationInfo), string threeDSRequestorURL = default(string), TransTypeEnum? transType = default(TransTypeEnum?), TransactionTypeEnum? transactionType = default(TransactionTypeEnum?), string whiteListStatus = default(string), Phone workPhone = default(Phone)) - { - this.AcctInfo = acctInfo; - this.AcctType = acctType; - this.AcquirerBIN = acquirerBIN; - this.AcquirerMerchantID = acquirerMerchantID; - this.AddrMatch = addrMatch; - this.AuthenticationOnly = authenticationOnly; - this.ChallengeIndicator = challengeIndicator; - this.DeviceRenderOptions = deviceRenderOptions; - this.HomePhone = homePhone; - this.Mcc = mcc; - this.MerchantName = merchantName; - this.MessageVersion = messageVersion; - this.MobilePhone = mobilePhone; - this.NotificationURL = notificationURL; - this.PayTokenInd = payTokenInd; - this.PaymentAuthenticationUseCase = paymentAuthenticationUseCase; - this.PurchaseInstalData = purchaseInstalData; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.SdkAppID = sdkAppID; - this.SdkEphemPubKey = sdkEphemPubKey; - this.SdkMaxTimeout = sdkMaxTimeout; - this.SdkReferenceNumber = sdkReferenceNumber; - this.SdkTransID = sdkTransID; - this.ThreeDSCompInd = threeDSCompInd; - this.ThreeDSRequestorAuthenticationInd = threeDSRequestorAuthenticationInd; - this.ThreeDSRequestorAuthenticationInfo = threeDSRequestorAuthenticationInfo; - this.ThreeDSRequestorChallengeInd = threeDSRequestorChallengeInd; - this.ThreeDSRequestorID = threeDSRequestorID; - this.ThreeDSRequestorName = threeDSRequestorName; - this.ThreeDSRequestorPriorAuthenticationInfo = threeDSRequestorPriorAuthenticationInfo; - this.ThreeDSRequestorURL = threeDSRequestorURL; - this.TransType = transType; - this.TransactionType = transactionType; - this.WhiteListStatus = whiteListStatus; - this.WorkPhone = workPhone; - } - - /// - /// Gets or Sets AcctInfo - /// - [DataMember(Name = "acctInfo", EmitDefaultValue = false)] - public AcctInfo AcctInfo { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The acquiring BIN enrolled for 3D Secure 2. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - [DataMember(Name = "acquirerBIN", EmitDefaultValue = false)] - public string AcquirerBIN { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchantId that is enrolled for 3D Secure 2 by the merchant's acquirer. This string should match the value that you will use in the authorisation. Use 123456 on the Test platform. - [DataMember(Name = "acquirerMerchantID", EmitDefaultValue = false)] - public string AcquirerMerchantID { get; set; } - - /// - /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - /// - /// If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only), and not the payment authorisation. - [DataMember(Name = "authenticationOnly", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v50. Use `threeDSAuthenticationOnly` instead.")] - public bool? AuthenticationOnly { get; set; } - - /// - /// Gets or Sets DeviceRenderOptions - /// - [DataMember(Name = "deviceRenderOptions", EmitDefaultValue = false)] - public DeviceRenderOptions DeviceRenderOptions { get; set; } - - /// - /// Gets or Sets HomePhone - /// - [DataMember(Name = "homePhone", EmitDefaultValue = false)] - public Phone HomePhone { get; set; } - - /// - /// Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. - /// - /// Required for merchants that have been enrolled for 3D Secure 2 by another party than Adyen, mostly [authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The `mcc` is a four-digit code with which the previously given `acquirerMerchantID` is registered at the scheme. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). The merchant name that the issuer presents to the shopper if they get a challenge. We recommend to use the same value that you will use in the authorization. Maximum length is 40 characters. > Optional for a [full 3D Secure 2 integration](https://docs.adyen.com/online-payments/3d-secure/native-3ds2/api-integration). Use this field if you are enrolled for 3D Secure 2 with us and want to override the merchant name already configured on your account. - [DataMember(Name = "merchantName", EmitDefaultValue = false)] - public string MerchantName { get; set; } - - /// - /// The `messageVersion` value indicating the 3D Secure 2 protocol version. - /// - /// The `messageVersion` value indicating the 3D Secure 2 protocol version. - [DataMember(Name = "messageVersion", EmitDefaultValue = false)] - public string MessageVersion { get; set; } - - /// - /// Gets or Sets MobilePhone - /// - [DataMember(Name = "mobilePhone", EmitDefaultValue = false)] - public Phone MobilePhone { get; set; } - - /// - /// URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. - /// - /// URL to where the issuer should send the `CRes`. Required if you are not using components for `channel` **Web** or if you are using classic integration `deviceChannel` **browser**. - [DataMember(Name = "notificationURL", EmitDefaultValue = false)] - public string NotificationURL { get; set; } - - /// - /// Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS. - /// - /// Value **true** indicates that the transaction was de-tokenised prior to being received by the ACS. - [DataMember(Name = "payTokenInd", EmitDefaultValue = false)] - public bool? PayTokenInd { get; set; } - - /// - /// Indicates the type of payment for which an authentication is requested (message extension) - /// - /// Indicates the type of payment for which an authentication is requested (message extension) - [DataMember(Name = "paymentAuthenticationUseCase", EmitDefaultValue = false)] - public string PaymentAuthenticationUseCase { get; set; } - - /// - /// Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters. - /// - /// Indicates the maximum number of authorisations permitted for instalment payments. Length: 1–3 characters. - [DataMember(Name = "purchaseInstalData", EmitDefaultValue = false)] - public string PurchaseInstalData { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Format: YYYYMMDD - /// - /// Date after which no further authorisations shall be performed. Format: YYYYMMDD - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public string RecurringExpiry { get; set; } - - /// - /// Indicates the minimum number of days between authorisations. Maximum length: 4 characters. - /// - /// Indicates the minimum number of days between authorisations. Maximum length: 4 characters. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// The `sdkAppID` value as received from the 3D Secure 2 SDK. - /// - /// The `sdkAppID` value as received from the 3D Secure 2 SDK. - [DataMember(Name = "sdkAppID", EmitDefaultValue = false)] - public string SdkAppID { get; set; } - - /// - /// Gets or Sets SdkEphemPubKey - /// - [DataMember(Name = "sdkEphemPubKey", EmitDefaultValue = false)] - public SDKEphemPubKey SdkEphemPubKey { get; set; } - - /// - /// The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. - /// - /// The maximum amount of time in minutes for the 3D Secure 2 authentication process. Optional and only for `deviceChannel` set to **app**. Defaults to **60** minutes. - [DataMember(Name = "sdkMaxTimeout", EmitDefaultValue = false)] - public int? SdkMaxTimeout { get; set; } - - /// - /// The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. - /// - /// The `sdkReferenceNumber` value as received from the 3D Secure 2 SDK. - [DataMember(Name = "sdkReferenceNumber", EmitDefaultValue = false)] - public string SdkReferenceNumber { get; set; } - - /// - /// The `sdkTransID` value as received from the 3D Secure 2 SDK. - /// - /// The `sdkTransID` value as received from the 3D Secure 2 SDK. - [DataMember(Name = "sdkTransID", EmitDefaultValue = false)] - public string SdkTransID { get; set; } - - /// - /// Completion indicator for the device fingerprinting. - /// - /// Completion indicator for the device fingerprinting. - [DataMember(Name = "threeDSCompInd", EmitDefaultValue = false)] - public string ThreeDSCompInd { get; set; } - - /// - /// Indicates the type of Authentication request. - /// - /// Indicates the type of Authentication request. - [DataMember(Name = "threeDSRequestorAuthenticationInd", EmitDefaultValue = false)] - public string ThreeDSRequestorAuthenticationInd { get; set; } - - /// - /// Gets or Sets ThreeDSRequestorAuthenticationInfo - /// - [DataMember(Name = "threeDSRequestorAuthenticationInfo", EmitDefaultValue = false)] - public ThreeDSRequestorAuthenticationInfo ThreeDSRequestorAuthenticationInfo { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor identifier assigned by the Directory Server when you enrol for 3D Secure 2. - [DataMember(Name = "threeDSRequestorID", EmitDefaultValue = false)] - public string ThreeDSRequestorID { get; set; } - - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. - /// - /// Required for [authentication-only integration](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only) for Visa. Unique 3D Secure requestor name assigned by the Directory Server when you enrol for 3D Secure 2. - [DataMember(Name = "threeDSRequestorName", EmitDefaultValue = false)] - public string ThreeDSRequestorName { get; set; } - - /// - /// Gets or Sets ThreeDSRequestorPriorAuthenticationInfo - /// - [DataMember(Name = "threeDSRequestorPriorAuthenticationInfo", EmitDefaultValue = false)] - public ThreeDSRequestorPriorAuthenticationInfo ThreeDSRequestorPriorAuthenticationInfo { get; set; } - - /// - /// URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. - /// - /// URL of the (customer service) website that will be shown to the shopper in case of technical errors during the 3D Secure 2 process. - [DataMember(Name = "threeDSRequestorURL", EmitDefaultValue = false)] - public string ThreeDSRequestorURL { get; set; } - - /// - /// The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. - /// - /// The `whiteListStatus` value returned from a previous 3D Secure 2 transaction, only applicable for 3D Secure 2 protocol version 2.2.0. - [DataMember(Name = "whiteListStatus", EmitDefaultValue = false)] - public string WhiteListStatus { get; set; } - - /// - /// Gets or Sets WorkPhone - /// - [DataMember(Name = "workPhone", EmitDefaultValue = false)] - public Phone WorkPhone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDS2RequestFields {\n"); - sb.Append(" AcctInfo: ").Append(AcctInfo).Append("\n"); - sb.Append(" AcctType: ").Append(AcctType).Append("\n"); - sb.Append(" AcquirerBIN: ").Append(AcquirerBIN).Append("\n"); - sb.Append(" AcquirerMerchantID: ").Append(AcquirerMerchantID).Append("\n"); - sb.Append(" AddrMatch: ").Append(AddrMatch).Append("\n"); - sb.Append(" AuthenticationOnly: ").Append(AuthenticationOnly).Append("\n"); - sb.Append(" ChallengeIndicator: ").Append(ChallengeIndicator).Append("\n"); - sb.Append(" DeviceRenderOptions: ").Append(DeviceRenderOptions).Append("\n"); - sb.Append(" HomePhone: ").Append(HomePhone).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantName: ").Append(MerchantName).Append("\n"); - sb.Append(" MessageVersion: ").Append(MessageVersion).Append("\n"); - sb.Append(" MobilePhone: ").Append(MobilePhone).Append("\n"); - sb.Append(" NotificationURL: ").Append(NotificationURL).Append("\n"); - sb.Append(" PayTokenInd: ").Append(PayTokenInd).Append("\n"); - sb.Append(" PaymentAuthenticationUseCase: ").Append(PaymentAuthenticationUseCase).Append("\n"); - sb.Append(" PurchaseInstalData: ").Append(PurchaseInstalData).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" SdkAppID: ").Append(SdkAppID).Append("\n"); - sb.Append(" SdkEphemPubKey: ").Append(SdkEphemPubKey).Append("\n"); - sb.Append(" SdkMaxTimeout: ").Append(SdkMaxTimeout).Append("\n"); - sb.Append(" SdkReferenceNumber: ").Append(SdkReferenceNumber).Append("\n"); - sb.Append(" SdkTransID: ").Append(SdkTransID).Append("\n"); - sb.Append(" ThreeDSCompInd: ").Append(ThreeDSCompInd).Append("\n"); - sb.Append(" ThreeDSRequestorAuthenticationInd: ").Append(ThreeDSRequestorAuthenticationInd).Append("\n"); - sb.Append(" ThreeDSRequestorAuthenticationInfo: ").Append(ThreeDSRequestorAuthenticationInfo).Append("\n"); - sb.Append(" ThreeDSRequestorChallengeInd: ").Append(ThreeDSRequestorChallengeInd).Append("\n"); - sb.Append(" ThreeDSRequestorID: ").Append(ThreeDSRequestorID).Append("\n"); - sb.Append(" ThreeDSRequestorName: ").Append(ThreeDSRequestorName).Append("\n"); - sb.Append(" ThreeDSRequestorPriorAuthenticationInfo: ").Append(ThreeDSRequestorPriorAuthenticationInfo).Append("\n"); - sb.Append(" ThreeDSRequestorURL: ").Append(ThreeDSRequestorURL).Append("\n"); - sb.Append(" TransType: ").Append(TransType).Append("\n"); - sb.Append(" TransactionType: ").Append(TransactionType).Append("\n"); - sb.Append(" WhiteListStatus: ").Append(WhiteListStatus).Append("\n"); - sb.Append(" WorkPhone: ").Append(WorkPhone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDS2RequestFields); - } - - /// - /// Returns true if ThreeDS2RequestFields instances are equal - /// - /// Instance of ThreeDS2RequestFields to be compared - /// Boolean - public bool Equals(ThreeDS2RequestFields input) - { - if (input == null) - { - return false; - } - return - ( - this.AcctInfo == input.AcctInfo || - (this.AcctInfo != null && - this.AcctInfo.Equals(input.AcctInfo)) - ) && - ( - this.AcctType == input.AcctType || - this.AcctType.Equals(input.AcctType) - ) && - ( - this.AcquirerBIN == input.AcquirerBIN || - (this.AcquirerBIN != null && - this.AcquirerBIN.Equals(input.AcquirerBIN)) - ) && - ( - this.AcquirerMerchantID == input.AcquirerMerchantID || - (this.AcquirerMerchantID != null && - this.AcquirerMerchantID.Equals(input.AcquirerMerchantID)) - ) && - ( - this.AddrMatch == input.AddrMatch || - this.AddrMatch.Equals(input.AddrMatch) - ) && - ( - this.AuthenticationOnly == input.AuthenticationOnly || - this.AuthenticationOnly.Equals(input.AuthenticationOnly) - ) && - ( - this.ChallengeIndicator == input.ChallengeIndicator || - this.ChallengeIndicator.Equals(input.ChallengeIndicator) - ) && - ( - this.DeviceRenderOptions == input.DeviceRenderOptions || - (this.DeviceRenderOptions != null && - this.DeviceRenderOptions.Equals(input.DeviceRenderOptions)) - ) && - ( - this.HomePhone == input.HomePhone || - (this.HomePhone != null && - this.HomePhone.Equals(input.HomePhone)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantName == input.MerchantName || - (this.MerchantName != null && - this.MerchantName.Equals(input.MerchantName)) - ) && - ( - this.MessageVersion == input.MessageVersion || - (this.MessageVersion != null && - this.MessageVersion.Equals(input.MessageVersion)) - ) && - ( - this.MobilePhone == input.MobilePhone || - (this.MobilePhone != null && - this.MobilePhone.Equals(input.MobilePhone)) - ) && - ( - this.NotificationURL == input.NotificationURL || - (this.NotificationURL != null && - this.NotificationURL.Equals(input.NotificationURL)) - ) && - ( - this.PayTokenInd == input.PayTokenInd || - this.PayTokenInd.Equals(input.PayTokenInd) - ) && - ( - this.PaymentAuthenticationUseCase == input.PaymentAuthenticationUseCase || - (this.PaymentAuthenticationUseCase != null && - this.PaymentAuthenticationUseCase.Equals(input.PaymentAuthenticationUseCase)) - ) && - ( - this.PurchaseInstalData == input.PurchaseInstalData || - (this.PurchaseInstalData != null && - this.PurchaseInstalData.Equals(input.PurchaseInstalData)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.SdkAppID == input.SdkAppID || - (this.SdkAppID != null && - this.SdkAppID.Equals(input.SdkAppID)) - ) && - ( - this.SdkEphemPubKey == input.SdkEphemPubKey || - (this.SdkEphemPubKey != null && - this.SdkEphemPubKey.Equals(input.SdkEphemPubKey)) - ) && - ( - this.SdkMaxTimeout == input.SdkMaxTimeout || - this.SdkMaxTimeout.Equals(input.SdkMaxTimeout) - ) && - ( - this.SdkReferenceNumber == input.SdkReferenceNumber || - (this.SdkReferenceNumber != null && - this.SdkReferenceNumber.Equals(input.SdkReferenceNumber)) - ) && - ( - this.SdkTransID == input.SdkTransID || - (this.SdkTransID != null && - this.SdkTransID.Equals(input.SdkTransID)) - ) && - ( - this.ThreeDSCompInd == input.ThreeDSCompInd || - (this.ThreeDSCompInd != null && - this.ThreeDSCompInd.Equals(input.ThreeDSCompInd)) - ) && - ( - this.ThreeDSRequestorAuthenticationInd == input.ThreeDSRequestorAuthenticationInd || - (this.ThreeDSRequestorAuthenticationInd != null && - this.ThreeDSRequestorAuthenticationInd.Equals(input.ThreeDSRequestorAuthenticationInd)) - ) && - ( - this.ThreeDSRequestorAuthenticationInfo == input.ThreeDSRequestorAuthenticationInfo || - (this.ThreeDSRequestorAuthenticationInfo != null && - this.ThreeDSRequestorAuthenticationInfo.Equals(input.ThreeDSRequestorAuthenticationInfo)) - ) && - ( - this.ThreeDSRequestorChallengeInd == input.ThreeDSRequestorChallengeInd || - this.ThreeDSRequestorChallengeInd.Equals(input.ThreeDSRequestorChallengeInd) - ) && - ( - this.ThreeDSRequestorID == input.ThreeDSRequestorID || - (this.ThreeDSRequestorID != null && - this.ThreeDSRequestorID.Equals(input.ThreeDSRequestorID)) - ) && - ( - this.ThreeDSRequestorName == input.ThreeDSRequestorName || - (this.ThreeDSRequestorName != null && - this.ThreeDSRequestorName.Equals(input.ThreeDSRequestorName)) - ) && - ( - this.ThreeDSRequestorPriorAuthenticationInfo == input.ThreeDSRequestorPriorAuthenticationInfo || - (this.ThreeDSRequestorPriorAuthenticationInfo != null && - this.ThreeDSRequestorPriorAuthenticationInfo.Equals(input.ThreeDSRequestorPriorAuthenticationInfo)) - ) && - ( - this.ThreeDSRequestorURL == input.ThreeDSRequestorURL || - (this.ThreeDSRequestorURL != null && - this.ThreeDSRequestorURL.Equals(input.ThreeDSRequestorURL)) - ) && - ( - this.TransType == input.TransType || - this.TransType.Equals(input.TransType) - ) && - ( - this.TransactionType == input.TransactionType || - this.TransactionType.Equals(input.TransactionType) - ) && - ( - this.WhiteListStatus == input.WhiteListStatus || - (this.WhiteListStatus != null && - this.WhiteListStatus.Equals(input.WhiteListStatus)) - ) && - ( - this.WorkPhone == input.WorkPhone || - (this.WorkPhone != null && - this.WorkPhone.Equals(input.WorkPhone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcctInfo != null) - { - hashCode = (hashCode * 59) + this.AcctInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AcctType.GetHashCode(); - if (this.AcquirerBIN != null) - { - hashCode = (hashCode * 59) + this.AcquirerBIN.GetHashCode(); - } - if (this.AcquirerMerchantID != null) - { - hashCode = (hashCode * 59) + this.AcquirerMerchantID.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AddrMatch.GetHashCode(); - hashCode = (hashCode * 59) + this.AuthenticationOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.ChallengeIndicator.GetHashCode(); - if (this.DeviceRenderOptions != null) - { - hashCode = (hashCode * 59) + this.DeviceRenderOptions.GetHashCode(); - } - if (this.HomePhone != null) - { - hashCode = (hashCode * 59) + this.HomePhone.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantName != null) - { - hashCode = (hashCode * 59) + this.MerchantName.GetHashCode(); - } - if (this.MessageVersion != null) - { - hashCode = (hashCode * 59) + this.MessageVersion.GetHashCode(); - } - if (this.MobilePhone != null) - { - hashCode = (hashCode * 59) + this.MobilePhone.GetHashCode(); - } - if (this.NotificationURL != null) - { - hashCode = (hashCode * 59) + this.NotificationURL.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayTokenInd.GetHashCode(); - if (this.PaymentAuthenticationUseCase != null) - { - hashCode = (hashCode * 59) + this.PaymentAuthenticationUseCase.GetHashCode(); - } - if (this.PurchaseInstalData != null) - { - hashCode = (hashCode * 59) + this.PurchaseInstalData.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - if (this.SdkAppID != null) - { - hashCode = (hashCode * 59) + this.SdkAppID.GetHashCode(); - } - if (this.SdkEphemPubKey != null) - { - hashCode = (hashCode * 59) + this.SdkEphemPubKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SdkMaxTimeout.GetHashCode(); - if (this.SdkReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.SdkReferenceNumber.GetHashCode(); - } - if (this.SdkTransID != null) - { - hashCode = (hashCode * 59) + this.SdkTransID.GetHashCode(); - } - if (this.ThreeDSCompInd != null) - { - hashCode = (hashCode * 59) + this.ThreeDSCompInd.GetHashCode(); - } - if (this.ThreeDSRequestorAuthenticationInd != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorAuthenticationInd.GetHashCode(); - } - if (this.ThreeDSRequestorAuthenticationInfo != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorAuthenticationInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSRequestorChallengeInd.GetHashCode(); - if (this.ThreeDSRequestorID != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorID.GetHashCode(); - } - if (this.ThreeDSRequestorName != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorName.GetHashCode(); - } - if (this.ThreeDSRequestorPriorAuthenticationInfo != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorPriorAuthenticationInfo.GetHashCode(); - } - if (this.ThreeDSRequestorURL != null) - { - hashCode = (hashCode * 59) + this.ThreeDSRequestorURL.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TransType.GetHashCode(); - hashCode = (hashCode * 59) + this.TransactionType.GetHashCode(); - if (this.WhiteListStatus != null) - { - hashCode = (hashCode * 59) + this.WhiteListStatus.GetHashCode(); - } - if (this.WorkPhone != null) - { - hashCode = (hashCode * 59) + this.WorkPhone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // PurchaseInstalData (string) maxLength - if (this.PurchaseInstalData != null && this.PurchaseInstalData.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PurchaseInstalData, length must be less than 3.", new [] { "PurchaseInstalData" }); - } - - // PurchaseInstalData (string) minLength - if (this.PurchaseInstalData != null && this.PurchaseInstalData.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PurchaseInstalData, length must be greater than 1.", new [] { "PurchaseInstalData" }); - } - - // RecurringFrequency (string) maxLength - if (this.RecurringFrequency != null && this.RecurringFrequency.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RecurringFrequency, length must be less than 4.", new [] { "RecurringFrequency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ThreeDS2ResponseData.cs b/Adyen/Model/Checkout/ThreeDS2ResponseData.cs deleted file mode 100644 index b2e7a8fee..000000000 --- a/Adyen/Model/Checkout/ThreeDS2ResponseData.cs +++ /dev/null @@ -1,452 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ThreeDS2ResponseData - /// - [DataContract(Name = "ThreeDS2ResponseData")] - public partial class ThreeDS2ResponseData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// acsChallengeMandated. - /// acsOperatorID. - /// acsReferenceNumber. - /// acsSignedContent. - /// acsTransID. - /// acsURL. - /// authenticationType. - /// cardHolderInfo. - /// cavvAlgorithm. - /// challengeIndicator. - /// dsReferenceNumber. - /// dsTransID. - /// exemptionIndicator. - /// messageVersion. - /// riskScore. - /// sdkEphemPubKey. - /// threeDSServerTransID. - /// transStatus. - /// transStatusReason. - public ThreeDS2ResponseData(string acsChallengeMandated = default(string), string acsOperatorID = default(string), string acsReferenceNumber = default(string), string acsSignedContent = default(string), string acsTransID = default(string), string acsURL = default(string), string authenticationType = default(string), string cardHolderInfo = default(string), string cavvAlgorithm = default(string), string challengeIndicator = default(string), string dsReferenceNumber = default(string), string dsTransID = default(string), string exemptionIndicator = default(string), string messageVersion = default(string), string riskScore = default(string), string sdkEphemPubKey = default(string), string threeDSServerTransID = default(string), string transStatus = default(string), string transStatusReason = default(string)) - { - this.AcsChallengeMandated = acsChallengeMandated; - this.AcsOperatorID = acsOperatorID; - this.AcsReferenceNumber = acsReferenceNumber; - this.AcsSignedContent = acsSignedContent; - this.AcsTransID = acsTransID; - this.AcsURL = acsURL; - this.AuthenticationType = authenticationType; - this.CardHolderInfo = cardHolderInfo; - this.CavvAlgorithm = cavvAlgorithm; - this.ChallengeIndicator = challengeIndicator; - this.DsReferenceNumber = dsReferenceNumber; - this.DsTransID = dsTransID; - this.ExemptionIndicator = exemptionIndicator; - this.MessageVersion = messageVersion; - this.RiskScore = riskScore; - this.SdkEphemPubKey = sdkEphemPubKey; - this.ThreeDSServerTransID = threeDSServerTransID; - this.TransStatus = transStatus; - this.TransStatusReason = transStatusReason; - } - - /// - /// Gets or Sets AcsChallengeMandated - /// - [DataMember(Name = "acsChallengeMandated", EmitDefaultValue = false)] - public string AcsChallengeMandated { get; set; } - - /// - /// Gets or Sets AcsOperatorID - /// - [DataMember(Name = "acsOperatorID", EmitDefaultValue = false)] - public string AcsOperatorID { get; set; } - - /// - /// Gets or Sets AcsReferenceNumber - /// - [DataMember(Name = "acsReferenceNumber", EmitDefaultValue = false)] - public string AcsReferenceNumber { get; set; } - - /// - /// Gets or Sets AcsSignedContent - /// - [DataMember(Name = "acsSignedContent", EmitDefaultValue = false)] - public string AcsSignedContent { get; set; } - - /// - /// Gets or Sets AcsTransID - /// - [DataMember(Name = "acsTransID", EmitDefaultValue = false)] - public string AcsTransID { get; set; } - - /// - /// Gets or Sets AcsURL - /// - [DataMember(Name = "acsURL", EmitDefaultValue = false)] - public string AcsURL { get; set; } - - /// - /// Gets or Sets AuthenticationType - /// - [DataMember(Name = "authenticationType", EmitDefaultValue = false)] - public string AuthenticationType { get; set; } - - /// - /// Gets or Sets CardHolderInfo - /// - [DataMember(Name = "cardHolderInfo", EmitDefaultValue = false)] - public string CardHolderInfo { get; set; } - - /// - /// Gets or Sets CavvAlgorithm - /// - [DataMember(Name = "cavvAlgorithm", EmitDefaultValue = false)] - public string CavvAlgorithm { get; set; } - - /// - /// Gets or Sets ChallengeIndicator - /// - [DataMember(Name = "challengeIndicator", EmitDefaultValue = false)] - public string ChallengeIndicator { get; set; } - - /// - /// Gets or Sets DsReferenceNumber - /// - [DataMember(Name = "dsReferenceNumber", EmitDefaultValue = false)] - public string DsReferenceNumber { get; set; } - - /// - /// Gets or Sets DsTransID - /// - [DataMember(Name = "dsTransID", EmitDefaultValue = false)] - public string DsTransID { get; set; } - - /// - /// Gets or Sets ExemptionIndicator - /// - [DataMember(Name = "exemptionIndicator", EmitDefaultValue = false)] - public string ExemptionIndicator { get; set; } - - /// - /// Gets or Sets MessageVersion - /// - [DataMember(Name = "messageVersion", EmitDefaultValue = false)] - public string MessageVersion { get; set; } - - /// - /// Gets or Sets RiskScore - /// - [DataMember(Name = "riskScore", EmitDefaultValue = false)] - public string RiskScore { get; set; } - - /// - /// Gets or Sets SdkEphemPubKey - /// - [DataMember(Name = "sdkEphemPubKey", EmitDefaultValue = false)] - public string SdkEphemPubKey { get; set; } - - /// - /// Gets or Sets ThreeDSServerTransID - /// - [DataMember(Name = "threeDSServerTransID", EmitDefaultValue = false)] - public string ThreeDSServerTransID { get; set; } - - /// - /// Gets or Sets TransStatus - /// - [DataMember(Name = "transStatus", EmitDefaultValue = false)] - public string TransStatus { get; set; } - - /// - /// Gets or Sets TransStatusReason - /// - [DataMember(Name = "transStatusReason", EmitDefaultValue = false)] - public string TransStatusReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDS2ResponseData {\n"); - sb.Append(" AcsChallengeMandated: ").Append(AcsChallengeMandated).Append("\n"); - sb.Append(" AcsOperatorID: ").Append(AcsOperatorID).Append("\n"); - sb.Append(" AcsReferenceNumber: ").Append(AcsReferenceNumber).Append("\n"); - sb.Append(" AcsSignedContent: ").Append(AcsSignedContent).Append("\n"); - sb.Append(" AcsTransID: ").Append(AcsTransID).Append("\n"); - sb.Append(" AcsURL: ").Append(AcsURL).Append("\n"); - sb.Append(" AuthenticationType: ").Append(AuthenticationType).Append("\n"); - sb.Append(" CardHolderInfo: ").Append(CardHolderInfo).Append("\n"); - sb.Append(" CavvAlgorithm: ").Append(CavvAlgorithm).Append("\n"); - sb.Append(" ChallengeIndicator: ").Append(ChallengeIndicator).Append("\n"); - sb.Append(" DsReferenceNumber: ").Append(DsReferenceNumber).Append("\n"); - sb.Append(" DsTransID: ").Append(DsTransID).Append("\n"); - sb.Append(" ExemptionIndicator: ").Append(ExemptionIndicator).Append("\n"); - sb.Append(" MessageVersion: ").Append(MessageVersion).Append("\n"); - sb.Append(" RiskScore: ").Append(RiskScore).Append("\n"); - sb.Append(" SdkEphemPubKey: ").Append(SdkEphemPubKey).Append("\n"); - sb.Append(" ThreeDSServerTransID: ").Append(ThreeDSServerTransID).Append("\n"); - sb.Append(" TransStatus: ").Append(TransStatus).Append("\n"); - sb.Append(" TransStatusReason: ").Append(TransStatusReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDS2ResponseData); - } - - /// - /// Returns true if ThreeDS2ResponseData instances are equal - /// - /// Instance of ThreeDS2ResponseData to be compared - /// Boolean - public bool Equals(ThreeDS2ResponseData input) - { - if (input == null) - { - return false; - } - return - ( - this.AcsChallengeMandated == input.AcsChallengeMandated || - (this.AcsChallengeMandated != null && - this.AcsChallengeMandated.Equals(input.AcsChallengeMandated)) - ) && - ( - this.AcsOperatorID == input.AcsOperatorID || - (this.AcsOperatorID != null && - this.AcsOperatorID.Equals(input.AcsOperatorID)) - ) && - ( - this.AcsReferenceNumber == input.AcsReferenceNumber || - (this.AcsReferenceNumber != null && - this.AcsReferenceNumber.Equals(input.AcsReferenceNumber)) - ) && - ( - this.AcsSignedContent == input.AcsSignedContent || - (this.AcsSignedContent != null && - this.AcsSignedContent.Equals(input.AcsSignedContent)) - ) && - ( - this.AcsTransID == input.AcsTransID || - (this.AcsTransID != null && - this.AcsTransID.Equals(input.AcsTransID)) - ) && - ( - this.AcsURL == input.AcsURL || - (this.AcsURL != null && - this.AcsURL.Equals(input.AcsURL)) - ) && - ( - this.AuthenticationType == input.AuthenticationType || - (this.AuthenticationType != null && - this.AuthenticationType.Equals(input.AuthenticationType)) - ) && - ( - this.CardHolderInfo == input.CardHolderInfo || - (this.CardHolderInfo != null && - this.CardHolderInfo.Equals(input.CardHolderInfo)) - ) && - ( - this.CavvAlgorithm == input.CavvAlgorithm || - (this.CavvAlgorithm != null && - this.CavvAlgorithm.Equals(input.CavvAlgorithm)) - ) && - ( - this.ChallengeIndicator == input.ChallengeIndicator || - (this.ChallengeIndicator != null && - this.ChallengeIndicator.Equals(input.ChallengeIndicator)) - ) && - ( - this.DsReferenceNumber == input.DsReferenceNumber || - (this.DsReferenceNumber != null && - this.DsReferenceNumber.Equals(input.DsReferenceNumber)) - ) && - ( - this.DsTransID == input.DsTransID || - (this.DsTransID != null && - this.DsTransID.Equals(input.DsTransID)) - ) && - ( - this.ExemptionIndicator == input.ExemptionIndicator || - (this.ExemptionIndicator != null && - this.ExemptionIndicator.Equals(input.ExemptionIndicator)) - ) && - ( - this.MessageVersion == input.MessageVersion || - (this.MessageVersion != null && - this.MessageVersion.Equals(input.MessageVersion)) - ) && - ( - this.RiskScore == input.RiskScore || - (this.RiskScore != null && - this.RiskScore.Equals(input.RiskScore)) - ) && - ( - this.SdkEphemPubKey == input.SdkEphemPubKey || - (this.SdkEphemPubKey != null && - this.SdkEphemPubKey.Equals(input.SdkEphemPubKey)) - ) && - ( - this.ThreeDSServerTransID == input.ThreeDSServerTransID || - (this.ThreeDSServerTransID != null && - this.ThreeDSServerTransID.Equals(input.ThreeDSServerTransID)) - ) && - ( - this.TransStatus == input.TransStatus || - (this.TransStatus != null && - this.TransStatus.Equals(input.TransStatus)) - ) && - ( - this.TransStatusReason == input.TransStatusReason || - (this.TransStatusReason != null && - this.TransStatusReason.Equals(input.TransStatusReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcsChallengeMandated != null) - { - hashCode = (hashCode * 59) + this.AcsChallengeMandated.GetHashCode(); - } - if (this.AcsOperatorID != null) - { - hashCode = (hashCode * 59) + this.AcsOperatorID.GetHashCode(); - } - if (this.AcsReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.AcsReferenceNumber.GetHashCode(); - } - if (this.AcsSignedContent != null) - { - hashCode = (hashCode * 59) + this.AcsSignedContent.GetHashCode(); - } - if (this.AcsTransID != null) - { - hashCode = (hashCode * 59) + this.AcsTransID.GetHashCode(); - } - if (this.AcsURL != null) - { - hashCode = (hashCode * 59) + this.AcsURL.GetHashCode(); - } - if (this.AuthenticationType != null) - { - hashCode = (hashCode * 59) + this.AuthenticationType.GetHashCode(); - } - if (this.CardHolderInfo != null) - { - hashCode = (hashCode * 59) + this.CardHolderInfo.GetHashCode(); - } - if (this.CavvAlgorithm != null) - { - hashCode = (hashCode * 59) + this.CavvAlgorithm.GetHashCode(); - } - if (this.ChallengeIndicator != null) - { - hashCode = (hashCode * 59) + this.ChallengeIndicator.GetHashCode(); - } - if (this.DsReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.DsReferenceNumber.GetHashCode(); - } - if (this.DsTransID != null) - { - hashCode = (hashCode * 59) + this.DsTransID.GetHashCode(); - } - if (this.ExemptionIndicator != null) - { - hashCode = (hashCode * 59) + this.ExemptionIndicator.GetHashCode(); - } - if (this.MessageVersion != null) - { - hashCode = (hashCode * 59) + this.MessageVersion.GetHashCode(); - } - if (this.RiskScore != null) - { - hashCode = (hashCode * 59) + this.RiskScore.GetHashCode(); - } - if (this.SdkEphemPubKey != null) - { - hashCode = (hashCode * 59) + this.SdkEphemPubKey.GetHashCode(); - } - if (this.ThreeDSServerTransID != null) - { - hashCode = (hashCode * 59) + this.ThreeDSServerTransID.GetHashCode(); - } - if (this.TransStatus != null) - { - hashCode = (hashCode * 59) + this.TransStatus.GetHashCode(); - } - if (this.TransStatusReason != null) - { - hashCode = (hashCode * 59) + this.TransStatusReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ThreeDS2Result.cs b/Adyen/Model/Checkout/ThreeDS2Result.cs deleted file mode 100644 index 1589c9f2e..000000000 --- a/Adyen/Model/Checkout/ThreeDS2Result.cs +++ /dev/null @@ -1,493 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ThreeDS2Result - /// - [DataContract(Name = "ThreeDS2Result")] - public partial class ThreeDS2Result : IEquatable, IValidatableObject - { - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - [JsonConverter(typeof(StringEnumConverter))] - public enum ChallengeCancelEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 6, - - /// - /// Enum _07 for value: 07 - /// - [EnumMember(Value = "07")] - _07 = 7 - - } - - - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - [DataMember(Name = "challengeCancel", EmitDefaultValue = false)] - public ChallengeCancelEnum? ChallengeCancel { get; set; } - /// - /// Indicates the exemption type that was applied by the issuer to the authentication, if exemption applied. Allowed values: * `lowValue` * `secureCorporate` * `trustedBeneficiary` * `transactionRiskAnalysis` - /// - /// Indicates the exemption type that was applied by the issuer to the authentication, if exemption applied. Allowed values: * `lowValue` * `secureCorporate` * `trustedBeneficiary` * `transactionRiskAnalysis` - [JsonConverter(typeof(StringEnumConverter))] - public enum ExemptionIndicatorEnum - { - /// - /// Enum LowValue for value: lowValue - /// - [EnumMember(Value = "lowValue")] - LowValue = 1, - - /// - /// Enum SecureCorporate for value: secureCorporate - /// - [EnumMember(Value = "secureCorporate")] - SecureCorporate = 2, - - /// - /// Enum TrustedBeneficiary for value: trustedBeneficiary - /// - [EnumMember(Value = "trustedBeneficiary")] - TrustedBeneficiary = 3, - - /// - /// Enum TransactionRiskAnalysis for value: transactionRiskAnalysis - /// - [EnumMember(Value = "transactionRiskAnalysis")] - TransactionRiskAnalysis = 4 - - } - - - /// - /// Indicates the exemption type that was applied by the issuer to the authentication, if exemption applied. Allowed values: * `lowValue` * `secureCorporate` * `trustedBeneficiary` * `transactionRiskAnalysis` - /// - /// Indicates the exemption type that was applied by the issuer to the authentication, if exemption applied. Allowed values: * `lowValue` * `secureCorporate` * `trustedBeneficiary` * `transactionRiskAnalysis` - [DataMember(Name = "exemptionIndicator", EmitDefaultValue = false)] - public ExemptionIndicatorEnum? ExemptionIndicator { get; set; } - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - [JsonConverter(typeof(StringEnumConverter))] - public enum ThreeDSRequestorChallengeIndEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 6 - - } - - - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - /// - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only - [DataMember(Name = "threeDSRequestorChallengeInd", EmitDefaultValue = false)] - public ThreeDSRequestorChallengeIndEnum? ThreeDSRequestorChallengeInd { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The `authenticationValue` value as defined in the 3D Secure 2 specification.. - /// The algorithm used by the ACS to calculate the authentication value, only for Cartes Bancaires integrations.. - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata).. - /// The `dsTransID` value as defined in the 3D Secure 2 specification.. - /// The `eci` value as defined in the 3D Secure 2 specification.. - /// Indicates the exemption type that was applied by the issuer to the authentication, if exemption applied. Allowed values: * `lowValue` * `secureCorporate` * `trustedBeneficiary` * `transactionRiskAnalysis` . - /// The `messageVersion` value as defined in the 3D Secure 2 specification.. - /// Risk score calculated by Cartes Bancaires Directory Server (DS).. - /// Indicates whether a challenge is requested for this transaction. Possible values: * **01** — No preference * **02** — No challenge requested * **03** — Challenge requested (3DS Requestor preference) * **04** — Challenge requested (Mandate) * **05** — No challenge (transactional risk analysis is already performed) * **06** — Data Only. - /// The `threeDSServerTransID` value as defined in the 3D Secure 2 specification.. - /// The `timestamp` value of the 3D Secure 2 authentication.. - /// The `transStatus` value as defined in the 3D Secure 2 specification.. - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values).. - /// The `whiteListStatus` value as defined in the 3D Secure 2 specification.. - public ThreeDS2Result(string authenticationValue = default(string), string cavvAlgorithm = default(string), ChallengeCancelEnum? challengeCancel = default(ChallengeCancelEnum?), string dsTransID = default(string), string eci = default(string), ExemptionIndicatorEnum? exemptionIndicator = default(ExemptionIndicatorEnum?), string messageVersion = default(string), string riskScore = default(string), ThreeDSRequestorChallengeIndEnum? threeDSRequestorChallengeInd = default(ThreeDSRequestorChallengeIndEnum?), string threeDSServerTransID = default(string), string timestamp = default(string), string transStatus = default(string), string transStatusReason = default(string), string whiteListStatus = default(string)) - { - this.AuthenticationValue = authenticationValue; - this.CavvAlgorithm = cavvAlgorithm; - this.ChallengeCancel = challengeCancel; - this.DsTransID = dsTransID; - this.Eci = eci; - this.ExemptionIndicator = exemptionIndicator; - this.MessageVersion = messageVersion; - this.RiskScore = riskScore; - this.ThreeDSRequestorChallengeInd = threeDSRequestorChallengeInd; - this.ThreeDSServerTransID = threeDSServerTransID; - this.Timestamp = timestamp; - this.TransStatus = transStatus; - this.TransStatusReason = transStatusReason; - this.WhiteListStatus = whiteListStatus; - } - - /// - /// The `authenticationValue` value as defined in the 3D Secure 2 specification. - /// - /// The `authenticationValue` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "authenticationValue", EmitDefaultValue = false)] - public string AuthenticationValue { get; set; } - - /// - /// The algorithm used by the ACS to calculate the authentication value, only for Cartes Bancaires integrations. - /// - /// The algorithm used by the ACS to calculate the authentication value, only for Cartes Bancaires integrations. - [DataMember(Name = "cavvAlgorithm", EmitDefaultValue = false)] - public string CavvAlgorithm { get; set; } - - /// - /// The `dsTransID` value as defined in the 3D Secure 2 specification. - /// - /// The `dsTransID` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "dsTransID", EmitDefaultValue = false)] - public string DsTransID { get; set; } - - /// - /// The `eci` value as defined in the 3D Secure 2 specification. - /// - /// The `eci` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "eci", EmitDefaultValue = false)] - public string Eci { get; set; } - - /// - /// The `messageVersion` value as defined in the 3D Secure 2 specification. - /// - /// The `messageVersion` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "messageVersion", EmitDefaultValue = false)] - public string MessageVersion { get; set; } - - /// - /// Risk score calculated by Cartes Bancaires Directory Server (DS). - /// - /// Risk score calculated by Cartes Bancaires Directory Server (DS). - [DataMember(Name = "riskScore", EmitDefaultValue = false)] - public string RiskScore { get; set; } - - /// - /// The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. - /// - /// The `threeDSServerTransID` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "threeDSServerTransID", EmitDefaultValue = false)] - public string ThreeDSServerTransID { get; set; } - - /// - /// The `timestamp` value of the 3D Secure 2 authentication. - /// - /// The `timestamp` value of the 3D Secure 2 authentication. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public string Timestamp { get; set; } - - /// - /// The `transStatus` value as defined in the 3D Secure 2 specification. - /// - /// The `transStatus` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "transStatus", EmitDefaultValue = false)] - public string TransStatus { get; set; } - - /// - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - /// - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - [DataMember(Name = "transStatusReason", EmitDefaultValue = false)] - public string TransStatusReason { get; set; } - - /// - /// The `whiteListStatus` value as defined in the 3D Secure 2 specification. - /// - /// The `whiteListStatus` value as defined in the 3D Secure 2 specification. - [DataMember(Name = "whiteListStatus", EmitDefaultValue = false)] - public string WhiteListStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDS2Result {\n"); - sb.Append(" AuthenticationValue: ").Append(AuthenticationValue).Append("\n"); - sb.Append(" CavvAlgorithm: ").Append(CavvAlgorithm).Append("\n"); - sb.Append(" ChallengeCancel: ").Append(ChallengeCancel).Append("\n"); - sb.Append(" DsTransID: ").Append(DsTransID).Append("\n"); - sb.Append(" Eci: ").Append(Eci).Append("\n"); - sb.Append(" ExemptionIndicator: ").Append(ExemptionIndicator).Append("\n"); - sb.Append(" MessageVersion: ").Append(MessageVersion).Append("\n"); - sb.Append(" RiskScore: ").Append(RiskScore).Append("\n"); - sb.Append(" ThreeDSRequestorChallengeInd: ").Append(ThreeDSRequestorChallengeInd).Append("\n"); - sb.Append(" ThreeDSServerTransID: ").Append(ThreeDSServerTransID).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" TransStatus: ").Append(TransStatus).Append("\n"); - sb.Append(" TransStatusReason: ").Append(TransStatusReason).Append("\n"); - sb.Append(" WhiteListStatus: ").Append(WhiteListStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDS2Result); - } - - /// - /// Returns true if ThreeDS2Result instances are equal - /// - /// Instance of ThreeDS2Result to be compared - /// Boolean - public bool Equals(ThreeDS2Result input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthenticationValue == input.AuthenticationValue || - (this.AuthenticationValue != null && - this.AuthenticationValue.Equals(input.AuthenticationValue)) - ) && - ( - this.CavvAlgorithm == input.CavvAlgorithm || - (this.CavvAlgorithm != null && - this.CavvAlgorithm.Equals(input.CavvAlgorithm)) - ) && - ( - this.ChallengeCancel == input.ChallengeCancel || - this.ChallengeCancel.Equals(input.ChallengeCancel) - ) && - ( - this.DsTransID == input.DsTransID || - (this.DsTransID != null && - this.DsTransID.Equals(input.DsTransID)) - ) && - ( - this.Eci == input.Eci || - (this.Eci != null && - this.Eci.Equals(input.Eci)) - ) && - ( - this.ExemptionIndicator == input.ExemptionIndicator || - this.ExemptionIndicator.Equals(input.ExemptionIndicator) - ) && - ( - this.MessageVersion == input.MessageVersion || - (this.MessageVersion != null && - this.MessageVersion.Equals(input.MessageVersion)) - ) && - ( - this.RiskScore == input.RiskScore || - (this.RiskScore != null && - this.RiskScore.Equals(input.RiskScore)) - ) && - ( - this.ThreeDSRequestorChallengeInd == input.ThreeDSRequestorChallengeInd || - this.ThreeDSRequestorChallengeInd.Equals(input.ThreeDSRequestorChallengeInd) - ) && - ( - this.ThreeDSServerTransID == input.ThreeDSServerTransID || - (this.ThreeDSServerTransID != null && - this.ThreeDSServerTransID.Equals(input.ThreeDSServerTransID)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.TransStatus == input.TransStatus || - (this.TransStatus != null && - this.TransStatus.Equals(input.TransStatus)) - ) && - ( - this.TransStatusReason == input.TransStatusReason || - (this.TransStatusReason != null && - this.TransStatusReason.Equals(input.TransStatusReason)) - ) && - ( - this.WhiteListStatus == input.WhiteListStatus || - (this.WhiteListStatus != null && - this.WhiteListStatus.Equals(input.WhiteListStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthenticationValue != null) - { - hashCode = (hashCode * 59) + this.AuthenticationValue.GetHashCode(); - } - if (this.CavvAlgorithm != null) - { - hashCode = (hashCode * 59) + this.CavvAlgorithm.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ChallengeCancel.GetHashCode(); - if (this.DsTransID != null) - { - hashCode = (hashCode * 59) + this.DsTransID.GetHashCode(); - } - if (this.Eci != null) - { - hashCode = (hashCode * 59) + this.Eci.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExemptionIndicator.GetHashCode(); - if (this.MessageVersion != null) - { - hashCode = (hashCode * 59) + this.MessageVersion.GetHashCode(); - } - if (this.RiskScore != null) - { - hashCode = (hashCode * 59) + this.RiskScore.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSRequestorChallengeInd.GetHashCode(); - if (this.ThreeDSServerTransID != null) - { - hashCode = (hashCode * 59) + this.ThreeDSServerTransID.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - if (this.TransStatus != null) - { - hashCode = (hashCode * 59) + this.TransStatus.GetHashCode(); - } - if (this.TransStatusReason != null) - { - hashCode = (hashCode * 59) + this.TransStatusReason.GetHashCode(); - } - if (this.WhiteListStatus != null) - { - hashCode = (hashCode * 59) + this.WhiteListStatus.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ThreeDSRequestData.cs b/Adyen/Model/Checkout/ThreeDSRequestData.cs deleted file mode 100644 index 4b5d418bb..000000000 --- a/Adyen/Model/Checkout/ThreeDSRequestData.cs +++ /dev/null @@ -1,272 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ThreeDSRequestData - /// - [DataContract(Name = "ThreeDSRequestData")] - public partial class ThreeDSRequestData : IEquatable, IValidatableObject - { - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - [JsonConverter(typeof(StringEnumConverter))] - public enum ChallengeWindowSizeEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5 - - } - - - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen - [DataMember(Name = "challengeWindowSize", EmitDefaultValue = false)] - public ChallengeWindowSizeEnum? ChallengeWindowSize { get; set; } - /// - /// Required to trigger the [data-only flow](https://docs.adyen.com/online-payments/3d-secure/data-only/). When set to **true**, forces the 3D Secure 2 data-only flow for all transactions where it is possible. - /// - /// Required to trigger the [data-only flow](https://docs.adyen.com/online-payments/3d-secure/data-only/). When set to **true**, forces the 3D Secure 2 data-only flow for all transactions where it is possible. - [JsonConverter(typeof(StringEnumConverter))] - public enum DataOnlyEnum - { - /// - /// Enum False for value: false - /// - [EnumMember(Value = "false")] - False = 1, - - /// - /// Enum True for value: true - /// - [EnumMember(Value = "true")] - True = 2 - - } - - - /// - /// Required to trigger the [data-only flow](https://docs.adyen.com/online-payments/3d-secure/data-only/). When set to **true**, forces the 3D Secure 2 data-only flow for all transactions where it is possible. - /// - /// Required to trigger the [data-only flow](https://docs.adyen.com/online-payments/3d-secure/data-only/). When set to **true**, forces the 3D Secure 2 data-only flow for all transactions where it is possible. - [DataMember(Name = "dataOnly", EmitDefaultValue = false)] - public DataOnlyEnum? DataOnly { get; set; } - /// - /// Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be triggered when available. Adyen can still select to fallback to the redirect flow to optimize authorization rates and improve the shopper's experience. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Use the redirect 3D Secure authentication flow. - /// - /// Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be triggered when available. Adyen can still select to fallback to the redirect flow to optimize authorization rates and improve the shopper's experience. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Use the redirect 3D Secure authentication flow. - [JsonConverter(typeof(StringEnumConverter))] - public enum NativeThreeDSEnum - { - /// - /// Enum Preferred for value: preferred - /// - [EnumMember(Value = "preferred")] - Preferred = 1, - - /// - /// Enum Disabled for value: disabled - /// - [EnumMember(Value = "disabled")] - Disabled = 2 - - } - - - /// - /// Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be triggered when available. Adyen can still select to fallback to the redirect flow to optimize authorization rates and improve the shopper's experience. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Use the redirect 3D Secure authentication flow. - /// - /// Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be triggered when available. Adyen can still select to fallback to the redirect flow to optimize authorization rates and improve the shopper's experience. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Use the redirect 3D Secure authentication flow. - [DataMember(Name = "nativeThreeDS", EmitDefaultValue = false)] - public NativeThreeDSEnum? NativeThreeDS { get; set; } - /// - /// The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0** - /// - /// The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0** - [JsonConverter(typeof(StringEnumConverter))] - public enum ThreeDSVersionEnum - { - /// - /// Enum _10 for value: 2.1.0 - /// - [EnumMember(Value = "2.1.0")] - _10 = 1, - - /// - /// Enum _20 for value: 2.2.0 - /// - [EnumMember(Value = "2.2.0")] - _20 = 2 - - } - - - /// - /// The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0** - /// - /// The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0** - [DataMember(Name = "threeDSVersion", EmitDefaultValue = false)] - public ThreeDSVersionEnum? ThreeDSVersion { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Dimensions of the 3DS2 challenge window to be displayed to the cardholder. Possible values: * **01** - size of 250x400 * **02** - size of 390x400 * **03** - size of 500x600 * **04** - size of 600x400 * **05** - Fullscreen. - /// Required to trigger the [data-only flow](https://docs.adyen.com/online-payments/3d-secure/data-only/). When set to **true**, forces the 3D Secure 2 data-only flow for all transactions where it is possible. . - /// Indicates if [native 3D Secure authentication](https://docs.adyen.com/online-payments/3d-secure/native-3ds2) should be triggered when available. Adyen can still select to fallback to the redirect flow to optimize authorization rates and improve the shopper's experience. Possible values: * **preferred**: Use native 3D Secure authentication when available. * **disabled**: Use the redirect 3D Secure authentication flow.. - /// The version of 3D Secure to use. Possible values: * **2.1.0** * **2.2.0**. - public ThreeDSRequestData(ChallengeWindowSizeEnum? challengeWindowSize = default(ChallengeWindowSizeEnum?), DataOnlyEnum? dataOnly = default(DataOnlyEnum?), NativeThreeDSEnum? nativeThreeDS = default(NativeThreeDSEnum?), ThreeDSVersionEnum? threeDSVersion = default(ThreeDSVersionEnum?)) - { - this.ChallengeWindowSize = challengeWindowSize; - this.DataOnly = dataOnly; - this.NativeThreeDS = nativeThreeDS; - this.ThreeDSVersion = threeDSVersion; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDSRequestData {\n"); - sb.Append(" ChallengeWindowSize: ").Append(ChallengeWindowSize).Append("\n"); - sb.Append(" DataOnly: ").Append(DataOnly).Append("\n"); - sb.Append(" NativeThreeDS: ").Append(NativeThreeDS).Append("\n"); - sb.Append(" ThreeDSVersion: ").Append(ThreeDSVersion).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDSRequestData); - } - - /// - /// Returns true if ThreeDSRequestData instances are equal - /// - /// Instance of ThreeDSRequestData to be compared - /// Boolean - public bool Equals(ThreeDSRequestData input) - { - if (input == null) - { - return false; - } - return - ( - this.ChallengeWindowSize == input.ChallengeWindowSize || - this.ChallengeWindowSize.Equals(input.ChallengeWindowSize) - ) && - ( - this.DataOnly == input.DataOnly || - this.DataOnly.Equals(input.DataOnly) - ) && - ( - this.NativeThreeDS == input.NativeThreeDS || - this.NativeThreeDS.Equals(input.NativeThreeDS) - ) && - ( - this.ThreeDSVersion == input.ThreeDSVersion || - this.ThreeDSVersion.Equals(input.ThreeDSVersion) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ChallengeWindowSize.GetHashCode(); - hashCode = (hashCode * 59) + this.DataOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.NativeThreeDS.GetHashCode(); - hashCode = (hashCode * 59) + this.ThreeDSVersion.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.cs b/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.cs deleted file mode 100644 index a4574f947..000000000 --- a/Adyen/Model/Checkout/ThreeDSRequestorAuthenticationInfo.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ThreeDSRequestorAuthenticationInfo - /// - [DataContract(Name = "ThreeDSRequestorAuthenticationInfo")] - public partial class ThreeDSRequestorAuthenticationInfo : IEquatable, IValidatableObject - { - /// - /// Mechanism used by the Cardholder to authenticate to the 3DS Requestor. Allowed values: * **01** — No 3DS Requestor authentication occurred (for example, cardholder “logged in” as guest). * **02** — Login to the cardholder account at the 3DS Requestor system using 3DS Requestor’s own credentials. * **03** — Login to the cardholder account at the 3DS Requestor system using federated ID. * **04** — Login to the cardholder account at the 3DS Requestor system using issuer credentials. * **05** — Login to the cardholder account at the 3DS Requestor system using third-party authentication. * **06** — Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator. - /// - /// Mechanism used by the Cardholder to authenticate to the 3DS Requestor. Allowed values: * **01** — No 3DS Requestor authentication occurred (for example, cardholder “logged in” as guest). * **02** — Login to the cardholder account at the 3DS Requestor system using 3DS Requestor’s own credentials. * **03** — Login to the cardholder account at the 3DS Requestor system using federated ID. * **04** — Login to the cardholder account at the 3DS Requestor system using issuer credentials. * **05** — Login to the cardholder account at the 3DS Requestor system using third-party authentication. * **06** — Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator. - [JsonConverter(typeof(StringEnumConverter))] - public enum ThreeDSReqAuthMethodEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 6 - - } - - - /// - /// Mechanism used by the Cardholder to authenticate to the 3DS Requestor. Allowed values: * **01** — No 3DS Requestor authentication occurred (for example, cardholder “logged in” as guest). * **02** — Login to the cardholder account at the 3DS Requestor system using 3DS Requestor’s own credentials. * **03** — Login to the cardholder account at the 3DS Requestor system using federated ID. * **04** — Login to the cardholder account at the 3DS Requestor system using issuer credentials. * **05** — Login to the cardholder account at the 3DS Requestor system using third-party authentication. * **06** — Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator. - /// - /// Mechanism used by the Cardholder to authenticate to the 3DS Requestor. Allowed values: * **01** — No 3DS Requestor authentication occurred (for example, cardholder “logged in” as guest). * **02** — Login to the cardholder account at the 3DS Requestor system using 3DS Requestor’s own credentials. * **03** — Login to the cardholder account at the 3DS Requestor system using federated ID. * **04** — Login to the cardholder account at the 3DS Requestor system using issuer credentials. * **05** — Login to the cardholder account at the 3DS Requestor system using third-party authentication. * **06** — Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator. - [DataMember(Name = "threeDSReqAuthMethod", EmitDefaultValue = false)] - public ThreeDSReqAuthMethodEnum? ThreeDSReqAuthMethod { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Data that documents and supports a specific authentication process. Maximum length: 2048 bytes.. - /// Mechanism used by the Cardholder to authenticate to the 3DS Requestor. Allowed values: * **01** — No 3DS Requestor authentication occurred (for example, cardholder “logged in” as guest). * **02** — Login to the cardholder account at the 3DS Requestor system using 3DS Requestor’s own credentials. * **03** — Login to the cardholder account at the 3DS Requestor system using federated ID. * **04** — Login to the cardholder account at the 3DS Requestor system using issuer credentials. * **05** — Login to the cardholder account at the 3DS Requestor system using third-party authentication. * **06** — Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator.. - /// Date and time in UTC of the cardholder authentication. Format: YYYYMMDDHHMM. - public ThreeDSRequestorAuthenticationInfo(string threeDSReqAuthData = default(string), ThreeDSReqAuthMethodEnum? threeDSReqAuthMethod = default(ThreeDSReqAuthMethodEnum?), string threeDSReqAuthTimestamp = default(string)) - { - this.ThreeDSReqAuthData = threeDSReqAuthData; - this.ThreeDSReqAuthMethod = threeDSReqAuthMethod; - this.ThreeDSReqAuthTimestamp = threeDSReqAuthTimestamp; - } - - /// - /// Data that documents and supports a specific authentication process. Maximum length: 2048 bytes. - /// - /// Data that documents and supports a specific authentication process. Maximum length: 2048 bytes. - [DataMember(Name = "threeDSReqAuthData", EmitDefaultValue = false)] - public string ThreeDSReqAuthData { get; set; } - - /// - /// Date and time in UTC of the cardholder authentication. Format: YYYYMMDDHHMM - /// - /// Date and time in UTC of the cardholder authentication. Format: YYYYMMDDHHMM - [DataMember(Name = "threeDSReqAuthTimestamp", EmitDefaultValue = false)] - public string ThreeDSReqAuthTimestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDSRequestorAuthenticationInfo {\n"); - sb.Append(" ThreeDSReqAuthData: ").Append(ThreeDSReqAuthData).Append("\n"); - sb.Append(" ThreeDSReqAuthMethod: ").Append(ThreeDSReqAuthMethod).Append("\n"); - sb.Append(" ThreeDSReqAuthTimestamp: ").Append(ThreeDSReqAuthTimestamp).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDSRequestorAuthenticationInfo); - } - - /// - /// Returns true if ThreeDSRequestorAuthenticationInfo instances are equal - /// - /// Instance of ThreeDSRequestorAuthenticationInfo to be compared - /// Boolean - public bool Equals(ThreeDSRequestorAuthenticationInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ThreeDSReqAuthData == input.ThreeDSReqAuthData || - (this.ThreeDSReqAuthData != null && - this.ThreeDSReqAuthData.Equals(input.ThreeDSReqAuthData)) - ) && - ( - this.ThreeDSReqAuthMethod == input.ThreeDSReqAuthMethod || - this.ThreeDSReqAuthMethod.Equals(input.ThreeDSReqAuthMethod) - ) && - ( - this.ThreeDSReqAuthTimestamp == input.ThreeDSReqAuthTimestamp || - (this.ThreeDSReqAuthTimestamp != null && - this.ThreeDSReqAuthTimestamp.Equals(input.ThreeDSReqAuthTimestamp)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ThreeDSReqAuthData != null) - { - hashCode = (hashCode * 59) + this.ThreeDSReqAuthData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSReqAuthMethod.GetHashCode(); - if (this.ThreeDSReqAuthTimestamp != null) - { - hashCode = (hashCode * 59) + this.ThreeDSReqAuthTimestamp.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ThreeDSReqAuthTimestamp (string) maxLength - if (this.ThreeDSReqAuthTimestamp != null && this.ThreeDSReqAuthTimestamp.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDSReqAuthTimestamp, length must be less than 12.", new [] { "ThreeDSReqAuthTimestamp" }); - } - - // ThreeDSReqAuthTimestamp (string) minLength - if (this.ThreeDSReqAuthTimestamp != null && this.ThreeDSReqAuthTimestamp.Length < 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDSReqAuthTimestamp, length must be greater than 12.", new [] { "ThreeDSReqAuthTimestamp" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.cs b/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.cs deleted file mode 100644 index 25f873932..000000000 --- a/Adyen/Model/Checkout/ThreeDSRequestorPriorAuthenticationInfo.cs +++ /dev/null @@ -1,239 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ThreeDSRequestorPriorAuthenticationInfo - /// - [DataContract(Name = "ThreeDSRequestorPriorAuthenticationInfo")] - public partial class ThreeDSRequestorPriorAuthenticationInfo : IEquatable, IValidatableObject - { - /// - /// Mechanism used by the Cardholder to previously authenticate to the 3DS Requestor. Allowed values: * **01** — Frictionless authentication occurred by ACS. * **02** — Cardholder challenge occurred by ACS. * **03** — AVS verified. * **04** — Other issuer methods. - /// - /// Mechanism used by the Cardholder to previously authenticate to the 3DS Requestor. Allowed values: * **01** — Frictionless authentication occurred by ACS. * **02** — Cardholder challenge occurred by ACS. * **03** — AVS verified. * **04** — Other issuer methods. - [JsonConverter(typeof(StringEnumConverter))] - public enum ThreeDSReqPriorAuthMethodEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4 - - } - - - /// - /// Mechanism used by the Cardholder to previously authenticate to the 3DS Requestor. Allowed values: * **01** — Frictionless authentication occurred by ACS. * **02** — Cardholder challenge occurred by ACS. * **03** — AVS verified. * **04** — Other issuer methods. - /// - /// Mechanism used by the Cardholder to previously authenticate to the 3DS Requestor. Allowed values: * **01** — Frictionless authentication occurred by ACS. * **02** — Cardholder challenge occurred by ACS. * **03** — AVS verified. * **04** — Other issuer methods. - [DataMember(Name = "threeDSReqPriorAuthMethod", EmitDefaultValue = false)] - public ThreeDSReqPriorAuthMethodEnum? ThreeDSReqPriorAuthMethod { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Data that documents and supports a specific authentication process. Maximum length: 2048 bytes.. - /// Mechanism used by the Cardholder to previously authenticate to the 3DS Requestor. Allowed values: * **01** — Frictionless authentication occurred by ACS. * **02** — Cardholder challenge occurred by ACS. * **03** — AVS verified. * **04** — Other issuer methods.. - /// Date and time in UTC of the prior cardholder authentication. Format: YYYYMMDDHHMM. - /// This data element provides additional information to the ACS to determine the best approach for handing a request. This data element contains an ACS Transaction ID for a prior authenticated transaction. For example, the first recurring transaction that was authenticated with the cardholder. Length: 30 characters.. - public ThreeDSRequestorPriorAuthenticationInfo(string threeDSReqPriorAuthData = default(string), ThreeDSReqPriorAuthMethodEnum? threeDSReqPriorAuthMethod = default(ThreeDSReqPriorAuthMethodEnum?), string threeDSReqPriorAuthTimestamp = default(string), string threeDSReqPriorRef = default(string)) - { - this.ThreeDSReqPriorAuthData = threeDSReqPriorAuthData; - this.ThreeDSReqPriorAuthMethod = threeDSReqPriorAuthMethod; - this.ThreeDSReqPriorAuthTimestamp = threeDSReqPriorAuthTimestamp; - this.ThreeDSReqPriorRef = threeDSReqPriorRef; - } - - /// - /// Data that documents and supports a specific authentication process. Maximum length: 2048 bytes. - /// - /// Data that documents and supports a specific authentication process. Maximum length: 2048 bytes. - [DataMember(Name = "threeDSReqPriorAuthData", EmitDefaultValue = false)] - public string ThreeDSReqPriorAuthData { get; set; } - - /// - /// Date and time in UTC of the prior cardholder authentication. Format: YYYYMMDDHHMM - /// - /// Date and time in UTC of the prior cardholder authentication. Format: YYYYMMDDHHMM - [DataMember(Name = "threeDSReqPriorAuthTimestamp", EmitDefaultValue = false)] - public string ThreeDSReqPriorAuthTimestamp { get; set; } - - /// - /// This data element provides additional information to the ACS to determine the best approach for handing a request. This data element contains an ACS Transaction ID for a prior authenticated transaction. For example, the first recurring transaction that was authenticated with the cardholder. Length: 30 characters. - /// - /// This data element provides additional information to the ACS to determine the best approach for handing a request. This data element contains an ACS Transaction ID for a prior authenticated transaction. For example, the first recurring transaction that was authenticated with the cardholder. Length: 30 characters. - [DataMember(Name = "threeDSReqPriorRef", EmitDefaultValue = false)] - public string ThreeDSReqPriorRef { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDSRequestorPriorAuthenticationInfo {\n"); - sb.Append(" ThreeDSReqPriorAuthData: ").Append(ThreeDSReqPriorAuthData).Append("\n"); - sb.Append(" ThreeDSReqPriorAuthMethod: ").Append(ThreeDSReqPriorAuthMethod).Append("\n"); - sb.Append(" ThreeDSReqPriorAuthTimestamp: ").Append(ThreeDSReqPriorAuthTimestamp).Append("\n"); - sb.Append(" ThreeDSReqPriorRef: ").Append(ThreeDSReqPriorRef).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDSRequestorPriorAuthenticationInfo); - } - - /// - /// Returns true if ThreeDSRequestorPriorAuthenticationInfo instances are equal - /// - /// Instance of ThreeDSRequestorPriorAuthenticationInfo to be compared - /// Boolean - public bool Equals(ThreeDSRequestorPriorAuthenticationInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ThreeDSReqPriorAuthData == input.ThreeDSReqPriorAuthData || - (this.ThreeDSReqPriorAuthData != null && - this.ThreeDSReqPriorAuthData.Equals(input.ThreeDSReqPriorAuthData)) - ) && - ( - this.ThreeDSReqPriorAuthMethod == input.ThreeDSReqPriorAuthMethod || - this.ThreeDSReqPriorAuthMethod.Equals(input.ThreeDSReqPriorAuthMethod) - ) && - ( - this.ThreeDSReqPriorAuthTimestamp == input.ThreeDSReqPriorAuthTimestamp || - (this.ThreeDSReqPriorAuthTimestamp != null && - this.ThreeDSReqPriorAuthTimestamp.Equals(input.ThreeDSReqPriorAuthTimestamp)) - ) && - ( - this.ThreeDSReqPriorRef == input.ThreeDSReqPriorRef || - (this.ThreeDSReqPriorRef != null && - this.ThreeDSReqPriorRef.Equals(input.ThreeDSReqPriorRef)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ThreeDSReqPriorAuthData != null) - { - hashCode = (hashCode * 59) + this.ThreeDSReqPriorAuthData.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ThreeDSReqPriorAuthMethod.GetHashCode(); - if (this.ThreeDSReqPriorAuthTimestamp != null) - { - hashCode = (hashCode * 59) + this.ThreeDSReqPriorAuthTimestamp.GetHashCode(); - } - if (this.ThreeDSReqPriorRef != null) - { - hashCode = (hashCode * 59) + this.ThreeDSReqPriorRef.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ThreeDSReqPriorAuthTimestamp (string) maxLength - if (this.ThreeDSReqPriorAuthTimestamp != null && this.ThreeDSReqPriorAuthTimestamp.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDSReqPriorAuthTimestamp, length must be less than 12.", new [] { "ThreeDSReqPriorAuthTimestamp" }); - } - - // ThreeDSReqPriorAuthTimestamp (string) minLength - if (this.ThreeDSReqPriorAuthTimestamp != null && this.ThreeDSReqPriorAuthTimestamp.Length < 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDSReqPriorAuthTimestamp, length must be greater than 12.", new [] { "ThreeDSReqPriorAuthTimestamp" }); - } - - // ThreeDSReqPriorRef (string) maxLength - if (this.ThreeDSReqPriorRef != null && this.ThreeDSReqPriorRef.Length > 36) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDSReqPriorRef, length must be less than 36.", new [] { "ThreeDSReqPriorRef" }); - } - - // ThreeDSReqPriorRef (string) minLength - if (this.ThreeDSReqPriorRef != null && this.ThreeDSReqPriorRef.Length < 36) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ThreeDSReqPriorRef, length must be greater than 36.", new [] { "ThreeDSReqPriorRef" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ThreeDSecureData.cs b/Adyen/Model/Checkout/ThreeDSecureData.cs deleted file mode 100644 index 9688f6845..000000000 --- a/Adyen/Model/Checkout/ThreeDSecureData.cs +++ /dev/null @@ -1,467 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ThreeDSecureData - /// - [DataContract(Name = "ThreeDSecureData")] - public partial class ThreeDSecureData : IEquatable, IValidatableObject - { - /// - /// In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. - /// - /// In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. - [JsonConverter(typeof(StringEnumConverter))] - public enum AuthenticationResponseEnum - { - /// - /// Enum Y for value: Y - /// - [EnumMember(Value = "Y")] - Y = 1, - - /// - /// Enum N for value: N - /// - [EnumMember(Value = "N")] - N = 2, - - /// - /// Enum U for value: U - /// - [EnumMember(Value = "U")] - U = 3, - - /// - /// Enum A for value: A - /// - [EnumMember(Value = "A")] - A = 4 - - } - - - /// - /// In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. - /// - /// In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. - [DataMember(Name = "authenticationResponse", EmitDefaultValue = false)] - public AuthenticationResponseEnum? AuthenticationResponse { get; set; } - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - [JsonConverter(typeof(StringEnumConverter))] - public enum ChallengeCancelEnum - { - /// - /// Enum _01 for value: 01 - /// - [EnumMember(Value = "01")] - _01 = 1, - - /// - /// Enum _02 for value: 02 - /// - [EnumMember(Value = "02")] - _02 = 2, - - /// - /// Enum _03 for value: 03 - /// - [EnumMember(Value = "03")] - _03 = 3, - - /// - /// Enum _04 for value: 04 - /// - [EnumMember(Value = "04")] - _04 = 4, - - /// - /// Enum _05 for value: 05 - /// - [EnumMember(Value = "05")] - _05 = 5, - - /// - /// Enum _06 for value: 06 - /// - [EnumMember(Value = "06")] - _06 = 6, - - /// - /// Enum _07 for value: 07 - /// - [EnumMember(Value = "07")] - _07 = 7 - - } - - - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - /// - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata). - [DataMember(Name = "challengeCancel", EmitDefaultValue = false)] - public ChallengeCancelEnum? ChallengeCancel { get; set; } - /// - /// In 3D Secure 2, this is the `transStatus` from the `ARes`. - /// - /// In 3D Secure 2, this is the `transStatus` from the `ARes`. - [JsonConverter(typeof(StringEnumConverter))] - public enum DirectoryResponseEnum - { - /// - /// Enum A for value: A - /// - [EnumMember(Value = "A")] - A = 1, - - /// - /// Enum C for value: C - /// - [EnumMember(Value = "C")] - C = 2, - - /// - /// Enum D for value: D - /// - [EnumMember(Value = "D")] - D = 3, - - /// - /// Enum I for value: I - /// - [EnumMember(Value = "I")] - I = 4, - - /// - /// Enum N for value: N - /// - [EnumMember(Value = "N")] - N = 5, - - /// - /// Enum R for value: R - /// - [EnumMember(Value = "R")] - R = 6, - - /// - /// Enum U for value: U - /// - [EnumMember(Value = "U")] - U = 7, - - /// - /// Enum Y for value: Y - /// - [EnumMember(Value = "Y")] - Y = 8 - - } - - - /// - /// In 3D Secure 2, this is the `transStatus` from the `ARes`. - /// - /// In 3D Secure 2, this is the `transStatus` from the `ARes`. - [DataMember(Name = "directoryResponse", EmitDefaultValue = false)] - public DirectoryResponseEnum? DirectoryResponse { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// In 3D Secure 2, this is the `transStatus` from the challenge result. If the transaction was frictionless, omit this parameter. . - /// The cardholder authentication value (base64 encoded, 20 bytes in a decoded form).. - /// The CAVV algorithm used. Include this only for 3D Secure 1.. - /// Indicator informing the Access Control Server (ACS) and the Directory Server (DS) that the authentication has been cancelled. For possible values, refer to [3D Secure API reference](https://docs.adyen.com/online-payments/3d-secure/api-reference#mpidata).. - /// In 3D Secure 2, this is the `transStatus` from the `ARes`. . - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction.. - /// The electronic commerce indicator.. - /// Risk score calculated by Directory Server (DS). Required for Cartes Bancaires integrations.. - /// The version of the 3D Secure protocol.. - /// Network token authentication verification value (TAVV). The network token cryptogram.. - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values).. - /// Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form).. - public ThreeDSecureData(AuthenticationResponseEnum? authenticationResponse = default(AuthenticationResponseEnum?), byte[] cavv = default(byte[]), string cavvAlgorithm = default(string), ChallengeCancelEnum? challengeCancel = default(ChallengeCancelEnum?), DirectoryResponseEnum? directoryResponse = default(DirectoryResponseEnum?), string dsTransID = default(string), string eci = default(string), string riskScore = default(string), string threeDSVersion = default(string), byte[] tokenAuthenticationVerificationValue = default(byte[]), string transStatusReason = default(string), byte[] xid = default(byte[])) - { - this.AuthenticationResponse = authenticationResponse; - this.Cavv = cavv; - this.CavvAlgorithm = cavvAlgorithm; - this.ChallengeCancel = challengeCancel; - this.DirectoryResponse = directoryResponse; - this.DsTransID = dsTransID; - this.Eci = eci; - this.RiskScore = riskScore; - this.ThreeDSVersion = threeDSVersion; - this.TokenAuthenticationVerificationValue = tokenAuthenticationVerificationValue; - this.TransStatusReason = transStatusReason; - this.Xid = xid; - } - - /// - /// The cardholder authentication value (base64 encoded, 20 bytes in a decoded form). - /// - /// The cardholder authentication value (base64 encoded, 20 bytes in a decoded form). - [DataMember(Name = "cavv", EmitDefaultValue = false)] - public byte[] Cavv { get; set; } - - /// - /// The CAVV algorithm used. Include this only for 3D Secure 1. - /// - /// The CAVV algorithm used. Include this only for 3D Secure 1. - [DataMember(Name = "cavvAlgorithm", EmitDefaultValue = false)] - public string CavvAlgorithm { get; set; } - - /// - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction. - /// - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the Directory Server (DS) to identify a single transaction. - [DataMember(Name = "dsTransID", EmitDefaultValue = false)] - public string DsTransID { get; set; } - - /// - /// The electronic commerce indicator. - /// - /// The electronic commerce indicator. - [DataMember(Name = "eci", EmitDefaultValue = false)] - public string Eci { get; set; } - - /// - /// Risk score calculated by Directory Server (DS). Required for Cartes Bancaires integrations. - /// - /// Risk score calculated by Directory Server (DS). Required for Cartes Bancaires integrations. - [DataMember(Name = "riskScore", EmitDefaultValue = false)] - public string RiskScore { get; set; } - - /// - /// The version of the 3D Secure protocol. - /// - /// The version of the 3D Secure protocol. - [DataMember(Name = "threeDSVersion", EmitDefaultValue = false)] - public string ThreeDSVersion { get; set; } - - /// - /// Network token authentication verification value (TAVV). The network token cryptogram. - /// - /// Network token authentication verification value (TAVV). The network token cryptogram. - [DataMember(Name = "tokenAuthenticationVerificationValue", EmitDefaultValue = false)] - public byte[] TokenAuthenticationVerificationValue { get; set; } - - /// - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - /// - /// Provides information on why the `transStatus` field has the specified value. For possible values, refer to [our docs](https://docs.adyen.com/online-payments/3d-secure/api-reference#possible-transstatusreason-values). - [DataMember(Name = "transStatusReason", EmitDefaultValue = false)] - public string TransStatusReason { get; set; } - - /// - /// Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form). - /// - /// Supported for 3D Secure 1. The transaction identifier (Base64-encoded, 20 bytes in a decoded form). - [DataMember(Name = "xid", EmitDefaultValue = false)] - public byte[] Xid { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDSecureData {\n"); - sb.Append(" AuthenticationResponse: ").Append(AuthenticationResponse).Append("\n"); - sb.Append(" Cavv: ").Append(Cavv).Append("\n"); - sb.Append(" CavvAlgorithm: ").Append(CavvAlgorithm).Append("\n"); - sb.Append(" ChallengeCancel: ").Append(ChallengeCancel).Append("\n"); - sb.Append(" DirectoryResponse: ").Append(DirectoryResponse).Append("\n"); - sb.Append(" DsTransID: ").Append(DsTransID).Append("\n"); - sb.Append(" Eci: ").Append(Eci).Append("\n"); - sb.Append(" RiskScore: ").Append(RiskScore).Append("\n"); - sb.Append(" ThreeDSVersion: ").Append(ThreeDSVersion).Append("\n"); - sb.Append(" TokenAuthenticationVerificationValue: ").Append(TokenAuthenticationVerificationValue).Append("\n"); - sb.Append(" TransStatusReason: ").Append(TransStatusReason).Append("\n"); - sb.Append(" Xid: ").Append(Xid).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDSecureData); - } - - /// - /// Returns true if ThreeDSecureData instances are equal - /// - /// Instance of ThreeDSecureData to be compared - /// Boolean - public bool Equals(ThreeDSecureData input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthenticationResponse == input.AuthenticationResponse || - this.AuthenticationResponse.Equals(input.AuthenticationResponse) - ) && - ( - this.Cavv == input.Cavv || - (this.Cavv != null && - this.Cavv.Equals(input.Cavv)) - ) && - ( - this.CavvAlgorithm == input.CavvAlgorithm || - (this.CavvAlgorithm != null && - this.CavvAlgorithm.Equals(input.CavvAlgorithm)) - ) && - ( - this.ChallengeCancel == input.ChallengeCancel || - this.ChallengeCancel.Equals(input.ChallengeCancel) - ) && - ( - this.DirectoryResponse == input.DirectoryResponse || - this.DirectoryResponse.Equals(input.DirectoryResponse) - ) && - ( - this.DsTransID == input.DsTransID || - (this.DsTransID != null && - this.DsTransID.Equals(input.DsTransID)) - ) && - ( - this.Eci == input.Eci || - (this.Eci != null && - this.Eci.Equals(input.Eci)) - ) && - ( - this.RiskScore == input.RiskScore || - (this.RiskScore != null && - this.RiskScore.Equals(input.RiskScore)) - ) && - ( - this.ThreeDSVersion == input.ThreeDSVersion || - (this.ThreeDSVersion != null && - this.ThreeDSVersion.Equals(input.ThreeDSVersion)) - ) && - ( - this.TokenAuthenticationVerificationValue == input.TokenAuthenticationVerificationValue || - (this.TokenAuthenticationVerificationValue != null && - this.TokenAuthenticationVerificationValue.Equals(input.TokenAuthenticationVerificationValue)) - ) && - ( - this.TransStatusReason == input.TransStatusReason || - (this.TransStatusReason != null && - this.TransStatusReason.Equals(input.TransStatusReason)) - ) && - ( - this.Xid == input.Xid || - (this.Xid != null && - this.Xid.Equals(input.Xid)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AuthenticationResponse.GetHashCode(); - if (this.Cavv != null) - { - hashCode = (hashCode * 59) + this.Cavv.GetHashCode(); - } - if (this.CavvAlgorithm != null) - { - hashCode = (hashCode * 59) + this.CavvAlgorithm.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ChallengeCancel.GetHashCode(); - hashCode = (hashCode * 59) + this.DirectoryResponse.GetHashCode(); - if (this.DsTransID != null) - { - hashCode = (hashCode * 59) + this.DsTransID.GetHashCode(); - } - if (this.Eci != null) - { - hashCode = (hashCode * 59) + this.Eci.GetHashCode(); - } - if (this.RiskScore != null) - { - hashCode = (hashCode * 59) + this.RiskScore.GetHashCode(); - } - if (this.ThreeDSVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDSVersion.GetHashCode(); - } - if (this.TokenAuthenticationVerificationValue != null) - { - hashCode = (hashCode * 59) + this.TokenAuthenticationVerificationValue.GetHashCode(); - } - if (this.TransStatusReason != null) - { - hashCode = (hashCode * 59) + this.TransStatusReason.GetHashCode(); - } - if (this.Xid != null) - { - hashCode = (hashCode * 59) + this.Xid.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/Ticket.cs b/Adyen/Model/Checkout/Ticket.cs deleted file mode 100644 index 9caee123c..000000000 --- a/Adyen/Model/Checkout/Ticket.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// Ticket - /// - [DataContract(Name = "Ticket")] - public partial class Ticket : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters. - /// The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd. - /// The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - public Ticket(string issueAddress = default(string), DateTime issueDate = default(DateTime), string number = default(string)) - { - this.IssueAddress = issueAddress; - this.IssueDate = issueDate; - this.Number = number; - } - - /// - /// The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters - /// - /// The address of the organization that issued the ticket. * minLength: 0 characters * maxLength: 16 characters - [DataMember(Name = "issueAddress", EmitDefaultValue = false)] - public string IssueAddress { get; set; } - - /// - /// The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd - /// - /// The date that the ticket was issued to the passenger. * minLength: 10 characters * maxLength: 10 characters * Format [ISO 8601](https://www.w3.org/TR/NOTE-datetime): yyyy-MM-dd - [DataMember(Name = "issueDate", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime IssueDate { get; set; } - - /// - /// The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The ticket's unique identifier. * minLength: 1 character * maxLength: 15 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Ticket {\n"); - sb.Append(" IssueAddress: ").Append(IssueAddress).Append("\n"); - sb.Append(" IssueDate: ").Append(IssueDate).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Ticket); - } - - /// - /// Returns true if Ticket instances are equal - /// - /// Instance of Ticket to be compared - /// Boolean - public bool Equals(Ticket input) - { - if (input == null) - { - return false; - } - return - ( - this.IssueAddress == input.IssueAddress || - (this.IssueAddress != null && - this.IssueAddress.Equals(input.IssueAddress)) - ) && - ( - this.IssueDate == input.IssueDate || - (this.IssueDate != null && - this.IssueDate.Equals(input.IssueDate)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IssueAddress != null) - { - hashCode = (hashCode * 59) + this.IssueAddress.GetHashCode(); - } - if (this.IssueDate != null) - { - hashCode = (hashCode * 59) + this.IssueDate.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/TravelAgency.cs b/Adyen/Model/Checkout/TravelAgency.cs deleted file mode 100644 index f217308e9..000000000 --- a/Adyen/Model/Checkout/TravelAgency.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// TravelAgency - /// - [DataContract(Name = "TravelAgency")] - public partial class TravelAgency : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - /// The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros.. - public TravelAgency(string code = default(string), string name = default(string)) - { - this.Code = code; - this.Name = name; - } - - /// - /// The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The unique identifier from IATA or ARC for the travel agency that issues the ticket. * Encoding: ASCII * minLength: 1 character * maxLength: 8 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros. - /// - /// The name of the travel agency. * Encoding: ASCII * minLength: 1 character * maxLength: 25 characters * Must not start with a space or be all spaces. * Must not be all zeros. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TravelAgency {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TravelAgency); - } - - /// - /// Returns true if TravelAgency instances are equal - /// - /// Instance of TravelAgency to be compared - /// Boolean - public bool Equals(TravelAgency input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/TwintDetails.cs b/Adyen/Model/Checkout/TwintDetails.cs deleted file mode 100644 index 52c4b3e03..000000000 --- a/Adyen/Model/Checkout/TwintDetails.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// TwintDetails - /// - [DataContract(Name = "TwintDetails")] - public partial class TwintDetails : IEquatable, IValidatableObject - { - /// - /// The payment method type. - /// - /// The payment method type. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Twint for value: twint - /// - [EnumMember(Value = "twint")] - Twint = 1 - - } - - - /// - /// The payment method type. - /// - /// The payment method type. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The type of flow to initiate.. - /// The payment method type.. - public TwintDetails(string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string subtype = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Subtype = subtype; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The type of flow to initiate. - /// - /// The type of flow to initiate. - [DataMember(Name = "subtype", EmitDefaultValue = false)] - public string Subtype { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TwintDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Subtype: ").Append(Subtype).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TwintDetails); - } - - /// - /// Returns true if TwintDetails instances are equal - /// - /// Instance of TwintDetails to be compared - /// Boolean - public bool Equals(TwintDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Subtype == input.Subtype || - (this.Subtype != null && - this.Subtype.Equals(input.Subtype)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.Subtype != null) - { - hashCode = (hashCode * 59) + this.Subtype.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/UpdatePaymentLinkRequest.cs b/Adyen/Model/Checkout/UpdatePaymentLinkRequest.cs deleted file mode 100644 index 260214207..000000000 --- a/Adyen/Model/Checkout/UpdatePaymentLinkRequest.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// UpdatePaymentLinkRequest - /// - [DataContract(Name = "UpdatePaymentLinkRequest")] - public partial class UpdatePaymentLinkRequest : IEquatable, IValidatableObject - { - /// - /// Status of the payment link. Possible values: * **expired** - /// - /// Status of the payment link. Possible values: * **expired** - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 1 - - } - - - /// - /// Status of the payment link. Possible values: * **expired** - /// - /// Status of the payment link. Possible values: * **expired** - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdatePaymentLinkRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Status of the payment link. Possible values: * **expired** (required). - public UpdatePaymentLinkRequest(StatusEnum status = default(StatusEnum)) - { - this.Status = status; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdatePaymentLinkRequest {\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdatePaymentLinkRequest); - } - - /// - /// Returns true if UpdatePaymentLinkRequest instances are equal - /// - /// Instance of UpdatePaymentLinkRequest to be compared - /// Boolean - public bool Equals(UpdatePaymentLinkRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/UpiCollectDetails.cs b/Adyen/Model/Checkout/UpiCollectDetails.cs deleted file mode 100644 index bc9426d40..000000000 --- a/Adyen/Model/Checkout/UpiCollectDetails.cs +++ /dev/null @@ -1,266 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// UpiCollectDetails - /// - [DataContract(Name = "UpiCollectDetails")] - public partial class UpiCollectDetails : IEquatable, IValidatableObject - { - /// - /// **upi_collect** - /// - /// **upi_collect** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UpiCollect for value: upi_collect - /// - [EnumMember(Value = "upi_collect")] - UpiCollect = 1 - - } - - - /// - /// **upi_collect** - /// - /// **upi_collect** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpiCollectDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper.. - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **upi_collect** (required) (default to TypeEnum.UpiCollect). - /// The virtual payment address for UPI.. - public UpiCollectDetails(string billingSequenceNumber = default(string), string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = TypeEnum.UpiCollect, string virtualPaymentAddress = default(string)) - { - this.Type = type; - this.BillingSequenceNumber = billingSequenceNumber; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperNotificationReference = shopperNotificationReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.VirtualPaymentAddress = virtualPaymentAddress; - } - - /// - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. - /// - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. - [DataMember(Name = "billingSequenceNumber", EmitDefaultValue = false)] - public string BillingSequenceNumber { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - [DataMember(Name = "shopperNotificationReference", EmitDefaultValue = false)] - public string ShopperNotificationReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// The virtual payment address for UPI. - /// - /// The virtual payment address for UPI. - [DataMember(Name = "virtualPaymentAddress", EmitDefaultValue = false)] - public string VirtualPaymentAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpiCollectDetails {\n"); - sb.Append(" BillingSequenceNumber: ").Append(BillingSequenceNumber).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperNotificationReference: ").Append(ShopperNotificationReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VirtualPaymentAddress: ").Append(VirtualPaymentAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpiCollectDetails); - } - - /// - /// Returns true if UpiCollectDetails instances are equal - /// - /// Instance of UpiCollectDetails to be compared - /// Boolean - public bool Equals(UpiCollectDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingSequenceNumber == input.BillingSequenceNumber || - (this.BillingSequenceNumber != null && - this.BillingSequenceNumber.Equals(input.BillingSequenceNumber)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperNotificationReference == input.ShopperNotificationReference || - (this.ShopperNotificationReference != null && - this.ShopperNotificationReference.Equals(input.ShopperNotificationReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.VirtualPaymentAddress == input.VirtualPaymentAddress || - (this.VirtualPaymentAddress != null && - this.VirtualPaymentAddress.Equals(input.VirtualPaymentAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingSequenceNumber != null) - { - hashCode = (hashCode * 59) + this.BillingSequenceNumber.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperNotificationReference != null) - { - hashCode = (hashCode * 59) + this.ShopperNotificationReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.VirtualPaymentAddress != null) - { - hashCode = (hashCode * 59) + this.VirtualPaymentAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/UpiIntentDetails.cs b/Adyen/Model/Checkout/UpiIntentDetails.cs deleted file mode 100644 index 81ebe8580..000000000 --- a/Adyen/Model/Checkout/UpiIntentDetails.cs +++ /dev/null @@ -1,266 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// UpiIntentDetails - /// - [DataContract(Name = "UpiIntentDetails")] - public partial class UpiIntentDetails : IEquatable, IValidatableObject - { - /// - /// **upi_intent** - /// - /// **upi_intent** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UpiIntent for value: upi_intent - /// - [EnumMember(Value = "upi_intent")] - UpiIntent = 1 - - } - - - /// - /// **upi_intent** - /// - /// **upi_intent** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpiIntentDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// TPAP (Third Party Application) Id that is being used to make the UPI payment. - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper.. - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **upi_intent** (required) (default to TypeEnum.UpiIntent). - public UpiIntentDetails(string appId = default(string), string billingSequenceNumber = default(string), string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = TypeEnum.UpiIntent) - { - this.Type = type; - this.AppId = appId; - this.BillingSequenceNumber = billingSequenceNumber; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperNotificationReference = shopperNotificationReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// TPAP (Third Party Application) Id that is being used to make the UPI payment - /// - /// TPAP (Third Party Application) Id that is being used to make the UPI payment - [DataMember(Name = "appId", EmitDefaultValue = false)] - public string AppId { get; set; } - - /// - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. - /// - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. - [DataMember(Name = "billingSequenceNumber", EmitDefaultValue = false)] - public string BillingSequenceNumber { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - [DataMember(Name = "shopperNotificationReference", EmitDefaultValue = false)] - public string ShopperNotificationReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpiIntentDetails {\n"); - sb.Append(" AppId: ").Append(AppId).Append("\n"); - sb.Append(" BillingSequenceNumber: ").Append(BillingSequenceNumber).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperNotificationReference: ").Append(ShopperNotificationReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpiIntentDetails); - } - - /// - /// Returns true if UpiIntentDetails instances are equal - /// - /// Instance of UpiIntentDetails to be compared - /// Boolean - public bool Equals(UpiIntentDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.AppId == input.AppId || - (this.AppId != null && - this.AppId.Equals(input.AppId)) - ) && - ( - this.BillingSequenceNumber == input.BillingSequenceNumber || - (this.BillingSequenceNumber != null && - this.BillingSequenceNumber.Equals(input.BillingSequenceNumber)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperNotificationReference == input.ShopperNotificationReference || - (this.ShopperNotificationReference != null && - this.ShopperNotificationReference.Equals(input.ShopperNotificationReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AppId != null) - { - hashCode = (hashCode * 59) + this.AppId.GetHashCode(); - } - if (this.BillingSequenceNumber != null) - { - hashCode = (hashCode * 59) + this.BillingSequenceNumber.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperNotificationReference != null) - { - hashCode = (hashCode * 59) + this.ShopperNotificationReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/UpiQrDetails.cs b/Adyen/Model/Checkout/UpiQrDetails.cs deleted file mode 100644 index b050237fa..000000000 --- a/Adyen/Model/Checkout/UpiQrDetails.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// UpiQrDetails - /// - [DataContract(Name = "UpiQrDetails")] - public partial class UpiQrDetails : IEquatable, IValidatableObject - { - /// - /// **upi_qr** - /// - /// **upi_qr** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UpiQr for value: upi_qr - /// - [EnumMember(Value = "upi_qr")] - UpiQr = 1 - - } - - - /// - /// **upi_qr** - /// - /// **upi_qr** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpiQrDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper.. - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **upi_qr** (required) (default to TypeEnum.UpiQr). - public UpiQrDetails(string billingSequenceNumber = default(string), string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string shopperNotificationReference = default(string), string storedPaymentMethodId = default(string), TypeEnum type = TypeEnum.UpiQr) - { - this.Type = type; - this.BillingSequenceNumber = billingSequenceNumber; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperNotificationReference = shopperNotificationReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. - /// - /// The sequence number for the debit. For example, send **2** if this is the second debit for the subscription. The sequence number is included in the notification sent to the shopper. - [DataMember(Name = "billingSequenceNumber", EmitDefaultValue = false)] - public string BillingSequenceNumber { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - /// - /// The `shopperNotificationReference` returned in the response when you requested to notify the shopper. Used for recurring payment only. - [DataMember(Name = "shopperNotificationReference", EmitDefaultValue = false)] - public string ShopperNotificationReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpiQrDetails {\n"); - sb.Append(" BillingSequenceNumber: ").Append(BillingSequenceNumber).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperNotificationReference: ").Append(ShopperNotificationReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpiQrDetails); - } - - /// - /// Returns true if UpiQrDetails instances are equal - /// - /// Instance of UpiQrDetails to be compared - /// Boolean - public bool Equals(UpiQrDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingSequenceNumber == input.BillingSequenceNumber || - (this.BillingSequenceNumber != null && - this.BillingSequenceNumber.Equals(input.BillingSequenceNumber)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperNotificationReference == input.ShopperNotificationReference || - (this.ShopperNotificationReference != null && - this.ShopperNotificationReference.Equals(input.ShopperNotificationReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingSequenceNumber != null) - { - hashCode = (hashCode * 59) + this.BillingSequenceNumber.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperNotificationReference != null) - { - hashCode = (hashCode * 59) + this.ShopperNotificationReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/UtilityRequest.cs b/Adyen/Model/Checkout/UtilityRequest.cs deleted file mode 100644 index 8c95957c0..000000000 --- a/Adyen/Model/Checkout/UtilityRequest.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// UtilityRequest - /// - [DataContract(Name = "UtilityRequest")] - public partial class UtilityRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UtilityRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The list of origin domains, for which origin keys are requested. (required). - public UtilityRequest(List originDomains = default(List)) - { - this.OriginDomains = originDomains; - } - - /// - /// The list of origin domains, for which origin keys are requested. - /// - /// The list of origin domains, for which origin keys are requested. - [DataMember(Name = "originDomains", IsRequired = false, EmitDefaultValue = false)] - public List OriginDomains { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UtilityRequest {\n"); - sb.Append(" OriginDomains: ").Append(OriginDomains).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UtilityRequest); - } - - /// - /// Returns true if UtilityRequest instances are equal - /// - /// Instance of UtilityRequest to be compared - /// Boolean - public bool Equals(UtilityRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.OriginDomains == input.OriginDomains || - this.OriginDomains != null && - input.OriginDomains != null && - this.OriginDomains.SequenceEqual(input.OriginDomains) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OriginDomains != null) - { - hashCode = (hashCode * 59) + this.OriginDomains.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/UtilityResponse.cs b/Adyen/Model/Checkout/UtilityResponse.cs deleted file mode 100644 index 4006a5c86..000000000 --- a/Adyen/Model/Checkout/UtilityResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// UtilityResponse - /// - [DataContract(Name = "UtilityResponse")] - public partial class UtilityResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of origin keys for all requested domains. For each list item, the key is the domain and the value is the origin key.. - public UtilityResponse(Dictionary originKeys = default(Dictionary)) - { - this.OriginKeys = originKeys; - } - - /// - /// The list of origin keys for all requested domains. For each list item, the key is the domain and the value is the origin key. - /// - /// The list of origin keys for all requested domains. For each list item, the key is the domain and the value is the origin key. - [DataMember(Name = "originKeys", EmitDefaultValue = false)] - public Dictionary OriginKeys { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UtilityResponse {\n"); - sb.Append(" OriginKeys: ").Append(OriginKeys).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UtilityResponse); - } - - /// - /// Returns true if UtilityResponse instances are equal - /// - /// Instance of UtilityResponse to be compared - /// Boolean - public bool Equals(UtilityResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.OriginKeys == input.OriginKeys || - this.OriginKeys != null && - input.OriginKeys != null && - this.OriginKeys.SequenceEqual(input.OriginKeys) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OriginKeys != null) - { - hashCode = (hashCode * 59) + this.OriginKeys.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/VippsDetails.cs b/Adyen/Model/Checkout/VippsDetails.cs deleted file mode 100644 index f3d88f6ba..000000000 --- a/Adyen/Model/Checkout/VippsDetails.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// VippsDetails - /// - [DataContract(Name = "VippsDetails")] - public partial class VippsDetails : IEquatable, IValidatableObject - { - /// - /// **vipps** - /// - /// **vipps** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Vipps for value: vipps - /// - [EnumMember(Value = "vipps")] - Vipps = 1 - - } - - - /// - /// **vipps** - /// - /// **vipps** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected VippsDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// telephoneNumber (required). - /// **vipps** (default to TypeEnum.Vipps). - public VippsDetails(string checkoutAttemptId = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), string telephoneNumber = default(string), TypeEnum? type = TypeEnum.Vipps) - { - this.TelephoneNumber = telephoneNumber; - this.CheckoutAttemptId = checkoutAttemptId; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Gets or Sets TelephoneNumber - /// - [DataMember(Name = "telephoneNumber", IsRequired = false, EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VippsDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VippsDetails); - } - - /// - /// Returns true if VippsDetails instances are equal - /// - /// Instance of VippsDetails to be compared - /// Boolean - public bool Equals(VippsDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/VisaCheckoutDetails.cs b/Adyen/Model/Checkout/VisaCheckoutDetails.cs deleted file mode 100644 index e51dd8658..000000000 --- a/Adyen/Model/Checkout/VisaCheckoutDetails.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// VisaCheckoutDetails - /// - [DataContract(Name = "VisaCheckoutDetails")] - public partial class VisaCheckoutDetails : IEquatable, IValidatableObject - { - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2 - - } - - - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - /// - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// **visacheckout** - /// - /// **visacheckout** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Visacheckout for value: visacheckout - /// - [EnumMember(Value = "visacheckout")] - Visacheckout = 1 - - } - - - /// - /// **visacheckout** - /// - /// **visacheckout** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected VisaCheckoutDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// The funding source that should be used when multiple sources are available. For Brazilian combo cards, by default the funding source is credit. To use debit, set this value to **debit**.. - /// **visacheckout** (default to TypeEnum.Visacheckout). - /// The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. (required). - public VisaCheckoutDetails(string checkoutAttemptId = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), TypeEnum? type = TypeEnum.Visacheckout, string visaCheckoutCallId = default(string)) - { - this.VisaCheckoutCallId = visaCheckoutCallId; - this.CheckoutAttemptId = checkoutAttemptId; - this.FundingSource = fundingSource; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. - /// - /// The Visa Click to Pay Call ID value. When your shopper selects a payment and/or a shipping address from Visa Click to Pay, you will receive a Visa Click to Pay Call ID. - [DataMember(Name = "visaCheckoutCallId", IsRequired = false, EmitDefaultValue = false)] - public string VisaCheckoutCallId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VisaCheckoutDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VisaCheckoutCallId: ").Append(VisaCheckoutCallId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VisaCheckoutDetails); - } - - /// - /// Returns true if VisaCheckoutDetails instances are equal - /// - /// Instance of VisaCheckoutDetails to be compared - /// Boolean - public bool Equals(VisaCheckoutDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.VisaCheckoutCallId == input.VisaCheckoutCallId || - (this.VisaCheckoutCallId != null && - this.VisaCheckoutCallId.Equals(input.VisaCheckoutCallId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.VisaCheckoutCallId != null) - { - hashCode = (hashCode * 59) + this.VisaCheckoutCallId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/WeChatPayDetails.cs b/Adyen/Model/Checkout/WeChatPayDetails.cs deleted file mode 100644 index ef5b1aafb..000000000 --- a/Adyen/Model/Checkout/WeChatPayDetails.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// WeChatPayDetails - /// - [DataContract(Name = "WeChatPayDetails")] - public partial class WeChatPayDetails : IEquatable, IValidatableObject - { - /// - /// **wechatpay** - /// - /// **wechatpay** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Wechatpay for value: wechatpay - /// - [EnumMember(Value = "wechatpay")] - Wechatpay = 1, - - /// - /// Enum WechatpayPos for value: wechatpay_pos - /// - [EnumMember(Value = "wechatpay_pos")] - WechatpayPos = 2 - - } - - - /// - /// **wechatpay** - /// - /// **wechatpay** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// **wechatpay** (default to TypeEnum.Wechatpay). - public WeChatPayDetails(string checkoutAttemptId = default(string), TypeEnum? type = TypeEnum.Wechatpay) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WeChatPayDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WeChatPayDetails); - } - - /// - /// Returns true if WeChatPayDetails instances are equal - /// - /// Instance of WeChatPayDetails to be compared - /// Boolean - public bool Equals(WeChatPayDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.cs b/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.cs deleted file mode 100644 index f7ed49490..000000000 --- a/Adyen/Model/Checkout/WeChatPayMiniProgramDetails.cs +++ /dev/null @@ -1,195 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// WeChatPayMiniProgramDetails - /// - [DataContract(Name = "WeChatPayMiniProgramDetails")] - public partial class WeChatPayMiniProgramDetails : IEquatable, IValidatableObject - { - /// - /// **wechatpayMiniProgram** - /// - /// **wechatpayMiniProgram** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum WechatpayMiniProgram for value: wechatpayMiniProgram - /// - [EnumMember(Value = "wechatpayMiniProgram")] - WechatpayMiniProgram = 1 - - } - - - /// - /// **wechatpayMiniProgram** - /// - /// **wechatpayMiniProgram** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// appId. - /// The checkout attempt identifier.. - /// openid. - /// **wechatpayMiniProgram** (default to TypeEnum.WechatpayMiniProgram). - public WeChatPayMiniProgramDetails(string appId = default(string), string checkoutAttemptId = default(string), string openid = default(string), TypeEnum? type = TypeEnum.WechatpayMiniProgram) - { - this.AppId = appId; - this.CheckoutAttemptId = checkoutAttemptId; - this.Openid = openid; - this.Type = type; - } - - /// - /// Gets or Sets AppId - /// - [DataMember(Name = "appId", EmitDefaultValue = false)] - public string AppId { get; set; } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Gets or Sets Openid - /// - [DataMember(Name = "openid", EmitDefaultValue = false)] - public string Openid { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WeChatPayMiniProgramDetails {\n"); - sb.Append(" AppId: ").Append(AppId).Append("\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" Openid: ").Append(Openid).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WeChatPayMiniProgramDetails); - } - - /// - /// Returns true if WeChatPayMiniProgramDetails instances are equal - /// - /// Instance of WeChatPayMiniProgramDetails to be compared - /// Boolean - public bool Equals(WeChatPayMiniProgramDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.AppId == input.AppId || - (this.AppId != null && - this.AppId.Equals(input.AppId)) - ) && - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.Openid == input.Openid || - (this.Openid != null && - this.Openid.Equals(input.Openid)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AppId != null) - { - hashCode = (hashCode * 59) + this.AppId.GetHashCode(); - } - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.Openid != null) - { - hashCode = (hashCode * 59) + this.Openid.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Checkout/ZipDetails.cs b/Adyen/Model/Checkout/ZipDetails.cs deleted file mode 100644 index d4c340e79..000000000 --- a/Adyen/Model/Checkout/ZipDetails.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Checkout -{ - /// - /// ZipDetails - /// - [DataContract(Name = "ZipDetails")] - public partial class ZipDetails : IEquatable, IValidatableObject - { - /// - /// **zip** - /// - /// **zip** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Zip for value: zip - /// - [EnumMember(Value = "zip")] - Zip = 1, - - /// - /// Enum ZipPos for value: zip_pos - /// - [EnumMember(Value = "zip_pos")] - ZipPos = 2 - - } - - - /// - /// **zip** - /// - /// **zip** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The checkout attempt identifier.. - /// Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// **zip** (default to TypeEnum.Zip). - public ZipDetails(string checkoutAttemptId = default(string), string clickAndCollect = default(string), string recurringDetailReference = default(string), string storedPaymentMethodId = default(string), TypeEnum? type = TypeEnum.Zip) - { - this.CheckoutAttemptId = checkoutAttemptId; - this.ClickAndCollect = clickAndCollect; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - this.Type = type; - } - - /// - /// The checkout attempt identifier. - /// - /// The checkout attempt identifier. - [DataMember(Name = "checkoutAttemptId", EmitDefaultValue = false)] - public string CheckoutAttemptId { get; set; } - - /// - /// Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them. - /// - /// Set this to **true** if the shopper would like to pick up and collect their order, instead of having the goods delivered to them. - [DataMember(Name = "clickAndCollect", EmitDefaultValue = false)] - public string ClickAndCollect { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Checkout API v49. Use `storedPaymentMethodId` instead.")] - public string RecurringDetailReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ZipDetails {\n"); - sb.Append(" CheckoutAttemptId: ").Append(CheckoutAttemptId).Append("\n"); - sb.Append(" ClickAndCollect: ").Append(ClickAndCollect).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ZipDetails); - } - - /// - /// Returns true if ZipDetails instances are equal - /// - /// Instance of ZipDetails to be compared - /// Boolean - public bool Equals(ZipDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckoutAttemptId == input.CheckoutAttemptId || - (this.CheckoutAttemptId != null && - this.CheckoutAttemptId.Equals(input.CheckoutAttemptId)) - ) && - ( - this.ClickAndCollect == input.ClickAndCollect || - (this.ClickAndCollect != null && - this.ClickAndCollect.Equals(input.ClickAndCollect)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckoutAttemptId != null) - { - hashCode = (hashCode * 59) + this.CheckoutAttemptId.GetHashCode(); - } - if (this.ClickAndCollect != null) - { - hashCode = (hashCode * 59) + this.ClickAndCollect.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // StoredPaymentMethodId (string) maxLength - if (this.StoredPaymentMethodId != null && this.StoredPaymentMethodId.Length > 64) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StoredPaymentMethodId, length must be less than 64.", new [] { "StoredPaymentMethodId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/ConfigurationWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index 5f64637a5..000000000 --- a/Adyen/Model/ConfigurationWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/ConfigurationWebhooks/AccountHolder.cs b/Adyen/Model/ConfigurationWebhooks/AccountHolder.cs deleted file mode 100644 index 905118445..000000000 --- a/Adyen/Model/ConfigurationWebhooks/AccountHolder.cs +++ /dev/null @@ -1,400 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// AccountHolder - /// - [DataContract(Name = "AccountHolder")] - public partial class AccountHolder : IEquatable, IValidatableObject - { - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 3 - - } - - - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - /// - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolder() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms.. - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.. - /// contactDetails. - /// Your description for the account holder.. - /// The unique identifier of the account holder. (required). - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. (required). - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// The unique identifier of the migrated account holder in the classic integration.. - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request.. - /// Your reference for the account holder.. - /// The status of the account holder. Possible values: * **active**: The account holder is active and allowed to use its capabilities. This is the initial status for account holders and balance accounts. You can change this status to **suspended** or **closed**. * **suspended**: The account holder is temporarily disabled and payouts are blocked. You can change this status to **active** or **closed**. * **closed**: The account holder and all of its capabilities are permanently disabled. This is a final status and cannot be changed.. - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved.. - public AccountHolder(string balancePlatform = default(string), Dictionary capabilities = default(Dictionary), ContactDetails contactDetails = default(ContactDetails), string description = default(string), string id = default(string), string legalEntityId = default(string), Dictionary metadata = default(Dictionary), string migratedAccountHolderCode = default(string), string primaryBalanceAccount = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string timeZone = default(string), List verificationDeadlines = default(List)) - { - this.Id = id; - this.LegalEntityId = legalEntityId; - this.BalancePlatform = balancePlatform; - this.Capabilities = capabilities; - this.ContactDetails = contactDetails; - this.Description = description; - this.Metadata = metadata; - this.MigratedAccountHolderCode = migratedAccountHolderCode; - this.PrimaryBalanceAccount = primaryBalanceAccount; - this.Reference = reference; - this.Status = status; - this.TimeZone = timeZone; - this.VerificationDeadlines = verificationDeadlines; - } - - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. - /// - /// The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the account holder belongs. Required in the request if your API credentials can be used for multiple balance platforms. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that an account holder can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// Gets or Sets ContactDetails - /// - [DataMember(Name = "contactDetails", EmitDefaultValue = false)] - [Obsolete("")] - public ContactDetails ContactDetails { get; set; } - - /// - /// Your description for the account holder. - /// - /// Your description for the account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the account holder. - /// - /// The unique identifier of the account holder. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) associated with the account holder. Adyen performs a verification process against the legal entity of the account holder. - [DataMember(Name = "legalEntityId", IsRequired = false, EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The unique identifier of the migrated account holder in the classic integration. - /// - /// The unique identifier of the migrated account holder in the classic integration. - [DataMember(Name = "migratedAccountHolderCode", EmitDefaultValue = false)] - public string MigratedAccountHolderCode { get; set; } - - /// - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. - /// - /// The ID of the account holder's primary balance account. By default, this is set to the first balance account that you create for the account holder. To assign a different balance account, send a PATCH request. - [DataMember(Name = "primaryBalanceAccount", EmitDefaultValue = false)] - public string PrimaryBalanceAccount { get; set; } - - /// - /// Your reference for the account holder. - /// - /// Your reference for the account holder. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the account holder. For example, **Europe/Amsterdam**. Defaults to the time zone of the balance platform if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. - /// - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. - [DataMember(Name = "verificationDeadlines", EmitDefaultValue = false)] - public List VerificationDeadlines { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolder {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" ContactDetails: ").Append(ContactDetails).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MigratedAccountHolderCode: ").Append(MigratedAccountHolderCode).Append("\n"); - sb.Append(" PrimaryBalanceAccount: ").Append(PrimaryBalanceAccount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append(" VerificationDeadlines: ").Append(VerificationDeadlines).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolder); - } - - /// - /// Returns true if AccountHolder instances are equal - /// - /// Instance of AccountHolder to be compared - /// Boolean - public bool Equals(AccountHolder input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.ContactDetails == input.ContactDetails || - (this.ContactDetails != null && - this.ContactDetails.Equals(input.ContactDetails)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MigratedAccountHolderCode == input.MigratedAccountHolderCode || - (this.MigratedAccountHolderCode != null && - this.MigratedAccountHolderCode.Equals(input.MigratedAccountHolderCode)) - ) && - ( - this.PrimaryBalanceAccount == input.PrimaryBalanceAccount || - (this.PrimaryBalanceAccount != null && - this.PrimaryBalanceAccount.Equals(input.PrimaryBalanceAccount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ) && - ( - this.VerificationDeadlines == input.VerificationDeadlines || - this.VerificationDeadlines != null && - input.VerificationDeadlines != null && - this.VerificationDeadlines.SequenceEqual(input.VerificationDeadlines) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.ContactDetails != null) - { - hashCode = (hashCode * 59) + this.ContactDetails.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MigratedAccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.MigratedAccountHolderCode.GetHashCode(); - } - if (this.PrimaryBalanceAccount != null) - { - hashCode = (hashCode * 59) + this.PrimaryBalanceAccount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - if (this.VerificationDeadlines != null) - { - hashCode = (hashCode * 59) + this.VerificationDeadlines.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.cs b/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.cs deleted file mode 100644 index 69551f2a0..000000000 --- a/Adyen/Model/ConfigurationWebhooks/AccountHolderCapability.cs +++ /dev/null @@ -1,375 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// AccountHolderCapability - /// - [DataContract(Name = "AccountHolderCapability")] - public partial class AccountHolderCapability : IEquatable, IValidatableObject - { - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AllowedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "allowedLevel", EmitDefaultValue = false)] - public AllowedLevelEnum? AllowedLevel { get; set; } - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RequestedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "requestedLevel", EmitDefaultValue = false)] - public RequestedLevelEnum? RequestedLevel { get; set; } - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [JsonConverter(typeof(StringEnumConverter))] - public enum VerificationStatusEnum - { - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 3, - - /// - /// Enum Valid for value: valid - /// - [EnumMember(Value = "valid")] - Valid = 4 - - } - - - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public VerificationStatusEnum? VerificationStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability.. - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**.. - /// allowedSettings. - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder.. - /// Contains verification errors and the actions that you can take to resolve them.. - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field.. - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**.. - /// requestedSettings. - /// Contains the status of the transfer instruments associated with this capability. . - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. . - public AccountHolderCapability(bool? allowed = default(bool?), AllowedLevelEnum? allowedLevel = default(AllowedLevelEnum?), CapabilitySettings allowedSettings = default(CapabilitySettings), bool? enabled = default(bool?), List problems = default(List), bool? requested = default(bool?), RequestedLevelEnum? requestedLevel = default(RequestedLevelEnum?), CapabilitySettings requestedSettings = default(CapabilitySettings), List transferInstruments = default(List), VerificationStatusEnum? verificationStatus = default(VerificationStatusEnum?)) - { - this.Allowed = allowed; - this.AllowedLevel = allowedLevel; - this.AllowedSettings = allowedSettings; - this.Enabled = enabled; - this.Problems = problems; - this.Requested = requested; - this.RequestedLevel = requestedLevel; - this.RequestedSettings = requestedSettings; - this.TransferInstruments = transferInstruments; - this.VerificationStatus = verificationStatus; - } - - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; set; } - - /// - /// Gets or Sets AllowedSettings - /// - [DataMember(Name = "allowedSettings", EmitDefaultValue = false)] - public CapabilitySettings AllowedSettings { get; set; } - - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// Contains verification errors and the actions that you can take to resolve them. - /// - /// Contains verification errors and the actions that you can take to resolve them. - [DataMember(Name = "problems", EmitDefaultValue = false)] - public List Problems { get; set; } - - /// - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - /// - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - [DataMember(Name = "requested", EmitDefaultValue = false)] - public bool? Requested { get; set; } - - /// - /// Gets or Sets RequestedSettings - /// - [DataMember(Name = "requestedSettings", EmitDefaultValue = false)] - public CapabilitySettings RequestedSettings { get; set; } - - /// - /// Contains the status of the transfer instruments associated with this capability. - /// - /// Contains the status of the transfer instruments associated with this capability. - [DataMember(Name = "transferInstruments", EmitDefaultValue = false)] - public List TransferInstruments { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderCapability {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" AllowedLevel: ").Append(AllowedLevel).Append("\n"); - sb.Append(" AllowedSettings: ").Append(AllowedSettings).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" Problems: ").Append(Problems).Append("\n"); - sb.Append(" Requested: ").Append(Requested).Append("\n"); - sb.Append(" RequestedLevel: ").Append(RequestedLevel).Append("\n"); - sb.Append(" RequestedSettings: ").Append(RequestedSettings).Append("\n"); - sb.Append(" TransferInstruments: ").Append(TransferInstruments).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderCapability); - } - - /// - /// Returns true if AccountHolderCapability instances are equal - /// - /// Instance of AccountHolderCapability to be compared - /// Boolean - public bool Equals(AccountHolderCapability input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.AllowedLevel == input.AllowedLevel || - this.AllowedLevel.Equals(input.AllowedLevel) - ) && - ( - this.AllowedSettings == input.AllowedSettings || - (this.AllowedSettings != null && - this.AllowedSettings.Equals(input.AllowedSettings)) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.Problems == input.Problems || - this.Problems != null && - input.Problems != null && - this.Problems.SequenceEqual(input.Problems) - ) && - ( - this.Requested == input.Requested || - this.Requested.Equals(input.Requested) - ) && - ( - this.RequestedLevel == input.RequestedLevel || - this.RequestedLevel.Equals(input.RequestedLevel) - ) && - ( - this.RequestedSettings == input.RequestedSettings || - (this.RequestedSettings != null && - this.RequestedSettings.Equals(input.RequestedSettings)) - ) && - ( - this.TransferInstruments == input.TransferInstruments || - this.TransferInstruments != null && - input.TransferInstruments != null && - this.TransferInstruments.SequenceEqual(input.TransferInstruments) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - this.VerificationStatus.Equals(input.VerificationStatus) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowedLevel.GetHashCode(); - if (this.AllowedSettings != null) - { - hashCode = (hashCode * 59) + this.AllowedSettings.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.Problems != null) - { - hashCode = (hashCode * 59) + this.Problems.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Requested.GetHashCode(); - hashCode = (hashCode * 59) + this.RequestedLevel.GetHashCode(); - if (this.RequestedSettings != null) - { - hashCode = (hashCode * 59) + this.RequestedSettings.GetHashCode(); - } - if (this.TransferInstruments != null) - { - hashCode = (hashCode * 59) + this.TransferInstruments.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.cs b/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.cs deleted file mode 100644 index e766f41ce..000000000 --- a/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationData.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// AccountHolderNotificationData - /// - [DataContract(Name = "AccountHolderNotificationData")] - public partial class AccountHolderNotificationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountHolder. - /// The unique identifier of the balance platform.. - public AccountHolderNotificationData(AccountHolder accountHolder = default(AccountHolder), string balancePlatform = default(string)) - { - this.AccountHolder = accountHolder; - this.BalancePlatform = balancePlatform; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", EmitDefaultValue = false)] - public AccountHolder AccountHolder { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderNotificationData {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderNotificationData); - } - - /// - /// Returns true if AccountHolderNotificationData instances are equal - /// - /// Instance of AccountHolderNotificationData to be compared - /// Boolean - public bool Equals(AccountHolderNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.cs b/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.cs deleted file mode 100644 index 5aab3a293..000000000 --- a/Adyen/Model/ConfigurationWebhooks/AccountHolderNotificationRequest.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// AccountHolderNotificationRequest - /// - [DataContract(Name = "AccountHolderNotificationRequest")] - public partial class AccountHolderNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of webhook. - /// - /// Type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Updated for value: balancePlatform.accountHolder.updated - /// - [EnumMember(Value = "balancePlatform.accountHolder.updated")] - Updated = 1, - - /// - /// Enum Created for value: balancePlatform.accountHolder.created - /// - [EnumMember(Value = "balancePlatform.accountHolder.created")] - Created = 2 - - } - - - /// - /// Type of webhook. - /// - /// Type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of webhook. (required). - public AccountHolderNotificationRequest(AccountHolderNotificationData data = default(AccountHolderNotificationData), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public AccountHolderNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderNotificationRequest); - } - - /// - /// Returns true if AccountHolderNotificationRequest instances are equal - /// - /// Instance of AccountHolderNotificationRequest to be compared - /// Boolean - public bool Equals(AccountHolderNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.cs b/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.cs deleted file mode 100644 index 7bc3d3381..000000000 --- a/Adyen/Model/ConfigurationWebhooks/AccountSupportingEntityCapability.cs +++ /dev/null @@ -1,318 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// AccountSupportingEntityCapability - /// - [DataContract(Name = "AccountSupportingEntityCapability")] - public partial class AccountSupportingEntityCapability : IEquatable, IValidatableObject - { - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AllowedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "allowedLevel", EmitDefaultValue = false)] - public AllowedLevelEnum? AllowedLevel { get; set; } - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RequestedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "requestedLevel", EmitDefaultValue = false)] - public RequestedLevelEnum? RequestedLevel { get; set; } - /// - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [JsonConverter(typeof(StringEnumConverter))] - public enum VerificationStatusEnum - { - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 3, - - /// - /// Enum Valid for value: valid - /// - [EnumMember(Value = "valid")] - Valid = 4 - - } - - - /// - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public VerificationStatusEnum? VerificationStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether the supporting entity capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability.. - /// The capability level that is allowed for the account holder. Possible values: **notApplicable**, **low**, **medium**, **high**.. - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder.. - /// The ID of the supporting entity.. - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field.. - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**.. - /// The status of the verification checks for the supporting entity capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. . - public AccountSupportingEntityCapability(bool? allowed = default(bool?), AllowedLevelEnum? allowedLevel = default(AllowedLevelEnum?), bool? enabled = default(bool?), string id = default(string), bool? requested = default(bool?), RequestedLevelEnum? requestedLevel = default(RequestedLevelEnum?), VerificationStatusEnum? verificationStatus = default(VerificationStatusEnum?)) - { - this.Allowed = allowed; - this.AllowedLevel = allowedLevel; - this.Enabled = enabled; - this.Id = id; - this.Requested = requested; - this.RequestedLevel = requestedLevel; - this.VerificationStatus = verificationStatus; - } - - /// - /// Indicates whether the supporting entity capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - /// - /// Indicates whether the supporting entity capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; set; } - - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - /// - /// Indicates whether the capability is enabled. If **false**, the capability is temporarily disabled for the account holder. - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// The ID of the supporting entity. - /// - /// The ID of the supporting entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - /// - /// Indicates whether the capability is requested. To check whether the account holder is permitted to use the capability, refer to the `allowed` field. - [DataMember(Name = "requested", EmitDefaultValue = false)] - public bool? Requested { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountSupportingEntityCapability {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" AllowedLevel: ").Append(AllowedLevel).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Requested: ").Append(Requested).Append("\n"); - sb.Append(" RequestedLevel: ").Append(RequestedLevel).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountSupportingEntityCapability); - } - - /// - /// Returns true if AccountSupportingEntityCapability instances are equal - /// - /// Instance of AccountSupportingEntityCapability to be compared - /// Boolean - public bool Equals(AccountSupportingEntityCapability input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.AllowedLevel == input.AllowedLevel || - this.AllowedLevel.Equals(input.AllowedLevel) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Requested == input.Requested || - this.Requested.Equals(input.Requested) - ) && - ( - this.RequestedLevel == input.RequestedLevel || - this.RequestedLevel.Equals(input.RequestedLevel) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - this.VerificationStatus.Equals(input.VerificationStatus) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowedLevel.GetHashCode(); - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Requested.GetHashCode(); - hashCode = (hashCode * 59) + this.RequestedLevel.GetHashCode(); - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Address.cs b/Adyen/Model/ConfigurationWebhooks/Address.cs deleted file mode 100644 index b8923425a..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Address.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Address() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Maximum length: 3000 characters. (required). - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// The number or name of the house. Maximum length: 3000 characters. (required). - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). - public Address(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.City = city; - this.Country = country; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.Street = street; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Maximum length: 3000 characters. - /// - /// The name of the city. Maximum length: 3000 characters. - [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The number or name of the house. Maximum length: 3000 characters. - /// - /// The number or name of the house. Maximum length: 3000 characters. - [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) maxLength - if (this.City != null && this.City.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); - } - - // HouseNumberOrName (string) maxLength - if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); - } - - // Street (string) maxLength - if (this.Street != null && this.Street.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Amount.cs b/Adyen/Model/ConfigurationWebhooks/Amount.cs deleted file mode 100644 index 8b1868c72..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Authentication.cs b/Adyen/Model/ConfigurationWebhooks/Authentication.cs deleted file mode 100644 index 3c3d2859b..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Authentication.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Authentication - /// - [DataContract(Name = "Authentication")] - public partial class Authentication : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The email address where the one-time password (OTP) is sent.. - /// The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#'\",;:$&àùòâôûáúó**. - /// phone. - public Authentication(string email = default(string), string password = default(string), Phone phone = default(Phone)) - { - this.Email = email; - this.Password = password; - this.Phone = phone; - } - - /// - /// The email address where the one-time password (OTP) is sent. - /// - /// The email address where the one-time password (OTP) is sent. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#'\",;:$&àùòâôûáúó** - /// - /// The password used for 3D Secure password-based authentication. The value must be between 1 to 30 characters and must only contain the following supported characters. * Characters between **a-z**, **A-Z**, and **0-9** * Special characters: **äöüßÄÖÜ+-*_/ç%()=?!~#'\",;:$&àùòâôûáúó** - [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name = "phone", EmitDefaultValue = false)] - public Phone Phone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Authentication {\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Authentication); - } - - /// - /// Returns true if Authentication instances are equal - /// - /// Instance of Authentication to be compared - /// Boolean - public bool Equals(Authentication input) - { - if (input == null) - { - return false; - } - return - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Password (string) maxLength - if (this.Password != null && this.Password.Length > 30) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be less than 30.", new [] { "Password" }); - } - - // Password (string) minLength - if (this.Password != null && this.Password.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 1.", new [] { "Password" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Balance.cs b/Adyen/Model/ConfigurationWebhooks/Balance.cs deleted file mode 100644 index 1a5a98fad..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Balance.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Balance - /// - [DataContract(Name = "Balance")] - public partial class Balance : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Balance() { } - /// - /// Initializes a new instance of the class. - /// - /// The balance available for use. (required). - /// The sum of the transactions that have already been settled. (required). - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. (required). - /// The sum of the transactions that will be settled in the future.. - /// The balance currently held in reserve. (required). - public Balance(long? available = default(long?), long? balance = default(long?), string currency = default(string), long? pending = default(long?), long? reserved = default(long?)) - { - this.Available = available; - this._Balance = balance; - this.Currency = currency; - this.Reserved = reserved; - this.Pending = pending; - } - - /// - /// The balance available for use. - /// - /// The balance available for use. - [DataMember(Name = "available", IsRequired = false, EmitDefaultValue = false)] - public long? Available { get; set; } - - /// - /// The sum of the transactions that have already been settled. - /// - /// The sum of the transactions that have already been settled. - [DataMember(Name = "balance", IsRequired = false, EmitDefaultValue = false)] - public long? _Balance { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance. - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The sum of the transactions that will be settled in the future. - /// - /// The sum of the transactions that will be settled in the future. - [DataMember(Name = "pending", EmitDefaultValue = false)] - public long? Pending { get; set; } - - /// - /// The balance currently held in reserve. - /// - /// The balance currently held in reserve. - [DataMember(Name = "reserved", IsRequired = false, EmitDefaultValue = false)] - public long? Reserved { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Balance {\n"); - sb.Append(" Available: ").Append(Available).Append("\n"); - sb.Append(" _Balance: ").Append(_Balance).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Pending: ").Append(Pending).Append("\n"); - sb.Append(" Reserved: ").Append(Reserved).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Balance); - } - - /// - /// Returns true if Balance instances are equal - /// - /// Instance of Balance to be compared - /// Boolean - public bool Equals(Balance input) - { - if (input == null) - { - return false; - } - return - ( - this.Available == input.Available || - this.Available.Equals(input.Available) - ) && - ( - this._Balance == input._Balance || - this._Balance.Equals(input._Balance) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Pending == input.Pending || - this.Pending.Equals(input.Pending) - ) && - ( - this.Reserved == input.Reserved || - this.Reserved.Equals(input.Reserved) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Available.GetHashCode(); - hashCode = (hashCode * 59) + this._Balance.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Pending.GetHashCode(); - hashCode = (hashCode * 59) + this.Reserved.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/BalanceAccount.cs b/Adyen/Model/ConfigurationWebhooks/BalanceAccount.cs deleted file mode 100644 index 5fbbacb5d..000000000 --- a/Adyen/Model/ConfigurationWebhooks/BalanceAccount.cs +++ /dev/null @@ -1,366 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// BalanceAccount - /// - [DataContract(Name = "BalanceAccount")] - public partial class BalanceAccount : IEquatable, IValidatableObject - { - /// - /// The status of the balance account, set to **active** by default. - /// - /// The status of the balance account, set to **active** by default. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the balance account, set to **active** by default. - /// - /// The status of the balance account, set to **active** by default. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceAccount() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. (required). - /// List of balances with the amount and currency.. - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. This is the currency displayed on the Balance Account overview page in your Customer Area. The default value is **EUR**. > After a balance account is created, you cannot change its default currency.. - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder.. - /// The unique identifier of the balance account. (required). - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// The unique identifier of the account of the migrated account holder in the classic integration.. - /// platformPaymentConfiguration. - /// Your reference for the balance account, maximum 150 characters.. - /// The status of the balance account, set to **active** by default. . - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).. - public BalanceAccount(string accountHolderId = default(string), List balances = default(List), string defaultCurrencyCode = default(string), string description = default(string), string id = default(string), Dictionary metadata = default(Dictionary), string migratedAccountCode = default(string), PlatformPaymentConfiguration platformPaymentConfiguration = default(PlatformPaymentConfiguration), string reference = default(string), StatusEnum? status = default(StatusEnum?), string timeZone = default(string)) - { - this.AccountHolderId = accountHolderId; - this.Id = id; - this.Balances = balances; - this.DefaultCurrencyCode = defaultCurrencyCode; - this.Description = description; - this.Metadata = metadata; - this.MigratedAccountCode = migratedAccountCode; - this.PlatformPaymentConfiguration = platformPaymentConfiguration; - this.Reference = reference; - this.Status = status; - this.TimeZone = timeZone; - } - - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - /// - /// The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/accountHolders__resParam_id) associated with the balance account. - [DataMember(Name = "accountHolderId", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderId { get; set; } - - /// - /// List of balances with the amount and currency. - /// - /// List of balances with the amount and currency. - [DataMember(Name = "balances", EmitDefaultValue = false)] - public List Balances { get; set; } - - /// - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. This is the currency displayed on the Balance Account overview page in your Customer Area. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. - /// - /// The default three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) of the balance account. This is the currency displayed on the Balance Account overview page in your Customer Area. The default value is **EUR**. > After a balance account is created, you cannot change its default currency. - [DataMember(Name = "defaultCurrencyCode", EmitDefaultValue = false)] - public string DefaultCurrencyCode { get; set; } - - /// - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. - /// - /// A human-readable description of the balance account, maximum 300 characters. You can use this parameter to distinguish between multiple balance accounts under an account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the balance account. - /// - /// The unique identifier of the balance account. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - [DataMember(Name = "migratedAccountCode", EmitDefaultValue = false)] - public string MigratedAccountCode { get; set; } - - /// - /// Gets or Sets PlatformPaymentConfiguration - /// - [DataMember(Name = "platformPaymentConfiguration", EmitDefaultValue = false)] - public PlatformPaymentConfiguration PlatformPaymentConfiguration { get; set; } - - /// - /// Your reference for the balance account, maximum 150 characters. - /// - /// Your reference for the balance account, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - /// - /// The time zone of the balance account. For example, **Europe/Amsterdam**. Defaults to the time zone of the account holder if no time zone is set. For possible values, see the [list of time zone codes](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). - [DataMember(Name = "timeZone", EmitDefaultValue = false)] - public string TimeZone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceAccount {\n"); - sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); - sb.Append(" Balances: ").Append(Balances).Append("\n"); - sb.Append(" DefaultCurrencyCode: ").Append(DefaultCurrencyCode).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" MigratedAccountCode: ").Append(MigratedAccountCode).Append("\n"); - sb.Append(" PlatformPaymentConfiguration: ").Append(PlatformPaymentConfiguration).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TimeZone: ").Append(TimeZone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceAccount); - } - - /// - /// Returns true if BalanceAccount instances are equal - /// - /// Instance of BalanceAccount to be compared - /// Boolean - public bool Equals(BalanceAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderId == input.AccountHolderId || - (this.AccountHolderId != null && - this.AccountHolderId.Equals(input.AccountHolderId)) - ) && - ( - this.Balances == input.Balances || - this.Balances != null && - input.Balances != null && - this.Balances.SequenceEqual(input.Balances) - ) && - ( - this.DefaultCurrencyCode == input.DefaultCurrencyCode || - (this.DefaultCurrencyCode != null && - this.DefaultCurrencyCode.Equals(input.DefaultCurrencyCode)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MigratedAccountCode == input.MigratedAccountCode || - (this.MigratedAccountCode != null && - this.MigratedAccountCode.Equals(input.MigratedAccountCode)) - ) && - ( - this.PlatformPaymentConfiguration == input.PlatformPaymentConfiguration || - (this.PlatformPaymentConfiguration != null && - this.PlatformPaymentConfiguration.Equals(input.PlatformPaymentConfiguration)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TimeZone == input.TimeZone || - (this.TimeZone != null && - this.TimeZone.Equals(input.TimeZone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderId != null) - { - hashCode = (hashCode * 59) + this.AccountHolderId.GetHashCode(); - } - if (this.Balances != null) - { - hashCode = (hashCode * 59) + this.Balances.GetHashCode(); - } - if (this.DefaultCurrencyCode != null) - { - hashCode = (hashCode * 59) + this.DefaultCurrencyCode.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.MigratedAccountCode != null) - { - hashCode = (hashCode * 59) + this.MigratedAccountCode.GetHashCode(); - } - if (this.PlatformPaymentConfiguration != null) - { - hashCode = (hashCode * 59) + this.PlatformPaymentConfiguration.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TimeZone != null) - { - hashCode = (hashCode * 59) + this.TimeZone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.cs b/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.cs deleted file mode 100644 index fd833c55b..000000000 --- a/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationData.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// BalanceAccountNotificationData - /// - [DataContract(Name = "BalanceAccountNotificationData")] - public partial class BalanceAccountNotificationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// balanceAccount. - /// The unique identifier of the balance platform.. - public BalanceAccountNotificationData(BalanceAccount balanceAccount = default(BalanceAccount), string balancePlatform = default(string)) - { - this.BalanceAccount = balanceAccount; - this.BalancePlatform = balancePlatform; - } - - /// - /// Gets or Sets BalanceAccount - /// - [DataMember(Name = "balanceAccount", EmitDefaultValue = false)] - public BalanceAccount BalanceAccount { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceAccountNotificationData {\n"); - sb.Append(" BalanceAccount: ").Append(BalanceAccount).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceAccountNotificationData); - } - - /// - /// Returns true if BalanceAccountNotificationData instances are equal - /// - /// Instance of BalanceAccountNotificationData to be compared - /// Boolean - public bool Equals(BalanceAccountNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccount == input.BalanceAccount || - (this.BalanceAccount != null && - this.BalanceAccount.Equals(input.BalanceAccount)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccount != null) - { - hashCode = (hashCode * 59) + this.BalanceAccount.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.cs b/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.cs deleted file mode 100644 index b01a7db27..000000000 --- a/Adyen/Model/ConfigurationWebhooks/BalanceAccountNotificationRequest.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// BalanceAccountNotificationRequest - /// - [DataContract(Name = "BalanceAccountNotificationRequest")] - public partial class BalanceAccountNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of webhook. - /// - /// Type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Updated for value: balancePlatform.balanceAccount.updated - /// - [EnumMember(Value = "balancePlatform.balanceAccount.updated")] - Updated = 1, - - /// - /// Enum Created for value: balancePlatform.balanceAccount.created - /// - [EnumMember(Value = "balancePlatform.balanceAccount.created")] - Created = 2 - - } - - - /// - /// Type of webhook. - /// - /// Type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BalanceAccountNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of webhook. (required). - public BalanceAccountNotificationRequest(BalanceAccountNotificationData data = default(BalanceAccountNotificationData), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public BalanceAccountNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceAccountNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceAccountNotificationRequest); - } - - /// - /// Returns true if BalanceAccountNotificationRequest instances are equal - /// - /// Instance of BalanceAccountNotificationRequest to be compared - /// Boolean - public bool Equals(BalanceAccountNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.cs b/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.cs deleted file mode 100644 index 0c6b76257..000000000 --- a/Adyen/Model/ConfigurationWebhooks/BalancePlatformNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// BalancePlatformNotificationResponse - /// - [DataContract(Name = "BalancePlatformNotificationResponse")] - public partial class BalancePlatformNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public BalancePlatformNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalancePlatformNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalancePlatformNotificationResponse); - } - - /// - /// Returns true if BalancePlatformNotificationResponse instances are equal - /// - /// Instance of BalancePlatformNotificationResponse to be compared - /// Boolean - public bool Equals(BalancePlatformNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/BankAccountDetails.cs b/Adyen/Model/ConfigurationWebhooks/BankAccountDetails.cs deleted file mode 100644 index 2a9c44409..000000000 --- a/Adyen/Model/ConfigurationWebhooks/BankAccountDetails.cs +++ /dev/null @@ -1,269 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// BankAccountDetails - /// - [DataContract(Name = "BankAccountDetails")] - public partial class BankAccountDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BankAccountDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace.. - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to "checking"). - /// The bank account branch number, without separators or whitespace. - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. (default to "physical"). - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard.. - /// The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace.. - /// The [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace.. - /// **iban** or **usLocal** or **ukLocal** (required) (default to "iban"). - public BankAccountDetails(string accountNumber = default(string), string accountType = "checking", string branchNumber = default(string), string formFactor = "physical", string iban = default(string), string routingNumber = default(string), string sortCode = default(string), string type = "iban") - { - this.Type = type; - this.AccountNumber = accountNumber; - // use default value if no "accountType" provided - this.AccountType = accountType ?? "checking"; - this.BranchNumber = branchNumber; - // use default value if no "formFactor" provided - this.FormFactor = formFactor ?? "physical"; - this.Iban = iban; - this.RoutingNumber = routingNumber; - this.SortCode = sortCode; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public string AccountType { get; set; } - - /// - /// The bank account branch number, without separators or whitespace - /// - /// The bank account branch number, without separators or whitespace - [DataMember(Name = "branchNumber", EmitDefaultValue = false)] - public string BranchNumber { get; set; } - - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. - /// - /// Business accounts with a `formFactor` value of **physical** are business accounts issued under the central bank of that country. The default value is **physical** for NL, US, and UK business accounts. Adyen creates a local IBAN for business accounts when the `formFactor` value is set to **virtual**. The local IBANs that are supported are for DE and FR, which reference a physical NL account, with funds being routed through the central bank of NL. - [DataMember(Name = "formFactor", EmitDefaultValue = false)] - public string FormFactor { get; set; } - - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - /// - /// The [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - [DataMember(Name = "routingNumber", EmitDefaultValue = false)] - public string RoutingNumber { get; set; } - - /// - /// The [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - /// - /// The [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - [DataMember(Name = "sortCode", EmitDefaultValue = false)] - public string SortCode { get; set; } - - /// - /// **iban** or **usLocal** or **ukLocal** - /// - /// **iban** or **usLocal** or **ukLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountDetails {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" BranchNumber: ").Append(BranchNumber).Append("\n"); - sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); - sb.Append(" SortCode: ").Append(SortCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountDetails); - } - - /// - /// Returns true if BankAccountDetails instances are equal - /// - /// Instance of BankAccountDetails to be compared - /// Boolean - public bool Equals(BankAccountDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.BranchNumber == input.BranchNumber || - (this.BranchNumber != null && - this.BranchNumber.Equals(input.BranchNumber)) - ) && - ( - this.FormFactor == input.FormFactor || - (this.FormFactor != null && - this.FormFactor.Equals(input.FormFactor)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.RoutingNumber == input.RoutingNumber || - (this.RoutingNumber != null && - this.RoutingNumber.Equals(input.RoutingNumber)) - ) && - ( - this.SortCode == input.SortCode || - (this.SortCode != null && - this.SortCode.Equals(input.SortCode)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.BranchNumber != null) - { - hashCode = (hashCode * 59) + this.BranchNumber.GetHashCode(); - } - if (this.FormFactor != null) - { - hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.RoutingNumber != null) - { - hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); - } - if (this.SortCode != null) - { - hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/BulkAddress.cs b/Adyen/Model/ConfigurationWebhooks/BulkAddress.cs deleted file mode 100644 index e615c34ec..000000000 --- a/Adyen/Model/ConfigurationWebhooks/BulkAddress.cs +++ /dev/null @@ -1,286 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// BulkAddress - /// - [DataContract(Name = "BulkAddress")] - public partial class BulkAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BulkAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city.. - /// The name of the company.. - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. (required). - /// The email address.. - /// The house number or name.. - /// The full telephone number.. - /// The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries.. - /// The two-letter ISO 3166-2 state or province code. Maximum length: 2 characters for addresses in the US.. - /// The streetname of the house.. - public BulkAddress(string city = default(string), string company = default(string), string country = default(string), string email = default(string), string houseNumberOrName = default(string), string mobile = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.Country = country; - this.City = city; - this.Company = company; - this.Email = email; - this.HouseNumberOrName = houseNumberOrName; - this.Mobile = mobile; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - this.Street = street; - } - - /// - /// The name of the city. - /// - /// The name of the city. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The name of the company. - /// - /// The name of the company. - [DataMember(Name = "company", EmitDefaultValue = false)] - public string Company { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The email address. - /// - /// The email address. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The house number or name. - /// - /// The house number or name. - [DataMember(Name = "houseNumberOrName", EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// The full telephone number. - /// - /// The full telephone number. - [DataMember(Name = "mobile", EmitDefaultValue = false)] - public string Mobile { get; set; } - - /// - /// The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. - /// - /// The postal code. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-letter ISO 3166-2 state or province code. Maximum length: 2 characters for addresses in the US. - /// - /// The two-letter ISO 3166-2 state or province code. Maximum length: 2 characters for addresses in the US. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The streetname of the house. - /// - /// The streetname of the house. - [DataMember(Name = "street", EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BulkAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" Mobile: ").Append(Mobile).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BulkAddress); - } - - /// - /// Returns true if BulkAddress instances are equal - /// - /// Instance of BulkAddress to be compared - /// Boolean - public bool Equals(BulkAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.Mobile == input.Mobile || - (this.Mobile != null && - this.Mobile.Equals(input.Mobile)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.Mobile != null) - { - hashCode = (hashCode * 59) + this.Mobile.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.cs b/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.cs deleted file mode 100644 index 290dfdfbd..000000000 --- a/Adyen/Model/ConfigurationWebhooks/CapabilityProblem.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// CapabilityProblem - /// - [DataContract(Name = "CapabilityProblem")] - public partial class CapabilityProblem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// entity. - /// Contains information about the verification error.. - public CapabilityProblem(CapabilityProblemEntity entity = default(CapabilityProblemEntity), List verificationErrors = default(List)) - { - this.Entity = entity; - this.VerificationErrors = verificationErrors; - } - - /// - /// Gets or Sets Entity - /// - [DataMember(Name = "entity", EmitDefaultValue = false)] - public CapabilityProblemEntity Entity { get; set; } - - /// - /// Contains information about the verification error. - /// - /// Contains information about the verification error. - [DataMember(Name = "verificationErrors", EmitDefaultValue = false)] - public List VerificationErrors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblem {\n"); - sb.Append(" Entity: ").Append(Entity).Append("\n"); - sb.Append(" VerificationErrors: ").Append(VerificationErrors).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblem); - } - - /// - /// Returns true if CapabilityProblem instances are equal - /// - /// Instance of CapabilityProblem to be compared - /// Boolean - public bool Equals(CapabilityProblem input) - { - if (input == null) - { - return false; - } - return - ( - this.Entity == input.Entity || - (this.Entity != null && - this.Entity.Equals(input.Entity)) - ) && - ( - this.VerificationErrors == input.VerificationErrors || - this.VerificationErrors != null && - input.VerificationErrors != null && - this.VerificationErrors.SequenceEqual(input.VerificationErrors) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Entity != null) - { - hashCode = (hashCode * 59) + this.Entity.GetHashCode(); - } - if (this.VerificationErrors != null) - { - hashCode = (hashCode * 59) + this.VerificationErrors.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.cs b/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.cs deleted file mode 100644 index d6ab93d4b..000000000 --- a/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntity.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// CapabilityProblemEntity - /// - [DataContract(Name = "CapabilityProblemEntity")] - public partial class CapabilityProblemEntity : IEquatable, IValidatableObject - { - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Document for value: Document - /// - [EnumMember(Value = "Document")] - Document = 2, - - /// - /// Enum LegalEntity for value: LegalEntity - /// - [EnumMember(Value = "LegalEntity")] - LegalEntity = 3 - - } - - - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to.. - /// The ID of the entity.. - /// owner. - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**.. - public CapabilityProblemEntity(List documents = default(List), string id = default(string), CapabilityProblemEntityRecursive owner = default(CapabilityProblemEntityRecursive), TypeEnum? type = default(TypeEnum?)) - { - this.Documents = documents; - this.Id = id; - this.Owner = owner; - this.Type = type; - } - - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - [DataMember(Name = "documents", EmitDefaultValue = false)] - public List Documents { get; set; } - - /// - /// The ID of the entity. - /// - /// The ID of the entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Owner - /// - [DataMember(Name = "owner", EmitDefaultValue = false)] - public CapabilityProblemEntityRecursive Owner { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblemEntity {\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblemEntity); - } - - /// - /// Returns true if CapabilityProblemEntity instances are equal - /// - /// Instance of CapabilityProblemEntity to be compared - /// Boolean - public bool Equals(CapabilityProblemEntity input) - { - if (input == null) - { - return false; - } - return - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Owner != null) - { - hashCode = (hashCode * 59) + this.Owner.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.cs b/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.cs deleted file mode 100644 index 4332de7de..000000000 --- a/Adyen/Model/ConfigurationWebhooks/CapabilityProblemEntityRecursive.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// CapabilityProblemEntityRecursive - /// - [DataContract(Name = "CapabilityProblemEntity-recursive")] - public partial class CapabilityProblemEntityRecursive : IEquatable, IValidatableObject - { - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Document for value: Document - /// - [EnumMember(Value = "Document")] - Document = 2, - - /// - /// Enum LegalEntity for value: LegalEntity - /// - [EnumMember(Value = "LegalEntity")] - LegalEntity = 3 - - } - - - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - /// - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to.. - /// The ID of the entity.. - /// Type of entity. Possible values: **LegalEntity**, **BankAccount**, **Document**.. - public CapabilityProblemEntityRecursive(List documents = default(List), string id = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Documents = documents; - this.Id = id; - this.Type = type; - } - - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - [DataMember(Name = "documents", EmitDefaultValue = false)] - public List Documents { get; set; } - - /// - /// The ID of the entity. - /// - /// The ID of the entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblemEntityRecursive {\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblemEntityRecursive); - } - - /// - /// Returns true if CapabilityProblemEntityRecursive instances are equal - /// - /// Instance of CapabilityProblemEntityRecursive to be compared - /// Boolean - public bool Equals(CapabilityProblemEntityRecursive input) - { - if (input == null) - { - return false; - } - return - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.cs b/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.cs deleted file mode 100644 index 06ba04f31..000000000 --- a/Adyen/Model/ConfigurationWebhooks/CapabilitySettings.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// CapabilitySettings - /// - [DataContract(Name = "CapabilitySettings")] - public partial class CapabilitySettings : IEquatable, IValidatableObject - { - /// - /// Defines FundingSource - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2, - - /// - /// Enum Prepaid for value: prepaid - /// - [EnumMember(Value = "prepaid")] - Prepaid = 3 - - } - - - - /// - /// Gets or Sets FundingSource - /// - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public List FundingSource { get; set; } - /// - /// Defines Interval - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum IntervalEnum - { - /// - /// Enum Daily for value: daily - /// - [EnumMember(Value = "daily")] - Daily = 1, - - /// - /// Enum Monthly for value: monthly - /// - [EnumMember(Value = "monthly")] - Monthly = 2, - - /// - /// Enum Weekly for value: weekly - /// - [EnumMember(Value = "weekly")] - Weekly = 3 - - } - - - /// - /// Gets or Sets Interval - /// - [DataMember(Name = "interval", EmitDefaultValue = false)] - public IntervalEnum? Interval { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amountPerIndustry. - /// authorizedCardUsers. - /// fundingSource. - /// interval. - /// maxAmount. - public CapabilitySettings(Dictionary amountPerIndustry = default(Dictionary), bool? authorizedCardUsers = default(bool?), List fundingSource = default(List), IntervalEnum? interval = default(IntervalEnum?), Amount maxAmount = default(Amount)) - { - this.AmountPerIndustry = amountPerIndustry; - this.AuthorizedCardUsers = authorizedCardUsers; - this.FundingSource = fundingSource; - this.Interval = interval; - this.MaxAmount = maxAmount; - } - - /// - /// Gets or Sets AmountPerIndustry - /// - [DataMember(Name = "amountPerIndustry", EmitDefaultValue = false)] - public Dictionary AmountPerIndustry { get; set; } - - /// - /// Gets or Sets AuthorizedCardUsers - /// - [DataMember(Name = "authorizedCardUsers", EmitDefaultValue = false)] - public bool? AuthorizedCardUsers { get; set; } - - /// - /// Gets or Sets MaxAmount - /// - [DataMember(Name = "maxAmount", EmitDefaultValue = false)] - public Amount MaxAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilitySettings {\n"); - sb.Append(" AmountPerIndustry: ").Append(AmountPerIndustry).Append("\n"); - sb.Append(" AuthorizedCardUsers: ").Append(AuthorizedCardUsers).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" Interval: ").Append(Interval).Append("\n"); - sb.Append(" MaxAmount: ").Append(MaxAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilitySettings); - } - - /// - /// Returns true if CapabilitySettings instances are equal - /// - /// Instance of CapabilitySettings to be compared - /// Boolean - public bool Equals(CapabilitySettings input) - { - if (input == null) - { - return false; - } - return - ( - this.AmountPerIndustry == input.AmountPerIndustry || - this.AmountPerIndustry != null && - input.AmountPerIndustry != null && - this.AmountPerIndustry.SequenceEqual(input.AmountPerIndustry) - ) && - ( - this.AuthorizedCardUsers == input.AuthorizedCardUsers || - this.AuthorizedCardUsers.Equals(input.AuthorizedCardUsers) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.SequenceEqual(input.FundingSource) - ) && - ( - this.Interval == input.Interval || - this.Interval.Equals(input.Interval) - ) && - ( - this.MaxAmount == input.MaxAmount || - (this.MaxAmount != null && - this.MaxAmount.Equals(input.MaxAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AmountPerIndustry != null) - { - hashCode = (hashCode * 59) + this.AmountPerIndustry.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AuthorizedCardUsers.GetHashCode(); - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - hashCode = (hashCode * 59) + this.Interval.GetHashCode(); - if (this.MaxAmount != null) - { - hashCode = (hashCode * 59) + this.MaxAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Card.cs b/Adyen/Model/ConfigurationWebhooks/Card.cs deleted file mode 100644 index 4bcabca25..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Card.cs +++ /dev/null @@ -1,387 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Card - /// - [DataContract(Name = "Card")] - public partial class Card : IEquatable, IValidatableObject - { - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - [JsonConverter(typeof(StringEnumConverter))] - public enum FormFactorEnum - { - /// - /// Enum Physical for value: physical - /// - [EnumMember(Value = "physical")] - Physical = 1, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 2, - - /// - /// Enum Virtual for value: virtual - /// - [EnumMember(Value = "virtual")] - Virtual = 3 - - } - - - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - /// - /// The form factor of the card. Possible values: **virtual**, **physical**. - [DataMember(Name = "formFactor", IsRequired = false, EmitDefaultValue = false)] - public FormFactorEnum FormFactor { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Card() { } - /// - /// Initializes a new instance of the class. - /// - /// authentication. - /// The bank identification number (BIN) of the card number.. - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. (required). - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. (required). - /// The name of the cardholder. Maximum length: 26 characters. (required). - /// configuration. - /// The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards.. - /// deliveryContact. - /// expiration. - /// The form factor of the card. Possible values: **virtual**, **physical**. (required). - /// Last last four digits of the card number.. - /// The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. (required). - /// The 3DS configuration of the physical or the virtual card. Possible values: **fullySupported**, **secureCorporate**. > Reach out to your Adyen contact to get the values relevant for your integration.. - public Card(Authentication authentication = default(Authentication), string bin = default(string), string brand = default(string), string brandVariant = default(string), string cardholderName = default(string), CardConfiguration configuration = default(CardConfiguration), string cvc = default(string), DeliveryContact deliveryContact = default(DeliveryContact), Expiry expiration = default(Expiry), FormFactorEnum formFactor = default(FormFactorEnum), string lastFour = default(string), string number = default(string), string threeDSecure = default(string)) - { - this.Brand = brand; - this.BrandVariant = brandVariant; - this.CardholderName = cardholderName; - this.FormFactor = formFactor; - this.Number = number; - this.Authentication = authentication; - this.Bin = bin; - this._Configuration = configuration; - this.Cvc = cvc; - this.DeliveryContact = deliveryContact; - this.Expiration = expiration; - this.LastFour = lastFour; - this.ThreeDSecure = threeDSecure; - } - - /// - /// Gets or Sets Authentication - /// - [DataMember(Name = "authentication", EmitDefaultValue = false)] - public Authentication Authentication { get; set; } - - /// - /// The bank identification number (BIN) of the card number. - /// - /// The bank identification number (BIN) of the card number. - [DataMember(Name = "bin", EmitDefaultValue = false)] - public string Bin { get; set; } - - /// - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. - /// - /// The brand of the physical or the virtual card. Possible values: **visa**, **mc**. - [DataMember(Name = "brand", IsRequired = false, EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. - /// - /// The brand variant of the physical or the virtual card. For example, **visadebit** or **mcprepaid**. >Reach out to your Adyen contact to get the values relevant for your integration. - [DataMember(Name = "brandVariant", IsRequired = false, EmitDefaultValue = false)] - public string BrandVariant { get; set; } - - /// - /// The name of the cardholder. Maximum length: 26 characters. - /// - /// The name of the cardholder. Maximum length: 26 characters. - [DataMember(Name = "cardholderName", IsRequired = false, EmitDefaultValue = false)] - public string CardholderName { get; set; } - - /// - /// Gets or Sets _Configuration - /// - [DataMember(Name = "configuration", EmitDefaultValue = false)] - public CardConfiguration _Configuration { get; set; } - - /// - /// The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards. - /// - /// The CVC2 value of the card. > The CVC2 is not sent by default. This is only returned in the `POST` response for single-use virtual cards. - [DataMember(Name = "cvc", EmitDefaultValue = false)] - public string Cvc { get; set; } - - /// - /// Gets or Sets DeliveryContact - /// - [DataMember(Name = "deliveryContact", EmitDefaultValue = false)] - public DeliveryContact DeliveryContact { get; set; } - - /// - /// Gets or Sets Expiration - /// - [DataMember(Name = "expiration", EmitDefaultValue = false)] - public Expiry Expiration { get; set; } - - /// - /// Last last four digits of the card number. - /// - /// Last last four digits of the card number. - [DataMember(Name = "lastFour", EmitDefaultValue = false)] - public string LastFour { get; set; } - - /// - /// The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. - /// - /// The primary account number (PAN) of the card. > The PAN is masked by default and returned only for single-use virtual cards. - [DataMember(Name = "number", IsRequired = false, EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// The 3DS configuration of the physical or the virtual card. Possible values: **fullySupported**, **secureCorporate**. > Reach out to your Adyen contact to get the values relevant for your integration. - /// - /// The 3DS configuration of the physical or the virtual card. Possible values: **fullySupported**, **secureCorporate**. > Reach out to your Adyen contact to get the values relevant for your integration. - [DataMember(Name = "threeDSecure", EmitDefaultValue = false)] - public string ThreeDSecure { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Card {\n"); - sb.Append(" Authentication: ").Append(Authentication).Append("\n"); - sb.Append(" Bin: ").Append(Bin).Append("\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" BrandVariant: ").Append(BrandVariant).Append("\n"); - sb.Append(" CardholderName: ").Append(CardholderName).Append("\n"); - sb.Append(" _Configuration: ").Append(_Configuration).Append("\n"); - sb.Append(" Cvc: ").Append(Cvc).Append("\n"); - sb.Append(" DeliveryContact: ").Append(DeliveryContact).Append("\n"); - sb.Append(" Expiration: ").Append(Expiration).Append("\n"); - sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); - sb.Append(" LastFour: ").Append(LastFour).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" ThreeDSecure: ").Append(ThreeDSecure).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Card); - } - - /// - /// Returns true if Card instances are equal - /// - /// Instance of Card to be compared - /// Boolean - public bool Equals(Card input) - { - if (input == null) - { - return false; - } - return - ( - this.Authentication == input.Authentication || - (this.Authentication != null && - this.Authentication.Equals(input.Authentication)) - ) && - ( - this.Bin == input.Bin || - (this.Bin != null && - this.Bin.Equals(input.Bin)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.BrandVariant == input.BrandVariant || - (this.BrandVariant != null && - this.BrandVariant.Equals(input.BrandVariant)) - ) && - ( - this.CardholderName == input.CardholderName || - (this.CardholderName != null && - this.CardholderName.Equals(input.CardholderName)) - ) && - ( - this._Configuration == input._Configuration || - (this._Configuration != null && - this._Configuration.Equals(input._Configuration)) - ) && - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.DeliveryContact == input.DeliveryContact || - (this.DeliveryContact != null && - this.DeliveryContact.Equals(input.DeliveryContact)) - ) && - ( - this.Expiration == input.Expiration || - (this.Expiration != null && - this.Expiration.Equals(input.Expiration)) - ) && - ( - this.FormFactor == input.FormFactor || - this.FormFactor.Equals(input.FormFactor) - ) && - ( - this.LastFour == input.LastFour || - (this.LastFour != null && - this.LastFour.Equals(input.LastFour)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.ThreeDSecure == input.ThreeDSecure || - (this.ThreeDSecure != null && - this.ThreeDSecure.Equals(input.ThreeDSecure)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Authentication != null) - { - hashCode = (hashCode * 59) + this.Authentication.GetHashCode(); - } - if (this.Bin != null) - { - hashCode = (hashCode * 59) + this.Bin.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.BrandVariant != null) - { - hashCode = (hashCode * 59) + this.BrandVariant.GetHashCode(); - } - if (this.CardholderName != null) - { - hashCode = (hashCode * 59) + this.CardholderName.GetHashCode(); - } - if (this._Configuration != null) - { - hashCode = (hashCode * 59) + this._Configuration.GetHashCode(); - } - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.DeliveryContact != null) - { - hashCode = (hashCode * 59) + this.DeliveryContact.GetHashCode(); - } - if (this.Expiration != null) - { - hashCode = (hashCode * 59) + this.Expiration.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); - if (this.LastFour != null) - { - hashCode = (hashCode * 59) + this.LastFour.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.ThreeDSecure != null) - { - hashCode = (hashCode * 59) + this.ThreeDSecure.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CardholderName (string) maxLength - if (this.CardholderName != null && this.CardholderName.Length > 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CardholderName, length must be less than 26.", new [] { "CardholderName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/CardConfiguration.cs b/Adyen/Model/ConfigurationWebhooks/CardConfiguration.cs deleted file mode 100644 index 343e3bbec..000000000 --- a/Adyen/Model/ConfigurationWebhooks/CardConfiguration.cs +++ /dev/null @@ -1,386 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// CardConfiguration - /// - [DataContract(Name = "CardConfiguration")] - public partial class CardConfiguration : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CardConfiguration() { } - /// - /// Initializes a new instance of the class. - /// - /// Overrides the activation label design ID defined in the `configurationProfileId`. The activation label is attached to the card and contains the activation instructions.. - /// Your app's URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters.. - /// bulkAddress. - /// The ID of the card image. This is the image that will be printed on the full front of the card.. - /// Overrides the carrier design ID defined in the `configurationProfileId`. The carrier is the letter or packaging to which the card is attached.. - /// The ID of the carrier image. This is the image that will printed on the letter to which the card is attached.. - /// The ID of the card configuration profile that contains the settings of the card. For example, the envelope and PIN mailer designs or the logistics company handling the shipment. All the settings in the profile are applied to the card, unless you provide other fields to override them. For example, send the `shipmentMethod` to override the logistics company defined in the card configuration profile. (required). - /// The three-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the card. For example, **EUR**.. - /// Overrides the envelope design ID defined in the `configurationProfileId`. . - /// Overrides the insert design ID defined in the `configurationProfileId`. An insert is any additional material, such as marketing materials, that are shipped together with the card.. - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code of the card. For example, **en**.. - /// The ID of the logo image. This is the image that will be printed on the partial front of the card, such as a logo on the upper right corner.. - /// Overrides the PIN mailer design ID defined in the `configurationProfileId`. The PIN mailer is the letter on which the PIN is printed.. - /// Overrides the logistics company defined in the `configurationProfileId`.. - public CardConfiguration(string activation = default(string), string activationUrl = default(string), BulkAddress bulkAddress = default(BulkAddress), string cardImageId = default(string), string carrier = default(string), string carrierImageId = default(string), string configurationProfileId = default(string), string currency = default(string), string envelope = default(string), string insert = default(string), string language = default(string), string logoImageId = default(string), string pinMailer = default(string), string shipmentMethod = default(string)) - { - this.ConfigurationProfileId = configurationProfileId; - this.Activation = activation; - this.ActivationUrl = activationUrl; - this.BulkAddress = bulkAddress; - this.CardImageId = cardImageId; - this.Carrier = carrier; - this.CarrierImageId = carrierImageId; - this.Currency = currency; - this.Envelope = envelope; - this.Insert = insert; - this.Language = language; - this.LogoImageId = logoImageId; - this.PinMailer = pinMailer; - this.ShipmentMethod = shipmentMethod; - } - - /// - /// Overrides the activation label design ID defined in the `configurationProfileId`. The activation label is attached to the card and contains the activation instructions. - /// - /// Overrides the activation label design ID defined in the `configurationProfileId`. The activation label is attached to the card and contains the activation instructions. - [DataMember(Name = "activation", EmitDefaultValue = false)] - public string Activation { get; set; } - - /// - /// Your app's URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters. - /// - /// Your app's URL, if you want to activate cards through your app. For example, **my-app://ref1236a7d**. A QR code is created based on this URL, and is included in the carrier. Before you use this field, reach out to your Adyen contact to set up the QR code process. Maximum length: 255 characters. - [DataMember(Name = "activationUrl", EmitDefaultValue = false)] - public string ActivationUrl { get; set; } - - /// - /// Gets or Sets BulkAddress - /// - [DataMember(Name = "bulkAddress", EmitDefaultValue = false)] - public BulkAddress BulkAddress { get; set; } - - /// - /// The ID of the card image. This is the image that will be printed on the full front of the card. - /// - /// The ID of the card image. This is the image that will be printed on the full front of the card. - [DataMember(Name = "cardImageId", EmitDefaultValue = false)] - public string CardImageId { get; set; } - - /// - /// Overrides the carrier design ID defined in the `configurationProfileId`. The carrier is the letter or packaging to which the card is attached. - /// - /// Overrides the carrier design ID defined in the `configurationProfileId`. The carrier is the letter or packaging to which the card is attached. - [DataMember(Name = "carrier", EmitDefaultValue = false)] - public string Carrier { get; set; } - - /// - /// The ID of the carrier image. This is the image that will printed on the letter to which the card is attached. - /// - /// The ID of the carrier image. This is the image that will printed on the letter to which the card is attached. - [DataMember(Name = "carrierImageId", EmitDefaultValue = false)] - public string CarrierImageId { get; set; } - - /// - /// The ID of the card configuration profile that contains the settings of the card. For example, the envelope and PIN mailer designs or the logistics company handling the shipment. All the settings in the profile are applied to the card, unless you provide other fields to override them. For example, send the `shipmentMethod` to override the logistics company defined in the card configuration profile. - /// - /// The ID of the card configuration profile that contains the settings of the card. For example, the envelope and PIN mailer designs or the logistics company handling the shipment. All the settings in the profile are applied to the card, unless you provide other fields to override them. For example, send the `shipmentMethod` to override the logistics company defined in the card configuration profile. - [DataMember(Name = "configurationProfileId", IsRequired = false, EmitDefaultValue = false)] - public string ConfigurationProfileId { get; set; } - - /// - /// The three-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the card. For example, **EUR**. - /// - /// The three-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the card. For example, **EUR**. - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// Overrides the envelope design ID defined in the `configurationProfileId`. - /// - /// Overrides the envelope design ID defined in the `configurationProfileId`. - [DataMember(Name = "envelope", EmitDefaultValue = false)] - public string Envelope { get; set; } - - /// - /// Overrides the insert design ID defined in the `configurationProfileId`. An insert is any additional material, such as marketing materials, that are shipped together with the card. - /// - /// Overrides the insert design ID defined in the `configurationProfileId`. An insert is any additional material, such as marketing materials, that are shipped together with the card. - [DataMember(Name = "insert", EmitDefaultValue = false)] - public string Insert { get; set; } - - /// - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code of the card. For example, **en**. - /// - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code of the card. For example, **en**. - [DataMember(Name = "language", EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// The ID of the logo image. This is the image that will be printed on the partial front of the card, such as a logo on the upper right corner. - /// - /// The ID of the logo image. This is the image that will be printed on the partial front of the card, such as a logo on the upper right corner. - [DataMember(Name = "logoImageId", EmitDefaultValue = false)] - public string LogoImageId { get; set; } - - /// - /// Overrides the PIN mailer design ID defined in the `configurationProfileId`. The PIN mailer is the letter on which the PIN is printed. - /// - /// Overrides the PIN mailer design ID defined in the `configurationProfileId`. The PIN mailer is the letter on which the PIN is printed. - [DataMember(Name = "pinMailer", EmitDefaultValue = false)] - public string PinMailer { get; set; } - - /// - /// Overrides the logistics company defined in the `configurationProfileId`. - /// - /// Overrides the logistics company defined in the `configurationProfileId`. - [DataMember(Name = "shipmentMethod", EmitDefaultValue = false)] - public string ShipmentMethod { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardConfiguration {\n"); - sb.Append(" Activation: ").Append(Activation).Append("\n"); - sb.Append(" ActivationUrl: ").Append(ActivationUrl).Append("\n"); - sb.Append(" BulkAddress: ").Append(BulkAddress).Append("\n"); - sb.Append(" CardImageId: ").Append(CardImageId).Append("\n"); - sb.Append(" Carrier: ").Append(Carrier).Append("\n"); - sb.Append(" CarrierImageId: ").Append(CarrierImageId).Append("\n"); - sb.Append(" ConfigurationProfileId: ").Append(ConfigurationProfileId).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Envelope: ").Append(Envelope).Append("\n"); - sb.Append(" Insert: ").Append(Insert).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" LogoImageId: ").Append(LogoImageId).Append("\n"); - sb.Append(" PinMailer: ").Append(PinMailer).Append("\n"); - sb.Append(" ShipmentMethod: ").Append(ShipmentMethod).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardConfiguration); - } - - /// - /// Returns true if CardConfiguration instances are equal - /// - /// Instance of CardConfiguration to be compared - /// Boolean - public bool Equals(CardConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.Activation == input.Activation || - (this.Activation != null && - this.Activation.Equals(input.Activation)) - ) && - ( - this.ActivationUrl == input.ActivationUrl || - (this.ActivationUrl != null && - this.ActivationUrl.Equals(input.ActivationUrl)) - ) && - ( - this.BulkAddress == input.BulkAddress || - (this.BulkAddress != null && - this.BulkAddress.Equals(input.BulkAddress)) - ) && - ( - this.CardImageId == input.CardImageId || - (this.CardImageId != null && - this.CardImageId.Equals(input.CardImageId)) - ) && - ( - this.Carrier == input.Carrier || - (this.Carrier != null && - this.Carrier.Equals(input.Carrier)) - ) && - ( - this.CarrierImageId == input.CarrierImageId || - (this.CarrierImageId != null && - this.CarrierImageId.Equals(input.CarrierImageId)) - ) && - ( - this.ConfigurationProfileId == input.ConfigurationProfileId || - (this.ConfigurationProfileId != null && - this.ConfigurationProfileId.Equals(input.ConfigurationProfileId)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Envelope == input.Envelope || - (this.Envelope != null && - this.Envelope.Equals(input.Envelope)) - ) && - ( - this.Insert == input.Insert || - (this.Insert != null && - this.Insert.Equals(input.Insert)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.LogoImageId == input.LogoImageId || - (this.LogoImageId != null && - this.LogoImageId.Equals(input.LogoImageId)) - ) && - ( - this.PinMailer == input.PinMailer || - (this.PinMailer != null && - this.PinMailer.Equals(input.PinMailer)) - ) && - ( - this.ShipmentMethod == input.ShipmentMethod || - (this.ShipmentMethod != null && - this.ShipmentMethod.Equals(input.ShipmentMethod)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Activation != null) - { - hashCode = (hashCode * 59) + this.Activation.GetHashCode(); - } - if (this.ActivationUrl != null) - { - hashCode = (hashCode * 59) + this.ActivationUrl.GetHashCode(); - } - if (this.BulkAddress != null) - { - hashCode = (hashCode * 59) + this.BulkAddress.GetHashCode(); - } - if (this.CardImageId != null) - { - hashCode = (hashCode * 59) + this.CardImageId.GetHashCode(); - } - if (this.Carrier != null) - { - hashCode = (hashCode * 59) + this.Carrier.GetHashCode(); - } - if (this.CarrierImageId != null) - { - hashCode = (hashCode * 59) + this.CarrierImageId.GetHashCode(); - } - if (this.ConfigurationProfileId != null) - { - hashCode = (hashCode * 59) + this.ConfigurationProfileId.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Envelope != null) - { - hashCode = (hashCode * 59) + this.Envelope.GetHashCode(); - } - if (this.Insert != null) - { - hashCode = (hashCode * 59) + this.Insert.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.LogoImageId != null) - { - hashCode = (hashCode * 59) + this.LogoImageId.GetHashCode(); - } - if (this.PinMailer != null) - { - hashCode = (hashCode * 59) + this.PinMailer.GetHashCode(); - } - if (this.ShipmentMethod != null) - { - hashCode = (hashCode * 59) + this.ShipmentMethod.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ActivationUrl (string) maxLength - if (this.ActivationUrl != null && this.ActivationUrl.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ActivationUrl, length must be less than 255.", new [] { "ActivationUrl" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/CardOrderItem.cs b/Adyen/Model/ConfigurationWebhooks/CardOrderItem.cs deleted file mode 100644 index d2e78e68e..000000000 --- a/Adyen/Model/ConfigurationWebhooks/CardOrderItem.cs +++ /dev/null @@ -1,260 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// CardOrderItem - /// - [DataContract(Name = "CardOrderItem")] - public partial class CardOrderItem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// card. - /// The unique identifier of the card order item.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The ID of the resource.. - /// The unique identifier of the payment instrument related to the card order item.. - /// pin. - /// The shipping method used to deliver the card or the PIN.. - public CardOrderItem(string balancePlatform = default(string), CardOrderItemDeliveryStatus card = default(CardOrderItemDeliveryStatus), string cardOrderItemId = default(string), DateTime creationDate = default(DateTime), string id = default(string), string paymentInstrumentId = default(string), CardOrderItemDeliveryStatus pin = default(CardOrderItemDeliveryStatus), string shippingMethod = default(string)) - { - this.BalancePlatform = balancePlatform; - this.Card = card; - this.CardOrderItemId = cardOrderItemId; - this.CreationDate = creationDate; - this.Id = id; - this.PaymentInstrumentId = paymentInstrumentId; - this.Pin = pin; - this.ShippingMethod = shippingMethod; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public CardOrderItemDeliveryStatus Card { get; set; } - - /// - /// The unique identifier of the card order item. - /// - /// The unique identifier of the card order item. - [DataMember(Name = "cardOrderItemId", EmitDefaultValue = false)] - public string CardOrderItemId { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the payment instrument related to the card order item. - /// - /// The unique identifier of the payment instrument related to the card order item. - [DataMember(Name = "paymentInstrumentId", EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Gets or Sets Pin - /// - [DataMember(Name = "pin", EmitDefaultValue = false)] - public CardOrderItemDeliveryStatus Pin { get; set; } - - /// - /// The shipping method used to deliver the card or the PIN. - /// - /// The shipping method used to deliver the card or the PIN. - [DataMember(Name = "shippingMethod", EmitDefaultValue = false)] - public string ShippingMethod { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardOrderItem {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" CardOrderItemId: ").Append(CardOrderItemId).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Pin: ").Append(Pin).Append("\n"); - sb.Append(" ShippingMethod: ").Append(ShippingMethod).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardOrderItem); - } - - /// - /// Returns true if CardOrderItem instances are equal - /// - /// Instance of CardOrderItem to be compared - /// Boolean - public bool Equals(CardOrderItem input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.CardOrderItemId == input.CardOrderItemId || - (this.CardOrderItemId != null && - this.CardOrderItemId.Equals(input.CardOrderItemId)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Pin == input.Pin || - (this.Pin != null && - this.Pin.Equals(input.Pin)) - ) && - ( - this.ShippingMethod == input.ShippingMethod || - (this.ShippingMethod != null && - this.ShippingMethod.Equals(input.ShippingMethod)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.CardOrderItemId != null) - { - hashCode = (hashCode * 59) + this.CardOrderItemId.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - if (this.Pin != null) - { - hashCode = (hashCode * 59) + this.Pin.GetHashCode(); - } - if (this.ShippingMethod != null) - { - hashCode = (hashCode * 59) + this.ShippingMethod.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.cs b/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.cs deleted file mode 100644 index cbd9cdb05..000000000 --- a/Adyen/Model/ConfigurationWebhooks/CardOrderItemDeliveryStatus.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// CardOrderItemDeliveryStatus - /// - [DataContract(Name = "CardOrderItemDeliveryStatus")] - public partial class CardOrderItemDeliveryStatus : IEquatable, IValidatableObject - { - /// - /// The status of the PIN delivery. - /// - /// The status of the PIN delivery. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Created for value: created - /// - [EnumMember(Value = "created")] - Created = 1, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 2, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 3, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 4, - - /// - /// Enum Produced for value: produced - /// - [EnumMember(Value = "produced")] - Produced = 5, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 6, - - /// - /// Enum Shipped for value: shipped - /// - [EnumMember(Value = "shipped")] - Shipped = 7, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 8 - - } - - - /// - /// The status of the PIN delivery. - /// - /// The status of the PIN delivery. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// An error message.. - /// The status of the PIN delivery.. - /// The tracking number of the PIN delivery.. - public CardOrderItemDeliveryStatus(string errorMessage = default(string), StatusEnum? status = default(StatusEnum?), string trackingNumber = default(string)) - { - this.ErrorMessage = errorMessage; - this.Status = status; - this.TrackingNumber = trackingNumber; - } - - /// - /// An error message. - /// - /// An error message. - [DataMember(Name = "errorMessage", EmitDefaultValue = false)] - public string ErrorMessage { get; set; } - - /// - /// The tracking number of the PIN delivery. - /// - /// The tracking number of the PIN delivery. - [DataMember(Name = "trackingNumber", EmitDefaultValue = false)] - public string TrackingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardOrderItemDeliveryStatus {\n"); - sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TrackingNumber: ").Append(TrackingNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardOrderItemDeliveryStatus); - } - - /// - /// Returns true if CardOrderItemDeliveryStatus instances are equal - /// - /// Instance of CardOrderItemDeliveryStatus to be compared - /// Boolean - public bool Equals(CardOrderItemDeliveryStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorMessage == input.ErrorMessage || - (this.ErrorMessage != null && - this.ErrorMessage.Equals(input.ErrorMessage)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TrackingNumber == input.TrackingNumber || - (this.TrackingNumber != null && - this.TrackingNumber.Equals(input.TrackingNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorMessage != null) - { - hashCode = (hashCode * 59) + this.ErrorMessage.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TrackingNumber != null) - { - hashCode = (hashCode * 59) + this.TrackingNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.cs b/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.cs deleted file mode 100644 index bbc680fe1..000000000 --- a/Adyen/Model/ConfigurationWebhooks/CardOrderNotificationRequest.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// CardOrderNotificationRequest - /// - [DataContract(Name = "CardOrderNotificationRequest")] - public partial class CardOrderNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of webhook. - /// - /// Type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Created for value: balancePlatform.cardorder.created - /// - [EnumMember(Value = "balancePlatform.cardorder.created")] - Created = 1, - - /// - /// Enum Updated for value: balancePlatform.cardorder.updated - /// - [EnumMember(Value = "balancePlatform.cardorder.updated")] - Updated = 2 - - } - - - /// - /// Type of webhook. - /// - /// Type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CardOrderNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of webhook. (required). - public CardOrderNotificationRequest(CardOrderItem data = default(CardOrderItem), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public CardOrderItem Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardOrderNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardOrderNotificationRequest); - } - - /// - /// Returns true if CardOrderNotificationRequest instances are equal - /// - /// Instance of CardOrderNotificationRequest to be compared - /// Boolean - public bool Equals(CardOrderNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/ContactDetails.cs b/Adyen/Model/ConfigurationWebhooks/ContactDetails.cs deleted file mode 100644 index 812883166..000000000 --- a/Adyen/Model/ConfigurationWebhooks/ContactDetails.cs +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// ContactDetails - /// - [DataContract(Name = "ContactDetails")] - public partial class ContactDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ContactDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// The email address of the account holder. (required). - /// phone (required). - /// The URL of the account holder's website.. - public ContactDetails(Address address = default(Address), string email = default(string), Phone phone = default(Phone), string webAddress = default(string)) - { - this.Address = address; - this.Email = email; - this.Phone = phone; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public Address Address { get; set; } - - /// - /// The email address of the account holder. - /// - /// The email address of the account holder. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name = "phone", IsRequired = false, EmitDefaultValue = false)] - public Phone Phone { get; set; } - - /// - /// The URL of the account holder's website. - /// - /// The URL of the account holder's website. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ContactDetails {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ContactDetails); - } - - /// - /// Returns true if ContactDetails instances are equal - /// - /// Instance of ContactDetails to be compared - /// Boolean - public bool Equals(ContactDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/DeliveryAddress.cs b/Adyen/Model/ConfigurationWebhooks/DeliveryAddress.cs deleted file mode 100644 index e03261687..000000000 --- a/Adyen/Model/ConfigurationWebhooks/DeliveryAddress.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// DeliveryAddress - /// - [DataContract(Name = "DeliveryAddress")] - public partial class DeliveryAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeliveryAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city.. - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// The name of the street. Do not include the number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **Simon Carmiggeltstraat**.. - /// The number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **6-50**.. - /// Additional information about the delivery address.. - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries.. - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - public DeliveryAddress(string city = default(string), string country = default(string), string line1 = default(string), string line2 = default(string), string line3 = default(string), string postalCode = default(string), string stateOrProvince = default(string)) - { - this.Country = country; - this.City = city; - this.Line1 = line1; - this.Line2 = line2; - this.Line3 = line3; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. - /// - /// The name of the city. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. >If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The name of the street. Do not include the number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **Simon Carmiggeltstraat**. - /// - /// The name of the street. Do not include the number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **Simon Carmiggeltstraat**. - [DataMember(Name = "line1", EmitDefaultValue = false)] - public string Line1 { get; set; } - - /// - /// The number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **6-50**. - /// - /// The number of the building. For example, if the address is Simon Carmiggeltstraat 6-50, provide **6-50**. - [DataMember(Name = "line2", EmitDefaultValue = false)] - public string Line2 { get; set; } - - /// - /// Additional information about the delivery address. - /// - /// Additional information about the delivery address. - [DataMember(Name = "line3", EmitDefaultValue = false)] - public string Line3 { get; set; } - - /// - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. - /// - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeliveryAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Line1: ").Append(Line1).Append("\n"); - sb.Append(" Line2: ").Append(Line2).Append("\n"); - sb.Append(" Line3: ").Append(Line3).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeliveryAddress); - } - - /// - /// Returns true if DeliveryAddress instances are equal - /// - /// Instance of DeliveryAddress to be compared - /// Boolean - public bool Equals(DeliveryAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Line1 == input.Line1 || - (this.Line1 != null && - this.Line1.Equals(input.Line1)) - ) && - ( - this.Line2 == input.Line2 || - (this.Line2 != null && - this.Line2.Equals(input.Line2)) - ) && - ( - this.Line3 == input.Line3 || - (this.Line3 != null && - this.Line3.Equals(input.Line3)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Line1 != null) - { - hashCode = (hashCode * 59) + this.Line1.GetHashCode(); - } - if (this.Line2 != null) - { - hashCode = (hashCode * 59) + this.Line2.GetHashCode(); - } - if (this.Line3 != null) - { - hashCode = (hashCode * 59) + this.Line3.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/DeliveryContact.cs b/Adyen/Model/ConfigurationWebhooks/DeliveryContact.cs deleted file mode 100644 index 2154949d1..000000000 --- a/Adyen/Model/ConfigurationWebhooks/DeliveryContact.cs +++ /dev/null @@ -1,245 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// DeliveryContact - /// - [DataContract(Name = "DeliveryContact")] - public partial class DeliveryContact : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeliveryContact() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// The company name of the contact.. - /// The email address of the contact.. - /// The full phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// name (required). - /// phoneNumber. - /// The URL of the contact's website.. - public DeliveryContact(DeliveryAddress address = default(DeliveryAddress), string company = default(string), string email = default(string), string fullPhoneNumber = default(string), Name name = default(Name), PhoneNumber phoneNumber = default(PhoneNumber), string webAddress = default(string)) - { - this.Address = address; - this.Name = name; - this.Company = company; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.PhoneNumber = phoneNumber; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public DeliveryAddress Address { get; set; } - - /// - /// The company name of the contact. - /// - /// The company name of the contact. - [DataMember(Name = "company", EmitDefaultValue = false)] - public string Company { get; set; } - - /// - /// The email address of the contact. - /// - /// The email address of the contact. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The full phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The full phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public PhoneNumber PhoneNumber { get; set; } - - /// - /// The URL of the contact's website. - /// - /// The URL of the contact's website. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeliveryContact {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeliveryContact); - } - - /// - /// Returns true if DeliveryContact instances are equal - /// - /// Instance of DeliveryContact to be compared - /// Boolean - public bool Equals(DeliveryContact input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Device.cs b/Adyen/Model/ConfigurationWebhooks/Device.cs deleted file mode 100644 index 57051897d..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Device.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Device - /// - [DataContract(Name = "Device")] - public partial class Device : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The type of the device used for provisioning the network token. For example, **phone**, **mobile_phone**, **watch**, **mobilephone_or_tablet**, etc. - /// The operating system of the device used for provisioning the network token.. - public Device(string formFactor = default(string), string osName = default(string)) - { - this.FormFactor = formFactor; - this.OsName = osName; - } - - /// - /// The type of the device used for provisioning the network token. For example, **phone**, **mobile_phone**, **watch**, **mobilephone_or_tablet**, etc - /// - /// The type of the device used for provisioning the network token. For example, **phone**, **mobile_phone**, **watch**, **mobilephone_or_tablet**, etc - [DataMember(Name = "formFactor", EmitDefaultValue = false)] - public string FormFactor { get; set; } - - /// - /// The operating system of the device used for provisioning the network token. - /// - /// The operating system of the device used for provisioning the network token. - [DataMember(Name = "osName", EmitDefaultValue = false)] - public string OsName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Device {\n"); - sb.Append(" FormFactor: ").Append(FormFactor).Append("\n"); - sb.Append(" OsName: ").Append(OsName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Device); - } - - /// - /// Returns true if Device instances are equal - /// - /// Instance of Device to be compared - /// Boolean - public bool Equals(Device input) - { - if (input == null) - { - return false; - } - return - ( - this.FormFactor == input.FormFactor || - (this.FormFactor != null && - this.FormFactor.Equals(input.FormFactor)) - ) && - ( - this.OsName == input.OsName || - (this.OsName != null && - this.OsName.Equals(input.OsName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FormFactor != null) - { - hashCode = (hashCode * 59) + this.FormFactor.GetHashCode(); - } - if (this.OsName != null) - { - hashCode = (hashCode * 59) + this.OsName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Expiry.cs b/Adyen/Model/ConfigurationWebhooks/Expiry.cs deleted file mode 100644 index f8a4ff472..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Expiry.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Expiry - /// - [DataContract(Name = "Expiry")] - public partial class Expiry : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The month in which the card will expire.. - /// The year in which the card will expire.. - public Expiry(string month = default(string), string year = default(string)) - { - this.Month = month; - this.Year = year; - } - - /// - /// The month in which the card will expire. - /// - /// The month in which the card will expire. - [DataMember(Name = "month", EmitDefaultValue = false)] - public string Month { get; set; } - - /// - /// The year in which the card will expire. - /// - /// The year in which the card will expire. - [DataMember(Name = "year", EmitDefaultValue = false)] - public string Year { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Expiry {\n"); - sb.Append(" Month: ").Append(Month).Append("\n"); - sb.Append(" Year: ").Append(Year).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Expiry); - } - - /// - /// Returns true if Expiry instances are equal - /// - /// Instance of Expiry to be compared - /// Boolean - public bool Equals(Expiry input) - { - if (input == null) - { - return false; - } - return - ( - this.Month == input.Month || - (this.Month != null && - this.Month.Equals(input.Month)) - ) && - ( - this.Year == input.Year || - (this.Year != null && - this.Year.Equals(input.Year)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Month != null) - { - hashCode = (hashCode * 59) + this.Month.GetHashCode(); - } - if (this.Year != null) - { - hashCode = (hashCode * 59) + this.Year.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.cs b/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.cs deleted file mode 100644 index 0dbfd919d..000000000 --- a/Adyen/Model/ConfigurationWebhooks/IbanAccountIdentification.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// IbanAccountIdentification - /// - [DataContract(Name = "IbanAccountIdentification")] - public partial class IbanAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **iban** - /// - /// **iban** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 1 - - } - - - /// - /// **iban** - /// - /// **iban** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IbanAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). - /// **iban** (required) (default to TypeEnum.Iban). - public IbanAccountIdentification(string iban = default(string), TypeEnum type = TypeEnum.Iban) - { - this.Iban = iban; - this.Type = type; - } - - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - [DataMember(Name = "iban", IsRequired = false, EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IbanAccountIdentification {\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IbanAccountIdentification); - } - - /// - /// Returns true if IbanAccountIdentification instances are equal - /// - /// Instance of IbanAccountIdentification to be compared - /// Boolean - public bool Equals(IbanAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Name.cs b/Adyen/Model/ConfigurationWebhooks/Name.cs deleted file mode 100644 index 2d7aa80c0..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Name.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Name - /// - [DataContract(Name = "Name")] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// The first name. (required). - /// The last name. (required). - public Name(string firstName = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/NetworkTokenNotificationDataV2.cs b/Adyen/Model/ConfigurationWebhooks/NetworkTokenNotificationDataV2.cs deleted file mode 100644 index 48eed65c6..000000000 --- a/Adyen/Model/ConfigurationWebhooks/NetworkTokenNotificationDataV2.cs +++ /dev/null @@ -1,332 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// NetworkTokenNotificationDataV2 - /// - [DataContract(Name = "NetworkTokenNotificationDataV2")] - public partial class NetworkTokenNotificationDataV2 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// authentication. - /// Specifies whether the authentication process was triggered during token provisioning.. - /// The unique identifier of the balance platform.. - /// The decision about the network token provisioning. Possible values: **approved**, **declined**, **requiresAuthentication**.. - /// The unique identifier of the network token.. - /// The unique identifier of the payment instrument to which the network token is associated.. - /// The status of the network token.. - /// The last four digits of the network token. Use this value to help your user to identify their network token.. - /// tokenRequestor. - /// The type of network token.. - /// The rules used to validate the request for provisioning the network token.. - /// wallet. - public NetworkTokenNotificationDataV2(TokenAuthentication authentication = default(TokenAuthentication), bool? authenticationApplied = default(bool?), string balancePlatform = default(string), string decision = default(string), string id = default(string), string paymentInstrumentId = default(string), string status = default(string), string tokenLastFour = default(string), NetworkTokenRequestor tokenRequestor = default(NetworkTokenRequestor), string type = default(string), List validationFacts = default(List), Wallet wallet = default(Wallet)) - { - this.Authentication = authentication; - this.AuthenticationApplied = authenticationApplied; - this.BalancePlatform = balancePlatform; - this.Decision = decision; - this.Id = id; - this.PaymentInstrumentId = paymentInstrumentId; - this.Status = status; - this.TokenLastFour = tokenLastFour; - this.TokenRequestor = tokenRequestor; - this.Type = type; - this.ValidationFacts = validationFacts; - this.Wallet = wallet; - } - - /// - /// Gets or Sets Authentication - /// - [DataMember(Name = "authentication", EmitDefaultValue = false)] - public TokenAuthentication Authentication { get; set; } - - /// - /// Specifies whether the authentication process was triggered during token provisioning. - /// - /// Specifies whether the authentication process was triggered during token provisioning. - [DataMember(Name = "authenticationApplied", EmitDefaultValue = false)] - public bool? AuthenticationApplied { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The decision about the network token provisioning. Possible values: **approved**, **declined**, **requiresAuthentication**. - /// - /// The decision about the network token provisioning. Possible values: **approved**, **declined**, **requiresAuthentication**. - [DataMember(Name = "decision", EmitDefaultValue = false)] - public string Decision { get; set; } - - /// - /// The unique identifier of the network token. - /// - /// The unique identifier of the network token. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the payment instrument to which the network token is associated. - /// - /// The unique identifier of the payment instrument to which the network token is associated. - [DataMember(Name = "paymentInstrumentId", EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// The status of the network token. - /// - /// The status of the network token. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// The last four digits of the network token. Use this value to help your user to identify their network token. - /// - /// The last four digits of the network token. Use this value to help your user to identify their network token. - [DataMember(Name = "tokenLastFour", EmitDefaultValue = false)] - public string TokenLastFour { get; set; } - - /// - /// Gets or Sets TokenRequestor - /// - [DataMember(Name = "tokenRequestor", EmitDefaultValue = false)] - public NetworkTokenRequestor TokenRequestor { get; set; } - - /// - /// The type of network token. - /// - /// The type of network token. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// The rules used to validate the request for provisioning the network token. - /// - /// The rules used to validate the request for provisioning the network token. - [DataMember(Name = "validationFacts", EmitDefaultValue = false)] - public List ValidationFacts { get; set; } - - /// - /// Gets or Sets Wallet - /// - [DataMember(Name = "wallet", EmitDefaultValue = false)] - public Wallet Wallet { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NetworkTokenNotificationDataV2 {\n"); - sb.Append(" Authentication: ").Append(Authentication).Append("\n"); - sb.Append(" AuthenticationApplied: ").Append(AuthenticationApplied).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Decision: ").Append(Decision).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TokenLastFour: ").Append(TokenLastFour).Append("\n"); - sb.Append(" TokenRequestor: ").Append(TokenRequestor).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" ValidationFacts: ").Append(ValidationFacts).Append("\n"); - sb.Append(" Wallet: ").Append(Wallet).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NetworkTokenNotificationDataV2); - } - - /// - /// Returns true if NetworkTokenNotificationDataV2 instances are equal - /// - /// Instance of NetworkTokenNotificationDataV2 to be compared - /// Boolean - public bool Equals(NetworkTokenNotificationDataV2 input) - { - if (input == null) - { - return false; - } - return - ( - this.Authentication == input.Authentication || - (this.Authentication != null && - this.Authentication.Equals(input.Authentication)) - ) && - ( - this.AuthenticationApplied == input.AuthenticationApplied || - this.AuthenticationApplied.Equals(input.AuthenticationApplied) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Decision == input.Decision || - (this.Decision != null && - this.Decision.Equals(input.Decision)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.TokenLastFour == input.TokenLastFour || - (this.TokenLastFour != null && - this.TokenLastFour.Equals(input.TokenLastFour)) - ) && - ( - this.TokenRequestor == input.TokenRequestor || - (this.TokenRequestor != null && - this.TokenRequestor.Equals(input.TokenRequestor)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.ValidationFacts == input.ValidationFacts || - this.ValidationFacts != null && - input.ValidationFacts != null && - this.ValidationFacts.SequenceEqual(input.ValidationFacts) - ) && - ( - this.Wallet == input.Wallet || - (this.Wallet != null && - this.Wallet.Equals(input.Wallet)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Authentication != null) - { - hashCode = (hashCode * 59) + this.Authentication.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AuthenticationApplied.GetHashCode(); - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Decision != null) - { - hashCode = (hashCode * 59) + this.Decision.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.TokenLastFour != null) - { - hashCode = (hashCode * 59) + this.TokenLastFour.GetHashCode(); - } - if (this.TokenRequestor != null) - { - hashCode = (hashCode * 59) + this.TokenRequestor.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.ValidationFacts != null) - { - hashCode = (hashCode * 59) + this.ValidationFacts.GetHashCode(); - } - if (this.Wallet != null) - { - hashCode = (hashCode * 59) + this.Wallet.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/NetworkTokenNotificationRequest.cs b/Adyen/Model/ConfigurationWebhooks/NetworkTokenNotificationRequest.cs deleted file mode 100644 index 4b080ddf6..000000000 --- a/Adyen/Model/ConfigurationWebhooks/NetworkTokenNotificationRequest.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// NetworkTokenNotificationRequest - /// - [DataContract(Name = "NetworkTokenNotificationRequest")] - public partial class NetworkTokenNotificationRequest : IEquatable, IValidatableObject - { - /// - /// The type of webhook. - /// - /// The type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Created for value: balancePlatform.networkToken.created - /// - [EnumMember(Value = "balancePlatform.networkToken.created")] - Created = 1, - - /// - /// Enum Updated for value: balancePlatform.networkToken.updated - /// - [EnumMember(Value = "balancePlatform.networkToken.updated")] - Updated = 2 - - } - - - /// - /// The type of webhook. - /// - /// The type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NetworkTokenNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// The type of webhook. (required). - public NetworkTokenNotificationRequest(NetworkTokenNotificationDataV2 data = default(NetworkTokenNotificationDataV2), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public NetworkTokenNotificationDataV2 Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NetworkTokenNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NetworkTokenNotificationRequest); - } - - /// - /// Returns true if NetworkTokenNotificationRequest instances are equal - /// - /// Instance of NetworkTokenNotificationRequest to be compared - /// Boolean - public bool Equals(NetworkTokenNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/NetworkTokenRequestor.cs b/Adyen/Model/ConfigurationWebhooks/NetworkTokenRequestor.cs deleted file mode 100644 index a46d337f8..000000000 --- a/Adyen/Model/ConfigurationWebhooks/NetworkTokenRequestor.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// NetworkTokenRequestor - /// - [DataContract(Name = "NetworkTokenRequestor")] - public partial class NetworkTokenRequestor : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The id of the network token requestor.. - /// The name of the network token requestor.. - public NetworkTokenRequestor(string id = default(string), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// The id of the network token requestor. - /// - /// The id of the network token requestor. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The name of the network token requestor. - /// - /// The name of the network token requestor. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NetworkTokenRequestor {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NetworkTokenRequestor); - } - - /// - /// Returns true if NetworkTokenRequestor instances are equal - /// - /// Instance of NetworkTokenRequestor to be compared - /// Boolean - public bool Equals(NetworkTokenRequestor input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.cs b/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.cs deleted file mode 100644 index b30b40318..000000000 --- a/Adyen/Model/ConfigurationWebhooks/PaymentInstrument.cs +++ /dev/null @@ -1,517 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// PaymentInstrument - /// - [DataContract(Name = "PaymentInstrument")] - public partial class PaymentInstrument : IEquatable, IValidatableObject - { - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: suspended - /// - [EnumMember(Value = "suspended")] - Suspended = 4 - - } - - - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - /// - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusReasonEnum - { - /// - /// Enum AccountClosure for value: accountClosure - /// - [EnumMember(Value = "accountClosure")] - AccountClosure = 1, - - /// - /// Enum Damaged for value: damaged - /// - [EnumMember(Value = "damaged")] - Damaged = 2, - - /// - /// Enum EndOfLife for value: endOfLife - /// - [EnumMember(Value = "endOfLife")] - EndOfLife = 3, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 4, - - /// - /// Enum Lost for value: lost - /// - [EnumMember(Value = "lost")] - Lost = 5, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 6, - - /// - /// Enum Stolen for value: stolen - /// - [EnumMember(Value = "stolen")] - Stolen = 7, - - /// - /// Enum SuspectedFraud for value: suspectedFraud - /// - [EnumMember(Value = "suspectedFraud")] - SuspectedFraud = 8, - - /// - /// Enum TransactionRule for value: transactionRule - /// - [EnumMember(Value = "transactionRule")] - TransactionRule = 9 - - } - - - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - /// - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change. - [DataMember(Name = "statusReason", EmitDefaultValue = false)] - public StatusReasonEnum? StatusReason { get; set; } - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2 - - } - - - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - /// - /// The type of payment instrument. Possible values: **card**, **bankAccount**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentInstrument() { } - /// - /// Initializes a new instance of the class. - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**.. - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. (required). - /// bankAccount. - /// card. - /// Your description for the payment instrument, maximum 300 characters.. - /// The unique identifier of the payment instrument. (required). - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. (required). - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs.. - /// Your reference for the payment instrument, maximum 150 characters.. - /// The unique identifier of the payment instrument that replaced this payment instrument.. - /// The unique identifier of the payment instrument that is replaced by this payment instrument.. - /// The status of the payment instrument. If a status is not specified when creating a payment instrument, it is set to **active** by default. However, there can be exceptions for cards based on the `card.formFactor` and the `issuingCountryCode`. For example, when issuing physical cards in the US, the default status is **inactive**. Possible values: * **active**: The payment instrument is active and can be used to make payments. * **inactive**: The payment instrument is inactive and cannot be used to make payments. * **suspended**: The payment instrument is suspended, either because it was stolen or lost. * **closed**: The payment instrument is permanently closed. This action cannot be undone. . - /// The status comment provides additional information for the statusReason of the payment instrument.. - /// The reason for the status of the payment instrument. Possible values: **accountClosure**, **damaged**, **endOfLife**, **expired**, **lost**, **stolen**, **suspectedFraud**, **transactionRule**, **other**. If the reason is **other**, you must also send the `statusComment` parameter describing the status change.. - /// The type of payment instrument. Possible values: **card**, **bankAccount**. (required). - public PaymentInstrument(List additionalBankAccountIdentifications = default(List), string balanceAccountId = default(string), BankAccountDetails bankAccount = default(BankAccountDetails), Card card = default(Card), string description = default(string), string id = default(string), string issuingCountryCode = default(string), string paymentInstrumentGroupId = default(string), string reference = default(string), string replacedById = default(string), string replacementOfId = default(string), StatusEnum? status = default(StatusEnum?), string statusComment = default(string), StatusReasonEnum? statusReason = default(StatusReasonEnum?), TypeEnum type = default(TypeEnum)) - { - this.BalanceAccountId = balanceAccountId; - this.Id = id; - this.IssuingCountryCode = issuingCountryCode; - this.Type = type; - this.AdditionalBankAccountIdentifications = additionalBankAccountIdentifications; - this.BankAccount = bankAccount; - this.Card = card; - this.Description = description; - this.PaymentInstrumentGroupId = paymentInstrumentGroupId; - this.Reference = reference; - this.ReplacedById = replacedById; - this.ReplacementOfId = replacementOfId; - this.Status = status; - this.StatusComment = statusComment; - this.StatusReason = statusReason; - } - - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. - /// - /// Contains optional, additional business account details. Returned when you create a payment instrument with `type` **bankAccount**. - [DataMember(Name = "additionalBankAccountIdentifications", EmitDefaultValue = false)] - [Obsolete("Deprecated since Configuration webhooks v2. Please use `bankAccount` object instead")] - public List AdditionalBankAccountIdentifications { get; set; } - - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. - /// - /// The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/balanceAccounts__resParam_id) associated with the payment instrument. - [DataMember(Name = "balanceAccountId", IsRequired = false, EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountDetails BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Your description for the payment instrument, maximum 300 characters. - /// - /// Your description for the payment instrument, maximum 300 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the payment instrument. - /// - /// The unique identifier of the payment instrument. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the payment instrument is issued. For example, **NL** or **US**. - [DataMember(Name = "issuingCountryCode", IsRequired = false, EmitDefaultValue = false)] - public string IssuingCountryCode { get; set; } - - /// - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. - /// - /// The unique identifier of the [payment instrument group](https://docs.adyen.com/api-explorer/#/balanceplatform/v1/post/paymentInstrumentGroups__resParam_id) to which the payment instrument belongs. - [DataMember(Name = "paymentInstrumentGroupId", EmitDefaultValue = false)] - public string PaymentInstrumentGroupId { get; set; } - - /// - /// Your reference for the payment instrument, maximum 150 characters. - /// - /// Your reference for the payment instrument, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The unique identifier of the payment instrument that replaced this payment instrument. - /// - /// The unique identifier of the payment instrument that replaced this payment instrument. - [DataMember(Name = "replacedById", EmitDefaultValue = false)] - public string ReplacedById { get; set; } - - /// - /// The unique identifier of the payment instrument that is replaced by this payment instrument. - /// - /// The unique identifier of the payment instrument that is replaced by this payment instrument. - [DataMember(Name = "replacementOfId", EmitDefaultValue = false)] - public string ReplacementOfId { get; set; } - - /// - /// The status comment provides additional information for the statusReason of the payment instrument. - /// - /// The status comment provides additional information for the statusReason of the payment instrument. - [DataMember(Name = "statusComment", EmitDefaultValue = false)] - public string StatusComment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrument {\n"); - sb.Append(" AdditionalBankAccountIdentifications: ").Append(AdditionalBankAccountIdentifications).Append("\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" IssuingCountryCode: ").Append(IssuingCountryCode).Append("\n"); - sb.Append(" PaymentInstrumentGroupId: ").Append(PaymentInstrumentGroupId).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReplacedById: ").Append(ReplacedById).Append("\n"); - sb.Append(" ReplacementOfId: ").Append(ReplacementOfId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StatusComment: ").Append(StatusComment).Append("\n"); - sb.Append(" StatusReason: ").Append(StatusReason).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrument); - } - - /// - /// Returns true if PaymentInstrument instances are equal - /// - /// Instance of PaymentInstrument to be compared - /// Boolean - public bool Equals(PaymentInstrument input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalBankAccountIdentifications == input.AdditionalBankAccountIdentifications || - this.AdditionalBankAccountIdentifications != null && - input.AdditionalBankAccountIdentifications != null && - this.AdditionalBankAccountIdentifications.SequenceEqual(input.AdditionalBankAccountIdentifications) - ) && - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuingCountryCode == input.IssuingCountryCode || - (this.IssuingCountryCode != null && - this.IssuingCountryCode.Equals(input.IssuingCountryCode)) - ) && - ( - this.PaymentInstrumentGroupId == input.PaymentInstrumentGroupId || - (this.PaymentInstrumentGroupId != null && - this.PaymentInstrumentGroupId.Equals(input.PaymentInstrumentGroupId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReplacedById == input.ReplacedById || - (this.ReplacedById != null && - this.ReplacedById.Equals(input.ReplacedById)) - ) && - ( - this.ReplacementOfId == input.ReplacementOfId || - (this.ReplacementOfId != null && - this.ReplacementOfId.Equals(input.ReplacementOfId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StatusComment == input.StatusComment || - (this.StatusComment != null && - this.StatusComment.Equals(input.StatusComment)) - ) && - ( - this.StatusReason == input.StatusReason || - this.StatusReason.Equals(input.StatusReason) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalBankAccountIdentifications != null) - { - hashCode = (hashCode * 59) + this.AdditionalBankAccountIdentifications.GetHashCode(); - } - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuingCountryCode != null) - { - hashCode = (hashCode * 59) + this.IssuingCountryCode.GetHashCode(); - } - if (this.PaymentInstrumentGroupId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentGroupId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReplacedById != null) - { - hashCode = (hashCode * 59) + this.ReplacedById.GetHashCode(); - } - if (this.ReplacementOfId != null) - { - hashCode = (hashCode * 59) + this.ReplacementOfId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StatusComment != null) - { - hashCode = (hashCode * 59) + this.StatusComment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusReason.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs b/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs deleted file mode 100644 index 8ecfd8d56..000000000 --- a/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentAdditionalBankAccountIdentificationsInner.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// PaymentInstrumentAdditionalBankAccountIdentificationsInner - /// - [JsonConverter(typeof(PaymentInstrumentAdditionalBankAccountIdentificationsInnerJsonConverter))] - [DataContract(Name = "PaymentInstrument_additionalBankAccountIdentifications_inner")] - public partial class PaymentInstrumentAdditionalBankAccountIdentificationsInner : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IbanAccountIdentification. - public PaymentInstrumentAdditionalBankAccountIdentificationsInner(IbanAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(IbanAccountIdentification)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: IbanAccountIdentification"); - } - } - } - - /// - /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of IbanAccountIdentification - public IbanAccountIdentification GetIbanAccountIdentification() - { - return (IbanAccountIdentification)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class PaymentInstrumentAdditionalBankAccountIdentificationsInner {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, PaymentInstrumentAdditionalBankAccountIdentificationsInner.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner - /// - /// JSON string - /// An instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner - public static PaymentInstrumentAdditionalBankAccountIdentificationsInner FromJson(string jsonString) - { - PaymentInstrumentAdditionalBankAccountIdentificationsInner newPaymentInstrumentAdditionalBankAccountIdentificationsInner = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newPaymentInstrumentAdditionalBankAccountIdentificationsInner; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the IbanAccountIdentification type enums - if (ContainsValue(type)) - { - newPaymentInstrumentAdditionalBankAccountIdentificationsInner = new PaymentInstrumentAdditionalBankAccountIdentificationsInner(JsonConvert.DeserializeObject(jsonString, PaymentInstrumentAdditionalBankAccountIdentificationsInner.SerializerSettings)); - matchedTypes.Add("IbanAccountIdentification"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newPaymentInstrumentAdditionalBankAccountIdentificationsInner; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentAdditionalBankAccountIdentificationsInner); - } - - /// - /// Returns true if PaymentInstrumentAdditionalBankAccountIdentificationsInner instances are equal - /// - /// Instance of PaymentInstrumentAdditionalBankAccountIdentificationsInner to be compared - /// Boolean - public bool Equals(PaymentInstrumentAdditionalBankAccountIdentificationsInner input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for PaymentInstrumentAdditionalBankAccountIdentificationsInner - /// - public class PaymentInstrumentAdditionalBankAccountIdentificationsInnerJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(PaymentInstrumentAdditionalBankAccountIdentificationsInner).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return PaymentInstrumentAdditionalBankAccountIdentificationsInner.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.cs b/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.cs deleted file mode 100644 index 4add5946a..000000000 --- a/Adyen/Model/ConfigurationWebhooks/PaymentInstrumentNotificationData.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// PaymentInstrumentNotificationData - /// - [DataContract(Name = "PaymentInstrumentNotificationData")] - public partial class PaymentInstrumentNotificationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// paymentInstrument. - public PaymentInstrumentNotificationData(string balancePlatform = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument)) - { - this.BalancePlatform = balancePlatform; - this.PaymentInstrument = paymentInstrument; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Gets or Sets PaymentInstrument - /// - [DataMember(Name = "paymentInstrument", EmitDefaultValue = false)] - public PaymentInstrument PaymentInstrument { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrumentNotificationData {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" PaymentInstrument: ").Append(PaymentInstrument).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrumentNotificationData); - } - - /// - /// Returns true if PaymentInstrumentNotificationData instances are equal - /// - /// Instance of PaymentInstrumentNotificationData to be compared - /// Boolean - public bool Equals(PaymentInstrumentNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.PaymentInstrument == input.PaymentInstrument || - (this.PaymentInstrument != null && - this.PaymentInstrument.Equals(input.PaymentInstrument)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.PaymentInstrument != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrument.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.cs b/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.cs deleted file mode 100644 index 7d5319864..000000000 --- a/Adyen/Model/ConfigurationWebhooks/PaymentNotificationRequest.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// PaymentNotificationRequest - /// - [DataContract(Name = "PaymentNotificationRequest")] - public partial class PaymentNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of webhook. - /// - /// Type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Created for value: balancePlatform.paymentInstrument.created - /// - [EnumMember(Value = "balancePlatform.paymentInstrument.created")] - Created = 1, - - /// - /// Enum Updated for value: balancePlatform.paymentInstrument.updated - /// - [EnumMember(Value = "balancePlatform.paymentInstrument.updated")] - Updated = 2 - - } - - - /// - /// Type of webhook. - /// - /// Type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of webhook. (required). - public PaymentNotificationRequest(PaymentInstrumentNotificationData data = default(PaymentInstrumentNotificationData), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public PaymentInstrumentNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentNotificationRequest); - } - - /// - /// Returns true if PaymentNotificationRequest instances are equal - /// - /// Instance of PaymentNotificationRequest to be compared - /// Boolean - public bool Equals(PaymentNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Phone.cs b/Adyen/Model/ConfigurationWebhooks/Phone.cs deleted file mode 100644 index ad9950bb7..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Phone.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Phone - /// - [DataContract(Name = "Phone")] - public partial class Phone : IEquatable, IValidatableObject - { - /// - /// Type of phone number. Possible values: **Landline**, **Mobile**. - /// - /// Type of phone number. Possible values: **Landline**, **Mobile**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Landline for value: landline - /// - [EnumMember(Value = "landline")] - Landline = 1, - - /// - /// Enum Mobile for value: mobile - /// - [EnumMember(Value = "mobile")] - Mobile = 2 - - } - - - /// - /// Type of phone number. Possible values: **Landline**, **Mobile**. - /// - /// Type of phone number. Possible values: **Landline**, **Mobile**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Phone() { } - /// - /// Initializes a new instance of the class. - /// - /// The full phone number provided as a single string. For example, **\"0031 6 11 22 33 44\"**, **\"+316/1122-3344\"**, or **\"(0031) 611223344\"**. (required). - /// Type of phone number. Possible values: **Landline**, **Mobile**. (required). - public Phone(string number = default(string), TypeEnum type = default(TypeEnum)) - { - this.Number = number; - this.Type = type; - } - - /// - /// The full phone number provided as a single string. For example, **\"0031 6 11 22 33 44\"**, **\"+316/1122-3344\"**, or **\"(0031) 611223344\"**. - /// - /// The full phone number provided as a single string. For example, **\"0031 6 11 22 33 44\"**, **\"+316/1122-3344\"**, or **\"(0031) 611223344\"**. - [DataMember(Name = "number", IsRequired = false, EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Phone {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Phone); - } - - /// - /// Returns true if Phone instances are equal - /// - /// Instance of Phone to be compared - /// Boolean - public bool Equals(Phone input) - { - if (input == null) - { - return false; - } - return - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/PhoneNumber.cs b/Adyen/Model/ConfigurationWebhooks/PhoneNumber.cs deleted file mode 100644 index 85d966273..000000000 --- a/Adyen/Model/ConfigurationWebhooks/PhoneNumber.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// PhoneNumber - /// - [DataContract(Name = "PhoneNumber")] - public partial class PhoneNumber : IEquatable, IValidatableObject - { - /// - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. - /// - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. - [JsonConverter(typeof(StringEnumConverter))] - public enum PhoneTypeEnum - { - /// - /// Enum Fax for value: Fax - /// - [EnumMember(Value = "Fax")] - Fax = 1, - - /// - /// Enum Landline for value: Landline - /// - [EnumMember(Value = "Landline")] - Landline = 2, - - /// - /// Enum Mobile for value: Mobile - /// - [EnumMember(Value = "Mobile")] - Mobile = 3, - - /// - /// Enum SIP for value: SIP - /// - [EnumMember(Value = "SIP")] - SIP = 4 - - } - - - /// - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. - /// - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**. - [DataMember(Name = "phoneType", EmitDefaultValue = false)] - public PhoneTypeEnum? PhoneType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**.. - /// The phone number. The inclusion of the phone number country code is not necessary.. - /// The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**.. - public PhoneNumber(string phoneCountryCode = default(string), string phoneNumber = default(string), PhoneTypeEnum? phoneType = default(PhoneTypeEnum?)) - { - this.PhoneCountryCode = phoneCountryCode; - this._PhoneNumber = phoneNumber; - this.PhoneType = phoneType; - } - - /// - /// The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**. - /// - /// The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**. - [DataMember(Name = "phoneCountryCode", EmitDefaultValue = false)] - public string PhoneCountryCode { get; set; } - - /// - /// The phone number. The inclusion of the phone number country code is not necessary. - /// - /// The phone number. The inclusion of the phone number country code is not necessary. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string _PhoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PhoneNumber {\n"); - sb.Append(" PhoneCountryCode: ").Append(PhoneCountryCode).Append("\n"); - sb.Append(" _PhoneNumber: ").Append(_PhoneNumber).Append("\n"); - sb.Append(" PhoneType: ").Append(PhoneType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PhoneNumber); - } - - /// - /// Returns true if PhoneNumber instances are equal - /// - /// Instance of PhoneNumber to be compared - /// Boolean - public bool Equals(PhoneNumber input) - { - if (input == null) - { - return false; - } - return - ( - this.PhoneCountryCode == input.PhoneCountryCode || - (this.PhoneCountryCode != null && - this.PhoneCountryCode.Equals(input.PhoneCountryCode)) - ) && - ( - this._PhoneNumber == input._PhoneNumber || - (this._PhoneNumber != null && - this._PhoneNumber.Equals(input._PhoneNumber)) - ) && - ( - this.PhoneType == input.PhoneType || - this.PhoneType.Equals(input.PhoneType) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PhoneCountryCode != null) - { - hashCode = (hashCode * 59) + this.PhoneCountryCode.GetHashCode(); - } - if (this._PhoneNumber != null) - { - hashCode = (hashCode * 59) + this._PhoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PhoneType.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.cs b/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.cs deleted file mode 100644 index fbb4fd82f..000000000 --- a/Adyen/Model/ConfigurationWebhooks/PlatformPaymentConfiguration.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// PlatformPaymentConfiguration - /// - [DataContract(Name = "PlatformPaymentConfiguration")] - public partial class PlatformPaymentConfiguration : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Specifies at what time a sales day ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**.. - /// Specifies after how many business days the funds in a settlement batch are made available in this balance account. Possible values: **1** to **20**, or **null**. Default value: **null**.. - public PlatformPaymentConfiguration(string salesDayClosingTime = default(string), int? settlementDelayDays = default(int?)) - { - this.SalesDayClosingTime = salesDayClosingTime; - this.SettlementDelayDays = settlementDelayDays; - } - - /// - /// Specifies at what time a sales day ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. - /// - /// Specifies at what time a sales day ends for this account. Possible values: Time in **\"HH:MM\"** format. **HH** ranges from **00** to **07**. **MM** must be **00**. Default value: **\"00:00\"**. - [DataMember(Name = "salesDayClosingTime", EmitDefaultValue = false)] - public string SalesDayClosingTime { get; set; } - - /// - /// Specifies after how many business days the funds in a settlement batch are made available in this balance account. Possible values: **1** to **20**, or **null**. Default value: **null**. - /// - /// Specifies after how many business days the funds in a settlement batch are made available in this balance account. Possible values: **1** to **20**, or **null**. Default value: **null**. - [DataMember(Name = "settlementDelayDays", EmitDefaultValue = false)] - public int? SettlementDelayDays { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PlatformPaymentConfiguration {\n"); - sb.Append(" SalesDayClosingTime: ").Append(SalesDayClosingTime).Append("\n"); - sb.Append(" SettlementDelayDays: ").Append(SettlementDelayDays).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlatformPaymentConfiguration); - } - - /// - /// Returns true if PlatformPaymentConfiguration instances are equal - /// - /// Instance of PlatformPaymentConfiguration to be compared - /// Boolean - public bool Equals(PlatformPaymentConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.SalesDayClosingTime == input.SalesDayClosingTime || - (this.SalesDayClosingTime != null && - this.SalesDayClosingTime.Equals(input.SalesDayClosingTime)) - ) && - ( - this.SettlementDelayDays == input.SettlementDelayDays || - this.SettlementDelayDays.Equals(input.SettlementDelayDays) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SalesDayClosingTime != null) - { - hashCode = (hashCode * 59) + this.SalesDayClosingTime.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SettlementDelayDays.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/RemediatingAction.cs b/Adyen/Model/ConfigurationWebhooks/RemediatingAction.cs deleted file mode 100644 index c08302120..000000000 --- a/Adyen/Model/ConfigurationWebhooks/RemediatingAction.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// RemediatingAction - /// - [DataContract(Name = "RemediatingAction")] - public partial class RemediatingAction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The remediating action code.. - /// A description of how you can resolve the verification error.. - public RemediatingAction(string code = default(string), string message = default(string)) - { - this.Code = code; - this.Message = message; - } - - /// - /// The remediating action code. - /// - /// The remediating action code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// A description of how you can resolve the verification error. - /// - /// A description of how you can resolve the verification error. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RemediatingAction {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RemediatingAction); - } - - /// - /// Returns true if RemediatingAction instances are equal - /// - /// Instance of RemediatingAction to be compared - /// Boolean - public bool Equals(RemediatingAction input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Resource.cs b/Adyen/Model/ConfigurationWebhooks/Resource.cs deleted file mode 100644 index f7626eb20..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Resource.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Resource - /// - [DataContract(Name = "Resource")] - public partial class Resource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The ID of the resource.. - public Resource(string balancePlatform = default(string), DateTime creationDate = default(DateTime), string id = default(string)) - { - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Id = id; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Resource {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Resource); - } - - /// - /// Returns true if Resource instances are equal - /// - /// Instance of Resource to be compared - /// Boolean - public bool Equals(Resource input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.cs b/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.cs deleted file mode 100644 index 477a66b48..000000000 --- a/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationData.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// SweepConfigurationNotificationData - /// - [DataContract(Name = "SweepConfigurationNotificationData")] - public partial class SweepConfigurationNotificationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance account for which the sweep was configured.. - /// The unique identifier of the balance platform.. - /// sweep. - public SweepConfigurationNotificationData(string accountId = default(string), string balancePlatform = default(string), SweepConfigurationV2 sweep = default(SweepConfigurationV2)) - { - this.AccountId = accountId; - this.BalancePlatform = balancePlatform; - this.Sweep = sweep; - } - - /// - /// The unique identifier of the balance account for which the sweep was configured. - /// - /// The unique identifier of the balance account for which the sweep was configured. - [DataMember(Name = "accountId", EmitDefaultValue = false)] - public string AccountId { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Gets or Sets Sweep - /// - [DataMember(Name = "sweep", EmitDefaultValue = false)] - public SweepConfigurationV2 Sweep { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SweepConfigurationNotificationData {\n"); - sb.Append(" AccountId: ").Append(AccountId).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Sweep: ").Append(Sweep).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SweepConfigurationNotificationData); - } - - /// - /// Returns true if SweepConfigurationNotificationData instances are equal - /// - /// Instance of SweepConfigurationNotificationData to be compared - /// Boolean - public bool Equals(SweepConfigurationNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountId == input.AccountId || - (this.AccountId != null && - this.AccountId.Equals(input.AccountId)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Sweep == input.Sweep || - (this.Sweep != null && - this.Sweep.Equals(input.Sweep)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountId != null) - { - hashCode = (hashCode * 59) + this.AccountId.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Sweep != null) - { - hashCode = (hashCode * 59) + this.Sweep.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.cs b/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.cs deleted file mode 100644 index 9b68792d5..000000000 --- a/Adyen/Model/ConfigurationWebhooks/SweepConfigurationNotificationRequest.cs +++ /dev/null @@ -1,213 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// SweepConfigurationNotificationRequest - /// - [DataContract(Name = "SweepConfigurationNotificationRequest")] - public partial class SweepConfigurationNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of webhook. - /// - /// Type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Created for value: balancePlatform.balanceAccountSweep.created - /// - [EnumMember(Value = "balancePlatform.balanceAccountSweep.created")] - Created = 1, - - /// - /// Enum Updated for value: balancePlatform.balanceAccountSweep.updated - /// - [EnumMember(Value = "balancePlatform.balanceAccountSweep.updated")] - Updated = 2, - - /// - /// Enum Deleted for value: balancePlatform.balanceAccountSweep.deleted - /// - [EnumMember(Value = "balancePlatform.balanceAccountSweep.deleted")] - Deleted = 3 - - } - - - /// - /// Type of webhook. - /// - /// Type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SweepConfigurationNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of webhook. (required). - public SweepConfigurationNotificationRequest(SweepConfigurationNotificationData data = default(SweepConfigurationNotificationData), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public SweepConfigurationNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SweepConfigurationNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SweepConfigurationNotificationRequest); - } - - /// - /// Returns true if SweepConfigurationNotificationRequest instances are equal - /// - /// Instance of SweepConfigurationNotificationRequest to be compared - /// Boolean - public bool Equals(SweepConfigurationNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.cs b/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.cs deleted file mode 100644 index 600e905ce..000000000 --- a/Adyen/Model/ConfigurationWebhooks/SweepConfigurationV2.cs +++ /dev/null @@ -1,673 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// SweepConfigurationV2 - /// - [DataContract(Name = "SweepConfigurationV2")] - public partial class SweepConfigurationV2 : IEquatable, IValidatableObject - { - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 2, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 3 - - } - - - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`. - [DataMember(Name = "category", EmitDefaultValue = false)] - public CategoryEnum? Category { get; set; } - /// - /// Defines Priorities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PrioritiesEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup). - [DataMember(Name = "priorities", EmitDefaultValue = false)] - public List Priorities { get; set; } - /// - /// The reason for disabling the sweep. - /// - /// The reason for disabling the sweep. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 16, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 17, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 18, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 19, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 20, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 21, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 22, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 23, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 24 - - } - - - /// - /// The reason for disabling the sweep. - /// - /// The reason for disabling the sweep. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 2 - - } - - - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - /// - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Pull for value: pull - /// - [EnumMember(Value = "pull")] - Pull = 1, - - /// - /// Enum Push for value: push - /// - [EnumMember(Value = "push")] - Push = 2 - - } - - - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - /// - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SweepConfigurationV2() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of transfer that results from the sweep. Possible values: - **bank**: Sweep to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. Required when setting `priorities`.. - /// counterparty (required). - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). (required). - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters.. - /// The unique identifier of the sweep. (required). - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities, ordered by your preference. Adyen will try to pay out using the priorities in the given order. If the first priority is not currently supported or enabled for your platform, the system will try the next one, and so on. The request will be accepted as long as **at least one** of the provided priorities is valid (i.e., supported by Adyen and activated for your platform). For example, if you provide `[\"wire\",\"regular\"]`, and `wire` is not supported but `regular` is, the request will still be accepted and processed. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Set `category` to **bank**. For more details, see optional priorities setup for [marketplaces](https://docs.adyen.com/marketplaces/payout-to-users/scheduled-payouts#optional-priorities-setup) or [platforms](https://docs.adyen.com/platforms/payout-to-users/scheduled-payouts#optional-priorities-setup).. - /// The reason for disabling the sweep.. - /// The human readable reason for disabling the sweep.. - /// Your reference for the sweep configuration.. - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed.. - /// schedule (required). - /// The status of the sweep. If not provided, by default, this is set to **active**. Possible values: * **active**: the sweep is enabled and funds will be pulled in or pushed out based on the defined configuration. * **inactive**: the sweep is disabled and cannot be triggered. . - /// sweepAmount. - /// targetAmount. - /// triggerAmount. - /// The direction of sweep, whether pushing out or pulling in funds to the balance account. If not provided, by default, this is set to **push**. Possible values: * **push**: _push out funds_ to a destination balance account or transfer instrument. * **pull**: _pull in funds_ from a source merchant account, transfer instrument, or balance account. (default to TypeEnum.Push). - public SweepConfigurationV2(CategoryEnum? category = default(CategoryEnum?), SweepCounterparty counterparty = default(SweepCounterparty), string currency = default(string), string description = default(string), string id = default(string), List priorities = default(List), ReasonEnum? reason = default(ReasonEnum?), string reasonDetail = default(string), string reference = default(string), string referenceForBeneficiary = default(string), SweepSchedule schedule = default(SweepSchedule), StatusEnum? status = default(StatusEnum?), Amount sweepAmount = default(Amount), Amount targetAmount = default(Amount), Amount triggerAmount = default(Amount), TypeEnum? type = TypeEnum.Push) - { - this.Counterparty = counterparty; - this.Currency = currency; - this.Id = id; - this.Schedule = schedule; - this.Category = category; - this.Description = description; - this.Priorities = priorities; - this.Reason = reason; - this.ReasonDetail = reasonDetail; - this.Reference = reference; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Status = status; - this.SweepAmount = sweepAmount; - this.TargetAmount = targetAmount; - this.TriggerAmount = triggerAmount; - this.Type = type; - } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", IsRequired = false, EmitDefaultValue = false)] - public SweepCounterparty Counterparty { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes) in uppercase. For example, **EUR**. The sweep currency must match any of the [balances currencies](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__resParam_balances). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. - /// - /// The message that will be used in the sweep transfer's description body with a maximum length of 140 characters. If the message is longer after replacing placeholders, the message will be cut off at 140 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the sweep. - /// - /// The unique identifier of the sweep. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The human readable reason for disabling the sweep. - /// - /// The human readable reason for disabling the sweep. - [DataMember(Name = "reasonDetail", EmitDefaultValue = false)] - public string ReasonDetail { get; set; } - - /// - /// Your reference for the sweep configuration. - /// - /// Your reference for the sweep configuration. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. - /// - /// The reference sent to or received from the counterparty. Only alphanumeric characters are allowed. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Schedule - /// - [DataMember(Name = "schedule", IsRequired = false, EmitDefaultValue = false)] - public SweepSchedule Schedule { get; set; } - - /// - /// Gets or Sets SweepAmount - /// - [DataMember(Name = "sweepAmount", EmitDefaultValue = false)] - public Amount SweepAmount { get; set; } - - /// - /// Gets or Sets TargetAmount - /// - [DataMember(Name = "targetAmount", EmitDefaultValue = false)] - public Amount TargetAmount { get; set; } - - /// - /// Gets or Sets TriggerAmount - /// - [DataMember(Name = "triggerAmount", EmitDefaultValue = false)] - public Amount TriggerAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SweepConfigurationV2 {\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Priorities: ").Append(Priorities).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" ReasonDetail: ").Append(ReasonDetail).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Schedule: ").Append(Schedule).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" SweepAmount: ").Append(SweepAmount).Append("\n"); - sb.Append(" TargetAmount: ").Append(TargetAmount).Append("\n"); - sb.Append(" TriggerAmount: ").Append(TriggerAmount).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SweepConfigurationV2); - } - - /// - /// Returns true if SweepConfigurationV2 instances are equal - /// - /// Instance of SweepConfigurationV2 to be compared - /// Boolean - public bool Equals(SweepConfigurationV2 input) - { - if (input == null) - { - return false; - } - return - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Priorities == input.Priorities || - this.Priorities.SequenceEqual(input.Priorities) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.ReasonDetail == input.ReasonDetail || - (this.ReasonDetail != null && - this.ReasonDetail.Equals(input.ReasonDetail)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Schedule == input.Schedule || - (this.Schedule != null && - this.Schedule.Equals(input.Schedule)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.SweepAmount == input.SweepAmount || - (this.SweepAmount != null && - this.SweepAmount.Equals(input.SweepAmount)) - ) && - ( - this.TargetAmount == input.TargetAmount || - (this.TargetAmount != null && - this.TargetAmount.Equals(input.TargetAmount)) - ) && - ( - this.TriggerAmount == input.TriggerAmount || - (this.TriggerAmount != null && - this.TriggerAmount.Equals(input.TriggerAmount)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priorities.GetHashCode(); - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - if (this.ReasonDetail != null) - { - hashCode = (hashCode * 59) + this.ReasonDetail.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - if (this.Schedule != null) - { - hashCode = (hashCode * 59) + this.Schedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.SweepAmount != null) - { - hashCode = (hashCode * 59) + this.SweepAmount.GetHashCode(); - } - if (this.TargetAmount != null) - { - hashCode = (hashCode * 59) + this.TargetAmount.GetHashCode(); - } - if (this.TriggerAmount != null) - { - hashCode = (hashCode * 59) + this.TriggerAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - // ReferenceForBeneficiary (string) maxLength - if (this.ReferenceForBeneficiary != null && this.ReferenceForBeneficiary.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ReferenceForBeneficiary, length must be less than 80.", new [] { "ReferenceForBeneficiary" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.cs b/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.cs deleted file mode 100644 index 386b8e8d4..000000000 --- a/Adyen/Model/ConfigurationWebhooks/SweepCounterparty.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// SweepCounterparty - /// - [DataContract(Name = "SweepCounterparty")] - public partial class SweepCounterparty : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). > If you are updating the counterparty from a transfer instrument to a balance account, set `transferInstrumentId` to **null**.. - /// The merchant account that will be the source of funds. You can only use this parameter with sweeps of `type` **pull** and if you are processing payments with Adyen.. - /// The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id) depending on the sweep `type` . To set up automated top-up sweeps to balance accounts in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/platforms/top-up-balance-account/#before-you-begin), use this parameter in combination with a `merchantAccount` and a sweep `type` of **pull**. Top-up sweeps start a direct debit request from the source transfer instrument. Contact Adyen Support to enable this feature.> If you are updating the counterparty from a balance account to a transfer instrument, set `balanceAccountId` to **null**.. - public SweepCounterparty(string balanceAccountId = default(string), string merchantAccount = default(string), string transferInstrumentId = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.MerchantAccount = merchantAccount; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). > If you are updating the counterparty from a transfer instrument to a balance account, set `transferInstrumentId` to **null**. - /// - /// The unique identifier of the destination or source [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id). > If you are updating the counterparty from a transfer instrument to a balance account, set `transferInstrumentId` to **null**. - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// The merchant account that will be the source of funds. You can only use this parameter with sweeps of `type` **pull** and if you are processing payments with Adyen. - /// - /// The merchant account that will be the source of funds. You can only use this parameter with sweeps of `type` **pull** and if you are processing payments with Adyen. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id) depending on the sweep `type` . To set up automated top-up sweeps to balance accounts in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/platforms/top-up-balance-account/#before-you-begin), use this parameter in combination with a `merchantAccount` and a sweep `type` of **pull**. Top-up sweeps start a direct debit request from the source transfer instrument. Contact Adyen Support to enable this feature.> If you are updating the counterparty from a balance account to a transfer instrument, set `balanceAccountId` to **null**. - /// - /// The unique identifier of the destination or source [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id) depending on the sweep `type` . To set up automated top-up sweeps to balance accounts in your [marketplace](https://docs.adyen.com/marketplaces/top-up-balance-account/#before-you-begin) or [platform](https://docs.adyen.com/platforms/top-up-balance-account/#before-you-begin), use this parameter in combination with a `merchantAccount` and a sweep `type` of **pull**. Top-up sweeps start a direct debit request from the source transfer instrument. Contact Adyen Support to enable this feature.> If you are updating the counterparty from a balance account to a transfer instrument, set `balanceAccountId` to **null**. - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SweepCounterparty {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SweepCounterparty); - } - - /// - /// Returns true if SweepCounterparty instances are equal - /// - /// Instance of SweepCounterparty to be compared - /// Boolean - public bool Equals(SweepCounterparty input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/SweepSchedule.cs b/Adyen/Model/ConfigurationWebhooks/SweepSchedule.cs deleted file mode 100644 index b589b81fd..000000000 --- a/Adyen/Model/ConfigurationWebhooks/SweepSchedule.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// SweepSchedule - /// - [DataContract(Name = "SweepSchedule")] - public partial class SweepSchedule : IEquatable, IValidatableObject - { - /// - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. - /// - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Daily for value: daily - /// - [EnumMember(Value = "daily")] - Daily = 1, - - /// - /// Enum Weekly for value: weekly - /// - [EnumMember(Value = "weekly")] - Weekly = 2, - - /// - /// Enum Monthly for value: monthly - /// - [EnumMember(Value = "monthly")] - Monthly = 3, - - /// - /// Enum Balance for value: balance - /// - [EnumMember(Value = "balance")] - Balance = 4, - - /// - /// Enum Cron for value: cron - /// - [EnumMember(Value = "cron")] - Cron = 5 - - } - - - /// - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. - /// - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SweepSchedule() { } - /// - /// Initializes a new instance of the class. - /// - /// A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: **&ast;**, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. Required when `type` is **cron**. . - /// The schedule type. Possible values: * **cron**: push out funds based on a `cronExpression`. * **daily**: push out funds daily at 07:00 AM CET. * **weekly**: push out funds every Monday at 07:00 AM CET. * **monthly**: push out funds every first of the month at 07:00 AM CET. * **balance**: execute the sweep instantly if the `triggerAmount` is reached. (required). - public SweepSchedule(string cronExpression = default(string), TypeEnum type = default(TypeEnum)) - { - this.Type = type; - this.CronExpression = cronExpression; - } - - /// - /// A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: **&ast;**, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. Required when `type` is **cron**. - /// - /// A [cron expression](https://en.wikipedia.org/wiki/Cron#CRON_expression) that is used to set the sweep schedule. The schedule uses the time zone of the balance account. For example, **30 17 * * MON** schedules a sweep every Monday at 17:30. The expression must have five values separated by a single space in the following order: * Minute: **0-59** * Hour: **0-23** * Day of the month: **1-31** * Month: **1-12** or **JAN-DEC** * Day of the week: **0-7** (0 and 7 are Sunday) or **MON-SUN**. The following non-standard characters are supported: **&ast;**, **L**, **#**, **W** and **_/_**. See [crontab guru](https://crontab.guru/) for more examples. Required when `type` is **cron**. - [DataMember(Name = "cronExpression", EmitDefaultValue = false)] - public string CronExpression { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SweepSchedule {\n"); - sb.Append(" CronExpression: ").Append(CronExpression).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SweepSchedule); - } - - /// - /// Returns true if SweepSchedule instances are equal - /// - /// Instance of SweepSchedule to be compared - /// Boolean - public bool Equals(SweepSchedule input) - { - if (input == null) - { - return false; - } - return - ( - this.CronExpression == input.CronExpression || - (this.CronExpression != null && - this.CronExpression.Equals(input.CronExpression)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CronExpression != null) - { - hashCode = (hashCode * 59) + this.CronExpression.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/TokenAuthentication.cs b/Adyen/Model/ConfigurationWebhooks/TokenAuthentication.cs deleted file mode 100644 index 2624aaf5d..000000000 --- a/Adyen/Model/ConfigurationWebhooks/TokenAuthentication.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// TokenAuthentication - /// - [DataContract(Name = "TokenAuthentication")] - public partial class TokenAuthentication : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The method used to complete the authentication process. Possible values: **sms_OTP**, **email_OTP**.. - /// The result of the authentication process.. - public TokenAuthentication(string method = default(string), string result = default(string)) - { - this.Method = method; - this.Result = result; - } - - /// - /// The method used to complete the authentication process. Possible values: **sms_OTP**, **email_OTP**. - /// - /// The method used to complete the authentication process. Possible values: **sms_OTP**, **email_OTP**. - [DataMember(Name = "method", EmitDefaultValue = false)] - public string Method { get; set; } - - /// - /// The result of the authentication process. - /// - /// The result of the authentication process. - [DataMember(Name = "result", EmitDefaultValue = false)] - public string Result { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TokenAuthentication {\n"); - sb.Append(" Method: ").Append(Method).Append("\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TokenAuthentication); - } - - /// - /// Returns true if TokenAuthentication instances are equal - /// - /// Instance of TokenAuthentication to be compared - /// Boolean - public bool Equals(TokenAuthentication input) - { - if (input == null) - { - return false; - } - return - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Result != null) - { - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/ValidationFacts.cs b/Adyen/Model/ConfigurationWebhooks/ValidationFacts.cs deleted file mode 100644 index a32b90f8d..000000000 --- a/Adyen/Model/ConfigurationWebhooks/ValidationFacts.cs +++ /dev/null @@ -1,197 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// ValidationFacts - /// - [DataContract(Name = "ValidationFacts")] - public partial class ValidationFacts : IEquatable, IValidatableObject - { - /// - /// The evaluation result of the validation facts. Possible values: **valid**, **invalid**, **notValidated**, **notApplicable**. - /// - /// The evaluation result of the validation facts. Possible values: **valid**, **invalid**, **notValidated**, **notApplicable**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultEnum - { - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 1, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 2, - - /// - /// Enum NotValidated for value: notValidated - /// - [EnumMember(Value = "notValidated")] - NotValidated = 3, - - /// - /// Enum Valid for value: valid - /// - [EnumMember(Value = "valid")] - Valid = 4 - - } - - - /// - /// The evaluation result of the validation facts. Possible values: **valid**, **invalid**, **notValidated**, **notApplicable**. - /// - /// The evaluation result of the validation facts. Possible values: **valid**, **invalid**, **notValidated**, **notApplicable**. - [DataMember(Name = "result", EmitDefaultValue = false)] - public ResultEnum? Result { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The reason for the `result` of the validations. This field is only sent for `validationFacts.type` **walletValidation**, when `validationFacts.result` is **invalid**.. - /// The evaluation result of the validation facts. Possible values: **valid**, **invalid**, **notValidated**, **notApplicable**.. - /// The type of the validation fact.. - public ValidationFacts(List reasons = default(List), ResultEnum? result = default(ResultEnum?), string type = default(string)) - { - this.Reasons = reasons; - this.Result = result; - this.Type = type; - } - - /// - /// The reason for the `result` of the validations. This field is only sent for `validationFacts.type` **walletValidation**, when `validationFacts.result` is **invalid**. - /// - /// The reason for the `result` of the validations. This field is only sent for `validationFacts.type` **walletValidation**, when `validationFacts.result` is **invalid**. - [DataMember(Name = "reasons", EmitDefaultValue = false)] - public List Reasons { get; set; } - - /// - /// The type of the validation fact. - /// - /// The type of the validation fact. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ValidationFacts {\n"); - sb.Append(" Reasons: ").Append(Reasons).Append("\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ValidationFacts); - } - - /// - /// Returns true if ValidationFacts instances are equal - /// - /// Instance of ValidationFacts to be compared - /// Boolean - public bool Equals(ValidationFacts input) - { - if (input == null) - { - return false; - } - return - ( - this.Reasons == input.Reasons || - this.Reasons != null && - input.Reasons != null && - this.Reasons.SequenceEqual(input.Reasons) - ) && - ( - this.Result == input.Result || - this.Result.Equals(input.Result) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Reasons != null) - { - hashCode = (hashCode * 59) + this.Reasons.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.cs b/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.cs deleted file mode 100644 index 0ac69e139..000000000 --- a/Adyen/Model/ConfigurationWebhooks/VerificationDeadline.cs +++ /dev/null @@ -1,508 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// VerificationDeadline - /// - [DataContract(Name = "VerificationDeadline")] - public partial class VerificationDeadline : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// The names of the capabilities to be disallowed. - /// - /// The names of the capabilities to be disallowed. - [DataMember(Name = "capabilities", IsRequired = false, EmitDefaultValue = false)] - public List Capabilities { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected VerificationDeadline() { } - /// - /// Initializes a new instance of the class. - /// - /// The names of the capabilities to be disallowed. (required). - /// The unique identifiers of the bank account(s) that the deadline applies to. - /// The date that verification is due by before capabilities are disallowed. (required). - public VerificationDeadline(List capabilities = default(List), List entityIds = default(List), DateTime expiresAt = default(DateTime)) - { - this.Capabilities = capabilities; - this.ExpiresAt = expiresAt; - this.EntityIds = entityIds; - } - - /// - /// The unique identifiers of the bank account(s) that the deadline applies to - /// - /// The unique identifiers of the bank account(s) that the deadline applies to - [DataMember(Name = "entityIds", EmitDefaultValue = false)] - public List EntityIds { get; set; } - - /// - /// The date that verification is due by before capabilities are disallowed. - /// - /// The date that verification is due by before capabilities are disallowed. - [DataMember(Name = "expiresAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime ExpiresAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationDeadline {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" EntityIds: ").Append(EntityIds).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationDeadline); - } - - /// - /// Returns true if VerificationDeadline instances are equal - /// - /// Instance of VerificationDeadline to be compared - /// Boolean - public bool Equals(VerificationDeadline input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.EntityIds == input.EntityIds || - this.EntityIds != null && - input.EntityIds != null && - this.EntityIds.SequenceEqual(input.EntityIds) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.EntityIds != null) - { - hashCode = (hashCode * 59) + this.EntityIds.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/VerificationError.cs b/Adyen/Model/ConfigurationWebhooks/VerificationError.cs deleted file mode 100644 index 13056cb02..000000000 --- a/Adyen/Model/ConfigurationWebhooks/VerificationError.cs +++ /dev/null @@ -1,589 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// VerificationError - /// - [DataContract(Name = "VerificationError")] - public partial class VerificationError : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// Contains the capabilities that the verification error applies to. - /// - /// Contains the capabilities that the verification error applies to. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public List Capabilities { get; set; } - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DataMissing for value: dataMissing - /// - [EnumMember(Value = "dataMissing")] - DataMissing = 1, - - /// - /// Enum InvalidInput for value: invalidInput - /// - [EnumMember(Value = "invalidInput")] - InvalidInput = 2, - - /// - /// Enum PendingStatus for value: pendingStatus - /// - [EnumMember(Value = "pendingStatus")] - PendingStatus = 3, - - /// - /// Enum DataReview for value: dataReview - /// - [EnumMember(Value = "dataReview")] - DataReview = 4 - } - - - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains the capabilities that the verification error applies to.. - /// The verification error code.. - /// A description of the error.. - /// Contains the actions that you can take to resolve the verification error.. - /// Contains more granular information about the verification error.. - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** . - public VerificationError(List capabilities = default(List), string code = default(string), string message = default(string), List remediatingActions = default(List), List subErrors = default(List), TypeEnum? type = default(TypeEnum?)) - { - this.Capabilities = capabilities; - this.Code = code; - this.Message = message; - this.RemediatingActions = remediatingActions; - this.SubErrors = subErrors; - this.Type = type; - } - - /// - /// The verification error code. - /// - /// The verification error code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// A description of the error. - /// - /// A description of the error. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Contains the actions that you can take to resolve the verification error. - /// - /// Contains the actions that you can take to resolve the verification error. - [DataMember(Name = "remediatingActions", EmitDefaultValue = false)] - public List RemediatingActions { get; set; } - - /// - /// Contains more granular information about the verification error. - /// - /// Contains more granular information about the verification error. - [DataMember(Name = "subErrors", EmitDefaultValue = false)] - public List SubErrors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationError {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" RemediatingActions: ").Append(RemediatingActions).Append("\n"); - sb.Append(" SubErrors: ").Append(SubErrors).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationError); - } - - /// - /// Returns true if VerificationError instances are equal - /// - /// Instance of VerificationError to be compared - /// Boolean - public bool Equals(VerificationError input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.RemediatingActions == input.RemediatingActions || - this.RemediatingActions != null && - input.RemediatingActions != null && - this.RemediatingActions.SequenceEqual(input.RemediatingActions) - ) && - ( - this.SubErrors == input.SubErrors || - this.SubErrors != null && - input.SubErrors != null && - this.SubErrors.SequenceEqual(input.SubErrors) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.RemediatingActions != null) - { - hashCode = (hashCode * 59) + this.RemediatingActions.GetHashCode(); - } - if (this.SubErrors != null) - { - hashCode = (hashCode * 59) + this.SubErrors.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.cs b/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.cs deleted file mode 100644 index 0a7dd6603..000000000 --- a/Adyen/Model/ConfigurationWebhooks/VerificationErrorRecursive.cs +++ /dev/null @@ -1,570 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// VerificationErrorRecursive - /// - [DataContract(Name = "VerificationError-recursive")] - public partial class VerificationErrorRecursive : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// Contains the capabilities that the verification error applies to. - /// - /// Contains the capabilities that the verification error applies to. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public List Capabilities { get; set; } - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DataMissing for value: dataMissing - /// - [EnumMember(Value = "dataMissing")] - DataMissing = 1, - - /// - /// Enum InvalidInput for value: invalidInput - /// - [EnumMember(Value = "invalidInput")] - InvalidInput = 2, - - /// - /// Enum PendingStatus for value: pendingStatus - /// - [EnumMember(Value = "pendingStatus")] - PendingStatus = 3, - - /// - /// Enum DataReview for value: dataReview - /// - [EnumMember(Value = "dataReview")] - DataReview = 4 - - } - - - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains the capabilities that the verification error applies to.. - /// The verification error code.. - /// A description of the error.. - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **dataReview** . - /// Contains the actions that you can take to resolve the verification error.. - public VerificationErrorRecursive(List capabilities = default(List), string code = default(string), string message = default(string), TypeEnum? type = default(TypeEnum?), List remediatingActions = default(List)) - { - this.Capabilities = capabilities; - this.Code = code; - this.Message = message; - this.Type = type; - this.RemediatingActions = remediatingActions; - } - - /// - /// The verification error code. - /// - /// The verification error code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// A description of the error. - /// - /// A description of the error. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Contains the actions that you can take to resolve the verification error. - /// - /// Contains the actions that you can take to resolve the verification error. - [DataMember(Name = "remediatingActions", EmitDefaultValue = false)] - public List RemediatingActions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationErrorRecursive {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" RemediatingActions: ").Append(RemediatingActions).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationErrorRecursive); - } - - /// - /// Returns true if VerificationErrorRecursive instances are equal - /// - /// Instance of VerificationErrorRecursive to be compared - /// Boolean - public bool Equals(VerificationErrorRecursive input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.RemediatingActions == input.RemediatingActions || - this.RemediatingActions != null && - input.RemediatingActions != null && - this.RemediatingActions.SequenceEqual(input.RemediatingActions) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.RemediatingActions != null) - { - hashCode = (hashCode * 59) + this.RemediatingActions.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ConfigurationWebhooks/Wallet.cs b/Adyen/Model/ConfigurationWebhooks/Wallet.cs deleted file mode 100644 index 1f3e1cb73..000000000 --- a/Adyen/Model/ConfigurationWebhooks/Wallet.cs +++ /dev/null @@ -1,475 +0,0 @@ -/* -* Configuration webhooks -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ConfigurationWebhooks -{ - /// - /// Wallet - /// - [DataContract(Name = "Wallet")] - public partial class Wallet : IEquatable, IValidatableObject - { - /// - /// Defines RecommendationReasons - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RecommendationReasonsEnum - { - /// - /// Enum AccountCardTooNew for value: accountCardTooNew - /// - [EnumMember(Value = "accountCardTooNew")] - AccountCardTooNew = 1, - - /// - /// Enum AccountHighRisk for value: accountHighRisk - /// - [EnumMember(Value = "accountHighRisk")] - AccountHighRisk = 2, - - /// - /// Enum AccountRecentlyChanged for value: accountRecentlyChanged - /// - [EnumMember(Value = "accountRecentlyChanged")] - AccountRecentlyChanged = 3, - - /// - /// Enum AccountTooNew for value: accountTooNew - /// - [EnumMember(Value = "accountTooNew")] - AccountTooNew = 4, - - /// - /// Enum AccountTooNewSinceLaunch for value: accountTooNewSinceLaunch - /// - [EnumMember(Value = "accountTooNewSinceLaunch")] - AccountTooNewSinceLaunch = 5, - - /// - /// Enum CardholderPanAssociatedToAccountWithinThresholdDays for value: cardholderPanAssociatedToAccountWithinThresholdDays - /// - [EnumMember(Value = "cardholderPanAssociatedToAccountWithinThresholdDays")] - CardholderPanAssociatedToAccountWithinThresholdDays = 6, - - /// - /// Enum ChangesMadeToAccountDataWithinThresholdDays for value: changesMadeToAccountDataWithinThresholdDays - /// - [EnumMember(Value = "changesMadeToAccountDataWithinThresholdDays")] - ChangesMadeToAccountDataWithinThresholdDays = 7, - - /// - /// Enum DeviceProvisioningLocationOutsideOfCardholdersWalletAccountHomeCountry for value: deviceProvisioningLocationOutsideOfCardholdersWalletAccountHomeCountry - /// - [EnumMember(Value = "deviceProvisioningLocationOutsideOfCardholdersWalletAccountHomeCountry")] - DeviceProvisioningLocationOutsideOfCardholdersWalletAccountHomeCountry = 8, - - /// - /// Enum DeviceRecentlyLost for value: deviceRecentlyLost - /// - [EnumMember(Value = "deviceRecentlyLost")] - DeviceRecentlyLost = 9, - - /// - /// Enum EncryptedPaymentInstrumentDataIsBeingPushedByTheIssuerToTheSameDeviceThatIssuerApplicationAuthenticatedButWithSuccessfulUpfrontAuthentication for value: encryptedPaymentInstrumentDataIsBeingPushedByTheIssuerToTheSameDeviceThatIssuerApplicationAuthenticatedButWithSuccessfulUpfrontAuthentication - /// - [EnumMember(Value = "encryptedPaymentInstrumentDataIsBeingPushedByTheIssuerToTheSameDeviceThatIssuerApplicationAuthenticatedButWithSuccessfulUpfrontAuthentication")] - EncryptedPaymentInstrumentDataIsBeingPushedByTheIssuerToTheSameDeviceThatIssuerApplicationAuthenticatedButWithSuccessfulUpfrontAuthentication = 10, - - /// - /// Enum EncryptedPaymentInstrumentDataIsBeingPushedByTheIssuerToTheSameDeviceThatIssuerApplicationAuthenticatedButWithoutAnyUpfrontAuthentication for value: encryptedPaymentInstrumentDataIsBeingPushedByTheIssuerToTheSameDeviceThatIssuerApplicationAuthenticatedButWithoutAnyUpfrontAuthentication - /// - [EnumMember(Value = "encryptedPaymentInstrumentDataIsBeingPushedByTheIssuerToTheSameDeviceThatIssuerApplicationAuthenticatedButWithoutAnyUpfrontAuthentication")] - EncryptedPaymentInstrumentDataIsBeingPushedByTheIssuerToTheSameDeviceThatIssuerApplicationAuthenticatedButWithoutAnyUpfrontAuthentication = 11, - - /// - /// Enum EncryptedPaymentInstrumentDataIsPushedToADifferentDeviceThanTheOneThatIssuerApplicationAuthenticated for value: encryptedPaymentInstrumentDataIsPushedToADifferentDeviceThanTheOneThatIssuerApplicationAuthenticated - /// - [EnumMember(Value = "encryptedPaymentInstrumentDataIsPushedToADifferentDeviceThanTheOneThatIssuerApplicationAuthenticated")] - EncryptedPaymentInstrumentDataIsPushedToADifferentDeviceThanTheOneThatIssuerApplicationAuthenticated = 12, - - /// - /// Enum EncryptedPaymentInstrumentDataIsPushedToADifferentUserThanTheCardHolder for value: encryptedPaymentInstrumentDataIsPushedToADifferentUserThanTheCardHolder - /// - [EnumMember(Value = "encryptedPaymentInstrumentDataIsPushedToADifferentUserThanTheCardHolder")] - EncryptedPaymentInstrumentDataIsPushedToADifferentUserThanTheCardHolder = 13, - - /// - /// Enum HasSuspendedTokens for value: hasSuspendedTokens - /// - [EnumMember(Value = "hasSuspendedTokens")] - HasSuspendedTokens = 14, - - /// - /// Enum InactiveAccount for value: inactiveAccount - /// - [EnumMember(Value = "inactiveAccount")] - InactiveAccount = 15, - - /// - /// Enum IssuerDeferredIDVDecision for value: issuerDeferredIDVDecision - /// - [EnumMember(Value = "issuerDeferredIDVDecision")] - IssuerDeferredIDVDecision = 16, - - /// - /// Enum IssuerEncryptedPaymentInstrumentDataExpired for value: issuerEncryptedPaymentInstrumentDataExpired - /// - [EnumMember(Value = "issuerEncryptedPaymentInstrumentDataExpired")] - IssuerEncryptedPaymentInstrumentDataExpired = 17, - - /// - /// Enum LowAccountScore for value: lowAccountScore - /// - [EnumMember(Value = "lowAccountScore")] - LowAccountScore = 18, - - /// - /// Enum LowDeviceScore for value: lowDeviceScore - /// - [EnumMember(Value = "lowDeviceScore")] - LowDeviceScore = 19, - - /// - /// Enum LowPhoneNumberScore for value: lowPhoneNumberScore - /// - [EnumMember(Value = "lowPhoneNumberScore")] - LowPhoneNumberScore = 20, - - /// - /// Enum NumberOfActiveTokensGreaterThanThreshold for value: numberOfActiveTokensGreaterThanThreshold - /// - [EnumMember(Value = "numberOfActiveTokensGreaterThanThreshold")] - NumberOfActiveTokensGreaterThanThreshold = 21, - - /// - /// Enum NumberOfActiveTokensOnAllDevicesIsGreaterThanThreshold for value: numberOfActiveTokensOnAllDevicesIsGreaterThanThreshold - /// - [EnumMember(Value = "numberOfActiveTokensOnAllDevicesIsGreaterThanThreshold")] - NumberOfActiveTokensOnAllDevicesIsGreaterThanThreshold = 22, - - /// - /// Enum NumberOfDaysSinceDeviceWasLastReportedLostIsLessThanThresholdDays for value: numberOfDaysSinceDeviceWasLastReportedLostIsLessThanThresholdDays - /// - [EnumMember(Value = "numberOfDaysSinceDeviceWasLastReportedLostIsLessThanThresholdDays")] - NumberOfDaysSinceDeviceWasLastReportedLostIsLessThanThresholdDays = 23, - - /// - /// Enum NumberOfDevicesWithSameUseridWithTokenIsGreaterThanThreshold for value: numberOfDevicesWithSameUseridWithTokenIsGreaterThanThreshold - /// - [EnumMember(Value = "numberOfDevicesWithSameUseridWithTokenIsGreaterThanThreshold")] - NumberOfDevicesWithSameUseridWithTokenIsGreaterThanThreshold = 24, - - /// - /// Enum NumberOfTransactionsInLast12MonthsLessThanThresholdNumber for value: numberOfTransactionsInLast12MonthsLessThanThresholdNumber - /// - [EnumMember(Value = "numberOfTransactionsInLast12MonthsLessThanThresholdNumber")] - NumberOfTransactionsInLast12MonthsLessThanThresholdNumber = 25, - - /// - /// Enum OutSideHomeTerritory for value: outSideHomeTerritory - /// - [EnumMember(Value = "outSideHomeTerritory")] - OutSideHomeTerritory = 26, - - /// - /// Enum SuspendedCardsInTheWALLETAccountIsGreaterThanThreshold for value: suspendedCardsInTheWALLETAccountIsGreaterThanThreshold - /// - [EnumMember(Value = "suspendedCardsInTheWALLETAccountIsGreaterThanThreshold")] - SuspendedCardsInTheWALLETAccountIsGreaterThanThreshold = 27, - - /// - /// Enum SuspiciousActivity for value: suspiciousActivity - /// - [EnumMember(Value = "suspiciousActivity")] - SuspiciousActivity = 28, - - /// - /// Enum TheNumberOfProvisioningAttemptsAcrossAllCardsOnThisDeviceInTheLast24HoursExceedsTheThreshold for value: theNumberOfProvisioningAttemptsAcrossAllCardsOnThisDeviceInTheLast24HoursExceedsTheThreshold - /// - [EnumMember(Value = "theNumberOfProvisioningAttemptsAcrossAllCardsOnThisDeviceInTheLast24HoursExceedsTheThreshold")] - TheNumberOfProvisioningAttemptsAcrossAllCardsOnThisDeviceInTheLast24HoursExceedsTheThreshold = 29, - - /// - /// Enum TheWALLETAccountIntoWhichTheCardIsBeingProvisionedContainDistinctNamesGreaterThanThreshold for value: theWALLETAccountIntoWhichTheCardIsBeingProvisionedContainDistinctNamesGreaterThanThreshold - /// - [EnumMember(Value = "theWALLETAccountIntoWhichTheCardIsBeingProvisionedContainDistinctNamesGreaterThanThreshold")] - TheWALLETAccountIntoWhichTheCardIsBeingProvisionedContainDistinctNamesGreaterThanThreshold = 30, - - /// - /// Enum ThisAccountHasNotHadActivityWithinThresholdPeriod for value: thisAccountHasNotHadActivityWithinThresholdPeriod - /// - [EnumMember(Value = "thisAccountHasNotHadActivityWithinThresholdPeriod")] - ThisAccountHasNotHadActivityWithinThresholdPeriod = 31, - - /// - /// Enum TooManyDifferentCardholders for value: tooManyDifferentCardholders - /// - [EnumMember(Value = "tooManyDifferentCardholders")] - TooManyDifferentCardholders = 32, - - /// - /// Enum TooManyRecentAttempts for value: tooManyRecentAttempts - /// - [EnumMember(Value = "tooManyRecentAttempts")] - TooManyRecentAttempts = 33, - - /// - /// Enum TooManyRecentTokens for value: tooManyRecentTokens - /// - [EnumMember(Value = "tooManyRecentTokens")] - TooManyRecentTokens = 34, - - /// - /// Enum UnableToAssess for value: unableToAssess - /// - [EnumMember(Value = "unableToAssess")] - UnableToAssess = 35, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 36, - - /// - /// Enum UserAccountWasCreatedWithinThresholdDays for value: userAccountWasCreatedWithinThresholdDays - /// - [EnumMember(Value = "userAccountWasCreatedWithinThresholdDays")] - UserAccountWasCreatedWithinThresholdDays = 37, - - /// - /// Enum UserDeviceReceivingEncryptedPaymentInstrumentDataIsDifferentThanTheOneThatIsProvisioningTheToken for value: userDeviceReceivingEncryptedPaymentInstrumentDataIsDifferentThanTheOneThatIsProvisioningTheToken - /// - [EnumMember(Value = "userDeviceReceivingEncryptedPaymentInstrumentDataIsDifferentThanTheOneThatIsProvisioningTheToken")] - UserDeviceReceivingEncryptedPaymentInstrumentDataIsDifferentThanTheOneThatIsProvisioningTheToken = 38, - - /// - /// Enum UsersAccountOnDeviceLessThanThresholdDays for value: usersAccountOnDeviceLessThanThresholdDays - /// - [EnumMember(Value = "usersAccountOnDeviceLessThanThresholdDays")] - UsersAccountOnDeviceLessThanThresholdDays = 39, - - /// - /// Enum WalletAccountCreatedWithinThresholdDays for value: walletAccountCreatedWithinThresholdDays - /// - [EnumMember(Value = "walletAccountCreatedWithinThresholdDays")] - WalletAccountCreatedWithinThresholdDays = 40, - - /// - /// Enum WalletAccountHolderNameOnFileDoesNotMatchCardholderEnteredName for value: walletAccountHolderNameOnFileDoesNotMatchCardholderEnteredName - /// - [EnumMember(Value = "walletAccountHolderNameOnFileDoesNotMatchCardholderEnteredName")] - WalletAccountHolderNameOnFileDoesNotMatchCardholderEnteredName = 41 - - } - - - - /// - /// A list of risk indicators triggered at the time of provisioning the network token. Some example values of risk indicators are: * **accountTooNewSinceLaunch** * **tooManyRecentAttempts** * **lowDeviceScore** * **lowAccountScore** - /// - /// A list of risk indicators triggered at the time of provisioning the network token. Some example values of risk indicators are: * **accountTooNewSinceLaunch** * **tooManyRecentAttempts** * **lowDeviceScore** * **lowAccountScore** - [DataMember(Name = "recommendationReasons", EmitDefaultValue = false)] - public List RecommendationReasons { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The confidence score of the wallet account, calculated by the wallet provider. A high score means that account is considered trustworthy. A low score means that the account is considered suspicious. Possible values: **1** to **5**.. - /// device. - /// The confidence score of the device, calculated by the wallet provider. A high score means that device is considered trustworthy. A low score means that the device is considered suspicious. Possible values: **1** to **5**.. - /// The method used for provisioning the network token. Possible values: **push**, **manual**.. - /// A list of risk indicators triggered at the time of provisioning the network token. Some example values of risk indicators are: * **accountTooNewSinceLaunch** * **tooManyRecentAttempts** * **lowDeviceScore** * **lowAccountScore** . - /// The type of wallet that the network token is associated with. Possible values: **applePay**, **googlePay**, **garminPay**.. - public Wallet(string accountScore = default(string), Device device = default(Device), string deviceScore = default(string), string provisioningMethod = default(string), List recommendationReasons = default(List), string type = default(string)) - { - this.AccountScore = accountScore; - this.Device = device; - this.DeviceScore = deviceScore; - this.ProvisioningMethod = provisioningMethod; - this.RecommendationReasons = recommendationReasons; - this.Type = type; - } - - /// - /// The confidence score of the wallet account, calculated by the wallet provider. A high score means that account is considered trustworthy. A low score means that the account is considered suspicious. Possible values: **1** to **5**. - /// - /// The confidence score of the wallet account, calculated by the wallet provider. A high score means that account is considered trustworthy. A low score means that the account is considered suspicious. Possible values: **1** to **5**. - [DataMember(Name = "accountScore", EmitDefaultValue = false)] - public string AccountScore { get; set; } - - /// - /// Gets or Sets Device - /// - [DataMember(Name = "device", EmitDefaultValue = false)] - public Device Device { get; set; } - - /// - /// The confidence score of the device, calculated by the wallet provider. A high score means that device is considered trustworthy. A low score means that the device is considered suspicious. Possible values: **1** to **5**. - /// - /// The confidence score of the device, calculated by the wallet provider. A high score means that device is considered trustworthy. A low score means that the device is considered suspicious. Possible values: **1** to **5**. - [DataMember(Name = "deviceScore", EmitDefaultValue = false)] - public string DeviceScore { get; set; } - - /// - /// The method used for provisioning the network token. Possible values: **push**, **manual**. - /// - /// The method used for provisioning the network token. Possible values: **push**, **manual**. - [DataMember(Name = "provisioningMethod", EmitDefaultValue = false)] - public string ProvisioningMethod { get; set; } - - /// - /// The type of wallet that the network token is associated with. Possible values: **applePay**, **googlePay**, **garminPay**. - /// - /// The type of wallet that the network token is associated with. Possible values: **applePay**, **googlePay**, **garminPay**. - [DataMember(Name = "type", EmitDefaultValue = false)] - [Obsolete("Deprecated since Configuration webhooks v2. Use name of the `tokenRequestor` instead.")] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Wallet {\n"); - sb.Append(" AccountScore: ").Append(AccountScore).Append("\n"); - sb.Append(" Device: ").Append(Device).Append("\n"); - sb.Append(" DeviceScore: ").Append(DeviceScore).Append("\n"); - sb.Append(" ProvisioningMethod: ").Append(ProvisioningMethod).Append("\n"); - sb.Append(" RecommendationReasons: ").Append(RecommendationReasons).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Wallet); - } - - /// - /// Returns true if Wallet instances are equal - /// - /// Instance of Wallet to be compared - /// Boolean - public bool Equals(Wallet input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountScore == input.AccountScore || - (this.AccountScore != null && - this.AccountScore.Equals(input.AccountScore)) - ) && - ( - this.Device == input.Device || - (this.Device != null && - this.Device.Equals(input.Device)) - ) && - ( - this.DeviceScore == input.DeviceScore || - (this.DeviceScore != null && - this.DeviceScore.Equals(input.DeviceScore)) - ) && - ( - this.ProvisioningMethod == input.ProvisioningMethod || - (this.ProvisioningMethod != null && - this.ProvisioningMethod.Equals(input.ProvisioningMethod)) - ) && - ( - this.RecommendationReasons == input.RecommendationReasons || - this.RecommendationReasons.SequenceEqual(input.RecommendationReasons) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountScore != null) - { - hashCode = (hashCode * 59) + this.AccountScore.GetHashCode(); - } - if (this.Device != null) - { - hashCode = (hashCode * 59) + this.Device.GetHashCode(); - } - if (this.DeviceScore != null) - { - hashCode = (hashCode * 59) + this.DeviceScore.GetHashCode(); - } - if (this.ProvisioningMethod != null) - { - hashCode = (hashCode * 59) + this.ProvisioningMethod.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecommendationReasons.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/DataProtection/AbstractOpenAPISchema.cs b/Adyen/Model/DataProtection/AbstractOpenAPISchema.cs deleted file mode 100644 index e4baffdeb..000000000 --- a/Adyen/Model/DataProtection/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Adyen Data Protection API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.DataProtection -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/DataProtection/ServiceError.cs b/Adyen/Model/DataProtection/ServiceError.cs deleted file mode 100644 index 307b32be8..000000000 --- a/Adyen/Model/DataProtection/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Adyen Data Protection API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.DataProtection -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.cs b/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.cs deleted file mode 100644 index ed4187a43..000000000 --- a/Adyen/Model/DataProtection/SubjectErasureByPspReferenceRequest.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Adyen Data Protection API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.DataProtection -{ - /// - /// SubjectErasureByPspReferenceRequest - /// - [DataContract(Name = "SubjectErasureByPspReferenceRequest")] - public partial class SubjectErasureByPspReferenceRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.. - /// Your merchant account. - /// The PSP reference of the payment. We will delete all shopper-related data for this payment.. - public SubjectErasureByPspReferenceRequest(bool? forceErasure = default(bool?), string merchantAccount = default(string), string pspReference = default(string)) - { - this.ForceErasure = forceErasure; - this.MerchantAccount = merchantAccount; - this.PspReference = pspReference; - } - - /// - /// Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction. - /// - /// Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction. - [DataMember(Name = "forceErasure", EmitDefaultValue = false)] - public bool? ForceErasure { get; set; } - - /// - /// Your merchant account - /// - /// Your merchant account - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The PSP reference of the payment. We will delete all shopper-related data for this payment. - /// - /// The PSP reference of the payment. We will delete all shopper-related data for this payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SubjectErasureByPspReferenceRequest {\n"); - sb.Append(" ForceErasure: ").Append(ForceErasure).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubjectErasureByPspReferenceRequest); - } - - /// - /// Returns true if SubjectErasureByPspReferenceRequest instances are equal - /// - /// Instance of SubjectErasureByPspReferenceRequest to be compared - /// Boolean - public bool Equals(SubjectErasureByPspReferenceRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ForceErasure == input.ForceErasure || - this.ForceErasure.Equals(input.ForceErasure) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ForceErasure.GetHashCode(); - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/DataProtection/SubjectErasureResponse.cs b/Adyen/Model/DataProtection/SubjectErasureResponse.cs deleted file mode 100644 index ac039fc66..000000000 --- a/Adyen/Model/DataProtection/SubjectErasureResponse.cs +++ /dev/null @@ -1,158 +0,0 @@ -/* -* Adyen Data Protection API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.DataProtection -{ - /// - /// SubjectErasureResponse - /// - [DataContract(Name = "SubjectErasureResponse")] - public partial class SubjectErasureResponse : IEquatable, IValidatableObject - { - /// - /// The result of this operation. - /// - /// The result of this operation. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultEnum - { - /// - /// Enum ACTIVERECURRINGTOKENEXISTS for value: ACTIVE_RECURRING_TOKEN_EXISTS - /// - [EnumMember(Value = "ACTIVE_RECURRING_TOKEN_EXISTS")] - ACTIVERECURRINGTOKENEXISTS = 1, - - /// - /// Enum ALREADYPROCESSED for value: ALREADY_PROCESSED - /// - [EnumMember(Value = "ALREADY_PROCESSED")] - ALREADYPROCESSED = 2, - - /// - /// Enum PAYMENTNOTFOUND for value: PAYMENT_NOT_FOUND - /// - [EnumMember(Value = "PAYMENT_NOT_FOUND")] - PAYMENTNOTFOUND = 3, - - /// - /// Enum SUCCESS for value: SUCCESS - /// - [EnumMember(Value = "SUCCESS")] - SUCCESS = 4 - - } - - - /// - /// The result of this operation. - /// - /// The result of this operation. - [DataMember(Name = "result", EmitDefaultValue = false)] - public ResultEnum? Result { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The result of this operation.. - public SubjectErasureResponse(ResultEnum? result = default(ResultEnum?)) - { - this.Result = result; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SubjectErasureResponse {\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubjectErasureResponse); - } - - /// - /// Returns true if SubjectErasureResponse instances are equal - /// - /// Instance of SubjectErasureResponse to be compared - /// Boolean - public bool Equals(SubjectErasureResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Result == input.Result || - this.Result.Equals(input.Result) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/DisputeWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/DisputeWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index c98092fbb..000000000 --- a/Adyen/Model/DisputeWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Dispute webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.DisputeWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/DisputeWebhooks/Amount.cs b/Adyen/Model/DisputeWebhooks/Amount.cs deleted file mode 100644 index 150ac0361..000000000 --- a/Adyen/Model/DisputeWebhooks/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Dispute webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.DisputeWebhooks -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/DisputeWebhooks/BalancePlatformNotificationResponse.cs b/Adyen/Model/DisputeWebhooks/BalancePlatformNotificationResponse.cs deleted file mode 100644 index 252763740..000000000 --- a/Adyen/Model/DisputeWebhooks/BalancePlatformNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Dispute webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.DisputeWebhooks -{ - /// - /// BalancePlatformNotificationResponse - /// - [DataContract(Name = "BalancePlatformNotificationResponse")] - public partial class BalancePlatformNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public BalancePlatformNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalancePlatformNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalancePlatformNotificationResponse); - } - - /// - /// Returns true if BalancePlatformNotificationResponse instances are equal - /// - /// Instance of BalancePlatformNotificationResponse to be compared - /// Boolean - public bool Equals(BalancePlatformNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/DisputeWebhooks/DisputeEventNotification.cs b/Adyen/Model/DisputeWebhooks/DisputeEventNotification.cs deleted file mode 100644 index 7b3ada110..000000000 --- a/Adyen/Model/DisputeWebhooks/DisputeEventNotification.cs +++ /dev/null @@ -1,322 +0,0 @@ -/* -* Dispute webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.DisputeWebhooks -{ - /// - /// DisputeEventNotification - /// - [DataContract(Name = "DisputeEventNotification")] - public partial class DisputeEventNotification : IEquatable, IValidatableObject - { - /// - /// The type of dispute raised for the transaction. - /// - /// The type of dispute raised for the transaction. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Fraud for value: fraud - /// - [EnumMember(Value = "fraud")] - Fraud = 1, - - /// - /// Enum NotDelivered for value: notDelivered - /// - [EnumMember(Value = "notDelivered")] - NotDelivered = 2, - - /// - /// Enum Duplicate for value: duplicate - /// - [EnumMember(Value = "duplicate")] - Duplicate = 3 - - } - - - /// - /// The type of dispute raised for the transaction. - /// - /// The type of dispute raised for the transaction. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique Acquirer Reference Number (arn) generated by the card scheme for each capture. You can use the arn to trace the transaction through its lifecycle.. - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// Contains information about the dispute.. - /// disputedAmount. - /// The ID of the resource.. - /// The current status of the dispute.. - /// Additional information about the status of the dispute, when available.. - /// The unique reference of the transaction for which the dispute is requested.. - /// The type of dispute raised for the transaction.. - public DisputeEventNotification(string arn = default(string), string balancePlatform = default(string), DateTime creationDate = default(DateTime), string description = default(string), Amount disputedAmount = default(Amount), string id = default(string), string status = default(string), string statusDetail = default(string), string transactionId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Arn = arn; - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Description = description; - this.DisputedAmount = disputedAmount; - this.Id = id; - this.Status = status; - this.StatusDetail = statusDetail; - this.TransactionId = transactionId; - this.Type = type; - } - - /// - /// The unique Acquirer Reference Number (arn) generated by the card scheme for each capture. You can use the arn to trace the transaction through its lifecycle. - /// - /// The unique Acquirer Reference Number (arn) generated by the card scheme for each capture. You can use the arn to trace the transaction through its lifecycle. - [DataMember(Name = "arn", EmitDefaultValue = false)] - public string Arn { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// Contains information about the dispute. - /// - /// Contains information about the dispute. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Gets or Sets DisputedAmount - /// - [DataMember(Name = "disputedAmount", EmitDefaultValue = false)] - public Amount DisputedAmount { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The current status of the dispute. - /// - /// The current status of the dispute. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Additional information about the status of the dispute, when available. - /// - /// Additional information about the status of the dispute, when available. - [DataMember(Name = "statusDetail", EmitDefaultValue = false)] - public string StatusDetail { get; set; } - - /// - /// The unique reference of the transaction for which the dispute is requested. - /// - /// The unique reference of the transaction for which the dispute is requested. - [DataMember(Name = "transactionId", EmitDefaultValue = false)] - public string TransactionId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DisputeEventNotification {\n"); - sb.Append(" Arn: ").Append(Arn).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DisputedAmount: ").Append(DisputedAmount).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StatusDetail: ").Append(StatusDetail).Append("\n"); - sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DisputeEventNotification); - } - - /// - /// Returns true if DisputeEventNotification instances are equal - /// - /// Instance of DisputeEventNotification to be compared - /// Boolean - public bool Equals(DisputeEventNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Arn == input.Arn || - (this.Arn != null && - this.Arn.Equals(input.Arn)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DisputedAmount == input.DisputedAmount || - (this.DisputedAmount != null && - this.DisputedAmount.Equals(input.DisputedAmount)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.StatusDetail == input.StatusDetail || - (this.StatusDetail != null && - this.StatusDetail.Equals(input.StatusDetail)) - ) && - ( - this.TransactionId == input.TransactionId || - (this.TransactionId != null && - this.TransactionId.Equals(input.TransactionId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Arn != null) - { - hashCode = (hashCode * 59) + this.Arn.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DisputedAmount != null) - { - hashCode = (hashCode * 59) + this.DisputedAmount.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.StatusDetail != null) - { - hashCode = (hashCode * 59) + this.StatusDetail.GetHashCode(); - } - if (this.TransactionId != null) - { - hashCode = (hashCode * 59) + this.TransactionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/DisputeWebhooks/DisputeNotificationRequest.cs b/Adyen/Model/DisputeWebhooks/DisputeNotificationRequest.cs deleted file mode 100644 index c69348b6e..000000000 --- a/Adyen/Model/DisputeWebhooks/DisputeNotificationRequest.cs +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Dispute webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.DisputeWebhooks -{ - /// - /// DisputeNotificationRequest - /// - [DataContract(Name = "DisputeNotificationRequest")] - public partial class DisputeNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of webhook. - /// - /// Type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Created for value: balancePlatform.dispute.created - /// - [EnumMember(Value = "balancePlatform.dispute.created")] - Created = 1, - - /// - /// Enum Updated for value: balancePlatform.dispute.updated - /// - [EnumMember(Value = "balancePlatform.dispute.updated")] - Updated = 2 - - } - - - /// - /// Type of webhook. - /// - /// Type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DisputeNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// Type of webhook. (required). - public DisputeNotificationRequest(DisputeEventNotification data = default(DisputeEventNotification), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Type = type; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public DisputeEventNotification Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DisputeNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DisputeNotificationRequest); - } - - /// - /// Returns true if DisputeNotificationRequest instances are equal - /// - /// Instance of DisputeNotificationRequest to be compared - /// Boolean - public bool Equals(DisputeNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/AbstractOpenAPISchema.cs b/Adyen/Model/Disputes/AbstractOpenAPISchema.cs deleted file mode 100644 index d905369b8..000000000 --- a/Adyen/Model/Disputes/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.Disputes -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/Disputes/AcceptDisputeRequest.cs b/Adyen/Model/Disputes/AcceptDisputeRequest.cs deleted file mode 100644 index d262c73ca..000000000 --- a/Adyen/Model/Disputes/AcceptDisputeRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// AcceptDisputeRequest - /// - [DataContract(Name = "AcceptDisputeRequest")] - public partial class AcceptDisputeRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AcceptDisputeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The PSP reference assigned to the dispute. (required). - /// The merchant account identifier, for which you want to process the dispute transaction. (required). - public AcceptDisputeRequest(string disputePspReference = default(string), string merchantAccountCode = default(string)) - { - this.DisputePspReference = disputePspReference; - this.MerchantAccountCode = merchantAccountCode; - } - - /// - /// The PSP reference assigned to the dispute. - /// - /// The PSP reference assigned to the dispute. - [DataMember(Name = "disputePspReference", IsRequired = false, EmitDefaultValue = false)] - public string DisputePspReference { get; set; } - - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AcceptDisputeRequest {\n"); - sb.Append(" DisputePspReference: ").Append(DisputePspReference).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AcceptDisputeRequest); - } - - /// - /// Returns true if AcceptDisputeRequest instances are equal - /// - /// Instance of AcceptDisputeRequest to be compared - /// Boolean - public bool Equals(AcceptDisputeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.DisputePspReference == input.DisputePspReference || - (this.DisputePspReference != null && - this.DisputePspReference.Equals(input.DisputePspReference)) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisputePspReference != null) - { - hashCode = (hashCode * 59) + this.DisputePspReference.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/AcceptDisputeResponse.cs b/Adyen/Model/Disputes/AcceptDisputeResponse.cs deleted file mode 100644 index 18cb32955..000000000 --- a/Adyen/Model/Disputes/AcceptDisputeResponse.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// AcceptDisputeResponse - /// - [DataContract(Name = "AcceptDisputeResponse")] - public partial class AcceptDisputeResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AcceptDisputeResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// disputeServiceResult (required). - public AcceptDisputeResponse(DisputeServiceResult disputeServiceResult = default(DisputeServiceResult)) - { - this.DisputeServiceResult = disputeServiceResult; - } - - /// - /// Gets or Sets DisputeServiceResult - /// - [DataMember(Name = "disputeServiceResult", IsRequired = false, EmitDefaultValue = false)] - public DisputeServiceResult DisputeServiceResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AcceptDisputeResponse {\n"); - sb.Append(" DisputeServiceResult: ").Append(DisputeServiceResult).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AcceptDisputeResponse); - } - - /// - /// Returns true if AcceptDisputeResponse instances are equal - /// - /// Instance of AcceptDisputeResponse to be compared - /// Boolean - public bool Equals(AcceptDisputeResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DisputeServiceResult == input.DisputeServiceResult || - (this.DisputeServiceResult != null && - this.DisputeServiceResult.Equals(input.DisputeServiceResult)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisputeServiceResult != null) - { - hashCode = (hashCode * 59) + this.DisputeServiceResult.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DefendDisputeRequest.cs b/Adyen/Model/Disputes/DefendDisputeRequest.cs deleted file mode 100644 index e3e080151..000000000 --- a/Adyen/Model/Disputes/DefendDisputeRequest.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DefendDisputeRequest - /// - [DataContract(Name = "DefendDisputeRequest")] - public partial class DefendDisputeRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DefendDisputeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The defense reason code that was selected to defend this dispute. (required). - /// The PSP reference assigned to the dispute. (required). - /// The merchant account identifier, for which you want to process the dispute transaction. (required). - public DefendDisputeRequest(string defenseReasonCode = default(string), string disputePspReference = default(string), string merchantAccountCode = default(string)) - { - this.DefenseReasonCode = defenseReasonCode; - this.DisputePspReference = disputePspReference; - this.MerchantAccountCode = merchantAccountCode; - } - - /// - /// The defense reason code that was selected to defend this dispute. - /// - /// The defense reason code that was selected to defend this dispute. - [DataMember(Name = "defenseReasonCode", IsRequired = false, EmitDefaultValue = false)] - public string DefenseReasonCode { get; set; } - - /// - /// The PSP reference assigned to the dispute. - /// - /// The PSP reference assigned to the dispute. - [DataMember(Name = "disputePspReference", IsRequired = false, EmitDefaultValue = false)] - public string DisputePspReference { get; set; } - - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DefendDisputeRequest {\n"); - sb.Append(" DefenseReasonCode: ").Append(DefenseReasonCode).Append("\n"); - sb.Append(" DisputePspReference: ").Append(DisputePspReference).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DefendDisputeRequest); - } - - /// - /// Returns true if DefendDisputeRequest instances are equal - /// - /// Instance of DefendDisputeRequest to be compared - /// Boolean - public bool Equals(DefendDisputeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.DefenseReasonCode == input.DefenseReasonCode || - (this.DefenseReasonCode != null && - this.DefenseReasonCode.Equals(input.DefenseReasonCode)) - ) && - ( - this.DisputePspReference == input.DisputePspReference || - (this.DisputePspReference != null && - this.DisputePspReference.Equals(input.DisputePspReference)) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DefenseReasonCode != null) - { - hashCode = (hashCode * 59) + this.DefenseReasonCode.GetHashCode(); - } - if (this.DisputePspReference != null) - { - hashCode = (hashCode * 59) + this.DisputePspReference.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DefendDisputeResponse.cs b/Adyen/Model/Disputes/DefendDisputeResponse.cs deleted file mode 100644 index 6bc56cda5..000000000 --- a/Adyen/Model/Disputes/DefendDisputeResponse.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DefendDisputeResponse - /// - [DataContract(Name = "DefendDisputeResponse")] - public partial class DefendDisputeResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DefendDisputeResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// disputeServiceResult (required). - public DefendDisputeResponse(DisputeServiceResult disputeServiceResult = default(DisputeServiceResult)) - { - this.DisputeServiceResult = disputeServiceResult; - } - - /// - /// Gets or Sets DisputeServiceResult - /// - [DataMember(Name = "disputeServiceResult", IsRequired = false, EmitDefaultValue = false)] - public DisputeServiceResult DisputeServiceResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DefendDisputeResponse {\n"); - sb.Append(" DisputeServiceResult: ").Append(DisputeServiceResult).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DefendDisputeResponse); - } - - /// - /// Returns true if DefendDisputeResponse instances are equal - /// - /// Instance of DefendDisputeResponse to be compared - /// Boolean - public bool Equals(DefendDisputeResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DisputeServiceResult == input.DisputeServiceResult || - (this.DisputeServiceResult != null && - this.DisputeServiceResult.Equals(input.DisputeServiceResult)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisputeServiceResult != null) - { - hashCode = (hashCode * 59) + this.DisputeServiceResult.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DefenseDocument.cs b/Adyen/Model/Disputes/DefenseDocument.cs deleted file mode 100644 index b31ab4f1a..000000000 --- a/Adyen/Model/Disputes/DefenseDocument.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DefenseDocument - /// - [DataContract(Name = "DefenseDocument")] - public partial class DefenseDocument : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DefenseDocument() { } - /// - /// Initializes a new instance of the class. - /// - /// The content of the defense document. (required). - /// The content type of the defense document. (required). - /// The document type code of the defense document. (required). - public DefenseDocument(byte[] content = default(byte[]), string contentType = default(string), string defenseDocumentTypeCode = default(string)) - { - this.Content = content; - this.ContentType = contentType; - this.DefenseDocumentTypeCode = defenseDocumentTypeCode; - } - - /// - /// The content of the defense document. - /// - /// The content of the defense document. - [DataMember(Name = "content", IsRequired = false, EmitDefaultValue = false)] - public byte[] Content { get; set; } - - /// - /// The content type of the defense document. - /// - /// The content type of the defense document. - [DataMember(Name = "contentType", IsRequired = false, EmitDefaultValue = false)] - public string ContentType { get; set; } - - /// - /// The document type code of the defense document. - /// - /// The document type code of the defense document. - [DataMember(Name = "defenseDocumentTypeCode", IsRequired = false, EmitDefaultValue = false)] - public string DefenseDocumentTypeCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DefenseDocument {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" ContentType: ").Append(ContentType).Append("\n"); - sb.Append(" DefenseDocumentTypeCode: ").Append(DefenseDocumentTypeCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DefenseDocument); - } - - /// - /// Returns true if DefenseDocument instances are equal - /// - /// Instance of DefenseDocument to be compared - /// Boolean - public bool Equals(DefenseDocument input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.ContentType == input.ContentType || - (this.ContentType != null && - this.ContentType.Equals(input.ContentType)) - ) && - ( - this.DefenseDocumentTypeCode == input.DefenseDocumentTypeCode || - (this.DefenseDocumentTypeCode != null && - this.DefenseDocumentTypeCode.Equals(input.DefenseDocumentTypeCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.ContentType != null) - { - hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); - } - if (this.DefenseDocumentTypeCode != null) - { - hashCode = (hashCode * 59) + this.DefenseDocumentTypeCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DefenseDocumentType.cs b/Adyen/Model/Disputes/DefenseDocumentType.cs deleted file mode 100644 index efe360924..000000000 --- a/Adyen/Model/Disputes/DefenseDocumentType.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DefenseDocumentType - /// - [DataContract(Name = "DefenseDocumentType")] - public partial class DefenseDocumentType : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DefenseDocumentType() { } - /// - /// Initializes a new instance of the class. - /// - /// When **true**, you've successfully uploaded this type of defense document. When **false**, you haven't uploaded this defense document type. (required). - /// The document type code of the defense document. (required). - /// Indicates to what extent the defense document is required in the defense process. Possible values: * **Required**: You must supply the document. * **OneOrMore**: You must supply at least one of the documents with this label. * **Optional**: You can choose to supply the document. * **AlternativeRequired**: You must supply a generic defense document. To enable this functionality, contact our Support Team. When enabled, you can supply a generic defense document for all schemes. (required). - public DefenseDocumentType(bool? available = default(bool?), string defenseDocumentTypeCode = default(string), string requirementLevel = default(string)) - { - this.Available = available; - this.DefenseDocumentTypeCode = defenseDocumentTypeCode; - this.RequirementLevel = requirementLevel; - } - - /// - /// When **true**, you've successfully uploaded this type of defense document. When **false**, you haven't uploaded this defense document type. - /// - /// When **true**, you've successfully uploaded this type of defense document. When **false**, you haven't uploaded this defense document type. - [DataMember(Name = "available", IsRequired = false, EmitDefaultValue = false)] - public bool? Available { get; set; } - - /// - /// The document type code of the defense document. - /// - /// The document type code of the defense document. - [DataMember(Name = "defenseDocumentTypeCode", IsRequired = false, EmitDefaultValue = false)] - public string DefenseDocumentTypeCode { get; set; } - - /// - /// Indicates to what extent the defense document is required in the defense process. Possible values: * **Required**: You must supply the document. * **OneOrMore**: You must supply at least one of the documents with this label. * **Optional**: You can choose to supply the document. * **AlternativeRequired**: You must supply a generic defense document. To enable this functionality, contact our Support Team. When enabled, you can supply a generic defense document for all schemes. - /// - /// Indicates to what extent the defense document is required in the defense process. Possible values: * **Required**: You must supply the document. * **OneOrMore**: You must supply at least one of the documents with this label. * **Optional**: You can choose to supply the document. * **AlternativeRequired**: You must supply a generic defense document. To enable this functionality, contact our Support Team. When enabled, you can supply a generic defense document for all schemes. - [DataMember(Name = "requirementLevel", IsRequired = false, EmitDefaultValue = false)] - public string RequirementLevel { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DefenseDocumentType {\n"); - sb.Append(" Available: ").Append(Available).Append("\n"); - sb.Append(" DefenseDocumentTypeCode: ").Append(DefenseDocumentTypeCode).Append("\n"); - sb.Append(" RequirementLevel: ").Append(RequirementLevel).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DefenseDocumentType); - } - - /// - /// Returns true if DefenseDocumentType instances are equal - /// - /// Instance of DefenseDocumentType to be compared - /// Boolean - public bool Equals(DefenseDocumentType input) - { - if (input == null) - { - return false; - } - return - ( - this.Available == input.Available || - this.Available.Equals(input.Available) - ) && - ( - this.DefenseDocumentTypeCode == input.DefenseDocumentTypeCode || - (this.DefenseDocumentTypeCode != null && - this.DefenseDocumentTypeCode.Equals(input.DefenseDocumentTypeCode)) - ) && - ( - this.RequirementLevel == input.RequirementLevel || - (this.RequirementLevel != null && - this.RequirementLevel.Equals(input.RequirementLevel)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Available.GetHashCode(); - if (this.DefenseDocumentTypeCode != null) - { - hashCode = (hashCode * 59) + this.DefenseDocumentTypeCode.GetHashCode(); - } - if (this.RequirementLevel != null) - { - hashCode = (hashCode * 59) + this.RequirementLevel.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DefenseReason.cs b/Adyen/Model/Disputes/DefenseReason.cs deleted file mode 100644 index f3ddafe0b..000000000 --- a/Adyen/Model/Disputes/DefenseReason.cs +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DefenseReason - /// - [DataContract(Name = "DefenseReason")] - public partial class DefenseReason : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DefenseReason() { } - /// - /// Initializes a new instance of the class. - /// - /// Array of defense document types for a specific defense reason. Indicates the document types that you can submit to the schemes to defend this dispute, and whether they are required.. - /// The defense reason code that was selected to defend this dispute. (required). - /// Indicates if sufficient defense material has been supplied. (required). - public DefenseReason(List defenseDocumentTypes = default(List), string defenseReasonCode = default(string), bool? satisfied = default(bool?)) - { - this.DefenseReasonCode = defenseReasonCode; - this.Satisfied = satisfied; - this.DefenseDocumentTypes = defenseDocumentTypes; - } - - /// - /// Array of defense document types for a specific defense reason. Indicates the document types that you can submit to the schemes to defend this dispute, and whether they are required. - /// - /// Array of defense document types for a specific defense reason. Indicates the document types that you can submit to the schemes to defend this dispute, and whether they are required. - [DataMember(Name = "defenseDocumentTypes", EmitDefaultValue = false)] - public List DefenseDocumentTypes { get; set; } - - /// - /// The defense reason code that was selected to defend this dispute. - /// - /// The defense reason code that was selected to defend this dispute. - [DataMember(Name = "defenseReasonCode", IsRequired = false, EmitDefaultValue = false)] - public string DefenseReasonCode { get; set; } - - /// - /// Indicates if sufficient defense material has been supplied. - /// - /// Indicates if sufficient defense material has been supplied. - [DataMember(Name = "satisfied", IsRequired = false, EmitDefaultValue = false)] - public bool? Satisfied { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DefenseReason {\n"); - sb.Append(" DefenseDocumentTypes: ").Append(DefenseDocumentTypes).Append("\n"); - sb.Append(" DefenseReasonCode: ").Append(DefenseReasonCode).Append("\n"); - sb.Append(" Satisfied: ").Append(Satisfied).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DefenseReason); - } - - /// - /// Returns true if DefenseReason instances are equal - /// - /// Instance of DefenseReason to be compared - /// Boolean - public bool Equals(DefenseReason input) - { - if (input == null) - { - return false; - } - return - ( - this.DefenseDocumentTypes == input.DefenseDocumentTypes || - this.DefenseDocumentTypes != null && - input.DefenseDocumentTypes != null && - this.DefenseDocumentTypes.SequenceEqual(input.DefenseDocumentTypes) - ) && - ( - this.DefenseReasonCode == input.DefenseReasonCode || - (this.DefenseReasonCode != null && - this.DefenseReasonCode.Equals(input.DefenseReasonCode)) - ) && - ( - this.Satisfied == input.Satisfied || - this.Satisfied.Equals(input.Satisfied) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DefenseDocumentTypes != null) - { - hashCode = (hashCode * 59) + this.DefenseDocumentTypes.GetHashCode(); - } - if (this.DefenseReasonCode != null) - { - hashCode = (hashCode * 59) + this.DefenseReasonCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Satisfied.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DefenseReasonsRequest.cs b/Adyen/Model/Disputes/DefenseReasonsRequest.cs deleted file mode 100644 index c8390a32d..000000000 --- a/Adyen/Model/Disputes/DefenseReasonsRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DefenseReasonsRequest - /// - [DataContract(Name = "DefenseReasonsRequest")] - public partial class DefenseReasonsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DefenseReasonsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The PSP reference assigned to the dispute. (required). - /// The merchant account identifier, for which you want to process the dispute transaction. (required). - public DefenseReasonsRequest(string disputePspReference = default(string), string merchantAccountCode = default(string)) - { - this.DisputePspReference = disputePspReference; - this.MerchantAccountCode = merchantAccountCode; - } - - /// - /// The PSP reference assigned to the dispute. - /// - /// The PSP reference assigned to the dispute. - [DataMember(Name = "disputePspReference", IsRequired = false, EmitDefaultValue = false)] - public string DisputePspReference { get; set; } - - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DefenseReasonsRequest {\n"); - sb.Append(" DisputePspReference: ").Append(DisputePspReference).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DefenseReasonsRequest); - } - - /// - /// Returns true if DefenseReasonsRequest instances are equal - /// - /// Instance of DefenseReasonsRequest to be compared - /// Boolean - public bool Equals(DefenseReasonsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.DisputePspReference == input.DisputePspReference || - (this.DisputePspReference != null && - this.DisputePspReference.Equals(input.DisputePspReference)) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisputePspReference != null) - { - hashCode = (hashCode * 59) + this.DisputePspReference.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DefenseReasonsResponse.cs b/Adyen/Model/Disputes/DefenseReasonsResponse.cs deleted file mode 100644 index 0559ef83c..000000000 --- a/Adyen/Model/Disputes/DefenseReasonsResponse.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DefenseReasonsResponse - /// - [DataContract(Name = "DefenseReasonsResponse")] - public partial class DefenseReasonsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DefenseReasonsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The defense reasons that can be used to defend the dispute.. - /// disputeServiceResult (required). - public DefenseReasonsResponse(List defenseReasons = default(List), DisputeServiceResult disputeServiceResult = default(DisputeServiceResult)) - { - this.DisputeServiceResult = disputeServiceResult; - this.DefenseReasons = defenseReasons; - } - - /// - /// The defense reasons that can be used to defend the dispute. - /// - /// The defense reasons that can be used to defend the dispute. - [DataMember(Name = "defenseReasons", EmitDefaultValue = false)] - public List DefenseReasons { get; set; } - - /// - /// Gets or Sets DisputeServiceResult - /// - [DataMember(Name = "disputeServiceResult", IsRequired = false, EmitDefaultValue = false)] - public DisputeServiceResult DisputeServiceResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DefenseReasonsResponse {\n"); - sb.Append(" DefenseReasons: ").Append(DefenseReasons).Append("\n"); - sb.Append(" DisputeServiceResult: ").Append(DisputeServiceResult).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DefenseReasonsResponse); - } - - /// - /// Returns true if DefenseReasonsResponse instances are equal - /// - /// Instance of DefenseReasonsResponse to be compared - /// Boolean - public bool Equals(DefenseReasonsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DefenseReasons == input.DefenseReasons || - this.DefenseReasons != null && - input.DefenseReasons != null && - this.DefenseReasons.SequenceEqual(input.DefenseReasons) - ) && - ( - this.DisputeServiceResult == input.DisputeServiceResult || - (this.DisputeServiceResult != null && - this.DisputeServiceResult.Equals(input.DisputeServiceResult)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DefenseReasons != null) - { - hashCode = (hashCode * 59) + this.DefenseReasons.GetHashCode(); - } - if (this.DisputeServiceResult != null) - { - hashCode = (hashCode * 59) + this.DisputeServiceResult.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.cs b/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.cs deleted file mode 100644 index 8a21cb604..000000000 --- a/Adyen/Model/Disputes/DeleteDefenseDocumentRequest.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DeleteDefenseDocumentRequest - /// - [DataContract(Name = "DeleteDefenseDocumentRequest")] - public partial class DeleteDefenseDocumentRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeleteDefenseDocumentRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The document type code of the defense document. (required). - /// The PSP reference assigned to the dispute. (required). - /// The merchant account identifier, for which you want to process the dispute transaction. (required). - public DeleteDefenseDocumentRequest(string defenseDocumentType = default(string), string disputePspReference = default(string), string merchantAccountCode = default(string)) - { - this.DefenseDocumentType = defenseDocumentType; - this.DisputePspReference = disputePspReference; - this.MerchantAccountCode = merchantAccountCode; - } - - /// - /// The document type code of the defense document. - /// - /// The document type code of the defense document. - [DataMember(Name = "defenseDocumentType", IsRequired = false, EmitDefaultValue = false)] - public string DefenseDocumentType { get; set; } - - /// - /// The PSP reference assigned to the dispute. - /// - /// The PSP reference assigned to the dispute. - [DataMember(Name = "disputePspReference", IsRequired = false, EmitDefaultValue = false)] - public string DisputePspReference { get; set; } - - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeleteDefenseDocumentRequest {\n"); - sb.Append(" DefenseDocumentType: ").Append(DefenseDocumentType).Append("\n"); - sb.Append(" DisputePspReference: ").Append(DisputePspReference).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteDefenseDocumentRequest); - } - - /// - /// Returns true if DeleteDefenseDocumentRequest instances are equal - /// - /// Instance of DeleteDefenseDocumentRequest to be compared - /// Boolean - public bool Equals(DeleteDefenseDocumentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.DefenseDocumentType == input.DefenseDocumentType || - (this.DefenseDocumentType != null && - this.DefenseDocumentType.Equals(input.DefenseDocumentType)) - ) && - ( - this.DisputePspReference == input.DisputePspReference || - (this.DisputePspReference != null && - this.DisputePspReference.Equals(input.DisputePspReference)) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DefenseDocumentType != null) - { - hashCode = (hashCode * 59) + this.DefenseDocumentType.GetHashCode(); - } - if (this.DisputePspReference != null) - { - hashCode = (hashCode * 59) + this.DisputePspReference.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.cs b/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.cs deleted file mode 100644 index 9b7235e3a..000000000 --- a/Adyen/Model/Disputes/DeleteDefenseDocumentResponse.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DeleteDefenseDocumentResponse - /// - [DataContract(Name = "DeleteDefenseDocumentResponse")] - public partial class DeleteDefenseDocumentResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeleteDefenseDocumentResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// disputeServiceResult (required). - public DeleteDefenseDocumentResponse(DisputeServiceResult disputeServiceResult = default(DisputeServiceResult)) - { - this.DisputeServiceResult = disputeServiceResult; - } - - /// - /// Gets or Sets DisputeServiceResult - /// - [DataMember(Name = "disputeServiceResult", IsRequired = false, EmitDefaultValue = false)] - public DisputeServiceResult DisputeServiceResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeleteDefenseDocumentResponse {\n"); - sb.Append(" DisputeServiceResult: ").Append(DisputeServiceResult).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteDefenseDocumentResponse); - } - - /// - /// Returns true if DeleteDefenseDocumentResponse instances are equal - /// - /// Instance of DeleteDefenseDocumentResponse to be compared - /// Boolean - public bool Equals(DeleteDefenseDocumentResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DisputeServiceResult == input.DisputeServiceResult || - (this.DisputeServiceResult != null && - this.DisputeServiceResult.Equals(input.DisputeServiceResult)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisputeServiceResult != null) - { - hashCode = (hashCode * 59) + this.DisputeServiceResult.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/DisputeServiceResult.cs b/Adyen/Model/Disputes/DisputeServiceResult.cs deleted file mode 100644 index 60fd8a2f1..000000000 --- a/Adyen/Model/Disputes/DisputeServiceResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// DisputeServiceResult - /// - [DataContract(Name = "DisputeServiceResult")] - public partial class DisputeServiceResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DisputeServiceResult() { } - /// - /// Initializes a new instance of the class. - /// - /// The general error message.. - /// Indicates whether the request succeeded. (required). - public DisputeServiceResult(string errorMessage = default(string), bool? success = default(bool?)) - { - this.Success = success; - this.ErrorMessage = errorMessage; - } - - /// - /// The general error message. - /// - /// The general error message. - [DataMember(Name = "errorMessage", EmitDefaultValue = false)] - public string ErrorMessage { get; set; } - - /// - /// Indicates whether the request succeeded. - /// - /// Indicates whether the request succeeded. - [DataMember(Name = "success", IsRequired = false, EmitDefaultValue = false)] - public bool? Success { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DisputeServiceResult {\n"); - sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); - sb.Append(" Success: ").Append(Success).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DisputeServiceResult); - } - - /// - /// Returns true if DisputeServiceResult instances are equal - /// - /// Instance of DisputeServiceResult to be compared - /// Boolean - public bool Equals(DisputeServiceResult input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorMessage == input.ErrorMessage || - (this.ErrorMessage != null && - this.ErrorMessage.Equals(input.ErrorMessage)) - ) && - ( - this.Success == input.Success || - this.Success.Equals(input.Success) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorMessage != null) - { - hashCode = (hashCode * 59) + this.ErrorMessage.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Success.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/ServiceError.cs b/Adyen/Model/Disputes/ServiceError.cs deleted file mode 100644 index bd7ee58c6..000000000 --- a/Adyen/Model/Disputes/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.cs b/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.cs deleted file mode 100644 index 4f4f8cda6..000000000 --- a/Adyen/Model/Disputes/SupplyDefenseDocumentRequest.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// SupplyDefenseDocumentRequest - /// - [DataContract(Name = "SupplyDefenseDocumentRequest")] - public partial class SupplyDefenseDocumentRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SupplyDefenseDocumentRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// An array containing a list of the defense documents. (required). - /// The PSP reference assigned to the dispute. (required). - /// The merchant account identifier, for which you want to process the dispute transaction. (required). - public SupplyDefenseDocumentRequest(List defenseDocuments = default(List), string disputePspReference = default(string), string merchantAccountCode = default(string)) - { - this.DefenseDocuments = defenseDocuments; - this.DisputePspReference = disputePspReference; - this.MerchantAccountCode = merchantAccountCode; - } - - /// - /// An array containing a list of the defense documents. - /// - /// An array containing a list of the defense documents. - [DataMember(Name = "defenseDocuments", IsRequired = false, EmitDefaultValue = false)] - public List DefenseDocuments { get; set; } - - /// - /// The PSP reference assigned to the dispute. - /// - /// The PSP reference assigned to the dispute. - [DataMember(Name = "disputePspReference", IsRequired = false, EmitDefaultValue = false)] - public string DisputePspReference { get; set; } - - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - /// - /// The merchant account identifier, for which you want to process the dispute transaction. - [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SupplyDefenseDocumentRequest {\n"); - sb.Append(" DefenseDocuments: ").Append(DefenseDocuments).Append("\n"); - sb.Append(" DisputePspReference: ").Append(DisputePspReference).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SupplyDefenseDocumentRequest); - } - - /// - /// Returns true if SupplyDefenseDocumentRequest instances are equal - /// - /// Instance of SupplyDefenseDocumentRequest to be compared - /// Boolean - public bool Equals(SupplyDefenseDocumentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.DefenseDocuments == input.DefenseDocuments || - this.DefenseDocuments != null && - input.DefenseDocuments != null && - this.DefenseDocuments.SequenceEqual(input.DefenseDocuments) - ) && - ( - this.DisputePspReference == input.DisputePspReference || - (this.DisputePspReference != null && - this.DisputePspReference.Equals(input.DisputePspReference)) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DefenseDocuments != null) - { - hashCode = (hashCode * 59) + this.DefenseDocuments.GetHashCode(); - } - if (this.DisputePspReference != null) - { - hashCode = (hashCode * 59) + this.DisputePspReference.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.cs b/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.cs deleted file mode 100644 index 26956d277..000000000 --- a/Adyen/Model/Disputes/SupplyDefenseDocumentResponse.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Disputes -{ - /// - /// SupplyDefenseDocumentResponse - /// - [DataContract(Name = "SupplyDefenseDocumentResponse")] - public partial class SupplyDefenseDocumentResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SupplyDefenseDocumentResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// disputeServiceResult (required). - public SupplyDefenseDocumentResponse(DisputeServiceResult disputeServiceResult = default(DisputeServiceResult)) - { - this.DisputeServiceResult = disputeServiceResult; - } - - /// - /// Gets or Sets DisputeServiceResult - /// - [DataMember(Name = "disputeServiceResult", IsRequired = false, EmitDefaultValue = false)] - public DisputeServiceResult DisputeServiceResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SupplyDefenseDocumentResponse {\n"); - sb.Append(" DisputeServiceResult: ").Append(DisputeServiceResult).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SupplyDefenseDocumentResponse); - } - - /// - /// Returns true if SupplyDefenseDocumentResponse instances are equal - /// - /// Instance of SupplyDefenseDocumentResponse to be compared - /// Boolean - public bool Equals(SupplyDefenseDocumentResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DisputeServiceResult == input.DisputeServiceResult || - (this.DisputeServiceResult != null && - this.DisputeServiceResult.Equals(input.DisputeServiceResult)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisputeServiceResult != null) - { - hashCode = (hashCode * 59) + this.DisputeServiceResult.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.cs deleted file mode 100644 index 935f0742a..000000000 --- a/Adyen/Model/LegalEntityManagement/AULocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// AULocalAccountIdentification - /// - [DataContract(Name = "AULocalAccountIdentification")] - public partial class AULocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **auLocal** - /// - /// **auLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AuLocal for value: auLocal - /// - [EnumMember(Value = "auLocal")] - AuLocal = 1 - - } - - - /// - /// **auLocal** - /// - /// **auLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AULocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. (required). - /// **auLocal** (required) (default to TypeEnum.AuLocal). - public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), TypeEnum type = TypeEnum.AuLocal) - { - this.AccountNumber = accountNumber; - this.BsbCode = bsbCode; - this.Type = type; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. - /// - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. - [DataMember(Name = "bsbCode", IsRequired = false, EmitDefaultValue = false)] - public string BsbCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AULocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BsbCode: ").Append(BsbCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AULocalAccountIdentification); - } - - /// - /// Returns true if AULocalAccountIdentification instances are equal - /// - /// Instance of AULocalAccountIdentification to be compared - /// Boolean - public bool Equals(AULocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BsbCode == input.BsbCode || - (this.BsbCode != null && - this.BsbCode.Equals(input.BsbCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BsbCode != null) - { - hashCode = (hashCode * 59) + this.BsbCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 9.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 5.", new [] { "AccountNumber" }); - } - - // BsbCode (string) maxLength - if (this.BsbCode != null && this.BsbCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BsbCode, length must be less than 6.", new [] { "BsbCode" }); - } - - // BsbCode (string) minLength - if (this.BsbCode != null && this.BsbCode.Length < 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BsbCode, length must be greater than 6.", new [] { "BsbCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/AbstractOpenAPISchema.cs b/Adyen/Model/LegalEntityManagement/AbstractOpenAPISchema.cs deleted file mode 100644 index 89e24afbb..000000000 --- a/Adyen/Model/LegalEntityManagement/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.cs b/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.cs deleted file mode 100644 index 6bafd4140..000000000 --- a/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// AcceptTermsOfServiceRequest - /// - [DataContract(Name = "AcceptTermsOfServiceRequest")] - public partial class AcceptTermsOfServiceRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AcceptTermsOfServiceRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The legal entity ID of the user accepting the Terms of Service. For organizations, this must be the individual legal entity ID of an authorized signatory for the organization. For sole proprietorships, this must be the individual legal entity ID of the owner. For individuals, this must be the individual legal entity id of either the individual, parent, or guardian. (required). - /// The IP address of the user accepting the Terms of Service.. - public AcceptTermsOfServiceRequest(string acceptedBy = default(string), string ipAddress = default(string)) - { - this.AcceptedBy = acceptedBy; - this.IpAddress = ipAddress; - } - - /// - /// The legal entity ID of the user accepting the Terms of Service. For organizations, this must be the individual legal entity ID of an authorized signatory for the organization. For sole proprietorships, this must be the individual legal entity ID of the owner. For individuals, this must be the individual legal entity id of either the individual, parent, or guardian. - /// - /// The legal entity ID of the user accepting the Terms of Service. For organizations, this must be the individual legal entity ID of an authorized signatory for the organization. For sole proprietorships, this must be the individual legal entity ID of the owner. For individuals, this must be the individual legal entity id of either the individual, parent, or guardian. - [DataMember(Name = "acceptedBy", IsRequired = false, EmitDefaultValue = false)] - public string AcceptedBy { get; set; } - - /// - /// The IP address of the user accepting the Terms of Service. - /// - /// The IP address of the user accepting the Terms of Service. - [DataMember(Name = "ipAddress", EmitDefaultValue = false)] - public string IpAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AcceptTermsOfServiceRequest {\n"); - sb.Append(" AcceptedBy: ").Append(AcceptedBy).Append("\n"); - sb.Append(" IpAddress: ").Append(IpAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AcceptTermsOfServiceRequest); - } - - /// - /// Returns true if AcceptTermsOfServiceRequest instances are equal - /// - /// Instance of AcceptTermsOfServiceRequest to be compared - /// Boolean - public bool Equals(AcceptTermsOfServiceRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptedBy == input.AcceptedBy || - (this.AcceptedBy != null && - this.AcceptedBy.Equals(input.AcceptedBy)) - ) && - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcceptedBy != null) - { - hashCode = (hashCode * 59) + this.AcceptedBy.GetHashCode(); - } - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.cs b/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.cs deleted file mode 100644 index cb9c5a2ad..000000000 --- a/Adyen/Model/LegalEntityManagement/AcceptTermsOfServiceResponse.cs +++ /dev/null @@ -1,289 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// AcceptTermsOfServiceResponse - /// - [DataContract(Name = "AcceptTermsOfServiceResponse")] - public partial class AcceptTermsOfServiceResponse : IEquatable, IValidatableObject - { - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AdyenAccount for value: adyenAccount - /// - [EnumMember(Value = "adyenAccount")] - AdyenAccount = 1, - - /// - /// Enum AdyenCapital for value: adyenCapital - /// - [EnumMember(Value = "adyenCapital")] - AdyenCapital = 2, - - /// - /// Enum AdyenCard for value: adyenCard - /// - [EnumMember(Value = "adyenCard")] - AdyenCard = 3, - - /// - /// Enum AdyenChargeCard for value: adyenChargeCard - /// - [EnumMember(Value = "adyenChargeCard")] - AdyenChargeCard = 4, - - /// - /// Enum AdyenForPlatformsAdvanced for value: adyenForPlatformsAdvanced - /// - [EnumMember(Value = "adyenForPlatformsAdvanced")] - AdyenForPlatformsAdvanced = 5, - - /// - /// Enum AdyenForPlatformsManage for value: adyenForPlatformsManage - /// - [EnumMember(Value = "adyenForPlatformsManage")] - AdyenForPlatformsManage = 6, - - /// - /// Enum AdyenFranchisee for value: adyenFranchisee - /// - [EnumMember(Value = "adyenFranchisee")] - AdyenFranchisee = 7, - - /// - /// Enum AdyenIssuing for value: adyenIssuing - /// - [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 8, - - /// - /// Enum AdyenPccr for value: adyenPccr - /// - [EnumMember(Value = "adyenPccr")] - AdyenPccr = 9, - - /// - /// Enum KycOnInvite for value: kycOnInvite - /// - [EnumMember(Value = "kycOnInvite")] - KycOnInvite = 10 - - } - - - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the user that accepted the Terms of Service.. - /// The unique identifier of the Terms of Service acceptance.. - /// The IP address of the user that accepted the Terms of Service.. - /// The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English or **fr** for French. Note that French is only available for some integration types in certain countries/regions. Reach out to your Adyen contact for more information.. - /// The unique identifier of the Terms of Service document.. - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** . - public AcceptTermsOfServiceResponse(string acceptedBy = default(string), string id = default(string), string ipAddress = default(string), string language = default(string), string termsOfServiceDocumentId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.AcceptedBy = acceptedBy; - this.Id = id; - this.IpAddress = ipAddress; - this.Language = language; - this.TermsOfServiceDocumentId = termsOfServiceDocumentId; - this.Type = type; - } - - /// - /// The unique identifier of the user that accepted the Terms of Service. - /// - /// The unique identifier of the user that accepted the Terms of Service. - [DataMember(Name = "acceptedBy", EmitDefaultValue = false)] - public string AcceptedBy { get; set; } - - /// - /// The unique identifier of the Terms of Service acceptance. - /// - /// The unique identifier of the Terms of Service acceptance. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The IP address of the user that accepted the Terms of Service. - /// - /// The IP address of the user that accepted the Terms of Service. - [DataMember(Name = "ipAddress", EmitDefaultValue = false)] - public string IpAddress { get; set; } - - /// - /// The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English or **fr** for French. Note that French is only available for some integration types in certain countries/regions. Reach out to your Adyen contact for more information. - /// - /// The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English or **fr** for French. Note that French is only available for some integration types in certain countries/regions. Reach out to your Adyen contact for more information. - [DataMember(Name = "language", EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// The unique identifier of the Terms of Service document. - /// - /// The unique identifier of the Terms of Service document. - [DataMember(Name = "termsOfServiceDocumentId", EmitDefaultValue = false)] - public string TermsOfServiceDocumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AcceptTermsOfServiceResponse {\n"); - sb.Append(" AcceptedBy: ").Append(AcceptedBy).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" IpAddress: ").Append(IpAddress).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" TermsOfServiceDocumentId: ").Append(TermsOfServiceDocumentId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AcceptTermsOfServiceResponse); - } - - /// - /// Returns true if AcceptTermsOfServiceResponse instances are equal - /// - /// Instance of AcceptTermsOfServiceResponse to be compared - /// Boolean - public bool Equals(AcceptTermsOfServiceResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptedBy == input.AcceptedBy || - (this.AcceptedBy != null && - this.AcceptedBy.Equals(input.AcceptedBy)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.TermsOfServiceDocumentId == input.TermsOfServiceDocumentId || - (this.TermsOfServiceDocumentId != null && - this.TermsOfServiceDocumentId.Equals(input.TermsOfServiceDocumentId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcceptedBy != null) - { - hashCode = (hashCode * 59) + this.AcceptedBy.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.TermsOfServiceDocumentId != null) - { - hashCode = (hashCode * 59) + this.TermsOfServiceDocumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.cs b/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.cs deleted file mode 100644 index ceb89d94d..000000000 --- a/Adyen/Model/LegalEntityManagement/AdditionalBankIdentification.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// AdditionalBankIdentification - /// - [DataContract(Name = "AdditionalBankIdentification")] - public partial class AdditionalBankIdentification : IEquatable, IValidatableObject - { - /// - /// The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - /// - /// The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AuBsbCode for value: auBsbCode - /// - [EnumMember(Value = "auBsbCode")] - AuBsbCode = 1, - - /// - /// Enum CaRoutingNumber for value: caRoutingNumber - /// - [EnumMember(Value = "caRoutingNumber")] - CaRoutingNumber = 2, - - /// - /// Enum GbSortCode for value: gbSortCode - /// - [EnumMember(Value = "gbSortCode")] - GbSortCode = 3, - - /// - /// Enum UsRoutingNumber for value: usRoutingNumber - /// - [EnumMember(Value = "usRoutingNumber")] - UsRoutingNumber = 4 - - } - - - /// - /// The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - /// - /// The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The value of the additional bank identification.. - /// The type of additional bank identification, depending on the country. Possible values: * **auBsbCode**: The 6-digit [Australian Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or spaces. * **caRoutingNumber**: The 9-digit [Canadian routing number](https://en.wikipedia.org/wiki/Routing_number_(Canada)), in EFT format, without separators or spaces. * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces.. - public AdditionalBankIdentification(string code = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Code = code; - this.Type = type; - } - - /// - /// The value of the additional bank identification. - /// - /// The value of the additional bank identification. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalBankIdentification {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalBankIdentification); - } - - /// - /// Returns true if AdditionalBankIdentification instances are equal - /// - /// Instance of AdditionalBankIdentification to be compared - /// Boolean - public bool Equals(AdditionalBankIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Address.cs b/Adyen/Model/LegalEntityManagement/Address.cs deleted file mode 100644 index 31c616b35..000000000 --- a/Adyen/Model/LegalEntityManagement/Address.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Address() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`.. - /// The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. (required). - /// The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA.. - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`.. - /// The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided.. - /// The apartment, unit, or suite number.. - public Address(string city = default(string), string country = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string), string street2 = default(string)) - { - this.Country = country; - this.City = city; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - this.Street = street; - this.Street2 = street2; - } - - /// - /// The name of the city. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`. - /// - /// The name of the city. Required if `stateOrProvince` is provided. If you specify the city, you must also send `postalCode` and `street`. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - /// - /// The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA. - /// - /// The postal code. Required if `stateOrProvince` and/or `city` is provided. When using alphanumeric postal codes, all letters must be uppercase. For example, 1234 AB or SW1A 1AA. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`. - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US. Required for Australia and New Zealand. If you specify the state or province, you must also send `city`, `postalCode`, and `street`. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided. - /// - /// The name of the street, and the house or building number. Required if `stateOrProvince` and/or `city` is provided. - [DataMember(Name = "street", EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// The apartment, unit, or suite number. - /// - /// The apartment, unit, or suite number. - [DataMember(Name = "street2", EmitDefaultValue = false)] - public string Street2 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append(" Street2: ").Append(Street2).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ) && - ( - this.Street2 == input.Street2 || - (this.Street2 != null && - this.Street2.Equals(input.Street2)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - if (this.Street2 != null) - { - hashCode = (hashCode * 59) + this.Street2.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Amount.cs b/Adyen/Model/LegalEntityManagement/Amount.cs deleted file mode 100644 index c38aa0959..000000000 --- a/Adyen/Model/LegalEntityManagement/Amount.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The type of currency. Must be EUR (or EUR equivalent). - /// Total value of amount. Must be >= 0. - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The type of currency. Must be EUR (or EUR equivalent) - /// - /// The type of currency. Must be EUR (or EUR equivalent) - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// Total value of amount. Must be >= 0 - /// - /// Total value of amount. Must be >= 0 - [DataMember(Name = "value", EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Attachment.cs b/Adyen/Model/LegalEntityManagement/Attachment.cs deleted file mode 100644 index cda63768c..000000000 --- a/Adyen/Model/LegalEntityManagement/Attachment.cs +++ /dev/null @@ -1,212 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Attachment - /// - [DataContract(Name = "Attachment")] - public partial class Attachment : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Attachment() { } - /// - /// Initializes a new instance of the class. - /// - /// The document in Base64-encoded string format. (required). - /// The file format. Possible values: **application/pdf**, **image/jpg**, **image/jpeg**, **image/png**. . - /// The name of the file including the file extension.. - /// The name of the file including the file extension.. - /// Specifies which side of the ID card is uploaded. * If the `type` is **driversLicense** or **identityCard**, you must set this to **front** or **back** and include both sides in the same API request. * For any other types, when this is omitted, we infer the page number based on the order of attachments.. - public Attachment(byte[] content = default(byte[]), string contentType = default(string), string filename = default(string), string pageName = default(string), string pageType = default(string)) - { - this.Content = content; - this.ContentType = contentType; - this.Filename = filename; - this.PageName = pageName; - this.PageType = pageType; - } - - /// - /// The document in Base64-encoded string format. - /// - /// The document in Base64-encoded string format. - [DataMember(Name = "content", IsRequired = false, EmitDefaultValue = false)] - public byte[] Content { get; set; } - - /// - /// The file format. Possible values: **application/pdf**, **image/jpg**, **image/jpeg**, **image/png**. - /// - /// The file format. Possible values: **application/pdf**, **image/jpg**, **image/jpeg**, **image/png**. - [DataMember(Name = "contentType", EmitDefaultValue = false)] - [Obsolete("Deprecated since Legal Entity Management API v1.")] - public string ContentType { get; set; } - - /// - /// The name of the file including the file extension. - /// - /// The name of the file including the file extension. - [DataMember(Name = "filename", EmitDefaultValue = false)] - [Obsolete("Deprecated since Legal Entity Management API v1.")] - public string Filename { get; set; } - - /// - /// The name of the file including the file extension. - /// - /// The name of the file including the file extension. - [DataMember(Name = "pageName", EmitDefaultValue = false)] - public string PageName { get; set; } - - /// - /// Specifies which side of the ID card is uploaded. * If the `type` is **driversLicense** or **identityCard**, you must set this to **front** or **back** and include both sides in the same API request. * For any other types, when this is omitted, we infer the page number based on the order of attachments. - /// - /// Specifies which side of the ID card is uploaded. * If the `type` is **driversLicense** or **identityCard**, you must set this to **front** or **back** and include both sides in the same API request. * For any other types, when this is omitted, we infer the page number based on the order of attachments. - [DataMember(Name = "pageType", EmitDefaultValue = false)] - public string PageType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Attachment {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" ContentType: ").Append(ContentType).Append("\n"); - sb.Append(" Filename: ").Append(Filename).Append("\n"); - sb.Append(" PageName: ").Append(PageName).Append("\n"); - sb.Append(" PageType: ").Append(PageType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Attachment); - } - - /// - /// Returns true if Attachment instances are equal - /// - /// Instance of Attachment to be compared - /// Boolean - public bool Equals(Attachment input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.ContentType == input.ContentType || - (this.ContentType != null && - this.ContentType.Equals(input.ContentType)) - ) && - ( - this.Filename == input.Filename || - (this.Filename != null && - this.Filename.Equals(input.Filename)) - ) && - ( - this.PageName == input.PageName || - (this.PageName != null && - this.PageName.Equals(input.PageName)) - ) && - ( - this.PageType == input.PageType || - (this.PageType != null && - this.PageType.Equals(input.PageType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.ContentType != null) - { - hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); - } - if (this.Filename != null) - { - hashCode = (hashCode * 59) + this.Filename.GetHashCode(); - } - if (this.PageName != null) - { - hashCode = (hashCode * 59) + this.PageName.GetHashCode(); - } - if (this.PageType != null) - { - hashCode = (hashCode * 59) + this.PageType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/BankAccountInfo.cs b/Adyen/Model/LegalEntityManagement/BankAccountInfo.cs deleted file mode 100644 index d9b6b36a7..000000000 --- a/Adyen/Model/LegalEntityManagement/BankAccountInfo.cs +++ /dev/null @@ -1,199 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// BankAccountInfo - /// - [DataContract(Name = "BankAccountInfo")] - public partial class BankAccountInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountIdentification. - /// The type of bank account.. - /// The name of the banking institution where the bank account is held.. - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the bank account is registered. For example, **NL**.. - public BankAccountInfo(BankAccountInfoAccountIdentification accountIdentification = default(BankAccountInfoAccountIdentification), string accountType = default(string), string bankName = default(string), string countryCode = default(string)) - { - this.AccountIdentification = accountIdentification; - this.AccountType = accountType; - this.BankName = bankName; - this.CountryCode = countryCode; - } - - /// - /// Gets or Sets AccountIdentification - /// - [DataMember(Name = "accountIdentification", EmitDefaultValue = false)] - public BankAccountInfoAccountIdentification AccountIdentification { get; set; } - - /// - /// The type of bank account. - /// - /// The type of bank account. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - [Obsolete("Deprecated since Legal Entity Management API v2.")] - public string AccountType { get; set; } - - /// - /// The name of the banking institution where the bank account is held. - /// - /// The name of the banking institution where the bank account is held. - [DataMember(Name = "bankName", EmitDefaultValue = false)] - public string BankName { get; set; } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the bank account is registered. For example, **NL**. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the bank account is registered. For example, **NL**. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). - /// - /// Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). - [DataMember(Name = "trustedSource", EmitDefaultValue = false)] - public bool? TrustedSource { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountInfo {\n"); - sb.Append(" AccountIdentification: ").Append(AccountIdentification).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" BankName: ").Append(BankName).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" TrustedSource: ").Append(TrustedSource).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountInfo); - } - - /// - /// Returns true if BankAccountInfo instances are equal - /// - /// Instance of BankAccountInfo to be compared - /// Boolean - public bool Equals(BankAccountInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountIdentification == input.AccountIdentification || - (this.AccountIdentification != null && - this.AccountIdentification.Equals(input.AccountIdentification)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.BankName == input.BankName || - (this.BankName != null && - this.BankName.Equals(input.BankName)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.TrustedSource == input.TrustedSource || - this.TrustedSource.Equals(input.TrustedSource) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountIdentification != null) - { - hashCode = (hashCode * 59) + this.AccountIdentification.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.BankName != null) - { - hashCode = (hashCode * 59) + this.BankName.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TrustedSource.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.cs deleted file mode 100644 index 029b692e7..000000000 --- a/Adyen/Model/LegalEntityManagement/BankAccountInfoAccountIdentification.cs +++ /dev/null @@ -1,710 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Identification of the bank account. - /// - [JsonConverter(typeof(BankAccountInfoAccountIdentificationJsonConverter))] - [DataContract(Name = "BankAccountInfo_accountIdentification")] - public partial class BankAccountInfoAccountIdentification : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AULocalAccountIdentification. - public BankAccountInfoAccountIdentification(AULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CALocalAccountIdentification. - public BankAccountInfoAccountIdentification(CALocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CZLocalAccountIdentification. - public BankAccountInfoAccountIdentification(CZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DKLocalAccountIdentification. - public BankAccountInfoAccountIdentification(DKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HKLocalAccountIdentification. - public BankAccountInfoAccountIdentification(HKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HULocalAccountIdentification. - public BankAccountInfoAccountIdentification(HULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IbanAccountIdentification. - public BankAccountInfoAccountIdentification(IbanAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NOLocalAccountIdentification. - public BankAccountInfoAccountIdentification(NOLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NZLocalAccountIdentification. - public BankAccountInfoAccountIdentification(NZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NumberAndBicAccountIdentification. - public BankAccountInfoAccountIdentification(NumberAndBicAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PLLocalAccountIdentification. - public BankAccountInfoAccountIdentification(PLLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SELocalAccountIdentification. - public BankAccountInfoAccountIdentification(SELocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SGLocalAccountIdentification. - public BankAccountInfoAccountIdentification(SGLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UKLocalAccountIdentification. - public BankAccountInfoAccountIdentification(UKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of USLocalAccountIdentification. - public BankAccountInfoAccountIdentification(USLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CALocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IbanAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NOLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NumberAndBicAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PLLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SELocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SGLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(USLocalAccountIdentification)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AULocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification"); - } - } - } - - /// - /// Get the actual instance of `AULocalAccountIdentification`. If the actual instance is not `AULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of AULocalAccountIdentification - public AULocalAccountIdentification GetAULocalAccountIdentification() - { - return (AULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CALocalAccountIdentification`. If the actual instance is not `CALocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CALocalAccountIdentification - public CALocalAccountIdentification GetCALocalAccountIdentification() - { - return (CALocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CZLocalAccountIdentification`. If the actual instance is not `CZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CZLocalAccountIdentification - public CZLocalAccountIdentification GetCZLocalAccountIdentification() - { - return (CZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `DKLocalAccountIdentification`. If the actual instance is not `DKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of DKLocalAccountIdentification - public DKLocalAccountIdentification GetDKLocalAccountIdentification() - { - return (DKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HKLocalAccountIdentification`. If the actual instance is not `HKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HKLocalAccountIdentification - public HKLocalAccountIdentification GetHKLocalAccountIdentification() - { - return (HKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HULocalAccountIdentification`. If the actual instance is not `HULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HULocalAccountIdentification - public HULocalAccountIdentification GetHULocalAccountIdentification() - { - return (HULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of IbanAccountIdentification - public IbanAccountIdentification GetIbanAccountIdentification() - { - return (IbanAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NOLocalAccountIdentification`. If the actual instance is not `NOLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NOLocalAccountIdentification - public NOLocalAccountIdentification GetNOLocalAccountIdentification() - { - return (NOLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NZLocalAccountIdentification`. If the actual instance is not `NZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NZLocalAccountIdentification - public NZLocalAccountIdentification GetNZLocalAccountIdentification() - { - return (NZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NumberAndBicAccountIdentification`. If the actual instance is not `NumberAndBicAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NumberAndBicAccountIdentification - public NumberAndBicAccountIdentification GetNumberAndBicAccountIdentification() - { - return (NumberAndBicAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `PLLocalAccountIdentification`. If the actual instance is not `PLLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of PLLocalAccountIdentification - public PLLocalAccountIdentification GetPLLocalAccountIdentification() - { - return (PLLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SELocalAccountIdentification`. If the actual instance is not `SELocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SELocalAccountIdentification - public SELocalAccountIdentification GetSELocalAccountIdentification() - { - return (SELocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SGLocalAccountIdentification`. If the actual instance is not `SGLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SGLocalAccountIdentification - public SGLocalAccountIdentification GetSGLocalAccountIdentification() - { - return (SGLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `UKLocalAccountIdentification`. If the actual instance is not `UKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of UKLocalAccountIdentification - public UKLocalAccountIdentification GetUKLocalAccountIdentification() - { - return (UKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `USLocalAccountIdentification`. If the actual instance is not `USLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of USLocalAccountIdentification - public USLocalAccountIdentification GetUSLocalAccountIdentification() - { - return (USLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BankAccountInfoAccountIdentification {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, BankAccountInfoAccountIdentification.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of BankAccountInfoAccountIdentification - /// - /// JSON string - /// An instance of BankAccountInfoAccountIdentification - public static BankAccountInfoAccountIdentification FromJson(string jsonString) - { - BankAccountInfoAccountIdentification newBankAccountInfoAccountIdentification = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newBankAccountInfoAccountIdentification; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the AULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("AULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CALocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("CALocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("CZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the DKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("DKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("HKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("HULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the IbanAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("IbanAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NOLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("NOLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("NZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NumberAndBicAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("NumberAndBicAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the PLLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("PLLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SELocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("SELocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SGLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("SGLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the UKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("UKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the USLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountInfoAccountIdentification = new BankAccountInfoAccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountInfoAccountIdentification.SerializerSettings)); - matchedTypes.Add("USLocalAccountIdentification"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newBankAccountInfoAccountIdentification; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountInfoAccountIdentification); - } - - /// - /// Returns true if BankAccountInfoAccountIdentification instances are equal - /// - /// Instance of BankAccountInfoAccountIdentification to be compared - /// Boolean - public bool Equals(BankAccountInfoAccountIdentification input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for BankAccountInfoAccountIdentification - /// - public class BankAccountInfoAccountIdentificationJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(BankAccountInfoAccountIdentification).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return BankAccountInfoAccountIdentification.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/BirthData.cs b/Adyen/Model/LegalEntityManagement/BirthData.cs deleted file mode 100644 index b619363c0..000000000 --- a/Adyen/Model/LegalEntityManagement/BirthData.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// BirthData - /// - [DataContract(Name = "BirthData")] - public partial class BirthData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The individual's date of birth, in YYYY-MM-DD format.. - public BirthData(string dateOfBirth = default(string)) - { - this.DateOfBirth = dateOfBirth; - } - - /// - /// The individual's date of birth, in YYYY-MM-DD format. - /// - /// The individual's date of birth, in YYYY-MM-DD format. - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - public string DateOfBirth { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BirthData {\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BirthData); - } - - /// - /// Returns true if BirthData instances are equal - /// - /// Instance of BirthData to be compared - /// Boolean - public bool Equals(BirthData input) - { - if (input == null) - { - return false; - } - return - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/BusinessLine.cs b/Adyen/Model/LegalEntityManagement/BusinessLine.cs deleted file mode 100644 index be061628c..000000000 --- a/Adyen/Model/LegalEntityManagement/BusinessLine.cs +++ /dev/null @@ -1,308 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// BusinessLine - /// - [DataContract(Name = "BusinessLine")] - public partial class BusinessLine : IEquatable, IValidatableObject - { - /// - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** - /// - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** - [JsonConverter(typeof(StringEnumConverter))] - public enum ServiceEnum - { - /// - /// Enum PaymentProcessing for value: paymentProcessing - /// - [EnumMember(Value = "paymentProcessing")] - PaymentProcessing = 1, - - /// - /// Enum Issuing for value: issuing - /// - [EnumMember(Value = "issuing")] - Issuing = 2, - - /// - /// Enum Banking for value: banking - /// - [EnumMember(Value = "banking")] - Banking = 3 - - } - - - /// - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** - /// - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** - [DataMember(Name = "service", IsRequired = false, EmitDefaultValue = false)] - public ServiceEnum Service { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BusinessLine() { } - /// - /// Initializes a new instance of the class. - /// - /// A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores. (required). - /// Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line. (required). - /// The verification errors related to capabilities for this supporting entity.. - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**.. - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** (required). - /// sourceOfFunds. - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.. - /// webDataExemption. - public BusinessLine(string industryCode = default(string), string legalEntityId = default(string), List problems = default(List), List salesChannels = default(List), ServiceEnum service = default(ServiceEnum), SourceOfFunds sourceOfFunds = default(SourceOfFunds), List webData = default(List), WebDataExemption webDataExemption = default(WebDataExemption)) - { - this.IndustryCode = industryCode; - this.LegalEntityId = legalEntityId; - this.Service = service; - this.Problems = problems; - this.SalesChannels = salesChannels; - this.SourceOfFunds = sourceOfFunds; - this.WebData = webData; - this.WebDataExemption = webDataExemption; - } - - /// - /// The unique identifier of the business line. - /// - /// The unique identifier of the business line. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores. - /// - /// A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores. - [DataMember(Name = "industryCode", IsRequired = false, EmitDefaultValue = false)] - public string IndustryCode { get; set; } - - /// - /// Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line. - /// - /// Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line. - [DataMember(Name = "legalEntityId", IsRequired = false, EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// The verification errors related to capabilities for this supporting entity. - /// - /// The verification errors related to capabilities for this supporting entity. - [DataMember(Name = "problems", EmitDefaultValue = false)] - public List Problems { get; set; } - - /// - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. - /// - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. - [DataMember(Name = "salesChannels", EmitDefaultValue = false)] - public List SalesChannels { get; set; } - - /// - /// Gets or Sets SourceOfFunds - /// - [DataMember(Name = "sourceOfFunds", EmitDefaultValue = false)] - public SourceOfFunds SourceOfFunds { get; set; } - - /// - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. - /// - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. - [DataMember(Name = "webData", EmitDefaultValue = false)] - public List WebData { get; set; } - - /// - /// Gets or Sets WebDataExemption - /// - [DataMember(Name = "webDataExemption", EmitDefaultValue = false)] - public WebDataExemption WebDataExemption { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BusinessLine {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" IndustryCode: ").Append(IndustryCode).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" Problems: ").Append(Problems).Append("\n"); - sb.Append(" SalesChannels: ").Append(SalesChannels).Append("\n"); - sb.Append(" Service: ").Append(Service).Append("\n"); - sb.Append(" SourceOfFunds: ").Append(SourceOfFunds).Append("\n"); - sb.Append(" WebData: ").Append(WebData).Append("\n"); - sb.Append(" WebDataExemption: ").Append(WebDataExemption).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BusinessLine); - } - - /// - /// Returns true if BusinessLine instances are equal - /// - /// Instance of BusinessLine to be compared - /// Boolean - public bool Equals(BusinessLine input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IndustryCode == input.IndustryCode || - (this.IndustryCode != null && - this.IndustryCode.Equals(input.IndustryCode)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.Problems == input.Problems || - this.Problems != null && - input.Problems != null && - this.Problems.SequenceEqual(input.Problems) - ) && - ( - this.SalesChannels == input.SalesChannels || - this.SalesChannels != null && - input.SalesChannels != null && - this.SalesChannels.SequenceEqual(input.SalesChannels) - ) && - ( - this.Service == input.Service || - this.Service.Equals(input.Service) - ) && - ( - this.SourceOfFunds == input.SourceOfFunds || - (this.SourceOfFunds != null && - this.SourceOfFunds.Equals(input.SourceOfFunds)) - ) && - ( - this.WebData == input.WebData || - this.WebData != null && - input.WebData != null && - this.WebData.SequenceEqual(input.WebData) - ) && - ( - this.WebDataExemption == input.WebDataExemption || - (this.WebDataExemption != null && - this.WebDataExemption.Equals(input.WebDataExemption)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IndustryCode != null) - { - hashCode = (hashCode * 59) + this.IndustryCode.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.Problems != null) - { - hashCode = (hashCode * 59) + this.Problems.GetHashCode(); - } - if (this.SalesChannels != null) - { - hashCode = (hashCode * 59) + this.SalesChannels.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Service.GetHashCode(); - if (this.SourceOfFunds != null) - { - hashCode = (hashCode * 59) + this.SourceOfFunds.GetHashCode(); - } - if (this.WebData != null) - { - hashCode = (hashCode * 59) + this.WebData.GetHashCode(); - } - if (this.WebDataExemption != null) - { - hashCode = (hashCode * 59) + this.WebDataExemption.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/BusinessLineInfo.cs b/Adyen/Model/LegalEntityManagement/BusinessLineInfo.cs deleted file mode 100644 index 564cc5e8a..000000000 --- a/Adyen/Model/LegalEntityManagement/BusinessLineInfo.cs +++ /dev/null @@ -1,271 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// BusinessLineInfo - /// - [DataContract(Name = "BusinessLineInfo")] - public partial class BusinessLineInfo : IEquatable, IValidatableObject - { - /// - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** - /// - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** - [JsonConverter(typeof(StringEnumConverter))] - public enum ServiceEnum - { - /// - /// Enum PaymentProcessing for value: paymentProcessing - /// - [EnumMember(Value = "paymentProcessing")] - PaymentProcessing = 1, - - /// - /// Enum Issuing for value: issuing - /// - [EnumMember(Value = "issuing")] - Issuing = 2, - - /// - /// Enum Banking for value: banking - /// - [EnumMember(Value = "banking")] - Banking = 3 - - } - - - /// - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** - /// - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** - [DataMember(Name = "service", IsRequired = false, EmitDefaultValue = false)] - public ServiceEnum Service { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BusinessLineInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores. (required). - /// Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line. (required). - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**.. - /// The service for which you are creating the business line. Possible values: * **paymentProcessing** * **issuing** * **banking** (required). - /// sourceOfFunds. - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.. - /// webDataExemption. - public BusinessLineInfo(string industryCode = default(string), string legalEntityId = default(string), List salesChannels = default(List), ServiceEnum service = default(ServiceEnum), SourceOfFunds sourceOfFunds = default(SourceOfFunds), List webData = default(List), WebDataExemption webDataExemption = default(WebDataExemption)) - { - this.IndustryCode = industryCode; - this.LegalEntityId = legalEntityId; - this.Service = service; - this.SalesChannels = salesChannels; - this.SourceOfFunds = sourceOfFunds; - this.WebData = webData; - this.WebDataExemption = webDataExemption; - } - - /// - /// A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores. - /// - /// A code that represents the industry of the legal entity for [marketplaces](https://docs.adyen.com/marketplaces/verification-requirements/reference-additional-products/#list-industry-codes) or [platforms](https://docs.adyen.com/platforms/verification-requirements/reference-additional-products/#list-industry-codes). For example, **4431A** for computer software stores. - [DataMember(Name = "industryCode", IsRequired = false, EmitDefaultValue = false)] - public string IndustryCode { get; set; } - - /// - /// Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line. - /// - /// Unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) that owns the business line. - [DataMember(Name = "legalEntityId", IsRequired = false, EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. - /// - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. - [DataMember(Name = "salesChannels", EmitDefaultValue = false)] - public List SalesChannels { get; set; } - - /// - /// Gets or Sets SourceOfFunds - /// - [DataMember(Name = "sourceOfFunds", EmitDefaultValue = false)] - public SourceOfFunds SourceOfFunds { get; set; } - - /// - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. - /// - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. - [DataMember(Name = "webData", EmitDefaultValue = false)] - public List WebData { get; set; } - - /// - /// Gets or Sets WebDataExemption - /// - [DataMember(Name = "webDataExemption", EmitDefaultValue = false)] - public WebDataExemption WebDataExemption { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BusinessLineInfo {\n"); - sb.Append(" IndustryCode: ").Append(IndustryCode).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" SalesChannels: ").Append(SalesChannels).Append("\n"); - sb.Append(" Service: ").Append(Service).Append("\n"); - sb.Append(" SourceOfFunds: ").Append(SourceOfFunds).Append("\n"); - sb.Append(" WebData: ").Append(WebData).Append("\n"); - sb.Append(" WebDataExemption: ").Append(WebDataExemption).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BusinessLineInfo); - } - - /// - /// Returns true if BusinessLineInfo instances are equal - /// - /// Instance of BusinessLineInfo to be compared - /// Boolean - public bool Equals(BusinessLineInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.IndustryCode == input.IndustryCode || - (this.IndustryCode != null && - this.IndustryCode.Equals(input.IndustryCode)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.SalesChannels == input.SalesChannels || - this.SalesChannels != null && - input.SalesChannels != null && - this.SalesChannels.SequenceEqual(input.SalesChannels) - ) && - ( - this.Service == input.Service || - this.Service.Equals(input.Service) - ) && - ( - this.SourceOfFunds == input.SourceOfFunds || - (this.SourceOfFunds != null && - this.SourceOfFunds.Equals(input.SourceOfFunds)) - ) && - ( - this.WebData == input.WebData || - this.WebData != null && - input.WebData != null && - this.WebData.SequenceEqual(input.WebData) - ) && - ( - this.WebDataExemption == input.WebDataExemption || - (this.WebDataExemption != null && - this.WebDataExemption.Equals(input.WebDataExemption)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IndustryCode != null) - { - hashCode = (hashCode * 59) + this.IndustryCode.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.SalesChannels != null) - { - hashCode = (hashCode * 59) + this.SalesChannels.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Service.GetHashCode(); - if (this.SourceOfFunds != null) - { - hashCode = (hashCode * 59) + this.SourceOfFunds.GetHashCode(); - } - if (this.WebData != null) - { - hashCode = (hashCode * 59) + this.WebData.GetHashCode(); - } - if (this.WebDataExemption != null) - { - hashCode = (hashCode * 59) + this.WebDataExemption.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.cs b/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.cs deleted file mode 100644 index 4b7a8d3c9..000000000 --- a/Adyen/Model/LegalEntityManagement/BusinessLineInfoUpdate.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// BusinessLineInfoUpdate - /// - [DataContract(Name = "BusinessLineInfoUpdate")] - public partial class BusinessLineInfoUpdate : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A code that represents the industry of your legal entity. For example, **4431A** for computer software stores.. - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**.. - /// sourceOfFunds. - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object.. - /// webDataExemption. - public BusinessLineInfoUpdate(string industryCode = default(string), List salesChannels = default(List), SourceOfFunds sourceOfFunds = default(SourceOfFunds), List webData = default(List), WebDataExemption webDataExemption = default(WebDataExemption)) - { - this.IndustryCode = industryCode; - this.SalesChannels = salesChannels; - this.SourceOfFunds = sourceOfFunds; - this.WebData = webData; - this.WebDataExemption = webDataExemption; - } - - /// - /// A code that represents the industry of your legal entity. For example, **4431A** for computer software stores. - /// - /// A code that represents the industry of your legal entity. For example, **4431A** for computer software stores. - [DataMember(Name = "industryCode", EmitDefaultValue = false)] - public string IndustryCode { get; set; } - - /// - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. - /// - /// A list of channels where goods or services are sold. Possible values: **pos**, **posMoto**, **eCommerce**, **ecomMoto**, **payByLink**. Required only in combination with the `service` **paymentProcessing**. - [DataMember(Name = "salesChannels", EmitDefaultValue = false)] - public List SalesChannels { get; set; } - - /// - /// Gets or Sets SourceOfFunds - /// - [DataMember(Name = "sourceOfFunds", EmitDefaultValue = false)] - public SourceOfFunds SourceOfFunds { get; set; } - - /// - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. - /// - /// List of website URLs where your user's goods or services are sold. When this is required for a service but your user does not have an online presence, provide the reason in the `webDataExemption` object. - [DataMember(Name = "webData", EmitDefaultValue = false)] - public List WebData { get; set; } - - /// - /// Gets or Sets WebDataExemption - /// - [DataMember(Name = "webDataExemption", EmitDefaultValue = false)] - public WebDataExemption WebDataExemption { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BusinessLineInfoUpdate {\n"); - sb.Append(" IndustryCode: ").Append(IndustryCode).Append("\n"); - sb.Append(" SalesChannels: ").Append(SalesChannels).Append("\n"); - sb.Append(" SourceOfFunds: ").Append(SourceOfFunds).Append("\n"); - sb.Append(" WebData: ").Append(WebData).Append("\n"); - sb.Append(" WebDataExemption: ").Append(WebDataExemption).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BusinessLineInfoUpdate); - } - - /// - /// Returns true if BusinessLineInfoUpdate instances are equal - /// - /// Instance of BusinessLineInfoUpdate to be compared - /// Boolean - public bool Equals(BusinessLineInfoUpdate input) - { - if (input == null) - { - return false; - } - return - ( - this.IndustryCode == input.IndustryCode || - (this.IndustryCode != null && - this.IndustryCode.Equals(input.IndustryCode)) - ) && - ( - this.SalesChannels == input.SalesChannels || - this.SalesChannels != null && - input.SalesChannels != null && - this.SalesChannels.SequenceEqual(input.SalesChannels) - ) && - ( - this.SourceOfFunds == input.SourceOfFunds || - (this.SourceOfFunds != null && - this.SourceOfFunds.Equals(input.SourceOfFunds)) - ) && - ( - this.WebData == input.WebData || - this.WebData != null && - input.WebData != null && - this.WebData.SequenceEqual(input.WebData) - ) && - ( - this.WebDataExemption == input.WebDataExemption || - (this.WebDataExemption != null && - this.WebDataExemption.Equals(input.WebDataExemption)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IndustryCode != null) - { - hashCode = (hashCode * 59) + this.IndustryCode.GetHashCode(); - } - if (this.SalesChannels != null) - { - hashCode = (hashCode * 59) + this.SalesChannels.GetHashCode(); - } - if (this.SourceOfFunds != null) - { - hashCode = (hashCode * 59) + this.SourceOfFunds.GetHashCode(); - } - if (this.WebData != null) - { - hashCode = (hashCode * 59) + this.WebData.GetHashCode(); - } - if (this.WebDataExemption != null) - { - hashCode = (hashCode * 59) + this.WebDataExemption.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/BusinessLines.cs b/Adyen/Model/LegalEntityManagement/BusinessLines.cs deleted file mode 100644 index 0ad16998f..000000000 --- a/Adyen/Model/LegalEntityManagement/BusinessLines.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// BusinessLines - /// - [DataContract(Name = "BusinessLines")] - public partial class BusinessLines : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BusinessLines() { } - /// - /// Initializes a new instance of the class. - /// - /// List of business lines. (required). - public BusinessLines(List businessLines = default(List)) - { - this._BusinessLines = businessLines; - } - - /// - /// List of business lines. - /// - /// List of business lines. - [DataMember(Name = "businessLines", IsRequired = false, EmitDefaultValue = false)] - public List _BusinessLines { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BusinessLines {\n"); - sb.Append(" _BusinessLines: ").Append(_BusinessLines).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BusinessLines); - } - - /// - /// Returns true if BusinessLines instances are equal - /// - /// Instance of BusinessLines to be compared - /// Boolean - public bool Equals(BusinessLines input) - { - if (input == null) - { - return false; - } - return - ( - this._BusinessLines == input._BusinessLines || - this._BusinessLines != null && - input._BusinessLines != null && - this._BusinessLines.SequenceEqual(input._BusinessLines) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._BusinessLines != null) - { - hashCode = (hashCode * 59) + this._BusinessLines.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.cs deleted file mode 100644 index 197cbeb71..000000000 --- a/Adyen/Model/LegalEntityManagement/CALocalAccountIdentification.cs +++ /dev/null @@ -1,274 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CALocalAccountIdentification - /// - [DataContract(Name = "CALocalAccountIdentification")] - public partial class CALocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 1, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 2 - - } - - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// **caLocal** - /// - /// **caLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum CaLocal for value: caLocal - /// - [EnumMember(Value = "caLocal")] - CaLocal = 1 - - } - - - /// - /// **caLocal** - /// - /// **caLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CALocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. (required). - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The 3-digit institution number, without separators or whitespace. (required). - /// The 5-digit transit number, without separators or whitespace. (required). - /// **caLocal** (required) (default to TypeEnum.CaLocal). - public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) - { - this.AccountNumber = accountNumber; - this.InstitutionNumber = institutionNumber; - this.TransitNumber = transitNumber; - this.Type = type; - this.AccountType = accountType; - } - - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit institution number, without separators or whitespace. - /// - /// The 3-digit institution number, without separators or whitespace. - [DataMember(Name = "institutionNumber", IsRequired = false, EmitDefaultValue = false)] - public string InstitutionNumber { get; set; } - - /// - /// The 5-digit transit number, without separators or whitespace. - /// - /// The 5-digit transit number, without separators or whitespace. - [DataMember(Name = "transitNumber", IsRequired = false, EmitDefaultValue = false)] - public string TransitNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CALocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" InstitutionNumber: ").Append(InstitutionNumber).Append("\n"); - sb.Append(" TransitNumber: ").Append(TransitNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CALocalAccountIdentification); - } - - /// - /// Returns true if CALocalAccountIdentification instances are equal - /// - /// Instance of CALocalAccountIdentification to be compared - /// Boolean - public bool Equals(CALocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.InstitutionNumber == input.InstitutionNumber || - (this.InstitutionNumber != null && - this.InstitutionNumber.Equals(input.InstitutionNumber)) - ) && - ( - this.TransitNumber == input.TransitNumber || - (this.TransitNumber != null && - this.TransitNumber.Equals(input.TransitNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.InstitutionNumber != null) - { - hashCode = (hashCode * 59) + this.InstitutionNumber.GetHashCode(); - } - if (this.TransitNumber != null) - { - hashCode = (hashCode * 59) + this.TransitNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 12.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 5.", new [] { "AccountNumber" }); - } - - // InstitutionNumber (string) maxLength - if (this.InstitutionNumber != null && this.InstitutionNumber.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstitutionNumber, length must be less than 3.", new [] { "InstitutionNumber" }); - } - - // InstitutionNumber (string) minLength - if (this.InstitutionNumber != null && this.InstitutionNumber.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstitutionNumber, length must be greater than 3.", new [] { "InstitutionNumber" }); - } - - // TransitNumber (string) maxLength - if (this.TransitNumber != null && this.TransitNumber.Length > 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransitNumber, length must be less than 5.", new [] { "TransitNumber" }); - } - - // TransitNumber (string) minLength - if (this.TransitNumber != null && this.TransitNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransitNumber, length must be greater than 5.", new [] { "TransitNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.cs deleted file mode 100644 index 129d7e6cc..000000000 --- a/Adyen/Model/LegalEntityManagement/CZLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CZLocalAccountIdentification - /// - [DataContract(Name = "CZLocalAccountIdentification")] - public partial class CZLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **czLocal** - /// - /// **czLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum CzLocal for value: czLocal - /// - [EnumMember(Value = "czLocal")] - CzLocal = 1 - - } - - - /// - /// **czLocal** - /// - /// **czLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CZLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) (required). - /// The 4-digit bank code (Kód banky), without separators or whitespace. (required). - /// **czLocal** (required) (default to TypeEnum.CzLocal). - public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.CzLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.Type = type; - } - - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4-digit bank code (Kód banky), without separators or whitespace. - /// - /// The 4-digit bank code (Kód banky), without separators or whitespace. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CZLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CZLocalAccountIdentification); - } - - /// - /// Returns true if CZLocalAccountIdentification instances are equal - /// - /// Instance of CZLocalAccountIdentification to be compared - /// Boolean - public bool Equals(CZLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 17) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 17.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 2.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 4.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 4.", new [] { "BankCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CalculatePciStatusRequest.cs b/Adyen/Model/LegalEntityManagement/CalculatePciStatusRequest.cs deleted file mode 100644 index 51e080b65..000000000 --- a/Adyen/Model/LegalEntityManagement/CalculatePciStatusRequest.cs +++ /dev/null @@ -1,158 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CalculatePciStatusRequest - /// - [DataContract(Name = "CalculatePciStatusRequest")] - public partial class CalculatePciStatusRequest : IEquatable, IValidatableObject - { - /// - /// Defines AdditionalSalesChannels - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AdditionalSalesChannelsEnum - { - /// - /// Enum ECommerce for value: eCommerce - /// - [EnumMember(Value = "eCommerce")] - ECommerce = 1, - - /// - /// Enum EcomMoto for value: ecomMoto - /// - [EnumMember(Value = "ecomMoto")] - EcomMoto = 2, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 3, - - /// - /// Enum PosMoto for value: posMoto - /// - [EnumMember(Value = "posMoto")] - PosMoto = 4 - - } - - - - /// - /// An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** - /// - /// An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** - [DataMember(Name = "additionalSalesChannels", EmitDefaultValue = false)] - public List AdditionalSalesChannels { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** . - public CalculatePciStatusRequest(List additionalSalesChannels = default(List)) - { - this.AdditionalSalesChannels = additionalSalesChannels; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CalculatePciStatusRequest {\n"); - sb.Append(" AdditionalSalesChannels: ").Append(AdditionalSalesChannels).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CalculatePciStatusRequest); - } - - /// - /// Returns true if CalculatePciStatusRequest instances are equal - /// - /// Instance of CalculatePciStatusRequest to be compared - /// Boolean - public bool Equals(CalculatePciStatusRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalSalesChannels == input.AdditionalSalesChannels || - this.AdditionalSalesChannels.SequenceEqual(input.AdditionalSalesChannels) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AdditionalSalesChannels.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CalculatePciStatusResponse.cs b/Adyen/Model/LegalEntityManagement/CalculatePciStatusResponse.cs deleted file mode 100644 index 24d0b22ac..000000000 --- a/Adyen/Model/LegalEntityManagement/CalculatePciStatusResponse.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CalculatePciStatusResponse - /// - [DataContract(Name = "CalculatePciStatusResponse")] - public partial class CalculatePciStatusResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates if the user is required to sign PCI questionnaires. If **false**, they do not need to sign any questionnaires.. - public CalculatePciStatusResponse(bool? signingRequired = default(bool?)) - { - this.SigningRequired = signingRequired; - } - - /// - /// Indicates if the user is required to sign PCI questionnaires. If **false**, they do not need to sign any questionnaires. - /// - /// Indicates if the user is required to sign PCI questionnaires. If **false**, they do not need to sign any questionnaires. - [DataMember(Name = "signingRequired", EmitDefaultValue = false)] - public bool? SigningRequired { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CalculatePciStatusResponse {\n"); - sb.Append(" SigningRequired: ").Append(SigningRequired).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CalculatePciStatusResponse); - } - - /// - /// Returns true if CalculatePciStatusResponse instances are equal - /// - /// Instance of CalculatePciStatusResponse to be compared - /// Boolean - public bool Equals(CalculatePciStatusResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.SigningRequired == input.SigningRequired || - this.SigningRequired.Equals(input.SigningRequired) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.SigningRequired.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.cs b/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.cs deleted file mode 100644 index f08119cc5..000000000 --- a/Adyen/Model/LegalEntityManagement/CalculateTermsOfServiceStatusResponse.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CalculateTermsOfServiceStatusResponse - /// - [DataContract(Name = "CalculateTermsOfServiceStatusResponse")] - public partial class CalculateTermsOfServiceStatusResponse : IEquatable, IValidatableObject - { - /// - /// Defines TermsOfServiceTypes - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TermsOfServiceTypesEnum - { - /// - /// Enum AdyenAccount for value: adyenAccount - /// - [EnumMember(Value = "adyenAccount")] - AdyenAccount = 1, - - /// - /// Enum AdyenCapital for value: adyenCapital - /// - [EnumMember(Value = "adyenCapital")] - AdyenCapital = 2, - - /// - /// Enum AdyenCard for value: adyenCard - /// - [EnumMember(Value = "adyenCard")] - AdyenCard = 3, - - /// - /// Enum AdyenChargeCard for value: adyenChargeCard - /// - [EnumMember(Value = "adyenChargeCard")] - AdyenChargeCard = 4, - - /// - /// Enum AdyenForPlatformsAdvanced for value: adyenForPlatformsAdvanced - /// - [EnumMember(Value = "adyenForPlatformsAdvanced")] - AdyenForPlatformsAdvanced = 5, - - /// - /// Enum AdyenForPlatformsManage for value: adyenForPlatformsManage - /// - [EnumMember(Value = "adyenForPlatformsManage")] - AdyenForPlatformsManage = 6, - - /// - /// Enum AdyenFranchisee for value: adyenFranchisee - /// - [EnumMember(Value = "adyenFranchisee")] - AdyenFranchisee = 7, - - /// - /// Enum AdyenIssuing for value: adyenIssuing - /// - [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 8, - - /// - /// Enum AdyenPccr for value: adyenPccr - /// - [EnumMember(Value = "adyenPccr")] - AdyenPccr = 9, - - /// - /// Enum KycOnInvite for value: kycOnInvite - /// - [EnumMember(Value = "kycOnInvite")] - KycOnInvite = 10 - - } - - - - /// - /// The type of Terms of Service that the legal entity needs to accept. If empty, no Terms of Service needs to be accepted. - /// - /// The type of Terms of Service that the legal entity needs to accept. If empty, no Terms of Service needs to be accepted. - [DataMember(Name = "termsOfServiceTypes", EmitDefaultValue = false)] - public List TermsOfServiceTypes { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of Terms of Service that the legal entity needs to accept. If empty, no Terms of Service needs to be accepted.. - public CalculateTermsOfServiceStatusResponse(List termsOfServiceTypes = default(List)) - { - this.TermsOfServiceTypes = termsOfServiceTypes; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CalculateTermsOfServiceStatusResponse {\n"); - sb.Append(" TermsOfServiceTypes: ").Append(TermsOfServiceTypes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CalculateTermsOfServiceStatusResponse); - } - - /// - /// Returns true if CalculateTermsOfServiceStatusResponse instances are equal - /// - /// Instance of CalculateTermsOfServiceStatusResponse to be compared - /// Boolean - public bool Equals(CalculateTermsOfServiceStatusResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.TermsOfServiceTypes == input.TermsOfServiceTypes || - this.TermsOfServiceTypes.SequenceEqual(input.TermsOfServiceTypes) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.TermsOfServiceTypes.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CapabilityProblem.cs b/Adyen/Model/LegalEntityManagement/CapabilityProblem.cs deleted file mode 100644 index a78b3b243..000000000 --- a/Adyen/Model/LegalEntityManagement/CapabilityProblem.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CapabilityProblem - /// - [DataContract(Name = "CapabilityProblem")] - public partial class CapabilityProblem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// entity. - /// verificationErrors. - public CapabilityProblem(CapabilityProblemEntity entity = default(CapabilityProblemEntity), List verificationErrors = default(List)) - { - this.Entity = entity; - this.VerificationErrors = verificationErrors; - } - - /// - /// Gets or Sets Entity - /// - [DataMember(Name = "entity", EmitDefaultValue = false)] - public CapabilityProblemEntity Entity { get; set; } - - /// - /// Gets or Sets VerificationErrors - /// - [DataMember(Name = "verificationErrors", EmitDefaultValue = false)] - public List VerificationErrors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblem {\n"); - sb.Append(" Entity: ").Append(Entity).Append("\n"); - sb.Append(" VerificationErrors: ").Append(VerificationErrors).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblem); - } - - /// - /// Returns true if CapabilityProblem instances are equal - /// - /// Instance of CapabilityProblem to be compared - /// Boolean - public bool Equals(CapabilityProblem input) - { - if (input == null) - { - return false; - } - return - ( - this.Entity == input.Entity || - (this.Entity != null && - this.Entity.Equals(input.Entity)) - ) && - ( - this.VerificationErrors == input.VerificationErrors || - this.VerificationErrors != null && - input.VerificationErrors != null && - this.VerificationErrors.SequenceEqual(input.VerificationErrors) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Entity != null) - { - hashCode = (hashCode * 59) + this.Entity.GetHashCode(); - } - if (this.VerificationErrors != null) - { - hashCode = (hashCode * 59) + this.VerificationErrors.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.cs b/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.cs deleted file mode 100644 index 65d0aaf06..000000000 --- a/Adyen/Model/LegalEntityManagement/CapabilityProblemEntity.cs +++ /dev/null @@ -1,212 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CapabilityProblemEntity - /// - [DataContract(Name = "CapabilityProblemEntity")] - public partial class CapabilityProblemEntity : IEquatable, IValidatableObject - { - /// - /// Defines Type - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Document for value: Document - /// - [EnumMember(Value = "Document")] - Document = 2, - - /// - /// Enum LegalEntity for value: LegalEntity - /// - [EnumMember(Value = "LegalEntity")] - LegalEntity = 3, - - /// - /// Enum Product for value: product - /// - [EnumMember(Value = "product")] - Product = 4 - - } - - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// List of document IDs corresponding to the verification errors from capabilities.. - /// id. - /// owner. - /// type. - public CapabilityProblemEntity(List documents = default(List), string id = default(string), CapabilityProblemEntityRecursive owner = default(CapabilityProblemEntityRecursive), TypeEnum? type = default(TypeEnum?)) - { - this.Documents = documents; - this.Id = id; - this.Owner = owner; - this.Type = type; - } - - /// - /// List of document IDs corresponding to the verification errors from capabilities. - /// - /// List of document IDs corresponding to the verification errors from capabilities. - [DataMember(Name = "documents", EmitDefaultValue = false)] - public List Documents { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Owner - /// - [DataMember(Name = "owner", EmitDefaultValue = false)] - public CapabilityProblemEntityRecursive Owner { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblemEntity {\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblemEntity); - } - - /// - /// Returns true if CapabilityProblemEntity instances are equal - /// - /// Instance of CapabilityProblemEntity to be compared - /// Boolean - public bool Equals(CapabilityProblemEntity input) - { - if (input == null) - { - return false; - } - return - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Owner != null) - { - hashCode = (hashCode * 59) + this.Owner.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.cs b/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.cs deleted file mode 100644 index 3aecb7b92..000000000 --- a/Adyen/Model/LegalEntityManagement/CapabilityProblemEntityRecursive.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CapabilityProblemEntityRecursive - /// - [DataContract(Name = "CapabilityProblemEntity-recursive")] - public partial class CapabilityProblemEntityRecursive : IEquatable, IValidatableObject - { - /// - /// Defines Type - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Document for value: Document - /// - [EnumMember(Value = "Document")] - Document = 2, - - /// - /// Enum LegalEntity for value: LegalEntity - /// - [EnumMember(Value = "LegalEntity")] - LegalEntity = 3, - - /// - /// Enum Product for value: product - /// - [EnumMember(Value = "product")] - Product = 4 - - } - - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// List of document IDs corresponding to the verification errors from capabilities.. - /// id. - /// type. - public CapabilityProblemEntityRecursive(List documents = default(List), string id = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Documents = documents; - this.Id = id; - this.Type = type; - } - - /// - /// List of document IDs corresponding to the verification errors from capabilities. - /// - /// List of document IDs corresponding to the verification errors from capabilities. - [DataMember(Name = "documents", EmitDefaultValue = false)] - public List Documents { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblemEntityRecursive {\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblemEntityRecursive); - } - - /// - /// Returns true if CapabilityProblemEntityRecursive instances are equal - /// - /// Instance of CapabilityProblemEntityRecursive to be compared - /// Boolean - public bool Equals(CapabilityProblemEntityRecursive input) - { - if (input == null) - { - return false; - } - return - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CapabilitySettings.cs b/Adyen/Model/LegalEntityManagement/CapabilitySettings.cs deleted file mode 100644 index 77c6e0adb..000000000 --- a/Adyen/Model/LegalEntityManagement/CapabilitySettings.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CapabilitySettings - /// - [DataContract(Name = "CapabilitySettings")] - public partial class CapabilitySettings : IEquatable, IValidatableObject - { - /// - /// Defines FundingSource - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2, - - /// - /// Enum Prepaid for value: prepaid - /// - [EnumMember(Value = "prepaid")] - Prepaid = 3 - - } - - - - /// - /// The funding source of the card, for example **debit**. - /// - /// The funding source of the card, for example **debit**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public List FundingSource { get; set; } - /// - /// The period when the rule conditions apply. - /// - /// The period when the rule conditions apply. - [JsonConverter(typeof(StringEnumConverter))] - public enum IntervalEnum - { - /// - /// Enum Daily for value: daily - /// - [EnumMember(Value = "daily")] - Daily = 1, - - /// - /// Enum Monthly for value: monthly - /// - [EnumMember(Value = "monthly")] - Monthly = 2, - - /// - /// Enum Weekly for value: weekly - /// - [EnumMember(Value = "weekly")] - Weekly = 3 - - } - - - /// - /// The period when the rule conditions apply. - /// - /// The period when the rule conditions apply. - [DataMember(Name = "interval", EmitDefaultValue = false)] - public IntervalEnum? Interval { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The maximum amount a card holder can spend per industry.. - /// The number of card holders who can use the card.. - /// The funding source of the card, for example **debit**.. - /// The period when the rule conditions apply.. - /// maxAmount. - public CapabilitySettings(Dictionary amountPerIndustry = default(Dictionary), bool? authorizedCardUsers = default(bool?), List fundingSource = default(List), IntervalEnum? interval = default(IntervalEnum?), Amount maxAmount = default(Amount)) - { - this.AmountPerIndustry = amountPerIndustry; - this.AuthorizedCardUsers = authorizedCardUsers; - this.FundingSource = fundingSource; - this.Interval = interval; - this.MaxAmount = maxAmount; - } - - /// - /// The maximum amount a card holder can spend per industry. - /// - /// The maximum amount a card holder can spend per industry. - [DataMember(Name = "amountPerIndustry", EmitDefaultValue = false)] - public Dictionary AmountPerIndustry { get; set; } - - /// - /// The number of card holders who can use the card. - /// - /// The number of card holders who can use the card. - [DataMember(Name = "authorizedCardUsers", EmitDefaultValue = false)] - public bool? AuthorizedCardUsers { get; set; } - - /// - /// Gets or Sets MaxAmount - /// - [DataMember(Name = "maxAmount", EmitDefaultValue = false)] - public Amount MaxAmount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilitySettings {\n"); - sb.Append(" AmountPerIndustry: ").Append(AmountPerIndustry).Append("\n"); - sb.Append(" AuthorizedCardUsers: ").Append(AuthorizedCardUsers).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" Interval: ").Append(Interval).Append("\n"); - sb.Append(" MaxAmount: ").Append(MaxAmount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilitySettings); - } - - /// - /// Returns true if CapabilitySettings instances are equal - /// - /// Instance of CapabilitySettings to be compared - /// Boolean - public bool Equals(CapabilitySettings input) - { - if (input == null) - { - return false; - } - return - ( - this.AmountPerIndustry == input.AmountPerIndustry || - this.AmountPerIndustry != null && - input.AmountPerIndustry != null && - this.AmountPerIndustry.SequenceEqual(input.AmountPerIndustry) - ) && - ( - this.AuthorizedCardUsers == input.AuthorizedCardUsers || - this.AuthorizedCardUsers.Equals(input.AuthorizedCardUsers) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.SequenceEqual(input.FundingSource) - ) && - ( - this.Interval == input.Interval || - this.Interval.Equals(input.Interval) - ) && - ( - this.MaxAmount == input.MaxAmount || - (this.MaxAmount != null && - this.MaxAmount.Equals(input.MaxAmount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AmountPerIndustry != null) - { - hashCode = (hashCode * 59) + this.AmountPerIndustry.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AuthorizedCardUsers.GetHashCode(); - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - hashCode = (hashCode * 59) + this.Interval.GetHashCode(); - if (this.MaxAmount != null) - { - hashCode = (hashCode * 59) + this.MaxAmount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/CheckTaxElectronicDeliveryConsentResponse.cs b/Adyen/Model/LegalEntityManagement/CheckTaxElectronicDeliveryConsentResponse.cs deleted file mode 100644 index fddcfe176..000000000 --- a/Adyen/Model/LegalEntityManagement/CheckTaxElectronicDeliveryConsentResponse.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// CheckTaxElectronicDeliveryConsentResponse - /// - [DataContract(Name = "CheckTaxElectronicDeliveryConsentResponse")] - public partial class CheckTaxElectronicDeliveryConsentResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Consent to electronically deliver tax form US1099-K.. - public CheckTaxElectronicDeliveryConsentResponse(bool? uS1099k = default(bool?)) - { - this.US1099k = uS1099k; - } - - /// - /// Consent to electronically deliver tax form US1099-K. - /// - /// Consent to electronically deliver tax form US1099-K. - [DataMember(Name = "US1099k", EmitDefaultValue = false)] - public bool? US1099k { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckTaxElectronicDeliveryConsentResponse {\n"); - sb.Append(" US1099k: ").Append(US1099k).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckTaxElectronicDeliveryConsentResponse); - } - - /// - /// Returns true if CheckTaxElectronicDeliveryConsentResponse instances are equal - /// - /// Instance of CheckTaxElectronicDeliveryConsentResponse to be compared - /// Boolean - public bool Equals(CheckTaxElectronicDeliveryConsentResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.US1099k == input.US1099k || - this.US1099k.Equals(input.US1099k) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.US1099k.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.cs deleted file mode 100644 index f1d4308ff..000000000 --- a/Adyen/Model/LegalEntityManagement/DKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// DKLocalAccountIdentification - /// - [DataContract(Name = "DKLocalAccountIdentification")] - public partial class DKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **dkLocal** - /// - /// **dkLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DkLocal for value: dkLocal - /// - [EnumMember(Value = "dkLocal")] - DkLocal = 1 - - } - - - /// - /// **dkLocal** - /// - /// **dkLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). (required). - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). (required). - /// **dkLocal** (required) (default to TypeEnum.DkLocal). - public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.DkLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.Type = type; - } - - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). - /// - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DKLocalAccountIdentification); - } - - /// - /// Returns true if DKLocalAccountIdentification instances are equal - /// - /// Instance of DKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(DKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 4.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 4.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 4.", new [] { "BankCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.cs b/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.cs deleted file mode 100644 index f148ebad0..000000000 --- a/Adyen/Model/LegalEntityManagement/DataReviewConfirmationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// DataReviewConfirmationResponse - /// - [DataContract(Name = "DataReviewConfirmationResponse")] - public partial class DataReviewConfirmationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Date when data review was confirmed.. - public DataReviewConfirmationResponse(string dataReviewedAt = default(string)) - { - this.DataReviewedAt = dataReviewedAt; - } - - /// - /// Date when data review was confirmed. - /// - /// Date when data review was confirmed. - [DataMember(Name = "dataReviewedAt", EmitDefaultValue = false)] - public string DataReviewedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DataReviewConfirmationResponse {\n"); - sb.Append(" DataReviewedAt: ").Append(DataReviewedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DataReviewConfirmationResponse); - } - - /// - /// Returns true if DataReviewConfirmationResponse instances are equal - /// - /// Instance of DataReviewConfirmationResponse to be compared - /// Boolean - public bool Equals(DataReviewConfirmationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DataReviewedAt == input.DataReviewedAt || - (this.DataReviewedAt != null && - this.DataReviewedAt.Equals(input.DataReviewedAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DataReviewedAt != null) - { - hashCode = (hashCode * 59) + this.DataReviewedAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Document.cs b/Adyen/Model/LegalEntityManagement/Document.cs deleted file mode 100644 index cdf297268..000000000 --- a/Adyen/Model/LegalEntityManagement/Document.cs +++ /dev/null @@ -1,483 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Document - /// - [DataContract(Name = "Document")] - public partial class Document : IEquatable, IValidatableObject - { - /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, **proofOfDirector**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, **proofOfDirector**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankStatement for value: bankStatement - /// - [EnumMember(Value = "bankStatement")] - BankStatement = 1, - - /// - /// Enum DriversLicense for value: driversLicense - /// - [EnumMember(Value = "driversLicense")] - DriversLicense = 2, - - /// - /// Enum IdentityCard for value: identityCard - /// - [EnumMember(Value = "identityCard")] - IdentityCard = 3, - - /// - /// Enum NationalIdNumber for value: nationalIdNumber - /// - [EnumMember(Value = "nationalIdNumber")] - NationalIdNumber = 4, - - /// - /// Enum Passport for value: passport - /// - [EnumMember(Value = "passport")] - Passport = 5, - - /// - /// Enum ProofOfAddress for value: proofOfAddress - /// - [EnumMember(Value = "proofOfAddress")] - ProofOfAddress = 6, - - /// - /// Enum ProofOfNationalIdNumber for value: proofOfNationalIdNumber - /// - [EnumMember(Value = "proofOfNationalIdNumber")] - ProofOfNationalIdNumber = 7, - - /// - /// Enum ProofOfResidency for value: proofOfResidency - /// - [EnumMember(Value = "proofOfResidency")] - ProofOfResidency = 8, - - /// - /// Enum RegistrationDocument for value: registrationDocument - /// - [EnumMember(Value = "registrationDocument")] - RegistrationDocument = 9, - - /// - /// Enum VatDocument for value: vatDocument - /// - [EnumMember(Value = "vatDocument")] - VatDocument = 10, - - /// - /// Enum ProofOfOrganizationTaxInfo for value: proofOfOrganizationTaxInfo - /// - [EnumMember(Value = "proofOfOrganizationTaxInfo")] - ProofOfOrganizationTaxInfo = 11, - - /// - /// Enum ProofOfIndividualTaxId for value: proofOfIndividualTaxId - /// - [EnumMember(Value = "proofOfIndividualTaxId")] - ProofOfIndividualTaxId = 12, - - /// - /// Enum ProofOfOwnership for value: proofOfOwnership - /// - [EnumMember(Value = "proofOfOwnership")] - ProofOfOwnership = 13, - - /// - /// Enum ProofOfSignatory for value: proofOfSignatory - /// - [EnumMember(Value = "proofOfSignatory")] - ProofOfSignatory = 14, - - /// - /// Enum LiveSelfie for value: liveSelfie - /// - [EnumMember(Value = "liveSelfie")] - LiveSelfie = 15, - - /// - /// Enum ProofOfIndustry for value: proofOfIndustry - /// - [EnumMember(Value = "proofOfIndustry")] - ProofOfIndustry = 16, - - /// - /// Enum ConstitutionalDocument for value: constitutionalDocument - /// - [EnumMember(Value = "constitutionalDocument")] - ConstitutionalDocument = 17, - - /// - /// Enum ProofOfFundingOrWealthSource for value: proofOfFundingOrWealthSource - /// - [EnumMember(Value = "proofOfFundingOrWealthSource")] - ProofOfFundingOrWealthSource = 18, - - /// - /// Enum ProofOfRelationship for value: proofOfRelationship - /// - [EnumMember(Value = "proofOfRelationship")] - ProofOfRelationship = 19, - - /// - /// Enum ProofOfDirector for value: proofOfDirector - /// - [EnumMember(Value = "proofOfDirector")] - ProofOfDirector = 20 - - } - - - /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, **proofOfDirector**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - /// - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, **proofOfDirector**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Document() { } - /// - /// Initializes a new instance of the class. - /// - /// attachment. - /// Array that contains the document. The array supports multiple attachments for uploading different sides or pages of a document.. - /// Your description for the document. (required). - /// The expiry date of the document, in YYYY-MM-DD format.. - /// The filename of the document.. - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**.. - /// The state or province where the document was issued (AU only).. - /// The number in the document.. - /// owner. - /// Type of document, used when providing an ID number or uploading a document. The possible values depend on the legal entity type. * For **organization**, the `type` values can be **proofOfAddress**, **registrationDocument**, **vatDocument**, **proofOfOrganizationTaxInfo**, **proofOfOwnership**, **proofOfIndustry**, **proofOfSignatory**, **proofOfDirector**, or **proofOfFundingOrWealthSource**. * For **individual**, the `type` values can be **identityCard**, **driversLicense**, **passport**, **liveSelfie**, **proofOfNationalIdNumber**, **proofOfResidency**, **proofOfIndustry**, **proofOfIndividualTaxId**, **proofOfFundingOrWealthSource** or **proofOfRelationship**. * For **soleProprietorship**, the `type` values can be **constitutionalDocument**, **proofOfAddress**, or **proofOfIndustry**. * For **trust**, the `type` value is **constitutionalDocument**. * For **unincorporatedPartnership**, the `type` value is **constitutionalDocument**. * Use **bankStatement** to upload documents for a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id). (required). - public Document(Attachment attachment = default(Attachment), List attachments = default(List), string description = default(string), string expiryDate = default(string), string fileName = default(string), string issuerCountry = default(string), string issuerState = default(string), string number = default(string), OwnerEntity owner = default(OwnerEntity), TypeEnum type = default(TypeEnum)) - { - this.Description = description; - this.Type = type; - this.Attachment = attachment; - this.Attachments = attachments; - this.ExpiryDate = expiryDate; - this.FileName = fileName; - this.IssuerCountry = issuerCountry; - this.IssuerState = issuerState; - this.Number = number; - this.Owner = owner; - } - - /// - /// Gets or Sets Attachment - /// - [DataMember(Name = "attachment", EmitDefaultValue = false)] - public Attachment Attachment { get; set; } - - /// - /// Array that contains the document. The array supports multiple attachments for uploading different sides or pages of a document. - /// - /// Array that contains the document. The array supports multiple attachments for uploading different sides or pages of a document. - [DataMember(Name = "attachments", EmitDefaultValue = false)] - public List Attachments { get; set; } - - /// - /// The creation date of the document. - /// - /// The creation date of the document. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; private set; } - - /// - /// Your description for the document. - /// - /// Your description for the document. - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The expiry date of the document, in YYYY-MM-DD format. - /// - /// The expiry date of the document, in YYYY-MM-DD format. - [DataMember(Name = "expiryDate", EmitDefaultValue = false)] - [Obsolete("Deprecated since Legal Entity Management API v1.")] - public string ExpiryDate { get; set; } - - /// - /// The filename of the document. - /// - /// The filename of the document. - [DataMember(Name = "fileName", EmitDefaultValue = false)] - public string FileName { get; set; } - - /// - /// The unique identifier of the document. - /// - /// The unique identifier of the document. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. - [DataMember(Name = "issuerCountry", EmitDefaultValue = false)] - [Obsolete("Deprecated since Legal Entity Management API v1.")] - public string IssuerCountry { get; set; } - - /// - /// The state or province where the document was issued (AU only). - /// - /// The state or province where the document was issued (AU only). - [DataMember(Name = "issuerState", EmitDefaultValue = false)] - [Obsolete("Deprecated since Legal Entity Management API v1.")] - public string IssuerState { get; set; } - - /// - /// The modification date of the document. - /// - /// The modification date of the document. - [DataMember(Name = "modificationDate", EmitDefaultValue = false)] - public DateTime ModificationDate { get; private set; } - - /// - /// The number in the document. - /// - /// The number in the document. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Gets or Sets Owner - /// - [DataMember(Name = "owner", EmitDefaultValue = false)] - public OwnerEntity Owner { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Document {\n"); - sb.Append(" Attachment: ").Append(Attachment).Append("\n"); - sb.Append(" Attachments: ").Append(Attachments).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ExpiryDate: ").Append(ExpiryDate).Append("\n"); - sb.Append(" FileName: ").Append(FileName).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" IssuerCountry: ").Append(IssuerCountry).Append("\n"); - sb.Append(" IssuerState: ").Append(IssuerState).Append("\n"); - sb.Append(" ModificationDate: ").Append(ModificationDate).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Document); - } - - /// - /// Returns true if Document instances are equal - /// - /// Instance of Document to be compared - /// Boolean - public bool Equals(Document input) - { - if (input == null) - { - return false; - } - return - ( - this.Attachment == input.Attachment || - (this.Attachment != null && - this.Attachment.Equals(input.Attachment)) - ) && - ( - this.Attachments == input.Attachments || - this.Attachments != null && - input.Attachments != null && - this.Attachments.SequenceEqual(input.Attachments) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExpiryDate == input.ExpiryDate || - (this.ExpiryDate != null && - this.ExpiryDate.Equals(input.ExpiryDate)) - ) && - ( - this.FileName == input.FileName || - (this.FileName != null && - this.FileName.Equals(input.FileName)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IssuerCountry == input.IssuerCountry || - (this.IssuerCountry != null && - this.IssuerCountry.Equals(input.IssuerCountry)) - ) && - ( - this.IssuerState == input.IssuerState || - (this.IssuerState != null && - this.IssuerState.Equals(input.IssuerState)) - ) && - ( - this.ModificationDate == input.ModificationDate || - (this.ModificationDate != null && - this.ModificationDate.Equals(input.ModificationDate)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Attachment != null) - { - hashCode = (hashCode * 59) + this.Attachment.GetHashCode(); - } - if (this.Attachments != null) - { - hashCode = (hashCode * 59) + this.Attachments.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExpiryDate != null) - { - hashCode = (hashCode * 59) + this.ExpiryDate.GetHashCode(); - } - if (this.FileName != null) - { - hashCode = (hashCode * 59) + this.FileName.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IssuerCountry != null) - { - hashCode = (hashCode * 59) + this.IssuerCountry.GetHashCode(); - } - if (this.IssuerState != null) - { - hashCode = (hashCode * 59) + this.IssuerState.GetHashCode(); - } - if (this.ModificationDate != null) - { - hashCode = (hashCode * 59) + this.ModificationDate.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.Owner != null) - { - hashCode = (hashCode * 59) + this.Owner.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/DocumentPage.cs b/Adyen/Model/LegalEntityManagement/DocumentPage.cs deleted file mode 100644 index 17b22256d..000000000 --- a/Adyen/Model/LegalEntityManagement/DocumentPage.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// DocumentPage - /// - [DataContract(Name = "DocumentPage")] - public partial class DocumentPage : IEquatable, IValidatableObject - { - /// - /// Defines Type - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BACK for value: BACK - /// - [EnumMember(Value = "BACK")] - BACK = 1, - - /// - /// Enum FRONT for value: FRONT - /// - [EnumMember(Value = "FRONT")] - FRONT = 2, - - /// - /// Enum UNDEFINED for value: UNDEFINED - /// - [EnumMember(Value = "UNDEFINED")] - UNDEFINED = 3 - - } - - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// pageName. - /// pageNumber. - /// type. - public DocumentPage(string pageName = default(string), int? pageNumber = default(int?), TypeEnum? type = default(TypeEnum?)) - { - this.PageName = pageName; - this.PageNumber = pageNumber; - this.Type = type; - } - - /// - /// Gets or Sets PageName - /// - [DataMember(Name = "pageName", EmitDefaultValue = false)] - public string PageName { get; set; } - - /// - /// Gets or Sets PageNumber - /// - [DataMember(Name = "pageNumber", EmitDefaultValue = false)] - public int? PageNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DocumentPage {\n"); - sb.Append(" PageName: ").Append(PageName).Append("\n"); - sb.Append(" PageNumber: ").Append(PageNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DocumentPage); - } - - /// - /// Returns true if DocumentPage instances are equal - /// - /// Instance of DocumentPage to be compared - /// Boolean - public bool Equals(DocumentPage input) - { - if (input == null) - { - return false; - } - return - ( - this.PageName == input.PageName || - (this.PageName != null && - this.PageName.Equals(input.PageName)) - ) && - ( - this.PageNumber == input.PageNumber || - this.PageNumber.Equals(input.PageNumber) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PageName != null) - { - hashCode = (hashCode * 59) + this.PageName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PageNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/DocumentReference.cs b/Adyen/Model/LegalEntityManagement/DocumentReference.cs deleted file mode 100644 index 861199357..000000000 --- a/Adyen/Model/LegalEntityManagement/DocumentReference.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// DocumentReference - /// - [DataContract(Name = "DocumentReference")] - public partial class DocumentReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Identifies whether the document is active and used for checks.. - /// Your description for the document.. - /// Document name.. - /// The unique identifier of the resource.. - /// The modification date of the document.. - /// List of document pages. - /// Type of document, used when providing an ID number or uploading a document.. - public DocumentReference(bool? active = default(bool?), string description = default(string), string fileName = default(string), string id = default(string), DateTime modificationDate = default(DateTime), List pages = default(List), string type = default(string)) - { - this.Active = active; - this.Description = description; - this.FileName = fileName; - this.Id = id; - this.ModificationDate = modificationDate; - this.Pages = pages; - this.Type = type; - } - - /// - /// Identifies whether the document is active and used for checks. - /// - /// Identifies whether the document is active and used for checks. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Your description for the document. - /// - /// Your description for the document. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Document name. - /// - /// Document name. - [DataMember(Name = "fileName", EmitDefaultValue = false)] - public string FileName { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The modification date of the document. - /// - /// The modification date of the document. - [DataMember(Name = "modificationDate", EmitDefaultValue = false)] - public DateTime ModificationDate { get; set; } - - /// - /// List of document pages - /// - /// List of document pages - [DataMember(Name = "pages", EmitDefaultValue = false)] - public List Pages { get; set; } - - /// - /// Type of document, used when providing an ID number or uploading a document. - /// - /// Type of document, used when providing an ID number or uploading a document. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DocumentReference {\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" FileName: ").Append(FileName).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" ModificationDate: ").Append(ModificationDate).Append("\n"); - sb.Append(" Pages: ").Append(Pages).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DocumentReference); - } - - /// - /// Returns true if DocumentReference instances are equal - /// - /// Instance of DocumentReference to be compared - /// Boolean - public bool Equals(DocumentReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.FileName == input.FileName || - (this.FileName != null && - this.FileName.Equals(input.FileName)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ModificationDate == input.ModificationDate || - (this.ModificationDate != null && - this.ModificationDate.Equals(input.ModificationDate)) - ) && - ( - this.Pages == input.Pages || - this.Pages != null && - input.Pages != null && - this.Pages.SequenceEqual(input.Pages) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.FileName != null) - { - hashCode = (hashCode * 59) + this.FileName.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ModificationDate != null) - { - hashCode = (hashCode * 59) + this.ModificationDate.GetHashCode(); - } - if (this.Pages != null) - { - hashCode = (hashCode * 59) + this.Pages.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/EntityReference.cs b/Adyen/Model/LegalEntityManagement/EntityReference.cs deleted file mode 100644 index 0d47780cb..000000000 --- a/Adyen/Model/LegalEntityManagement/EntityReference.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// EntityReference - /// - [DataContract(Name = "EntityReference")] - public partial class EntityReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the resource.. - public EntityReference(string id = default(string)) - { - this.Id = id; - } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EntityReference {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EntityReference); - } - - /// - /// Returns true if EntityReference instances are equal - /// - /// Instance of EntityReference to be compared - /// Boolean - public bool Equals(EntityReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/FinancialReport.cs b/Adyen/Model/LegalEntityManagement/FinancialReport.cs deleted file mode 100644 index 9a99c3c0f..000000000 --- a/Adyen/Model/LegalEntityManagement/FinancialReport.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// FinancialReport - /// - [DataContract(Name = "FinancialReport")] - public partial class FinancialReport : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FinancialReport() { } - /// - /// Initializes a new instance of the class. - /// - /// The annual turnover of the business.. - /// The balance sheet total of the business.. - /// The currency used for the annual turnover, balance sheet total, and net assets.. - /// The date the financial data were provided, in YYYY-MM-DD format. (required). - /// The number of employees of the business.. - /// The net assets of the business.. - public FinancialReport(string annualTurnover = default(string), string balanceSheetTotal = default(string), string currencyOfFinancialData = default(string), string dateOfFinancialData = default(string), string employeeCount = default(string), string netAssets = default(string)) - { - this.DateOfFinancialData = dateOfFinancialData; - this.AnnualTurnover = annualTurnover; - this.BalanceSheetTotal = balanceSheetTotal; - this.CurrencyOfFinancialData = currencyOfFinancialData; - this.EmployeeCount = employeeCount; - this.NetAssets = netAssets; - } - - /// - /// The annual turnover of the business. - /// - /// The annual turnover of the business. - [DataMember(Name = "annualTurnover", EmitDefaultValue = false)] - public string AnnualTurnover { get; set; } - - /// - /// The balance sheet total of the business. - /// - /// The balance sheet total of the business. - [DataMember(Name = "balanceSheetTotal", EmitDefaultValue = false)] - public string BalanceSheetTotal { get; set; } - - /// - /// The currency used for the annual turnover, balance sheet total, and net assets. - /// - /// The currency used for the annual turnover, balance sheet total, and net assets. - [DataMember(Name = "currencyOfFinancialData", EmitDefaultValue = false)] - public string CurrencyOfFinancialData { get; set; } - - /// - /// The date the financial data were provided, in YYYY-MM-DD format. - /// - /// The date the financial data were provided, in YYYY-MM-DD format. - [DataMember(Name = "dateOfFinancialData", IsRequired = true, EmitDefaultValue = false)] - public string DateOfFinancialData { get; set; } - - /// - /// The number of employees of the business. - /// - /// The number of employees of the business. - [DataMember(Name = "employeeCount", EmitDefaultValue = false)] - public string EmployeeCount { get; set; } - - /// - /// The net assets of the business. - /// - /// The net assets of the business. - [DataMember(Name = "netAssets", EmitDefaultValue = false)] - public string NetAssets { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FinancialReport {\n"); - sb.Append(" AnnualTurnover: ").Append(AnnualTurnover).Append("\n"); - sb.Append(" BalanceSheetTotal: ").Append(BalanceSheetTotal).Append("\n"); - sb.Append(" CurrencyOfFinancialData: ").Append(CurrencyOfFinancialData).Append("\n"); - sb.Append(" DateOfFinancialData: ").Append(DateOfFinancialData).Append("\n"); - sb.Append(" EmployeeCount: ").Append(EmployeeCount).Append("\n"); - sb.Append(" NetAssets: ").Append(NetAssets).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FinancialReport); - } - - /// - /// Returns true if FinancialReport instances are equal - /// - /// Instance of FinancialReport to be compared - /// Boolean - public bool Equals(FinancialReport input) - { - if (input == null) - { - return false; - } - return - ( - this.AnnualTurnover == input.AnnualTurnover || - (this.AnnualTurnover != null && - this.AnnualTurnover.Equals(input.AnnualTurnover)) - ) && - ( - this.BalanceSheetTotal == input.BalanceSheetTotal || - (this.BalanceSheetTotal != null && - this.BalanceSheetTotal.Equals(input.BalanceSheetTotal)) - ) && - ( - this.CurrencyOfFinancialData == input.CurrencyOfFinancialData || - (this.CurrencyOfFinancialData != null && - this.CurrencyOfFinancialData.Equals(input.CurrencyOfFinancialData)) - ) && - ( - this.DateOfFinancialData == input.DateOfFinancialData || - (this.DateOfFinancialData != null && - this.DateOfFinancialData.Equals(input.DateOfFinancialData)) - ) && - ( - this.EmployeeCount == input.EmployeeCount || - (this.EmployeeCount != null && - this.EmployeeCount.Equals(input.EmployeeCount)) - ) && - ( - this.NetAssets == input.NetAssets || - (this.NetAssets != null && - this.NetAssets.Equals(input.NetAssets)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AnnualTurnover != null) - { - hashCode = (hashCode * 59) + this.AnnualTurnover.GetHashCode(); - } - if (this.BalanceSheetTotal != null) - { - hashCode = (hashCode * 59) + this.BalanceSheetTotal.GetHashCode(); - } - if (this.CurrencyOfFinancialData != null) - { - hashCode = (hashCode * 59) + this.CurrencyOfFinancialData.GetHashCode(); - } - if (this.DateOfFinancialData != null) - { - hashCode = (hashCode * 59) + this.DateOfFinancialData.GetHashCode(); - } - if (this.EmployeeCount != null) - { - hashCode = (hashCode * 59) + this.EmployeeCount.GetHashCode(); - } - if (this.NetAssets != null) - { - hashCode = (hashCode * 59) + this.NetAssets.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Financier.cs b/Adyen/Model/LegalEntityManagement/Financier.cs deleted file mode 100644 index 3a137ae40..000000000 --- a/Adyen/Model/LegalEntityManagement/Financier.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Financier - /// - [DataContract(Name = "Financier")] - public partial class Financier : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Financier() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// The financier's first name. (required). - /// The financier's last name. (required). - /// The city and country/region where the financier is currently located. For example: Chicago, USA (required). - public Financier(Amount amount = default(Amount), string firstName = default(string), string lastName = default(string), string location = default(string)) - { - this.Amount = amount; - this.FirstName = firstName; - this.LastName = lastName; - this.Location = location; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The financier's first name. - /// - /// The financier's first name. - [DataMember(Name = "firstName", IsRequired = true, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The financier's last name. - /// - /// The financier's last name. - [DataMember(Name = "lastName", IsRequired = true, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// The city and country/region where the financier is currently located. For example: Chicago, USA - /// - /// The city and country/region where the financier is currently located. For example: Chicago, USA - [DataMember(Name = "location", IsRequired = true, EmitDefaultValue = false)] - public string Location { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Financier {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Location: ").Append(Location).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Financier); - } - - /// - /// Returns true if Financier instances are equal - /// - /// Instance of Financier to be compared - /// Boolean - public bool Equals(Financier input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Location == input.Location || - (this.Location != null && - this.Location.Equals(input.Location)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.Location != null) - { - hashCode = (hashCode * 59) + this.Location.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.cs b/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.cs deleted file mode 100644 index 37b2afc78..000000000 --- a/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionRequest.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// GeneratePciDescriptionRequest - /// - [DataContract(Name = "GeneratePciDescriptionRequest")] - public partial class GeneratePciDescriptionRequest : IEquatable, IValidatableObject - { - /// - /// Defines AdditionalSalesChannels - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AdditionalSalesChannelsEnum - { - /// - /// Enum ECommerce for value: eCommerce - /// - [EnumMember(Value = "eCommerce")] - ECommerce = 1, - - /// - /// Enum EcomMoto for value: ecomMoto - /// - [EnumMember(Value = "ecomMoto")] - EcomMoto = 2, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 3, - - /// - /// Enum PosMoto for value: posMoto - /// - [EnumMember(Value = "posMoto")] - PosMoto = 4 - - } - - - - /// - /// An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** - /// - /// An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** - [DataMember(Name = "additionalSalesChannels", EmitDefaultValue = false)] - public List AdditionalSalesChannels { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// An array of additional sales channels to generate PCI questionnaires. Include the relevant sales channels if you need your user to sign PCI questionnaires. Not required if you [create stores](https://docs.adyen.com/platforms) and [add payment methods](https://docs.adyen.com/adyen-for-platforms-model) before you generate the questionnaires. Possible values: * **eCommerce** * **pos** * **ecomMoto** * **posMoto** . - /// Sets the language of the PCI questionnaire. Its value is a two-character [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code, for example, **en**.. - public GeneratePciDescriptionRequest(List additionalSalesChannels = default(List), string language = default(string)) - { - this.AdditionalSalesChannels = additionalSalesChannels; - this.Language = language; - } - - /// - /// Sets the language of the PCI questionnaire. Its value is a two-character [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code, for example, **en**. - /// - /// Sets the language of the PCI questionnaire. Its value is a two-character [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code, for example, **en**. - [DataMember(Name = "language", EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GeneratePciDescriptionRequest {\n"); - sb.Append(" AdditionalSalesChannels: ").Append(AdditionalSalesChannels).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GeneratePciDescriptionRequest); - } - - /// - /// Returns true if GeneratePciDescriptionRequest instances are equal - /// - /// Instance of GeneratePciDescriptionRequest to be compared - /// Boolean - public bool Equals(GeneratePciDescriptionRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalSalesChannels == input.AdditionalSalesChannels || - this.AdditionalSalesChannels.SequenceEqual(input.AdditionalSalesChannels) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AdditionalSalesChannels.GetHashCode(); - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.cs b/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.cs deleted file mode 100644 index 0cf1f1eb8..000000000 --- a/Adyen/Model/LegalEntityManagement/GeneratePciDescriptionResponse.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// GeneratePciDescriptionResponse - /// - [DataContract(Name = "GeneratePciDescriptionResponse")] - public partial class GeneratePciDescriptionResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The generated questionnaires in a base64 encoded format.. - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code for the questionnaire. For example, **en**.. - /// The array of Adyen-generated unique identifiers for the questionnaires. If empty, the user is not required to sign questionnaires.. - public GeneratePciDescriptionResponse(byte[] content = default(byte[]), string language = default(string), List pciTemplateReferences = default(List)) - { - this.Content = content; - this.Language = language; - this.PciTemplateReferences = pciTemplateReferences; - } - - /// - /// The generated questionnaires in a base64 encoded format. - /// - /// The generated questionnaires in a base64 encoded format. - [DataMember(Name = "content", EmitDefaultValue = false)] - public byte[] Content { get; set; } - - /// - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code for the questionnaire. For example, **en**. - /// - /// The two-letter [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code for the questionnaire. For example, **en**. - [DataMember(Name = "language", EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// The array of Adyen-generated unique identifiers for the questionnaires. If empty, the user is not required to sign questionnaires. - /// - /// The array of Adyen-generated unique identifiers for the questionnaires. If empty, the user is not required to sign questionnaires. - [DataMember(Name = "pciTemplateReferences", EmitDefaultValue = false)] - public List PciTemplateReferences { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GeneratePciDescriptionResponse {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" PciTemplateReferences: ").Append(PciTemplateReferences).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GeneratePciDescriptionResponse); - } - - /// - /// Returns true if GeneratePciDescriptionResponse instances are equal - /// - /// Instance of GeneratePciDescriptionResponse to be compared - /// Boolean - public bool Equals(GeneratePciDescriptionResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.PciTemplateReferences == input.PciTemplateReferences || - this.PciTemplateReferences != null && - input.PciTemplateReferences != null && - this.PciTemplateReferences.SequenceEqual(input.PciTemplateReferences) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.PciTemplateReferences != null) - { - hashCode = (hashCode * 59) + this.PciTemplateReferences.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/GetAcceptedTermsOfServiceDocumentResponse.cs b/Adyen/Model/LegalEntityManagement/GetAcceptedTermsOfServiceDocumentResponse.cs deleted file mode 100644 index 5c898792d..000000000 --- a/Adyen/Model/LegalEntityManagement/GetAcceptedTermsOfServiceDocumentResponse.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// GetAcceptedTermsOfServiceDocumentResponse - /// - [DataContract(Name = "GetAcceptedTermsOfServiceDocumentResponse")] - public partial class GetAcceptedTermsOfServiceDocumentResponse : IEquatable, IValidatableObject - { - /// - /// The format of the Terms of Service document. - /// - /// The format of the Terms of Service document. - [JsonConverter(typeof(StringEnumConverter))] - public enum TermsOfServiceDocumentFormatEnum - { - /// - /// Enum JSON for value: JSON - /// - [EnumMember(Value = "JSON")] - JSON = 1, - - /// - /// Enum PDF for value: PDF - /// - [EnumMember(Value = "PDF")] - PDF = 2, - - /// - /// Enum TXT for value: TXT - /// - [EnumMember(Value = "TXT")] - TXT = 3 - - } - - - /// - /// The format of the Terms of Service document. - /// - /// The format of the Terms of Service document. - [DataMember(Name = "termsOfServiceDocumentFormat", EmitDefaultValue = false)] - public TermsOfServiceDocumentFormatEnum? TermsOfServiceDocumentFormat { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The accepted Terms of Service document in the requested format represented as a Base64-encoded bytes array.. - /// The unique identifier of the legal entity.. - /// An Adyen-generated reference for the accepted Terms of Service.. - /// The format of the Terms of Service document.. - public GetAcceptedTermsOfServiceDocumentResponse(byte[] document = default(byte[]), string id = default(string), string termsOfServiceAcceptanceReference = default(string), TermsOfServiceDocumentFormatEnum? termsOfServiceDocumentFormat = default(TermsOfServiceDocumentFormatEnum?)) - { - this.Document = document; - this.Id = id; - this.TermsOfServiceAcceptanceReference = termsOfServiceAcceptanceReference; - this.TermsOfServiceDocumentFormat = termsOfServiceDocumentFormat; - } - - /// - /// The accepted Terms of Service document in the requested format represented as a Base64-encoded bytes array. - /// - /// The accepted Terms of Service document in the requested format represented as a Base64-encoded bytes array. - [DataMember(Name = "document", EmitDefaultValue = false)] - public byte[] Document { get; set; } - - /// - /// The unique identifier of the legal entity. - /// - /// The unique identifier of the legal entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// An Adyen-generated reference for the accepted Terms of Service. - /// - /// An Adyen-generated reference for the accepted Terms of Service. - [DataMember(Name = "termsOfServiceAcceptanceReference", EmitDefaultValue = false)] - public string TermsOfServiceAcceptanceReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetAcceptedTermsOfServiceDocumentResponse {\n"); - sb.Append(" Document: ").Append(Document).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" TermsOfServiceAcceptanceReference: ").Append(TermsOfServiceAcceptanceReference).Append("\n"); - sb.Append(" TermsOfServiceDocumentFormat: ").Append(TermsOfServiceDocumentFormat).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetAcceptedTermsOfServiceDocumentResponse); - } - - /// - /// Returns true if GetAcceptedTermsOfServiceDocumentResponse instances are equal - /// - /// Instance of GetAcceptedTermsOfServiceDocumentResponse to be compared - /// Boolean - public bool Equals(GetAcceptedTermsOfServiceDocumentResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Document == input.Document || - (this.Document != null && - this.Document.Equals(input.Document)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.TermsOfServiceAcceptanceReference == input.TermsOfServiceAcceptanceReference || - (this.TermsOfServiceAcceptanceReference != null && - this.TermsOfServiceAcceptanceReference.Equals(input.TermsOfServiceAcceptanceReference)) - ) && - ( - this.TermsOfServiceDocumentFormat == input.TermsOfServiceDocumentFormat || - this.TermsOfServiceDocumentFormat.Equals(input.TermsOfServiceDocumentFormat) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Document != null) - { - hashCode = (hashCode * 59) + this.Document.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.TermsOfServiceAcceptanceReference != null) - { - hashCode = (hashCode * 59) + this.TermsOfServiceAcceptanceReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TermsOfServiceDocumentFormat.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.cs b/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.cs deleted file mode 100644 index 6013f6c7d..000000000 --- a/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireInfosResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// GetPciQuestionnaireInfosResponse - /// - [DataContract(Name = "GetPciQuestionnaireInfosResponse")] - public partial class GetPciQuestionnaireInfosResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Information about the signed PCI questionnaires.. - public GetPciQuestionnaireInfosResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// Information about the signed PCI questionnaires. - /// - /// Information about the signed PCI questionnaires. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetPciQuestionnaireInfosResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetPciQuestionnaireInfosResponse); - } - - /// - /// Returns true if GetPciQuestionnaireInfosResponse instances are equal - /// - /// Instance of GetPciQuestionnaireInfosResponse to be compared - /// Boolean - public bool Equals(GetPciQuestionnaireInfosResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.cs b/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.cs deleted file mode 100644 index 15220c9b5..000000000 --- a/Adyen/Model/LegalEntityManagement/GetPciQuestionnaireResponse.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// GetPciQuestionnaireResponse - /// - [DataContract(Name = "GetPciQuestionnaireResponse")] - public partial class GetPciQuestionnaireResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The generated questionnaire in a base64 encoded format.. - /// The date the questionnaire was created, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00. - /// The unique identifier of the signed questionnaire.. - /// The expiration date of the questionnaire, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00. - public GetPciQuestionnaireResponse(byte[] content = default(byte[]), DateTime createdAt = default(DateTime), string id = default(string), DateTime validUntil = default(DateTime)) - { - this.Content = content; - this.CreatedAt = createdAt; - this.Id = id; - this.ValidUntil = validUntil; - } - - /// - /// The generated questionnaire in a base64 encoded format. - /// - /// The generated questionnaire in a base64 encoded format. - [DataMember(Name = "content", EmitDefaultValue = false)] - public byte[] Content { get; set; } - - /// - /// The date the questionnaire was created, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00 - /// - /// The date the questionnaire was created, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00 - [DataMember(Name = "createdAt", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// The unique identifier of the signed questionnaire. - /// - /// The unique identifier of the signed questionnaire. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The expiration date of the questionnaire, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00 - /// - /// The expiration date of the questionnaire, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00 - [DataMember(Name = "validUntil", EmitDefaultValue = false)] - public DateTime ValidUntil { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetPciQuestionnaireResponse {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" ValidUntil: ").Append(ValidUntil).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetPciQuestionnaireResponse); - } - - /// - /// Returns true if GetPciQuestionnaireResponse instances are equal - /// - /// Instance of GetPciQuestionnaireResponse to be compared - /// Boolean - public bool Equals(GetPciQuestionnaireResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ValidUntil == input.ValidUntil || - (this.ValidUntil != null && - this.ValidUntil.Equals(input.ValidUntil)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ValidUntil != null) - { - hashCode = (hashCode * 59) + this.ValidUntil.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.cs b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.cs deleted file mode 100644 index 3d2b70681..000000000 --- a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceAcceptanceInfosResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// GetTermsOfServiceAcceptanceInfosResponse - /// - [DataContract(Name = "GetTermsOfServiceAcceptanceInfosResponse")] - public partial class GetTermsOfServiceAcceptanceInfosResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The Terms of Service acceptance information.. - public GetTermsOfServiceAcceptanceInfosResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// The Terms of Service acceptance information. - /// - /// The Terms of Service acceptance information. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTermsOfServiceAcceptanceInfosResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTermsOfServiceAcceptanceInfosResponse); - } - - /// - /// Returns true if GetTermsOfServiceAcceptanceInfosResponse instances are equal - /// - /// Instance of GetTermsOfServiceAcceptanceInfosResponse to be compared - /// Boolean - public bool Equals(GetTermsOfServiceAcceptanceInfosResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs deleted file mode 100644 index 8e9acb58d..000000000 --- a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentRequest.cs +++ /dev/null @@ -1,237 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// GetTermsOfServiceDocumentRequest - /// - [DataContract(Name = "GetTermsOfServiceDocumentRequest")] - public partial class GetTermsOfServiceDocumentRequest : IEquatable, IValidatableObject - { - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AdyenAccount for value: adyenAccount - /// - [EnumMember(Value = "adyenAccount")] - AdyenAccount = 1, - - /// - /// Enum AdyenCapital for value: adyenCapital - /// - [EnumMember(Value = "adyenCapital")] - AdyenCapital = 2, - - /// - /// Enum AdyenCard for value: adyenCard - /// - [EnumMember(Value = "adyenCard")] - AdyenCard = 3, - - /// - /// Enum AdyenChargeCard for value: adyenChargeCard - /// - [EnumMember(Value = "adyenChargeCard")] - AdyenChargeCard = 4, - - /// - /// Enum AdyenForPlatformsAdvanced for value: adyenForPlatformsAdvanced - /// - [EnumMember(Value = "adyenForPlatformsAdvanced")] - AdyenForPlatformsAdvanced = 5, - - /// - /// Enum AdyenForPlatformsManage for value: adyenForPlatformsManage - /// - [EnumMember(Value = "adyenForPlatformsManage")] - AdyenForPlatformsManage = 6, - - /// - /// Enum AdyenFranchisee for value: adyenFranchisee - /// - [EnumMember(Value = "adyenFranchisee")] - AdyenFranchisee = 7, - - /// - /// Enum AdyenIssuing for value: adyenIssuing - /// - [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 8, - - /// - /// Enum AdyenPccr for value: adyenPccr - /// - [EnumMember(Value = "adyenPccr")] - AdyenPccr = 9, - - /// - /// Enum KycOnInvite for value: kycOnInvite - /// - [EnumMember(Value = "kycOnInvite")] - KycOnInvite = 10 - - } - - - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetTermsOfServiceDocumentRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. (required). - /// The requested format for the Terms of Service document. Default value: JSON. Possible values: **JSON**, **PDF**, or **TXT**.. - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** (required). - public GetTermsOfServiceDocumentRequest(string language = default(string), string termsOfServiceDocumentFormat = default(string), TypeEnum type = default(TypeEnum)) - { - this.Language = language; - this.Type = type; - this.TermsOfServiceDocumentFormat = termsOfServiceDocumentFormat; - } - - /// - /// The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. - /// - /// The language to be used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English. - [DataMember(Name = "language", IsRequired = false, EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// The requested format for the Terms of Service document. Default value: JSON. Possible values: **JSON**, **PDF**, or **TXT**. - /// - /// The requested format for the Terms of Service document. Default value: JSON. Possible values: **JSON**, **PDF**, or **TXT**. - [DataMember(Name = "termsOfServiceDocumentFormat", EmitDefaultValue = false)] - public string TermsOfServiceDocumentFormat { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTermsOfServiceDocumentRequest {\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" TermsOfServiceDocumentFormat: ").Append(TermsOfServiceDocumentFormat).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTermsOfServiceDocumentRequest); - } - - /// - /// Returns true if GetTermsOfServiceDocumentRequest instances are equal - /// - /// Instance of GetTermsOfServiceDocumentRequest to be compared - /// Boolean - public bool Equals(GetTermsOfServiceDocumentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.TermsOfServiceDocumentFormat == input.TermsOfServiceDocumentFormat || - (this.TermsOfServiceDocumentFormat != null && - this.TermsOfServiceDocumentFormat.Equals(input.TermsOfServiceDocumentFormat)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.TermsOfServiceDocumentFormat != null) - { - hashCode = (hashCode * 59) + this.TermsOfServiceDocumentFormat.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs b/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs deleted file mode 100644 index 30350e223..000000000 --- a/Adyen/Model/LegalEntityManagement/GetTermsOfServiceDocumentResponse.cs +++ /dev/null @@ -1,289 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// GetTermsOfServiceDocumentResponse - /// - [DataContract(Name = "GetTermsOfServiceDocumentResponse")] - public partial class GetTermsOfServiceDocumentResponse : IEquatable, IValidatableObject - { - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AdyenAccount for value: adyenAccount - /// - [EnumMember(Value = "adyenAccount")] - AdyenAccount = 1, - - /// - /// Enum AdyenCapital for value: adyenCapital - /// - [EnumMember(Value = "adyenCapital")] - AdyenCapital = 2, - - /// - /// Enum AdyenCard for value: adyenCard - /// - [EnumMember(Value = "adyenCard")] - AdyenCard = 3, - - /// - /// Enum AdyenChargeCard for value: adyenChargeCard - /// - [EnumMember(Value = "adyenChargeCard")] - AdyenChargeCard = 4, - - /// - /// Enum AdyenForPlatformsAdvanced for value: adyenForPlatformsAdvanced - /// - [EnumMember(Value = "adyenForPlatformsAdvanced")] - AdyenForPlatformsAdvanced = 5, - - /// - /// Enum AdyenForPlatformsManage for value: adyenForPlatformsManage - /// - [EnumMember(Value = "adyenForPlatformsManage")] - AdyenForPlatformsManage = 6, - - /// - /// Enum AdyenFranchisee for value: adyenFranchisee - /// - [EnumMember(Value = "adyenFranchisee")] - AdyenFranchisee = 7, - - /// - /// Enum AdyenIssuing for value: adyenIssuing - /// - [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 8, - - /// - /// Enum AdyenPccr for value: adyenPccr - /// - [EnumMember(Value = "adyenPccr")] - AdyenPccr = 9, - - /// - /// Enum KycOnInvite for value: kycOnInvite - /// - [EnumMember(Value = "kycOnInvite")] - KycOnInvite = 10 - - } - - - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The Terms of Service document in Base64-encoded format.. - /// The unique identifier of the legal entity.. - /// The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English or **fr** for French. Note that French is only available for some integration types in certain countries/regions. Reach out to your Adyen contact for more information.. - /// The format of the Terms of Service document.. - /// The unique identifier of the Terms of Service document.. - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** . - public GetTermsOfServiceDocumentResponse(byte[] document = default(byte[]), string id = default(string), string language = default(string), string termsOfServiceDocumentFormat = default(string), string termsOfServiceDocumentId = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Document = document; - this.Id = id; - this.Language = language; - this.TermsOfServiceDocumentFormat = termsOfServiceDocumentFormat; - this.TermsOfServiceDocumentId = termsOfServiceDocumentId; - this.Type = type; - } - - /// - /// The Terms of Service document in Base64-encoded format. - /// - /// The Terms of Service document in Base64-encoded format. - [DataMember(Name = "document", EmitDefaultValue = false)] - public byte[] Document { get; set; } - - /// - /// The unique identifier of the legal entity. - /// - /// The unique identifier of the legal entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English or **fr** for French. Note that French is only available for some integration types in certain countries/regions. Reach out to your Adyen contact for more information. - /// - /// The language used for the Terms of Service document, specified by the two-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language code. Possible value: **en** for English or **fr** for French. Note that French is only available for some integration types in certain countries/regions. Reach out to your Adyen contact for more information. - [DataMember(Name = "language", EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// The format of the Terms of Service document. - /// - /// The format of the Terms of Service document. - [DataMember(Name = "termsOfServiceDocumentFormat", EmitDefaultValue = false)] - public string TermsOfServiceDocumentFormat { get; set; } - - /// - /// The unique identifier of the Terms of Service document. - /// - /// The unique identifier of the Terms of Service document. - [DataMember(Name = "termsOfServiceDocumentId", EmitDefaultValue = false)] - public string TermsOfServiceDocumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTermsOfServiceDocumentResponse {\n"); - sb.Append(" Document: ").Append(Document).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" TermsOfServiceDocumentFormat: ").Append(TermsOfServiceDocumentFormat).Append("\n"); - sb.Append(" TermsOfServiceDocumentId: ").Append(TermsOfServiceDocumentId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTermsOfServiceDocumentResponse); - } - - /// - /// Returns true if GetTermsOfServiceDocumentResponse instances are equal - /// - /// Instance of GetTermsOfServiceDocumentResponse to be compared - /// Boolean - public bool Equals(GetTermsOfServiceDocumentResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Document == input.Document || - (this.Document != null && - this.Document.Equals(input.Document)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.TermsOfServiceDocumentFormat == input.TermsOfServiceDocumentFormat || - (this.TermsOfServiceDocumentFormat != null && - this.TermsOfServiceDocumentFormat.Equals(input.TermsOfServiceDocumentFormat)) - ) && - ( - this.TermsOfServiceDocumentId == input.TermsOfServiceDocumentId || - (this.TermsOfServiceDocumentId != null && - this.TermsOfServiceDocumentId.Equals(input.TermsOfServiceDocumentId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Document != null) - { - hashCode = (hashCode * 59) + this.Document.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.TermsOfServiceDocumentFormat != null) - { - hashCode = (hashCode * 59) + this.TermsOfServiceDocumentFormat.GetHashCode(); - } - if (this.TermsOfServiceDocumentId != null) - { - hashCode = (hashCode * 59) + this.TermsOfServiceDocumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.cs deleted file mode 100644 index 20b7573d4..000000000 --- a/Adyen/Model/LegalEntityManagement/HKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// HKLocalAccountIdentification - /// - [DataContract(Name = "HKLocalAccountIdentification")] - public partial class HKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **hkLocal** - /// - /// **hkLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum HkLocal for value: hkLocal - /// - [EnumMember(Value = "hkLocal")] - HkLocal = 1 - - } - - - /// - /// **hkLocal** - /// - /// **hkLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 9- to 17-digit bank account number, without separators or whitespace. Starts with the 3-digit branch code. (required). - /// The 3-digit clearing code, without separators or whitespace. (required). - /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) - { - this.AccountNumber = accountNumber; - this.ClearingCode = clearingCode; - this.Type = type; - } - - /// - /// The 9- to 17-digit bank account number, without separators or whitespace. Starts with the 3-digit branch code. - /// - /// The 9- to 17-digit bank account number, without separators or whitespace. Starts with the 3-digit branch code. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit clearing code, without separators or whitespace. - /// - /// The 3-digit clearing code, without separators or whitespace. - [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] - public string ClearingCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HKLocalAccountIdentification); - } - - /// - /// Returns true if HKLocalAccountIdentification instances are equal - /// - /// Instance of HKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(HKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.ClearingCode == input.ClearingCode || - (this.ClearingCode != null && - this.ClearingCode.Equals(input.ClearingCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.ClearingCode != null) - { - hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 17) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 17.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 9.", new [] { "AccountNumber" }); - } - - // ClearingCode (string) maxLength - if (this.ClearingCode != null && this.ClearingCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be less than 3.", new [] { "ClearingCode" }); - } - - // ClearingCode (string) minLength - if (this.ClearingCode != null && this.ClearingCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be greater than 3.", new [] { "ClearingCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.cs deleted file mode 100644 index 2086bc118..000000000 --- a/Adyen/Model/LegalEntityManagement/HULocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// HULocalAccountIdentification - /// - [DataContract(Name = "HULocalAccountIdentification")] - public partial class HULocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **huLocal** - /// - /// **huLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum HuLocal for value: huLocal - /// - [EnumMember(Value = "huLocal")] - HuLocal = 1 - - } - - - /// - /// **huLocal** - /// - /// **huLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HULocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 24-digit bank account number, without separators or whitespace. (required). - /// **huLocal** (required) (default to TypeEnum.HuLocal). - public HULocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.HuLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 24-digit bank account number, without separators or whitespace. - /// - /// The 24-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HULocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HULocalAccountIdentification); - } - - /// - /// Returns true if HULocalAccountIdentification instances are equal - /// - /// Instance of HULocalAccountIdentification to be compared - /// Boolean - public bool Equals(HULocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 24) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 24.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 24) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 24.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.cs deleted file mode 100644 index ff22f69a9..000000000 --- a/Adyen/Model/LegalEntityManagement/IbanAccountIdentification.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// IbanAccountIdentification - /// - [DataContract(Name = "IbanAccountIdentification")] - public partial class IbanAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **iban** - /// - /// **iban** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 1 - - } - - - /// - /// **iban** - /// - /// **iban** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IbanAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). - /// **iban** (required) (default to TypeEnum.Iban). - public IbanAccountIdentification(string iban = default(string), TypeEnum type = TypeEnum.Iban) - { - this.Iban = iban; - this.Type = type; - } - - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - [DataMember(Name = "iban", IsRequired = false, EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IbanAccountIdentification {\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IbanAccountIdentification); - } - - /// - /// Returns true if IbanAccountIdentification instances are equal - /// - /// Instance of IbanAccountIdentification to be compared - /// Boolean - public bool Equals(IbanAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/IdentificationData.cs b/Adyen/Model/LegalEntityManagement/IdentificationData.cs deleted file mode 100644 index aef0ebe87..000000000 --- a/Adyen/Model/LegalEntityManagement/IdentificationData.cs +++ /dev/null @@ -1,274 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// IdentificationData - /// - [DataContract(Name = "IdentificationData")] - public partial class IdentificationData : IEquatable, IValidatableObject - { - /// - /// Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** - /// - /// Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NationalIdNumber for value: nationalIdNumber - /// - [EnumMember(Value = "nationalIdNumber")] - NationalIdNumber = 1, - - /// - /// Enum Passport for value: passport - /// - [EnumMember(Value = "passport")] - Passport = 2, - - /// - /// Enum DriversLicense for value: driversLicense - /// - [EnumMember(Value = "driversLicense")] - DriversLicense = 3, - - /// - /// Enum IdentityCard for value: identityCard - /// - [EnumMember(Value = "identityCard")] - IdentityCard = 4 - - } - - - /// - /// Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** - /// - /// Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IdentificationData() { } - /// - /// Initializes a new instance of the class. - /// - /// The card number of the document that was issued (AU only).. - /// The expiry date of the document, in YYYY-MM-DD format.. - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**.. - /// The state or province where the document was issued (AU only).. - /// Applies only to individuals in the US. Set to **true** if the individual does not have an SSN. To verify their identity, Adyen will require them to upload an ID document.. - /// The number in the document.. - /// Type of identity data. For individuals, the following types are supported. See our [onboarding guide](https://docs.adyen.com/platforms/onboard-users/onboarding-steps/?onboarding_type=custom) for other supported countries. - Australia: **driversLicense**, **passport** - Hong Kong: **driversLicense**, **nationalIdNumber**, **passport** - New Zealand: **driversLicense**, **passport** - Singapore: **driversLicense**, **nationalIdNumber**, **passport** - All other supported countries: **nationalIdNumber** (required). - public IdentificationData(string cardNumber = default(string), string expiryDate = default(string), string issuerCountry = default(string), string issuerState = default(string), bool? nationalIdExempt = default(bool?), string number = default(string), TypeEnum type = default(TypeEnum)) - { - this.Type = type; - this.CardNumber = cardNumber; - this.ExpiryDate = expiryDate; - this.IssuerCountry = issuerCountry; - this.IssuerState = issuerState; - this.NationalIdExempt = nationalIdExempt; - this.Number = number; - } - - /// - /// The card number of the document that was issued (AU only). - /// - /// The card number of the document that was issued (AU only). - [DataMember(Name = "cardNumber", EmitDefaultValue = false)] - public string CardNumber { get; set; } - - /// - /// The expiry date of the document, in YYYY-MM-DD format. - /// - /// The expiry date of the document, in YYYY-MM-DD format. - [DataMember(Name = "expiryDate", EmitDefaultValue = false)] - public string ExpiryDate { get; set; } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code where the document was issued. For example, **US**. - [DataMember(Name = "issuerCountry", EmitDefaultValue = false)] - [Obsolete("Deprecated since Legal Entity Management API v1.")] - public string IssuerCountry { get; set; } - - /// - /// The state or province where the document was issued (AU only). - /// - /// The state or province where the document was issued (AU only). - [DataMember(Name = "issuerState", EmitDefaultValue = false)] - public string IssuerState { get; set; } - - /// - /// Applies only to individuals in the US. Set to **true** if the individual does not have an SSN. To verify their identity, Adyen will require them to upload an ID document. - /// - /// Applies only to individuals in the US. Set to **true** if the individual does not have an SSN. To verify their identity, Adyen will require them to upload an ID document. - [DataMember(Name = "nationalIdExempt", EmitDefaultValue = false)] - public bool? NationalIdExempt { get; set; } - - /// - /// The number in the document. - /// - /// The number in the document. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IdentificationData {\n"); - sb.Append(" CardNumber: ").Append(CardNumber).Append("\n"); - sb.Append(" ExpiryDate: ").Append(ExpiryDate).Append("\n"); - sb.Append(" IssuerCountry: ").Append(IssuerCountry).Append("\n"); - sb.Append(" IssuerState: ").Append(IssuerState).Append("\n"); - sb.Append(" NationalIdExempt: ").Append(NationalIdExempt).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IdentificationData); - } - - /// - /// Returns true if IdentificationData instances are equal - /// - /// Instance of IdentificationData to be compared - /// Boolean - public bool Equals(IdentificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.CardNumber == input.CardNumber || - (this.CardNumber != null && - this.CardNumber.Equals(input.CardNumber)) - ) && - ( - this.ExpiryDate == input.ExpiryDate || - (this.ExpiryDate != null && - this.ExpiryDate.Equals(input.ExpiryDate)) - ) && - ( - this.IssuerCountry == input.IssuerCountry || - (this.IssuerCountry != null && - this.IssuerCountry.Equals(input.IssuerCountry)) - ) && - ( - this.IssuerState == input.IssuerState || - (this.IssuerState != null && - this.IssuerState.Equals(input.IssuerState)) - ) && - ( - this.NationalIdExempt == input.NationalIdExempt || - this.NationalIdExempt.Equals(input.NationalIdExempt) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardNumber != null) - { - hashCode = (hashCode * 59) + this.CardNumber.GetHashCode(); - } - if (this.ExpiryDate != null) - { - hashCode = (hashCode * 59) + this.ExpiryDate.GetHashCode(); - } - if (this.IssuerCountry != null) - { - hashCode = (hashCode * 59) + this.IssuerCountry.GetHashCode(); - } - if (this.IssuerState != null) - { - hashCode = (hashCode * 59) + this.IssuerState.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NationalIdExempt.GetHashCode(); - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Individual.cs b/Adyen/Model/LegalEntityManagement/Individual.cs deleted file mode 100644 index 7dcabcd4e..000000000 --- a/Adyen/Model/LegalEntityManagement/Individual.cs +++ /dev/null @@ -1,299 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Individual - /// - [DataContract(Name = "Individual")] - public partial class Individual : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Individual() { } - /// - /// Initializes a new instance of the class. - /// - /// birthData. - /// The email address of the legal entity.. - /// identificationData. - /// name (required). - /// The individual's nationality.. - /// phone. - /// residentialAddress (required). - /// support. - /// The tax information of the individual.. - /// webData. - public Individual(BirthData birthData = default(BirthData), string email = default(string), IdentificationData identificationData = default(IdentificationData), Name name = default(Name), string nationality = default(string), PhoneNumber phone = default(PhoneNumber), Address residentialAddress = default(Address), Support support = default(Support), List taxInformation = default(List), WebData webData = default(WebData)) - { - this.Name = name; - this.ResidentialAddress = residentialAddress; - this.BirthData = birthData; - this.Email = email; - this.IdentificationData = identificationData; - this.Nationality = nationality; - this.Phone = phone; - this.Support = support; - this.TaxInformation = taxInformation; - this.WebData = webData; - } - - /// - /// Gets or Sets BirthData - /// - [DataMember(Name = "birthData", EmitDefaultValue = false)] - public BirthData BirthData { get; set; } - - /// - /// The email address of the legal entity. - /// - /// The email address of the legal entity. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Gets or Sets IdentificationData - /// - [DataMember(Name = "identificationData", EmitDefaultValue = false)] - public IdentificationData IdentificationData { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// The individual's nationality. - /// - /// The individual's nationality. - [DataMember(Name = "nationality", EmitDefaultValue = false)] - public string Nationality { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name = "phone", EmitDefaultValue = false)] - public PhoneNumber Phone { get; set; } - - /// - /// Gets or Sets ResidentialAddress - /// - [DataMember(Name = "residentialAddress", IsRequired = false, EmitDefaultValue = false)] - public Address ResidentialAddress { get; set; } - - /// - /// Gets or Sets Support - /// - [DataMember(Name = "support", EmitDefaultValue = false)] - public Support Support { get; set; } - - /// - /// The tax information of the individual. - /// - /// The tax information of the individual. - [DataMember(Name = "taxInformation", EmitDefaultValue = false)] - public List TaxInformation { get; set; } - - /// - /// Gets or Sets WebData - /// - [DataMember(Name = "webData", EmitDefaultValue = false)] - public WebData WebData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Individual {\n"); - sb.Append(" BirthData: ").Append(BirthData).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" IdentificationData: ").Append(IdentificationData).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Nationality: ").Append(Nationality).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" ResidentialAddress: ").Append(ResidentialAddress).Append("\n"); - sb.Append(" Support: ").Append(Support).Append("\n"); - sb.Append(" TaxInformation: ").Append(TaxInformation).Append("\n"); - sb.Append(" WebData: ").Append(WebData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Individual); - } - - /// - /// Returns true if Individual instances are equal - /// - /// Instance of Individual to be compared - /// Boolean - public bool Equals(Individual input) - { - if (input == null) - { - return false; - } - return - ( - this.BirthData == input.BirthData || - (this.BirthData != null && - this.BirthData.Equals(input.BirthData)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.IdentificationData == input.IdentificationData || - (this.IdentificationData != null && - this.IdentificationData.Equals(input.IdentificationData)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Nationality == input.Nationality || - (this.Nationality != null && - this.Nationality.Equals(input.Nationality)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.ResidentialAddress == input.ResidentialAddress || - (this.ResidentialAddress != null && - this.ResidentialAddress.Equals(input.ResidentialAddress)) - ) && - ( - this.Support == input.Support || - (this.Support != null && - this.Support.Equals(input.Support)) - ) && - ( - this.TaxInformation == input.TaxInformation || - this.TaxInformation != null && - input.TaxInformation != null && - this.TaxInformation.SequenceEqual(input.TaxInformation) - ) && - ( - this.WebData == input.WebData || - (this.WebData != null && - this.WebData.Equals(input.WebData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BirthData != null) - { - hashCode = (hashCode * 59) + this.BirthData.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.IdentificationData != null) - { - hashCode = (hashCode * 59) + this.IdentificationData.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Nationality != null) - { - hashCode = (hashCode * 59) + this.Nationality.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.ResidentialAddress != null) - { - hashCode = (hashCode * 59) + this.ResidentialAddress.GetHashCode(); - } - if (this.Support != null) - { - hashCode = (hashCode * 59) + this.Support.GetHashCode(); - } - if (this.TaxInformation != null) - { - hashCode = (hashCode * 59) + this.TaxInformation.GetHashCode(); - } - if (this.WebData != null) - { - hashCode = (hashCode * 59) + this.WebData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/LegalEntity.cs b/Adyen/Model/LegalEntityManagement/LegalEntity.cs deleted file mode 100644 index e842344fe..000000000 --- a/Adyen/Model/LegalEntityManagement/LegalEntity.cs +++ /dev/null @@ -1,457 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// LegalEntity - /// - [DataContract(Name = "LegalEntity")] - public partial class LegalEntity : IEquatable, IValidatableObject - { - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Individual for value: individual - /// - [EnumMember(Value = "individual")] - Individual = 1, - - /// - /// Enum Organization for value: organization - /// - [EnumMember(Value = "organization")] - Organization = 2, - - /// - /// Enum SoleProprietorship for value: soleProprietorship - /// - [EnumMember(Value = "soleProprietorship")] - SoleProprietorship = 3, - - /// - /// Enum Trust for value: trust - /// - [EnumMember(Value = "trust")] - Trust = 4, - - /// - /// Enum UnincorporatedPartnership for value: unincorporatedPartnership - /// - [EnumMember(Value = "unincorporatedPartnership")] - UnincorporatedPartnership = 5 - - } - - - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected LegalEntity() { } - /// - /// Initializes a new instance of the class. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.. - /// List of documents uploaded for the legal entity.. - /// List of documents uploaded for the legal entity.. - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories.. - /// individual. - /// organization. - /// List of verification errors related to capabilities for the legal entity.. - /// Your reference for the legal entity, maximum 150 characters.. - /// soleProprietorship. - /// trust. - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.. - /// unincorporatedPartnership. - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification).. - public LegalEntity(Dictionary capabilities = default(Dictionary), List documentDetails = default(List), List documents = default(List), List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), List problems = default(List), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum? type = default(TypeEnum?), UnincorporatedPartnership unincorporatedPartnership = default(UnincorporatedPartnership), string verificationPlan = default(string)) - { - this.Capabilities = capabilities; - this.DocumentDetails = documentDetails; - this.Documents = documents; - this.EntityAssociations = entityAssociations; - this.Individual = individual; - this.Organization = organization; - this.Problems = problems; - this.Reference = reference; - this.SoleProprietorship = soleProprietorship; - this.Trust = trust; - this.Type = type; - this.UnincorporatedPartnership = unincorporatedPartnership; - this.VerificationPlan = verificationPlan; - } - - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// List of documents uploaded for the legal entity. - /// - /// List of documents uploaded for the legal entity. - [DataMember(Name = "documentDetails", EmitDefaultValue = false)] - public List DocumentDetails { get; set; } - - /// - /// List of documents uploaded for the legal entity. - /// - /// List of documents uploaded for the legal entity. - [DataMember(Name = "documents", EmitDefaultValue = false)] - [Obsolete("Deprecated since Legal Entity Management API v1. Use the `documentDetails` array instead.")] - public List Documents { get; set; } - - /// - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories. - /// - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories. - [DataMember(Name = "entityAssociations", EmitDefaultValue = false)] - public List EntityAssociations { get; set; } - - /// - /// The unique identifier of the legal entity. - /// - /// The unique identifier of the legal entity. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// Gets or Sets Individual - /// - [DataMember(Name = "individual", EmitDefaultValue = false)] - public Individual Individual { get; set; } - - /// - /// Gets or Sets Organization - /// - [DataMember(Name = "organization", EmitDefaultValue = false)] - public Organization Organization { get; set; } - - /// - /// List of verification errors related to capabilities for the legal entity. - /// - /// List of verification errors related to capabilities for the legal entity. - [DataMember(Name = "problems", EmitDefaultValue = false)] - public List Problems { get; set; } - - /// - /// Your reference for the legal entity, maximum 150 characters. - /// - /// Your reference for the legal entity, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets SoleProprietorship - /// - [DataMember(Name = "soleProprietorship", EmitDefaultValue = false)] - public SoleProprietorship SoleProprietorship { get; set; } - - /// - /// List of transfer instruments that the legal entity owns. - /// - /// List of transfer instruments that the legal entity owns. - [DataMember(Name = "transferInstruments", EmitDefaultValue = false)] - public List TransferInstruments { get; private set; } - - /// - /// Gets or Sets Trust - /// - [DataMember(Name = "trust", EmitDefaultValue = false)] - public Trust Trust { get; set; } - - /// - /// Gets or Sets UnincorporatedPartnership - /// - [DataMember(Name = "unincorporatedPartnership", EmitDefaultValue = false)] - public UnincorporatedPartnership UnincorporatedPartnership { get; set; } - - /// - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. - /// - /// List of verification deadlines and the capabilities that will be disallowed if verification errors are not resolved. - [DataMember(Name = "verificationDeadlines", EmitDefaultValue = false)] - public List VerificationDeadlines { get; private set; } - - /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). - /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). - [DataMember(Name = "verificationPlan", EmitDefaultValue = false)] - public string VerificationPlan { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalEntity {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" DocumentDetails: ").Append(DocumentDetails).Append("\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" EntityAssociations: ").Append(EntityAssociations).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Individual: ").Append(Individual).Append("\n"); - sb.Append(" Organization: ").Append(Organization).Append("\n"); - sb.Append(" Problems: ").Append(Problems).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SoleProprietorship: ").Append(SoleProprietorship).Append("\n"); - sb.Append(" TransferInstruments: ").Append(TransferInstruments).Append("\n"); - sb.Append(" Trust: ").Append(Trust).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UnincorporatedPartnership: ").Append(UnincorporatedPartnership).Append("\n"); - sb.Append(" VerificationDeadlines: ").Append(VerificationDeadlines).Append("\n"); - sb.Append(" VerificationPlan: ").Append(VerificationPlan).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalEntity); - } - - /// - /// Returns true if LegalEntity instances are equal - /// - /// Instance of LegalEntity to be compared - /// Boolean - public bool Equals(LegalEntity input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.DocumentDetails == input.DocumentDetails || - this.DocumentDetails != null && - input.DocumentDetails != null && - this.DocumentDetails.SequenceEqual(input.DocumentDetails) - ) && - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.EntityAssociations == input.EntityAssociations || - this.EntityAssociations != null && - input.EntityAssociations != null && - this.EntityAssociations.SequenceEqual(input.EntityAssociations) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Individual == input.Individual || - (this.Individual != null && - this.Individual.Equals(input.Individual)) - ) && - ( - this.Organization == input.Organization || - (this.Organization != null && - this.Organization.Equals(input.Organization)) - ) && - ( - this.Problems == input.Problems || - this.Problems != null && - input.Problems != null && - this.Problems.SequenceEqual(input.Problems) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SoleProprietorship == input.SoleProprietorship || - (this.SoleProprietorship != null && - this.SoleProprietorship.Equals(input.SoleProprietorship)) - ) && - ( - this.TransferInstruments == input.TransferInstruments || - this.TransferInstruments != null && - input.TransferInstruments != null && - this.TransferInstruments.SequenceEqual(input.TransferInstruments) - ) && - ( - this.Trust == input.Trust || - (this.Trust != null && - this.Trust.Equals(input.Trust)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UnincorporatedPartnership == input.UnincorporatedPartnership || - (this.UnincorporatedPartnership != null && - this.UnincorporatedPartnership.Equals(input.UnincorporatedPartnership)) - ) && - ( - this.VerificationDeadlines == input.VerificationDeadlines || - this.VerificationDeadlines != null && - input.VerificationDeadlines != null && - this.VerificationDeadlines.SequenceEqual(input.VerificationDeadlines) - ) && - ( - this.VerificationPlan == input.VerificationPlan || - (this.VerificationPlan != null && - this.VerificationPlan.Equals(input.VerificationPlan)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.DocumentDetails != null) - { - hashCode = (hashCode * 59) + this.DocumentDetails.GetHashCode(); - } - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.EntityAssociations != null) - { - hashCode = (hashCode * 59) + this.EntityAssociations.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Individual != null) - { - hashCode = (hashCode * 59) + this.Individual.GetHashCode(); - } - if (this.Organization != null) - { - hashCode = (hashCode * 59) + this.Organization.GetHashCode(); - } - if (this.Problems != null) - { - hashCode = (hashCode * 59) + this.Problems.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SoleProprietorship != null) - { - hashCode = (hashCode * 59) + this.SoleProprietorship.GetHashCode(); - } - if (this.TransferInstruments != null) - { - hashCode = (hashCode * 59) + this.TransferInstruments.GetHashCode(); - } - if (this.Trust != null) - { - hashCode = (hashCode * 59) + this.Trust.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UnincorporatedPartnership != null) - { - hashCode = (hashCode * 59) + this.UnincorporatedPartnership.GetHashCode(); - } - if (this.VerificationDeadlines != null) - { - hashCode = (hashCode * 59) + this.VerificationDeadlines.GetHashCode(); - } - if (this.VerificationPlan != null) - { - hashCode = (hashCode * 59) + this.VerificationPlan.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.cs b/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.cs deleted file mode 100644 index cdd68fe53..000000000 --- a/Adyen/Model/LegalEntityManagement/LegalEntityAssociation.cs +++ /dev/null @@ -1,390 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// LegalEntityAssociation - /// - [DataContract(Name = "LegalEntityAssociation")] - public partial class LegalEntityAssociation : IEquatable, IValidatableObject - { - /// - /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** - /// - /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DefinedBeneficiary for value: definedBeneficiary - /// - [EnumMember(Value = "definedBeneficiary")] - DefinedBeneficiary = 1, - - /// - /// Enum Director for value: director - /// - [EnumMember(Value = "director")] - Director = 2, - - /// - /// Enum ImmediateParentCompany for value: immediateParentCompany - /// - [EnumMember(Value = "immediateParentCompany")] - ImmediateParentCompany = 3, - - /// - /// Enum LegalRepresentative for value: legalRepresentative - /// - [EnumMember(Value = "legalRepresentative")] - LegalRepresentative = 4, - - /// - /// Enum PciSignatory for value: pciSignatory - /// - [EnumMember(Value = "pciSignatory")] - PciSignatory = 5, - - /// - /// Enum Protector for value: protector - /// - [EnumMember(Value = "protector")] - Protector = 6, - - /// - /// Enum SecondaryPartner for value: secondaryPartner - /// - [EnumMember(Value = "secondaryPartner")] - SecondaryPartner = 7, - - /// - /// Enum SecondaryTrustee for value: secondaryTrustee - /// - [EnumMember(Value = "secondaryTrustee")] - SecondaryTrustee = 8, - - /// - /// Enum Settlor for value: settlor - /// - [EnumMember(Value = "settlor")] - Settlor = 9, - - /// - /// Enum Signatory for value: signatory - /// - [EnumMember(Value = "signatory")] - Signatory = 10, - - /// - /// Enum SoleProprietorship for value: soleProprietorship - /// - [EnumMember(Value = "soleProprietorship")] - SoleProprietorship = 11, - - /// - /// Enum Trust for value: trust - /// - [EnumMember(Value = "trust")] - Trust = 12, - - /// - /// Enum TrustOwnership for value: trustOwnership - /// - [EnumMember(Value = "trustOwnership")] - TrustOwnership = 13, - - /// - /// Enum UboThroughControl for value: uboThroughControl - /// - [EnumMember(Value = "uboThroughControl")] - UboThroughControl = 14, - - /// - /// Enum UboThroughOwnership for value: uboThroughOwnership - /// - [EnumMember(Value = "uboThroughOwnership")] - UboThroughOwnership = 15, - - /// - /// Enum UltimateParentCompany for value: ultimateParentCompany - /// - [EnumMember(Value = "ultimateParentCompany")] - UltimateParentCompany = 16, - - /// - /// Enum UndefinedBeneficiary for value: undefinedBeneficiary - /// - [EnumMember(Value = "undefinedBeneficiary")] - UndefinedBeneficiary = 17, - - /// - /// Enum UnincorporatedPartnership for value: unincorporatedPartnership - /// - [EnumMember(Value = "unincorporatedPartnership")] - UnincorporatedPartnership = 18 - - } - - - /// - /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** - /// - /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected LegalEntityAssociation() { } - /// - /// Initializes a new instance of the class. - /// - /// The individual's job title if the `type` is **uboThroughControl** or **signatory**.. - /// The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). (required). - /// Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand.. - /// The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**.. - /// Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia. For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**.. - /// Defines the relationship of the legal entity to the current legal entity. Possible value for individuals: **legalRepresentative**. Possible values for organizations: **director**, **signatory**, **trustOwnership**, **uboThroughOwnership**, **uboThroughControl**, or **ultimateParentCompany**. Possible values for sole proprietorships: **soleProprietorship**. Possible value for trusts: **trust**. Possible values for trust members: **definedBeneficiary**, **protector**, **secondaryTrustee**, **settlor**, **uboThroughControl**, or **uboThroughOwnership**. Possible value for unincorporated partnership: **unincorporatedPartnership**. Possible values for unincorporated partnership members: **secondaryPartner**, **uboThroughControl**, **uboThroughOwnership** (required). - public LegalEntityAssociation(string jobTitle = default(string), string legalEntityId = default(string), bool? nominee = default(bool?), string relationship = default(string), List settlorExemptionReason = default(List), TypeEnum type = default(TypeEnum)) - { - this.LegalEntityId = legalEntityId; - this.Type = type; - this.JobTitle = jobTitle; - this.Nominee = nominee; - this.Relationship = relationship; - this.SettlorExemptionReason = settlorExemptionReason; - } - - /// - /// The unique identifier of another legal entity with which the `legalEntityId` is associated. When the `legalEntityId` is associated to legal entities other than the current one, the response returns all the associations. - /// - /// The unique identifier of another legal entity with which the `legalEntityId` is associated. When the `legalEntityId` is associated to legal entities other than the current one, the response returns all the associations. - [DataMember(Name = "associatorId", EmitDefaultValue = false)] - public string AssociatorId { get; private set; } - - /// - /// The legal entity type of associated legal entity. For example, **organization**, **soleProprietorship** or **individual**. - /// - /// The legal entity type of associated legal entity. For example, **organization**, **soleProprietorship** or **individual**. - [DataMember(Name = "entityType", EmitDefaultValue = false)] - public string EntityType { get; private set; } - - /// - /// The individual's job title if the `type` is **uboThroughControl** or **signatory**. - /// - /// The individual's job title if the `type` is **uboThroughControl** or **signatory**. - [DataMember(Name = "jobTitle", EmitDefaultValue = false)] - public string JobTitle { get; set; } - - /// - /// The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - /// - /// The unique identifier of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - [DataMember(Name = "legalEntityId", IsRequired = false, EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// The name of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - For **individual**, `name.firstName` and `name.lastName`. - For **organization**, `legalName`. - For **soleProprietorship**, `name`. - /// - /// The name of the associated [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - For **individual**, `name.firstName` and `name.lastName`. - For **organization**, `legalName`. - For **soleProprietorship**, `name`. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; private set; } - - /// - /// Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand. - /// - /// Default value: **false** Set to **true** if the entity association `type` **director**, **secondaryPartner** or **shareholder** is also a nominee. Only applicable to New Zealand. - [DataMember(Name = "nominee", EmitDefaultValue = false)] - public bool? Nominee { get; set; } - - /// - /// The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**. - /// - /// The individual's relationship to a legal representative if the `type` is **legalRepresentative**. Possible values: **parent**, **guardian**. - [DataMember(Name = "relationship", EmitDefaultValue = false)] - public string Relationship { get; set; } - - /// - /// Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia. For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**. - /// - /// Defines the KYC exemption reason for a settlor associated with a trust. Only applicable to trusts in Australia. For example, **professionalServiceProvider**, **deceased**, or **contributionBelowThreshold**. - [DataMember(Name = "settlorExemptionReason", EmitDefaultValue = false)] - public List SettlorExemptionReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalEntityAssociation {\n"); - sb.Append(" AssociatorId: ").Append(AssociatorId).Append("\n"); - sb.Append(" EntityType: ").Append(EntityType).Append("\n"); - sb.Append(" JobTitle: ").Append(JobTitle).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Nominee: ").Append(Nominee).Append("\n"); - sb.Append(" Relationship: ").Append(Relationship).Append("\n"); - sb.Append(" SettlorExemptionReason: ").Append(SettlorExemptionReason).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalEntityAssociation); - } - - /// - /// Returns true if LegalEntityAssociation instances are equal - /// - /// Instance of LegalEntityAssociation to be compared - /// Boolean - public bool Equals(LegalEntityAssociation input) - { - if (input == null) - { - return false; - } - return - ( - this.AssociatorId == input.AssociatorId || - (this.AssociatorId != null && - this.AssociatorId.Equals(input.AssociatorId)) - ) && - ( - this.EntityType == input.EntityType || - (this.EntityType != null && - this.EntityType.Equals(input.EntityType)) - ) && - ( - this.JobTitle == input.JobTitle || - (this.JobTitle != null && - this.JobTitle.Equals(input.JobTitle)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Nominee == input.Nominee || - this.Nominee.Equals(input.Nominee) - ) && - ( - this.Relationship == input.Relationship || - (this.Relationship != null && - this.Relationship.Equals(input.Relationship)) - ) && - ( - this.SettlorExemptionReason == input.SettlorExemptionReason || - this.SettlorExemptionReason != null && - input.SettlorExemptionReason != null && - this.SettlorExemptionReason.SequenceEqual(input.SettlorExemptionReason) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AssociatorId != null) - { - hashCode = (hashCode * 59) + this.AssociatorId.GetHashCode(); - } - if (this.EntityType != null) - { - hashCode = (hashCode * 59) + this.EntityType.GetHashCode(); - } - if (this.JobTitle != null) - { - hashCode = (hashCode * 59) + this.JobTitle.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Nominee.GetHashCode(); - if (this.Relationship != null) - { - hashCode = (hashCode * 59) + this.Relationship.GetHashCode(); - } - if (this.SettlorExemptionReason != null) - { - hashCode = (hashCode * 59) + this.SettlorExemptionReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityCapability.cs b/Adyen/Model/LegalEntityManagement/LegalEntityCapability.cs deleted file mode 100644 index 80cfcc702..000000000 --- a/Adyen/Model/LegalEntityManagement/LegalEntityCapability.cs +++ /dev/null @@ -1,317 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// LegalEntityCapability - /// - [DataContract(Name = "LegalEntityCapability")] - public partial class LegalEntityCapability : IEquatable, IValidatableObject - { - /// - /// The capability level that is allowed for the legal entity. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the legal entity. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AllowedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The capability level that is allowed for the legal entity. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The capability level that is allowed for the legal entity. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "allowedLevel", EmitDefaultValue = false)] - public AllowedLevelEnum? AllowedLevel { get; set; } - - /// - /// Returns false as AllowedLevel should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeAllowedLevel() - { - return false; - } - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RequestedLevelEnum - { - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 4 - - } - - - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The requested level of the capability. Some capabilities, such as those used in [card issuing](https://docs.adyen.com/issuing/add-capabilities#capability-levels), have different levels. Levels increase the capability, but also require additional checks and increased monitoring. Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "requestedLevel", EmitDefaultValue = false)] - public RequestedLevelEnum? RequestedLevel { get; set; } - - /// - /// Returns false as RequestedLevel should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeRequestedLevel() - { - return false; - } - /// - /// Initializes a new instance of the class. - /// - /// allowedSettings. - /// requestedSettings. - public LegalEntityCapability(CapabilitySettings allowedSettings = default(CapabilitySettings), CapabilitySettings requestedSettings = default(CapabilitySettings)) - { - this.AllowedSettings = allowedSettings; - this.RequestedSettings = requestedSettings; - } - - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; private set; } - - /// - /// Gets or Sets AllowedSettings - /// - [DataMember(Name = "allowedSettings", EmitDefaultValue = false)] - public CapabilitySettings AllowedSettings { get; set; } - - /// - /// Indicates whether the capability is requested. To check whether the legal entity is permitted to use the capability, refer to the `allowed` field. - /// - /// Indicates whether the capability is requested. To check whether the legal entity is permitted to use the capability, refer to the `allowed` field. - [DataMember(Name = "requested", EmitDefaultValue = false)] - public bool? Requested { get; private set; } - - /// - /// Gets or Sets RequestedSettings - /// - [DataMember(Name = "requestedSettings", EmitDefaultValue = false)] - public CapabilitySettings RequestedSettings { get; set; } - - /// - /// The capability status of transfer instruments associated with the legal entity. - /// - /// The capability status of transfer instruments associated with the legal entity. - [DataMember(Name = "transferInstruments", EmitDefaultValue = false)] - public List TransferInstruments { get; private set; } - - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public string VerificationStatus { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalEntityCapability {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" AllowedLevel: ").Append(AllowedLevel).Append("\n"); - sb.Append(" AllowedSettings: ").Append(AllowedSettings).Append("\n"); - sb.Append(" Requested: ").Append(Requested).Append("\n"); - sb.Append(" RequestedLevel: ").Append(RequestedLevel).Append("\n"); - sb.Append(" RequestedSettings: ").Append(RequestedSettings).Append("\n"); - sb.Append(" TransferInstruments: ").Append(TransferInstruments).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalEntityCapability); - } - - /// - /// Returns true if LegalEntityCapability instances are equal - /// - /// Instance of LegalEntityCapability to be compared - /// Boolean - public bool Equals(LegalEntityCapability input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.AllowedLevel == input.AllowedLevel || - this.AllowedLevel.Equals(input.AllowedLevel) - ) && - ( - this.AllowedSettings == input.AllowedSettings || - (this.AllowedSettings != null && - this.AllowedSettings.Equals(input.AllowedSettings)) - ) && - ( - this.Requested == input.Requested || - this.Requested.Equals(input.Requested) - ) && - ( - this.RequestedLevel == input.RequestedLevel || - this.RequestedLevel.Equals(input.RequestedLevel) - ) && - ( - this.RequestedSettings == input.RequestedSettings || - (this.RequestedSettings != null && - this.RequestedSettings.Equals(input.RequestedSettings)) - ) && - ( - this.TransferInstruments == input.TransferInstruments || - this.TransferInstruments != null && - input.TransferInstruments != null && - this.TransferInstruments.SequenceEqual(input.TransferInstruments) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - (this.VerificationStatus != null && - this.VerificationStatus.Equals(input.VerificationStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowedLevel.GetHashCode(); - if (this.AllowedSettings != null) - { - hashCode = (hashCode * 59) + this.AllowedSettings.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Requested.GetHashCode(); - hashCode = (hashCode * 59) + this.RequestedLevel.GetHashCode(); - if (this.RequestedSettings != null) - { - hashCode = (hashCode * 59) + this.RequestedSettings.GetHashCode(); - } - if (this.TransferInstruments != null) - { - hashCode = (hashCode * 59) + this.TransferInstruments.GetHashCode(); - } - if (this.VerificationStatus != null) - { - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs b/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs deleted file mode 100644 index 86cdba7d9..000000000 --- a/Adyen/Model/LegalEntityManagement/LegalEntityInfo.cs +++ /dev/null @@ -1,338 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// LegalEntityInfo - /// - [DataContract(Name = "LegalEntityInfo")] - public partial class LegalEntityInfo : IEquatable, IValidatableObject - { - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Individual for value: individual - /// - [EnumMember(Value = "individual")] - Individual = 1, - - /// - /// Enum Organization for value: organization - /// - [EnumMember(Value = "organization")] - Organization = 2, - - /// - /// Enum SoleProprietorship for value: soleProprietorship - /// - [EnumMember(Value = "soleProprietorship")] - SoleProprietorship = 3, - - /// - /// Enum Trust for value: trust - /// - [EnumMember(Value = "trust")] - Trust = 4, - - /// - /// Enum UnincorporatedPartnership for value: unincorporatedPartnership - /// - [EnumMember(Value = "unincorporatedPartnership")] - UnincorporatedPartnership = 5 - - } - - - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.. - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories.. - /// individual. - /// organization. - /// Your reference for the legal entity, maximum 150 characters.. - /// soleProprietorship. - /// trust. - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**.. - /// unincorporatedPartnership. - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification).. - public LegalEntityInfo(Dictionary capabilities = default(Dictionary), List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum? type = default(TypeEnum?), UnincorporatedPartnership unincorporatedPartnership = default(UnincorporatedPartnership), string verificationPlan = default(string)) - { - this.Capabilities = capabilities; - this.EntityAssociations = entityAssociations; - this.Individual = individual; - this.Organization = organization; - this.Reference = reference; - this.SoleProprietorship = soleProprietorship; - this.Trust = trust; - this.Type = type; - this.UnincorporatedPartnership = unincorporatedPartnership; - this.VerificationPlan = verificationPlan; - } - - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories. - /// - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories. - [DataMember(Name = "entityAssociations", EmitDefaultValue = false)] - public List EntityAssociations { get; set; } - - /// - /// Gets or Sets Individual - /// - [DataMember(Name = "individual", EmitDefaultValue = false)] - public Individual Individual { get; set; } - - /// - /// Gets or Sets Organization - /// - [DataMember(Name = "organization", EmitDefaultValue = false)] - public Organization Organization { get; set; } - - /// - /// Your reference for the legal entity, maximum 150 characters. - /// - /// Your reference for the legal entity, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets SoleProprietorship - /// - [DataMember(Name = "soleProprietorship", EmitDefaultValue = false)] - public SoleProprietorship SoleProprietorship { get; set; } - - /// - /// Gets or Sets Trust - /// - [DataMember(Name = "trust", EmitDefaultValue = false)] - public Trust Trust { get; set; } - - /// - /// Gets or Sets UnincorporatedPartnership - /// - [DataMember(Name = "unincorporatedPartnership", EmitDefaultValue = false)] - public UnincorporatedPartnership UnincorporatedPartnership { get; set; } - - /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). - /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). - [DataMember(Name = "verificationPlan", EmitDefaultValue = false)] - public string VerificationPlan { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalEntityInfo {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" EntityAssociations: ").Append(EntityAssociations).Append("\n"); - sb.Append(" Individual: ").Append(Individual).Append("\n"); - sb.Append(" Organization: ").Append(Organization).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SoleProprietorship: ").Append(SoleProprietorship).Append("\n"); - sb.Append(" Trust: ").Append(Trust).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UnincorporatedPartnership: ").Append(UnincorporatedPartnership).Append("\n"); - sb.Append(" VerificationPlan: ").Append(VerificationPlan).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalEntityInfo); - } - - /// - /// Returns true if LegalEntityInfo instances are equal - /// - /// Instance of LegalEntityInfo to be compared - /// Boolean - public bool Equals(LegalEntityInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.EntityAssociations == input.EntityAssociations || - this.EntityAssociations != null && - input.EntityAssociations != null && - this.EntityAssociations.SequenceEqual(input.EntityAssociations) - ) && - ( - this.Individual == input.Individual || - (this.Individual != null && - this.Individual.Equals(input.Individual)) - ) && - ( - this.Organization == input.Organization || - (this.Organization != null && - this.Organization.Equals(input.Organization)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SoleProprietorship == input.SoleProprietorship || - (this.SoleProprietorship != null && - this.SoleProprietorship.Equals(input.SoleProprietorship)) - ) && - ( - this.Trust == input.Trust || - (this.Trust != null && - this.Trust.Equals(input.Trust)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UnincorporatedPartnership == input.UnincorporatedPartnership || - (this.UnincorporatedPartnership != null && - this.UnincorporatedPartnership.Equals(input.UnincorporatedPartnership)) - ) && - ( - this.VerificationPlan == input.VerificationPlan || - (this.VerificationPlan != null && - this.VerificationPlan.Equals(input.VerificationPlan)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.EntityAssociations != null) - { - hashCode = (hashCode * 59) + this.EntityAssociations.GetHashCode(); - } - if (this.Individual != null) - { - hashCode = (hashCode * 59) + this.Individual.GetHashCode(); - } - if (this.Organization != null) - { - hashCode = (hashCode * 59) + this.Organization.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SoleProprietorship != null) - { - hashCode = (hashCode * 59) + this.SoleProprietorship.GetHashCode(); - } - if (this.Trust != null) - { - hashCode = (hashCode * 59) + this.Trust.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UnincorporatedPartnership != null) - { - hashCode = (hashCode * 59) + this.UnincorporatedPartnership.GetHashCode(); - } - if (this.VerificationPlan != null) - { - hashCode = (hashCode * 59) + this.VerificationPlan.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs b/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs deleted file mode 100644 index 8cdfa8f91..000000000 --- a/Adyen/Model/LegalEntityManagement/LegalEntityInfoRequiredType.cs +++ /dev/null @@ -1,343 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// LegalEntityInfoRequiredType - /// - [DataContract(Name = "LegalEntityInfoRequiredType")] - public partial class LegalEntityInfoRequiredType : IEquatable, IValidatableObject - { - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Individual for value: individual - /// - [EnumMember(Value = "individual")] - Individual = 1, - - /// - /// Enum Organization for value: organization - /// - [EnumMember(Value = "organization")] - Organization = 2, - - /// - /// Enum SoleProprietorship for value: soleProprietorship - /// - [EnumMember(Value = "soleProprietorship")] - SoleProprietorship = 3, - - /// - /// Enum Trust for value: trust - /// - [EnumMember(Value = "trust")] - Trust = 4, - - /// - /// Enum UnincorporatedPartnership for value: unincorporatedPartnership - /// - [EnumMember(Value = "unincorporatedPartnership")] - UnincorporatedPartnership = 5 - - } - - - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - /// - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected LegalEntityInfoRequiredType() { } - /// - /// Initializes a new instance of the class. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability.. - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories.. - /// individual. - /// organization. - /// Your reference for the legal entity, maximum 150 characters.. - /// soleProprietorship. - /// trust. - /// The type of legal entity. Possible values: **individual**, **organization**, **soleProprietorship**, or **trust**. (required). - /// unincorporatedPartnership. - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification).. - public LegalEntityInfoRequiredType(Dictionary capabilities = default(Dictionary), List entityAssociations = default(List), Individual individual = default(Individual), Organization organization = default(Organization), string reference = default(string), SoleProprietorship soleProprietorship = default(SoleProprietorship), Trust trust = default(Trust), TypeEnum type = default(TypeEnum), UnincorporatedPartnership unincorporatedPartnership = default(UnincorporatedPartnership), string verificationPlan = default(string)) - { - this.Type = type; - this.Capabilities = capabilities; - this.EntityAssociations = entityAssociations; - this.Individual = individual; - this.Organization = organization; - this.Reference = reference; - this.SoleProprietorship = soleProprietorship; - this.Trust = trust; - this.UnincorporatedPartnership = unincorporatedPartnership; - this.VerificationPlan = verificationPlan; - } - - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform.The key is a capability required for your integration. For example, **issueCard** for Issuing. The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories. - /// - /// List of legal entities associated with the current legal entity. For example, ultimate beneficial owners associated with an organization through ownership or control, or as signatories. - [DataMember(Name = "entityAssociations", EmitDefaultValue = false)] - public List EntityAssociations { get; set; } - - /// - /// Gets or Sets Individual - /// - [DataMember(Name = "individual", EmitDefaultValue = false)] - public Individual Individual { get; set; } - - /// - /// Gets or Sets Organization - /// - [DataMember(Name = "organization", EmitDefaultValue = false)] - public Organization Organization { get; set; } - - /// - /// Your reference for the legal entity, maximum 150 characters. - /// - /// Your reference for the legal entity, maximum 150 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets SoleProprietorship - /// - [DataMember(Name = "soleProprietorship", EmitDefaultValue = false)] - public SoleProprietorship SoleProprietorship { get; set; } - - /// - /// Gets or Sets Trust - /// - [DataMember(Name = "trust", EmitDefaultValue = false)] - public Trust Trust { get; set; } - - /// - /// Gets or Sets UnincorporatedPartnership - /// - [DataMember(Name = "unincorporatedPartnership", EmitDefaultValue = false)] - public UnincorporatedPartnership UnincorporatedPartnership { get; set; } - - /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). - /// - /// A key-value pair that specifies the verification process for a legal entity. Set to **upfront** for upfront verification for [marketplaces](https://docs.adyen.com/marketplaces/verification-overview/verification-types/#upfront-verification). - [DataMember(Name = "verificationPlan", EmitDefaultValue = false)] - public string VerificationPlan { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalEntityInfoRequiredType {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" EntityAssociations: ").Append(EntityAssociations).Append("\n"); - sb.Append(" Individual: ").Append(Individual).Append("\n"); - sb.Append(" Organization: ").Append(Organization).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SoleProprietorship: ").Append(SoleProprietorship).Append("\n"); - sb.Append(" Trust: ").Append(Trust).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UnincorporatedPartnership: ").Append(UnincorporatedPartnership).Append("\n"); - sb.Append(" VerificationPlan: ").Append(VerificationPlan).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalEntityInfoRequiredType); - } - - /// - /// Returns true if LegalEntityInfoRequiredType instances are equal - /// - /// Instance of LegalEntityInfoRequiredType to be compared - /// Boolean - public bool Equals(LegalEntityInfoRequiredType input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.EntityAssociations == input.EntityAssociations || - this.EntityAssociations != null && - input.EntityAssociations != null && - this.EntityAssociations.SequenceEqual(input.EntityAssociations) - ) && - ( - this.Individual == input.Individual || - (this.Individual != null && - this.Individual.Equals(input.Individual)) - ) && - ( - this.Organization == input.Organization || - (this.Organization != null && - this.Organization.Equals(input.Organization)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SoleProprietorship == input.SoleProprietorship || - (this.SoleProprietorship != null && - this.SoleProprietorship.Equals(input.SoleProprietorship)) - ) && - ( - this.Trust == input.Trust || - (this.Trust != null && - this.Trust.Equals(input.Trust)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UnincorporatedPartnership == input.UnincorporatedPartnership || - (this.UnincorporatedPartnership != null && - this.UnincorporatedPartnership.Equals(input.UnincorporatedPartnership)) - ) && - ( - this.VerificationPlan == input.VerificationPlan || - (this.VerificationPlan != null && - this.VerificationPlan.Equals(input.VerificationPlan)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.EntityAssociations != null) - { - hashCode = (hashCode * 59) + this.EntityAssociations.GetHashCode(); - } - if (this.Individual != null) - { - hashCode = (hashCode * 59) + this.Individual.GetHashCode(); - } - if (this.Organization != null) - { - hashCode = (hashCode * 59) + this.Organization.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SoleProprietorship != null) - { - hashCode = (hashCode * 59) + this.SoleProprietorship.GetHashCode(); - } - if (this.Trust != null) - { - hashCode = (hashCode * 59) + this.Trust.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UnincorporatedPartnership != null) - { - hashCode = (hashCode * 59) + this.UnincorporatedPartnership.GetHashCode(); - } - if (this.VerificationPlan != null) - { - hashCode = (hashCode * 59) + this.VerificationPlan.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.cs deleted file mode 100644 index 730d4ee32..000000000 --- a/Adyen/Model/LegalEntityManagement/NOLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// NOLocalAccountIdentification - /// - [DataContract(Name = "NOLocalAccountIdentification")] - public partial class NOLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **noLocal** - /// - /// **noLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NoLocal for value: noLocal - /// - [EnumMember(Value = "noLocal")] - NoLocal = 1 - - } - - - /// - /// **noLocal** - /// - /// **noLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NOLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 11-digit bank account number, without separators or whitespace. (required). - /// **noLocal** (required) (default to TypeEnum.NoLocal). - public NOLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NoLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 11-digit bank account number, without separators or whitespace. - /// - /// The 11-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NOLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NOLocalAccountIdentification); - } - - /// - /// Returns true if NOLocalAccountIdentification instances are equal - /// - /// Instance of NOLocalAccountIdentification to be compared - /// Boolean - public bool Equals(NOLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 11.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 11.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.cs deleted file mode 100644 index a499dea0f..000000000 --- a/Adyen/Model/LegalEntityManagement/NZLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// NZLocalAccountIdentification - /// - [DataContract(Name = "NZLocalAccountIdentification")] - public partial class NZLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **nzLocal** - /// - /// **nzLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NzLocal for value: nzLocal - /// - [EnumMember(Value = "nzLocal")] - NzLocal = 1 - - } - - - /// - /// **nzLocal** - /// - /// **nzLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NZLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. (required). - /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NZLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NZLocalAccountIdentification); - } - - /// - /// Returns true if NZLocalAccountIdentification instances are equal - /// - /// Instance of NZLocalAccountIdentification to be compared - /// Boolean - public bool Equals(NZLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 16.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 15) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 15.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Name.cs b/Adyen/Model/LegalEntityManagement/Name.cs deleted file mode 100644 index 80c786bc8..000000000 --- a/Adyen/Model/LegalEntityManagement/Name.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Name - /// - [DataContract(Name = "Name")] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// The individual's first name. Must not be blank. (required). - /// The infix in the individual's name, if any.. - /// The individual's last name. Must not be blank. (required). - public Name(string firstName = default(string), string infix = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.LastName = lastName; - this.Infix = infix; - } - - /// - /// The individual's first name. Must not be blank. - /// - /// The individual's first name. Must not be blank. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The infix in the individual's name, if any. - /// - /// The infix in the individual's name, if any. - [DataMember(Name = "infix", EmitDefaultValue = false)] - public string Infix { get; set; } - - /// - /// The individual's last name. Must not be blank. - /// - /// The individual's last name. Must not be blank. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" Infix: ").Append(Infix).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.Infix == input.Infix || - (this.Infix != null && - this.Infix.Equals(input.Infix)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.Infix != null) - { - hashCode = (hashCode * 59) + this.Infix.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.cs deleted file mode 100644 index 31296fa99..000000000 --- a/Adyen/Model/LegalEntityManagement/NumberAndBicAccountIdentification.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// NumberAndBicAccountIdentification - /// - [DataContract(Name = "NumberAndBicAccountIdentification")] - public partial class NumberAndBicAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **numberAndBic** - /// - /// **numberAndBic** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NumberAndBic for value: numberAndBic - /// - [EnumMember(Value = "numberAndBic")] - NumberAndBic = 1 - - } - - - /// - /// **numberAndBic** - /// - /// **numberAndBic** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NumberAndBicAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. (required). - /// additionalBankIdentification. - /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// **numberAndBic** (required) (default to TypeEnum.NumberAndBic). - public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), TypeEnum type = TypeEnum.NumberAndBic) - { - this.AccountNumber = accountNumber; - this.Bic = bic; - this.Type = type; - this.AdditionalBankIdentification = additionalBankIdentification; - } - - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Gets or Sets AdditionalBankIdentification - /// - [DataMember(Name = "additionalBankIdentification", EmitDefaultValue = false)] - public AdditionalBankIdentification AdditionalBankIdentification { get; set; } - - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NumberAndBicAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AdditionalBankIdentification: ").Append(AdditionalBankIdentification).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberAndBicAccountIdentification); - } - - /// - /// Returns true if NumberAndBicAccountIdentification instances are equal - /// - /// Instance of NumberAndBicAccountIdentification to be compared - /// Boolean - public bool Equals(NumberAndBicAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AdditionalBankIdentification == input.AdditionalBankIdentification || - (this.AdditionalBankIdentification != null && - this.AdditionalBankIdentification.Equals(input.AdditionalBankIdentification)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AdditionalBankIdentification != null) - { - hashCode = (hashCode * 59) + this.AdditionalBankIdentification.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 34) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 34.", new [] { "AccountNumber" }); - } - - // Bic (string) maxLength - if (this.Bic != null && this.Bic.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be less than 11.", new [] { "Bic" }); - } - - // Bic (string) minLength - if (this.Bic != null && this.Bic.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be greater than 8.", new [] { "Bic" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/OnboardingLink.cs b/Adyen/Model/LegalEntityManagement/OnboardingLink.cs deleted file mode 100644 index 0764cfa28..000000000 --- a/Adyen/Model/LegalEntityManagement/OnboardingLink.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// OnboardingLink - /// - [DataContract(Name = "OnboardingLink")] - public partial class OnboardingLink : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The URL of the hosted onboarding page where you need to redirect your user. This URL: - Expires after 4 minutes. - Can only be used once. - Can only be clicked once by the user. If the link expires, you need to create a new link.. - public OnboardingLink(string url = default(string)) - { - this.Url = url; - } - - /// - /// The URL of the hosted onboarding page where you need to redirect your user. This URL: - Expires after 4 minutes. - Can only be used once. - Can only be clicked once by the user. If the link expires, you need to create a new link. - /// - /// The URL of the hosted onboarding page where you need to redirect your user. This URL: - Expires after 4 minutes. - Can only be used once. - Can only be clicked once by the user. If the link expires, you need to create a new link. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OnboardingLink {\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OnboardingLink); - } - - /// - /// Returns true if OnboardingLink instances are equal - /// - /// Instance of OnboardingLink to be compared - /// Boolean - public bool Equals(OnboardingLink input) - { - if (input == null) - { - return false; - } - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.cs b/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.cs deleted file mode 100644 index bef53e925..000000000 --- a/Adyen/Model/LegalEntityManagement/OnboardingLinkInfo.cs +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// OnboardingLinkInfo - /// - [DataContract(Name = "OnboardingLinkInfo")] - public partial class OnboardingLinkInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The language that will be used for the page, specified by a combination of two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language and [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. See possible valuesfor [marketplaces](https://docs.adyen.com/marketplaces/onboard-users/hosted#supported-languages) or [platforms](https://docs.adyen.com/platforms/onboard-users/hosted#supported-languages). If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default.. - /// The URL where the user is redirected after they complete hosted onboarding.. - /// settings. - /// The unique identifier of the hosted onboarding theme.. - public OnboardingLinkInfo(string locale = default(string), string redirectUrl = default(string), OnboardingLinkSettings settings = default(OnboardingLinkSettings), string themeId = default(string)) - { - this.Locale = locale; - this.RedirectUrl = redirectUrl; - this.Settings = settings; - this.ThemeId = themeId; - } - - /// - /// The language that will be used for the page, specified by a combination of two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language and [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. See possible valuesfor [marketplaces](https://docs.adyen.com/marketplaces/onboard-users/hosted#supported-languages) or [platforms](https://docs.adyen.com/platforms/onboard-users/hosted#supported-languages). If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default. - /// - /// The language that will be used for the page, specified by a combination of two letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) language and [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country codes. See possible valuesfor [marketplaces](https://docs.adyen.com/marketplaces/onboard-users/hosted#supported-languages) or [platforms](https://docs.adyen.com/platforms/onboard-users/hosted#supported-languages). If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default. - [DataMember(Name = "locale", EmitDefaultValue = false)] - public string Locale { get; set; } - - /// - /// The URL where the user is redirected after they complete hosted onboarding. - /// - /// The URL where the user is redirected after they complete hosted onboarding. - [DataMember(Name = "redirectUrl", EmitDefaultValue = false)] - public string RedirectUrl { get; set; } - - /// - /// Gets or Sets Settings - /// - [DataMember(Name = "settings", EmitDefaultValue = false)] - public OnboardingLinkSettings Settings { get; set; } - - /// - /// The unique identifier of the hosted onboarding theme. - /// - /// The unique identifier of the hosted onboarding theme. - [DataMember(Name = "themeId", EmitDefaultValue = false)] - public string ThemeId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OnboardingLinkInfo {\n"); - sb.Append(" Locale: ").Append(Locale).Append("\n"); - sb.Append(" RedirectUrl: ").Append(RedirectUrl).Append("\n"); - sb.Append(" Settings: ").Append(Settings).Append("\n"); - sb.Append(" ThemeId: ").Append(ThemeId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OnboardingLinkInfo); - } - - /// - /// Returns true if OnboardingLinkInfo instances are equal - /// - /// Instance of OnboardingLinkInfo to be compared - /// Boolean - public bool Equals(OnboardingLinkInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Locale == input.Locale || - (this.Locale != null && - this.Locale.Equals(input.Locale)) - ) && - ( - this.RedirectUrl == input.RedirectUrl || - (this.RedirectUrl != null && - this.RedirectUrl.Equals(input.RedirectUrl)) - ) && - ( - this.Settings == input.Settings || - (this.Settings != null && - this.Settings.Equals(input.Settings)) - ) && - ( - this.ThemeId == input.ThemeId || - (this.ThemeId != null && - this.ThemeId.Equals(input.ThemeId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Locale != null) - { - hashCode = (hashCode * 59) + this.Locale.GetHashCode(); - } - if (this.RedirectUrl != null) - { - hashCode = (hashCode * 59) + this.RedirectUrl.GetHashCode(); - } - if (this.Settings != null) - { - hashCode = (hashCode * 59) + this.Settings.GetHashCode(); - } - if (this.ThemeId != null) - { - hashCode = (hashCode * 59) + this.ThemeId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.cs b/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.cs deleted file mode 100644 index 828823dd3..000000000 --- a/Adyen/Model/LegalEntityManagement/OnboardingLinkSettings.cs +++ /dev/null @@ -1,370 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// OnboardingLinkSettings - /// - [DataContract(Name = "OnboardingLinkSettings")] - public partial class OnboardingLinkSettings : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of countries the user can choose from in hosted onboarding when `editPrefilledCountry` is allowed. The value must be in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code format. The array is empty by default, allowing all [countries and regions supported by hosted onboarding](https://docs.adyen.com/platforms/onboard-users/#hosted-onboarding).. - /// Default value: **false** Indicates if the user can select the format for their payout account (if applicable).. - /// Default value: **true** Indicates whether the debug user interface (UI) is enabled. The debug UI provides information for your support staff to diagnose and resolve user issues during onboarding. It can be accessed using a keyboard shortcut.. - /// Default value: **false** Indicates if the user can select a payout account in a different EU/EEA location (including Switzerland and the UK) than the location of their legal entity.. - /// Default value: **true** Indicates if the user can change their legal entity type.. - /// Default value: **true** Indicates if the user can change the country of their legal entity's address, for example the registered address of an organization.. - /// Default value: **false** Indicates if only users above the age of 18 can be onboarded.. - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the individual legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process.. - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the organization legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process.. - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the sole proprietorship legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process.. - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the trust legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process.. - /// Default value: **true** Indicates if the user can initiate the verification process through open banking providers, like Plaid or Tink.. - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **ecomMoto** sales channel type.. - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **eCommerce** sales channel type.. - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **pos** sales channel type.. - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **posMoto** sales channel type.. - /// The maximum number of transfer instruments the user can create.. - public OnboardingLinkSettings(List acceptedCountries = default(List), bool? allowBankAccountFormatSelection = default(bool?), bool? allowDebugUi = default(bool?), bool? allowIntraRegionCrossBorderPayout = default(bool?), bool? changeLegalEntityType = default(bool?), bool? editPrefilledCountry = default(bool?), bool? enforceLegalAge = default(bool?), bool? hideOnboardingIntroductionIndividual = default(bool?), bool? hideOnboardingIntroductionOrganization = default(bool?), bool? hideOnboardingIntroductionSoleProprietor = default(bool?), bool? hideOnboardingIntroductionTrust = default(bool?), bool? instantBankVerification = default(bool?), bool? requirePciSignEcomMoto = default(bool?), bool? requirePciSignEcommerce = default(bool?), bool? requirePciSignPos = default(bool?), bool? requirePciSignPosMoto = default(bool?), int? transferInstrumentLimit = default(int?)) - { - this.AcceptedCountries = acceptedCountries; - this.AllowBankAccountFormatSelection = allowBankAccountFormatSelection; - this.AllowDebugUi = allowDebugUi; - this.AllowIntraRegionCrossBorderPayout = allowIntraRegionCrossBorderPayout; - this.ChangeLegalEntityType = changeLegalEntityType; - this.EditPrefilledCountry = editPrefilledCountry; - this.EnforceLegalAge = enforceLegalAge; - this.HideOnboardingIntroductionIndividual = hideOnboardingIntroductionIndividual; - this.HideOnboardingIntroductionOrganization = hideOnboardingIntroductionOrganization; - this.HideOnboardingIntroductionSoleProprietor = hideOnboardingIntroductionSoleProprietor; - this.HideOnboardingIntroductionTrust = hideOnboardingIntroductionTrust; - this.InstantBankVerification = instantBankVerification; - this.RequirePciSignEcomMoto = requirePciSignEcomMoto; - this.RequirePciSignEcommerce = requirePciSignEcommerce; - this.RequirePciSignPos = requirePciSignPos; - this.RequirePciSignPosMoto = requirePciSignPosMoto; - this.TransferInstrumentLimit = transferInstrumentLimit; - } - - /// - /// The list of countries the user can choose from in hosted onboarding when `editPrefilledCountry` is allowed. The value must be in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code format. The array is empty by default, allowing all [countries and regions supported by hosted onboarding](https://docs.adyen.com/platforms/onboard-users/#hosted-onboarding). - /// - /// The list of countries the user can choose from in hosted onboarding when `editPrefilledCountry` is allowed. The value must be in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code format. The array is empty by default, allowing all [countries and regions supported by hosted onboarding](https://docs.adyen.com/platforms/onboard-users/#hosted-onboarding). - [DataMember(Name = "acceptedCountries", EmitDefaultValue = false)] - public List AcceptedCountries { get; set; } - - /// - /// Default value: **false** Indicates if the user can select the format for their payout account (if applicable). - /// - /// Default value: **false** Indicates if the user can select the format for their payout account (if applicable). - [DataMember(Name = "allowBankAccountFormatSelection", EmitDefaultValue = false)] - public bool? AllowBankAccountFormatSelection { get; set; } - - /// - /// Default value: **true** Indicates whether the debug user interface (UI) is enabled. The debug UI provides information for your support staff to diagnose and resolve user issues during onboarding. It can be accessed using a keyboard shortcut. - /// - /// Default value: **true** Indicates whether the debug user interface (UI) is enabled. The debug UI provides information for your support staff to diagnose and resolve user issues during onboarding. It can be accessed using a keyboard shortcut. - [DataMember(Name = "allowDebugUi", EmitDefaultValue = false)] - public bool? AllowDebugUi { get; set; } - - /// - /// Default value: **false** Indicates if the user can select a payout account in a different EU/EEA location (including Switzerland and the UK) than the location of their legal entity. - /// - /// Default value: **false** Indicates if the user can select a payout account in a different EU/EEA location (including Switzerland and the UK) than the location of their legal entity. - [DataMember(Name = "allowIntraRegionCrossBorderPayout", EmitDefaultValue = false)] - public bool? AllowIntraRegionCrossBorderPayout { get; set; } - - /// - /// Default value: **true** Indicates if the user can change their legal entity type. - /// - /// Default value: **true** Indicates if the user can change their legal entity type. - [DataMember(Name = "changeLegalEntityType", EmitDefaultValue = false)] - public bool? ChangeLegalEntityType { get; set; } - - /// - /// Default value: **true** Indicates if the user can change the country of their legal entity's address, for example the registered address of an organization. - /// - /// Default value: **true** Indicates if the user can change the country of their legal entity's address, for example the registered address of an organization. - [DataMember(Name = "editPrefilledCountry", EmitDefaultValue = false)] - public bool? EditPrefilledCountry { get; set; } - - /// - /// Default value: **false** Indicates if only users above the age of 18 can be onboarded. - /// - /// Default value: **false** Indicates if only users above the age of 18 can be onboarded. - [DataMember(Name = "enforceLegalAge", EmitDefaultValue = false)] - public bool? EnforceLegalAge { get; set; } - - /// - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the individual legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. - /// - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the individual legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. - [DataMember(Name = "hideOnboardingIntroductionIndividual", EmitDefaultValue = false)] - public bool? HideOnboardingIntroductionIndividual { get; set; } - - /// - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the organization legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. - /// - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the organization legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. - [DataMember(Name = "hideOnboardingIntroductionOrganization", EmitDefaultValue = false)] - public bool? HideOnboardingIntroductionOrganization { get; set; } - - /// - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the sole proprietorship legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. - /// - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the sole proprietorship legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. - [DataMember(Name = "hideOnboardingIntroductionSoleProprietor", EmitDefaultValue = false)] - public bool? HideOnboardingIntroductionSoleProprietor { get; set; } - - /// - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the trust legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. - /// - /// Default value: **true** Indicates whether the introduction screen is hidden for the user of the trust legal entity type. The introduction screen provides brief instructions for the subsequent steps in the hosted onboarding process. - [DataMember(Name = "hideOnboardingIntroductionTrust", EmitDefaultValue = false)] - public bool? HideOnboardingIntroductionTrust { get; set; } - - /// - /// Default value: **true** Indicates if the user can initiate the verification process through open banking providers, like Plaid or Tink. - /// - /// Default value: **true** Indicates if the user can initiate the verification process through open banking providers, like Plaid or Tink. - [DataMember(Name = "instantBankVerification", EmitDefaultValue = false)] - public bool? InstantBankVerification { get; set; } - - /// - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **ecomMoto** sales channel type. - /// - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **ecomMoto** sales channel type. - [DataMember(Name = "requirePciSignEcomMoto", EmitDefaultValue = false)] - public bool? RequirePciSignEcomMoto { get; set; } - - /// - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **eCommerce** sales channel type. - /// - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **eCommerce** sales channel type. - [DataMember(Name = "requirePciSignEcommerce", EmitDefaultValue = false)] - public bool? RequirePciSignEcommerce { get; set; } - - /// - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **pos** sales channel type. - /// - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **pos** sales channel type. - [DataMember(Name = "requirePciSignPos", EmitDefaultValue = false)] - public bool? RequirePciSignPos { get; set; } - - /// - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **posMoto** sales channel type. - /// - /// Default value: **false** Indicates if the user is required to sign a PCI questionnaires for the **posMoto** sales channel type. - [DataMember(Name = "requirePciSignPosMoto", EmitDefaultValue = false)] - public bool? RequirePciSignPosMoto { get; set; } - - /// - /// The maximum number of transfer instruments the user can create. - /// - /// The maximum number of transfer instruments the user can create. - [DataMember(Name = "transferInstrumentLimit", EmitDefaultValue = false)] - public int? TransferInstrumentLimit { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OnboardingLinkSettings {\n"); - sb.Append(" AcceptedCountries: ").Append(AcceptedCountries).Append("\n"); - sb.Append(" AllowBankAccountFormatSelection: ").Append(AllowBankAccountFormatSelection).Append("\n"); - sb.Append(" AllowDebugUi: ").Append(AllowDebugUi).Append("\n"); - sb.Append(" AllowIntraRegionCrossBorderPayout: ").Append(AllowIntraRegionCrossBorderPayout).Append("\n"); - sb.Append(" ChangeLegalEntityType: ").Append(ChangeLegalEntityType).Append("\n"); - sb.Append(" EditPrefilledCountry: ").Append(EditPrefilledCountry).Append("\n"); - sb.Append(" EnforceLegalAge: ").Append(EnforceLegalAge).Append("\n"); - sb.Append(" HideOnboardingIntroductionIndividual: ").Append(HideOnboardingIntroductionIndividual).Append("\n"); - sb.Append(" HideOnboardingIntroductionOrganization: ").Append(HideOnboardingIntroductionOrganization).Append("\n"); - sb.Append(" HideOnboardingIntroductionSoleProprietor: ").Append(HideOnboardingIntroductionSoleProprietor).Append("\n"); - sb.Append(" HideOnboardingIntroductionTrust: ").Append(HideOnboardingIntroductionTrust).Append("\n"); - sb.Append(" InstantBankVerification: ").Append(InstantBankVerification).Append("\n"); - sb.Append(" RequirePciSignEcomMoto: ").Append(RequirePciSignEcomMoto).Append("\n"); - sb.Append(" RequirePciSignEcommerce: ").Append(RequirePciSignEcommerce).Append("\n"); - sb.Append(" RequirePciSignPos: ").Append(RequirePciSignPos).Append("\n"); - sb.Append(" RequirePciSignPosMoto: ").Append(RequirePciSignPosMoto).Append("\n"); - sb.Append(" TransferInstrumentLimit: ").Append(TransferInstrumentLimit).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OnboardingLinkSettings); - } - - /// - /// Returns true if OnboardingLinkSettings instances are equal - /// - /// Instance of OnboardingLinkSettings to be compared - /// Boolean - public bool Equals(OnboardingLinkSettings input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptedCountries == input.AcceptedCountries || - this.AcceptedCountries != null && - input.AcceptedCountries != null && - this.AcceptedCountries.SequenceEqual(input.AcceptedCountries) - ) && - ( - this.AllowBankAccountFormatSelection == input.AllowBankAccountFormatSelection || - this.AllowBankAccountFormatSelection.Equals(input.AllowBankAccountFormatSelection) - ) && - ( - this.AllowDebugUi == input.AllowDebugUi || - this.AllowDebugUi.Equals(input.AllowDebugUi) - ) && - ( - this.AllowIntraRegionCrossBorderPayout == input.AllowIntraRegionCrossBorderPayout || - this.AllowIntraRegionCrossBorderPayout.Equals(input.AllowIntraRegionCrossBorderPayout) - ) && - ( - this.ChangeLegalEntityType == input.ChangeLegalEntityType || - this.ChangeLegalEntityType.Equals(input.ChangeLegalEntityType) - ) && - ( - this.EditPrefilledCountry == input.EditPrefilledCountry || - this.EditPrefilledCountry.Equals(input.EditPrefilledCountry) - ) && - ( - this.EnforceLegalAge == input.EnforceLegalAge || - this.EnforceLegalAge.Equals(input.EnforceLegalAge) - ) && - ( - this.HideOnboardingIntroductionIndividual == input.HideOnboardingIntroductionIndividual || - this.HideOnboardingIntroductionIndividual.Equals(input.HideOnboardingIntroductionIndividual) - ) && - ( - this.HideOnboardingIntroductionOrganization == input.HideOnboardingIntroductionOrganization || - this.HideOnboardingIntroductionOrganization.Equals(input.HideOnboardingIntroductionOrganization) - ) && - ( - this.HideOnboardingIntroductionSoleProprietor == input.HideOnboardingIntroductionSoleProprietor || - this.HideOnboardingIntroductionSoleProprietor.Equals(input.HideOnboardingIntroductionSoleProprietor) - ) && - ( - this.HideOnboardingIntroductionTrust == input.HideOnboardingIntroductionTrust || - this.HideOnboardingIntroductionTrust.Equals(input.HideOnboardingIntroductionTrust) - ) && - ( - this.InstantBankVerification == input.InstantBankVerification || - this.InstantBankVerification.Equals(input.InstantBankVerification) - ) && - ( - this.RequirePciSignEcomMoto == input.RequirePciSignEcomMoto || - this.RequirePciSignEcomMoto.Equals(input.RequirePciSignEcomMoto) - ) && - ( - this.RequirePciSignEcommerce == input.RequirePciSignEcommerce || - this.RequirePciSignEcommerce.Equals(input.RequirePciSignEcommerce) - ) && - ( - this.RequirePciSignPos == input.RequirePciSignPos || - this.RequirePciSignPos.Equals(input.RequirePciSignPos) - ) && - ( - this.RequirePciSignPosMoto == input.RequirePciSignPosMoto || - this.RequirePciSignPosMoto.Equals(input.RequirePciSignPosMoto) - ) && - ( - this.TransferInstrumentLimit == input.TransferInstrumentLimit || - this.TransferInstrumentLimit.Equals(input.TransferInstrumentLimit) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcceptedCountries != null) - { - hashCode = (hashCode * 59) + this.AcceptedCountries.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AllowBankAccountFormatSelection.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowDebugUi.GetHashCode(); - hashCode = (hashCode * 59) + this.AllowIntraRegionCrossBorderPayout.GetHashCode(); - hashCode = (hashCode * 59) + this.ChangeLegalEntityType.GetHashCode(); - hashCode = (hashCode * 59) + this.EditPrefilledCountry.GetHashCode(); - hashCode = (hashCode * 59) + this.EnforceLegalAge.GetHashCode(); - hashCode = (hashCode * 59) + this.HideOnboardingIntroductionIndividual.GetHashCode(); - hashCode = (hashCode * 59) + this.HideOnboardingIntroductionOrganization.GetHashCode(); - hashCode = (hashCode * 59) + this.HideOnboardingIntroductionSoleProprietor.GetHashCode(); - hashCode = (hashCode * 59) + this.HideOnboardingIntroductionTrust.GetHashCode(); - hashCode = (hashCode * 59) + this.InstantBankVerification.GetHashCode(); - hashCode = (hashCode * 59) + this.RequirePciSignEcomMoto.GetHashCode(); - hashCode = (hashCode * 59) + this.RequirePciSignEcommerce.GetHashCode(); - hashCode = (hashCode * 59) + this.RequirePciSignPos.GetHashCode(); - hashCode = (hashCode * 59) + this.RequirePciSignPosMoto.GetHashCode(); - hashCode = (hashCode * 59) + this.TransferInstrumentLimit.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/OnboardingTheme.cs b/Adyen/Model/LegalEntityManagement/OnboardingTheme.cs deleted file mode 100644 index 604f83c7b..000000000 --- a/Adyen/Model/LegalEntityManagement/OnboardingTheme.cs +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// OnboardingTheme - /// - [DataContract(Name = "OnboardingTheme")] - public partial class OnboardingTheme : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OnboardingTheme() { } - /// - /// Initializes a new instance of the class. - /// - /// The creation date of the theme. (required). - /// The description of the theme.. - /// The unique identifier of the theme. (required). - /// The properties of the theme. (required). - /// The date when the theme was last updated.. - public OnboardingTheme(DateTime createdAt = default(DateTime), string description = default(string), string id = default(string), Dictionary properties = default(Dictionary), DateTime updatedAt = default(DateTime)) - { - this.CreatedAt = createdAt; - this.Id = id; - this.Properties = properties; - this.Description = description; - this.UpdatedAt = updatedAt; - } - - /// - /// The creation date of the theme. - /// - /// The creation date of the theme. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// The description of the theme. - /// - /// The description of the theme. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the theme. - /// - /// The unique identifier of the theme. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The properties of the theme. - /// - /// The properties of the theme. - [DataMember(Name = "properties", IsRequired = false, EmitDefaultValue = false)] - public Dictionary Properties { get; set; } - - /// - /// The date when the theme was last updated. - /// - /// The date when the theme was last updated. - [DataMember(Name = "updatedAt", EmitDefaultValue = false)] - public DateTime UpdatedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OnboardingTheme {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Properties: ").Append(Properties).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OnboardingTheme); - } - - /// - /// Returns true if OnboardingTheme instances are equal - /// - /// Instance of OnboardingTheme to be compared - /// Boolean - public bool Equals(OnboardingTheme input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Properties == input.Properties || - this.Properties != null && - input.Properties != null && - this.Properties.SequenceEqual(input.Properties) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Properties != null) - { - hashCode = (hashCode * 59) + this.Properties.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/OnboardingThemes.cs b/Adyen/Model/LegalEntityManagement/OnboardingThemes.cs deleted file mode 100644 index 25aee95f9..000000000 --- a/Adyen/Model/LegalEntityManagement/OnboardingThemes.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// OnboardingThemes - /// - [DataContract(Name = "OnboardingThemes")] - public partial class OnboardingThemes : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OnboardingThemes() { } - /// - /// Initializes a new instance of the class. - /// - /// The next page. Only present if there is a next page.. - /// The previous page. Only present if there is a previous page.. - /// List of onboarding themes. (required). - public OnboardingThemes(string next = default(string), string previous = default(string), List themes = default(List)) - { - this.Themes = themes; - this.Next = next; - this.Previous = previous; - } - - /// - /// The next page. Only present if there is a next page. - /// - /// The next page. Only present if there is a next page. - [DataMember(Name = "next", EmitDefaultValue = false)] - public string Next { get; set; } - - /// - /// The previous page. Only present if there is a previous page. - /// - /// The previous page. Only present if there is a previous page. - [DataMember(Name = "previous", EmitDefaultValue = false)] - public string Previous { get; set; } - - /// - /// List of onboarding themes. - /// - /// List of onboarding themes. - [DataMember(Name = "themes", IsRequired = false, EmitDefaultValue = false)] - public List Themes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OnboardingThemes {\n"); - sb.Append(" Next: ").Append(Next).Append("\n"); - sb.Append(" Previous: ").Append(Previous).Append("\n"); - sb.Append(" Themes: ").Append(Themes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OnboardingThemes); - } - - /// - /// Returns true if OnboardingThemes instances are equal - /// - /// Instance of OnboardingThemes to be compared - /// Boolean - public bool Equals(OnboardingThemes input) - { - if (input == null) - { - return false; - } - return - ( - this.Next == input.Next || - (this.Next != null && - this.Next.Equals(input.Next)) - ) && - ( - this.Previous == input.Previous || - (this.Previous != null && - this.Previous.Equals(input.Previous)) - ) && - ( - this.Themes == input.Themes || - this.Themes != null && - input.Themes != null && - this.Themes.SequenceEqual(input.Themes) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Next != null) - { - hashCode = (hashCode * 59) + this.Next.GetHashCode(); - } - if (this.Previous != null) - { - hashCode = (hashCode * 59) + this.Previous.GetHashCode(); - } - if (this.Themes != null) - { - hashCode = (hashCode * 59) + this.Themes.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Organization.cs b/Adyen/Model/LegalEntityManagement/Organization.cs deleted file mode 100644 index 84c3975e0..000000000 --- a/Adyen/Model/LegalEntityManagement/Organization.cs +++ /dev/null @@ -1,832 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Organization - /// - [DataContract(Name = "Organization")] - public partial class Organization : IEquatable, IValidatableObject - { - /// - /// The institutional sector the organization operates within. - /// - /// The institutional sector the organization operates within. - [JsonConverter(typeof(StringEnumConverter))] - public enum InstitutionalSectorEnum - { - /// - /// Enum NonFinancialCorporation for value: nonFinancialCorporation - /// - [EnumMember(Value = "nonFinancialCorporation")] - NonFinancialCorporation = 1, - - /// - /// Enum CentralBank for value: centralBank - /// - [EnumMember(Value = "centralBank")] - CentralBank = 2, - - /// - /// Enum CreditInstitutions for value: creditInstitutions - /// - [EnumMember(Value = "creditInstitutions")] - CreditInstitutions = 3, - - /// - /// Enum DepositTakingCorporations for value: depositTakingCorporations - /// - [EnumMember(Value = "depositTakingCorporations")] - DepositTakingCorporations = 4, - - /// - /// Enum MoneyMarketFunds for value: moneyMarketFunds - /// - [EnumMember(Value = "moneyMarketFunds")] - MoneyMarketFunds = 5, - - /// - /// Enum NonMMFInvestmentFunds for value: nonMMFInvestmentFunds - /// - [EnumMember(Value = "nonMMFInvestmentFunds")] - NonMMFInvestmentFunds = 6, - - /// - /// Enum FinancialVehicleCorporation for value: financialVehicleCorporation - /// - [EnumMember(Value = "financialVehicleCorporation")] - FinancialVehicleCorporation = 7, - - /// - /// Enum OtherFinancialIntermediaries for value: otherFinancialIntermediaries - /// - [EnumMember(Value = "otherFinancialIntermediaries")] - OtherFinancialIntermediaries = 8, - - /// - /// Enum FinancialAuxiliaries for value: financialAuxiliaries - /// - [EnumMember(Value = "financialAuxiliaries")] - FinancialAuxiliaries = 9, - - /// - /// Enum CaptiveFinancialInstitutionsAndMoneyLenders for value: captiveFinancialInstitutionsAndMoneyLenders - /// - [EnumMember(Value = "captiveFinancialInstitutionsAndMoneyLenders")] - CaptiveFinancialInstitutionsAndMoneyLenders = 10, - - /// - /// Enum InsuranceCorporations for value: insuranceCorporations - /// - [EnumMember(Value = "insuranceCorporations")] - InsuranceCorporations = 11, - - /// - /// Enum PensionFunds for value: pensionFunds - /// - [EnumMember(Value = "pensionFunds")] - PensionFunds = 12, - - /// - /// Enum CentralGovernment for value: centralGovernment - /// - [EnumMember(Value = "centralGovernment")] - CentralGovernment = 13, - - /// - /// Enum StateGovernment for value: stateGovernment - /// - [EnumMember(Value = "stateGovernment")] - StateGovernment = 14, - - /// - /// Enum LocalGovernment for value: localGovernment - /// - [EnumMember(Value = "localGovernment")] - LocalGovernment = 15, - - /// - /// Enum SocialSecurityFunds for value: socialSecurityFunds - /// - [EnumMember(Value = "socialSecurityFunds")] - SocialSecurityFunds = 16, - - /// - /// Enum NonProfitInstitutionsServingHouseholds for value: nonProfitInstitutionsServingHouseholds - /// - [EnumMember(Value = "nonProfitInstitutionsServingHouseholds")] - NonProfitInstitutionsServingHouseholds = 17 - - } - - - /// - /// The institutional sector the organization operates within. - /// - /// The institutional sector the organization operates within. - [DataMember(Name = "institutionalSector", EmitDefaultValue = false)] - public InstitutionalSectorEnum? InstitutionalSector { get; set; } - /// - /// The status of any current or past legal action taken against the legal entity. Possible values: **noLegalActionsTaken**, **underJudicialAdministration**, **bankruptcyInsolvency**, **otherLegalMeasures** If the value of this field is **noLegalActionsTaken**, then `dateOfInitiationOfLegalProceeding` is not required. Otherwise, it is required. - /// - /// The status of any current or past legal action taken against the legal entity. Possible values: **noLegalActionsTaken**, **underJudicialAdministration**, **bankruptcyInsolvency**, **otherLegalMeasures** If the value of this field is **noLegalActionsTaken**, then `dateOfInitiationOfLegalProceeding` is not required. Otherwise, it is required. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusOfLegalProceedingEnum - { - /// - /// Enum NoLegalActionsTaken for value: noLegalActionsTaken - /// - [EnumMember(Value = "noLegalActionsTaken")] - NoLegalActionsTaken = 1, - - /// - /// Enum UnderJudicialAdministration for value: underJudicialAdministration - /// - [EnumMember(Value = "underJudicialAdministration")] - UnderJudicialAdministration = 2, - - /// - /// Enum BankruptcyInsolvency for value: bankruptcyInsolvency - /// - [EnumMember(Value = "bankruptcyInsolvency")] - BankruptcyInsolvency = 3, - - /// - /// Enum OtherLegalMeasures for value: otherLegalMeasures - /// - [EnumMember(Value = "otherLegalMeasures")] - OtherLegalMeasures = 4 - - } - - - /// - /// The status of any current or past legal action taken against the legal entity. Possible values: **noLegalActionsTaken**, **underJudicialAdministration**, **bankruptcyInsolvency**, **otherLegalMeasures** If the value of this field is **noLegalActionsTaken**, then `dateOfInitiationOfLegalProceeding` is not required. Otherwise, it is required. - /// - /// The status of any current or past legal action taken against the legal entity. Possible values: **noLegalActionsTaken**, **underJudicialAdministration**, **bankruptcyInsolvency**, **otherLegalMeasures** If the value of this field is **noLegalActionsTaken**, then `dateOfInitiationOfLegalProceeding` is not required. Otherwise, it is required. - [DataMember(Name = "statusOfLegalProceeding", EmitDefaultValue = false)] - public StatusOfLegalProceedingEnum? StatusOfLegalProceeding { get; set; } - /// - /// Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. - /// - /// Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AssociationIncorporated for value: associationIncorporated - /// - [EnumMember(Value = "associationIncorporated")] - AssociationIncorporated = 1, - - /// - /// Enum GovernmentalOrganization for value: governmentalOrganization - /// - [EnumMember(Value = "governmentalOrganization")] - GovernmentalOrganization = 2, - - /// - /// Enum ListedPublicCompany for value: listedPublicCompany - /// - [EnumMember(Value = "listedPublicCompany")] - ListedPublicCompany = 3, - - /// - /// Enum NonProfit for value: nonProfit - /// - [EnumMember(Value = "nonProfit")] - NonProfit = 4, - - /// - /// Enum PartnershipIncorporated for value: partnershipIncorporated - /// - [EnumMember(Value = "partnershipIncorporated")] - PartnershipIncorporated = 5, - - /// - /// Enum PrivateCompany for value: privateCompany - /// - [EnumMember(Value = "privateCompany")] - PrivateCompany = 6 - - } - - - /// - /// Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. - /// - /// Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// The reason the organization has not provided a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason the organization has not provided a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [JsonConverter(typeof(StringEnumConverter))] - public enum VatAbsenceReasonEnum - { - /// - /// Enum IndustryExemption for value: industryExemption - /// - [EnumMember(Value = "industryExemption")] - IndustryExemption = 1, - - /// - /// Enum BelowTaxThreshold for value: belowTaxThreshold - /// - [EnumMember(Value = "belowTaxThreshold")] - BelowTaxThreshold = 2 - - } - - - /// - /// The reason the organization has not provided a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason the organization has not provided a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [DataMember(Name = "vatAbsenceReason", EmitDefaultValue = false)] - public VatAbsenceReasonEnum? VatAbsenceReason { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Organization() { } - /// - /// Initializes a new instance of the class. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country.. - /// The date when the organization was incorporated in YYYY-MM-DD format.. - /// Required if the value of `statusOfLegalProceeding` is one of the following: **underJudicialAdministration**, **bankruptcyInsolvency**, **otherLegalMeasures** The date at which a legal proceeding was initiated, in **YYYY-MM-DD** format. Example: **2000-02-12** . - /// Your description for the organization.. - /// The organization's trading name, if different from the registered legal name.. - /// Set this to **true** if the organization or legal arrangement does not have a `Doing business as` name.. - /// The sector of the economy the legal entity operates within, represented by a 2-4 digit code that may include a \".\". Example: 45.11 You can locate economic sector codes for your area by referencing codes defined by the NACE (Nomenclature of Economic Activities) used in the European Union. . - /// The email address of the legal entity.. - /// The financial report information of the organization.. - /// The global legal entity identifier for the organization.. - /// Indicates that the registered business address is also the company's headquarters.. - /// The institutional sector the organization operates within.. - /// The type of business entity as defined in the national legal system. Use a legal form listed within the accepted legal forms compiled by the Central Bank of Europe. . - /// The organization's legal name. (required). - /// phone. - /// principalPlaceOfBusiness. - /// registeredAddress (required). - /// The organization's registration number.. - /// Set this to **true** if the organization does not have a registration number available. Only applicable for organizations in New Zealand, and incorporated partnerships and government organizations in Australia.. - /// The status of any current or past legal action taken against the legal entity. Possible values: **noLegalActionsTaken**, **underJudicialAdministration**, **bankruptcyInsolvency**, **otherLegalMeasures** If the value of this field is **noLegalActionsTaken**, then `dateOfInitiationOfLegalProceeding` is not required. Otherwise, it is required. . - /// stockData. - /// support. - /// The tax information of the organization.. - /// taxReportingClassification. - /// Type of organization. Possible values: **associationIncorporated**, **governmentalOrganization**, **listedPublicCompany**, **nonProfit**, **partnershipIncorporated**, **privateCompany**.. - /// The reason the organization has not provided a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**.. - /// The organization's VAT number.. - /// webData. - public Organization(string countryOfGoverningLaw = default(string), string dateOfIncorporation = default(string), string dateOfInitiationOfLegalProceeding = default(string), string description = default(string), string doingBusinessAs = default(string), bool? doingBusinessAsAbsent = default(bool?), string economicSector = default(string), string email = default(string), List financialReports = default(List), string globalLegalEntityIdentifier = default(string), bool? headOfficeIndicator = default(bool?), InstitutionalSectorEnum? institutionalSector = default(InstitutionalSectorEnum?), string legalForm = default(string), string legalName = default(string), PhoneNumber phone = default(PhoneNumber), Address principalPlaceOfBusiness = default(Address), Address registeredAddress = default(Address), string registrationNumber = default(string), bool? registrationNumberAbsent = default(bool?), StatusOfLegalProceedingEnum? statusOfLegalProceeding = default(StatusOfLegalProceedingEnum?), StockData stockData = default(StockData), Support support = default(Support), List taxInformation = default(List), TaxReportingClassification taxReportingClassification = default(TaxReportingClassification), TypeEnum? type = default(TypeEnum?), VatAbsenceReasonEnum? vatAbsenceReason = default(VatAbsenceReasonEnum?), string vatNumber = default(string), WebData webData = default(WebData)) - { - this.LegalName = legalName; - this.RegisteredAddress = registeredAddress; - this.CountryOfGoverningLaw = countryOfGoverningLaw; - this.DateOfIncorporation = dateOfIncorporation; - this.DateOfInitiationOfLegalProceeding = dateOfInitiationOfLegalProceeding; - this.Description = description; - this.DoingBusinessAs = doingBusinessAs; - this.DoingBusinessAsAbsent = doingBusinessAsAbsent; - this.EconomicSector = economicSector; - this.Email = email; - this.FinancialReports = financialReports; - this.GlobalLegalEntityIdentifier = globalLegalEntityIdentifier; - this.HeadOfficeIndicator = headOfficeIndicator; - this.InstitutionalSector = institutionalSector; - this.LegalForm = legalForm; - this.Phone = phone; - this.PrincipalPlaceOfBusiness = principalPlaceOfBusiness; - this.RegistrationNumber = registrationNumber; - this.RegistrationNumberAbsent = registrationNumberAbsent; - this.StatusOfLegalProceeding = statusOfLegalProceeding; - this.StockData = stockData; - this.Support = support; - this.TaxInformation = taxInformation; - this.TaxReportingClassification = taxReportingClassification; - this.Type = type; - this.VatAbsenceReason = vatAbsenceReason; - this.VatNumber = vatNumber; - this.WebData = webData; - } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - [DataMember(Name = "countryOfGoverningLaw", EmitDefaultValue = false)] - public string CountryOfGoverningLaw { get; set; } - - /// - /// The date when the organization was incorporated in YYYY-MM-DD format. - /// - /// The date when the organization was incorporated in YYYY-MM-DD format. - [DataMember(Name = "dateOfIncorporation", EmitDefaultValue = false)] - public string DateOfIncorporation { get; set; } - - /// - /// Required if the value of `statusOfLegalProceeding` is one of the following: **underJudicialAdministration**, **bankruptcyInsolvency**, **otherLegalMeasures** The date at which a legal proceeding was initiated, in **YYYY-MM-DD** format. Example: **2000-02-12** - /// - /// Required if the value of `statusOfLegalProceeding` is one of the following: **underJudicialAdministration**, **bankruptcyInsolvency**, **otherLegalMeasures** The date at which a legal proceeding was initiated, in **YYYY-MM-DD** format. Example: **2000-02-12** - [DataMember(Name = "dateOfInitiationOfLegalProceeding", EmitDefaultValue = false)] - public string DateOfInitiationOfLegalProceeding { get; set; } - - /// - /// Your description for the organization. - /// - /// Your description for the organization. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The organization's trading name, if different from the registered legal name. - /// - /// The organization's trading name, if different from the registered legal name. - [DataMember(Name = "doingBusinessAs", EmitDefaultValue = false)] - public string DoingBusinessAs { get; set; } - - /// - /// Set this to **true** if the organization or legal arrangement does not have a `Doing business as` name. - /// - /// Set this to **true** if the organization or legal arrangement does not have a `Doing business as` name. - [DataMember(Name = "doingBusinessAsAbsent", EmitDefaultValue = false)] - public bool? DoingBusinessAsAbsent { get; set; } - - /// - /// The sector of the economy the legal entity operates within, represented by a 2-4 digit code that may include a \".\". Example: 45.11 You can locate economic sector codes for your area by referencing codes defined by the NACE (Nomenclature of Economic Activities) used in the European Union. - /// - /// The sector of the economy the legal entity operates within, represented by a 2-4 digit code that may include a \".\". Example: 45.11 You can locate economic sector codes for your area by referencing codes defined by the NACE (Nomenclature of Economic Activities) used in the European Union. - [DataMember(Name = "economicSector", EmitDefaultValue = false)] - public string EconomicSector { get; set; } - - /// - /// The email address of the legal entity. - /// - /// The email address of the legal entity. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The financial report information of the organization. - /// - /// The financial report information of the organization. - [DataMember(Name = "financialReports", EmitDefaultValue = false)] - public List FinancialReports { get; set; } - - /// - /// The global legal entity identifier for the organization. - /// - /// The global legal entity identifier for the organization. - [DataMember(Name = "globalLegalEntityIdentifier", EmitDefaultValue = false)] - public string GlobalLegalEntityIdentifier { get; set; } - - /// - /// Indicates that the registered business address is also the company's headquarters. - /// - /// Indicates that the registered business address is also the company's headquarters. - [DataMember(Name = "headOfficeIndicator", EmitDefaultValue = false)] - public bool? HeadOfficeIndicator { get; set; } - - /// - /// The type of business entity as defined in the national legal system. Use a legal form listed within the accepted legal forms compiled by the Central Bank of Europe. - /// - /// The type of business entity as defined in the national legal system. Use a legal form listed within the accepted legal forms compiled by the Central Bank of Europe. - [DataMember(Name = "legalForm", EmitDefaultValue = false)] - public string LegalForm { get; set; } - - /// - /// The organization's legal name. - /// - /// The organization's legal name. - [DataMember(Name = "legalName", IsRequired = false, EmitDefaultValue = false)] - public string LegalName { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name = "phone", EmitDefaultValue = false)] - public PhoneNumber Phone { get; set; } - - /// - /// Gets or Sets PrincipalPlaceOfBusiness - /// - [DataMember(Name = "principalPlaceOfBusiness", EmitDefaultValue = false)] - public Address PrincipalPlaceOfBusiness { get; set; } - - /// - /// Gets or Sets RegisteredAddress - /// - [DataMember(Name = "registeredAddress", IsRequired = false, EmitDefaultValue = false)] - public Address RegisteredAddress { get; set; } - - /// - /// The organization's registration number. - /// - /// The organization's registration number. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// Set this to **true** if the organization does not have a registration number available. Only applicable for organizations in New Zealand, and incorporated partnerships and government organizations in Australia. - /// - /// Set this to **true** if the organization does not have a registration number available. Only applicable for organizations in New Zealand, and incorporated partnerships and government organizations in Australia. - [DataMember(Name = "registrationNumberAbsent", EmitDefaultValue = false)] - public bool? RegistrationNumberAbsent { get; set; } - - /// - /// Gets or Sets StockData - /// - [DataMember(Name = "stockData", EmitDefaultValue = false)] - public StockData StockData { get; set; } - - /// - /// Gets or Sets Support - /// - [DataMember(Name = "support", EmitDefaultValue = false)] - public Support Support { get; set; } - - /// - /// The tax information of the organization. - /// - /// The tax information of the organization. - [DataMember(Name = "taxInformation", EmitDefaultValue = false)] - public List TaxInformation { get; set; } - - /// - /// Gets or Sets TaxReportingClassification - /// - [DataMember(Name = "taxReportingClassification", EmitDefaultValue = false)] - public TaxReportingClassification TaxReportingClassification { get; set; } - - /// - /// The organization's VAT number. - /// - /// The organization's VAT number. - [DataMember(Name = "vatNumber", EmitDefaultValue = false)] - public string VatNumber { get; set; } - - /// - /// Gets or Sets WebData - /// - [DataMember(Name = "webData", EmitDefaultValue = false)] - public WebData WebData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Organization {\n"); - sb.Append(" CountryOfGoverningLaw: ").Append(CountryOfGoverningLaw).Append("\n"); - sb.Append(" DateOfIncorporation: ").Append(DateOfIncorporation).Append("\n"); - sb.Append(" DateOfInitiationOfLegalProceeding: ").Append(DateOfInitiationOfLegalProceeding).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DoingBusinessAs: ").Append(DoingBusinessAs).Append("\n"); - sb.Append(" DoingBusinessAsAbsent: ").Append(DoingBusinessAsAbsent).Append("\n"); - sb.Append(" EconomicSector: ").Append(EconomicSector).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FinancialReports: ").Append(FinancialReports).Append("\n"); - sb.Append(" GlobalLegalEntityIdentifier: ").Append(GlobalLegalEntityIdentifier).Append("\n"); - sb.Append(" HeadOfficeIndicator: ").Append(HeadOfficeIndicator).Append("\n"); - sb.Append(" InstitutionalSector: ").Append(InstitutionalSector).Append("\n"); - sb.Append(" LegalForm: ").Append(LegalForm).Append("\n"); - sb.Append(" LegalName: ").Append(LegalName).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" PrincipalPlaceOfBusiness: ").Append(PrincipalPlaceOfBusiness).Append("\n"); - sb.Append(" RegisteredAddress: ").Append(RegisteredAddress).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" RegistrationNumberAbsent: ").Append(RegistrationNumberAbsent).Append("\n"); - sb.Append(" StatusOfLegalProceeding: ").Append(StatusOfLegalProceeding).Append("\n"); - sb.Append(" StockData: ").Append(StockData).Append("\n"); - sb.Append(" Support: ").Append(Support).Append("\n"); - sb.Append(" TaxInformation: ").Append(TaxInformation).Append("\n"); - sb.Append(" TaxReportingClassification: ").Append(TaxReportingClassification).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VatAbsenceReason: ").Append(VatAbsenceReason).Append("\n"); - sb.Append(" VatNumber: ").Append(VatNumber).Append("\n"); - sb.Append(" WebData: ").Append(WebData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Organization); - } - - /// - /// Returns true if Organization instances are equal - /// - /// Instance of Organization to be compared - /// Boolean - public bool Equals(Organization input) - { - if (input == null) - { - return false; - } - return - ( - this.CountryOfGoverningLaw == input.CountryOfGoverningLaw || - (this.CountryOfGoverningLaw != null && - this.CountryOfGoverningLaw.Equals(input.CountryOfGoverningLaw)) - ) && - ( - this.DateOfIncorporation == input.DateOfIncorporation || - (this.DateOfIncorporation != null && - this.DateOfIncorporation.Equals(input.DateOfIncorporation)) - ) && - ( - this.DateOfInitiationOfLegalProceeding == input.DateOfInitiationOfLegalProceeding || - (this.DateOfInitiationOfLegalProceeding != null && - this.DateOfInitiationOfLegalProceeding.Equals(input.DateOfInitiationOfLegalProceeding)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DoingBusinessAs == input.DoingBusinessAs || - (this.DoingBusinessAs != null && - this.DoingBusinessAs.Equals(input.DoingBusinessAs)) - ) && - ( - this.DoingBusinessAsAbsent == input.DoingBusinessAsAbsent || - (this.DoingBusinessAsAbsent != null && - this.DoingBusinessAsAbsent.Equals(input.DoingBusinessAsAbsent)) - ) && - ( - this.EconomicSector == input.EconomicSector || - (this.EconomicSector != null && - this.EconomicSector.Equals(input.EconomicSector)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FinancialReports == input.FinancialReports || - this.FinancialReports != null && - input.FinancialReports != null && - this.FinancialReports.SequenceEqual(input.FinancialReports) - ) && - ( - this.GlobalLegalEntityIdentifier == input.GlobalLegalEntityIdentifier || - (this.GlobalLegalEntityIdentifier != null && - this.GlobalLegalEntityIdentifier.Equals(input.GlobalLegalEntityIdentifier)) - ) && - ( - this.HeadOfficeIndicator == input.HeadOfficeIndicator || - this.HeadOfficeIndicator.Equals(input.HeadOfficeIndicator) - ) && - ( - this.InstitutionalSector == input.InstitutionalSector || - this.InstitutionalSector.Equals(input.InstitutionalSector) - ) && - ( - this.LegalForm == input.LegalForm || - (this.LegalForm != null && - this.LegalForm.Equals(input.LegalForm)) - ) && - ( - this.LegalName == input.LegalName || - (this.LegalName != null && - this.LegalName.Equals(input.LegalName)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.PrincipalPlaceOfBusiness == input.PrincipalPlaceOfBusiness || - (this.PrincipalPlaceOfBusiness != null && - this.PrincipalPlaceOfBusiness.Equals(input.PrincipalPlaceOfBusiness)) - ) && - ( - this.RegisteredAddress == input.RegisteredAddress || - (this.RegisteredAddress != null && - this.RegisteredAddress.Equals(input.RegisteredAddress)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.RegistrationNumberAbsent == input.RegistrationNumberAbsent || - (this.RegistrationNumberAbsent != null && - this.RegistrationNumberAbsent.Equals(input.RegistrationNumberAbsent)) - ) && - ( - this.StatusOfLegalProceeding == input.StatusOfLegalProceeding || - this.StatusOfLegalProceeding.Equals(input.StatusOfLegalProceeding) - ) && - ( - this.StockData == input.StockData || - (this.StockData != null && - this.StockData.Equals(input.StockData)) - ) && - ( - this.Support == input.Support || - (this.Support != null && - this.Support.Equals(input.Support)) - ) && - ( - this.TaxInformation == input.TaxInformation || - this.TaxInformation != null && - input.TaxInformation != null && - this.TaxInformation.SequenceEqual(input.TaxInformation) - ) && - ( - this.TaxReportingClassification == input.TaxReportingClassification || - (this.TaxReportingClassification != null && - this.TaxReportingClassification.Equals(input.TaxReportingClassification)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.VatAbsenceReason == input.VatAbsenceReason || - this.VatAbsenceReason.Equals(input.VatAbsenceReason) - ) && - ( - this.VatNumber == input.VatNumber || - (this.VatNumber != null && - this.VatNumber.Equals(input.VatNumber)) - ) && - ( - this.WebData == input.WebData || - (this.WebData != null && - this.WebData.Equals(input.WebData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryOfGoverningLaw != null) - { - hashCode = (hashCode * 59) + this.CountryOfGoverningLaw.GetHashCode(); - } - if (this.DateOfIncorporation != null) - { - hashCode = (hashCode * 59) + this.DateOfIncorporation.GetHashCode(); - } - if (this.DateOfInitiationOfLegalProceeding != null) - { - hashCode = (hashCode * 59) + this.DateOfInitiationOfLegalProceeding.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DoingBusinessAs != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAs.GetHashCode(); - } - if (this.DoingBusinessAsAbsent != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAsAbsent.GetHashCode(); - } - if (this.EconomicSector != null) - { - hashCode = (hashCode * 59) + this.EconomicSector.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FinancialReports != null) - { - hashCode = (hashCode * 59) + this.FinancialReports.GetHashCode(); - } - if (this.GlobalLegalEntityIdentifier != null) - { - hashCode = (hashCode * 59) + this.GlobalLegalEntityIdentifier.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HeadOfficeIndicator.GetHashCode(); - hashCode = (hashCode * 59) + this.InstitutionalSector.GetHashCode(); - if (this.LegalForm != null) - { - hashCode = (hashCode * 59) + this.LegalForm.GetHashCode(); - } - if (this.LegalName != null) - { - hashCode = (hashCode * 59) + this.LegalName.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.PrincipalPlaceOfBusiness != null) - { - hashCode = (hashCode * 59) + this.PrincipalPlaceOfBusiness.GetHashCode(); - } - if (this.RegisteredAddress != null) - { - hashCode = (hashCode * 59) + this.RegisteredAddress.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.RegistrationNumberAbsent != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumberAbsent.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StatusOfLegalProceeding.GetHashCode(); - if (this.StockData != null) - { - hashCode = (hashCode * 59) + this.StockData.GetHashCode(); - } - if (this.Support != null) - { - hashCode = (hashCode * 59) + this.Support.GetHashCode(); - } - if (this.TaxInformation != null) - { - hashCode = (hashCode * 59) + this.TaxInformation.GetHashCode(); - } - if (this.TaxReportingClassification != null) - { - hashCode = (hashCode * 59) + this.TaxReportingClassification.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.VatAbsenceReason.GetHashCode(); - if (this.VatNumber != null) - { - hashCode = (hashCode * 59) + this.VatNumber.GetHashCode(); - } - if (this.WebData != null) - { - hashCode = (hashCode * 59) + this.WebData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/OwnerEntity.cs b/Adyen/Model/LegalEntityManagement/OwnerEntity.cs deleted file mode 100644 index 62efd4827..000000000 --- a/Adyen/Model/LegalEntityManagement/OwnerEntity.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// OwnerEntity - /// - [DataContract(Name = "OwnerEntity")] - public partial class OwnerEntity : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OwnerEntity() { } - /// - /// Initializes a new instance of the class. - /// - /// Unique identifier of the resource that owns the document. For `type` **legalEntity**, this value is the unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). For `type` **bankAccount**, this value is the unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). (required). - /// Type of resource that owns the document. Possible values: **legalEntity**, **bankAccount**. (required). - public OwnerEntity(string id = default(string), string type = default(string)) - { - this.Id = id; - this.Type = type; - } - - /// - /// Unique identifier of the resource that owns the document. For `type` **legalEntity**, this value is the unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). For `type` **bankAccount**, this value is the unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - /// - /// Unique identifier of the resource that owns the document. For `type` **legalEntity**, this value is the unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). For `type` **bankAccount**, this value is the unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Type of resource that owns the document. Possible values: **legalEntity**, **bankAccount**. - /// - /// Type of resource that owns the document. Possible values: **legalEntity**, **bankAccount**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OwnerEntity {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OwnerEntity); - } - - /// - /// Returns true if OwnerEntity instances are equal - /// - /// Instance of OwnerEntity to be compared - /// Boolean - public bool Equals(OwnerEntity input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.cs deleted file mode 100644 index f56213076..000000000 --- a/Adyen/Model/LegalEntityManagement/PLLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// PLLocalAccountIdentification - /// - [DataContract(Name = "PLLocalAccountIdentification")] - public partial class PLLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **plLocal** - /// - /// **plLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PlLocal for value: plLocal - /// - [EnumMember(Value = "plLocal")] - PlLocal = 1 - - } - - - /// - /// **plLocal** - /// - /// **plLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PLLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. (required). - /// **plLocal** (required) (default to TypeEnum.PlLocal). - public PLLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.PlLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PLLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PLLocalAccountIdentification); - } - - /// - /// Returns true if PLLocalAccountIdentification instances are equal - /// - /// Instance of PLLocalAccountIdentification to be compared - /// Boolean - public bool Equals(PLLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 26.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 26.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/PciDocumentInfo.cs b/Adyen/Model/LegalEntityManagement/PciDocumentInfo.cs deleted file mode 100644 index 0d0d46d79..000000000 --- a/Adyen/Model/LegalEntityManagement/PciDocumentInfo.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// PciDocumentInfo - /// - [DataContract(Name = "PciDocumentInfo")] - public partial class PciDocumentInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The date the questionnaire was created, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00. - /// The unique identifier of the signed questionnaire.. - /// The expiration date of the questionnaire, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00. - public PciDocumentInfo(DateTime createdAt = default(DateTime), string id = default(string), DateTime validUntil = default(DateTime)) - { - this.CreatedAt = createdAt; - this.Id = id; - this.ValidUntil = validUntil; - } - - /// - /// The date the questionnaire was created, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00 - /// - /// The date the questionnaire was created, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00 - [DataMember(Name = "createdAt", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// The unique identifier of the signed questionnaire. - /// - /// The unique identifier of the signed questionnaire. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The expiration date of the questionnaire, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00 - /// - /// The expiration date of the questionnaire, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00 - [DataMember(Name = "validUntil", EmitDefaultValue = false)] - public DateTime ValidUntil { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PciDocumentInfo {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" ValidUntil: ").Append(ValidUntil).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PciDocumentInfo); - } - - /// - /// Returns true if PciDocumentInfo instances are equal - /// - /// Instance of PciDocumentInfo to be compared - /// Boolean - public bool Equals(PciDocumentInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ValidUntil == input.ValidUntil || - (this.ValidUntil != null && - this.ValidUntil.Equals(input.ValidUntil)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ValidUntil != null) - { - hashCode = (hashCode * 59) + this.ValidUntil.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/PciSigningRequest.cs b/Adyen/Model/LegalEntityManagement/PciSigningRequest.cs deleted file mode 100644 index ce766d3f1..000000000 --- a/Adyen/Model/LegalEntityManagement/PciSigningRequest.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// PciSigningRequest - /// - [DataContract(Name = "PciSigningRequest")] - public partial class PciSigningRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PciSigningRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The array of Adyen-generated unique identifiers for the questionnaires. (required). - /// The [legal entity ID](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) of the individual who signs the PCI questionnaire. (required). - public PciSigningRequest(List pciTemplateReferences = default(List), string signedBy = default(string)) - { - this.PciTemplateReferences = pciTemplateReferences; - this.SignedBy = signedBy; - } - - /// - /// The array of Adyen-generated unique identifiers for the questionnaires. - /// - /// The array of Adyen-generated unique identifiers for the questionnaires. - [DataMember(Name = "pciTemplateReferences", IsRequired = false, EmitDefaultValue = false)] - public List PciTemplateReferences { get; set; } - - /// - /// The [legal entity ID](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) of the individual who signs the PCI questionnaire. - /// - /// The [legal entity ID](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) of the individual who signs the PCI questionnaire. - [DataMember(Name = "signedBy", IsRequired = false, EmitDefaultValue = false)] - public string SignedBy { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PciSigningRequest {\n"); - sb.Append(" PciTemplateReferences: ").Append(PciTemplateReferences).Append("\n"); - sb.Append(" SignedBy: ").Append(SignedBy).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PciSigningRequest); - } - - /// - /// Returns true if PciSigningRequest instances are equal - /// - /// Instance of PciSigningRequest to be compared - /// Boolean - public bool Equals(PciSigningRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.PciTemplateReferences == input.PciTemplateReferences || - this.PciTemplateReferences != null && - input.PciTemplateReferences != null && - this.PciTemplateReferences.SequenceEqual(input.PciTemplateReferences) - ) && - ( - this.SignedBy == input.SignedBy || - (this.SignedBy != null && - this.SignedBy.Equals(input.SignedBy)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PciTemplateReferences != null) - { - hashCode = (hashCode * 59) + this.PciTemplateReferences.GetHashCode(); - } - if (this.SignedBy != null) - { - hashCode = (hashCode * 59) + this.SignedBy.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/PciSigningResponse.cs b/Adyen/Model/LegalEntityManagement/PciSigningResponse.cs deleted file mode 100644 index 754af47a2..000000000 --- a/Adyen/Model/LegalEntityManagement/PciSigningResponse.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// PciSigningResponse - /// - [DataContract(Name = "PciSigningResponse")] - public partial class PciSigningResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifiers of the signed PCI documents.. - /// The [legal entity ID](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) of the individual who signed the PCI questionnaire.. - public PciSigningResponse(List pciQuestionnaireIds = default(List), string signedBy = default(string)) - { - this.PciQuestionnaireIds = pciQuestionnaireIds; - this.SignedBy = signedBy; - } - - /// - /// The unique identifiers of the signed PCI documents. - /// - /// The unique identifiers of the signed PCI documents. - [DataMember(Name = "pciQuestionnaireIds", EmitDefaultValue = false)] - public List PciQuestionnaireIds { get; set; } - - /// - /// The [legal entity ID](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) of the individual who signed the PCI questionnaire. - /// - /// The [legal entity ID](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities__resParam_id) of the individual who signed the PCI questionnaire. - [DataMember(Name = "signedBy", EmitDefaultValue = false)] - public string SignedBy { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PciSigningResponse {\n"); - sb.Append(" PciQuestionnaireIds: ").Append(PciQuestionnaireIds).Append("\n"); - sb.Append(" SignedBy: ").Append(SignedBy).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PciSigningResponse); - } - - /// - /// Returns true if PciSigningResponse instances are equal - /// - /// Instance of PciSigningResponse to be compared - /// Boolean - public bool Equals(PciSigningResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.PciQuestionnaireIds == input.PciQuestionnaireIds || - this.PciQuestionnaireIds != null && - input.PciQuestionnaireIds != null && - this.PciQuestionnaireIds.SequenceEqual(input.PciQuestionnaireIds) - ) && - ( - this.SignedBy == input.SignedBy || - (this.SignedBy != null && - this.SignedBy.Equals(input.SignedBy)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PciQuestionnaireIds != null) - { - hashCode = (hashCode * 59) + this.PciQuestionnaireIds.GetHashCode(); - } - if (this.SignedBy != null) - { - hashCode = (hashCode * 59) + this.SignedBy.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/PhoneNumber.cs b/Adyen/Model/LegalEntityManagement/PhoneNumber.cs deleted file mode 100644 index 7b3a4d769..000000000 --- a/Adyen/Model/LegalEntityManagement/PhoneNumber.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// PhoneNumber - /// - [DataContract(Name = "PhoneNumber")] - public partial class PhoneNumber : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PhoneNumber() { } - /// - /// Initializes a new instance of the class. - /// - /// The full phone number, including the country code. For example, **+3112345678**. (required). - /// The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.** . - public PhoneNumber(string number = default(string), string type = default(string)) - { - this.Number = number; - this.Type = type; - } - - /// - /// The full phone number, including the country code. For example, **+3112345678**. - /// - /// The full phone number, including the country code. For example, **+3112345678**. - [DataMember(Name = "number", IsRequired = false, EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number` - /// - /// The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number` - [DataMember(Name = "phoneCountryCode", EmitDefaultValue = false)] - public string PhoneCountryCode { get; private set; } - - /// - /// The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.** - /// - /// The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.** - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PhoneNumber {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" PhoneCountryCode: ").Append(PhoneCountryCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PhoneNumber); - } - - /// - /// Returns true if PhoneNumber instances are equal - /// - /// Instance of PhoneNumber to be compared - /// Boolean - public bool Equals(PhoneNumber input) - { - if (input == null) - { - return false; - } - return - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.PhoneCountryCode == input.PhoneCountryCode || - (this.PhoneCountryCode != null && - this.PhoneCountryCode.Equals(input.PhoneCountryCode)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.PhoneCountryCode != null) - { - hashCode = (hashCode * 59) + this.PhoneCountryCode.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/RemediatingAction.cs b/Adyen/Model/LegalEntityManagement/RemediatingAction.cs deleted file mode 100644 index 3f117916a..000000000 --- a/Adyen/Model/LegalEntityManagement/RemediatingAction.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// RemediatingAction - /// - [DataContract(Name = "RemediatingAction")] - public partial class RemediatingAction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// code. - /// message. - public RemediatingAction(string code = default(string), string message = default(string)) - { - this.Code = code; - this.Message = message; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RemediatingAction {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RemediatingAction); - } - - /// - /// Returns true if RemediatingAction instances are equal - /// - /// Instance of RemediatingAction to be compared - /// Boolean - public bool Equals(RemediatingAction input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.cs deleted file mode 100644 index 23f58654c..000000000 --- a/Adyen/Model/LegalEntityManagement/SELocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// SELocalAccountIdentification - /// - [DataContract(Name = "SELocalAccountIdentification")] - public partial class SELocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **seLocal** - /// - /// **seLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum SeLocal for value: seLocal - /// - [EnumMember(Value = "seLocal")] - SeLocal = 1 - - } - - - /// - /// **seLocal** - /// - /// **seLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SELocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. (required). - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. (required). - /// **seLocal** (required) (default to TypeEnum.SeLocal). - public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), TypeEnum type = TypeEnum.SeLocal) - { - this.AccountNumber = accountNumber; - this.ClearingNumber = clearingNumber; - this.Type = type; - } - - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. - /// - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. - [DataMember(Name = "clearingNumber", IsRequired = false, EmitDefaultValue = false)] - public string ClearingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SELocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" ClearingNumber: ").Append(ClearingNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SELocalAccountIdentification); - } - - /// - /// Returns true if SELocalAccountIdentification instances are equal - /// - /// Instance of SELocalAccountIdentification to be compared - /// Boolean - public bool Equals(SELocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.ClearingNumber == input.ClearingNumber || - (this.ClearingNumber != null && - this.ClearingNumber.Equals(input.ClearingNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.ClearingNumber != null) - { - hashCode = (hashCode * 59) + this.ClearingNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 7) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 7.", new [] { "AccountNumber" }); - } - - // ClearingNumber (string) maxLength - if (this.ClearingNumber != null && this.ClearingNumber.Length > 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingNumber, length must be less than 5.", new [] { "ClearingNumber" }); - } - - // ClearingNumber (string) minLength - if (this.ClearingNumber != null && this.ClearingNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingNumber, length must be greater than 4.", new [] { "ClearingNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.cs deleted file mode 100644 index 966f18404..000000000 --- a/Adyen/Model/LegalEntityManagement/SGLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// SGLocalAccountIdentification - /// - [DataContract(Name = "SGLocalAccountIdentification")] - public partial class SGLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **sgLocal** - /// - /// **sgLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum SgLocal for value: sgLocal - /// - [EnumMember(Value = "sgLocal")] - SgLocal = 1 - - } - - - /// - /// **sgLocal** - /// - /// **sgLocal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SGLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. (required). - /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// **sgLocal** (default to TypeEnum.SgLocal). - public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), TypeEnum? type = TypeEnum.SgLocal) - { - this.AccountNumber = accountNumber; - this.Bic = bic; - this.Type = type; - } - - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SGLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SGLocalAccountIdentification); - } - - /// - /// Returns true if SGLocalAccountIdentification instances are equal - /// - /// Instance of SGLocalAccountIdentification to be compared - /// Boolean - public bool Equals(SGLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 19.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 4.", new [] { "AccountNumber" }); - } - - // Bic (string) maxLength - if (this.Bic != null && this.Bic.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be less than 11.", new [] { "Bic" }); - } - - // Bic (string) minLength - if (this.Bic != null && this.Bic.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be greater than 8.", new [] { "Bic" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/ServiceError.cs b/Adyen/Model/LegalEntityManagement/ServiceError.cs deleted file mode 100644 index deb436f3c..000000000 --- a/Adyen/Model/LegalEntityManagement/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/SetTaxElectronicDeliveryConsentRequest.cs b/Adyen/Model/LegalEntityManagement/SetTaxElectronicDeliveryConsentRequest.cs deleted file mode 100644 index 30d921f56..000000000 --- a/Adyen/Model/LegalEntityManagement/SetTaxElectronicDeliveryConsentRequest.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// SetTaxElectronicDeliveryConsentRequest - /// - [DataContract(Name = "SetTaxElectronicDeliveryConsentRequest")] - public partial class SetTaxElectronicDeliveryConsentRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Consent to electronically deliver tax form US1099-K.. - public SetTaxElectronicDeliveryConsentRequest(bool? uS1099k = default(bool?)) - { - this.US1099k = uS1099k; - } - - /// - /// Consent to electronically deliver tax form US1099-K. - /// - /// Consent to electronically deliver tax form US1099-K. - [DataMember(Name = "US1099k", EmitDefaultValue = false)] - public bool? US1099k { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetTaxElectronicDeliveryConsentRequest {\n"); - sb.Append(" US1099k: ").Append(US1099k).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetTaxElectronicDeliveryConsentRequest); - } - - /// - /// Returns true if SetTaxElectronicDeliveryConsentRequest instances are equal - /// - /// Instance of SetTaxElectronicDeliveryConsentRequest to be compared - /// Boolean - public bool Equals(SetTaxElectronicDeliveryConsentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.US1099k == input.US1099k || - this.US1099k.Equals(input.US1099k) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.US1099k.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/SoleProprietorship.cs b/Adyen/Model/LegalEntityManagement/SoleProprietorship.cs deleted file mode 100644 index f36298e4b..000000000 --- a/Adyen/Model/LegalEntityManagement/SoleProprietorship.cs +++ /dev/null @@ -1,379 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// SoleProprietorship - /// - [DataContract(Name = "SoleProprietorship")] - public partial class SoleProprietorship : IEquatable, IValidatableObject - { - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [JsonConverter(typeof(StringEnumConverter))] - public enum VatAbsenceReasonEnum - { - /// - /// Enum IndustryExemption for value: industryExemption - /// - [EnumMember(Value = "industryExemption")] - IndustryExemption = 1, - - /// - /// Enum BelowTaxThreshold for value: belowTaxThreshold - /// - [EnumMember(Value = "belowTaxThreshold")] - BelowTaxThreshold = 2 - - } - - - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [DataMember(Name = "vatAbsenceReason", EmitDefaultValue = false)] - public VatAbsenceReasonEnum? VatAbsenceReason { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SoleProprietorship() { } - /// - /// Initializes a new instance of the class. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. (required). - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format.. - /// The registered name, if different from the `name`.. - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name.. - /// The information from the financial report of the sole proprietorship.. - /// The legal name. (required). - /// principalPlaceOfBusiness. - /// registeredAddress (required). - /// The registration number.. - /// The tax information is absent.. - /// The tax information of the entity.. - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**.. - /// The VAT number.. - public SoleProprietorship(string countryOfGoverningLaw = default(string), string dateOfIncorporation = default(string), string doingBusinessAs = default(string), bool? doingBusinessAsAbsent = default(bool?), List financialReports = default(List), string name = default(string), Address principalPlaceOfBusiness = default(Address), Address registeredAddress = default(Address), string registrationNumber = default(string), bool? taxAbsent = default(bool?), List taxInformation = default(List), VatAbsenceReasonEnum? vatAbsenceReason = default(VatAbsenceReasonEnum?), string vatNumber = default(string)) - { - this.CountryOfGoverningLaw = countryOfGoverningLaw; - this.Name = name; - this.RegisteredAddress = registeredAddress; - this.DateOfIncorporation = dateOfIncorporation; - this.DoingBusinessAs = doingBusinessAs; - this.DoingBusinessAsAbsent = doingBusinessAsAbsent; - this.FinancialReports = financialReports; - this.PrincipalPlaceOfBusiness = principalPlaceOfBusiness; - this.RegistrationNumber = registrationNumber; - this.TaxAbsent = taxAbsent; - this.TaxInformation = taxInformation; - this.VatAbsenceReason = vatAbsenceReason; - this.VatNumber = vatNumber; - } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - [DataMember(Name = "countryOfGoverningLaw", IsRequired = false, EmitDefaultValue = false)] - public string CountryOfGoverningLaw { get; set; } - - /// - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format. - /// - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format. - [DataMember(Name = "dateOfIncorporation", EmitDefaultValue = false)] - public string DateOfIncorporation { get; set; } - - /// - /// The registered name, if different from the `name`. - /// - /// The registered name, if different from the `name`. - [DataMember(Name = "doingBusinessAs", EmitDefaultValue = false)] - public string DoingBusinessAs { get; set; } - - /// - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name. - /// - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name. - [DataMember(Name = "doingBusinessAsAbsent", EmitDefaultValue = false)] - public bool? DoingBusinessAsAbsent { get; set; } - - /// - /// The information from the financial report of the sole proprietorship. - /// - /// The information from the financial report of the sole proprietorship. - [DataMember(Name = "financialReports", EmitDefaultValue = false)] - public List FinancialReports { get; set; } - - /// - /// The legal name. - /// - /// The legal name. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Gets or Sets PrincipalPlaceOfBusiness - /// - [DataMember(Name = "principalPlaceOfBusiness", EmitDefaultValue = false)] - public Address PrincipalPlaceOfBusiness { get; set; } - - /// - /// Gets or Sets RegisteredAddress - /// - [DataMember(Name = "registeredAddress", IsRequired = false, EmitDefaultValue = false)] - public Address RegisteredAddress { get; set; } - - /// - /// The registration number. - /// - /// The registration number. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// The tax information is absent. - /// - /// The tax information is absent. - [DataMember(Name = "taxAbsent", EmitDefaultValue = false)] - public bool? TaxAbsent { get; set; } - - /// - /// The tax information of the entity. - /// - /// The tax information of the entity. - [DataMember(Name = "taxInformation", EmitDefaultValue = false)] - public List TaxInformation { get; set; } - - /// - /// The VAT number. - /// - /// The VAT number. - [DataMember(Name = "vatNumber", EmitDefaultValue = false)] - public string VatNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SoleProprietorship {\n"); - sb.Append(" CountryOfGoverningLaw: ").Append(CountryOfGoverningLaw).Append("\n"); - sb.Append(" DateOfIncorporation: ").Append(DateOfIncorporation).Append("\n"); - sb.Append(" DoingBusinessAs: ").Append(DoingBusinessAs).Append("\n"); - sb.Append(" DoingBusinessAsAbsent: ").Append(DoingBusinessAsAbsent).Append("\n"); - sb.Append(" FinancialReports: ").Append(FinancialReports).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PrincipalPlaceOfBusiness: ").Append(PrincipalPlaceOfBusiness).Append("\n"); - sb.Append(" RegisteredAddress: ").Append(RegisteredAddress).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" TaxAbsent: ").Append(TaxAbsent).Append("\n"); - sb.Append(" TaxInformation: ").Append(TaxInformation).Append("\n"); - sb.Append(" VatAbsenceReason: ").Append(VatAbsenceReason).Append("\n"); - sb.Append(" VatNumber: ").Append(VatNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SoleProprietorship); - } - - /// - /// Returns true if SoleProprietorship instances are equal - /// - /// Instance of SoleProprietorship to be compared - /// Boolean - public bool Equals(SoleProprietorship input) - { - if (input == null) - { - return false; - } - return - ( - this.CountryOfGoverningLaw == input.CountryOfGoverningLaw || - (this.CountryOfGoverningLaw != null && - this.CountryOfGoverningLaw.Equals(input.CountryOfGoverningLaw)) - ) && - ( - this.DateOfIncorporation == input.DateOfIncorporation || - (this.DateOfIncorporation != null && - this.DateOfIncorporation.Equals(input.DateOfIncorporation)) - ) && - ( - this.DoingBusinessAs == input.DoingBusinessAs || - (this.DoingBusinessAs != null && - this.DoingBusinessAs.Equals(input.DoingBusinessAs)) - ) && - ( - this.DoingBusinessAsAbsent == input.DoingBusinessAsAbsent || - (this.DoingBusinessAsAbsent != null && - this.DoingBusinessAsAbsent.Equals(input.DoingBusinessAsAbsent)) - ) && - ( - this.FinancialReports == input.FinancialReports || - this.FinancialReports != null && - input.FinancialReports != null && - this.FinancialReports.SequenceEqual(input.FinancialReports) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PrincipalPlaceOfBusiness == input.PrincipalPlaceOfBusiness || - (this.PrincipalPlaceOfBusiness != null && - this.PrincipalPlaceOfBusiness.Equals(input.PrincipalPlaceOfBusiness)) - ) && - ( - this.RegisteredAddress == input.RegisteredAddress || - (this.RegisteredAddress != null && - this.RegisteredAddress.Equals(input.RegisteredAddress)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.TaxAbsent == input.TaxAbsent || - (this.TaxAbsent != null && - this.TaxAbsent.Equals(input.TaxAbsent)) - ) && - ( - this.TaxInformation == input.TaxInformation || - this.TaxInformation != null && - input.TaxInformation != null && - this.TaxInformation.SequenceEqual(input.TaxInformation) - ) && - ( - this.VatAbsenceReason == input.VatAbsenceReason || - this.VatAbsenceReason.Equals(input.VatAbsenceReason) - ) && - ( - this.VatNumber == input.VatNumber || - (this.VatNumber != null && - this.VatNumber.Equals(input.VatNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryOfGoverningLaw != null) - { - hashCode = (hashCode * 59) + this.CountryOfGoverningLaw.GetHashCode(); - } - if (this.DateOfIncorporation != null) - { - hashCode = (hashCode * 59) + this.DateOfIncorporation.GetHashCode(); - } - if (this.DoingBusinessAs != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAs.GetHashCode(); - } - if (this.DoingBusinessAsAbsent != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAsAbsent.GetHashCode(); - } - if (this.FinancialReports != null) - { - hashCode = (hashCode * 59) + this.FinancialReports.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PrincipalPlaceOfBusiness != null) - { - hashCode = (hashCode * 59) + this.PrincipalPlaceOfBusiness.GetHashCode(); - } - if (this.RegisteredAddress != null) - { - hashCode = (hashCode * 59) + this.RegisteredAddress.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.TaxAbsent != null) - { - hashCode = (hashCode * 59) + this.TaxAbsent.GetHashCode(); - } - if (this.TaxInformation != null) - { - hashCode = (hashCode * 59) + this.TaxInformation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VatAbsenceReason.GetHashCode(); - if (this.VatNumber != null) - { - hashCode = (hashCode * 59) + this.VatNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/SourceOfFunds.cs b/Adyen/Model/LegalEntityManagement/SourceOfFunds.cs deleted file mode 100644 index e99659b7f..000000000 --- a/Adyen/Model/LegalEntityManagement/SourceOfFunds.cs +++ /dev/null @@ -1,451 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// SourceOfFunds - /// - [DataContract(Name = "SourceOfFunds")] - public partial class SourceOfFunds : IEquatable, IValidatableObject - { - /// - /// The type of the source of funds. Possible values: * **business** * **employment** * **donations** * **inheritance** * **financialAid** * **rentalIncome** * **dividendIncome** * **royaltyIncome** * **thirdPartyFunding** * **pensionIncome** * **insuranceSettlement** * **cryptocurrencyIncome** * **assetSale** * **loans** * **gamblingWinnings** - /// - /// The type of the source of funds. Possible values: * **business** * **employment** * **donations** * **inheritance** * **financialAid** * **rentalIncome** * **dividendIncome** * **royaltyIncome** * **thirdPartyFunding** * **pensionIncome** * **insuranceSettlement** * **cryptocurrencyIncome** * **assetSale** * **loans** * **gamblingWinnings** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Business for value: business - /// - [EnumMember(Value = "business")] - Business = 1, - - /// - /// Enum Employment for value: employment - /// - [EnumMember(Value = "employment")] - Employment = 2, - - /// - /// Enum Donations for value: donations - /// - [EnumMember(Value = "donations")] - Donations = 3, - - /// - /// Enum Inheritance for value: inheritance - /// - [EnumMember(Value = "inheritance")] - Inheritance = 4, - - /// - /// Enum FinancialAid for value: financialAid - /// - [EnumMember(Value = "financialAid")] - FinancialAid = 5, - - /// - /// Enum RentalIncome for value: rentalIncome - /// - [EnumMember(Value = "rentalIncome")] - RentalIncome = 6, - - /// - /// Enum DividendIncome for value: dividendIncome - /// - [EnumMember(Value = "dividendIncome")] - DividendIncome = 7, - - /// - /// Enum RoyaltyIncome for value: royaltyIncome - /// - [EnumMember(Value = "royaltyIncome")] - RoyaltyIncome = 8, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 9, - - /// - /// Enum PensionIncome for value: pensionIncome - /// - [EnumMember(Value = "pensionIncome")] - PensionIncome = 10, - - /// - /// Enum InsuranceSettlement for value: insuranceSettlement - /// - [EnumMember(Value = "insuranceSettlement")] - InsuranceSettlement = 11, - - /// - /// Enum CryptocurrencyIncome for value: cryptocurrencyIncome - /// - [EnumMember(Value = "cryptocurrencyIncome")] - CryptocurrencyIncome = 12, - - /// - /// Enum AssetSale for value: assetSale - /// - [EnumMember(Value = "assetSale")] - AssetSale = 13, - - /// - /// Enum Loans for value: loans - /// - [EnumMember(Value = "loans")] - Loans = 14, - - /// - /// Enum GamblingWinnings for value: gamblingWinnings - /// - [EnumMember(Value = "gamblingWinnings")] - GamblingWinnings = 15 - - } - - - /// - /// The type of the source of funds. Possible values: * **business** * **employment** * **donations** * **inheritance** * **financialAid** * **rentalIncome** * **dividendIncome** * **royaltyIncome** * **thirdPartyFunding** * **pensionIncome** * **insuranceSettlement** * **cryptocurrencyIncome** * **assetSale** * **loans** * **gamblingWinnings** - /// - /// The type of the source of funds. Possible values: * **business** * **employment** * **donations** * **inheritance** * **financialAid** * **rentalIncome** * **dividendIncome** * **royaltyIncome** * **thirdPartyFunding** * **pensionIncome** * **insuranceSettlement** * **cryptocurrencyIncome** * **assetSale** * **loans** * **gamblingWinnings** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SourceOfFunds() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether the funds are coming from transactions processed by Adyen. If **false**, the `type` is required. (required). - /// amount. - /// The number of months that the asset has been in possession of the user. For example, if the source of funds is of type **cryptocurrencyIncome** then `assetMonthsHeld` is the number of months the user has owned the cryptocurrency.. - /// Required if `type` is **cryptocurrencyIncome**. The cryptocurrency exchange where the funds were acquired.. - /// Required if `type` is **donations** or **inheritance**. The date the funds were received, in YYYY-MM-DD format.. - /// Required if `type` is **assetSale** or **gamblingWinnings**. The date the funds were received, in YYYY-MM-DD format. For example, if the source of funds is of type **assetSale**, the dateOfSourceEvent is the date of the sale. If the source of funds is of type **gamblingWinnings**, the dateOfSourceEvent is the date of winnings.. - /// Required if `type` is **business** or **assetSale**. A description for the source of funds. For example, for `type` **business**, provide a description of where the business transactions come from, such as payments through bank transfer. For `type` **assetSale**, provide a description of the asset. For example, the address of a residential property if it is a property sale.. - /// Required if `type` is **thirdPartyFunding**. Information about the financiers.. - /// Required if `type` is **donations** or **inheritance**. The legal entity ID representing the originator of the source of funds. For example, if the source of funds is **inheritance**, then `originatorOfFundsReference` should be the legal entity reference of the benefactor.. - /// Required if `type` is **donations**. The reason for receiving the funds.. - /// Required if `type` is **donations** or **inheritance**. The relationship of the originator of the funds to the recipient.. - /// The type of the source of funds. Possible values: * **business** * **employment** * **donations** * **inheritance** * **financialAid** * **rentalIncome** * **dividendIncome** * **royaltyIncome** * **thirdPartyFunding** * **pensionIncome** * **insuranceSettlement** * **cryptocurrencyIncome** * **assetSale** * **loans** * **gamblingWinnings** . - /// Required if `type` is **gamblingWinnings**. The location of the gambling site for the winnings. For example, if the source of funds is online gambling, provide the website of the gambling company.. - public SourceOfFunds(bool? adyenProcessedFunds = default(bool?), Amount amount = default(Amount), int? assetMonthsHeld = default(int?), string cryptocurrencyExchange = default(string), DateTime dateOfFundsReceived = default(DateTime), DateTime dateOfSourceEvent = default(DateTime), string description = default(string), List financiers = default(List), string originatorLegalEntityId = default(string), string purpose = default(string), string relationship = default(string), TypeEnum? type = default(TypeEnum?), string website = default(string)) - { - this.AdyenProcessedFunds = adyenProcessedFunds; - this.Amount = amount; - this.AssetMonthsHeld = assetMonthsHeld; - this.CryptocurrencyExchange = cryptocurrencyExchange; - this.DateOfFundsReceived = dateOfFundsReceived; - this.DateOfSourceEvent = dateOfSourceEvent; - this.Description = description; - this.Financiers = financiers; - this.OriginatorLegalEntityId = originatorLegalEntityId; - this.Purpose = purpose; - this.Relationship = relationship; - this.Type = type; - this.Website = website; - } - - /// - /// Indicates whether the funds are coming from transactions processed by Adyen. If **false**, the `type` is required. - /// - /// Indicates whether the funds are coming from transactions processed by Adyen. If **false**, the `type` is required. - [DataMember(Name = "adyenProcessedFunds", IsRequired = false, EmitDefaultValue = false)] - public bool? AdyenProcessedFunds { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The number of months that the asset has been in possession of the user. For example, if the source of funds is of type **cryptocurrencyIncome** then `assetMonthsHeld` is the number of months the user has owned the cryptocurrency. - /// - /// The number of months that the asset has been in possession of the user. For example, if the source of funds is of type **cryptocurrencyIncome** then `assetMonthsHeld` is the number of months the user has owned the cryptocurrency. - [DataMember(Name = "assetMonthsHeld", EmitDefaultValue = false)] - public int? AssetMonthsHeld { get; set; } - - /// - /// Required if `type` is **cryptocurrencyIncome**. The cryptocurrency exchange where the funds were acquired. - /// - /// Required if `type` is **cryptocurrencyIncome**. The cryptocurrency exchange where the funds were acquired. - [DataMember(Name = "cryptocurrencyExchange", EmitDefaultValue = false)] - public string CryptocurrencyExchange { get; set; } - - /// - /// Required if `type` is **donations** or **inheritance**. The date the funds were received, in YYYY-MM-DD format. - /// - /// Required if `type` is **donations** or **inheritance**. The date the funds were received, in YYYY-MM-DD format. - [DataMember(Name = "dateOfFundsReceived", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfFundsReceived { get; set; } - - /// - /// Required if `type` is **assetSale** or **gamblingWinnings**. The date the funds were received, in YYYY-MM-DD format. For example, if the source of funds is of type **assetSale**, the dateOfSourceEvent is the date of the sale. If the source of funds is of type **gamblingWinnings**, the dateOfSourceEvent is the date of winnings. - /// - /// Required if `type` is **assetSale** or **gamblingWinnings**. The date the funds were received, in YYYY-MM-DD format. For example, if the source of funds is of type **assetSale**, the dateOfSourceEvent is the date of the sale. If the source of funds is of type **gamblingWinnings**, the dateOfSourceEvent is the date of winnings. - [DataMember(Name = "dateOfSourceEvent", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfSourceEvent { get; set; } - - /// - /// Required if `type` is **business** or **assetSale**. A description for the source of funds. For example, for `type` **business**, provide a description of where the business transactions come from, such as payments through bank transfer. For `type` **assetSale**, provide a description of the asset. For example, the address of a residential property if it is a property sale. - /// - /// Required if `type` is **business** or **assetSale**. A description for the source of funds. For example, for `type` **business**, provide a description of where the business transactions come from, such as payments through bank transfer. For `type` **assetSale**, provide a description of the asset. For example, the address of a residential property if it is a property sale. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Required if `type` is **thirdPartyFunding**. Information about the financiers. - /// - /// Required if `type` is **thirdPartyFunding**. Information about the financiers. - [DataMember(Name = "financiers", EmitDefaultValue = false)] - public List Financiers { get; set; } - - /// - /// Required if `type` is **donations** or **inheritance**. The legal entity ID representing the originator of the source of funds. For example, if the source of funds is **inheritance**, then `originatorOfFundsReference` should be the legal entity reference of the benefactor. - /// - /// Required if `type` is **donations** or **inheritance**. The legal entity ID representing the originator of the source of funds. For example, if the source of funds is **inheritance**, then `originatorOfFundsReference` should be the legal entity reference of the benefactor. - [DataMember(Name = "originatorLegalEntityId", EmitDefaultValue = false)] - public string OriginatorLegalEntityId { get; set; } - - /// - /// Required if `type` is **donations**. The reason for receiving the funds. - /// - /// Required if `type` is **donations**. The reason for receiving the funds. - [DataMember(Name = "purpose", EmitDefaultValue = false)] - public string Purpose { get; set; } - - /// - /// Required if `type` is **donations** or **inheritance**. The relationship of the originator of the funds to the recipient. - /// - /// Required if `type` is **donations** or **inheritance**. The relationship of the originator of the funds to the recipient. - [DataMember(Name = "relationship", EmitDefaultValue = false)] - public string Relationship { get; set; } - - /// - /// Required if `type` is **gamblingWinnings**. The location of the gambling site for the winnings. For example, if the source of funds is online gambling, provide the website of the gambling company. - /// - /// Required if `type` is **gamblingWinnings**. The location of the gambling site for the winnings. For example, if the source of funds is online gambling, provide the website of the gambling company. - [DataMember(Name = "website", EmitDefaultValue = false)] - public string Website { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SourceOfFunds {\n"); - sb.Append(" AdyenProcessedFunds: ").Append(AdyenProcessedFunds).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" AssetMonthsHeld: ").Append(AssetMonthsHeld).Append("\n"); - sb.Append(" CryptocurrencyExchange: ").Append(CryptocurrencyExchange).Append("\n"); - sb.Append(" DateOfFundsReceived: ").Append(DateOfFundsReceived).Append("\n"); - sb.Append(" DateOfSourceEvent: ").Append(DateOfSourceEvent).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Financiers: ").Append(Financiers).Append("\n"); - sb.Append(" OriginatorLegalEntityId: ").Append(OriginatorLegalEntityId).Append("\n"); - sb.Append(" Purpose: ").Append(Purpose).Append("\n"); - sb.Append(" Relationship: ").Append(Relationship).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Website: ").Append(Website).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SourceOfFunds); - } - - /// - /// Returns true if SourceOfFunds instances are equal - /// - /// Instance of SourceOfFunds to be compared - /// Boolean - public bool Equals(SourceOfFunds input) - { - if (input == null) - { - return false; - } - return - ( - this.AdyenProcessedFunds == input.AdyenProcessedFunds || - this.AdyenProcessedFunds.Equals(input.AdyenProcessedFunds) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.AssetMonthsHeld == input.AssetMonthsHeld || - this.AssetMonthsHeld.Equals(input.AssetMonthsHeld) - ) && - ( - this.CryptocurrencyExchange == input.CryptocurrencyExchange || - (this.CryptocurrencyExchange != null && - this.CryptocurrencyExchange.Equals(input.CryptocurrencyExchange)) - ) && - ( - this.DateOfFundsReceived == input.DateOfFundsReceived || - (this.DateOfFundsReceived != null && - this.DateOfFundsReceived.Equals(input.DateOfFundsReceived)) - ) && - ( - this.DateOfSourceEvent == input.DateOfSourceEvent || - (this.DateOfSourceEvent != null && - this.DateOfSourceEvent.Equals(input.DateOfSourceEvent)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Financiers == input.Financiers || - this.Financiers != null && - input.Financiers != null && - this.Financiers.SequenceEqual(input.Financiers) - ) && - ( - this.OriginatorLegalEntityId == input.OriginatorLegalEntityId || - (this.OriginatorLegalEntityId != null && - this.OriginatorLegalEntityId.Equals(input.OriginatorLegalEntityId)) - ) && - ( - this.Purpose == input.Purpose || - (this.Purpose != null && - this.Purpose.Equals(input.Purpose)) - ) && - ( - this.Relationship == input.Relationship || - (this.Relationship != null && - this.Relationship.Equals(input.Relationship)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Website == input.Website || - (this.Website != null && - this.Website.Equals(input.Website)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AdyenProcessedFunds.GetHashCode(); - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AssetMonthsHeld.GetHashCode(); - if (this.CryptocurrencyExchange != null) - { - hashCode = (hashCode * 59) + this.CryptocurrencyExchange.GetHashCode(); - } - if (this.DateOfFundsReceived != null) - { - hashCode = (hashCode * 59) + this.DateOfFundsReceived.GetHashCode(); - } - if (this.DateOfSourceEvent != null) - { - hashCode = (hashCode * 59) + this.DateOfSourceEvent.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Financiers != null) - { - hashCode = (hashCode * 59) + this.Financiers.GetHashCode(); - } - if (this.OriginatorLegalEntityId != null) - { - hashCode = (hashCode * 59) + this.OriginatorLegalEntityId.GetHashCode(); - } - if (this.Purpose != null) - { - hashCode = (hashCode * 59) + this.Purpose.GetHashCode(); - } - if (this.Relationship != null) - { - hashCode = (hashCode * 59) + this.Relationship.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Website != null) - { - hashCode = (hashCode * 59) + this.Website.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/StockData.cs b/Adyen/Model/LegalEntityManagement/StockData.cs deleted file mode 100644 index 21fb96c31..000000000 --- a/Adyen/Model/LegalEntityManagement/StockData.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// StockData - /// - [DataContract(Name = "StockData")] - public partial class StockData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The four-digit [Market Identifier Code](https://en.wikipedia.org/wiki/Market_Identifier_Code) of the stock market where the organization's stocks are traded.. - /// The 12-digit International Securities Identification Number (ISIN) of the company, without dashes (-).. - /// The stock ticker symbol.. - public StockData(string marketIdentifier = default(string), string stockNumber = default(string), string tickerSymbol = default(string)) - { - this.MarketIdentifier = marketIdentifier; - this.StockNumber = stockNumber; - this.TickerSymbol = tickerSymbol; - } - - /// - /// The four-digit [Market Identifier Code](https://en.wikipedia.org/wiki/Market_Identifier_Code) of the stock market where the organization's stocks are traded. - /// - /// The four-digit [Market Identifier Code](https://en.wikipedia.org/wiki/Market_Identifier_Code) of the stock market where the organization's stocks are traded. - [DataMember(Name = "marketIdentifier", EmitDefaultValue = false)] - public string MarketIdentifier { get; set; } - - /// - /// The 12-digit International Securities Identification Number (ISIN) of the company, without dashes (-). - /// - /// The 12-digit International Securities Identification Number (ISIN) of the company, without dashes (-). - [DataMember(Name = "stockNumber", EmitDefaultValue = false)] - public string StockNumber { get; set; } - - /// - /// The stock ticker symbol. - /// - /// The stock ticker symbol. - [DataMember(Name = "tickerSymbol", EmitDefaultValue = false)] - public string TickerSymbol { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StockData {\n"); - sb.Append(" MarketIdentifier: ").Append(MarketIdentifier).Append("\n"); - sb.Append(" StockNumber: ").Append(StockNumber).Append("\n"); - sb.Append(" TickerSymbol: ").Append(TickerSymbol).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StockData); - } - - /// - /// Returns true if StockData instances are equal - /// - /// Instance of StockData to be compared - /// Boolean - public bool Equals(StockData input) - { - if (input == null) - { - return false; - } - return - ( - this.MarketIdentifier == input.MarketIdentifier || - (this.MarketIdentifier != null && - this.MarketIdentifier.Equals(input.MarketIdentifier)) - ) && - ( - this.StockNumber == input.StockNumber || - (this.StockNumber != null && - this.StockNumber.Equals(input.StockNumber)) - ) && - ( - this.TickerSymbol == input.TickerSymbol || - (this.TickerSymbol != null && - this.TickerSymbol.Equals(input.TickerSymbol)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MarketIdentifier != null) - { - hashCode = (hashCode * 59) + this.MarketIdentifier.GetHashCode(); - } - if (this.StockNumber != null) - { - hashCode = (hashCode * 59) + this.StockNumber.GetHashCode(); - } - if (this.TickerSymbol != null) - { - hashCode = (hashCode * 59) + this.TickerSymbol.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Support.cs b/Adyen/Model/LegalEntityManagement/Support.cs deleted file mode 100644 index e94e02dec..000000000 --- a/Adyen/Model/LegalEntityManagement/Support.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Support - /// - [DataContract(Name = "Support")] - public partial class Support : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The support email address of the legal entity.. - /// phone. - public Support(string email = default(string), PhoneNumber phone = default(PhoneNumber)) - { - this.Email = email; - this.Phone = phone; - } - - /// - /// The support email address of the legal entity. - /// - /// The support email address of the legal entity. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name = "phone", EmitDefaultValue = false)] - public PhoneNumber Phone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Support {\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Support); - } - - /// - /// Returns true if Support instances are equal - /// - /// Instance of Support to be compared - /// Boolean - public bool Equals(Support input) - { - if (input == null) - { - return false; - } - return - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.cs b/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.cs deleted file mode 100644 index 0ed591c47..000000000 --- a/Adyen/Model/LegalEntityManagement/SupportingEntityCapability.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// SupportingEntityCapability - /// - [DataContract(Name = "SupportingEntityCapability")] - public partial class SupportingEntityCapability : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public SupportingEntityCapability() - { - } - - /// - /// Indicates whether the capability is allowed for the supporting entity. If a capability is allowed for a supporting entity but not for the parent legal entity, this means the legal entity has other supporting entities that failed verification. **You can use the allowed supporting entity** regardless of the verification status of other supporting entities. - /// - /// Indicates whether the capability is allowed for the supporting entity. If a capability is allowed for a supporting entity but not for the parent legal entity, this means the legal entity has other supporting entities that failed verification. **You can use the allowed supporting entity** regardless of the verification status of other supporting entities. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; private set; } - - /// - /// Supporting entity reference - /// - /// Supporting entity reference - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// Indicates whether the supporting entity capability is requested. - /// - /// Indicates whether the supporting entity capability is requested. - [DataMember(Name = "requested", EmitDefaultValue = false)] - public bool? Requested { get; private set; } - - /// - /// The status of the verification checks for the capability of the supporting entity. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - /// - /// The status of the verification checks for the capability of the supporting entity. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification has been successfully completed. * **rejected**: Adyen has verified the information, but found reasons to not allow the capability. - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public string VerificationStatus { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SupportingEntityCapability {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Requested: ").Append(Requested).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SupportingEntityCapability); - } - - /// - /// Returns true if SupportingEntityCapability instances are equal - /// - /// Instance of SupportingEntityCapability to be compared - /// Boolean - public bool Equals(SupportingEntityCapability input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Requested == input.Requested || - this.Requested.Equals(input.Requested) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - (this.VerificationStatus != null && - this.VerificationStatus.Equals(input.VerificationStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Requested.GetHashCode(); - if (this.VerificationStatus != null) - { - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/TaxInformation.cs b/Adyen/Model/LegalEntityManagement/TaxInformation.cs deleted file mode 100644 index 40bf98880..000000000 --- a/Adyen/Model/LegalEntityManagement/TaxInformation.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// TaxInformation - /// - [DataContract(Name = "TaxInformation")] - public partial class TaxInformation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code.. - /// The tax ID number (TIN) of the organization or individual.. - /// Set this to **true** if the legal entity or legal arrangement does not have a tax ID number (TIN). Only applicable in Australia.. - /// The TIN type depending on the country where it was issued. Only provide if the country has multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide **SSN**, **EIN**, or **ITIN** for the US.. - public TaxInformation(string country = default(string), string number = default(string), bool? numberAbsent = default(bool?), string type = default(string)) - { - this.Country = country; - this.Number = number; - this.NumberAbsent = numberAbsent; - this.Type = type; - } - - /// - /// The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - /// - /// The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The tax ID number (TIN) of the organization or individual. - /// - /// The tax ID number (TIN) of the organization or individual. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Set this to **true** if the legal entity or legal arrangement does not have a tax ID number (TIN). Only applicable in Australia. - /// - /// Set this to **true** if the legal entity or legal arrangement does not have a tax ID number (TIN). Only applicable in Australia. - [DataMember(Name = "numberAbsent", EmitDefaultValue = false)] - public bool? NumberAbsent { get; set; } - - /// - /// The TIN type depending on the country where it was issued. Only provide if the country has multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide **SSN**, **EIN**, or **ITIN** for the US. - /// - /// The TIN type depending on the country where it was issued. Only provide if the country has multiple tax IDs: Singapore, Sweden, the UK, or the US. For example, provide **SSN**, **EIN**, or **ITIN** for the US. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TaxInformation {\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" NumberAbsent: ").Append(NumberAbsent).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TaxInformation); - } - - /// - /// Returns true if TaxInformation instances are equal - /// - /// Instance of TaxInformation to be compared - /// Boolean - public bool Equals(TaxInformation input) - { - if (input == null) - { - return false; - } - return - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.NumberAbsent == input.NumberAbsent || - this.NumberAbsent.Equals(input.NumberAbsent) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NumberAbsent.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Country (string) maxLength - if (this.Country != null && this.Country.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Country, length must be less than 2.", new [] { "Country" }); - } - - // Country (string) minLength - if (this.Country != null && this.Country.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Country, length must be greater than 2.", new [] { "Country" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/TaxReportingClassification.cs b/Adyen/Model/LegalEntityManagement/TaxReportingClassification.cs deleted file mode 100644 index 53b6f13af..000000000 --- a/Adyen/Model/LegalEntityManagement/TaxReportingClassification.cs +++ /dev/null @@ -1,291 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// TaxReportingClassification - /// - [DataContract(Name = "TaxReportingClassification")] - public partial class TaxReportingClassification : IEquatable, IValidatableObject - { - /// - /// The organization's business type. Possible values: **other**, **listedPublicCompany**, **subsidiaryOfListedPublicCompany**, **governmentalOrganization**, **internationalOrganization**, **financialInstitution**. - /// - /// The organization's business type. Possible values: **other**, **listedPublicCompany**, **subsidiaryOfListedPublicCompany**, **governmentalOrganization**, **internationalOrganization**, **financialInstitution**. - [JsonConverter(typeof(StringEnumConverter))] - public enum BusinessTypeEnum - { - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 1, - - /// - /// Enum ListedPublicCompany for value: listedPublicCompany - /// - [EnumMember(Value = "listedPublicCompany")] - ListedPublicCompany = 2, - - /// - /// Enum SubsidiaryOfListedPublicCompany for value: subsidiaryOfListedPublicCompany - /// - [EnumMember(Value = "subsidiaryOfListedPublicCompany")] - SubsidiaryOfListedPublicCompany = 3, - - /// - /// Enum GovernmentalOrganization for value: governmentalOrganization - /// - [EnumMember(Value = "governmentalOrganization")] - GovernmentalOrganization = 4, - - /// - /// Enum InternationalOrganization for value: internationalOrganization - /// - [EnumMember(Value = "internationalOrganization")] - InternationalOrganization = 5, - - /// - /// Enum FinancialInstitution for value: financialInstitution - /// - [EnumMember(Value = "financialInstitution")] - FinancialInstitution = 6 - - } - - - /// - /// The organization's business type. Possible values: **other**, **listedPublicCompany**, **subsidiaryOfListedPublicCompany**, **governmentalOrganization**, **internationalOrganization**, **financialInstitution**. - /// - /// The organization's business type. Possible values: **other**, **listedPublicCompany**, **subsidiaryOfListedPublicCompany**, **governmentalOrganization**, **internationalOrganization**, **financialInstitution**. - [DataMember(Name = "businessType", EmitDefaultValue = false)] - public BusinessTypeEnum? BusinessType { get; set; } - /// - /// The organization's main source of income. Only required if `businessType` is **other**. Possible values: **businessOperation**, **realEstateSales**, **investmentInterestOrRoyalty**, **propertyRental**, **other**. - /// - /// The organization's main source of income. Only required if `businessType` is **other**. Possible values: **businessOperation**, **realEstateSales**, **investmentInterestOrRoyalty**, **propertyRental**, **other**. - [JsonConverter(typeof(StringEnumConverter))] - public enum MainSourceOfIncomeEnum - { - /// - /// Enum BusinessOperation for value: businessOperation - /// - [EnumMember(Value = "businessOperation")] - BusinessOperation = 1, - - /// - /// Enum RealEstateSales for value: realEstateSales - /// - [EnumMember(Value = "realEstateSales")] - RealEstateSales = 2, - - /// - /// Enum InvestmentInterestOrRoyalty for value: investmentInterestOrRoyalty - /// - [EnumMember(Value = "investmentInterestOrRoyalty")] - InvestmentInterestOrRoyalty = 3, - - /// - /// Enum PropertyRental for value: propertyRental - /// - [EnumMember(Value = "propertyRental")] - PropertyRental = 4, - - /// - /// Enum Other for value: other - /// - [EnumMember(Value = "other")] - Other = 5 - - } - - - /// - /// The organization's main source of income. Only required if `businessType` is **other**. Possible values: **businessOperation**, **realEstateSales**, **investmentInterestOrRoyalty**, **propertyRental**, **other**. - /// - /// The organization's main source of income. Only required if `businessType` is **other**. Possible values: **businessOperation**, **realEstateSales**, **investmentInterestOrRoyalty**, **propertyRental**, **other**. - [DataMember(Name = "mainSourceOfIncome", EmitDefaultValue = false)] - public MainSourceOfIncomeEnum? MainSourceOfIncome { get; set; } - /// - /// The tax reporting classification type. Possible values: **nonFinancialNonReportable**, **financialNonReportable**, **nonFinancialActive**, **nonFinancialPassive**. - /// - /// The tax reporting classification type. Possible values: **nonFinancialNonReportable**, **financialNonReportable**, **nonFinancialActive**, **nonFinancialPassive**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NonFinancialNonReportable for value: nonFinancialNonReportable - /// - [EnumMember(Value = "nonFinancialNonReportable")] - NonFinancialNonReportable = 1, - - /// - /// Enum FinancialNonReportable for value: financialNonReportable - /// - [EnumMember(Value = "financialNonReportable")] - FinancialNonReportable = 2, - - /// - /// Enum NonFinancialActive for value: nonFinancialActive - /// - [EnumMember(Value = "nonFinancialActive")] - NonFinancialActive = 3, - - /// - /// Enum NonFinancialPassive for value: nonFinancialPassive - /// - [EnumMember(Value = "nonFinancialPassive")] - NonFinancialPassive = 4 - - } - - - /// - /// The tax reporting classification type. Possible values: **nonFinancialNonReportable**, **financialNonReportable**, **nonFinancialActive**, **nonFinancialPassive**. - /// - /// The tax reporting classification type. Possible values: **nonFinancialNonReportable**, **financialNonReportable**, **nonFinancialActive**, **nonFinancialPassive**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The organization's business type. Possible values: **other**, **listedPublicCompany**, **subsidiaryOfListedPublicCompany**, **governmentalOrganization**, **internationalOrganization**, **financialInstitution**.. - /// The Global Intermediary Identification Number (GIIN) required for FATCA. Only required if the organization is a US financial institution and the `businessType` is **financialInstitution**.. - /// The organization's main source of income. Only required if `businessType` is **other**. Possible values: **businessOperation**, **realEstateSales**, **investmentInterestOrRoyalty**, **propertyRental**, **other**.. - /// The tax reporting classification type. Possible values: **nonFinancialNonReportable**, **financialNonReportable**, **nonFinancialActive**, **nonFinancialPassive**.. - public TaxReportingClassification(BusinessTypeEnum? businessType = default(BusinessTypeEnum?), string financialInstitutionNumber = default(string), MainSourceOfIncomeEnum? mainSourceOfIncome = default(MainSourceOfIncomeEnum?), TypeEnum? type = default(TypeEnum?)) - { - this.BusinessType = businessType; - this.FinancialInstitutionNumber = financialInstitutionNumber; - this.MainSourceOfIncome = mainSourceOfIncome; - this.Type = type; - } - - /// - /// The Global Intermediary Identification Number (GIIN) required for FATCA. Only required if the organization is a US financial institution and the `businessType` is **financialInstitution**. - /// - /// The Global Intermediary Identification Number (GIIN) required for FATCA. Only required if the organization is a US financial institution and the `businessType` is **financialInstitution**. - [DataMember(Name = "financialInstitutionNumber", EmitDefaultValue = false)] - public string FinancialInstitutionNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TaxReportingClassification {\n"); - sb.Append(" BusinessType: ").Append(BusinessType).Append("\n"); - sb.Append(" FinancialInstitutionNumber: ").Append(FinancialInstitutionNumber).Append("\n"); - sb.Append(" MainSourceOfIncome: ").Append(MainSourceOfIncome).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TaxReportingClassification); - } - - /// - /// Returns true if TaxReportingClassification instances are equal - /// - /// Instance of TaxReportingClassification to be compared - /// Boolean - public bool Equals(TaxReportingClassification input) - { - if (input == null) - { - return false; - } - return - ( - this.BusinessType == input.BusinessType || - this.BusinessType.Equals(input.BusinessType) - ) && - ( - this.FinancialInstitutionNumber == input.FinancialInstitutionNumber || - (this.FinancialInstitutionNumber != null && - this.FinancialInstitutionNumber.Equals(input.FinancialInstitutionNumber)) - ) && - ( - this.MainSourceOfIncome == input.MainSourceOfIncome || - this.MainSourceOfIncome.Equals(input.MainSourceOfIncome) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.BusinessType.GetHashCode(); - if (this.FinancialInstitutionNumber != null) - { - hashCode = (hashCode * 59) + this.FinancialInstitutionNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MainSourceOfIncome.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.cs b/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.cs deleted file mode 100644 index 8d1c113b6..000000000 --- a/Adyen/Model/LegalEntityManagement/TermsOfServiceAcceptanceInfo.cs +++ /dev/null @@ -1,289 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// TermsOfServiceAcceptanceInfo - /// - [DataContract(Name = "TermsOfServiceAcceptanceInfo")] - public partial class TermsOfServiceAcceptanceInfo : IEquatable, IValidatableObject - { - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AdyenAccount for value: adyenAccount - /// - [EnumMember(Value = "adyenAccount")] - AdyenAccount = 1, - - /// - /// Enum AdyenCapital for value: adyenCapital - /// - [EnumMember(Value = "adyenCapital")] - AdyenCapital = 2, - - /// - /// Enum AdyenCard for value: adyenCard - /// - [EnumMember(Value = "adyenCard")] - AdyenCard = 3, - - /// - /// Enum AdyenChargeCard for value: adyenChargeCard - /// - [EnumMember(Value = "adyenChargeCard")] - AdyenChargeCard = 4, - - /// - /// Enum AdyenForPlatformsAdvanced for value: adyenForPlatformsAdvanced - /// - [EnumMember(Value = "adyenForPlatformsAdvanced")] - AdyenForPlatformsAdvanced = 5, - - /// - /// Enum AdyenForPlatformsManage for value: adyenForPlatformsManage - /// - [EnumMember(Value = "adyenForPlatformsManage")] - AdyenForPlatformsManage = 6, - - /// - /// Enum AdyenFranchisee for value: adyenFranchisee - /// - [EnumMember(Value = "adyenFranchisee")] - AdyenFranchisee = 7, - - /// - /// Enum AdyenIssuing for value: adyenIssuing - /// - [EnumMember(Value = "adyenIssuing")] - AdyenIssuing = 8, - - /// - /// Enum AdyenPccr for value: adyenPccr - /// - [EnumMember(Value = "adyenPccr")] - AdyenPccr = 9, - - /// - /// Enum KycOnInvite for value: kycOnInvite - /// - [EnumMember(Value = "kycOnInvite")] - KycOnInvite = 10 - - } - - - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - /// - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the user that accepted the Terms of Service.. - /// The unique identifier of the legal entity for which the Terms of Service are accepted.. - /// The date when the Terms of Service were accepted, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00.. - /// An Adyen-generated reference for the accepted Terms of Service.. - /// The type of Terms of Service. Possible values: * **adyenForPlatformsManage** * **adyenIssuing** * **adyenForPlatformsAdvanced** * **adyenCapital** * **adyenAccount** * **adyenCard** * **adyenFranchisee** * **adyenPccr** * **adyenChargeCard** * **kycOnInvite** . - /// The expiration date for the Terms of Service acceptance, in ISO 8601 extended format. For example, 2022-12-18T00:00:00+01:00.. - public TermsOfServiceAcceptanceInfo(string acceptedBy = default(string), string acceptedFor = default(string), DateTime createdAt = default(DateTime), string id = default(string), TypeEnum? type = default(TypeEnum?), DateTime validTo = default(DateTime)) - { - this.AcceptedBy = acceptedBy; - this.AcceptedFor = acceptedFor; - this.CreatedAt = createdAt; - this.Id = id; - this.Type = type; - this.ValidTo = validTo; - } - - /// - /// The unique identifier of the user that accepted the Terms of Service. - /// - /// The unique identifier of the user that accepted the Terms of Service. - [DataMember(Name = "acceptedBy", EmitDefaultValue = false)] - public string AcceptedBy { get; set; } - - /// - /// The unique identifier of the legal entity for which the Terms of Service are accepted. - /// - /// The unique identifier of the legal entity for which the Terms of Service are accepted. - [DataMember(Name = "acceptedFor", EmitDefaultValue = false)] - public string AcceptedFor { get; set; } - - /// - /// The date when the Terms of Service were accepted, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00. - /// - /// The date when the Terms of Service were accepted, in ISO 8601 extended format. For example, 2022-12-18T10:15:30+01:00. - [DataMember(Name = "createdAt", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// An Adyen-generated reference for the accepted Terms of Service. - /// - /// An Adyen-generated reference for the accepted Terms of Service. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The expiration date for the Terms of Service acceptance, in ISO 8601 extended format. For example, 2022-12-18T00:00:00+01:00. - /// - /// The expiration date for the Terms of Service acceptance, in ISO 8601 extended format. For example, 2022-12-18T00:00:00+01:00. - [DataMember(Name = "validTo", EmitDefaultValue = false)] - public DateTime ValidTo { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TermsOfServiceAcceptanceInfo {\n"); - sb.Append(" AcceptedBy: ").Append(AcceptedBy).Append("\n"); - sb.Append(" AcceptedFor: ").Append(AcceptedFor).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" ValidTo: ").Append(ValidTo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TermsOfServiceAcceptanceInfo); - } - - /// - /// Returns true if TermsOfServiceAcceptanceInfo instances are equal - /// - /// Instance of TermsOfServiceAcceptanceInfo to be compared - /// Boolean - public bool Equals(TermsOfServiceAcceptanceInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptedBy == input.AcceptedBy || - (this.AcceptedBy != null && - this.AcceptedBy.Equals(input.AcceptedBy)) - ) && - ( - this.AcceptedFor == input.AcceptedFor || - (this.AcceptedFor != null && - this.AcceptedFor.Equals(input.AcceptedFor)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.ValidTo == input.ValidTo || - (this.ValidTo != null && - this.ValidTo.Equals(input.ValidTo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcceptedBy != null) - { - hashCode = (hashCode * 59) + this.AcceptedBy.GetHashCode(); - } - if (this.AcceptedFor != null) - { - hashCode = (hashCode * 59) + this.AcceptedFor.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.ValidTo != null) - { - hashCode = (hashCode * 59) + this.ValidTo.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/TransferInstrument.cs b/Adyen/Model/LegalEntityManagement/TransferInstrument.cs deleted file mode 100644 index 239b30d00..000000000 --- a/Adyen/Model/LegalEntityManagement/TransferInstrument.cs +++ /dev/null @@ -1,265 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// TransferInstrument - /// - [DataContract(Name = "TransferInstrument")] - public partial class TransferInstrument : IEquatable, IValidatableObject - { - /// - /// The type of transfer instrument. Possible value: **bankAccount**. - /// - /// The type of transfer instrument. Possible value: **bankAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 1, - - /// - /// Enum RecurringDetail for value: recurringDetail - /// - [EnumMember(Value = "recurringDetail")] - RecurringDetail = 2 - - } - - - /// - /// The type of transfer instrument. Possible value: **bankAccount**. - /// - /// The type of transfer instrument. Possible value: **bankAccount**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferInstrument() { } - /// - /// Initializes a new instance of the class. - /// - /// bankAccount (required). - /// List of capabilities for this transfer instrument.. - /// List of documents uploaded for the transfer instrument.. - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) that owns the transfer instrument. (required). - /// The verification errors related to capabilities for this transfer instrument.. - /// The type of transfer instrument. Possible value: **bankAccount**. (required). - public TransferInstrument(BankAccountInfo bankAccount = default(BankAccountInfo), Dictionary capabilities = default(Dictionary), List documentDetails = default(List), string legalEntityId = default(string), List problems = default(List), TypeEnum type = default(TypeEnum)) - { - this.BankAccount = bankAccount; - this.LegalEntityId = legalEntityId; - this.Type = type; - this.Capabilities = capabilities; - this.DocumentDetails = documentDetails; - this.Problems = problems; - } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", IsRequired = false, EmitDefaultValue = false)] - public BankAccountInfo BankAccount { get; set; } - - /// - /// List of capabilities for this transfer instrument. - /// - /// List of capabilities for this transfer instrument. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// List of documents uploaded for the transfer instrument. - /// - /// List of documents uploaded for the transfer instrument. - [DataMember(Name = "documentDetails", EmitDefaultValue = false)] - public List DocumentDetails { get; set; } - - /// - /// The unique identifier of the transfer instrument. - /// - /// The unique identifier of the transfer instrument. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) that owns the transfer instrument. - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) that owns the transfer instrument. - [DataMember(Name = "legalEntityId", IsRequired = false, EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// The verification errors related to capabilities for this transfer instrument. - /// - /// The verification errors related to capabilities for this transfer instrument. - [DataMember(Name = "problems", EmitDefaultValue = false)] - public List Problems { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferInstrument {\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" DocumentDetails: ").Append(DocumentDetails).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" Problems: ").Append(Problems).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferInstrument); - } - - /// - /// Returns true if TransferInstrument instances are equal - /// - /// Instance of TransferInstrument to be compared - /// Boolean - public bool Equals(TransferInstrument input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.DocumentDetails == input.DocumentDetails || - this.DocumentDetails != null && - input.DocumentDetails != null && - this.DocumentDetails.SequenceEqual(input.DocumentDetails) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.Problems == input.Problems || - this.Problems != null && - input.Problems != null && - this.Problems.SequenceEqual(input.Problems) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.DocumentDetails != null) - { - hashCode = (hashCode * 59) + this.DocumentDetails.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.Problems != null) - { - hashCode = (hashCode * 59) + this.Problems.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.cs b/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.cs deleted file mode 100644 index b968879c2..000000000 --- a/Adyen/Model/LegalEntityManagement/TransferInstrumentInfo.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// TransferInstrumentInfo - /// - [DataContract(Name = "TransferInstrumentInfo")] - public partial class TransferInstrumentInfo : IEquatable, IValidatableObject - { - /// - /// The type of transfer instrument. Possible value: **bankAccount**. - /// - /// The type of transfer instrument. Possible value: **bankAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 1, - - /// - /// Enum RecurringDetail for value: recurringDetail - /// - [EnumMember(Value = "recurringDetail")] - RecurringDetail = 2 - - } - - - /// - /// The type of transfer instrument. Possible value: **bankAccount**. - /// - /// The type of transfer instrument. Possible value: **bankAccount**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferInstrumentInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// bankAccount (required). - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) that owns the transfer instrument. (required). - /// The type of transfer instrument. Possible value: **bankAccount**. (required). - public TransferInstrumentInfo(BankAccountInfo bankAccount = default(BankAccountInfo), string legalEntityId = default(string), TypeEnum type = default(TypeEnum)) - { - this.BankAccount = bankAccount; - this.LegalEntityId = legalEntityId; - this.Type = type; - } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", IsRequired = false, EmitDefaultValue = false)] - public BankAccountInfo BankAccount { get; set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) that owns the transfer instrument. - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id) that owns the transfer instrument. - [DataMember(Name = "legalEntityId", IsRequired = false, EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferInstrumentInfo {\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferInstrumentInfo); - } - - /// - /// Returns true if TransferInstrumentInfo instances are equal - /// - /// Instance of TransferInstrumentInfo to be compared - /// Boolean - public bool Equals(TransferInstrumentInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.cs b/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.cs deleted file mode 100644 index 2272d8888..000000000 --- a/Adyen/Model/LegalEntityManagement/TransferInstrumentReference.cs +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// TransferInstrumentReference - /// - [DataContract(Name = "TransferInstrumentReference")] - public partial class TransferInstrumentReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferInstrumentReference() { } - /// - /// Initializes a new instance of the class. - /// - /// The masked IBAN or bank account number. (required). - /// The unique identifier of the resource. (required). - /// Four last digits of the bank account number. If the transfer instrument is created using [instant bank account verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding), and it is a virtual bank account, these digits may be different from the last four digits of the masked account number.. - public TransferInstrumentReference(string accountIdentifier = default(string), string id = default(string), string realLastFour = default(string)) - { - this.AccountIdentifier = accountIdentifier; - this.Id = id; - this.RealLastFour = realLastFour; - } - - /// - /// The masked IBAN or bank account number. - /// - /// The masked IBAN or bank account number. - [DataMember(Name = "accountIdentifier", IsRequired = false, EmitDefaultValue = false)] - public string AccountIdentifier { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Four last digits of the bank account number. If the transfer instrument is created using [instant bank account verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding), and it is a virtual bank account, these digits may be different from the last four digits of the masked account number. - /// - /// Four last digits of the bank account number. If the transfer instrument is created using [instant bank account verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding), and it is a virtual bank account, these digits may be different from the last four digits of the masked account number. - [DataMember(Name = "realLastFour", EmitDefaultValue = false)] - public string RealLastFour { get; set; } - - /// - /// Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). - /// - /// Identifies if the bank account was created through [instant bank verification](https://docs.adyen.com/release-notes/platforms-and-financial-products#releaseNote=2023-05-08-hosted-onboarding). - [DataMember(Name = "trustedSource", EmitDefaultValue = false)] - public bool? TrustedSource { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferInstrumentReference {\n"); - sb.Append(" AccountIdentifier: ").Append(AccountIdentifier).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" RealLastFour: ").Append(RealLastFour).Append("\n"); - sb.Append(" TrustedSource: ").Append(TrustedSource).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferInstrumentReference); - } - - /// - /// Returns true if TransferInstrumentReference instances are equal - /// - /// Instance of TransferInstrumentReference to be compared - /// Boolean - public bool Equals(TransferInstrumentReference input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountIdentifier == input.AccountIdentifier || - (this.AccountIdentifier != null && - this.AccountIdentifier.Equals(input.AccountIdentifier)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.RealLastFour == input.RealLastFour || - (this.RealLastFour != null && - this.RealLastFour.Equals(input.RealLastFour)) - ) && - ( - this.TrustedSource == input.TrustedSource || - this.TrustedSource.Equals(input.TrustedSource) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountIdentifier != null) - { - hashCode = (hashCode * 59) + this.AccountIdentifier.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.RealLastFour != null) - { - hashCode = (hashCode * 59) + this.RealLastFour.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TrustedSource.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/Trust.cs b/Adyen/Model/LegalEntityManagement/Trust.cs deleted file mode 100644 index a7973329b..000000000 --- a/Adyen/Model/LegalEntityManagement/Trust.cs +++ /dev/null @@ -1,517 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// Trust - /// - [DataContract(Name = "Trust")] - public partial class Trust : IEquatable, IValidatableObject - { - /// - /// Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). - /// - /// Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BusinessTrust for value: businessTrust - /// - [EnumMember(Value = "businessTrust")] - BusinessTrust = 1, - - /// - /// Enum CashManagementTrust for value: cashManagementTrust - /// - [EnumMember(Value = "cashManagementTrust")] - CashManagementTrust = 2, - - /// - /// Enum CharitableTrust for value: charitableTrust - /// - [EnumMember(Value = "charitableTrust")] - CharitableTrust = 3, - - /// - /// Enum CorporateUnitTrust for value: corporateUnitTrust - /// - [EnumMember(Value = "corporateUnitTrust")] - CorporateUnitTrust = 4, - - /// - /// Enum DeceasedEstate for value: deceasedEstate - /// - [EnumMember(Value = "deceasedEstate")] - DeceasedEstate = 5, - - /// - /// Enum DiscretionaryTrust for value: discretionaryTrust - /// - [EnumMember(Value = "discretionaryTrust")] - DiscretionaryTrust = 6, - - /// - /// Enum DiscretionaryInvestmentTrust for value: discretionaryInvestmentTrust - /// - [EnumMember(Value = "discretionaryInvestmentTrust")] - DiscretionaryInvestmentTrust = 7, - - /// - /// Enum DiscretionaryServicesManagementTrust for value: discretionaryServicesManagementTrust - /// - [EnumMember(Value = "discretionaryServicesManagementTrust")] - DiscretionaryServicesManagementTrust = 8, - - /// - /// Enum DiscretionaryTradingTrust for value: discretionaryTradingTrust - /// - [EnumMember(Value = "discretionaryTradingTrust")] - DiscretionaryTradingTrust = 9, - - /// - /// Enum FamilyTrust for value: familyTrust - /// - [EnumMember(Value = "familyTrust")] - FamilyTrust = 10, - - /// - /// Enum FirstHomeSaverAccountsTrust for value: firstHomeSaverAccountsTrust - /// - [EnumMember(Value = "firstHomeSaverAccountsTrust")] - FirstHomeSaverAccountsTrust = 11, - - /// - /// Enum FixedTrust for value: fixedTrust - /// - [EnumMember(Value = "fixedTrust")] - FixedTrust = 12, - - /// - /// Enum FixedUnitTrust for value: fixedUnitTrust - /// - [EnumMember(Value = "fixedUnitTrust")] - FixedUnitTrust = 13, - - /// - /// Enum HybridTrust for value: hybridTrust - /// - [EnumMember(Value = "hybridTrust")] - HybridTrust = 14, - - /// - /// Enum ListedPublicUnitTrust for value: listedPublicUnitTrust - /// - [EnumMember(Value = "listedPublicUnitTrust")] - ListedPublicUnitTrust = 15, - - /// - /// Enum OtherTrust for value: otherTrust - /// - [EnumMember(Value = "otherTrust")] - OtherTrust = 16, - - /// - /// Enum PooledSuperannuationTrust for value: pooledSuperannuationTrust - /// - [EnumMember(Value = "pooledSuperannuationTrust")] - PooledSuperannuationTrust = 17, - - /// - /// Enum PublicTradingTrust for value: publicTradingTrust - /// - [EnumMember(Value = "publicTradingTrust")] - PublicTradingTrust = 18, - - /// - /// Enum UnlistedPublicUnitTrust for value: unlistedPublicUnitTrust - /// - [EnumMember(Value = "unlistedPublicUnitTrust")] - UnlistedPublicUnitTrust = 19 - - } - - - /// - /// Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). - /// - /// Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [JsonConverter(typeof(StringEnumConverter))] - public enum VatAbsenceReasonEnum - { - /// - /// Enum IndustryExemption for value: industryExemption - /// - [EnumMember(Value = "industryExemption")] - IndustryExemption = 1, - - /// - /// Enum BelowTaxThreshold for value: belowTaxThreshold - /// - [EnumMember(Value = "belowTaxThreshold")] - BelowTaxThreshold = 2 - - } - - - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [DataMember(Name = "vatAbsenceReason", EmitDefaultValue = false)] - public VatAbsenceReasonEnum? VatAbsenceReason { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Trust() { } - /// - /// Initializes a new instance of the class. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. (required). - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format.. - /// A short description about the trust. Only applicable for charitable trusts in New Zealand.. - /// The registered name, if different from the `name`.. - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name.. - /// The legal name. (required). - /// principalPlaceOfBusiness. - /// registeredAddress (required). - /// The registration number.. - /// The tax information of the entity.. - /// Type of trust. See possible values for trusts in [Australia](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-australia) and [New Zealand](https://docs.adyen.com/platforms/verification-requirements/?tab=trust_3_4#trust-types-in-new-zealand). (required). - /// The undefined beneficiary information of the entity.. - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**.. - /// The VAT number.. - public Trust(string countryOfGoverningLaw = default(string), string dateOfIncorporation = default(string), string description = default(string), string doingBusinessAs = default(string), bool? doingBusinessAsAbsent = default(bool?), string name = default(string), Address principalPlaceOfBusiness = default(Address), Address registeredAddress = default(Address), string registrationNumber = default(string), List taxInformation = default(List), TypeEnum type = default(TypeEnum), List undefinedBeneficiaryInfo = default(List), VatAbsenceReasonEnum? vatAbsenceReason = default(VatAbsenceReasonEnum?), string vatNumber = default(string)) - { - this.CountryOfGoverningLaw = countryOfGoverningLaw; - this.Name = name; - this.RegisteredAddress = registeredAddress; - this.Type = type; - this.DateOfIncorporation = dateOfIncorporation; - this.Description = description; - this.DoingBusinessAs = doingBusinessAs; - this.DoingBusinessAsAbsent = doingBusinessAsAbsent; - this.PrincipalPlaceOfBusiness = principalPlaceOfBusiness; - this.RegistrationNumber = registrationNumber; - this.TaxInformation = taxInformation; - this.UndefinedBeneficiaryInfo = undefinedBeneficiaryInfo; - this.VatAbsenceReason = vatAbsenceReason; - this.VatNumber = vatNumber; - } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - [DataMember(Name = "countryOfGoverningLaw", IsRequired = false, EmitDefaultValue = false)] - public string CountryOfGoverningLaw { get; set; } - - /// - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format. - /// - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format. - [DataMember(Name = "dateOfIncorporation", EmitDefaultValue = false)] - public string DateOfIncorporation { get; set; } - - /// - /// A short description about the trust. Only applicable for charitable trusts in New Zealand. - /// - /// A short description about the trust. Only applicable for charitable trusts in New Zealand. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The registered name, if different from the `name`. - /// - /// The registered name, if different from the `name`. - [DataMember(Name = "doingBusinessAs", EmitDefaultValue = false)] - public string DoingBusinessAs { get; set; } - - /// - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name. - /// - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name. - [DataMember(Name = "doingBusinessAsAbsent", EmitDefaultValue = false)] - public bool? DoingBusinessAsAbsent { get; set; } - - /// - /// The legal name. - /// - /// The legal name. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Gets or Sets PrincipalPlaceOfBusiness - /// - [DataMember(Name = "principalPlaceOfBusiness", EmitDefaultValue = false)] - public Address PrincipalPlaceOfBusiness { get; set; } - - /// - /// Gets or Sets RegisteredAddress - /// - [DataMember(Name = "registeredAddress", IsRequired = false, EmitDefaultValue = false)] - public Address RegisteredAddress { get; set; } - - /// - /// The registration number. - /// - /// The registration number. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// The tax information of the entity. - /// - /// The tax information of the entity. - [DataMember(Name = "taxInformation", EmitDefaultValue = false)] - public List TaxInformation { get; set; } - - /// - /// The undefined beneficiary information of the entity. - /// - /// The undefined beneficiary information of the entity. - [DataMember(Name = "undefinedBeneficiaryInfo", EmitDefaultValue = false)] - public List UndefinedBeneficiaryInfo { get; set; } - - /// - /// The VAT number. - /// - /// The VAT number. - [DataMember(Name = "vatNumber", EmitDefaultValue = false)] - public string VatNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Trust {\n"); - sb.Append(" CountryOfGoverningLaw: ").Append(CountryOfGoverningLaw).Append("\n"); - sb.Append(" DateOfIncorporation: ").Append(DateOfIncorporation).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DoingBusinessAs: ").Append(DoingBusinessAs).Append("\n"); - sb.Append(" DoingBusinessAsAbsent: ").Append(DoingBusinessAsAbsent).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PrincipalPlaceOfBusiness: ").Append(PrincipalPlaceOfBusiness).Append("\n"); - sb.Append(" RegisteredAddress: ").Append(RegisteredAddress).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" TaxInformation: ").Append(TaxInformation).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UndefinedBeneficiaryInfo: ").Append(UndefinedBeneficiaryInfo).Append("\n"); - sb.Append(" VatAbsenceReason: ").Append(VatAbsenceReason).Append("\n"); - sb.Append(" VatNumber: ").Append(VatNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Trust); - } - - /// - /// Returns true if Trust instances are equal - /// - /// Instance of Trust to be compared - /// Boolean - public bool Equals(Trust input) - { - if (input == null) - { - return false; - } - return - ( - this.CountryOfGoverningLaw == input.CountryOfGoverningLaw || - (this.CountryOfGoverningLaw != null && - this.CountryOfGoverningLaw.Equals(input.CountryOfGoverningLaw)) - ) && - ( - this.DateOfIncorporation == input.DateOfIncorporation || - (this.DateOfIncorporation != null && - this.DateOfIncorporation.Equals(input.DateOfIncorporation)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DoingBusinessAs == input.DoingBusinessAs || - (this.DoingBusinessAs != null && - this.DoingBusinessAs.Equals(input.DoingBusinessAs)) - ) && - ( - this.DoingBusinessAsAbsent == input.DoingBusinessAsAbsent || - (this.DoingBusinessAsAbsent != null && - this.DoingBusinessAsAbsent.Equals(input.DoingBusinessAsAbsent)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PrincipalPlaceOfBusiness == input.PrincipalPlaceOfBusiness || - (this.PrincipalPlaceOfBusiness != null && - this.PrincipalPlaceOfBusiness.Equals(input.PrincipalPlaceOfBusiness)) - ) && - ( - this.RegisteredAddress == input.RegisteredAddress || - (this.RegisteredAddress != null && - this.RegisteredAddress.Equals(input.RegisteredAddress)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.TaxInformation == input.TaxInformation || - this.TaxInformation != null && - input.TaxInformation != null && - this.TaxInformation.SequenceEqual(input.TaxInformation) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UndefinedBeneficiaryInfo == input.UndefinedBeneficiaryInfo || - this.UndefinedBeneficiaryInfo != null && - input.UndefinedBeneficiaryInfo != null && - this.UndefinedBeneficiaryInfo.SequenceEqual(input.UndefinedBeneficiaryInfo) - ) && - ( - this.VatAbsenceReason == input.VatAbsenceReason || - this.VatAbsenceReason.Equals(input.VatAbsenceReason) - ) && - ( - this.VatNumber == input.VatNumber || - (this.VatNumber != null && - this.VatNumber.Equals(input.VatNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryOfGoverningLaw != null) - { - hashCode = (hashCode * 59) + this.CountryOfGoverningLaw.GetHashCode(); - } - if (this.DateOfIncorporation != null) - { - hashCode = (hashCode * 59) + this.DateOfIncorporation.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DoingBusinessAs != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAs.GetHashCode(); - } - if (this.DoingBusinessAsAbsent != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAsAbsent.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PrincipalPlaceOfBusiness != null) - { - hashCode = (hashCode * 59) + this.PrincipalPlaceOfBusiness.GetHashCode(); - } - if (this.RegisteredAddress != null) - { - hashCode = (hashCode * 59) + this.RegisteredAddress.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.TaxInformation != null) - { - hashCode = (hashCode * 59) + this.TaxInformation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UndefinedBeneficiaryInfo != null) - { - hashCode = (hashCode * 59) + this.UndefinedBeneficiaryInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VatAbsenceReason.GetHashCode(); - if (this.VatNumber != null) - { - hashCode = (hashCode * 59) + this.VatNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.cs deleted file mode 100644 index 0b3b64775..000000000 --- a/Adyen/Model/LegalEntityManagement/UKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// UKLocalAccountIdentification - /// - [DataContract(Name = "UKLocalAccountIdentification")] - public partial class UKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **ukLocal** - /// - /// **ukLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UkLocal for value: ukLocal - /// - [EnumMember(Value = "ukLocal")] - UkLocal = 1 - - } - - - /// - /// **ukLocal** - /// - /// **ukLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 8-digit bank account number, without separators or whitespace. (required). - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). - /// **ukLocal** (required) (default to TypeEnum.UkLocal). - public UKLocalAccountIdentification(string accountNumber = default(string), string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) - { - this.AccountNumber = accountNumber; - this.SortCode = sortCode; - this.Type = type; - } - - /// - /// The 8-digit bank account number, without separators or whitespace. - /// - /// The 8-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - /// - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - [DataMember(Name = "sortCode", IsRequired = false, EmitDefaultValue = false)] - public string SortCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" SortCode: ").Append(SortCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UKLocalAccountIdentification); - } - - /// - /// Returns true if UKLocalAccountIdentification instances are equal - /// - /// Instance of UKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(UKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.SortCode == input.SortCode || - (this.SortCode != null && - this.SortCode.Equals(input.SortCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.SortCode != null) - { - hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 8.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 8.", new [] { "AccountNumber" }); - } - - // SortCode (string) maxLength - if (this.SortCode != null && this.SortCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be less than 6.", new [] { "SortCode" }); - } - - // SortCode (string) minLength - if (this.SortCode != null && this.SortCode.Length < 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be greater than 6.", new [] { "SortCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.cs b/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.cs deleted file mode 100644 index 2d3992965..000000000 --- a/Adyen/Model/LegalEntityManagement/USLocalAccountIdentification.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// USLocalAccountIdentification - /// - [DataContract(Name = "USLocalAccountIdentification")] - public partial class USLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 1, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 2 - - } - - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// **usLocal** - /// - /// **usLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UsLocal for value: usLocal - /// - [EnumMember(Value = "usLocal")] - UsLocal = 1 - - } - - - /// - /// **usLocal** - /// - /// **usLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected USLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). - /// **usLocal** (required) (default to TypeEnum.UsLocal). - public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) - { - this.AccountNumber = accountNumber; - this.RoutingNumber = routingNumber; - this.Type = type; - this.AccountType = accountType; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - /// - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - [DataMember(Name = "routingNumber", IsRequired = false, EmitDefaultValue = false)] - public string RoutingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class USLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as USLocalAccountIdentification); - } - - /// - /// Returns true if USLocalAccountIdentification instances are equal - /// - /// Instance of USLocalAccountIdentification to be compared - /// Boolean - public bool Equals(USLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.RoutingNumber == input.RoutingNumber || - (this.RoutingNumber != null && - this.RoutingNumber.Equals(input.RoutingNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.RoutingNumber != null) - { - hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 18) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 18.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 2.", new [] { "AccountNumber" }); - } - - // RoutingNumber (string) maxLength - if (this.RoutingNumber != null && this.RoutingNumber.Length > 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RoutingNumber, length must be less than 9.", new [] { "RoutingNumber" }); - } - - // RoutingNumber (string) minLength - if (this.RoutingNumber != null && this.RoutingNumber.Length < 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RoutingNumber, length must be greater than 9.", new [] { "RoutingNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.cs b/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.cs deleted file mode 100644 index 0ca595c46..000000000 --- a/Adyen/Model/LegalEntityManagement/UndefinedBeneficiary.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// UndefinedBeneficiary - /// - [DataContract(Name = "UndefinedBeneficiary")] - public partial class UndefinedBeneficiary : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The details of the undefined beneficiary.. - public UndefinedBeneficiary(string description = default(string)) - { - this.Description = description; - } - - /// - /// The details of the undefined beneficiary. - /// - /// The details of the undefined beneficiary. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The reference of the undefined beneficiary. - /// - /// The reference of the undefined beneficiary. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UndefinedBeneficiary {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UndefinedBeneficiary); - } - - /// - /// Returns true if UndefinedBeneficiary instances are equal - /// - /// Instance of UndefinedBeneficiary to be compared - /// Boolean - public bool Equals(UndefinedBeneficiary input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.cs b/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.cs deleted file mode 100644 index ece827b9b..000000000 --- a/Adyen/Model/LegalEntityManagement/UnincorporatedPartnership.cs +++ /dev/null @@ -1,558 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// UnincorporatedPartnership - /// - [DataContract(Name = "UnincorporatedPartnership")] - public partial class UnincorporatedPartnership : IEquatable, IValidatableObject - { - /// - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** - /// - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum LimitedPartnership for value: limitedPartnership - /// - [EnumMember(Value = "limitedPartnership")] - LimitedPartnership = 1, - - /// - /// Enum GeneralPartnership for value: generalPartnership - /// - [EnumMember(Value = "generalPartnership")] - GeneralPartnership = 2, - - /// - /// Enum FamilyPartnership for value: familyPartnership - /// - [EnumMember(Value = "familyPartnership")] - FamilyPartnership = 3, - - /// - /// Enum CommercialPartnership for value: commercialPartnership - /// - [EnumMember(Value = "commercialPartnership")] - CommercialPartnership = 4, - - /// - /// Enum PublicPartnership for value: publicPartnership - /// - [EnumMember(Value = "publicPartnership")] - PublicPartnership = 5, - - /// - /// Enum OtherPartnership for value: otherPartnership - /// - [EnumMember(Value = "otherPartnership")] - OtherPartnership = 6, - - /// - /// Enum Gbr for value: gbr - /// - [EnumMember(Value = "gbr")] - Gbr = 7, - - /// - /// Enum Gmbh for value: gmbh - /// - [EnumMember(Value = "gmbh")] - Gmbh = 8, - - /// - /// Enum Kgaa for value: kgaa - /// - [EnumMember(Value = "kgaa")] - Kgaa = 9, - - /// - /// Enum Cv for value: cv - /// - [EnumMember(Value = "cv")] - Cv = 10, - - /// - /// Enum Vof for value: vof - /// - [EnumMember(Value = "vof")] - Vof = 11, - - /// - /// Enum Maatschap for value: maatschap - /// - [EnumMember(Value = "maatschap")] - Maatschap = 12, - - /// - /// Enum PrivateFundLimitedPartnership for value: privateFundLimitedPartnership - /// - [EnumMember(Value = "privateFundLimitedPartnership")] - PrivateFundLimitedPartnership = 13, - - /// - /// Enum BusinessTrustEntity for value: businessTrustEntity - /// - [EnumMember(Value = "businessTrustEntity")] - BusinessTrustEntity = 14, - - /// - /// Enum BusinessPartnership for value: businessPartnership - /// - [EnumMember(Value = "businessPartnership")] - BusinessPartnership = 15, - - /// - /// Enum LimitedLiabilityPartnership for value: limitedLiabilityPartnership - /// - [EnumMember(Value = "limitedLiabilityPartnership")] - LimitedLiabilityPartnership = 16, - - /// - /// Enum Eg for value: eg - /// - [EnumMember(Value = "eg")] - Eg = 17, - - /// - /// Enum Cooperative for value: cooperative - /// - [EnumMember(Value = "cooperative")] - Cooperative = 18, - - /// - /// Enum Vos for value: vos - /// - [EnumMember(Value = "vos")] - Vos = 19, - - /// - /// Enum ComunidadDeBienes for value: comunidadDeBienes - /// - [EnumMember(Value = "comunidadDeBienes")] - ComunidadDeBienes = 20, - - /// - /// Enum HerenciaYacente for value: herenciaYacente - /// - [EnumMember(Value = "herenciaYacente")] - HerenciaYacente = 21, - - /// - /// Enum ComunidadDePropietarios for value: comunidadDePropietarios - /// - [EnumMember(Value = "comunidadDePropietarios")] - ComunidadDePropietarios = 22, - - /// - /// Enum Sep for value: sep - /// - [EnumMember(Value = "sep")] - Sep = 23, - - /// - /// Enum Sca for value: sca - /// - [EnumMember(Value = "sca")] - Sca = 24, - - /// - /// Enum Bt for value: bt - /// - [EnumMember(Value = "bt")] - Bt = 25, - - /// - /// Enum Kkt for value: kkt - /// - [EnumMember(Value = "kkt")] - Kkt = 26, - - /// - /// Enum Scs for value: scs - /// - [EnumMember(Value = "scs")] - Scs = 27, - - /// - /// Enum Snc for value: snc - /// - [EnumMember(Value = "snc")] - Snc = 28 - - } - - - /// - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** - /// - /// Type of Partnership. Possible values: * **limitedPartnership** * **generalPartnership** * **familyPartnership** * **commercialPartnership** * **publicPartnership** * **otherPartnership** * **gbr** * **gmbh** * **kgaa** * **cv** * **vof** * **maatschap** * **privateFundLimitedPartnership** * **businessTrustEntity** * **businessPartnership** * **limitedLiabilityPartnership** * **eg** * **cooperative** * **vos** * **comunidadDeBienes** * **herenciaYacente** * **comunidadDePropietarios** * **sep** * **sca** * **bt** * **kkt** * **scs** * **snc** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - - /// - /// Returns false as Type should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeType() - { - return false; - } - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [JsonConverter(typeof(StringEnumConverter))] - public enum VatAbsenceReasonEnum - { - /// - /// Enum IndustryExemption for value: industryExemption - /// - [EnumMember(Value = "industryExemption")] - IndustryExemption = 1, - - /// - /// Enum BelowTaxThreshold for value: belowTaxThreshold - /// - [EnumMember(Value = "belowTaxThreshold")] - BelowTaxThreshold = 2 - - } - - - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - /// - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**. - [DataMember(Name = "vatAbsenceReason", EmitDefaultValue = false)] - public VatAbsenceReasonEnum? VatAbsenceReason { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UnincorporatedPartnership() { } - /// - /// Initializes a new instance of the class. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. (required). - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format.. - /// Short description about the Legal Arrangement.. - /// The registered name, if different from the `name`.. - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name.. - /// The legal name. (required). - /// principalPlaceOfBusiness. - /// registeredAddress (required). - /// The registration number.. - /// The tax information of the entity.. - /// The reason for not providing a VAT number. Possible values: **industryExemption**, **belowTaxThreshold**.. - /// The VAT number.. - public UnincorporatedPartnership(string countryOfGoverningLaw = default(string), string dateOfIncorporation = default(string), string description = default(string), string doingBusinessAs = default(string), bool? doingBusinessAsAbsent = default(bool?), string name = default(string), Address principalPlaceOfBusiness = default(Address), Address registeredAddress = default(Address), string registrationNumber = default(string), List taxInformation = default(List), VatAbsenceReasonEnum? vatAbsenceReason = default(VatAbsenceReasonEnum?), string vatNumber = default(string)) - { - this.CountryOfGoverningLaw = countryOfGoverningLaw; - this.Name = name; - this.RegisteredAddress = registeredAddress; - this.DateOfIncorporation = dateOfIncorporation; - this.Description = description; - this.DoingBusinessAs = doingBusinessAs; - this.DoingBusinessAsAbsent = doingBusinessAsAbsent; - this.PrincipalPlaceOfBusiness = principalPlaceOfBusiness; - this.RegistrationNumber = registrationNumber; - this.TaxInformation = taxInformation; - this.VatAbsenceReason = vatAbsenceReason; - this.VatNumber = vatNumber; - } - - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - /// - /// The two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the governing country. - [DataMember(Name = "countryOfGoverningLaw", IsRequired = false, EmitDefaultValue = false)] - public string CountryOfGoverningLaw { get; set; } - - /// - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format. - /// - /// The date when the legal arrangement was incorporated in YYYY-MM-DD format. - [DataMember(Name = "dateOfIncorporation", EmitDefaultValue = false)] - public string DateOfIncorporation { get; set; } - - /// - /// Short description about the Legal Arrangement. - /// - /// Short description about the Legal Arrangement. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The registered name, if different from the `name`. - /// - /// The registered name, if different from the `name`. - [DataMember(Name = "doingBusinessAs", EmitDefaultValue = false)] - public string DoingBusinessAs { get; set; } - - /// - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name. - /// - /// Set this to **true** if the legal arrangement does not have a `Doing business as` name. - [DataMember(Name = "doingBusinessAsAbsent", EmitDefaultValue = false)] - public bool? DoingBusinessAsAbsent { get; set; } - - /// - /// The legal name. - /// - /// The legal name. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Gets or Sets PrincipalPlaceOfBusiness - /// - [DataMember(Name = "principalPlaceOfBusiness", EmitDefaultValue = false)] - public Address PrincipalPlaceOfBusiness { get; set; } - - /// - /// Gets or Sets RegisteredAddress - /// - [DataMember(Name = "registeredAddress", IsRequired = false, EmitDefaultValue = false)] - public Address RegisteredAddress { get; set; } - - /// - /// The registration number. - /// - /// The registration number. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// The tax information of the entity. - /// - /// The tax information of the entity. - [DataMember(Name = "taxInformation", EmitDefaultValue = false)] - public List TaxInformation { get; set; } - - /// - /// The VAT number. - /// - /// The VAT number. - [DataMember(Name = "vatNumber", EmitDefaultValue = false)] - public string VatNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UnincorporatedPartnership {\n"); - sb.Append(" CountryOfGoverningLaw: ").Append(CountryOfGoverningLaw).Append("\n"); - sb.Append(" DateOfIncorporation: ").Append(DateOfIncorporation).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DoingBusinessAs: ").Append(DoingBusinessAs).Append("\n"); - sb.Append(" DoingBusinessAsAbsent: ").Append(DoingBusinessAsAbsent).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PrincipalPlaceOfBusiness: ").Append(PrincipalPlaceOfBusiness).Append("\n"); - sb.Append(" RegisteredAddress: ").Append(RegisteredAddress).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" TaxInformation: ").Append(TaxInformation).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VatAbsenceReason: ").Append(VatAbsenceReason).Append("\n"); - sb.Append(" VatNumber: ").Append(VatNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UnincorporatedPartnership); - } - - /// - /// Returns true if UnincorporatedPartnership instances are equal - /// - /// Instance of UnincorporatedPartnership to be compared - /// Boolean - public bool Equals(UnincorporatedPartnership input) - { - if (input == null) - { - return false; - } - return - ( - this.CountryOfGoverningLaw == input.CountryOfGoverningLaw || - (this.CountryOfGoverningLaw != null && - this.CountryOfGoverningLaw.Equals(input.CountryOfGoverningLaw)) - ) && - ( - this.DateOfIncorporation == input.DateOfIncorporation || - (this.DateOfIncorporation != null && - this.DateOfIncorporation.Equals(input.DateOfIncorporation)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DoingBusinessAs == input.DoingBusinessAs || - (this.DoingBusinessAs != null && - this.DoingBusinessAs.Equals(input.DoingBusinessAs)) - ) && - ( - this.DoingBusinessAsAbsent == input.DoingBusinessAsAbsent || - (this.DoingBusinessAsAbsent != null && - this.DoingBusinessAsAbsent.Equals(input.DoingBusinessAsAbsent)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PrincipalPlaceOfBusiness == input.PrincipalPlaceOfBusiness || - (this.PrincipalPlaceOfBusiness != null && - this.PrincipalPlaceOfBusiness.Equals(input.PrincipalPlaceOfBusiness)) - ) && - ( - this.RegisteredAddress == input.RegisteredAddress || - (this.RegisteredAddress != null && - this.RegisteredAddress.Equals(input.RegisteredAddress)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.TaxInformation == input.TaxInformation || - this.TaxInformation != null && - input.TaxInformation != null && - this.TaxInformation.SequenceEqual(input.TaxInformation) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.VatAbsenceReason == input.VatAbsenceReason || - this.VatAbsenceReason.Equals(input.VatAbsenceReason) - ) && - ( - this.VatNumber == input.VatNumber || - (this.VatNumber != null && - this.VatNumber.Equals(input.VatNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CountryOfGoverningLaw != null) - { - hashCode = (hashCode * 59) + this.CountryOfGoverningLaw.GetHashCode(); - } - if (this.DateOfIncorporation != null) - { - hashCode = (hashCode * 59) + this.DateOfIncorporation.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DoingBusinessAs != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAs.GetHashCode(); - } - if (this.DoingBusinessAsAbsent != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAsAbsent.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PrincipalPlaceOfBusiness != null) - { - hashCode = (hashCode * 59) + this.PrincipalPlaceOfBusiness.GetHashCode(); - } - if (this.RegisteredAddress != null) - { - hashCode = (hashCode * 59) + this.RegisteredAddress.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.TaxInformation != null) - { - hashCode = (hashCode * 59) + this.TaxInformation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.VatAbsenceReason.GetHashCode(); - if (this.VatNumber != null) - { - hashCode = (hashCode * 59) + this.VatNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/VerificationDeadline.cs b/Adyen/Model/LegalEntityManagement/VerificationDeadline.cs deleted file mode 100644 index dab49438e..000000000 --- a/Adyen/Model/LegalEntityManagement/VerificationDeadline.cs +++ /dev/null @@ -1,507 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// VerificationDeadline - /// - [DataContract(Name = "VerificationDeadline")] - public partial class VerificationDeadline : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// The list of capabilities that will be disallowed if information is not reviewed by the time of the deadline - /// - /// The list of capabilities that will be disallowed if information is not reviewed by the time of the deadline - [DataMember(Name = "capabilities", IsRequired = false, EmitDefaultValue = false)] - public List Capabilities { get; set; } - - /// - /// Returns false as Capabilities should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCapabilities() - { - return false; - } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public VerificationDeadline() - { - } - - /// - /// The unique identifiers of the legal entity or supporting entities that the deadline applies to - /// - /// The unique identifiers of the legal entity or supporting entities that the deadline applies to - [DataMember(Name = "entityIds", EmitDefaultValue = false)] - public List EntityIds { get; private set; } - - /// - /// The date that verification is due by before capabilities are disallowed. - /// - /// The date that verification is due by before capabilities are disallowed. - [DataMember(Name = "expiresAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime ExpiresAt { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationDeadline {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" EntityIds: ").Append(EntityIds).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationDeadline); - } - - /// - /// Returns true if VerificationDeadline instances are equal - /// - /// Instance of VerificationDeadline to be compared - /// Boolean - public bool Equals(VerificationDeadline input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.EntityIds == input.EntityIds || - this.EntityIds != null && - input.EntityIds != null && - this.EntityIds.SequenceEqual(input.EntityIds) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.EntityIds != null) - { - hashCode = (hashCode * 59) + this.EntityIds.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/VerificationError.cs b/Adyen/Model/LegalEntityManagement/VerificationError.cs deleted file mode 100644 index ffd07f3c1..000000000 --- a/Adyen/Model/LegalEntityManagement/VerificationError.cs +++ /dev/null @@ -1,596 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// VerificationError - /// - [DataContract(Name = "VerificationError")] - public partial class VerificationError : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public List Capabilities { get; set; } - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DataMissing for value: dataMissing - /// - [EnumMember(Value = "dataMissing")] - DataMissing = 1, - - /// - /// Enum DataReview for value: dataReview - /// - [EnumMember(Value = "dataReview")] - DataReview = 2, - - /// - /// Enum InvalidInput for value: invalidInput - /// - [EnumMember(Value = "invalidInput")] - InvalidInput = 3, - - /// - /// Enum PendingStatus for value: pendingStatus - /// - [EnumMember(Value = "pendingStatus")] - PendingStatus = 4, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 5 - - } - - - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability.. - /// The general error code.. - /// The general error message.. - /// An object containing possible solutions to fix a verification error.. - /// An array containing more granular information about the cause of the verification error.. - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** . - public VerificationError(List capabilities = default(List), string code = default(string), string message = default(string), List remediatingActions = default(List), List subErrors = default(List), TypeEnum? type = default(TypeEnum?)) - { - this.Capabilities = capabilities; - this.Code = code; - this.Message = message; - this.RemediatingActions = remediatingActions; - this.SubErrors = subErrors; - this.Type = type; - } - - /// - /// The general error code. - /// - /// The general error code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The general error message. - /// - /// The general error message. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// An object containing possible solutions to fix a verification error. - /// - /// An object containing possible solutions to fix a verification error. - [DataMember(Name = "remediatingActions", EmitDefaultValue = false)] - public List RemediatingActions { get; set; } - - /// - /// An array containing more granular information about the cause of the verification error. - /// - /// An array containing more granular information about the cause of the verification error. - [DataMember(Name = "subErrors", EmitDefaultValue = false)] - public List SubErrors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationError {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" RemediatingActions: ").Append(RemediatingActions).Append("\n"); - sb.Append(" SubErrors: ").Append(SubErrors).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationError); - } - - /// - /// Returns true if VerificationError instances are equal - /// - /// Instance of VerificationError to be compared - /// Boolean - public bool Equals(VerificationError input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.RemediatingActions == input.RemediatingActions || - this.RemediatingActions != null && - input.RemediatingActions != null && - this.RemediatingActions.SequenceEqual(input.RemediatingActions) - ) && - ( - this.SubErrors == input.SubErrors || - this.SubErrors != null && - input.SubErrors != null && - this.SubErrors.SequenceEqual(input.SubErrors) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.RemediatingActions != null) - { - hashCode = (hashCode * 59) + this.RemediatingActions.GetHashCode(); - } - if (this.SubErrors != null) - { - hashCode = (hashCode * 59) + this.SubErrors.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.cs b/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.cs deleted file mode 100644 index 12f00179a..000000000 --- a/Adyen/Model/LegalEntityManagement/VerificationErrorRecursive.cs +++ /dev/null @@ -1,576 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// VerificationErrorRecursive - /// - [DataContract(Name = "VerificationError-recursive")] - public partial class VerificationErrorRecursive : IEquatable, IValidatableObject - { - /// - /// Defines Capabilities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CapabilitiesEnum - { - /// - /// Enum AcceptExternalFunding for value: acceptExternalFunding - /// - [EnumMember(Value = "acceptExternalFunding")] - AcceptExternalFunding = 1, - - /// - /// Enum AcceptPspFunding for value: acceptPspFunding - /// - [EnumMember(Value = "acceptPspFunding")] - AcceptPspFunding = 2, - - /// - /// Enum AcceptTransactionInRestrictedCountries for value: acceptTransactionInRestrictedCountries - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountries")] - AcceptTransactionInRestrictedCountries = 3, - - /// - /// Enum AcceptTransactionInRestrictedCountriesCommercial for value: acceptTransactionInRestrictedCountriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesCommercial")] - AcceptTransactionInRestrictedCountriesCommercial = 4, - - /// - /// Enum AcceptTransactionInRestrictedCountriesConsumer for value: acceptTransactionInRestrictedCountriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedCountriesConsumer")] - AcceptTransactionInRestrictedCountriesConsumer = 5, - - /// - /// Enum AcceptTransactionInRestrictedIndustries for value: acceptTransactionInRestrictedIndustries - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustries")] - AcceptTransactionInRestrictedIndustries = 6, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesCommercial for value: acceptTransactionInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesCommercial")] - AcceptTransactionInRestrictedIndustriesCommercial = 7, - - /// - /// Enum AcceptTransactionInRestrictedIndustriesConsumer for value: acceptTransactionInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "acceptTransactionInRestrictedIndustriesConsumer")] - AcceptTransactionInRestrictedIndustriesConsumer = 8, - - /// - /// Enum Acquiring for value: acquiring - /// - [EnumMember(Value = "acquiring")] - Acquiring = 9, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 10, - - /// - /// Enum AtmWithdrawalCommercial for value: atmWithdrawalCommercial - /// - [EnumMember(Value = "atmWithdrawalCommercial")] - AtmWithdrawalCommercial = 11, - - /// - /// Enum AtmWithdrawalConsumer for value: atmWithdrawalConsumer - /// - [EnumMember(Value = "atmWithdrawalConsumer")] - AtmWithdrawalConsumer = 12, - - /// - /// Enum AtmWithdrawalInRestrictedCountries for value: atmWithdrawalInRestrictedCountries - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountries")] - AtmWithdrawalInRestrictedCountries = 13, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesCommercial for value: atmWithdrawalInRestrictedCountriesCommercial - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesCommercial")] - AtmWithdrawalInRestrictedCountriesCommercial = 14, - - /// - /// Enum AtmWithdrawalInRestrictedCountriesConsumer for value: atmWithdrawalInRestrictedCountriesConsumer - /// - [EnumMember(Value = "atmWithdrawalInRestrictedCountriesConsumer")] - AtmWithdrawalInRestrictedCountriesConsumer = 15, - - /// - /// Enum AuthorisedPaymentInstrumentUser for value: authorisedPaymentInstrumentUser - /// - [EnumMember(Value = "authorisedPaymentInstrumentUser")] - AuthorisedPaymentInstrumentUser = 16, - - /// - /// Enum GetGrantOffers for value: getGrantOffers - /// - [EnumMember(Value = "getGrantOffers")] - GetGrantOffers = 17, - - /// - /// Enum IssueBankAccount for value: issueBankAccount - /// - [EnumMember(Value = "issueBankAccount")] - IssueBankAccount = 18, - - /// - /// Enum IssueCard for value: issueCard - /// - [EnumMember(Value = "issueCard")] - IssueCard = 19, - - /// - /// Enum IssueCardCommercial for value: issueCardCommercial - /// - [EnumMember(Value = "issueCardCommercial")] - IssueCardCommercial = 20, - - /// - /// Enum IssueCardConsumer for value: issueCardConsumer - /// - [EnumMember(Value = "issueCardConsumer")] - IssueCardConsumer = 21, - - /// - /// Enum IssueChargeCard for value: issueChargeCard - /// - [EnumMember(Value = "issueChargeCard")] - IssueChargeCard = 22, - - /// - /// Enum IssueChargeCardCommercial for value: issueChargeCardCommercial - /// - [EnumMember(Value = "issueChargeCardCommercial")] - IssueChargeCardCommercial = 23, - - /// - /// Enum IssueCreditLimit for value: issueCreditLimit - /// - [EnumMember(Value = "issueCreditLimit")] - IssueCreditLimit = 24, - - /// - /// Enum LocalAcceptance for value: localAcceptance - /// - [EnumMember(Value = "localAcceptance")] - LocalAcceptance = 25, - - /// - /// Enum Payout for value: payout - /// - [EnumMember(Value = "payout")] - Payout = 26, - - /// - /// Enum PayoutToTransferInstrument for value: payoutToTransferInstrument - /// - [EnumMember(Value = "payoutToTransferInstrument")] - PayoutToTransferInstrument = 27, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 28, - - /// - /// Enum ReceiveFromBalanceAccount for value: receiveFromBalanceAccount - /// - [EnumMember(Value = "receiveFromBalanceAccount")] - ReceiveFromBalanceAccount = 29, - - /// - /// Enum ReceiveFromPlatformPayments for value: receiveFromPlatformPayments - /// - [EnumMember(Value = "receiveFromPlatformPayments")] - ReceiveFromPlatformPayments = 30, - - /// - /// Enum ReceiveFromThirdParty for value: receiveFromThirdParty - /// - [EnumMember(Value = "receiveFromThirdParty")] - ReceiveFromThirdParty = 31, - - /// - /// Enum ReceiveFromTransferInstrument for value: receiveFromTransferInstrument - /// - [EnumMember(Value = "receiveFromTransferInstrument")] - ReceiveFromTransferInstrument = 32, - - /// - /// Enum ReceiveGrants for value: receiveGrants - /// - [EnumMember(Value = "receiveGrants")] - ReceiveGrants = 33, - - /// - /// Enum ReceivePayments for value: receivePayments - /// - [EnumMember(Value = "receivePayments")] - ReceivePayments = 34, - - /// - /// Enum SendToBalanceAccount for value: sendToBalanceAccount - /// - [EnumMember(Value = "sendToBalanceAccount")] - SendToBalanceAccount = 35, - - /// - /// Enum SendToThirdParty for value: sendToThirdParty - /// - [EnumMember(Value = "sendToThirdParty")] - SendToThirdParty = 36, - - /// - /// Enum SendToTransferInstrument for value: sendToTransferInstrument - /// - [EnumMember(Value = "sendToTransferInstrument")] - SendToTransferInstrument = 37, - - /// - /// Enum ThirdPartyFunding for value: thirdPartyFunding - /// - [EnumMember(Value = "thirdPartyFunding")] - ThirdPartyFunding = 38, - - /// - /// Enum UseCard for value: useCard - /// - [EnumMember(Value = "useCard")] - UseCard = 39, - - /// - /// Enum UseCardCommercial for value: useCardCommercial - /// - [EnumMember(Value = "useCardCommercial")] - UseCardCommercial = 40, - - /// - /// Enum UseCardConsumer for value: useCardConsumer - /// - [EnumMember(Value = "useCardConsumer")] - UseCardConsumer = 41, - - /// - /// Enum UseCardInRestrictedCountries for value: useCardInRestrictedCountries - /// - [EnumMember(Value = "useCardInRestrictedCountries")] - UseCardInRestrictedCountries = 42, - - /// - /// Enum UseCardInRestrictedCountriesCommercial for value: useCardInRestrictedCountriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedCountriesCommercial")] - UseCardInRestrictedCountriesCommercial = 43, - - /// - /// Enum UseCardInRestrictedCountriesConsumer for value: useCardInRestrictedCountriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedCountriesConsumer")] - UseCardInRestrictedCountriesConsumer = 44, - - /// - /// Enum UseCardInRestrictedIndustries for value: useCardInRestrictedIndustries - /// - [EnumMember(Value = "useCardInRestrictedIndustries")] - UseCardInRestrictedIndustries = 45, - - /// - /// Enum UseCardInRestrictedIndustriesCommercial for value: useCardInRestrictedIndustriesCommercial - /// - [EnumMember(Value = "useCardInRestrictedIndustriesCommercial")] - UseCardInRestrictedIndustriesCommercial = 46, - - /// - /// Enum UseCardInRestrictedIndustriesConsumer for value: useCardInRestrictedIndustriesConsumer - /// - [EnumMember(Value = "useCardInRestrictedIndustriesConsumer")] - UseCardInRestrictedIndustriesConsumer = 47, - - /// - /// Enum UseChargeCard for value: useChargeCard - /// - [EnumMember(Value = "useChargeCard")] - UseChargeCard = 48, - - /// - /// Enum UseChargeCardCommercial for value: useChargeCardCommercial - /// - [EnumMember(Value = "useChargeCardCommercial")] - UseChargeCardCommercial = 49, - - /// - /// Enum WithdrawFromAtm for value: withdrawFromAtm - /// - [EnumMember(Value = "withdrawFromAtm")] - WithdrawFromAtm = 50, - - /// - /// Enum WithdrawFromAtmCommercial for value: withdrawFromAtmCommercial - /// - [EnumMember(Value = "withdrawFromAtmCommercial")] - WithdrawFromAtmCommercial = 51, - - /// - /// Enum WithdrawFromAtmConsumer for value: withdrawFromAtmConsumer - /// - [EnumMember(Value = "withdrawFromAtmConsumer")] - WithdrawFromAtmConsumer = 52, - - /// - /// Enum WithdrawFromAtmInRestrictedCountries for value: withdrawFromAtmInRestrictedCountries - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountries")] - WithdrawFromAtmInRestrictedCountries = 53, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesCommercial for value: withdrawFromAtmInRestrictedCountriesCommercial - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesCommercial")] - WithdrawFromAtmInRestrictedCountriesCommercial = 54, - - /// - /// Enum WithdrawFromAtmInRestrictedCountriesConsumer for value: withdrawFromAtmInRestrictedCountriesConsumer - /// - [EnumMember(Value = "withdrawFromAtmInRestrictedCountriesConsumer")] - WithdrawFromAtmInRestrictedCountriesConsumer = 55 - - } - - - - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", EmitDefaultValue = false)] - public List Capabilities { get; set; } - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DataMissing for value: dataMissing - /// - [EnumMember(Value = "dataMissing")] - DataMissing = 1, - - /// - /// Enum DataReview for value: dataReview - /// - [EnumMember(Value = "dataReview")] - DataReview = 2, - - /// - /// Enum InvalidInput for value: invalidInput - /// - [EnumMember(Value = "invalidInput")] - InvalidInput = 3, - - /// - /// Enum PendingStatus for value: pendingStatus - /// - [EnumMember(Value = "pendingStatus")] - PendingStatus = 4, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 5 - - } - - - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** - /// - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains key-value pairs that specify the actions that the legal entity can do in your platform. The key is a capability required for your integration. For example, **issueCard** for Issuing.The value is an object containing the settings for the capability.. - /// The general error code.. - /// The general error message.. - /// The type of error. Possible values: * **invalidInput** * **dataMissing** * **pendingStatus** * **rejected** * **dataReview** . - /// An object containing possible solutions to fix a verification error.. - public VerificationErrorRecursive(List capabilities = default(List), string code = default(string), string message = default(string), TypeEnum? type = default(TypeEnum?), List remediatingActions = default(List)) - { - this.Capabilities = capabilities; - this.Code = code; - this.Message = message; - this.Type = type; - this.RemediatingActions = remediatingActions; - } - - /// - /// The general error code. - /// - /// The general error code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The general error message. - /// - /// The general error message. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// An object containing possible solutions to fix a verification error. - /// - /// An object containing possible solutions to fix a verification error. - [DataMember(Name = "remediatingActions", EmitDefaultValue = false)] - public List RemediatingActions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationErrorRecursive {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" RemediatingActions: ").Append(RemediatingActions).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationErrorRecursive); - } - - /// - /// Returns true if VerificationErrorRecursive instances are equal - /// - /// Instance of VerificationErrorRecursive to be compared - /// Boolean - public bool Equals(VerificationErrorRecursive input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.RemediatingActions == input.RemediatingActions || - this.RemediatingActions != null && - input.RemediatingActions != null && - this.RemediatingActions.SequenceEqual(input.RemediatingActions) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.RemediatingActions != null) - { - hashCode = (hashCode * 59) + this.RemediatingActions.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/VerificationErrors.cs b/Adyen/Model/LegalEntityManagement/VerificationErrors.cs deleted file mode 100644 index c328b1511..000000000 --- a/Adyen/Model/LegalEntityManagement/VerificationErrors.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// VerificationErrors - /// - [DataContract(Name = "VerificationErrors")] - public partial class VerificationErrors : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of the verification errors.. - public VerificationErrors(List problems = default(List)) - { - this.Problems = problems; - } - - /// - /// List of the verification errors. - /// - /// List of the verification errors. - [DataMember(Name = "problems", EmitDefaultValue = false)] - public List Problems { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationErrors {\n"); - sb.Append(" Problems: ").Append(Problems).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationErrors); - } - - /// - /// Returns true if VerificationErrors instances are equal - /// - /// Instance of VerificationErrors to be compared - /// Boolean - public bool Equals(VerificationErrors input) - { - if (input == null) - { - return false; - } - return - ( - this.Problems == input.Problems || - this.Problems != null && - input.Problems != null && - this.Problems.SequenceEqual(input.Problems) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Problems != null) - { - hashCode = (hashCode * 59) + this.Problems.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/WebData.cs b/Adyen/Model/LegalEntityManagement/WebData.cs deleted file mode 100644 index 9b0ca3999..000000000 --- a/Adyen/Model/LegalEntityManagement/WebData.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// WebData - /// - [DataContract(Name = "WebData")] - public partial class WebData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The URL of the website or the app store URL.. - public WebData(string webAddress = default(string)) - { - this.WebAddress = webAddress; - } - - /// - /// The URL of the website or the app store URL. - /// - /// The URL of the website or the app store URL. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// The unique identifier of the web address. - /// - /// The unique identifier of the web address. - [DataMember(Name = "webAddressId", EmitDefaultValue = false)] - public string WebAddressId { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WebData {\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append(" WebAddressId: ").Append(WebAddressId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebData); - } - - /// - /// Returns true if WebData instances are equal - /// - /// Instance of WebData to be compared - /// Boolean - public bool Equals(WebData input) - { - if (input == null) - { - return false; - } - return - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ) && - ( - this.WebAddressId == input.WebAddressId || - (this.WebAddressId != null && - this.WebAddressId.Equals(input.WebAddressId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - if (this.WebAddressId != null) - { - hashCode = (hashCode * 59) + this.WebAddressId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/LegalEntityManagement/WebDataExemption.cs b/Adyen/Model/LegalEntityManagement/WebDataExemption.cs deleted file mode 100644 index b4827bda6..000000000 --- a/Adyen/Model/LegalEntityManagement/WebDataExemption.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.LegalEntityManagement -{ - /// - /// WebDataExemption - /// - [DataContract(Name = "WebDataExemption")] - public partial class WebDataExemption : IEquatable, IValidatableObject - { - /// - /// The reason why the web data was not provided. Possible value: **noOnlinePresence**. - /// - /// The reason why the web data was not provided. Possible value: **noOnlinePresence**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum NoOnlinePresence for value: noOnlinePresence - /// - [EnumMember(Value = "noOnlinePresence")] - NoOnlinePresence = 1, - - /// - /// Enum NotCollectedDuringOnboarding for value: notCollectedDuringOnboarding - /// - [EnumMember(Value = "notCollectedDuringOnboarding")] - NotCollectedDuringOnboarding = 2 - - } - - - /// - /// The reason why the web data was not provided. Possible value: **noOnlinePresence**. - /// - /// The reason why the web data was not provided. Possible value: **noOnlinePresence**. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The reason why the web data was not provided. Possible value: **noOnlinePresence**.. - public WebDataExemption(ReasonEnum? reason = default(ReasonEnum?)) - { - this.Reason = reason; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WebDataExemption {\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebDataExemption); - } - - /// - /// Returns true if WebDataExemption instances are equal - /// - /// Instance of WebDataExemption to be compared - /// Boolean - public bool Equals(WebDataExemption input) - { - if (input == null) - { - return false; - } - return - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AbstractOpenAPISchema.cs b/Adyen/Model/Management/AbstractOpenAPISchema.cs deleted file mode 100644 index a42753774..000000000 --- a/Adyen/Model/Management/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.Management -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/Management/AccelInfo.cs b/Adyen/Model/Management/AccelInfo.cs deleted file mode 100644 index 1bff8c3f6..000000000 --- a/Adyen/Model/Management/AccelInfo.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AccelInfo - /// - [DataContract(Name = "AccelInfo")] - public partial class AccelInfo : IEquatable, IValidatableObject - { - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ProcessingTypeEnum - { - /// - /// Enum Billpay for value: billpay - /// - [EnumMember(Value = "billpay")] - Billpay = 1, - - /// - /// Enum Ecom for value: ecom - /// - [EnumMember(Value = "ecom")] - Ecom = 2, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 3 - - } - - - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - [DataMember(Name = "processingType", IsRequired = false, EmitDefaultValue = false)] - public ProcessingTypeEnum ProcessingType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccelInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. (required). - /// transactionDescription. - public AccelInfo(ProcessingTypeEnum processingType = default(ProcessingTypeEnum), TransactionDescriptionInfo transactionDescription = default(TransactionDescriptionInfo)) - { - this.ProcessingType = processingType; - this.TransactionDescription = transactionDescription; - } - - /// - /// Gets or Sets TransactionDescription - /// - [DataMember(Name = "transactionDescription", EmitDefaultValue = false)] - public TransactionDescriptionInfo TransactionDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccelInfo {\n"); - sb.Append(" ProcessingType: ").Append(ProcessingType).Append("\n"); - sb.Append(" TransactionDescription: ").Append(TransactionDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccelInfo); - } - - /// - /// Returns true if AccelInfo instances are equal - /// - /// Instance of AccelInfo to be compared - /// Boolean - public bool Equals(AccelInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ProcessingType == input.ProcessingType || - this.ProcessingType.Equals(input.ProcessingType) - ) && - ( - this.TransactionDescription == input.TransactionDescription || - (this.TransactionDescription != null && - this.TransactionDescription.Equals(input.TransactionDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ProcessingType.GetHashCode(); - if (this.TransactionDescription != null) - { - hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AdditionalCommission.cs b/Adyen/Model/Management/AdditionalCommission.cs deleted file mode 100644 index bc162202f..000000000 --- a/Adyen/Model/Management/AdditionalCommission.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AdditionalCommission - /// - [DataContract(Name = "AdditionalCommission")] - public partial class AdditionalCommission : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Unique identifier of the balance account to which the additional commission is booked.. - /// A fixed commission fee, in minor units.. - /// A variable commission fee, in basis points.. - public AdditionalCommission(string balanceAccountId = default(string), long? fixedAmount = default(long?), long? variablePercentage = default(long?)) - { - this.BalanceAccountId = balanceAccountId; - this.FixedAmount = fixedAmount; - this.VariablePercentage = variablePercentage; - } - - /// - /// Unique identifier of the balance account to which the additional commission is booked. - /// - /// Unique identifier of the balance account to which the additional commission is booked. - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// A fixed commission fee, in minor units. - /// - /// A fixed commission fee, in minor units. - [DataMember(Name = "fixedAmount", EmitDefaultValue = false)] - public long? FixedAmount { get; set; } - - /// - /// A variable commission fee, in basis points. - /// - /// A variable commission fee, in basis points. - [DataMember(Name = "variablePercentage", EmitDefaultValue = false)] - public long? VariablePercentage { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalCommission {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" FixedAmount: ").Append(FixedAmount).Append("\n"); - sb.Append(" VariablePercentage: ").Append(VariablePercentage).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalCommission); - } - - /// - /// Returns true if AdditionalCommission instances are equal - /// - /// Instance of AdditionalCommission to be compared - /// Boolean - public bool Equals(AdditionalCommission input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.FixedAmount == input.FixedAmount || - this.FixedAmount.Equals(input.FixedAmount) - ) && - ( - this.VariablePercentage == input.VariablePercentage || - this.VariablePercentage.Equals(input.VariablePercentage) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FixedAmount.GetHashCode(); - hashCode = (hashCode * 59) + this.VariablePercentage.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AdditionalSettings.cs b/Adyen/Model/Management/AdditionalSettings.cs deleted file mode 100644 index db50a57e7..000000000 --- a/Adyen/Model/Management/AdditionalSettings.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AdditionalSettings - /// - [DataContract(Name = "AdditionalSettings")] - public partial class AdditionalSettings : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Object containing list of event codes for which the notification will be sent. . - /// Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured.. - public AdditionalSettings(List includeEventCodes = default(List), Dictionary properties = default(Dictionary)) - { - this.IncludeEventCodes = includeEventCodes; - this.Properties = properties; - } - - /// - /// Object containing list of event codes for which the notification will be sent. - /// - /// Object containing list of event codes for which the notification will be sent. - [DataMember(Name = "includeEventCodes", EmitDefaultValue = false)] - public List IncludeEventCodes { get; set; } - - /// - /// Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. - /// - /// Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. - [DataMember(Name = "properties", EmitDefaultValue = false)] - public Dictionary Properties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalSettings {\n"); - sb.Append(" IncludeEventCodes: ").Append(IncludeEventCodes).Append("\n"); - sb.Append(" Properties: ").Append(Properties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalSettings); - } - - /// - /// Returns true if AdditionalSettings instances are equal - /// - /// Instance of AdditionalSettings to be compared - /// Boolean - public bool Equals(AdditionalSettings input) - { - if (input == null) - { - return false; - } - return - ( - this.IncludeEventCodes == input.IncludeEventCodes || - this.IncludeEventCodes != null && - input.IncludeEventCodes != null && - this.IncludeEventCodes.SequenceEqual(input.IncludeEventCodes) - ) && - ( - this.Properties == input.Properties || - this.Properties != null && - input.Properties != null && - this.Properties.SequenceEqual(input.Properties) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IncludeEventCodes != null) - { - hashCode = (hashCode * 59) + this.IncludeEventCodes.GetHashCode(); - } - if (this.Properties != null) - { - hashCode = (hashCode * 59) + this.Properties.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AdditionalSettingsResponse.cs b/Adyen/Model/Management/AdditionalSettingsResponse.cs deleted file mode 100644 index bd0b56450..000000000 --- a/Adyen/Model/Management/AdditionalSettingsResponse.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AdditionalSettingsResponse - /// - [DataContract(Name = "AdditionalSettingsResponse")] - public partial class AdditionalSettingsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Object containing list of event codes for which the notification will not be sent. . - /// Object containing list of event codes for which the notification will be sent. . - /// Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured.. - public AdditionalSettingsResponse(List excludeEventCodes = default(List), List includeEventCodes = default(List), Dictionary properties = default(Dictionary)) - { - this.ExcludeEventCodes = excludeEventCodes; - this.IncludeEventCodes = includeEventCodes; - this.Properties = properties; - } - - /// - /// Object containing list of event codes for which the notification will not be sent. - /// - /// Object containing list of event codes for which the notification will not be sent. - [DataMember(Name = "excludeEventCodes", EmitDefaultValue = false)] - public List ExcludeEventCodes { get; set; } - - /// - /// Object containing list of event codes for which the notification will be sent. - /// - /// Object containing list of event codes for which the notification will be sent. - [DataMember(Name = "includeEventCodes", EmitDefaultValue = false)] - public List IncludeEventCodes { get; set; } - - /// - /// Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. - /// - /// Object containing boolean key-value pairs. The key can be any [standard webhook additional setting](https://docs.adyen.com/development-resources/webhooks/additional-settings), and the value indicates if the setting is enabled. For example, `captureDelayHours`: **true** means the standard notifications you get will contain the number of hours remaining until the payment will be captured. - [DataMember(Name = "properties", EmitDefaultValue = false)] - public Dictionary Properties { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalSettingsResponse {\n"); - sb.Append(" ExcludeEventCodes: ").Append(ExcludeEventCodes).Append("\n"); - sb.Append(" IncludeEventCodes: ").Append(IncludeEventCodes).Append("\n"); - sb.Append(" Properties: ").Append(Properties).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalSettingsResponse); - } - - /// - /// Returns true if AdditionalSettingsResponse instances are equal - /// - /// Instance of AdditionalSettingsResponse to be compared - /// Boolean - public bool Equals(AdditionalSettingsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.ExcludeEventCodes == input.ExcludeEventCodes || - this.ExcludeEventCodes != null && - input.ExcludeEventCodes != null && - this.ExcludeEventCodes.SequenceEqual(input.ExcludeEventCodes) - ) && - ( - this.IncludeEventCodes == input.IncludeEventCodes || - this.IncludeEventCodes != null && - input.IncludeEventCodes != null && - this.IncludeEventCodes.SequenceEqual(input.IncludeEventCodes) - ) && - ( - this.Properties == input.Properties || - this.Properties != null && - input.Properties != null && - this.Properties.SequenceEqual(input.Properties) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExcludeEventCodes != null) - { - hashCode = (hashCode * 59) + this.ExcludeEventCodes.GetHashCode(); - } - if (this.IncludeEventCodes != null) - { - hashCode = (hashCode * 59) + this.IncludeEventCodes.GetHashCode(); - } - if (this.Properties != null) - { - hashCode = (hashCode * 59) + this.Properties.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Address.cs b/Adyen/Model/Management/Address.cs deleted file mode 100644 index 3b93efcaa..000000000 --- a/Adyen/Model/Management/Address.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The name of the city.. - /// The name of the company.. - /// The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.. - /// The postal code.. - /// The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States. - /// The name of the street, and the house or building number.. - /// Additional address details, if any.. - public Address(string city = default(string), string companyName = default(string), string country = default(string), string postalCode = default(string), string stateOrProvince = default(string), string streetAddress = default(string), string streetAddress2 = default(string)) - { - this.City = city; - this.CompanyName = companyName; - this.Country = country; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - this.StreetAddress = streetAddress; - this.StreetAddress2 = streetAddress2; - } - - /// - /// The name of the city. - /// - /// The name of the city. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The name of the company. - /// - /// The name of the company. - [DataMember(Name = "companyName", EmitDefaultValue = false)] - public string CompanyName { get; set; } - - /// - /// The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. - /// - /// The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The postal code. - /// - /// The postal code. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States - /// - /// The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street, and the house or building number. - /// - /// The name of the street, and the house or building number. - [DataMember(Name = "streetAddress", EmitDefaultValue = false)] - public string StreetAddress { get; set; } - - /// - /// Additional address details, if any. - /// - /// Additional address details, if any. - [DataMember(Name = "streetAddress2", EmitDefaultValue = false)] - public string StreetAddress2 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" StreetAddress: ").Append(StreetAddress).Append("\n"); - sb.Append(" StreetAddress2: ").Append(StreetAddress2).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.StreetAddress == input.StreetAddress || - (this.StreetAddress != null && - this.StreetAddress.Equals(input.StreetAddress)) - ) && - ( - this.StreetAddress2 == input.StreetAddress2 || - (this.StreetAddress2 != null && - this.StreetAddress2.Equals(input.StreetAddress2)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.StreetAddress != null) - { - hashCode = (hashCode * 59) + this.StreetAddress.GetHashCode(); - } - if (this.StreetAddress2 != null) - { - hashCode = (hashCode * 59) + this.StreetAddress2.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AffirmInfo.cs b/Adyen/Model/Management/AffirmInfo.cs deleted file mode 100644 index 77d7de11b..000000000 --- a/Adyen/Model/Management/AffirmInfo.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AffirmInfo - /// - [DataContract(Name = "AffirmInfo")] - public partial class AffirmInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AffirmInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Merchant support email (required). - public AffirmInfo(string supportEmail = default(string)) - { - this.SupportEmail = supportEmail; - } - - /// - /// Merchant support email - /// - /// Merchant support email - [DataMember(Name = "supportEmail", IsRequired = false, EmitDefaultValue = false)] - public string SupportEmail { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AffirmInfo {\n"); - sb.Append(" SupportEmail: ").Append(SupportEmail).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AffirmInfo); - } - - /// - /// Returns true if AffirmInfo instances are equal - /// - /// Instance of AffirmInfo to be compared - /// Boolean - public bool Equals(AffirmInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.SupportEmail == input.SupportEmail || - (this.SupportEmail != null && - this.SupportEmail.Equals(input.SupportEmail)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SupportEmail != null) - { - hashCode = (hashCode * 59) + this.SupportEmail.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AfterpayTouchInfo.cs b/Adyen/Model/Management/AfterpayTouchInfo.cs deleted file mode 100644 index 03659f3fd..000000000 --- a/Adyen/Model/Management/AfterpayTouchInfo.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AfterpayTouchInfo - /// - [DataContract(Name = "AfterpayTouchInfo")] - public partial class AfterpayTouchInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AfterpayTouchInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Support Url (required). - public AfterpayTouchInfo(string supportUrl = default(string)) - { - this.SupportUrl = supportUrl; - } - - /// - /// Support Url - /// - /// Support Url - [DataMember(Name = "supportUrl", IsRequired = false, EmitDefaultValue = false)] - public string SupportUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AfterpayTouchInfo {\n"); - sb.Append(" SupportUrl: ").Append(SupportUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AfterpayTouchInfo); - } - - /// - /// Returns true if AfterpayTouchInfo instances are equal - /// - /// Instance of AfterpayTouchInfo to be compared - /// Boolean - public bool Equals(AfterpayTouchInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.SupportUrl == input.SupportUrl || - (this.SupportUrl != null && - this.SupportUrl.Equals(input.SupportUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SupportUrl != null) - { - hashCode = (hashCode * 59) + this.SupportUrl.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AllowedOrigin.cs b/Adyen/Model/Management/AllowedOrigin.cs deleted file mode 100644 index 0cd36b684..000000000 --- a/Adyen/Model/Management/AllowedOrigin.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AllowedOrigin - /// - [DataContract(Name = "AllowedOrigin")] - public partial class AllowedOrigin : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AllowedOrigin() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Domain of the allowed origin. (required). - /// Unique identifier of the allowed origin.. - public AllowedOrigin(Links links = default(Links), string domain = default(string), string id = default(string)) - { - this.Domain = domain; - this.Links = links; - this.Id = id; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// Domain of the allowed origin. - /// - /// Domain of the allowed origin. - [DataMember(Name = "domain", IsRequired = false, EmitDefaultValue = false)] - public string Domain { get; set; } - - /// - /// Unique identifier of the allowed origin. - /// - /// Unique identifier of the allowed origin. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AllowedOrigin {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Domain: ").Append(Domain).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AllowedOrigin); - } - - /// - /// Returns true if AllowedOrigin instances are equal - /// - /// Instance of AllowedOrigin to be compared - /// Boolean - public bool Equals(AllowedOrigin input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Domain == input.Domain || - (this.Domain != null && - this.Domain.Equals(input.Domain)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Domain != null) - { - hashCode = (hashCode * 59) + this.Domain.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AllowedOriginsResponse.cs b/Adyen/Model/Management/AllowedOriginsResponse.cs deleted file mode 100644 index d8f3ec9f4..000000000 --- a/Adyen/Model/Management/AllowedOriginsResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AllowedOriginsResponse - /// - [DataContract(Name = "AllowedOriginsResponse")] - public partial class AllowedOriginsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of allowed origins.. - public AllowedOriginsResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// List of allowed origins. - /// - /// List of allowed origins. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AllowedOriginsResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AllowedOriginsResponse); - } - - /// - /// Returns true if AllowedOriginsResponse instances are equal - /// - /// Instance of AllowedOriginsResponse to be compared - /// Boolean - public bool Equals(AllowedOriginsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AmexInfo.cs b/Adyen/Model/Management/AmexInfo.cs deleted file mode 100644 index 4fbaf77b3..000000000 --- a/Adyen/Model/Management/AmexInfo.cs +++ /dev/null @@ -1,197 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AmexInfo - /// - [DataContract(Name = "AmexInfo")] - public partial class AmexInfo : IEquatable, IValidatableObject - { - /// - /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. - /// - /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. - [JsonConverter(typeof(StringEnumConverter))] - public enum ServiceLevelEnum - { - /// - /// Enum NoContract for value: noContract - /// - [EnumMember(Value = "noContract")] - NoContract = 1, - - /// - /// Enum GatewayContract for value: gatewayContract - /// - [EnumMember(Value = "gatewayContract")] - GatewayContract = 2, - - /// - /// Enum PaymentDesignatorContract for value: paymentDesignatorContract - /// - [EnumMember(Value = "paymentDesignatorContract")] - PaymentDesignatorContract = 3 - - } - - - /// - /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. - /// - /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. - [DataMember(Name = "serviceLevel", IsRequired = false, EmitDefaultValue = false)] - public ServiceLevelEnum ServiceLevel { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AmexInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Merchant ID (MID) number. Format: 10 numeric characters. You must provide this field when you request `gatewayContract` or `paymentDesignatorContract` service levels.. - /// Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is **false**. (default to false). - /// Specifies the service level (settlement type) of this payment method. Possible values: * **noContract**: Adyen holds the contract with American Express. * **gatewayContract**: American Express receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. * **paymentDesignatorContract**: Adyen receives the settlement, and handles disputes and payouts. (required). - public AmexInfo(string midNumber = default(string), bool? reuseMidNumber = false, ServiceLevelEnum serviceLevel = default(ServiceLevelEnum)) - { - this.ServiceLevel = serviceLevel; - this.MidNumber = midNumber; - this.ReuseMidNumber = reuseMidNumber; - } - - /// - /// Merchant ID (MID) number. Format: 10 numeric characters. You must provide this field when you request `gatewayContract` or `paymentDesignatorContract` service levels. - /// - /// Merchant ID (MID) number. Format: 10 numeric characters. You must provide this field when you request `gatewayContract` or `paymentDesignatorContract` service levels. - [DataMember(Name = "midNumber", EmitDefaultValue = false)] - public string MidNumber { get; set; } - - /// - /// Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is **false**. - /// - /// Indicates whether the Amex Merchant ID is reused from a previously setup Amex payment method. This is only applicable for `gatewayContract` and `paymentDesignatorContract` service levels. The default value is **false**. - [DataMember(Name = "reuseMidNumber", EmitDefaultValue = false)] - public bool? ReuseMidNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AmexInfo {\n"); - sb.Append(" MidNumber: ").Append(MidNumber).Append("\n"); - sb.Append(" ReuseMidNumber: ").Append(ReuseMidNumber).Append("\n"); - sb.Append(" ServiceLevel: ").Append(ServiceLevel).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AmexInfo); - } - - /// - /// Returns true if AmexInfo instances are equal - /// - /// Instance of AmexInfo to be compared - /// Boolean - public bool Equals(AmexInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.MidNumber == input.MidNumber || - (this.MidNumber != null && - this.MidNumber.Equals(input.MidNumber)) - ) && - ( - this.ReuseMidNumber == input.ReuseMidNumber || - this.ReuseMidNumber.Equals(input.ReuseMidNumber) - ) && - ( - this.ServiceLevel == input.ServiceLevel || - this.ServiceLevel.Equals(input.ServiceLevel) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MidNumber != null) - { - hashCode = (hashCode * 59) + this.MidNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReuseMidNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.ServiceLevel.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // MidNumber (string) maxLength - if (this.MidNumber != null && this.MidNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MidNumber, length must be less than 10.", new [] { "MidNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Amount.cs b/Adyen/Model/Management/Amount.cs deleted file mode 100644 index 10942978d..000000000 --- a/Adyen/Model/Management/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AndroidApp.cs b/Adyen/Model/Management/AndroidApp.cs deleted file mode 100644 index 3342c8aaa..000000000 --- a/Adyen/Model/Management/AndroidApp.cs +++ /dev/null @@ -1,319 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AndroidApp - /// - [DataContract(Name = "AndroidApp")] - public partial class AndroidApp : IEquatable, IValidatableObject - { - /// - /// The status of the app. Possible values: * `processing`: the app is being signed and converted to a format that the terminal can handle. * `error`: something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: there is something wrong with the APK file of the app. * `ready`: the app has been signed and converted. * `archived`: the app is no longer available. - /// - /// The status of the app. Possible values: * `processing`: the app is being signed and converted to a format that the terminal can handle. * `error`: something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: there is something wrong with the APK file of the app. * `ready`: the app has been signed and converted. * `archived`: the app is no longer available. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Archived for value: archived - /// - [EnumMember(Value = "archived")] - Archived = 1, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 2, - - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 3, - - /// - /// Enum Processing for value: processing - /// - [EnumMember(Value = "processing")] - Processing = 4, - - /// - /// Enum Ready for value: ready - /// - [EnumMember(Value = "ready")] - Ready = 5 - - } - - - /// - /// The status of the app. Possible values: * `processing`: the app is being signed and converted to a format that the terminal can handle. * `error`: something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: there is something wrong with the APK file of the app. * `ready`: the app has been signed and converted. * `archived`: the app is no longer available. - /// - /// The status of the app. Possible values: * `processing`: the app is being signed and converted to a format that the terminal can handle. * `error`: something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: there is something wrong with the APK file of the app. * `ready`: the app has been signed and converted. * `archived`: the app is no longer available. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AndroidApp() { } - /// - /// Initializes a new instance of the class. - /// - /// The description that was provided when uploading the app. The description is not shown on the terminal.. - /// The error code of the Android app with the `status` of either **error** or **invalid**.. - /// The list of errors of the Android app.. - /// The unique identifier of the app. (required). - /// The app name that is shown on the terminal.. - /// The package name that uniquely identifies the Android app.. - /// The status of the app. Possible values: * `processing`: the app is being signed and converted to a format that the terminal can handle. * `error`: something went wrong. Check that the app matches the [requirements](https://docs.adyen.com/point-of-sale/android-terminals/app-requirements). * `invalid`: there is something wrong with the APK file of the app. * `ready`: the app has been signed and converted. * `archived`: the app is no longer available. (required). - /// The version number of the app.. - /// The app version number that is shown on the terminal.. - public AndroidApp(string description = default(string), string errorCode = default(string), List errors = default(List), string id = default(string), string label = default(string), string packageName = default(string), StatusEnum status = default(StatusEnum), int? versionCode = default(int?), string versionName = default(string)) - { - this.Id = id; - this.Status = status; - this.Description = description; - this.ErrorCode = errorCode; - this.Errors = errors; - this.Label = label; - this.PackageName = packageName; - this.VersionCode = versionCode; - this.VersionName = versionName; - } - - /// - /// The description that was provided when uploading the app. The description is not shown on the terminal. - /// - /// The description that was provided when uploading the app. The description is not shown on the terminal. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The error code of the Android app with the `status` of either **error** or **invalid**. - /// - /// The error code of the Android app with the `status` of either **error** or **invalid**. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - [Obsolete("Deprecated since Management API v3. Use `errors` instead.")] - public string ErrorCode { get; set; } - - /// - /// The list of errors of the Android app. - /// - /// The list of errors of the Android app. - [DataMember(Name = "errors", EmitDefaultValue = false)] - public List Errors { get; set; } - - /// - /// The unique identifier of the app. - /// - /// The unique identifier of the app. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The app name that is shown on the terminal. - /// - /// The app name that is shown on the terminal. - [DataMember(Name = "label", EmitDefaultValue = false)] - public string Label { get; set; } - - /// - /// The package name that uniquely identifies the Android app. - /// - /// The package name that uniquely identifies the Android app. - [DataMember(Name = "packageName", EmitDefaultValue = false)] - public string PackageName { get; set; } - - /// - /// The version number of the app. - /// - /// The version number of the app. - [DataMember(Name = "versionCode", EmitDefaultValue = false)] - public int? VersionCode { get; set; } - - /// - /// The app version number that is shown on the terminal. - /// - /// The app version number that is shown on the terminal. - [DataMember(Name = "versionName", EmitDefaultValue = false)] - public string VersionName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AndroidApp {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Errors: ").Append(Errors).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Label: ").Append(Label).Append("\n"); - sb.Append(" PackageName: ").Append(PackageName).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" VersionCode: ").Append(VersionCode).Append("\n"); - sb.Append(" VersionName: ").Append(VersionName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AndroidApp); - } - - /// - /// Returns true if AndroidApp instances are equal - /// - /// Instance of AndroidApp to be compared - /// Boolean - public bool Equals(AndroidApp input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.Errors == input.Errors || - this.Errors != null && - input.Errors != null && - this.Errors.SequenceEqual(input.Errors) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Label == input.Label || - (this.Label != null && - this.Label.Equals(input.Label)) - ) && - ( - this.PackageName == input.PackageName || - (this.PackageName != null && - this.PackageName.Equals(input.PackageName)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.VersionCode == input.VersionCode || - this.VersionCode.Equals(input.VersionCode) - ) && - ( - this.VersionName == input.VersionName || - (this.VersionName != null && - this.VersionName.Equals(input.VersionName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.Errors != null) - { - hashCode = (hashCode * 59) + this.Errors.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Label != null) - { - hashCode = (hashCode * 59) + this.Label.GetHashCode(); - } - if (this.PackageName != null) - { - hashCode = (hashCode * 59) + this.PackageName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.VersionCode.GetHashCode(); - if (this.VersionName != null) - { - hashCode = (hashCode * 59) + this.VersionName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AndroidAppError.cs b/Adyen/Model/Management/AndroidAppError.cs deleted file mode 100644 index d9179e786..000000000 --- a/Adyen/Model/Management/AndroidAppError.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AndroidAppError - /// - [DataContract(Name = "AndroidAppError")] - public partial class AndroidAppError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code of the Android app with the `status` of either **error** or **invalid**.. - /// The list of payment terminal models to which the returned `errorCode` applies.. - public AndroidAppError(string errorCode = default(string), List terminalModels = default(List)) - { - this.ErrorCode = errorCode; - this.TerminalModels = terminalModels; - } - - /// - /// The error code of the Android app with the `status` of either **error** or **invalid**. - /// - /// The error code of the Android app with the `status` of either **error** or **invalid**. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The list of payment terminal models to which the returned `errorCode` applies. - /// - /// The list of payment terminal models to which the returned `errorCode` applies. - [DataMember(Name = "terminalModels", EmitDefaultValue = false)] - public List TerminalModels { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AndroidAppError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" TerminalModels: ").Append(TerminalModels).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AndroidAppError); - } - - /// - /// Returns true if AndroidAppError instances are equal - /// - /// Instance of AndroidAppError to be compared - /// Boolean - public bool Equals(AndroidAppError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.TerminalModels == input.TerminalModels || - this.TerminalModels != null && - input.TerminalModels != null && - this.TerminalModels.SequenceEqual(input.TerminalModels) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.TerminalModels != null) - { - hashCode = (hashCode * 59) + this.TerminalModels.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AndroidAppsResponse.cs b/Adyen/Model/Management/AndroidAppsResponse.cs deleted file mode 100644 index 4020a994a..000000000 --- a/Adyen/Model/Management/AndroidAppsResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AndroidAppsResponse - /// - [DataContract(Name = "AndroidAppsResponse")] - public partial class AndroidAppsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Apps uploaded for Android payment terminals.. - public AndroidAppsResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// Apps uploaded for Android payment terminals. - /// - /// Apps uploaded for Android payment terminals. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AndroidAppsResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AndroidAppsResponse); - } - - /// - /// Returns true if AndroidAppsResponse instances are equal - /// - /// Instance of AndroidAppsResponse to be compared - /// Boolean - public bool Equals(AndroidAppsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AndroidCertificate.cs b/Adyen/Model/Management/AndroidCertificate.cs deleted file mode 100644 index 8e827b91c..000000000 --- a/Adyen/Model/Management/AndroidCertificate.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AndroidCertificate - /// - [DataContract(Name = "AndroidCertificate")] - public partial class AndroidCertificate : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AndroidCertificate() { } - /// - /// Initializes a new instance of the class. - /// - /// The description that was provided when uploading the certificate.. - /// The file format of the certificate, as indicated by the file extension. For example, **.cert** or **.pem**.. - /// The unique identifier of the certificate. (required). - /// The file name of the certificate. For example, **mycert**.. - /// The date when the certificate stops to be valid.. - /// The date when the certificate starts to be valid.. - /// The status of the certificate.. - public AndroidCertificate(string description = default(string), string extension = default(string), string id = default(string), string name = default(string), DateTime notAfter = default(DateTime), DateTime notBefore = default(DateTime), string status = default(string)) - { - this.Id = id; - this.Description = description; - this.Extension = extension; - this.Name = name; - this.NotAfter = notAfter; - this.NotBefore = notBefore; - this.Status = status; - } - - /// - /// The description that was provided when uploading the certificate. - /// - /// The description that was provided when uploading the certificate. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The file format of the certificate, as indicated by the file extension. For example, **.cert** or **.pem**. - /// - /// The file format of the certificate, as indicated by the file extension. For example, **.cert** or **.pem**. - [DataMember(Name = "extension", EmitDefaultValue = false)] - public string Extension { get; set; } - - /// - /// The unique identifier of the certificate. - /// - /// The unique identifier of the certificate. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The file name of the certificate. For example, **mycert**. - /// - /// The file name of the certificate. For example, **mycert**. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The date when the certificate stops to be valid. - /// - /// The date when the certificate stops to be valid. - [DataMember(Name = "notAfter", EmitDefaultValue = false)] - public DateTime NotAfter { get; set; } - - /// - /// The date when the certificate starts to be valid. - /// - /// The date when the certificate starts to be valid. - [DataMember(Name = "notBefore", EmitDefaultValue = false)] - public DateTime NotBefore { get; set; } - - /// - /// The status of the certificate. - /// - /// The status of the certificate. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AndroidCertificate {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Extension: ").Append(Extension).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" NotAfter: ").Append(NotAfter).Append("\n"); - sb.Append(" NotBefore: ").Append(NotBefore).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AndroidCertificate); - } - - /// - /// Returns true if AndroidCertificate instances are equal - /// - /// Instance of AndroidCertificate to be compared - /// Boolean - public bool Equals(AndroidCertificate input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Extension == input.Extension || - (this.Extension != null && - this.Extension.Equals(input.Extension)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NotAfter == input.NotAfter || - (this.NotAfter != null && - this.NotAfter.Equals(input.NotAfter)) - ) && - ( - this.NotBefore == input.NotBefore || - (this.NotBefore != null && - this.NotBefore.Equals(input.NotBefore)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Extension != null) - { - hashCode = (hashCode * 59) + this.Extension.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.NotAfter != null) - { - hashCode = (hashCode * 59) + this.NotAfter.GetHashCode(); - } - if (this.NotBefore != null) - { - hashCode = (hashCode * 59) + this.NotBefore.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/AndroidCertificatesResponse.cs b/Adyen/Model/Management/AndroidCertificatesResponse.cs deleted file mode 100644 index 8230d3b93..000000000 --- a/Adyen/Model/Management/AndroidCertificatesResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// AndroidCertificatesResponse - /// - [DataContract(Name = "AndroidCertificatesResponse")] - public partial class AndroidCertificatesResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Uploaded Android certificates for Android payment terminals.. - public AndroidCertificatesResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// Uploaded Android certificates for Android payment terminals. - /// - /// Uploaded Android certificates for Android payment terminals. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AndroidCertificatesResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AndroidCertificatesResponse); - } - - /// - /// Returns true if AndroidCertificatesResponse instances are equal - /// - /// Instance of AndroidCertificatesResponse to be compared - /// Boolean - public bool Equals(AndroidCertificatesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ApiCredential.cs b/Adyen/Model/Management/ApiCredential.cs deleted file mode 100644 index fe18ea75f..000000000 --- a/Adyen/Model/Management/ApiCredential.cs +++ /dev/null @@ -1,290 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ApiCredential - /// - [DataContract(Name = "ApiCredential")] - public partial class ApiCredential : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ApiCredential() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. (required). - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. (required). - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.. - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. (required). - /// Description of the API credential.. - /// Unique identifier of the API credential. (required). - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. (required). - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. (required). - public ApiCredential(ApiCredentialLinks links = default(ApiCredentialLinks), bool? active = default(bool?), List allowedIpAddresses = default(List), List allowedOrigins = default(List), string clientKey = default(string), string description = default(string), string id = default(string), List roles = default(List), string username = default(string)) - { - this.Active = active; - this.AllowedIpAddresses = allowedIpAddresses; - this.ClientKey = clientKey; - this.Id = id; - this.Roles = roles; - this.Username = username; - this.Links = links; - this.AllowedOrigins = allowedOrigins; - this.Description = description; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public ApiCredentialLinks Links { get; set; } - - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - [DataMember(Name = "allowedIpAddresses", IsRequired = false, EmitDefaultValue = false)] - public List AllowedIpAddresses { get; set; } - - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - [DataMember(Name = "clientKey", IsRequired = false, EmitDefaultValue = false)] - public string ClientKey { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Unique identifier of the API credential. - /// - /// Unique identifier of the API credential. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApiCredential {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AllowedIpAddresses: ").Append(AllowedIpAddresses).Append("\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" ClientKey: ").Append(ClientKey).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiCredential); - } - - /// - /// Returns true if ApiCredential instances are equal - /// - /// Instance of ApiCredential to be compared - /// Boolean - public bool Equals(ApiCredential input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AllowedIpAddresses == input.AllowedIpAddresses || - this.AllowedIpAddresses != null && - input.AllowedIpAddresses != null && - this.AllowedIpAddresses.SequenceEqual(input.AllowedIpAddresses) - ) && - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.ClientKey == input.ClientKey || - (this.ClientKey != null && - this.ClientKey.Equals(input.ClientKey)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AllowedIpAddresses != null) - { - hashCode = (hashCode * 59) + this.AllowedIpAddresses.GetHashCode(); - } - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.ClientKey != null) - { - hashCode = (hashCode * 59) + this.ClientKey.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 50) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 50.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ApiCredentialLinks.cs b/Adyen/Model/Management/ApiCredentialLinks.cs deleted file mode 100644 index 537300e90..000000000 --- a/Adyen/Model/Management/ApiCredentialLinks.cs +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ApiCredentialLinks - /// - [DataContract(Name = "ApiCredentialLinks")] - public partial class ApiCredentialLinks : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ApiCredentialLinks() { } - /// - /// Initializes a new instance of the class. - /// - /// allowedOrigins. - /// company. - /// generateApiKey. - /// generateClientKey. - /// merchant. - /// self (required). - public ApiCredentialLinks(LinksElement allowedOrigins = default(LinksElement), LinksElement company = default(LinksElement), LinksElement generateApiKey = default(LinksElement), LinksElement generateClientKey = default(LinksElement), LinksElement merchant = default(LinksElement), LinksElement self = default(LinksElement)) - { - this.Self = self; - this.AllowedOrigins = allowedOrigins; - this.Company = company; - this.GenerateApiKey = generateApiKey; - this.GenerateClientKey = generateClientKey; - this.Merchant = merchant; - } - - /// - /// Gets or Sets AllowedOrigins - /// - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public LinksElement AllowedOrigins { get; set; } - - /// - /// Gets or Sets Company - /// - [DataMember(Name = "company", EmitDefaultValue = false)] - public LinksElement Company { get; set; } - - /// - /// Gets or Sets GenerateApiKey - /// - [DataMember(Name = "generateApiKey", EmitDefaultValue = false)] - public LinksElement GenerateApiKey { get; set; } - - /// - /// Gets or Sets GenerateClientKey - /// - [DataMember(Name = "generateClientKey", EmitDefaultValue = false)] - public LinksElement GenerateClientKey { get; set; } - - /// - /// Gets or Sets Merchant - /// - [DataMember(Name = "merchant", EmitDefaultValue = false)] - public LinksElement Merchant { get; set; } - - /// - /// Gets or Sets Self - /// - [DataMember(Name = "self", IsRequired = false, EmitDefaultValue = false)] - public LinksElement Self { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApiCredentialLinks {\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" GenerateApiKey: ").Append(GenerateApiKey).Append("\n"); - sb.Append(" GenerateClientKey: ").Append(GenerateClientKey).Append("\n"); - sb.Append(" Merchant: ").Append(Merchant).Append("\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiCredentialLinks); - } - - /// - /// Returns true if ApiCredentialLinks instances are equal - /// - /// Instance of ApiCredentialLinks to be compared - /// Boolean - public bool Equals(ApiCredentialLinks input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedOrigins == input.AllowedOrigins || - (this.AllowedOrigins != null && - this.AllowedOrigins.Equals(input.AllowedOrigins)) - ) && - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.GenerateApiKey == input.GenerateApiKey || - (this.GenerateApiKey != null && - this.GenerateApiKey.Equals(input.GenerateApiKey)) - ) && - ( - this.GenerateClientKey == input.GenerateClientKey || - (this.GenerateClientKey != null && - this.GenerateClientKey.Equals(input.GenerateClientKey)) - ) && - ( - this.Merchant == input.Merchant || - (this.Merchant != null && - this.Merchant.Equals(input.Merchant)) - ) && - ( - this.Self == input.Self || - (this.Self != null && - this.Self.Equals(input.Self)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.GenerateApiKey != null) - { - hashCode = (hashCode * 59) + this.GenerateApiKey.GetHashCode(); - } - if (this.GenerateClientKey != null) - { - hashCode = (hashCode * 59) + this.GenerateClientKey.GetHashCode(); - } - if (this.Merchant != null) - { - hashCode = (hashCode * 59) + this.Merchant.GetHashCode(); - } - if (this.Self != null) - { - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ApplePayInfo.cs b/Adyen/Model/Management/ApplePayInfo.cs deleted file mode 100644 index d33fdd75b..000000000 --- a/Adyen/Model/Management/ApplePayInfo.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ApplePayInfo - /// - [DataContract(Name = "ApplePayInfo")] - public partial class ApplePayInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ApplePayInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live). (required). - public ApplePayInfo(List domains = default(List)) - { - this.Domains = domains; - } - - /// - /// The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live). - /// - /// The list of merchant domains. Maximum: 99 domains per request. For more information, see [Apple Pay documentation](https://docs.adyen.com/payment-methods/apple-pay/web-drop-in?tab=adyen-certificate-live_1#going-live). - [DataMember(Name = "domains", IsRequired = false, EmitDefaultValue = false)] - public List Domains { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApplePayInfo {\n"); - sb.Append(" Domains: ").Append(Domains).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApplePayInfo); - } - - /// - /// Returns true if ApplePayInfo instances are equal - /// - /// Instance of ApplePayInfo to be compared - /// Boolean - public bool Equals(ApplePayInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Domains == input.Domains || - this.Domains != null && - input.Domains != null && - this.Domains.SequenceEqual(input.Domains) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Domains != null) - { - hashCode = (hashCode * 59) + this.Domains.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/BcmcInfo.cs b/Adyen/Model/Management/BcmcInfo.cs deleted file mode 100644 index d2cf58e52..000000000 --- a/Adyen/Model/Management/BcmcInfo.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// BcmcInfo - /// - [DataContract(Name = "BcmcInfo")] - public partial class BcmcInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates if [Bancontact mobile](https://docs.adyen.com/payment-methods/bancontact/bancontact-mobile) is enabled.. - public BcmcInfo(bool? enableBcmcMobile = default(bool?)) - { - this.EnableBcmcMobile = enableBcmcMobile; - } - - /// - /// Indicates if [Bancontact mobile](https://docs.adyen.com/payment-methods/bancontact/bancontact-mobile) is enabled. - /// - /// Indicates if [Bancontact mobile](https://docs.adyen.com/payment-methods/bancontact/bancontact-mobile) is enabled. - [DataMember(Name = "enableBcmcMobile", EmitDefaultValue = false)] - public bool? EnableBcmcMobile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BcmcInfo {\n"); - sb.Append(" EnableBcmcMobile: ").Append(EnableBcmcMobile).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BcmcInfo); - } - - /// - /// Returns true if BcmcInfo instances are equal - /// - /// Instance of BcmcInfo to be compared - /// Boolean - public bool Equals(BcmcInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.EnableBcmcMobile == input.EnableBcmcMobile || - this.EnableBcmcMobile.Equals(input.EnableBcmcMobile) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EnableBcmcMobile.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/BillingEntitiesResponse.cs b/Adyen/Model/Management/BillingEntitiesResponse.cs deleted file mode 100644 index ba155be65..000000000 --- a/Adyen/Model/Management/BillingEntitiesResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// BillingEntitiesResponse - /// - [DataContract(Name = "BillingEntitiesResponse")] - public partial class BillingEntitiesResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of legal entities that can be used for the billing of orders.. - public BillingEntitiesResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// List of legal entities that can be used for the billing of orders. - /// - /// List of legal entities that can be used for the billing of orders. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BillingEntitiesResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BillingEntitiesResponse); - } - - /// - /// Returns true if BillingEntitiesResponse instances are equal - /// - /// Instance of BillingEntitiesResponse to be compared - /// Boolean - public bool Equals(BillingEntitiesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/BillingEntity.cs b/Adyen/Model/Management/BillingEntity.cs deleted file mode 100644 index 2b9354c36..000000000 --- a/Adyen/Model/Management/BillingEntity.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// BillingEntity - /// - [DataContract(Name = "BillingEntity")] - public partial class BillingEntity : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The email address of the billing entity.. - /// The unique identifier of the billing entity, for use as `billingEntityId` when creating an order.. - /// The unique name of the billing entity.. - /// The tax number of the billing entity.. - public BillingEntity(Address address = default(Address), string email = default(string), string id = default(string), string name = default(string), string taxId = default(string)) - { - this.Address = address; - this.Email = email; - this.Id = id; - this.Name = name; - this.TaxId = taxId; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public Address Address { get; set; } - - /// - /// The email address of the billing entity. - /// - /// The email address of the billing entity. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The unique identifier of the billing entity, for use as `billingEntityId` when creating an order. - /// - /// The unique identifier of the billing entity, for use as `billingEntityId` when creating an order. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique name of the billing entity. - /// - /// The unique name of the billing entity. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The tax number of the billing entity. - /// - /// The tax number of the billing entity. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BillingEntity {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BillingEntity); - } - - /// - /// Returns true if BillingEntity instances are equal - /// - /// Instance of BillingEntity to be compared - /// Boolean - public bool Equals(BillingEntity input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CardholderReceipt.cs b/Adyen/Model/Management/CardholderReceipt.cs deleted file mode 100644 index 974548ae2..000000000 --- a/Adyen/Model/Management/CardholderReceipt.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CardholderReceipt - /// - [DataContract(Name = "CardholderReceipt")] - public partial class CardholderReceipt : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A custom header to show on the shopper receipt for an authorised transaction. Allows one or two comma-separated header lines, and blank lines. For example, `header,header,filler`. - public CardholderReceipt(string headerForAuthorizedReceipt = default(string)) - { - this.HeaderForAuthorizedReceipt = headerForAuthorizedReceipt; - } - - /// - /// A custom header to show on the shopper receipt for an authorised transaction. Allows one or two comma-separated header lines, and blank lines. For example, `header,header,filler` - /// - /// A custom header to show on the shopper receipt for an authorised transaction. Allows one or two comma-separated header lines, and blank lines. For example, `header,header,filler` - [DataMember(Name = "headerForAuthorizedReceipt", EmitDefaultValue = false)] - public string HeaderForAuthorizedReceipt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardholderReceipt {\n"); - sb.Append(" HeaderForAuthorizedReceipt: ").Append(HeaderForAuthorizedReceipt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardholderReceipt); - } - - /// - /// Returns true if CardholderReceipt instances are equal - /// - /// Instance of CardholderReceipt to be compared - /// Boolean - public bool Equals(CardholderReceipt input) - { - if (input == null) - { - return false; - } - return - ( - this.HeaderForAuthorizedReceipt == input.HeaderForAuthorizedReceipt || - (this.HeaderForAuthorizedReceipt != null && - this.HeaderForAuthorizedReceipt.Equals(input.HeaderForAuthorizedReceipt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.HeaderForAuthorizedReceipt != null) - { - hashCode = (hashCode * 59) + this.HeaderForAuthorizedReceipt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CartesBancairesInfo.cs b/Adyen/Model/Management/CartesBancairesInfo.cs deleted file mode 100644 index 7c365d886..000000000 --- a/Adyen/Model/Management/CartesBancairesInfo.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CartesBancairesInfo - /// - [DataContract(Name = "CartesBancairesInfo")] - public partial class CartesBancairesInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CartesBancairesInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Cartes Bancaires SIRET. Format: 14 digits. (required). - /// transactionDescription. - public CartesBancairesInfo(string siret = default(string), TransactionDescriptionInfo transactionDescription = default(TransactionDescriptionInfo)) - { - this.Siret = siret; - this.TransactionDescription = transactionDescription; - } - - /// - /// Cartes Bancaires SIRET. Format: 14 digits. - /// - /// Cartes Bancaires SIRET. Format: 14 digits. - [DataMember(Name = "siret", IsRequired = false, EmitDefaultValue = false)] - public string Siret { get; set; } - - /// - /// Gets or Sets TransactionDescription - /// - [DataMember(Name = "transactionDescription", EmitDefaultValue = false)] - public TransactionDescriptionInfo TransactionDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CartesBancairesInfo {\n"); - sb.Append(" Siret: ").Append(Siret).Append("\n"); - sb.Append(" TransactionDescription: ").Append(TransactionDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CartesBancairesInfo); - } - - /// - /// Returns true if CartesBancairesInfo instances are equal - /// - /// Instance of CartesBancairesInfo to be compared - /// Boolean - public bool Equals(CartesBancairesInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Siret == input.Siret || - (this.Siret != null && - this.Siret.Equals(input.Siret)) - ) && - ( - this.TransactionDescription == input.TransactionDescription || - (this.TransactionDescription != null && - this.TransactionDescription.Equals(input.TransactionDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Siret != null) - { - hashCode = (hashCode * 59) + this.Siret.GetHashCode(); - } - if (this.TransactionDescription != null) - { - hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ClearpayInfo.cs b/Adyen/Model/Management/ClearpayInfo.cs deleted file mode 100644 index dc727d221..000000000 --- a/Adyen/Model/Management/ClearpayInfo.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ClearpayInfo - /// - [DataContract(Name = "ClearpayInfo")] - public partial class ClearpayInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ClearpayInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Support Url (required). - public ClearpayInfo(string supportUrl = default(string)) - { - this.SupportUrl = supportUrl; - } - - /// - /// Support Url - /// - /// Support Url - [DataMember(Name = "supportUrl", IsRequired = false, EmitDefaultValue = false)] - public string SupportUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ClearpayInfo {\n"); - sb.Append(" SupportUrl: ").Append(SupportUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ClearpayInfo); - } - - /// - /// Returns true if ClearpayInfo instances are equal - /// - /// Instance of ClearpayInfo to be compared - /// Boolean - public bool Equals(ClearpayInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.SupportUrl == input.SupportUrl || - (this.SupportUrl != null && - this.SupportUrl.Equals(input.SupportUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SupportUrl != null) - { - hashCode = (hashCode * 59) + this.SupportUrl.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Commission.cs b/Adyen/Model/Management/Commission.cs deleted file mode 100644 index 9eb1864ef..000000000 --- a/Adyen/Model/Management/Commission.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Commission - /// - [DataContract(Name = "Commission")] - public partial class Commission : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A fixed commission fee, in minor units.. - /// A variable commission fee, in basis points.. - public Commission(long? fixedAmount = default(long?), long? variablePercentage = default(long?)) - { - this.FixedAmount = fixedAmount; - this.VariablePercentage = variablePercentage; - } - - /// - /// A fixed commission fee, in minor units. - /// - /// A fixed commission fee, in minor units. - [DataMember(Name = "fixedAmount", EmitDefaultValue = false)] - public long? FixedAmount { get; set; } - - /// - /// A variable commission fee, in basis points. - /// - /// A variable commission fee, in basis points. - [DataMember(Name = "variablePercentage", EmitDefaultValue = false)] - public long? VariablePercentage { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Commission {\n"); - sb.Append(" FixedAmount: ").Append(FixedAmount).Append("\n"); - sb.Append(" VariablePercentage: ").Append(VariablePercentage).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Commission); - } - - /// - /// Returns true if Commission instances are equal - /// - /// Instance of Commission to be compared - /// Boolean - public bool Equals(Commission input) - { - if (input == null) - { - return false; - } - return - ( - this.FixedAmount == input.FixedAmount || - this.FixedAmount.Equals(input.FixedAmount) - ) && - ( - this.VariablePercentage == input.VariablePercentage || - this.VariablePercentage.Equals(input.VariablePercentage) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.FixedAmount.GetHashCode(); - hashCode = (hashCode * 59) + this.VariablePercentage.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Company.cs b/Adyen/Model/Management/Company.cs deleted file mode 100644 index 17c519bc4..000000000 --- a/Adyen/Model/Management/Company.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Company - /// - [DataContract(Name = "Company")] - public partial class Company : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// links. - /// List of available data centers. Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers.. - /// Your description for the company account, maximum 300 characters. - /// The unique identifier of the company account.. - /// The legal or trading name of the company.. - /// Your reference to the account. - /// The status of the company account. Possible values: * **Active**: Users can log in. Processing and payout capabilities depend on the status of the merchant account. * **Inactive**: Users can log in. Payment processing and payouts are disabled. * **Closed**: The company account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled.. - public Company(CompanyLinks links = default(CompanyLinks), List dataCenters = default(List), string description = default(string), string id = default(string), string name = default(string), string reference = default(string), string status = default(string)) - { - this.Links = links; - this.DataCenters = dataCenters; - this.Description = description; - this.Id = id; - this.Name = name; - this.Reference = reference; - this.Status = status; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public CompanyLinks Links { get; set; } - - /// - /// List of available data centers. Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers. - /// - /// List of available data centers. Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers. - [DataMember(Name = "dataCenters", EmitDefaultValue = false)] - public List DataCenters { get; set; } - - /// - /// Your description for the company account, maximum 300 characters - /// - /// Your description for the company account, maximum 300 characters - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the company account. - /// - /// The unique identifier of the company account. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The legal or trading name of the company. - /// - /// The legal or trading name of the company. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Your reference to the account - /// - /// Your reference to the account - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The status of the company account. Possible values: * **Active**: Users can log in. Processing and payout capabilities depend on the status of the merchant account. * **Inactive**: Users can log in. Payment processing and payouts are disabled. * **Closed**: The company account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. - /// - /// The status of the company account. Possible values: * **Active**: Users can log in. Processing and payout capabilities depend on the status of the merchant account. * **Inactive**: Users can log in. Payment processing and payouts are disabled. * **Closed**: The company account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Company {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" DataCenters: ").Append(DataCenters).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Company); - } - - /// - /// Returns true if Company instances are equal - /// - /// Instance of Company to be compared - /// Boolean - public bool Equals(Company input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.DataCenters == input.DataCenters || - this.DataCenters != null && - input.DataCenters != null && - this.DataCenters.SequenceEqual(input.DataCenters) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.DataCenters != null) - { - hashCode = (hashCode * 59) + this.DataCenters.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CompanyApiCredential.cs b/Adyen/Model/Management/CompanyApiCredential.cs deleted file mode 100644 index a4481deb2..000000000 --- a/Adyen/Model/Management/CompanyApiCredential.cs +++ /dev/null @@ -1,310 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CompanyApiCredential - /// - [DataContract(Name = "CompanyApiCredential")] - public partial class CompanyApiCredential : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CompanyApiCredential() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. (required). - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. (required). - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.. - /// List of merchant accounts that the API credential has explicit access to. If the credential has access to a company, this implies access to all merchant accounts and no merchants for that company will be included.. - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. (required). - /// Description of the API credential.. - /// Unique identifier of the API credential. (required). - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. (required). - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. (required). - public CompanyApiCredential(ApiCredentialLinks links = default(ApiCredentialLinks), bool? active = default(bool?), List allowedIpAddresses = default(List), List allowedOrigins = default(List), List associatedMerchantAccounts = default(List), string clientKey = default(string), string description = default(string), string id = default(string), List roles = default(List), string username = default(string)) - { - this.Active = active; - this.AllowedIpAddresses = allowedIpAddresses; - this.ClientKey = clientKey; - this.Id = id; - this.Roles = roles; - this.Username = username; - this.Links = links; - this.AllowedOrigins = allowedOrigins; - this.AssociatedMerchantAccounts = associatedMerchantAccounts; - this.Description = description; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public ApiCredentialLinks Links { get; set; } - - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - [DataMember(Name = "allowedIpAddresses", IsRequired = false, EmitDefaultValue = false)] - public List AllowedIpAddresses { get; set; } - - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// List of merchant accounts that the API credential has explicit access to. If the credential has access to a company, this implies access to all merchant accounts and no merchants for that company will be included. - /// - /// List of merchant accounts that the API credential has explicit access to. If the credential has access to a company, this implies access to all merchant accounts and no merchants for that company will be included. - [DataMember(Name = "associatedMerchantAccounts", EmitDefaultValue = false)] - public List AssociatedMerchantAccounts { get; set; } - - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - [DataMember(Name = "clientKey", IsRequired = false, EmitDefaultValue = false)] - public string ClientKey { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Unique identifier of the API credential. - /// - /// Unique identifier of the API credential. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CompanyApiCredential {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AllowedIpAddresses: ").Append(AllowedIpAddresses).Append("\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" AssociatedMerchantAccounts: ").Append(AssociatedMerchantAccounts).Append("\n"); - sb.Append(" ClientKey: ").Append(ClientKey).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompanyApiCredential); - } - - /// - /// Returns true if CompanyApiCredential instances are equal - /// - /// Instance of CompanyApiCredential to be compared - /// Boolean - public bool Equals(CompanyApiCredential input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AllowedIpAddresses == input.AllowedIpAddresses || - this.AllowedIpAddresses != null && - input.AllowedIpAddresses != null && - this.AllowedIpAddresses.SequenceEqual(input.AllowedIpAddresses) - ) && - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.AssociatedMerchantAccounts == input.AssociatedMerchantAccounts || - this.AssociatedMerchantAccounts != null && - input.AssociatedMerchantAccounts != null && - this.AssociatedMerchantAccounts.SequenceEqual(input.AssociatedMerchantAccounts) - ) && - ( - this.ClientKey == input.ClientKey || - (this.ClientKey != null && - this.ClientKey.Equals(input.ClientKey)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AllowedIpAddresses != null) - { - hashCode = (hashCode * 59) + this.AllowedIpAddresses.GetHashCode(); - } - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.AssociatedMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.AssociatedMerchantAccounts.GetHashCode(); - } - if (this.ClientKey != null) - { - hashCode = (hashCode * 59) + this.ClientKey.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 50) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 50.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CompanyLinks.cs b/Adyen/Model/Management/CompanyLinks.cs deleted file mode 100644 index d94ecdcbf..000000000 --- a/Adyen/Model/Management/CompanyLinks.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CompanyLinks - /// - [DataContract(Name = "CompanyLinks")] - public partial class CompanyLinks : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CompanyLinks() { } - /// - /// Initializes a new instance of the class. - /// - /// apiCredentials. - /// self (required). - /// users. - /// webhooks. - public CompanyLinks(LinksElement apiCredentials = default(LinksElement), LinksElement self = default(LinksElement), LinksElement users = default(LinksElement), LinksElement webhooks = default(LinksElement)) - { - this.Self = self; - this.ApiCredentials = apiCredentials; - this.Users = users; - this.Webhooks = webhooks; - } - - /// - /// Gets or Sets ApiCredentials - /// - [DataMember(Name = "apiCredentials", EmitDefaultValue = false)] - public LinksElement ApiCredentials { get; set; } - - /// - /// Gets or Sets Self - /// - [DataMember(Name = "self", IsRequired = false, EmitDefaultValue = false)] - public LinksElement Self { get; set; } - - /// - /// Gets or Sets Users - /// - [DataMember(Name = "users", EmitDefaultValue = false)] - public LinksElement Users { get; set; } - - /// - /// Gets or Sets Webhooks - /// - [DataMember(Name = "webhooks", EmitDefaultValue = false)] - public LinksElement Webhooks { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CompanyLinks {\n"); - sb.Append(" ApiCredentials: ").Append(ApiCredentials).Append("\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append(" Users: ").Append(Users).Append("\n"); - sb.Append(" Webhooks: ").Append(Webhooks).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompanyLinks); - } - - /// - /// Returns true if CompanyLinks instances are equal - /// - /// Instance of CompanyLinks to be compared - /// Boolean - public bool Equals(CompanyLinks input) - { - if (input == null) - { - return false; - } - return - ( - this.ApiCredentials == input.ApiCredentials || - (this.ApiCredentials != null && - this.ApiCredentials.Equals(input.ApiCredentials)) - ) && - ( - this.Self == input.Self || - (this.Self != null && - this.Self.Equals(input.Self)) - ) && - ( - this.Users == input.Users || - (this.Users != null && - this.Users.Equals(input.Users)) - ) && - ( - this.Webhooks == input.Webhooks || - (this.Webhooks != null && - this.Webhooks.Equals(input.Webhooks)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApiCredentials != null) - { - hashCode = (hashCode * 59) + this.ApiCredentials.GetHashCode(); - } - if (this.Self != null) - { - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - } - if (this.Users != null) - { - hashCode = (hashCode * 59) + this.Users.GetHashCode(); - } - if (this.Webhooks != null) - { - hashCode = (hashCode * 59) + this.Webhooks.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CompanyUser.cs b/Adyen/Model/Management/CompanyUser.cs deleted file mode 100644 index afcf46155..000000000 --- a/Adyen/Model/Management/CompanyUser.cs +++ /dev/null @@ -1,334 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CompanyUser - /// - [DataContract(Name = "CompanyUser")] - public partial class CompanyUser : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CompanyUser() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.. - /// Indicates whether this user is active.. - /// Set of apps available to this user. - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user.. - /// The email address of the user. (required). - /// The unique identifier of the user. (required). - /// name. - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. (required). - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. (required). - /// The username for this user. (required). - public CompanyUser(Links links = default(Links), List accountGroups = default(List), bool? active = default(bool?), List apps = default(List), List associatedMerchantAccounts = default(List), string email = default(string), string id = default(string), Name name = default(Name), List roles = default(List), string timeZoneCode = default(string), string username = default(string)) - { - this.Email = email; - this.Id = id; - this.Roles = roles; - this.TimeZoneCode = timeZoneCode; - this.Username = username; - this.Links = links; - this.AccountGroups = accountGroups; - this.Active = active; - this.Apps = apps; - this.AssociatedMerchantAccounts = associatedMerchantAccounts; - this.Name = name; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - [DataMember(Name = "accountGroups", EmitDefaultValue = false)] - public List AccountGroups { get; set; } - - /// - /// Indicates whether this user is active. - /// - /// Indicates whether this user is active. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Set of apps available to this user - /// - /// Set of apps available to this user - [DataMember(Name = "apps", EmitDefaultValue = false)] - public List Apps { get; set; } - - /// - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. - /// - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. - [DataMember(Name = "associatedMerchantAccounts", EmitDefaultValue = false)] - public List AssociatedMerchantAccounts { get; set; } - - /// - /// The email address of the user. - /// - /// The email address of the user. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The unique identifier of the user. - /// - /// The unique identifier of the user. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - [DataMember(Name = "timeZoneCode", IsRequired = false, EmitDefaultValue = false)] - public string TimeZoneCode { get; set; } - - /// - /// The username for this user. - /// - /// The username for this user. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CompanyUser {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" AccountGroups: ").Append(AccountGroups).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" Apps: ").Append(Apps).Append("\n"); - sb.Append(" AssociatedMerchantAccounts: ").Append(AssociatedMerchantAccounts).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" TimeZoneCode: ").Append(TimeZoneCode).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompanyUser); - } - - /// - /// Returns true if CompanyUser instances are equal - /// - /// Instance of CompanyUser to be compared - /// Boolean - public bool Equals(CompanyUser input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.AccountGroups == input.AccountGroups || - this.AccountGroups != null && - input.AccountGroups != null && - this.AccountGroups.SequenceEqual(input.AccountGroups) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.Apps == input.Apps || - this.Apps != null && - input.Apps != null && - this.Apps.SequenceEqual(input.Apps) - ) && - ( - this.AssociatedMerchantAccounts == input.AssociatedMerchantAccounts || - this.AssociatedMerchantAccounts != null && - input.AssociatedMerchantAccounts != null && - this.AssociatedMerchantAccounts.SequenceEqual(input.AssociatedMerchantAccounts) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.TimeZoneCode == input.TimeZoneCode || - (this.TimeZoneCode != null && - this.TimeZoneCode.Equals(input.TimeZoneCode)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.AccountGroups != null) - { - hashCode = (hashCode * 59) + this.AccountGroups.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.Apps != null) - { - hashCode = (hashCode * 59) + this.Apps.GetHashCode(); - } - if (this.AssociatedMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.AssociatedMerchantAccounts.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.TimeZoneCode != null) - { - hashCode = (hashCode * 59) + this.TimeZoneCode.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - // Username (string) minLength - if (this.Username != null && this.Username.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be greater than 1.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Connectivity.cs b/Adyen/Model/Management/Connectivity.cs deleted file mode 100644 index cdb128ca8..000000000 --- a/Adyen/Model/Management/Connectivity.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Connectivity - /// - [DataContract(Name = "Connectivity")] - public partial class Connectivity : IEquatable, IValidatableObject - { - /// - /// Indicates the status of the SIM card in the payment terminal. Can be updated and received only at terminal level, and only for models that support cellular connectivity. Possible values: * **ACTIVATED**: the SIM card is activated. Cellular connectivity may still need to be enabled on the terminal itself, in the **Network** settings. * **INVENTORY**: the SIM card is not activated. The terminal can't use cellular connectivity. - /// - /// Indicates the status of the SIM card in the payment terminal. Can be updated and received only at terminal level, and only for models that support cellular connectivity. Possible values: * **ACTIVATED**: the SIM card is activated. Cellular connectivity may still need to be enabled on the terminal itself, in the **Network** settings. * **INVENTORY**: the SIM card is not activated. The terminal can't use cellular connectivity. - [JsonConverter(typeof(StringEnumConverter))] - public enum SimcardStatusEnum - { - /// - /// Enum ACTIVATED for value: ACTIVATED - /// - [EnumMember(Value = "ACTIVATED")] - ACTIVATED = 1, - - /// - /// Enum INVENTORY for value: INVENTORY - /// - [EnumMember(Value = "INVENTORY")] - INVENTORY = 2 - - } - - - /// - /// Indicates the status of the SIM card in the payment terminal. Can be updated and received only at terminal level, and only for models that support cellular connectivity. Possible values: * **ACTIVATED**: the SIM card is activated. Cellular connectivity may still need to be enabled on the terminal itself, in the **Network** settings. * **INVENTORY**: the SIM card is not activated. The terminal can't use cellular connectivity. - /// - /// Indicates the status of the SIM card in the payment terminal. Can be updated and received only at terminal level, and only for models that support cellular connectivity. Possible values: * **ACTIVATED**: the SIM card is activated. Cellular connectivity may still need to be enabled on the terminal itself, in the **Network** settings. * **INVENTORY**: the SIM card is not activated. The terminal can't use cellular connectivity. - [DataMember(Name = "simcardStatus", EmitDefaultValue = false)] - public SimcardStatusEnum? SimcardStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicates the status of the SIM card in the payment terminal. Can be updated and received only at terminal level, and only for models that support cellular connectivity. Possible values: * **ACTIVATED**: the SIM card is activated. Cellular connectivity may still need to be enabled on the terminal itself, in the **Network** settings. * **INVENTORY**: the SIM card is not activated. The terminal can't use cellular connectivity.. - /// terminalIPAddressURL. - public Connectivity(SimcardStatusEnum? simcardStatus = default(SimcardStatusEnum?), EventUrl terminalIPAddressURL = default(EventUrl)) - { - this.SimcardStatus = simcardStatus; - this.TerminalIPAddressURL = terminalIPAddressURL; - } - - /// - /// Gets or Sets TerminalIPAddressURL - /// - [DataMember(Name = "terminalIPAddressURL", EmitDefaultValue = false)] - public EventUrl TerminalIPAddressURL { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Connectivity {\n"); - sb.Append(" SimcardStatus: ").Append(SimcardStatus).Append("\n"); - sb.Append(" TerminalIPAddressURL: ").Append(TerminalIPAddressURL).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Connectivity); - } - - /// - /// Returns true if Connectivity instances are equal - /// - /// Instance of Connectivity to be compared - /// Boolean - public bool Equals(Connectivity input) - { - if (input == null) - { - return false; - } - return - ( - this.SimcardStatus == input.SimcardStatus || - this.SimcardStatus.Equals(input.SimcardStatus) - ) && - ( - this.TerminalIPAddressURL == input.TerminalIPAddressURL || - (this.TerminalIPAddressURL != null && - this.TerminalIPAddressURL.Equals(input.TerminalIPAddressURL)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.SimcardStatus.GetHashCode(); - if (this.TerminalIPAddressURL != null) - { - hashCode = (hashCode * 59) + this.TerminalIPAddressURL.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Contact.cs b/Adyen/Model/Management/Contact.cs deleted file mode 100644 index f3c802da3..000000000 --- a/Adyen/Model/Management/Contact.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Contact - /// - [DataContract(Name = "Contact")] - public partial class Contact : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The individual's email address.. - /// The individual's first name.. - /// The infix in the individual's name, if any.. - /// The individual's last name.. - /// The individual's phone number, specified as 10-14 digits with an optional `+` prefix.. - public Contact(string email = default(string), string firstName = default(string), string infix = default(string), string lastName = default(string), string phoneNumber = default(string)) - { - this.Email = email; - this.FirstName = firstName; - this.Infix = infix; - this.LastName = lastName; - this.PhoneNumber = phoneNumber; - } - - /// - /// The individual's email address. - /// - /// The individual's email address. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The individual's first name. - /// - /// The individual's first name. - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The infix in the individual's name, if any. - /// - /// The infix in the individual's name, if any. - [DataMember(Name = "infix", EmitDefaultValue = false)] - public string Infix { get; set; } - - /// - /// The individual's last name. - /// - /// The individual's last name. - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// The individual's phone number, specified as 10-14 digits with an optional `+` prefix. - /// - /// The individual's phone number, specified as 10-14 digits with an optional `+` prefix. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Contact {\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" Infix: ").Append(Infix).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Contact); - } - - /// - /// Returns true if Contact instances are equal - /// - /// Instance of Contact to be compared - /// Boolean - public bool Equals(Contact input) - { - if (input == null) - { - return false; - } - return - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.Infix == input.Infix || - (this.Infix != null && - this.Infix.Equals(input.Infix)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.Infix != null) - { - hashCode = (hashCode * 59) + this.Infix.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateAllowedOriginRequest.cs b/Adyen/Model/Management/CreateAllowedOriginRequest.cs deleted file mode 100644 index f16d122ae..000000000 --- a/Adyen/Model/Management/CreateAllowedOriginRequest.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateAllowedOriginRequest - /// - [DataContract(Name = "CreateAllowedOriginRequest")] - public partial class CreateAllowedOriginRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateAllowedOriginRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Domain of the allowed origin. (required). - /// Unique identifier of the allowed origin.. - public CreateAllowedOriginRequest(Links links = default(Links), string domain = default(string), string id = default(string)) - { - this.Domain = domain; - this.Links = links; - this.Id = id; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// Domain of the allowed origin. - /// - /// Domain of the allowed origin. - [DataMember(Name = "domain", IsRequired = false, EmitDefaultValue = false)] - public string Domain { get; set; } - - /// - /// Unique identifier of the allowed origin. - /// - /// Unique identifier of the allowed origin. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateAllowedOriginRequest {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Domain: ").Append(Domain).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateAllowedOriginRequest); - } - - /// - /// Returns true if CreateAllowedOriginRequest instances are equal - /// - /// Instance of CreateAllowedOriginRequest to be compared - /// Boolean - public bool Equals(CreateAllowedOriginRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Domain == input.Domain || - (this.Domain != null && - this.Domain.Equals(input.Domain)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Domain != null) - { - hashCode = (hashCode * 59) + this.Domain.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateApiCredentialResponse.cs b/Adyen/Model/Management/CreateApiCredentialResponse.cs deleted file mode 100644 index 70cd57535..000000000 --- a/Adyen/Model/Management/CreateApiCredentialResponse.cs +++ /dev/null @@ -1,328 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateApiCredentialResponse - /// - [DataContract(Name = "CreateApiCredentialResponse")] - public partial class CreateApiCredentialResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateApiCredentialResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. (required). - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. (required). - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.. - /// The API key for the API credential that was created. (required). - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. (required). - /// Description of the API credential.. - /// Unique identifier of the API credential. (required). - /// The password for the API credential that was created. (required). - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. (required). - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. (required). - public CreateApiCredentialResponse(ApiCredentialLinks links = default(ApiCredentialLinks), bool? active = default(bool?), List allowedIpAddresses = default(List), List allowedOrigins = default(List), string apiKey = default(string), string clientKey = default(string), string description = default(string), string id = default(string), string password = default(string), List roles = default(List), string username = default(string)) - { - this.Active = active; - this.AllowedIpAddresses = allowedIpAddresses; - this.ApiKey = apiKey; - this.ClientKey = clientKey; - this.Id = id; - this.Password = password; - this.Roles = roles; - this.Username = username; - this.Links = links; - this.AllowedOrigins = allowedOrigins; - this.Description = description; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public ApiCredentialLinks Links { get; set; } - - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - [DataMember(Name = "allowedIpAddresses", IsRequired = false, EmitDefaultValue = false)] - public List AllowedIpAddresses { get; set; } - - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// The API key for the API credential that was created. - /// - /// The API key for the API credential that was created. - [DataMember(Name = "apiKey", IsRequired = false, EmitDefaultValue = false)] - public string ApiKey { get; set; } - - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - [DataMember(Name = "clientKey", IsRequired = false, EmitDefaultValue = false)] - public string ClientKey { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Unique identifier of the API credential. - /// - /// Unique identifier of the API credential. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The password for the API credential that was created. - /// - /// The password for the API credential that was created. - [DataMember(Name = "password", IsRequired = false, EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateApiCredentialResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AllowedIpAddresses: ").Append(AllowedIpAddresses).Append("\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); - sb.Append(" ClientKey: ").Append(ClientKey).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateApiCredentialResponse); - } - - /// - /// Returns true if CreateApiCredentialResponse instances are equal - /// - /// Instance of CreateApiCredentialResponse to be compared - /// Boolean - public bool Equals(CreateApiCredentialResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AllowedIpAddresses == input.AllowedIpAddresses || - this.AllowedIpAddresses != null && - input.AllowedIpAddresses != null && - this.AllowedIpAddresses.SequenceEqual(input.AllowedIpAddresses) - ) && - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.ApiKey == input.ApiKey || - (this.ApiKey != null && - this.ApiKey.Equals(input.ApiKey)) - ) && - ( - this.ClientKey == input.ClientKey || - (this.ClientKey != null && - this.ClientKey.Equals(input.ClientKey)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AllowedIpAddresses != null) - { - hashCode = (hashCode * 59) + this.AllowedIpAddresses.GetHashCode(); - } - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.ApiKey != null) - { - hashCode = (hashCode * 59) + this.ApiKey.GetHashCode(); - } - if (this.ClientKey != null) - { - hashCode = (hashCode * 59) + this.ClientKey.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 50) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 50.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateCompanyApiCredentialRequest.cs b/Adyen/Model/Management/CreateCompanyApiCredentialRequest.cs deleted file mode 100644 index 586fec843..000000000 --- a/Adyen/Model/Management/CreateCompanyApiCredentialRequest.cs +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateCompanyApiCredentialRequest - /// - [DataContract(Name = "CreateCompanyApiCredentialRequest")] - public partial class CreateCompanyApiCredentialRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the new API credential.. - /// List of merchant accounts that the API credential has access to.. - /// Description of the API credential.. - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials.. - public CreateCompanyApiCredentialRequest(List allowedOrigins = default(List), List associatedMerchantAccounts = default(List), string description = default(string), List roles = default(List)) - { - this.AllowedOrigins = allowedOrigins; - this.AssociatedMerchantAccounts = associatedMerchantAccounts; - this.Description = description; - this.Roles = roles; - } - - /// - /// List of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the new API credential. - /// - /// List of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the new API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// List of merchant accounts that the API credential has access to. - /// - /// List of merchant accounts that the API credential has access to. - [DataMember(Name = "associatedMerchantAccounts", EmitDefaultValue = false)] - public List AssociatedMerchantAccounts { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials. - [DataMember(Name = "roles", EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateCompanyApiCredentialRequest {\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" AssociatedMerchantAccounts: ").Append(AssociatedMerchantAccounts).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCompanyApiCredentialRequest); - } - - /// - /// Returns true if CreateCompanyApiCredentialRequest instances are equal - /// - /// Instance of CreateCompanyApiCredentialRequest to be compared - /// Boolean - public bool Equals(CreateCompanyApiCredentialRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.AssociatedMerchantAccounts == input.AssociatedMerchantAccounts || - this.AssociatedMerchantAccounts != null && - input.AssociatedMerchantAccounts != null && - this.AssociatedMerchantAccounts.SequenceEqual(input.AssociatedMerchantAccounts) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.AssociatedMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.AssociatedMerchantAccounts.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateCompanyApiCredentialResponse.cs b/Adyen/Model/Management/CreateCompanyApiCredentialResponse.cs deleted file mode 100644 index e225358e3..000000000 --- a/Adyen/Model/Management/CreateCompanyApiCredentialResponse.cs +++ /dev/null @@ -1,348 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateCompanyApiCredentialResponse - /// - [DataContract(Name = "CreateCompanyApiCredentialResponse")] - public partial class CreateCompanyApiCredentialResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateCompanyApiCredentialResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. (required). - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. (required). - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.. - /// The API key for the API credential that was created. (required). - /// List of merchant accounts that the API credential has access to. (required). - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. (required). - /// Description of the API credential.. - /// Unique identifier of the API credential. (required). - /// The password for the API credential that was created. (required). - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. (required). - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. (required). - public CreateCompanyApiCredentialResponse(ApiCredentialLinks links = default(ApiCredentialLinks), bool? active = default(bool?), List allowedIpAddresses = default(List), List allowedOrigins = default(List), string apiKey = default(string), List associatedMerchantAccounts = default(List), string clientKey = default(string), string description = default(string), string id = default(string), string password = default(string), List roles = default(List), string username = default(string)) - { - this.Active = active; - this.AllowedIpAddresses = allowedIpAddresses; - this.ApiKey = apiKey; - this.AssociatedMerchantAccounts = associatedMerchantAccounts; - this.ClientKey = clientKey; - this.Id = id; - this.Password = password; - this.Roles = roles; - this.Username = username; - this.Links = links; - this.AllowedOrigins = allowedOrigins; - this.Description = description; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public ApiCredentialLinks Links { get; set; } - - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - [DataMember(Name = "allowedIpAddresses", IsRequired = false, EmitDefaultValue = false)] - public List AllowedIpAddresses { get; set; } - - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// The API key for the API credential that was created. - /// - /// The API key for the API credential that was created. - [DataMember(Name = "apiKey", IsRequired = false, EmitDefaultValue = false)] - public string ApiKey { get; set; } - - /// - /// List of merchant accounts that the API credential has access to. - /// - /// List of merchant accounts that the API credential has access to. - [DataMember(Name = "associatedMerchantAccounts", IsRequired = false, EmitDefaultValue = false)] - public List AssociatedMerchantAccounts { get; set; } - - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - [DataMember(Name = "clientKey", IsRequired = false, EmitDefaultValue = false)] - public string ClientKey { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Unique identifier of the API credential. - /// - /// Unique identifier of the API credential. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The password for the API credential that was created. - /// - /// The password for the API credential that was created. - [DataMember(Name = "password", IsRequired = false, EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateCompanyApiCredentialResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AllowedIpAddresses: ").Append(AllowedIpAddresses).Append("\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); - sb.Append(" AssociatedMerchantAccounts: ").Append(AssociatedMerchantAccounts).Append("\n"); - sb.Append(" ClientKey: ").Append(ClientKey).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCompanyApiCredentialResponse); - } - - /// - /// Returns true if CreateCompanyApiCredentialResponse instances are equal - /// - /// Instance of CreateCompanyApiCredentialResponse to be compared - /// Boolean - public bool Equals(CreateCompanyApiCredentialResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AllowedIpAddresses == input.AllowedIpAddresses || - this.AllowedIpAddresses != null && - input.AllowedIpAddresses != null && - this.AllowedIpAddresses.SequenceEqual(input.AllowedIpAddresses) - ) && - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.ApiKey == input.ApiKey || - (this.ApiKey != null && - this.ApiKey.Equals(input.ApiKey)) - ) && - ( - this.AssociatedMerchantAccounts == input.AssociatedMerchantAccounts || - this.AssociatedMerchantAccounts != null && - input.AssociatedMerchantAccounts != null && - this.AssociatedMerchantAccounts.SequenceEqual(input.AssociatedMerchantAccounts) - ) && - ( - this.ClientKey == input.ClientKey || - (this.ClientKey != null && - this.ClientKey.Equals(input.ClientKey)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AllowedIpAddresses != null) - { - hashCode = (hashCode * 59) + this.AllowedIpAddresses.GetHashCode(); - } - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.ApiKey != null) - { - hashCode = (hashCode * 59) + this.ApiKey.GetHashCode(); - } - if (this.AssociatedMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.AssociatedMerchantAccounts.GetHashCode(); - } - if (this.ClientKey != null) - { - hashCode = (hashCode * 59) + this.ClientKey.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 50) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 50.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateCompanyUserRequest.cs b/Adyen/Model/Management/CreateCompanyUserRequest.cs deleted file mode 100644 index 1960a395d..000000000 --- a/Adyen/Model/Management/CreateCompanyUserRequest.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateCompanyUserRequest - /// - [DataContract(Name = "CreateCompanyUserRequest")] - public partial class CreateCompanyUserRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateCompanyUserRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.. - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user.. - /// The email address of the user. (required). - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** . - /// name (required). - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user.. - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.. - /// The user's email address that will be their username. Must be the same as the one in the `email` field. (required). - public CreateCompanyUserRequest(List accountGroups = default(List), List associatedMerchantAccounts = default(List), string email = default(string), string loginMethod = default(string), Name name = default(Name), List roles = default(List), string timeZoneCode = default(string), string username = default(string)) - { - this.Email = email; - this.Name = name; - this.Username = username; - this.AccountGroups = accountGroups; - this.AssociatedMerchantAccounts = associatedMerchantAccounts; - this.LoginMethod = loginMethod; - this.Roles = roles; - this.TimeZoneCode = timeZoneCode; - } - - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - [DataMember(Name = "accountGroups", EmitDefaultValue = false)] - public List AccountGroups { get; set; } - - /// - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. - /// - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. - [DataMember(Name = "associatedMerchantAccounts", EmitDefaultValue = false)] - public List AssociatedMerchantAccounts { get; set; } - - /// - /// The email address of the user. - /// - /// The email address of the user. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** - /// - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** - [DataMember(Name = "loginMethod", EmitDefaultValue = false)] - public string LoginMethod { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - [DataMember(Name = "roles", EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - [DataMember(Name = "timeZoneCode", EmitDefaultValue = false)] - public string TimeZoneCode { get; set; } - - /// - /// The user's email address that will be their username. Must be the same as the one in the `email` field. - /// - /// The user's email address that will be their username. Must be the same as the one in the `email` field. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateCompanyUserRequest {\n"); - sb.Append(" AccountGroups: ").Append(AccountGroups).Append("\n"); - sb.Append(" AssociatedMerchantAccounts: ").Append(AssociatedMerchantAccounts).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" LoginMethod: ").Append(LoginMethod).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" TimeZoneCode: ").Append(TimeZoneCode).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCompanyUserRequest); - } - - /// - /// Returns true if CreateCompanyUserRequest instances are equal - /// - /// Instance of CreateCompanyUserRequest to be compared - /// Boolean - public bool Equals(CreateCompanyUserRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountGroups == input.AccountGroups || - this.AccountGroups != null && - input.AccountGroups != null && - this.AccountGroups.SequenceEqual(input.AccountGroups) - ) && - ( - this.AssociatedMerchantAccounts == input.AssociatedMerchantAccounts || - this.AssociatedMerchantAccounts != null && - input.AssociatedMerchantAccounts != null && - this.AssociatedMerchantAccounts.SequenceEqual(input.AssociatedMerchantAccounts) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.LoginMethod == input.LoginMethod || - (this.LoginMethod != null && - this.LoginMethod.Equals(input.LoginMethod)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.TimeZoneCode == input.TimeZoneCode || - (this.TimeZoneCode != null && - this.TimeZoneCode.Equals(input.TimeZoneCode)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountGroups != null) - { - hashCode = (hashCode * 59) + this.AccountGroups.GetHashCode(); - } - if (this.AssociatedMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.AssociatedMerchantAccounts.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.LoginMethod != null) - { - hashCode = (hashCode * 59) + this.LoginMethod.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.TimeZoneCode != null) - { - hashCode = (hashCode * 59) + this.TimeZoneCode.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - // Username (string) minLength - if (this.Username != null && this.Username.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be greater than 1.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateCompanyUserResponse.cs b/Adyen/Model/Management/CreateCompanyUserResponse.cs deleted file mode 100644 index 64c93d8dc..000000000 --- a/Adyen/Model/Management/CreateCompanyUserResponse.cs +++ /dev/null @@ -1,334 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateCompanyUserResponse - /// - [DataContract(Name = "CreateCompanyUserResponse")] - public partial class CreateCompanyUserResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateCompanyUserResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.. - /// Indicates whether this user is active.. - /// Set of apps available to this user. - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user.. - /// The email address of the user. (required). - /// The unique identifier of the user. (required). - /// name. - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. (required). - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. (required). - /// The username for this user. (required). - public CreateCompanyUserResponse(Links links = default(Links), List accountGroups = default(List), bool? active = default(bool?), List apps = default(List), List associatedMerchantAccounts = default(List), string email = default(string), string id = default(string), Name name = default(Name), List roles = default(List), string timeZoneCode = default(string), string username = default(string)) - { - this.Email = email; - this.Id = id; - this.Roles = roles; - this.TimeZoneCode = timeZoneCode; - this.Username = username; - this.Links = links; - this.AccountGroups = accountGroups; - this.Active = active; - this.Apps = apps; - this.AssociatedMerchantAccounts = associatedMerchantAccounts; - this.Name = name; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - [DataMember(Name = "accountGroups", EmitDefaultValue = false)] - public List AccountGroups { get; set; } - - /// - /// Indicates whether this user is active. - /// - /// Indicates whether this user is active. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Set of apps available to this user - /// - /// Set of apps available to this user - [DataMember(Name = "apps", EmitDefaultValue = false)] - public List Apps { get; set; } - - /// - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. - /// - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) associated with this user. - [DataMember(Name = "associatedMerchantAccounts", EmitDefaultValue = false)] - public List AssociatedMerchantAccounts { get; set; } - - /// - /// The email address of the user. - /// - /// The email address of the user. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The unique identifier of the user. - /// - /// The unique identifier of the user. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - [DataMember(Name = "timeZoneCode", IsRequired = false, EmitDefaultValue = false)] - public string TimeZoneCode { get; set; } - - /// - /// The username for this user. - /// - /// The username for this user. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateCompanyUserResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" AccountGroups: ").Append(AccountGroups).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" Apps: ").Append(Apps).Append("\n"); - sb.Append(" AssociatedMerchantAccounts: ").Append(AssociatedMerchantAccounts).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" TimeZoneCode: ").Append(TimeZoneCode).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCompanyUserResponse); - } - - /// - /// Returns true if CreateCompanyUserResponse instances are equal - /// - /// Instance of CreateCompanyUserResponse to be compared - /// Boolean - public bool Equals(CreateCompanyUserResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.AccountGroups == input.AccountGroups || - this.AccountGroups != null && - input.AccountGroups != null && - this.AccountGroups.SequenceEqual(input.AccountGroups) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.Apps == input.Apps || - this.Apps != null && - input.Apps != null && - this.Apps.SequenceEqual(input.Apps) - ) && - ( - this.AssociatedMerchantAccounts == input.AssociatedMerchantAccounts || - this.AssociatedMerchantAccounts != null && - input.AssociatedMerchantAccounts != null && - this.AssociatedMerchantAccounts.SequenceEqual(input.AssociatedMerchantAccounts) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.TimeZoneCode == input.TimeZoneCode || - (this.TimeZoneCode != null && - this.TimeZoneCode.Equals(input.TimeZoneCode)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.AccountGroups != null) - { - hashCode = (hashCode * 59) + this.AccountGroups.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.Apps != null) - { - hashCode = (hashCode * 59) + this.Apps.GetHashCode(); - } - if (this.AssociatedMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.AssociatedMerchantAccounts.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.TimeZoneCode != null) - { - hashCode = (hashCode * 59) + this.TimeZoneCode.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - // Username (string) minLength - if (this.Username != null && this.Username.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be greater than 1.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateCompanyWebhookRequest.cs b/Adyen/Model/Management/CreateCompanyWebhookRequest.cs deleted file mode 100644 index 9c35e201c..000000000 --- a/Adyen/Model/Management/CreateCompanyWebhookRequest.cs +++ /dev/null @@ -1,491 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateCompanyWebhookRequest - /// - [DataContract(Name = "CreateCompanyWebhookRequest")] - public partial class CreateCompanyWebhookRequest : IEquatable, IValidatableObject - { - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [JsonConverter(typeof(StringEnumConverter))] - public enum CommunicationFormatEnum - { - /// - /// Enum Http for value: http - /// - [EnumMember(Value = "http")] - Http = 1, - - /// - /// Enum Json for value: json - /// - [EnumMember(Value = "json")] - Json = 2, - - /// - /// Enum Soap for value: soap - /// - [EnumMember(Value = "soap")] - Soap = 3 - - } - - - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [DataMember(Name = "communicationFormat", IsRequired = false, EmitDefaultValue = false)] - public CommunicationFormatEnum CommunicationFormat { get; set; } - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [JsonConverter(typeof(StringEnumConverter))] - public enum EncryptionProtocolEnum - { - /// - /// Enum HTTP for value: HTTP - /// - [EnumMember(Value = "HTTP")] - HTTP = 1, - - /// - /// Enum TLSv12 for value: TLSv1.2 - /// - [EnumMember(Value = "TLSv1.2")] - TLSv12 = 2, - - /// - /// Enum TLSv13 for value: TLSv1.3 - /// - [EnumMember(Value = "TLSv1.3")] - TLSv13 = 3 - - } - - - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [DataMember(Name = "encryptionProtocol", EmitDefaultValue = false)] - public EncryptionProtocolEnum? EncryptionProtocol { get; set; } - /// - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **allAccounts** : Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. * **includeAccounts** : The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts** : The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. - /// - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **allAccounts** : Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. * **includeAccounts** : The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts** : The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. - [JsonConverter(typeof(StringEnumConverter))] - public enum FilterMerchantAccountTypeEnum - { - /// - /// Enum AllAccounts for value: allAccounts - /// - [EnumMember(Value = "allAccounts")] - AllAccounts = 1, - - /// - /// Enum ExcludeAccounts for value: excludeAccounts - /// - [EnumMember(Value = "excludeAccounts")] - ExcludeAccounts = 2, - - /// - /// Enum IncludeAccounts for value: includeAccounts - /// - [EnumMember(Value = "includeAccounts")] - IncludeAccounts = 3 - - } - - - /// - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **allAccounts** : Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. * **includeAccounts** : The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts** : The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. - /// - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **allAccounts** : Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. * **includeAccounts** : The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts** : The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. - [DataMember(Name = "filterMerchantAccountType", IsRequired = false, EmitDefaultValue = false)] - public FilterMerchantAccountTypeEnum FilterMerchantAccountType { get; set; } - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - [JsonConverter(typeof(StringEnumConverter))] - public enum NetworkTypeEnum - { - /// - /// Enum Local for value: local - /// - [EnumMember(Value = "local")] - Local = 1, - - /// - /// Enum Public for value: public - /// - [EnumMember(Value = "public")] - Public = 2 - - } - - - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - [DataMember(Name = "networkType", EmitDefaultValue = false)] - public NetworkTypeEnum? NetworkType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateCompanyWebhookRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**.. - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**.. - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**.. - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. (required). - /// additionalSettings. - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** (required). - /// Your description for this webhook configuration.. - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.. - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **allAccounts** : Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. * **includeAccounts** : The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts** : The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. (required). - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. (required). - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**.. - /// Password to access the webhook URL.. - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**.. - /// The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). (required). - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. (required). - /// Username to access the webhook URL.. - public CreateCompanyWebhookRequest(bool? acceptsExpiredCertificate = default(bool?), bool? acceptsSelfSignedCertificate = default(bool?), bool? acceptsUntrustedRootCertificate = default(bool?), bool? active = default(bool?), AdditionalSettings additionalSettings = default(AdditionalSettings), CommunicationFormatEnum communicationFormat = default(CommunicationFormatEnum), string description = default(string), EncryptionProtocolEnum? encryptionProtocol = default(EncryptionProtocolEnum?), FilterMerchantAccountTypeEnum filterMerchantAccountType = default(FilterMerchantAccountTypeEnum), List filterMerchantAccounts = default(List), NetworkTypeEnum? networkType = default(NetworkTypeEnum?), string password = default(string), bool? populateSoapActionHeader = default(bool?), string type = default(string), string url = default(string), string username = default(string)) - { - this.Active = active; - this.CommunicationFormat = communicationFormat; - this.FilterMerchantAccountType = filterMerchantAccountType; - this.FilterMerchantAccounts = filterMerchantAccounts; - this.Type = type; - this.Url = url; - this.AcceptsExpiredCertificate = acceptsExpiredCertificate; - this.AcceptsSelfSignedCertificate = acceptsSelfSignedCertificate; - this.AcceptsUntrustedRootCertificate = acceptsUntrustedRootCertificate; - this.AdditionalSettings = additionalSettings; - this.Description = description; - this.EncryptionProtocol = encryptionProtocol; - this.NetworkType = networkType; - this.Password = password; - this.PopulateSoapActionHeader = populateSoapActionHeader; - this.Username = username; - } - - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsExpiredCertificate", EmitDefaultValue = false)] - public bool? AcceptsExpiredCertificate { get; set; } - - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsSelfSignedCertificate", EmitDefaultValue = false)] - public bool? AcceptsSelfSignedCertificate { get; set; } - - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsUntrustedRootCertificate", EmitDefaultValue = false)] - public bool? AcceptsUntrustedRootCertificate { get; set; } - - /// - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. - /// - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. - [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Gets or Sets AdditionalSettings - /// - [DataMember(Name = "additionalSettings", EmitDefaultValue = false)] - public AdditionalSettings AdditionalSettings { get; set; } - - /// - /// Your description for this webhook configuration. - /// - /// Your description for this webhook configuration. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. - /// - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. - [DataMember(Name = "filterMerchantAccounts", IsRequired = false, EmitDefaultValue = false)] - public List FilterMerchantAccounts { get; set; } - - /// - /// Password to access the webhook URL. - /// - /// Password to access the webhook URL. - [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - [DataMember(Name = "populateSoapActionHeader", EmitDefaultValue = false)] - public bool? PopulateSoapActionHeader { get; set; } - - /// - /// The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). - /// - /// The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Username to access the webhook URL. - /// - /// Username to access the webhook URL. - [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateCompanyWebhookRequest {\n"); - sb.Append(" AcceptsExpiredCertificate: ").Append(AcceptsExpiredCertificate).Append("\n"); - sb.Append(" AcceptsSelfSignedCertificate: ").Append(AcceptsSelfSignedCertificate).Append("\n"); - sb.Append(" AcceptsUntrustedRootCertificate: ").Append(AcceptsUntrustedRootCertificate).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AdditionalSettings: ").Append(AdditionalSettings).Append("\n"); - sb.Append(" CommunicationFormat: ").Append(CommunicationFormat).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EncryptionProtocol: ").Append(EncryptionProtocol).Append("\n"); - sb.Append(" FilterMerchantAccountType: ").Append(FilterMerchantAccountType).Append("\n"); - sb.Append(" FilterMerchantAccounts: ").Append(FilterMerchantAccounts).Append("\n"); - sb.Append(" NetworkType: ").Append(NetworkType).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PopulateSoapActionHeader: ").Append(PopulateSoapActionHeader).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCompanyWebhookRequest); - } - - /// - /// Returns true if CreateCompanyWebhookRequest instances are equal - /// - /// Instance of CreateCompanyWebhookRequest to be compared - /// Boolean - public bool Equals(CreateCompanyWebhookRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptsExpiredCertificate == input.AcceptsExpiredCertificate || - this.AcceptsExpiredCertificate.Equals(input.AcceptsExpiredCertificate) - ) && - ( - this.AcceptsSelfSignedCertificate == input.AcceptsSelfSignedCertificate || - this.AcceptsSelfSignedCertificate.Equals(input.AcceptsSelfSignedCertificate) - ) && - ( - this.AcceptsUntrustedRootCertificate == input.AcceptsUntrustedRootCertificate || - this.AcceptsUntrustedRootCertificate.Equals(input.AcceptsUntrustedRootCertificate) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AdditionalSettings == input.AdditionalSettings || - (this.AdditionalSettings != null && - this.AdditionalSettings.Equals(input.AdditionalSettings)) - ) && - ( - this.CommunicationFormat == input.CommunicationFormat || - this.CommunicationFormat.Equals(input.CommunicationFormat) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EncryptionProtocol == input.EncryptionProtocol || - this.EncryptionProtocol.Equals(input.EncryptionProtocol) - ) && - ( - this.FilterMerchantAccountType == input.FilterMerchantAccountType || - this.FilterMerchantAccountType.Equals(input.FilterMerchantAccountType) - ) && - ( - this.FilterMerchantAccounts == input.FilterMerchantAccounts || - this.FilterMerchantAccounts != null && - input.FilterMerchantAccounts != null && - this.FilterMerchantAccounts.SequenceEqual(input.FilterMerchantAccounts) - ) && - ( - this.NetworkType == input.NetworkType || - this.NetworkType.Equals(input.NetworkType) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.PopulateSoapActionHeader == input.PopulateSoapActionHeader || - this.PopulateSoapActionHeader.Equals(input.PopulateSoapActionHeader) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AcceptsExpiredCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsSelfSignedCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsUntrustedRootCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AdditionalSettings != null) - { - hashCode = (hashCode * 59) + this.AdditionalSettings.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CommunicationFormat.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EncryptionProtocol.GetHashCode(); - hashCode = (hashCode * 59) + this.FilterMerchantAccountType.GetHashCode(); - if (this.FilterMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.FilterMerchantAccounts.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NetworkType.GetHashCode(); - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PopulateSoapActionHeader.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateMerchantApiCredentialRequest.cs b/Adyen/Model/Management/CreateMerchantApiCredentialRequest.cs deleted file mode 100644 index 6c5dcd83a..000000000 --- a/Adyen/Model/Management/CreateMerchantApiCredentialRequest.cs +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateMerchantApiCredentialRequest - /// - [DataContract(Name = "CreateMerchantApiCredentialRequest")] - public partial class CreateMerchantApiCredentialRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the new API credential.. - /// Description of the API credential.. - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials.. - public CreateMerchantApiCredentialRequest(List allowedOrigins = default(List), string description = default(string), List roles = default(List)) - { - this.AllowedOrigins = allowedOrigins; - this.Description = description; - this.Roles = roles; - } - - /// - /// The list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the new API credential. - /// - /// The list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the new API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials. - [DataMember(Name = "roles", EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateMerchantApiCredentialRequest {\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateMerchantApiCredentialRequest); - } - - /// - /// Returns true if CreateMerchantApiCredentialRequest instances are equal - /// - /// Instance of CreateMerchantApiCredentialRequest to be compared - /// Boolean - public bool Equals(CreateMerchantApiCredentialRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateMerchantRequest.cs b/Adyen/Model/Management/CreateMerchantRequest.cs deleted file mode 100644 index 60a4dd619..000000000 --- a/Adyen/Model/Management/CreateMerchantRequest.cs +++ /dev/null @@ -1,255 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateMerchantRequest - /// - [DataContract(Name = "CreateMerchantRequest")] - public partial class CreateMerchantRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateMerchantRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [business line](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines). Required for an Adyen for Platforms Manage integration.. - /// The unique identifier of the company account. (required). - /// Your description for the merchant account, maximum 300 characters.. - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities). Required for an Adyen for Platforms Manage integration.. - /// Sets the pricing plan for the merchant account. Required for an Adyen for Platforms Manage integration. Your Adyen contact will provide the values that you can use.. - /// Your reference for the merchant account. To make this reference the unique identifier of the merchant account, your Adyen contact can set up a template on your company account. The template can have 6 to 255 characters with upper- and lower-case letters, underscores, and numbers. When your company account has a template, then the `reference` is required and must be unique within the company account.. - /// List of sales channels that the merchant will process payments with. - public CreateMerchantRequest(string businessLineId = default(string), string companyId = default(string), string description = default(string), string legalEntityId = default(string), string pricingPlan = default(string), string reference = default(string), List salesChannels = default(List)) - { - this.CompanyId = companyId; - this.BusinessLineId = businessLineId; - this.Description = description; - this.LegalEntityId = legalEntityId; - this.PricingPlan = pricingPlan; - this.Reference = reference; - this.SalesChannels = salesChannels; - } - - /// - /// The unique identifier of the [business line](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines). Required for an Adyen for Platforms Manage integration. - /// - /// The unique identifier of the [business line](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines). Required for an Adyen for Platforms Manage integration. - [DataMember(Name = "businessLineId", EmitDefaultValue = false)] - public string BusinessLineId { get; set; } - - /// - /// The unique identifier of the company account. - /// - /// The unique identifier of the company account. - [DataMember(Name = "companyId", IsRequired = false, EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// Your description for the merchant account, maximum 300 characters. - /// - /// Your description for the merchant account, maximum 300 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities). Required for an Adyen for Platforms Manage integration. - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities). Required for an Adyen for Platforms Manage integration. - [DataMember(Name = "legalEntityId", EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// Sets the pricing plan for the merchant account. Required for an Adyen for Platforms Manage integration. Your Adyen contact will provide the values that you can use. - /// - /// Sets the pricing plan for the merchant account. Required for an Adyen for Platforms Manage integration. Your Adyen contact will provide the values that you can use. - [DataMember(Name = "pricingPlan", EmitDefaultValue = false)] - public string PricingPlan { get; set; } - - /// - /// Your reference for the merchant account. To make this reference the unique identifier of the merchant account, your Adyen contact can set up a template on your company account. The template can have 6 to 255 characters with upper- and lower-case letters, underscores, and numbers. When your company account has a template, then the `reference` is required and must be unique within the company account. - /// - /// Your reference for the merchant account. To make this reference the unique identifier of the merchant account, your Adyen contact can set up a template on your company account. The template can have 6 to 255 characters with upper- and lower-case letters, underscores, and numbers. When your company account has a template, then the `reference` is required and must be unique within the company account. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// List of sales channels that the merchant will process payments with - /// - /// List of sales channels that the merchant will process payments with - [DataMember(Name = "salesChannels", EmitDefaultValue = false)] - public List SalesChannels { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateMerchantRequest {\n"); - sb.Append(" BusinessLineId: ").Append(BusinessLineId).Append("\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" PricingPlan: ").Append(PricingPlan).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SalesChannels: ").Append(SalesChannels).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateMerchantRequest); - } - - /// - /// Returns true if CreateMerchantRequest instances are equal - /// - /// Instance of CreateMerchantRequest to be compared - /// Boolean - public bool Equals(CreateMerchantRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.BusinessLineId == input.BusinessLineId || - (this.BusinessLineId != null && - this.BusinessLineId.Equals(input.BusinessLineId)) - ) && - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.PricingPlan == input.PricingPlan || - (this.PricingPlan != null && - this.PricingPlan.Equals(input.PricingPlan)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SalesChannels == input.SalesChannels || - this.SalesChannels != null && - input.SalesChannels != null && - this.SalesChannels.SequenceEqual(input.SalesChannels) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BusinessLineId != null) - { - hashCode = (hashCode * 59) + this.BusinessLineId.GetHashCode(); - } - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.PricingPlan != null) - { - hashCode = (hashCode * 59) + this.PricingPlan.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SalesChannels != null) - { - hashCode = (hashCode * 59) + this.SalesChannels.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateMerchantResponse.cs b/Adyen/Model/Management/CreateMerchantResponse.cs deleted file mode 100644 index 0990a8967..000000000 --- a/Adyen/Model/Management/CreateMerchantResponse.cs +++ /dev/null @@ -1,249 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateMerchantResponse - /// - [DataContract(Name = "CreateMerchantResponse")] - public partial class CreateMerchantResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the [business line](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines).. - /// The unique identifier of the company account.. - /// Your description for the merchant account, maximum 300 characters.. - /// The unique identifier of the merchant account. If Adyen set up a template for the `reference`, then the `id` will have the same value as the `reference` that you sent in the request. Otherwise, the value is generated by Adyen.. - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities).. - /// Partner pricing plan for the merchant, applicable for merchants under AfP managed company accounts.. - /// Your reference for the merchant account.. - public CreateMerchantResponse(string businessLineId = default(string), string companyId = default(string), string description = default(string), string id = default(string), string legalEntityId = default(string), string pricingPlan = default(string), string reference = default(string)) - { - this.BusinessLineId = businessLineId; - this.CompanyId = companyId; - this.Description = description; - this.Id = id; - this.LegalEntityId = legalEntityId; - this.PricingPlan = pricingPlan; - this.Reference = reference; - } - - /// - /// The unique identifier of the [business line](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines). - /// - /// The unique identifier of the [business line](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines). - [DataMember(Name = "businessLineId", EmitDefaultValue = false)] - public string BusinessLineId { get; set; } - - /// - /// The unique identifier of the company account. - /// - /// The unique identifier of the company account. - [DataMember(Name = "companyId", EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// Your description for the merchant account, maximum 300 characters. - /// - /// Your description for the merchant account, maximum 300 characters. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the merchant account. If Adyen set up a template for the `reference`, then the `id` will have the same value as the `reference` that you sent in the request. Otherwise, the value is generated by Adyen. - /// - /// The unique identifier of the merchant account. If Adyen set up a template for the `reference`, then the `id` will have the same value as the `reference` that you sent in the request. Otherwise, the value is generated by Adyen. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities). - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/legalEntities). - [DataMember(Name = "legalEntityId", EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// Partner pricing plan for the merchant, applicable for merchants under AfP managed company accounts. - /// - /// Partner pricing plan for the merchant, applicable for merchants under AfP managed company accounts. - [DataMember(Name = "pricingPlan", EmitDefaultValue = false)] - public string PricingPlan { get; set; } - - /// - /// Your reference for the merchant account. - /// - /// Your reference for the merchant account. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateMerchantResponse {\n"); - sb.Append(" BusinessLineId: ").Append(BusinessLineId).Append("\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" PricingPlan: ").Append(PricingPlan).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateMerchantResponse); - } - - /// - /// Returns true if CreateMerchantResponse instances are equal - /// - /// Instance of CreateMerchantResponse to be compared - /// Boolean - public bool Equals(CreateMerchantResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.BusinessLineId == input.BusinessLineId || - (this.BusinessLineId != null && - this.BusinessLineId.Equals(input.BusinessLineId)) - ) && - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.PricingPlan == input.PricingPlan || - (this.PricingPlan != null && - this.PricingPlan.Equals(input.PricingPlan)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BusinessLineId != null) - { - hashCode = (hashCode * 59) + this.BusinessLineId.GetHashCode(); - } - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.PricingPlan != null) - { - hashCode = (hashCode * 59) + this.PricingPlan.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateMerchantUserRequest.cs b/Adyen/Model/Management/CreateMerchantUserRequest.cs deleted file mode 100644 index b400c4c7b..000000000 --- a/Adyen/Model/Management/CreateMerchantUserRequest.cs +++ /dev/null @@ -1,261 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateMerchantUserRequest - /// - [DataContract(Name = "CreateMerchantUserRequest")] - public partial class CreateMerchantUserRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateMerchantUserRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.. - /// The email address of the user. (required). - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** . - /// name (required). - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user.. - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.. - /// The user's email address that will be their username. Must be the same as the one in the `email` field. (required). - public CreateMerchantUserRequest(List accountGroups = default(List), string email = default(string), string loginMethod = default(string), Name name = default(Name), List roles = default(List), string timeZoneCode = default(string), string username = default(string)) - { - this.Email = email; - this.Name = name; - this.Username = username; - this.AccountGroups = accountGroups; - this.LoginMethod = loginMethod; - this.Roles = roles; - this.TimeZoneCode = timeZoneCode; - } - - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - [DataMember(Name = "accountGroups", EmitDefaultValue = false)] - public List AccountGroups { get; set; } - - /// - /// The email address of the user. - /// - /// The email address of the user. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** - /// - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** - [DataMember(Name = "loginMethod", EmitDefaultValue = false)] - public string LoginMethod { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - [DataMember(Name = "roles", EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - [DataMember(Name = "timeZoneCode", EmitDefaultValue = false)] - public string TimeZoneCode { get; set; } - - /// - /// The user's email address that will be their username. Must be the same as the one in the `email` field. - /// - /// The user's email address that will be their username. Must be the same as the one in the `email` field. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateMerchantUserRequest {\n"); - sb.Append(" AccountGroups: ").Append(AccountGroups).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" LoginMethod: ").Append(LoginMethod).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" TimeZoneCode: ").Append(TimeZoneCode).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateMerchantUserRequest); - } - - /// - /// Returns true if CreateMerchantUserRequest instances are equal - /// - /// Instance of CreateMerchantUserRequest to be compared - /// Boolean - public bool Equals(CreateMerchantUserRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountGroups == input.AccountGroups || - this.AccountGroups != null && - input.AccountGroups != null && - this.AccountGroups.SequenceEqual(input.AccountGroups) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.LoginMethod == input.LoginMethod || - (this.LoginMethod != null && - this.LoginMethod.Equals(input.LoginMethod)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.TimeZoneCode == input.TimeZoneCode || - (this.TimeZoneCode != null && - this.TimeZoneCode.Equals(input.TimeZoneCode)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountGroups != null) - { - hashCode = (hashCode * 59) + this.AccountGroups.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.LoginMethod != null) - { - hashCode = (hashCode * 59) + this.LoginMethod.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.TimeZoneCode != null) - { - hashCode = (hashCode * 59) + this.TimeZoneCode.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - // Username (string) minLength - if (this.Username != null && this.Username.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be greater than 1.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateMerchantWebhookRequest.cs b/Adyen/Model/Management/CreateMerchantWebhookRequest.cs deleted file mode 100644 index 3732158da..000000000 --- a/Adyen/Model/Management/CreateMerchantWebhookRequest.cs +++ /dev/null @@ -1,429 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateMerchantWebhookRequest - /// - [DataContract(Name = "CreateMerchantWebhookRequest")] - public partial class CreateMerchantWebhookRequest : IEquatable, IValidatableObject - { - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [JsonConverter(typeof(StringEnumConverter))] - public enum CommunicationFormatEnum - { - /// - /// Enum Http for value: http - /// - [EnumMember(Value = "http")] - Http = 1, - - /// - /// Enum Json for value: json - /// - [EnumMember(Value = "json")] - Json = 2, - - /// - /// Enum Soap for value: soap - /// - [EnumMember(Value = "soap")] - Soap = 3 - - } - - - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [DataMember(Name = "communicationFormat", IsRequired = false, EmitDefaultValue = false)] - public CommunicationFormatEnum CommunicationFormat { get; set; } - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [JsonConverter(typeof(StringEnumConverter))] - public enum EncryptionProtocolEnum - { - /// - /// Enum HTTP for value: HTTP - /// - [EnumMember(Value = "HTTP")] - HTTP = 1, - - /// - /// Enum TLSv12 for value: TLSv1.2 - /// - [EnumMember(Value = "TLSv1.2")] - TLSv12 = 2, - - /// - /// Enum TLSv13 for value: TLSv1.3 - /// - [EnumMember(Value = "TLSv1.3")] - TLSv13 = 3 - - } - - - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [DataMember(Name = "encryptionProtocol", EmitDefaultValue = false)] - public EncryptionProtocolEnum? EncryptionProtocol { get; set; } - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - [JsonConverter(typeof(StringEnumConverter))] - public enum NetworkTypeEnum - { - /// - /// Enum Local for value: local - /// - [EnumMember(Value = "local")] - Local = 1, - - /// - /// Enum Public for value: public - /// - [EnumMember(Value = "public")] - Public = 2 - - } - - - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - [DataMember(Name = "networkType", EmitDefaultValue = false)] - public NetworkTypeEnum? NetworkType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateMerchantWebhookRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**.. - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**.. - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**.. - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. (required). - /// additionalSettings. - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** (required). - /// Your description for this webhook configuration.. - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.. - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**.. - /// Password to access the webhook URL.. - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**.. - /// The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). (required). - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. (required). - /// Username to access the webhook URL.. - public CreateMerchantWebhookRequest(bool? acceptsExpiredCertificate = default(bool?), bool? acceptsSelfSignedCertificate = default(bool?), bool? acceptsUntrustedRootCertificate = default(bool?), bool? active = default(bool?), AdditionalSettings additionalSettings = default(AdditionalSettings), CommunicationFormatEnum communicationFormat = default(CommunicationFormatEnum), string description = default(string), EncryptionProtocolEnum? encryptionProtocol = default(EncryptionProtocolEnum?), NetworkTypeEnum? networkType = default(NetworkTypeEnum?), string password = default(string), bool? populateSoapActionHeader = default(bool?), string type = default(string), string url = default(string), string username = default(string)) - { - this.Active = active; - this.CommunicationFormat = communicationFormat; - this.Type = type; - this.Url = url; - this.AcceptsExpiredCertificate = acceptsExpiredCertificate; - this.AcceptsSelfSignedCertificate = acceptsSelfSignedCertificate; - this.AcceptsUntrustedRootCertificate = acceptsUntrustedRootCertificate; - this.AdditionalSettings = additionalSettings; - this.Description = description; - this.EncryptionProtocol = encryptionProtocol; - this.NetworkType = networkType; - this.Password = password; - this.PopulateSoapActionHeader = populateSoapActionHeader; - this.Username = username; - } - - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsExpiredCertificate", EmitDefaultValue = false)] - public bool? AcceptsExpiredCertificate { get; set; } - - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsSelfSignedCertificate", EmitDefaultValue = false)] - public bool? AcceptsSelfSignedCertificate { get; set; } - - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsUntrustedRootCertificate", EmitDefaultValue = false)] - public bool? AcceptsUntrustedRootCertificate { get; set; } - - /// - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. - /// - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. - [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Gets or Sets AdditionalSettings - /// - [DataMember(Name = "additionalSettings", EmitDefaultValue = false)] - public AdditionalSettings AdditionalSettings { get; set; } - - /// - /// Your description for this webhook configuration. - /// - /// Your description for this webhook configuration. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Password to access the webhook URL. - /// - /// Password to access the webhook URL. - [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - [DataMember(Name = "populateSoapActionHeader", EmitDefaultValue = false)] - public bool? PopulateSoapActionHeader { get; set; } - - /// - /// The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). - /// - /// The type of webhook that is being created. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **rreq-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Username to access the webhook URL. - /// - /// Username to access the webhook URL. - [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateMerchantWebhookRequest {\n"); - sb.Append(" AcceptsExpiredCertificate: ").Append(AcceptsExpiredCertificate).Append("\n"); - sb.Append(" AcceptsSelfSignedCertificate: ").Append(AcceptsSelfSignedCertificate).Append("\n"); - sb.Append(" AcceptsUntrustedRootCertificate: ").Append(AcceptsUntrustedRootCertificate).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AdditionalSettings: ").Append(AdditionalSettings).Append("\n"); - sb.Append(" CommunicationFormat: ").Append(CommunicationFormat).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EncryptionProtocol: ").Append(EncryptionProtocol).Append("\n"); - sb.Append(" NetworkType: ").Append(NetworkType).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PopulateSoapActionHeader: ").Append(PopulateSoapActionHeader).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateMerchantWebhookRequest); - } - - /// - /// Returns true if CreateMerchantWebhookRequest instances are equal - /// - /// Instance of CreateMerchantWebhookRequest to be compared - /// Boolean - public bool Equals(CreateMerchantWebhookRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptsExpiredCertificate == input.AcceptsExpiredCertificate || - this.AcceptsExpiredCertificate.Equals(input.AcceptsExpiredCertificate) - ) && - ( - this.AcceptsSelfSignedCertificate == input.AcceptsSelfSignedCertificate || - this.AcceptsSelfSignedCertificate.Equals(input.AcceptsSelfSignedCertificate) - ) && - ( - this.AcceptsUntrustedRootCertificate == input.AcceptsUntrustedRootCertificate || - this.AcceptsUntrustedRootCertificate.Equals(input.AcceptsUntrustedRootCertificate) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AdditionalSettings == input.AdditionalSettings || - (this.AdditionalSettings != null && - this.AdditionalSettings.Equals(input.AdditionalSettings)) - ) && - ( - this.CommunicationFormat == input.CommunicationFormat || - this.CommunicationFormat.Equals(input.CommunicationFormat) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EncryptionProtocol == input.EncryptionProtocol || - this.EncryptionProtocol.Equals(input.EncryptionProtocol) - ) && - ( - this.NetworkType == input.NetworkType || - this.NetworkType.Equals(input.NetworkType) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.PopulateSoapActionHeader == input.PopulateSoapActionHeader || - this.PopulateSoapActionHeader.Equals(input.PopulateSoapActionHeader) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AcceptsExpiredCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsSelfSignedCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsUntrustedRootCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AdditionalSettings != null) - { - hashCode = (hashCode * 59) + this.AdditionalSettings.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CommunicationFormat.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EncryptionProtocol.GetHashCode(); - hashCode = (hashCode * 59) + this.NetworkType.GetHashCode(); - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PopulateSoapActionHeader.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CreateUserResponse.cs b/Adyen/Model/Management/CreateUserResponse.cs deleted file mode 100644 index f3fee88c0..000000000 --- a/Adyen/Model/Management/CreateUserResponse.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CreateUserResponse - /// - [DataContract(Name = "CreateUserResponse")] - public partial class CreateUserResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateUserResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.. - /// Indicates whether this user is active.. - /// Set of apps available to this user. - /// The email address of the user. (required). - /// The unique identifier of the user. (required). - /// name. - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. (required). - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. (required). - /// The username for this user. (required). - public CreateUserResponse(Links links = default(Links), List accountGroups = default(List), bool? active = default(bool?), List apps = default(List), string email = default(string), string id = default(string), Name name = default(Name), List roles = default(List), string timeZoneCode = default(string), string username = default(string)) - { - this.Email = email; - this.Id = id; - this.Roles = roles; - this.TimeZoneCode = timeZoneCode; - this.Username = username; - this.Links = links; - this.AccountGroups = accountGroups; - this.Active = active; - this.Apps = apps; - this.Name = name; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - [DataMember(Name = "accountGroups", EmitDefaultValue = false)] - public List AccountGroups { get; set; } - - /// - /// Indicates whether this user is active. - /// - /// Indicates whether this user is active. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Set of apps available to this user - /// - /// Set of apps available to this user - [DataMember(Name = "apps", EmitDefaultValue = false)] - public List Apps { get; set; } - - /// - /// The email address of the user. - /// - /// The email address of the user. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The unique identifier of the user. - /// - /// The unique identifier of the user. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - [DataMember(Name = "timeZoneCode", IsRequired = false, EmitDefaultValue = false)] - public string TimeZoneCode { get; set; } - - /// - /// The username for this user. - /// - /// The username for this user. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateUserResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" AccountGroups: ").Append(AccountGroups).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" Apps: ").Append(Apps).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" TimeZoneCode: ").Append(TimeZoneCode).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateUserResponse); - } - - /// - /// Returns true if CreateUserResponse instances are equal - /// - /// Instance of CreateUserResponse to be compared - /// Boolean - public bool Equals(CreateUserResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.AccountGroups == input.AccountGroups || - this.AccountGroups != null && - input.AccountGroups != null && - this.AccountGroups.SequenceEqual(input.AccountGroups) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.Apps == input.Apps || - this.Apps != null && - input.Apps != null && - this.Apps.SequenceEqual(input.Apps) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.TimeZoneCode == input.TimeZoneCode || - (this.TimeZoneCode != null && - this.TimeZoneCode.Equals(input.TimeZoneCode)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.AccountGroups != null) - { - hashCode = (hashCode * 59) + this.AccountGroups.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.Apps != null) - { - hashCode = (hashCode * 59) + this.Apps.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.TimeZoneCode != null) - { - hashCode = (hashCode * 59) + this.TimeZoneCode.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - // Username (string) minLength - if (this.Username != null && this.Username.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be greater than 1.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Currency.cs b/Adyen/Model/Management/Currency.cs deleted file mode 100644 index 356e728b5..000000000 --- a/Adyen/Model/Management/Currency.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Currency - /// - [DataContract(Name = "Currency")] - public partial class Currency : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Currency() { } - /// - /// Initializes a new instance of the class. - /// - /// Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).. - /// Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, **AUD**. (required). - /// The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes).. - /// Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**.. - public Currency(int? amount = default(int?), string currencyCode = default(string), int? maxAmount = default(int?), double? percentage = default(double?)) - { - this.CurrencyCode = currencyCode; - this.Amount = amount; - this.MaxAmount = maxAmount; - this.Percentage = percentage; - } - - /// - /// Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// Surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "amount", EmitDefaultValue = false)] - public int? Amount { get; set; } - - /// - /// Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, **AUD**. - /// - /// Three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, **AUD**. - [DataMember(Name = "currencyCode", IsRequired = false, EmitDefaultValue = false)] - public string CurrencyCode { get; set; } - - /// - /// The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The maximum surcharge amount per transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "maxAmount", EmitDefaultValue = false)] - public int? MaxAmount { get; set; } - - /// - /// Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**. - /// - /// Surcharge percentage per transaction. The maximum number of decimal places is two. For example, **1%** or **2.27%**. - [DataMember(Name = "percentage", EmitDefaultValue = false)] - public double? Percentage { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Currency {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append(" MaxAmount: ").Append(MaxAmount).Append("\n"); - sb.Append(" Percentage: ").Append(Percentage).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Currency); - } - - /// - /// Returns true if Currency instances are equal - /// - /// Instance of Currency to be compared - /// Boolean - public bool Equals(Currency input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ) && - ( - this.MaxAmount == input.MaxAmount || - this.MaxAmount.Equals(input.MaxAmount) - ) && - ( - this.Percentage == input.Percentage || - this.Percentage.Equals(input.Percentage) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.CurrencyCode != null) - { - hashCode = (hashCode * 59) + this.CurrencyCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MaxAmount.GetHashCode(); - hashCode = (hashCode * 59) + this.Percentage.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/CustomNotification.cs b/Adyen/Model/Management/CustomNotification.cs deleted file mode 100644 index d3782280f..000000000 --- a/Adyen/Model/Management/CustomNotification.cs +++ /dev/null @@ -1,238 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// CustomNotification - /// - [DataContract(Name = "CustomNotification")] - public partial class CustomNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA**. - /// The time of the event. Format: [ISO 8601](http://www.w3.org/TR/NOTE-datetime), YYYY-MM-DDThh:mm:ssTZD.. - /// Your reference for the custom test notification.. - /// The payment method for the payment that the notification is about. Possible values: * **amex** * **visa** * **mc** * **maestro** * **bcmc** * **paypal** * **sms** * **bankTransfer_NL** * **bankTransfer_DE** * **bankTransfer_BE** * **ideal** * **elv** * **sepadirectdebit** . - /// A description of what caused the notification.. - /// The outcome of the event which the notification is about. Set to either **true** or **false**. . - public CustomNotification(Amount amount = default(Amount), string eventCode = default(string), DateTime eventDate = default(DateTime), string merchantReference = default(string), string paymentMethod = default(string), string reason = default(string), bool? success = default(bool?)) - { - this.Amount = amount; - this.EventCode = eventCode; - this.EventDate = eventDate; - this.MerchantReference = merchantReference; - this.PaymentMethod = paymentMethod; - this.Reason = reason; - this.Success = success; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** - /// - /// The event that caused the notification to be sent.Currently supported values: * **AUTHORISATION** * **CANCELLATION** * **REFUND** * **CAPTURE** * **REPORT_AVAILABLE** * **CHARGEBACK** * **REQUEST_FOR_INFORMATION** * **NOTIFICATION_OF_CHARGEBACK** * **NOTIFICATIONTEST** * **ORDER_OPENED** * **ORDER_CLOSED** * **CHARGEBACK_REVERSED** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** - [DataMember(Name = "eventCode", EmitDefaultValue = false)] - public string EventCode { get; set; } - - /// - /// The time of the event. Format: [ISO 8601](http://www.w3.org/TR/NOTE-datetime), YYYY-MM-DDThh:mm:ssTZD. - /// - /// The time of the event. Format: [ISO 8601](http://www.w3.org/TR/NOTE-datetime), YYYY-MM-DDThh:mm:ssTZD. - [DataMember(Name = "eventDate", EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// Your reference for the custom test notification. - /// - /// Your reference for the custom test notification. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The payment method for the payment that the notification is about. Possible values: * **amex** * **visa** * **mc** * **maestro** * **bcmc** * **paypal** * **sms** * **bankTransfer_NL** * **bankTransfer_DE** * **bankTransfer_BE** * **ideal** * **elv** * **sepadirectdebit** - /// - /// The payment method for the payment that the notification is about. Possible values: * **amex** * **visa** * **mc** * **maestro** * **bcmc** * **paypal** * **sms** * **bankTransfer_NL** * **bankTransfer_DE** * **bankTransfer_BE** * **ideal** * **elv** * **sepadirectdebit** - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public string PaymentMethod { get; set; } - - /// - /// A description of what caused the notification. - /// - /// A description of what caused the notification. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// The outcome of the event which the notification is about. Set to either **true** or **false**. - /// - /// The outcome of the event which the notification is about. Set to either **true** or **false**. - [DataMember(Name = "success", EmitDefaultValue = false)] - public bool? Success { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CustomNotification {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" EventCode: ").Append(EventCode).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Success: ").Append(Success).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomNotification); - } - - /// - /// Returns true if CustomNotification instances are equal - /// - /// Instance of CustomNotification to be compared - /// Boolean - public bool Equals(CustomNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.EventCode == input.EventCode || - (this.EventCode != null && - this.EventCode.Equals(input.EventCode)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ) && - ( - this.Success == input.Success || - this.Success.Equals(input.Success) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.EventCode != null) - { - hashCode = (hashCode * 59) + this.EventCode.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Success.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/DataCenter.cs b/Adyen/Model/Management/DataCenter.cs deleted file mode 100644 index 36d909ced..000000000 --- a/Adyen/Model/Management/DataCenter.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// DataCenter - /// - [DataContract(Name = "DataCenter")] - public partial class DataCenter : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique [live URL prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) for your live endpoint. Each data center has its own live URL prefix. This field is empty for requests made in the test environment.. - /// The name assigned to a data center, for example **EU** for the European data center. Possible values are: * **default**: the European data center. This value is always returned in the test environment. * **AU** * **EU** * **US**. - public DataCenter(string livePrefix = default(string), string name = default(string)) - { - this.LivePrefix = livePrefix; - this.Name = name; - } - - /// - /// The unique [live URL prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) for your live endpoint. Each data center has its own live URL prefix. This field is empty for requests made in the test environment. - /// - /// The unique [live URL prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) for your live endpoint. Each data center has its own live URL prefix. This field is empty for requests made in the test environment. - [DataMember(Name = "livePrefix", EmitDefaultValue = false)] - public string LivePrefix { get; set; } - - /// - /// The name assigned to a data center, for example **EU** for the European data center. Possible values are: * **default**: the European data center. This value is always returned in the test environment. * **AU** * **EU** * **US** - /// - /// The name assigned to a data center, for example **EU** for the European data center. Possible values are: * **default**: the European data center. This value is always returned in the test environment. * **AU** * **EU** * **US** - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DataCenter {\n"); - sb.Append(" LivePrefix: ").Append(LivePrefix).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DataCenter); - } - - /// - /// Returns true if DataCenter instances are equal - /// - /// Instance of DataCenter to be compared - /// Boolean - public bool Equals(DataCenter input) - { - if (input == null) - { - return false; - } - return - ( - this.LivePrefix == input.LivePrefix || - (this.LivePrefix != null && - this.LivePrefix.Equals(input.LivePrefix)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LivePrefix != null) - { - hashCode = (hashCode * 59) + this.LivePrefix.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/DinersInfo.cs b/Adyen/Model/Management/DinersInfo.cs deleted file mode 100644 index 2042a2181..000000000 --- a/Adyen/Model/Management/DinersInfo.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// DinersInfo - /// - [DataContract(Name = "DinersInfo")] - public partial class DinersInfo : IEquatable, IValidatableObject - { - /// - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. - /// - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. - [JsonConverter(typeof(StringEnumConverter))] - public enum ServiceLevelEnum - { - /// - /// Enum NoContract for value: noContract - /// - [EnumMember(Value = "noContract")] - NoContract = 1, - - /// - /// Enum GatewayContract for value: gatewayContract - /// - [EnumMember(Value = "gatewayContract")] - GatewayContract = 2 - - } - - - /// - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. - /// - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. - [DataMember(Name = "serviceLevel", EmitDefaultValue = false)] - public ServiceLevelEnum? ServiceLevel { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DinersInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// MID (Merchant ID) number. Required for merchants operating in Japan. Format: 14 numeric characters.. - /// Indicates whether the JCB Merchant ID is reused from a previously configured JCB payment method. The default value is **false**. For merchants operating in Japan, this field is required and must be set to **true**. (required) (default to false). - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly.. - /// transactionDescription. - public DinersInfo(string midNumber = default(string), bool? reuseMidNumber = false, ServiceLevelEnum? serviceLevel = default(ServiceLevelEnum?), TransactionDescriptionInfo transactionDescription = default(TransactionDescriptionInfo)) - { - this.ReuseMidNumber = reuseMidNumber; - this.MidNumber = midNumber; - this.ServiceLevel = serviceLevel; - this.TransactionDescription = transactionDescription; - } - - /// - /// MID (Merchant ID) number. Required for merchants operating in Japan. Format: 14 numeric characters. - /// - /// MID (Merchant ID) number. Required for merchants operating in Japan. Format: 14 numeric characters. - [DataMember(Name = "midNumber", EmitDefaultValue = false)] - public string MidNumber { get; set; } - - /// - /// Indicates whether the JCB Merchant ID is reused from a previously configured JCB payment method. The default value is **false**. For merchants operating in Japan, this field is required and must be set to **true**. - /// - /// Indicates whether the JCB Merchant ID is reused from a previously configured JCB payment method. The default value is **false**. For merchants operating in Japan, this field is required and must be set to **true**. - [DataMember(Name = "reuseMidNumber", IsRequired = false, EmitDefaultValue = false)] - public bool? ReuseMidNumber { get; set; } - - /// - /// Gets or Sets TransactionDescription - /// - [DataMember(Name = "transactionDescription", EmitDefaultValue = false)] - public TransactionDescriptionInfo TransactionDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DinersInfo {\n"); - sb.Append(" MidNumber: ").Append(MidNumber).Append("\n"); - sb.Append(" ReuseMidNumber: ").Append(ReuseMidNumber).Append("\n"); - sb.Append(" ServiceLevel: ").Append(ServiceLevel).Append("\n"); - sb.Append(" TransactionDescription: ").Append(TransactionDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DinersInfo); - } - - /// - /// Returns true if DinersInfo instances are equal - /// - /// Instance of DinersInfo to be compared - /// Boolean - public bool Equals(DinersInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.MidNumber == input.MidNumber || - (this.MidNumber != null && - this.MidNumber.Equals(input.MidNumber)) - ) && - ( - this.ReuseMidNumber == input.ReuseMidNumber || - this.ReuseMidNumber.Equals(input.ReuseMidNumber) - ) && - ( - this.ServiceLevel == input.ServiceLevel || - this.ServiceLevel.Equals(input.ServiceLevel) - ) && - ( - this.TransactionDescription == input.TransactionDescription || - (this.TransactionDescription != null && - this.TransactionDescription.Equals(input.TransactionDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MidNumber != null) - { - hashCode = (hashCode * 59) + this.MidNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReuseMidNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.ServiceLevel.GetHashCode(); - if (this.TransactionDescription != null) - { - hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // MidNumber (string) maxLength - if (this.MidNumber != null && this.MidNumber.Length > 14) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MidNumber, length must be less than 14.", new [] { "MidNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/EventUrl.cs b/Adyen/Model/Management/EventUrl.cs deleted file mode 100644 index 27963eb73..000000000 --- a/Adyen/Model/Management/EventUrl.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// EventUrl - /// - [DataContract(Name = "EventUrl")] - public partial class EventUrl : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// One or more local URLs to send event notifications to when using Terminal API.. - /// One or more public URLs to send event notifications to when using Terminal API.. - public EventUrl(List eventLocalUrls = default(List), List eventPublicUrls = default(List)) - { - this.EventLocalUrls = eventLocalUrls; - this.EventPublicUrls = eventPublicUrls; - } - - /// - /// One or more local URLs to send event notifications to when using Terminal API. - /// - /// One or more local URLs to send event notifications to when using Terminal API. - [DataMember(Name = "eventLocalUrls", EmitDefaultValue = false)] - public List EventLocalUrls { get; set; } - - /// - /// One or more public URLs to send event notifications to when using Terminal API. - /// - /// One or more public URLs to send event notifications to when using Terminal API. - [DataMember(Name = "eventPublicUrls", EmitDefaultValue = false)] - public List EventPublicUrls { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EventUrl {\n"); - sb.Append(" EventLocalUrls: ").Append(EventLocalUrls).Append("\n"); - sb.Append(" EventPublicUrls: ").Append(EventPublicUrls).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EventUrl); - } - - /// - /// Returns true if EventUrl instances are equal - /// - /// Instance of EventUrl to be compared - /// Boolean - public bool Equals(EventUrl input) - { - if (input == null) - { - return false; - } - return - ( - this.EventLocalUrls == input.EventLocalUrls || - this.EventLocalUrls != null && - input.EventLocalUrls != null && - this.EventLocalUrls.SequenceEqual(input.EventLocalUrls) - ) && - ( - this.EventPublicUrls == input.EventPublicUrls || - this.EventPublicUrls != null && - input.EventPublicUrls != null && - this.EventPublicUrls.SequenceEqual(input.EventPublicUrls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EventLocalUrls != null) - { - hashCode = (hashCode * 59) + this.EventLocalUrls.GetHashCode(); - } - if (this.EventPublicUrls != null) - { - hashCode = (hashCode * 59) + this.EventPublicUrls.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ExternalTerminalAction.cs b/Adyen/Model/Management/ExternalTerminalAction.cs deleted file mode 100644 index f682b4676..000000000 --- a/Adyen/Model/Management/ExternalTerminalAction.cs +++ /dev/null @@ -1,262 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ExternalTerminalAction - /// - [DataContract(Name = "ExternalTerminalAction")] - public partial class ExternalTerminalAction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The type of terminal action: **InstallAndroidApp**, **UninstallAndroidApp**, **InstallAndroidCertificate**, or **UninstallAndroidCertificate**.. - /// Technical information about the terminal action.. - /// The date and time when the action was carried out.. - /// The unique ID of the terminal action.. - /// The result message for the action.. - /// The date and time when the action was scheduled to happen.. - /// The status of the terminal action: **pending**, **successful**, **failed**, **cancelled**, or **tryLater**.. - /// The unique ID of the terminal that the action applies to.. - public ExternalTerminalAction(string actionType = default(string), string config = default(string), DateTime confirmedAt = default(DateTime), string id = default(string), string result = default(string), DateTime scheduledAt = default(DateTime), string status = default(string), string terminalId = default(string)) - { - this.ActionType = actionType; - this.Config = config; - this.ConfirmedAt = confirmedAt; - this.Id = id; - this.Result = result; - this.ScheduledAt = scheduledAt; - this.Status = status; - this.TerminalId = terminalId; - } - - /// - /// The type of terminal action: **InstallAndroidApp**, **UninstallAndroidApp**, **InstallAndroidCertificate**, or **UninstallAndroidCertificate**. - /// - /// The type of terminal action: **InstallAndroidApp**, **UninstallAndroidApp**, **InstallAndroidCertificate**, or **UninstallAndroidCertificate**. - [DataMember(Name = "actionType", EmitDefaultValue = false)] - public string ActionType { get; set; } - - /// - /// Technical information about the terminal action. - /// - /// Technical information about the terminal action. - [DataMember(Name = "config", EmitDefaultValue = false)] - public string Config { get; set; } - - /// - /// The date and time when the action was carried out. - /// - /// The date and time when the action was carried out. - [DataMember(Name = "confirmedAt", EmitDefaultValue = false)] - public DateTime ConfirmedAt { get; set; } - - /// - /// The unique ID of the terminal action. - /// - /// The unique ID of the terminal action. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The result message for the action. - /// - /// The result message for the action. - [DataMember(Name = "result", EmitDefaultValue = false)] - public string Result { get; set; } - - /// - /// The date and time when the action was scheduled to happen. - /// - /// The date and time when the action was scheduled to happen. - [DataMember(Name = "scheduledAt", EmitDefaultValue = false)] - public DateTime ScheduledAt { get; set; } - - /// - /// The status of the terminal action: **pending**, **successful**, **failed**, **cancelled**, or **tryLater**. - /// - /// The status of the terminal action: **pending**, **successful**, **failed**, **cancelled**, or **tryLater**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// The unique ID of the terminal that the action applies to. - /// - /// The unique ID of the terminal that the action applies to. - [DataMember(Name = "terminalId", EmitDefaultValue = false)] - public string TerminalId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ExternalTerminalAction {\n"); - sb.Append(" ActionType: ").Append(ActionType).Append("\n"); - sb.Append(" Config: ").Append(Config).Append("\n"); - sb.Append(" ConfirmedAt: ").Append(ConfirmedAt).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TerminalId: ").Append(TerminalId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ExternalTerminalAction); - } - - /// - /// Returns true if ExternalTerminalAction instances are equal - /// - /// Instance of ExternalTerminalAction to be compared - /// Boolean - public bool Equals(ExternalTerminalAction input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionType == input.ActionType || - (this.ActionType != null && - this.ActionType.Equals(input.ActionType)) - ) && - ( - this.Config == input.Config || - (this.Config != null && - this.Config.Equals(input.Config)) - ) && - ( - this.ConfirmedAt == input.ConfirmedAt || - (this.ConfirmedAt != null && - this.ConfirmedAt.Equals(input.ConfirmedAt)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ) && - ( - this.ScheduledAt == input.ScheduledAt || - (this.ScheduledAt != null && - this.ScheduledAt.Equals(input.ScheduledAt)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.TerminalId == input.TerminalId || - (this.TerminalId != null && - this.TerminalId.Equals(input.TerminalId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionType != null) - { - hashCode = (hashCode * 59) + this.ActionType.GetHashCode(); - } - if (this.Config != null) - { - hashCode = (hashCode * 59) + this.Config.GetHashCode(); - } - if (this.ConfirmedAt != null) - { - hashCode = (hashCode * 59) + this.ConfirmedAt.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Result != null) - { - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - } - if (this.ScheduledAt != null) - { - hashCode = (hashCode * 59) + this.ScheduledAt.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.TerminalId != null) - { - hashCode = (hashCode * 59) + this.TerminalId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/File.cs b/Adyen/Model/Management/File.cs deleted file mode 100644 index 1137c2347..000000000 --- a/Adyen/Model/Management/File.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// File - /// - [DataContract(Name = "File")] - public partial class File : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected File() { } - /// - /// Initializes a new instance of the class. - /// - /// The certificate content converted to a Base64-encoded string. (required). - /// The name of the certificate. Must be unique across Wi-Fi profiles. (required). - public File(string data = default(string), string name = default(string)) - { - this.Data = data; - this.Name = name; - } - - /// - /// The certificate content converted to a Base64-encoded string. - /// - /// The certificate content converted to a Base64-encoded string. - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public string Data { get; set; } - - /// - /// The name of the certificate. Must be unique across Wi-Fi profiles. - /// - /// The name of the certificate. Must be unique across Wi-Fi profiles. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class File {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as File); - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/GenerateApiKeyResponse.cs b/Adyen/Model/Management/GenerateApiKeyResponse.cs deleted file mode 100644 index 96bda92f2..000000000 --- a/Adyen/Model/Management/GenerateApiKeyResponse.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// GenerateApiKeyResponse - /// - [DataContract(Name = "GenerateApiKeyResponse")] - public partial class GenerateApiKeyResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GenerateApiKeyResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The generated API key. (required). - public GenerateApiKeyResponse(string apiKey = default(string)) - { - this.ApiKey = apiKey; - } - - /// - /// The generated API key. - /// - /// The generated API key. - [DataMember(Name = "apiKey", IsRequired = false, EmitDefaultValue = false)] - public string ApiKey { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GenerateApiKeyResponse {\n"); - sb.Append(" ApiKey: ").Append(ApiKey).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GenerateApiKeyResponse); - } - - /// - /// Returns true if GenerateApiKeyResponse instances are equal - /// - /// Instance of GenerateApiKeyResponse to be compared - /// Boolean - public bool Equals(GenerateApiKeyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.ApiKey == input.ApiKey || - (this.ApiKey != null && - this.ApiKey.Equals(input.ApiKey)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApiKey != null) - { - hashCode = (hashCode * 59) + this.ApiKey.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/GenerateClientKeyResponse.cs b/Adyen/Model/Management/GenerateClientKeyResponse.cs deleted file mode 100644 index d773161cd..000000000 --- a/Adyen/Model/Management/GenerateClientKeyResponse.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// GenerateClientKeyResponse - /// - [DataContract(Name = "GenerateClientKeyResponse")] - public partial class GenerateClientKeyResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GenerateClientKeyResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Generated client key (required). - public GenerateClientKeyResponse(string clientKey = default(string)) - { - this.ClientKey = clientKey; - } - - /// - /// Generated client key - /// - /// Generated client key - [DataMember(Name = "clientKey", IsRequired = false, EmitDefaultValue = false)] - public string ClientKey { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GenerateClientKeyResponse {\n"); - sb.Append(" ClientKey: ").Append(ClientKey).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GenerateClientKeyResponse); - } - - /// - /// Returns true if GenerateClientKeyResponse instances are equal - /// - /// Instance of GenerateClientKeyResponse to be compared - /// Boolean - public bool Equals(GenerateClientKeyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.ClientKey == input.ClientKey || - (this.ClientKey != null && - this.ClientKey.Equals(input.ClientKey)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClientKey != null) - { - hashCode = (hashCode * 59) + this.ClientKey.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/GenerateHmacKeyResponse.cs b/Adyen/Model/Management/GenerateHmacKeyResponse.cs deleted file mode 100644 index 7fc978ca9..000000000 --- a/Adyen/Model/Management/GenerateHmacKeyResponse.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// GenerateHmacKeyResponse - /// - [DataContract(Name = "GenerateHmacKeyResponse")] - public partial class GenerateHmacKeyResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GenerateHmacKeyResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The HMAC key generated for this webhook. (required). - public GenerateHmacKeyResponse(string hmacKey = default(string)) - { - this.HmacKey = hmacKey; - } - - /// - /// The HMAC key generated for this webhook. - /// - /// The HMAC key generated for this webhook. - [DataMember(Name = "hmacKey", IsRequired = false, EmitDefaultValue = false)] - public string HmacKey { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GenerateHmacKeyResponse {\n"); - sb.Append(" HmacKey: ").Append(HmacKey).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GenerateHmacKeyResponse); - } - - /// - /// Returns true if GenerateHmacKeyResponse instances are equal - /// - /// Instance of GenerateHmacKeyResponse to be compared - /// Boolean - public bool Equals(GenerateHmacKeyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HmacKey == input.HmacKey || - (this.HmacKey != null && - this.HmacKey.Equals(input.HmacKey)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.HmacKey != null) - { - hashCode = (hashCode * 59) + this.HmacKey.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/GenericPmWithTdiInfo.cs b/Adyen/Model/Management/GenericPmWithTdiInfo.cs deleted file mode 100644 index f70d1609f..000000000 --- a/Adyen/Model/Management/GenericPmWithTdiInfo.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// GenericPmWithTdiInfo - /// - [DataContract(Name = "GenericPmWithTdiInfo")] - public partial class GenericPmWithTdiInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// transactionDescription. - public GenericPmWithTdiInfo(TransactionDescriptionInfo transactionDescription = default(TransactionDescriptionInfo)) - { - this.TransactionDescription = transactionDescription; - } - - /// - /// Gets or Sets TransactionDescription - /// - [DataMember(Name = "transactionDescription", EmitDefaultValue = false)] - public TransactionDescriptionInfo TransactionDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GenericPmWithTdiInfo {\n"); - sb.Append(" TransactionDescription: ").Append(TransactionDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GenericPmWithTdiInfo); - } - - /// - /// Returns true if GenericPmWithTdiInfo instances are equal - /// - /// Instance of GenericPmWithTdiInfo to be compared - /// Boolean - public bool Equals(GenericPmWithTdiInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.TransactionDescription == input.TransactionDescription || - (this.TransactionDescription != null && - this.TransactionDescription.Equals(input.TransactionDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TransactionDescription != null) - { - hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/GiroPayInfo.cs b/Adyen/Model/Management/GiroPayInfo.cs deleted file mode 100644 index 0b99eae0e..000000000 --- a/Adyen/Model/Management/GiroPayInfo.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// GiroPayInfo - /// - [DataContract(Name = "GiroPayInfo")] - public partial class GiroPayInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GiroPayInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The email address of merchant support. (required). - public GiroPayInfo(string supportEmail = default(string)) - { - this.SupportEmail = supportEmail; - } - - /// - /// The email address of merchant support. - /// - /// The email address of merchant support. - [DataMember(Name = "supportEmail", IsRequired = false, EmitDefaultValue = false)] - public string SupportEmail { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GiroPayInfo {\n"); - sb.Append(" SupportEmail: ").Append(SupportEmail).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GiroPayInfo); - } - - /// - /// Returns true if GiroPayInfo instances are equal - /// - /// Instance of GiroPayInfo to be compared - /// Boolean - public bool Equals(GiroPayInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.SupportEmail == input.SupportEmail || - (this.SupportEmail != null && - this.SupportEmail.Equals(input.SupportEmail)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SupportEmail != null) - { - hashCode = (hashCode * 59) + this.SupportEmail.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/GooglePayInfo.cs b/Adyen/Model/Management/GooglePayInfo.cs deleted file mode 100644 index 8998d2b3e..000000000 --- a/Adyen/Model/Management/GooglePayInfo.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// GooglePayInfo - /// - [DataContract(Name = "GooglePayInfo")] - public partial class GooglePayInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GooglePayInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Google Pay [Merchant ID](https://support.google.com/paymentscenter/answer/7163092?hl=en). Character length and limitations: 16 alphanumeric characters or 20 numeric characters. (required). - /// Indicates whether the Google Pay Merchant ID is used for several merchant accounts. Default value: **false**.. - public GooglePayInfo(string merchantId = default(string), bool? reuseMerchantId = default(bool?)) - { - this.MerchantId = merchantId; - this.ReuseMerchantId = reuseMerchantId; - } - - /// - /// Google Pay [Merchant ID](https://support.google.com/paymentscenter/answer/7163092?hl=en). Character length and limitations: 16 alphanumeric characters or 20 numeric characters. - /// - /// Google Pay [Merchant ID](https://support.google.com/paymentscenter/answer/7163092?hl=en). Character length and limitations: 16 alphanumeric characters or 20 numeric characters. - [DataMember(Name = "merchantId", IsRequired = false, EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// Indicates whether the Google Pay Merchant ID is used for several merchant accounts. Default value: **false**. - /// - /// Indicates whether the Google Pay Merchant ID is used for several merchant accounts. Default value: **false**. - [DataMember(Name = "reuseMerchantId", EmitDefaultValue = false)] - public bool? ReuseMerchantId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GooglePayInfo {\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" ReuseMerchantId: ").Append(ReuseMerchantId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GooglePayInfo); - } - - /// - /// Returns true if GooglePayInfo instances are equal - /// - /// Instance of GooglePayInfo to be compared - /// Boolean - public bool Equals(GooglePayInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.ReuseMerchantId == input.ReuseMerchantId || - this.ReuseMerchantId.Equals(input.ReuseMerchantId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReuseMerchantId.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // MerchantId (string) maxLength - if (this.MerchantId != null && this.MerchantId.Length > 20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MerchantId, length must be less than 20.", new [] { "MerchantId" }); - } - - // MerchantId (string) minLength - if (this.MerchantId != null && this.MerchantId.Length < 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MerchantId, length must be greater than 16.", new [] { "MerchantId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Gratuity.cs b/Adyen/Model/Management/Gratuity.cs deleted file mode 100644 index 60ef9ad00..000000000 --- a/Adyen/Model/Management/Gratuity.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Gratuity - /// - [DataContract(Name = "Gratuity")] - public partial class Gratuity : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether one of the predefined tipping options is to let the shopper enter a custom tip. If **true**, only three of the other options defined in `predefinedTipEntries` are shown.. - /// The currency that the tipping settings apply to.. - /// Tipping options the shopper can choose from if `usePredefinedTipEntries` is **true**. The maximum number of predefined options is four, or three plus the option to enter a custom tip. The options can be a mix of: - A percentage of the transaction amount. Example: **5%** - A tip amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). Example: **500** for a EUR 5 tip.. - /// Indicates whether the terminal shows a prompt to enter a tip (**false**), or predefined tipping options to choose from (**true**).. - public Gratuity(bool? allowCustomAmount = default(bool?), string currency = default(string), List predefinedTipEntries = default(List), bool? usePredefinedTipEntries = default(bool?)) - { - this.AllowCustomAmount = allowCustomAmount; - this.Currency = currency; - this.PredefinedTipEntries = predefinedTipEntries; - this.UsePredefinedTipEntries = usePredefinedTipEntries; - } - - /// - /// Indicates whether one of the predefined tipping options is to let the shopper enter a custom tip. If **true**, only three of the other options defined in `predefinedTipEntries` are shown. - /// - /// Indicates whether one of the predefined tipping options is to let the shopper enter a custom tip. If **true**, only three of the other options defined in `predefinedTipEntries` are shown. - [DataMember(Name = "allowCustomAmount", EmitDefaultValue = false)] - public bool? AllowCustomAmount { get; set; } - - /// - /// The currency that the tipping settings apply to. - /// - /// The currency that the tipping settings apply to. - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// Tipping options the shopper can choose from if `usePredefinedTipEntries` is **true**. The maximum number of predefined options is four, or three plus the option to enter a custom tip. The options can be a mix of: - A percentage of the transaction amount. Example: **5%** - A tip amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). Example: **500** for a EUR 5 tip. - /// - /// Tipping options the shopper can choose from if `usePredefinedTipEntries` is **true**. The maximum number of predefined options is four, or three plus the option to enter a custom tip. The options can be a mix of: - A percentage of the transaction amount. Example: **5%** - A tip amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). Example: **500** for a EUR 5 tip. - [DataMember(Name = "predefinedTipEntries", EmitDefaultValue = false)] - public List PredefinedTipEntries { get; set; } - - /// - /// Indicates whether the terminal shows a prompt to enter a tip (**false**), or predefined tipping options to choose from (**true**). - /// - /// Indicates whether the terminal shows a prompt to enter a tip (**false**), or predefined tipping options to choose from (**true**). - [DataMember(Name = "usePredefinedTipEntries", EmitDefaultValue = false)] - public bool? UsePredefinedTipEntries { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Gratuity {\n"); - sb.Append(" AllowCustomAmount: ").Append(AllowCustomAmount).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" PredefinedTipEntries: ").Append(PredefinedTipEntries).Append("\n"); - sb.Append(" UsePredefinedTipEntries: ").Append(UsePredefinedTipEntries).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Gratuity); - } - - /// - /// Returns true if Gratuity instances are equal - /// - /// Instance of Gratuity to be compared - /// Boolean - public bool Equals(Gratuity input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowCustomAmount == input.AllowCustomAmount || - this.AllowCustomAmount.Equals(input.AllowCustomAmount) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.PredefinedTipEntries == input.PredefinedTipEntries || - this.PredefinedTipEntries != null && - input.PredefinedTipEntries != null && - this.PredefinedTipEntries.SequenceEqual(input.PredefinedTipEntries) - ) && - ( - this.UsePredefinedTipEntries == input.UsePredefinedTipEntries || - this.UsePredefinedTipEntries.Equals(input.UsePredefinedTipEntries) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AllowCustomAmount.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.PredefinedTipEntries != null) - { - hashCode = (hashCode * 59) + this.PredefinedTipEntries.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UsePredefinedTipEntries.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Hardware.cs b/Adyen/Model/Management/Hardware.cs deleted file mode 100644 index f1141397e..000000000 --- a/Adyen/Model/Management/Hardware.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Hardware - /// - [DataContract(Name = "Hardware")] - public partial class Hardware : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The brightness of the display when the terminal is being used, expressed as a percentage.. - /// The hour of the day when the terminal is set to reset the Totals report. By default, the reset hour is at 6:00 AM in the timezone of the terminal. Minimum value: 0, maximum value: 23.. - /// The hour of the day when the terminal is set to reboot to apply the configuration and software updates. By default, the restart hour is at 6:00 AM in the timezone of the terminal. Minimum value: 0, maximum value: 23.. - public Hardware(int? displayMaximumBackLight = default(int?), int? resetTotalsHour = default(int?), int? restartHour = default(int?)) - { - this.DisplayMaximumBackLight = displayMaximumBackLight; - this.ResetTotalsHour = resetTotalsHour; - this.RestartHour = restartHour; - } - - /// - /// The brightness of the display when the terminal is being used, expressed as a percentage. - /// - /// The brightness of the display when the terminal is being used, expressed as a percentage. - [DataMember(Name = "displayMaximumBackLight", EmitDefaultValue = false)] - public int? DisplayMaximumBackLight { get; set; } - - /// - /// The hour of the day when the terminal is set to reset the Totals report. By default, the reset hour is at 6:00 AM in the timezone of the terminal. Minimum value: 0, maximum value: 23. - /// - /// The hour of the day when the terminal is set to reset the Totals report. By default, the reset hour is at 6:00 AM in the timezone of the terminal. Minimum value: 0, maximum value: 23. - [DataMember(Name = "resetTotalsHour", EmitDefaultValue = false)] - public int? ResetTotalsHour { get; set; } - - /// - /// The hour of the day when the terminal is set to reboot to apply the configuration and software updates. By default, the restart hour is at 6:00 AM in the timezone of the terminal. Minimum value: 0, maximum value: 23. - /// - /// The hour of the day when the terminal is set to reboot to apply the configuration and software updates. By default, the restart hour is at 6:00 AM in the timezone of the terminal. Minimum value: 0, maximum value: 23. - [DataMember(Name = "restartHour", EmitDefaultValue = false)] - public int? RestartHour { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Hardware {\n"); - sb.Append(" DisplayMaximumBackLight: ").Append(DisplayMaximumBackLight).Append("\n"); - sb.Append(" ResetTotalsHour: ").Append(ResetTotalsHour).Append("\n"); - sb.Append(" RestartHour: ").Append(RestartHour).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Hardware); - } - - /// - /// Returns true if Hardware instances are equal - /// - /// Instance of Hardware to be compared - /// Boolean - public bool Equals(Hardware input) - { - if (input == null) - { - return false; - } - return - ( - this.DisplayMaximumBackLight == input.DisplayMaximumBackLight || - this.DisplayMaximumBackLight.Equals(input.DisplayMaximumBackLight) - ) && - ( - this.ResetTotalsHour == input.ResetTotalsHour || - this.ResetTotalsHour.Equals(input.ResetTotalsHour) - ) && - ( - this.RestartHour == input.RestartHour || - this.RestartHour.Equals(input.RestartHour) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.DisplayMaximumBackLight.GetHashCode(); - hashCode = (hashCode * 59) + this.ResetTotalsHour.GetHashCode(); - hashCode = (hashCode * 59) + this.RestartHour.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/IdName.cs b/Adyen/Model/Management/IdName.cs deleted file mode 100644 index 627cfdf71..000000000 --- a/Adyen/Model/Management/IdName.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// IdName - /// - [DataContract(Name = "IdName")] - public partial class IdName : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The identifier of the terminal model.. - /// The name of the terminal model.. - public IdName(string id = default(string), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// The identifier of the terminal model. - /// - /// The identifier of the terminal model. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The name of the terminal model. - /// - /// The name of the terminal model. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IdName {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IdName); - } - - /// - /// Returns true if IdName instances are equal - /// - /// Instance of IdName to be compared - /// Boolean - public bool Equals(IdName input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/InstallAndroidAppDetails.cs b/Adyen/Model/Management/InstallAndroidAppDetails.cs deleted file mode 100644 index 7c054b120..000000000 --- a/Adyen/Model/Management/InstallAndroidAppDetails.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// InstallAndroidAppDetails - /// - [DataContract(Name = "InstallAndroidAppDetails")] - public partial class InstallAndroidAppDetails : IEquatable, IValidatableObject - { - /// - /// Type of terminal action: Install an Android app. - /// - /// Type of terminal action: Install an Android app. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum InstallAndroidApp for value: InstallAndroidApp - /// - [EnumMember(Value = "InstallAndroidApp")] - InstallAndroidApp = 1 - - } - - - /// - /// Type of terminal action: Install an Android app. - /// - /// Type of terminal action: Install an Android app. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the app to be installed.. - /// Type of terminal action: Install an Android app. (default to TypeEnum.InstallAndroidApp). - public InstallAndroidAppDetails(string appId = default(string), TypeEnum? type = TypeEnum.InstallAndroidApp) - { - this.AppId = appId; - this.Type = type; - } - - /// - /// The unique identifier of the app to be installed. - /// - /// The unique identifier of the app to be installed. - [DataMember(Name = "appId", EmitDefaultValue = false)] - public string AppId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InstallAndroidAppDetails {\n"); - sb.Append(" AppId: ").Append(AppId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InstallAndroidAppDetails); - } - - /// - /// Returns true if InstallAndroidAppDetails instances are equal - /// - /// Instance of InstallAndroidAppDetails to be compared - /// Boolean - public bool Equals(InstallAndroidAppDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.AppId == input.AppId || - (this.AppId != null && - this.AppId.Equals(input.AppId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AppId != null) - { - hashCode = (hashCode * 59) + this.AppId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/InstallAndroidCertificateDetails.cs b/Adyen/Model/Management/InstallAndroidCertificateDetails.cs deleted file mode 100644 index f9a3890d1..000000000 --- a/Adyen/Model/Management/InstallAndroidCertificateDetails.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// InstallAndroidCertificateDetails - /// - [DataContract(Name = "InstallAndroidCertificateDetails")] - public partial class InstallAndroidCertificateDetails : IEquatable, IValidatableObject - { - /// - /// Type of terminal action: Install an Android certificate. - /// - /// Type of terminal action: Install an Android certificate. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum InstallAndroidCertificate for value: InstallAndroidCertificate - /// - [EnumMember(Value = "InstallAndroidCertificate")] - InstallAndroidCertificate = 1 - - } - - - /// - /// Type of terminal action: Install an Android certificate. - /// - /// Type of terminal action: Install an Android certificate. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the certificate to be installed.. - /// Type of terminal action: Install an Android certificate. (default to TypeEnum.InstallAndroidCertificate). - public InstallAndroidCertificateDetails(string certificateId = default(string), TypeEnum? type = TypeEnum.InstallAndroidCertificate) - { - this.CertificateId = certificateId; - this.Type = type; - } - - /// - /// The unique identifier of the certificate to be installed. - /// - /// The unique identifier of the certificate to be installed. - [DataMember(Name = "certificateId", EmitDefaultValue = false)] - public string CertificateId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InstallAndroidCertificateDetails {\n"); - sb.Append(" CertificateId: ").Append(CertificateId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InstallAndroidCertificateDetails); - } - - /// - /// Returns true if InstallAndroidCertificateDetails instances are equal - /// - /// Instance of InstallAndroidCertificateDetails to be compared - /// Boolean - public bool Equals(InstallAndroidCertificateDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CertificateId == input.CertificateId || - (this.CertificateId != null && - this.CertificateId.Equals(input.CertificateId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CertificateId != null) - { - hashCode = (hashCode * 59) + this.CertificateId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/InvalidField.cs b/Adyen/Model/Management/InvalidField.cs deleted file mode 100644 index 05139e4b8..000000000 --- a/Adyen/Model/Management/InvalidField.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// InvalidField - /// - [DataContract(Name = "InvalidField")] - public partial class InvalidField : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InvalidField() { } - /// - /// Initializes a new instance of the class. - /// - /// Description of the validation error. (required). - /// The field that has an invalid value. (required). - /// The invalid value. (required). - public InvalidField(string message = default(string), string name = default(string), string value = default(string)) - { - this.Message = message; - this.Name = name; - this.Value = value; - } - - /// - /// Description of the validation error. - /// - /// Description of the validation error. - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The field that has an invalid value. - /// - /// The field that has an invalid value. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The invalid value. - /// - /// The invalid value. - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InvalidField {\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InvalidField); - } - - /// - /// Returns true if InvalidField instances are equal - /// - /// Instance of InvalidField to be compared - /// Boolean - public bool Equals(InvalidField input) - { - if (input == null) - { - return false; - } - return - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/JCBInfo.cs b/Adyen/Model/Management/JCBInfo.cs deleted file mode 100644 index 98c8125f5..000000000 --- a/Adyen/Model/Management/JCBInfo.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// JCBInfo - /// - [DataContract(Name = "JCBInfo")] - public partial class JCBInfo : IEquatable, IValidatableObject - { - /// - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. - /// - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. - [JsonConverter(typeof(StringEnumConverter))] - public enum ServiceLevelEnum - { - /// - /// Enum NoContract for value: noContract - /// - [EnumMember(Value = "noContract")] - NoContract = 1, - - /// - /// Enum GatewayContract for value: gatewayContract - /// - [EnumMember(Value = "gatewayContract")] - GatewayContract = 2 - - } - - - /// - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. - /// - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly. - [DataMember(Name = "serviceLevel", EmitDefaultValue = false)] - public ServiceLevelEnum? ServiceLevel { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// MID (Merchant ID) number. Required for merchants operating in Japan.Format: 14 numeric characters.. - /// Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. The default value is **false**.For merchants operating in Japan, this field is required and must be set to **true**. (default to false). - /// Specifies the service level (settlement type) of this payment method. Required for merchants operating in Japan. Possible values: * **noContract**: Adyen holds the contract with JCB. * **gatewayContract**: JCB receives the settlement and handles disputes, then pays out to you or your sub-merchant directly.. - /// transactionDescription. - public JCBInfo(string midNumber = default(string), bool? reuseMidNumber = false, ServiceLevelEnum? serviceLevel = default(ServiceLevelEnum?), TransactionDescriptionInfo transactionDescription = default(TransactionDescriptionInfo)) - { - this.MidNumber = midNumber; - this.ReuseMidNumber = reuseMidNumber; - this.ServiceLevel = serviceLevel; - this.TransactionDescription = transactionDescription; - } - - /// - /// MID (Merchant ID) number. Required for merchants operating in Japan.Format: 14 numeric characters. - /// - /// MID (Merchant ID) number. Required for merchants operating in Japan.Format: 14 numeric characters. - [DataMember(Name = "midNumber", EmitDefaultValue = false)] - public string MidNumber { get; set; } - - /// - /// Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. The default value is **false**.For merchants operating in Japan, this field is required and must be set to **true**. - /// - /// Indicates whether the JCB Merchant ID is reused from a previously setup JCB payment method. The default value is **false**.For merchants operating in Japan, this field is required and must be set to **true**. - [DataMember(Name = "reuseMidNumber", EmitDefaultValue = false)] - public bool? ReuseMidNumber { get; set; } - - /// - /// Gets or Sets TransactionDescription - /// - [DataMember(Name = "transactionDescription", EmitDefaultValue = false)] - public TransactionDescriptionInfo TransactionDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class JCBInfo {\n"); - sb.Append(" MidNumber: ").Append(MidNumber).Append("\n"); - sb.Append(" ReuseMidNumber: ").Append(ReuseMidNumber).Append("\n"); - sb.Append(" ServiceLevel: ").Append(ServiceLevel).Append("\n"); - sb.Append(" TransactionDescription: ").Append(TransactionDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as JCBInfo); - } - - /// - /// Returns true if JCBInfo instances are equal - /// - /// Instance of JCBInfo to be compared - /// Boolean - public bool Equals(JCBInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.MidNumber == input.MidNumber || - (this.MidNumber != null && - this.MidNumber.Equals(input.MidNumber)) - ) && - ( - this.ReuseMidNumber == input.ReuseMidNumber || - this.ReuseMidNumber.Equals(input.ReuseMidNumber) - ) && - ( - this.ServiceLevel == input.ServiceLevel || - this.ServiceLevel.Equals(input.ServiceLevel) - ) && - ( - this.TransactionDescription == input.TransactionDescription || - (this.TransactionDescription != null && - this.TransactionDescription.Equals(input.TransactionDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MidNumber != null) - { - hashCode = (hashCode * 59) + this.MidNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ReuseMidNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.ServiceLevel.GetHashCode(); - if (this.TransactionDescription != null) - { - hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // MidNumber (string) maxLength - if (this.MidNumber != null && this.MidNumber.Length > 14) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for MidNumber, length must be less than 14.", new [] { "MidNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Key.cs b/Adyen/Model/Management/Key.cs deleted file mode 100644 index a112e0d77..000000000 --- a/Adyen/Model/Management/Key.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Key - /// - [DataContract(Name = "Key")] - public partial class Key : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the shared key.. - /// The secure passphrase to protect the shared key.. - /// The version number of the shared key.. - public Key(string identifier = default(string), string passphrase = default(string), int? version = default(int?)) - { - this.Identifier = identifier; - this.Passphrase = passphrase; - this.Version = version; - } - - /// - /// The unique identifier of the shared key. - /// - /// The unique identifier of the shared key. - [DataMember(Name = "identifier", EmitDefaultValue = false)] - public string Identifier { get; set; } - - /// - /// The secure passphrase to protect the shared key. - /// - /// The secure passphrase to protect the shared key. - [DataMember(Name = "passphrase", EmitDefaultValue = false)] - public string Passphrase { get; set; } - - /// - /// The version number of the shared key. - /// - /// The version number of the shared key. - [DataMember(Name = "version", EmitDefaultValue = false)] - public int? Version { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Key {\n"); - sb.Append(" Identifier: ").Append(Identifier).Append("\n"); - sb.Append(" Passphrase: ").Append(Passphrase).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Key); - } - - /// - /// Returns true if Key instances are equal - /// - /// Instance of Key to be compared - /// Boolean - public bool Equals(Key input) - { - if (input == null) - { - return false; - } - return - ( - this.Identifier == input.Identifier || - (this.Identifier != null && - this.Identifier.Equals(input.Identifier)) - ) && - ( - this.Passphrase == input.Passphrase || - (this.Passphrase != null && - this.Passphrase.Equals(input.Passphrase)) - ) && - ( - this.Version == input.Version || - this.Version.Equals(input.Version) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Identifier != null) - { - hashCode = (hashCode * 59) + this.Identifier.GetHashCode(); - } - if (this.Passphrase != null) - { - hashCode = (hashCode * 59) + this.Passphrase.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Version.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/KlarnaInfo.cs b/Adyen/Model/Management/KlarnaInfo.cs deleted file mode 100644 index e37c01e4d..000000000 --- a/Adyen/Model/Management/KlarnaInfo.cs +++ /dev/null @@ -1,216 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// KlarnaInfo - /// - [DataContract(Name = "KlarnaInfo")] - public partial class KlarnaInfo : IEquatable, IValidatableObject - { - /// - /// The region of operation. For example, **NA**, **EU**, **CH**, **AU**. - /// - /// The region of operation. For example, **NA**, **EU**, **CH**, **AU**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RegionEnum - { - /// - /// Enum NA for value: NA - /// - [EnumMember(Value = "NA")] - NA = 1, - - /// - /// Enum EU for value: EU - /// - [EnumMember(Value = "EU")] - EU = 2, - - /// - /// Enum CH for value: CH - /// - [EnumMember(Value = "CH")] - CH = 3, - - /// - /// Enum AU for value: AU - /// - [EnumMember(Value = "AU")] - AU = 4 - - } - - - /// - /// The region of operation. For example, **NA**, **EU**, **CH**, **AU**. - /// - /// The region of operation. For example, **NA**, **EU**, **CH**, **AU**. - [DataMember(Name = "region", IsRequired = false, EmitDefaultValue = false)] - public RegionEnum Region { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected KlarnaInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates the status of [Automatic capture](https://docs.adyen.com/online-payments/capture#automatic-capture). Default value: **false**.. - /// The email address for disputes. (required). - /// The region of operation. For example, **NA**, **EU**, **CH**, **AU**. (required). - /// The email address of merchant support. (required). - public KlarnaInfo(bool? autoCapture = default(bool?), string disputeEmail = default(string), RegionEnum region = default(RegionEnum), string supportEmail = default(string)) - { - this.DisputeEmail = disputeEmail; - this.Region = region; - this.SupportEmail = supportEmail; - this.AutoCapture = autoCapture; - } - - /// - /// Indicates the status of [Automatic capture](https://docs.adyen.com/online-payments/capture#automatic-capture). Default value: **false**. - /// - /// Indicates the status of [Automatic capture](https://docs.adyen.com/online-payments/capture#automatic-capture). Default value: **false**. - [DataMember(Name = "autoCapture", EmitDefaultValue = false)] - public bool? AutoCapture { get; set; } - - /// - /// The email address for disputes. - /// - /// The email address for disputes. - [DataMember(Name = "disputeEmail", IsRequired = false, EmitDefaultValue = false)] - public string DisputeEmail { get; set; } - - /// - /// The email address of merchant support. - /// - /// The email address of merchant support. - [DataMember(Name = "supportEmail", IsRequired = false, EmitDefaultValue = false)] - public string SupportEmail { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KlarnaInfo {\n"); - sb.Append(" AutoCapture: ").Append(AutoCapture).Append("\n"); - sb.Append(" DisputeEmail: ").Append(DisputeEmail).Append("\n"); - sb.Append(" Region: ").Append(Region).Append("\n"); - sb.Append(" SupportEmail: ").Append(SupportEmail).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KlarnaInfo); - } - - /// - /// Returns true if KlarnaInfo instances are equal - /// - /// Instance of KlarnaInfo to be compared - /// Boolean - public bool Equals(KlarnaInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AutoCapture == input.AutoCapture || - this.AutoCapture.Equals(input.AutoCapture) - ) && - ( - this.DisputeEmail == input.DisputeEmail || - (this.DisputeEmail != null && - this.DisputeEmail.Equals(input.DisputeEmail)) - ) && - ( - this.Region == input.Region || - this.Region.Equals(input.Region) - ) && - ( - this.SupportEmail == input.SupportEmail || - (this.SupportEmail != null && - this.SupportEmail.Equals(input.SupportEmail)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AutoCapture.GetHashCode(); - if (this.DisputeEmail != null) - { - hashCode = (hashCode * 59) + this.DisputeEmail.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Region.GetHashCode(); - if (this.SupportEmail != null) - { - hashCode = (hashCode * 59) + this.SupportEmail.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Links.cs b/Adyen/Model/Management/Links.cs deleted file mode 100644 index 2508c4147..000000000 --- a/Adyen/Model/Management/Links.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Links - /// - [DataContract(Name = "Links")] - public partial class Links : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Links() { } - /// - /// Initializes a new instance of the class. - /// - /// self (required). - public Links(LinksElement self = default(LinksElement)) - { - this.Self = self; - } - - /// - /// Gets or Sets Self - /// - [DataMember(Name = "self", IsRequired = false, EmitDefaultValue = false)] - public LinksElement Self { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Links {\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Links); - } - - /// - /// Returns true if Links instances are equal - /// - /// Instance of Links to be compared - /// Boolean - public bool Equals(Links input) - { - if (input == null) - { - return false; - } - return - ( - this.Self == input.Self || - (this.Self != null && - this.Self.Equals(input.Self)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Self != null) - { - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/LinksElement.cs b/Adyen/Model/Management/LinksElement.cs deleted file mode 100644 index 0e55c2df0..000000000 --- a/Adyen/Model/Management/LinksElement.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// LinksElement - /// - [DataContract(Name = "LinksElement")] - public partial class LinksElement : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// href. - public LinksElement(string href = default(string)) - { - this.Href = href; - } - - /// - /// Gets or Sets Href - /// - [DataMember(Name = "href", EmitDefaultValue = false)] - public string Href { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LinksElement {\n"); - sb.Append(" Href: ").Append(Href).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LinksElement); - } - - /// - /// Returns true if LinksElement instances are equal - /// - /// Instance of LinksElement to be compared - /// Boolean - public bool Equals(LinksElement input) - { - if (input == null) - { - return false; - } - return - ( - this.Href == input.Href || - (this.Href != null && - this.Href.Equals(input.Href)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Href != null) - { - hashCode = (hashCode * 59) + this.Href.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListCompanyApiCredentialsResponse.cs b/Adyen/Model/Management/ListCompanyApiCredentialsResponse.cs deleted file mode 100644 index e85bd091c..000000000 --- a/Adyen/Model/Management/ListCompanyApiCredentialsResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListCompanyApiCredentialsResponse - /// - [DataContract(Name = "ListCompanyApiCredentialsResponse")] - public partial class ListCompanyApiCredentialsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListCompanyApiCredentialsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of API credentials.. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListCompanyApiCredentialsResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// The list of API credentials. - /// - /// The list of API credentials. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListCompanyApiCredentialsResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListCompanyApiCredentialsResponse); - } - - /// - /// Returns true if ListCompanyApiCredentialsResponse instances are equal - /// - /// Instance of ListCompanyApiCredentialsResponse to be compared - /// Boolean - public bool Equals(ListCompanyApiCredentialsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListCompanyResponse.cs b/Adyen/Model/Management/ListCompanyResponse.cs deleted file mode 100644 index d006447b4..000000000 --- a/Adyen/Model/Management/ListCompanyResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListCompanyResponse - /// - [DataContract(Name = "ListCompanyResponse")] - public partial class ListCompanyResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListCompanyResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of companies.. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListCompanyResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// The list of companies. - /// - /// The list of companies. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListCompanyResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListCompanyResponse); - } - - /// - /// Returns true if ListCompanyResponse instances are equal - /// - /// Instance of ListCompanyResponse to be compared - /// Boolean - public bool Equals(ListCompanyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListCompanyUsersResponse.cs b/Adyen/Model/Management/ListCompanyUsersResponse.cs deleted file mode 100644 index c9c6b9cea..000000000 --- a/Adyen/Model/Management/ListCompanyUsersResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListCompanyUsersResponse - /// - [DataContract(Name = "ListCompanyUsersResponse")] - public partial class ListCompanyUsersResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListCompanyUsersResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of users.. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListCompanyUsersResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// The list of users. - /// - /// The list of users. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListCompanyUsersResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListCompanyUsersResponse); - } - - /// - /// Returns true if ListCompanyUsersResponse instances are equal - /// - /// Instance of ListCompanyUsersResponse to be compared - /// Boolean - public bool Equals(ListCompanyUsersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListExternalTerminalActionsResponse.cs b/Adyen/Model/Management/ListExternalTerminalActionsResponse.cs deleted file mode 100644 index 035e9d7f2..000000000 --- a/Adyen/Model/Management/ListExternalTerminalActionsResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListExternalTerminalActionsResponse - /// - [DataContract(Name = "ListExternalTerminalActionsResponse")] - public partial class ListExternalTerminalActionsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of terminal actions.. - public ListExternalTerminalActionsResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// The list of terminal actions. - /// - /// The list of terminal actions. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListExternalTerminalActionsResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListExternalTerminalActionsResponse); - } - - /// - /// Returns true if ListExternalTerminalActionsResponse instances are equal - /// - /// Instance of ListExternalTerminalActionsResponse to be compared - /// Boolean - public bool Equals(ListExternalTerminalActionsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListMerchantApiCredentialsResponse.cs b/Adyen/Model/Management/ListMerchantApiCredentialsResponse.cs deleted file mode 100644 index f982cc997..000000000 --- a/Adyen/Model/Management/ListMerchantApiCredentialsResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListMerchantApiCredentialsResponse - /// - [DataContract(Name = "ListMerchantApiCredentialsResponse")] - public partial class ListMerchantApiCredentialsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListMerchantApiCredentialsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of API credentials.. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListMerchantApiCredentialsResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// The list of API credentials. - /// - /// The list of API credentials. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListMerchantApiCredentialsResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListMerchantApiCredentialsResponse); - } - - /// - /// Returns true if ListMerchantApiCredentialsResponse instances are equal - /// - /// Instance of ListMerchantApiCredentialsResponse to be compared - /// Boolean - public bool Equals(ListMerchantApiCredentialsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListMerchantResponse.cs b/Adyen/Model/Management/ListMerchantResponse.cs deleted file mode 100644 index 2060e6075..000000000 --- a/Adyen/Model/Management/ListMerchantResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListMerchantResponse - /// - [DataContract(Name = "ListMerchantResponse")] - public partial class ListMerchantResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListMerchantResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of merchant accounts.. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListMerchantResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// The list of merchant accounts. - /// - /// The list of merchant accounts. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListMerchantResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListMerchantResponse); - } - - /// - /// Returns true if ListMerchantResponse instances are equal - /// - /// Instance of ListMerchantResponse to be compared - /// Boolean - public bool Equals(ListMerchantResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListMerchantUsersResponse.cs b/Adyen/Model/Management/ListMerchantUsersResponse.cs deleted file mode 100644 index 8106bf5cc..000000000 --- a/Adyen/Model/Management/ListMerchantUsersResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListMerchantUsersResponse - /// - [DataContract(Name = "ListMerchantUsersResponse")] - public partial class ListMerchantUsersResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListMerchantUsersResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of users.. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListMerchantUsersResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// The list of users. - /// - /// The list of users. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListMerchantUsersResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListMerchantUsersResponse); - } - - /// - /// Returns true if ListMerchantUsersResponse instances are equal - /// - /// Instance of ListMerchantUsersResponse to be compared - /// Boolean - public bool Equals(ListMerchantUsersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListStoresResponse.cs b/Adyen/Model/Management/ListStoresResponse.cs deleted file mode 100644 index 159e5cd54..000000000 --- a/Adyen/Model/Management/ListStoresResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListStoresResponse - /// - [DataContract(Name = "ListStoresResponse")] - public partial class ListStoresResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListStoresResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// List of stores. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListStoresResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// List of stores - /// - /// List of stores - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListStoresResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListStoresResponse); - } - - /// - /// Returns true if ListStoresResponse instances are equal - /// - /// Instance of ListStoresResponse to be compared - /// Boolean - public bool Equals(ListStoresResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListTerminalsResponse.cs b/Adyen/Model/Management/ListTerminalsResponse.cs deleted file mode 100644 index 6b86f7792..000000000 --- a/Adyen/Model/Management/ListTerminalsResponse.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListTerminalsResponse - /// - [DataContract(Name = "ListTerminalsResponse")] - public partial class ListTerminalsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListTerminalsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of terminals and their details.. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListTerminalsResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// The list of terminals and their details. - /// - /// The list of terminals and their details. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListTerminalsResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListTerminalsResponse); - } - - /// - /// Returns true if ListTerminalsResponse instances are equal - /// - /// Instance of ListTerminalsResponse to be compared - /// Boolean - public bool Equals(ListTerminalsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ListWebhooksResponse.cs b/Adyen/Model/Management/ListWebhooksResponse.cs deleted file mode 100644 index dbe93051a..000000000 --- a/Adyen/Model/Management/ListWebhooksResponse.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ListWebhooksResponse - /// - [DataContract(Name = "ListWebhooksResponse")] - public partial class ListWebhooksResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ListWebhooksResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Reference to the account.. - /// The list of webhooks configured for this account.. - /// Total number of items. (required). - /// Total number of pages. (required). - public ListWebhooksResponse(PaginationLinks links = default(PaginationLinks), string accountReference = default(string), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.AccountReference = accountReference; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// Reference to the account. - /// - /// Reference to the account. - [DataMember(Name = "accountReference", EmitDefaultValue = false)] - public string AccountReference { get; set; } - - /// - /// The list of webhooks configured for this account. - /// - /// The list of webhooks configured for this account. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ListWebhooksResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" AccountReference: ").Append(AccountReference).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ListWebhooksResponse); - } - - /// - /// Returns true if ListWebhooksResponse instances are equal - /// - /// Instance of ListWebhooksResponse to be compared - /// Boolean - public bool Equals(ListWebhooksResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.AccountReference == input.AccountReference || - (this.AccountReference != null && - this.AccountReference.Equals(input.AccountReference)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.AccountReference != null) - { - hashCode = (hashCode * 59) + this.AccountReference.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Localization.cs b/Adyen/Model/Management/Localization.cs deleted file mode 100644 index d21735cbd..000000000 --- a/Adyen/Model/Management/Localization.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Localization - /// - [DataContract(Name = "Localization")] - public partial class Localization : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Language of the terminal.. - /// Secondary language of the terminal.. - /// The time zone of the terminal.. - public Localization(string language = default(string), string secondaryLanguage = default(string), string timezone = default(string)) - { - this.Language = language; - this.SecondaryLanguage = secondaryLanguage; - this.Timezone = timezone; - } - - /// - /// Language of the terminal. - /// - /// Language of the terminal. - [DataMember(Name = "language", EmitDefaultValue = false)] - public string Language { get; set; } - - /// - /// Secondary language of the terminal. - /// - /// Secondary language of the terminal. - [DataMember(Name = "secondaryLanguage", EmitDefaultValue = false)] - public string SecondaryLanguage { get; set; } - - /// - /// The time zone of the terminal. - /// - /// The time zone of the terminal. - [DataMember(Name = "timezone", EmitDefaultValue = false)] - public string Timezone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Localization {\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" SecondaryLanguage: ").Append(SecondaryLanguage).Append("\n"); - sb.Append(" Timezone: ").Append(Timezone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Localization); - } - - /// - /// Returns true if Localization instances are equal - /// - /// Instance of Localization to be compared - /// Boolean - public bool Equals(Localization input) - { - if (input == null) - { - return false; - } - return - ( - this.Language == input.Language || - (this.Language != null && - this.Language.Equals(input.Language)) - ) && - ( - this.SecondaryLanguage == input.SecondaryLanguage || - (this.SecondaryLanguage != null && - this.SecondaryLanguage.Equals(input.SecondaryLanguage)) - ) && - ( - this.Timezone == input.Timezone || - (this.Timezone != null && - this.Timezone.Equals(input.Timezone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Language != null) - { - hashCode = (hashCode * 59) + this.Language.GetHashCode(); - } - if (this.SecondaryLanguage != null) - { - hashCode = (hashCode * 59) + this.SecondaryLanguage.GetHashCode(); - } - if (this.Timezone != null) - { - hashCode = (hashCode * 59) + this.Timezone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Logo.cs b/Adyen/Model/Management/Logo.cs deleted file mode 100644 index dc93939db..000000000 --- a/Adyen/Model/Management/Logo.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Logo - /// - [DataContract(Name = "Logo")] - public partial class Logo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The image file, converted to a Base64-encoded string, of the logo to be shown on the terminal.. - public Logo(string data = default(string)) - { - this.Data = data; - } - - /// - /// The image file, converted to a Base64-encoded string, of the logo to be shown on the terminal. - /// - /// The image file, converted to a Base64-encoded string, of the logo to be shown on the terminal. - [DataMember(Name = "data", EmitDefaultValue = false)] - public string Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Logo {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Logo); - } - - /// - /// Returns true if Logo instances are equal - /// - /// Instance of Logo to be compared - /// Boolean - public bool Equals(Logo input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Data (string) maxLength - if (this.Data != null && this.Data.Length > 350000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Data, length must be less than 350000.", new [] { "Data" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/MeApiCredential.cs b/Adyen/Model/Management/MeApiCredential.cs deleted file mode 100644 index 6af840d9a..000000000 --- a/Adyen/Model/Management/MeApiCredential.cs +++ /dev/null @@ -1,309 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// MeApiCredential - /// - [DataContract(Name = "MeApiCredential")] - public partial class MeApiCredential : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MeApiCredential() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. (required). - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. (required). - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential.. - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. (required). - /// Name of the company linked to the API credential.. - /// Description of the API credential.. - /// Unique identifier of the API credential. (required). - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. (required). - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. (required). - public MeApiCredential(ApiCredentialLinks links = default(ApiCredentialLinks), bool? active = default(bool?), List allowedIpAddresses = default(List), List allowedOrigins = default(List), string clientKey = default(string), string companyName = default(string), string description = default(string), string id = default(string), List roles = default(List), string username = default(string)) - { - this.Active = active; - this.AllowedIpAddresses = allowedIpAddresses; - this.ClientKey = clientKey; - this.Id = id; - this.Roles = roles; - this.Username = username; - this.Links = links; - this.AllowedOrigins = allowedOrigins; - this.CompanyName = companyName; - this.Description = description; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public ApiCredentialLinks Links { get; set; } - - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - /// - /// Indicates if the API credential is enabled. Must be set to **true** to use the credential in your integration. - [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - /// - /// List of IP addresses from which your client can make requests. If the list is empty, we allow requests from any IP. If the list is not empty and we get a request from an IP which is not on the list, you get a security error. - [DataMember(Name = "allowedIpAddresses", IsRequired = false, EmitDefaultValue = false)] - public List AllowedIpAddresses { get; set; } - - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - /// - /// List containing the [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) linked to the API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - /// - /// Public key used for [client-side authentication](https://docs.adyen.com/development-resources/client-side-authentication). The client key is required for Drop-in and Components integrations. - [DataMember(Name = "clientKey", IsRequired = false, EmitDefaultValue = false)] - public string ClientKey { get; set; } - - /// - /// Name of the company linked to the API credential. - /// - /// Name of the company linked to the API credential. - [DataMember(Name = "companyName", EmitDefaultValue = false)] - public string CompanyName { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Unique identifier of the API credential. - /// - /// Unique identifier of the API credential. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - /// - /// The name of the [API credential](https://docs.adyen.com/development-resources/api-credentials), for example **ws@Company.TestCompany**. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MeApiCredential {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AllowedIpAddresses: ").Append(AllowedIpAddresses).Append("\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" ClientKey: ").Append(ClientKey).Append("\n"); - sb.Append(" CompanyName: ").Append(CompanyName).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MeApiCredential); - } - - /// - /// Returns true if MeApiCredential instances are equal - /// - /// Instance of MeApiCredential to be compared - /// Boolean - public bool Equals(MeApiCredential input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AllowedIpAddresses == input.AllowedIpAddresses || - this.AllowedIpAddresses != null && - input.AllowedIpAddresses != null && - this.AllowedIpAddresses.SequenceEqual(input.AllowedIpAddresses) - ) && - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.ClientKey == input.ClientKey || - (this.ClientKey != null && - this.ClientKey.Equals(input.ClientKey)) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AllowedIpAddresses != null) - { - hashCode = (hashCode * 59) + this.AllowedIpAddresses.GetHashCode(); - } - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.ClientKey != null) - { - hashCode = (hashCode * 59) + this.ClientKey.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 50) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 50.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/MealVoucherFRInfo.cs b/Adyen/Model/Management/MealVoucherFRInfo.cs deleted file mode 100644 index c2d5e1bad..000000000 --- a/Adyen/Model/Management/MealVoucherFRInfo.cs +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// MealVoucherFRInfo - /// - [DataContract(Name = "MealVoucherFRInfo")] - public partial class MealVoucherFRInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MealVoucherFRInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Meal Voucher conecsId. Format: digits only (required). - /// Meal Voucher siret. Format: 14 digits. (required). - /// The list of additional payment methods. Allowed values: **mealVoucher_FR_edenred**, **mealVoucher_FR_groupeup**, **mealVoucher_FR_natixis**, **mealVoucher_FR_sodexo**. (required). - public MealVoucherFRInfo(string conecsId = default(string), string siret = default(string), List subTypes = default(List)) - { - this.ConecsId = conecsId; - this.Siret = siret; - this.SubTypes = subTypes; - } - - /// - /// Meal Voucher conecsId. Format: digits only - /// - /// Meal Voucher conecsId. Format: digits only - [DataMember(Name = "conecsId", IsRequired = false, EmitDefaultValue = false)] - public string ConecsId { get; set; } - - /// - /// Meal Voucher siret. Format: 14 digits. - /// - /// Meal Voucher siret. Format: 14 digits. - [DataMember(Name = "siret", IsRequired = false, EmitDefaultValue = false)] - public string Siret { get; set; } - - /// - /// The list of additional payment methods. Allowed values: **mealVoucher_FR_edenred**, **mealVoucher_FR_groupeup**, **mealVoucher_FR_natixis**, **mealVoucher_FR_sodexo**. - /// - /// The list of additional payment methods. Allowed values: **mealVoucher_FR_edenred**, **mealVoucher_FR_groupeup**, **mealVoucher_FR_natixis**, **mealVoucher_FR_sodexo**. - [DataMember(Name = "subTypes", IsRequired = false, EmitDefaultValue = false)] - public List SubTypes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MealVoucherFRInfo {\n"); - sb.Append(" ConecsId: ").Append(ConecsId).Append("\n"); - sb.Append(" Siret: ").Append(Siret).Append("\n"); - sb.Append(" SubTypes: ").Append(SubTypes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MealVoucherFRInfo); - } - - /// - /// Returns true if MealVoucherFRInfo instances are equal - /// - /// Instance of MealVoucherFRInfo to be compared - /// Boolean - public bool Equals(MealVoucherFRInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ConecsId == input.ConecsId || - (this.ConecsId != null && - this.ConecsId.Equals(input.ConecsId)) - ) && - ( - this.Siret == input.Siret || - (this.Siret != null && - this.Siret.Equals(input.Siret)) - ) && - ( - this.SubTypes == input.SubTypes || - this.SubTypes != null && - input.SubTypes != null && - this.SubTypes.SequenceEqual(input.SubTypes) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ConecsId != null) - { - hashCode = (hashCode * 59) + this.ConecsId.GetHashCode(); - } - if (this.Siret != null) - { - hashCode = (hashCode * 59) + this.Siret.GetHashCode(); - } - if (this.SubTypes != null) - { - hashCode = (hashCode * 59) + this.SubTypes.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Siret (string) maxLength - if (this.Siret != null && this.Siret.Length > 14) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Siret, length must be less than 14.", new [] { "Siret" }); - } - - // Siret (string) minLength - if (this.Siret != null && this.Siret.Length < 14) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Siret, length must be greater than 14.", new [] { "Siret" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Merchant.cs b/Adyen/Model/Management/Merchant.cs deleted file mode 100644 index d808f9a8d..000000000 --- a/Adyen/Model/Management/Merchant.cs +++ /dev/null @@ -1,376 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Merchant - /// - [DataContract(Name = "Merchant")] - public partial class Merchant : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The [capture delay](https://docs.adyen.com/online-payments/capture#capture-delay) set for the merchant account. Possible values: * **Immediate** * **Manual** * Number of days from **1** to **29**. - /// The unique identifier of the company account this merchant belongs to. - /// List of available data centers. Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers.. - /// The default [`shopperInteraction`](https://docs.adyen.com/api-explorer/#/CheckoutService/v68/post/payments__reqParam_shopperInteraction) value used when processing payments through this merchant account.. - /// Your description for the merchant account, maximum 300 characters. - /// The unique identifier of the merchant account.. - /// The city where the legal entity of this merchant account is registered.. - /// The name of the legal entity associated with the merchant account.. - /// Only applies to merchant accounts managed by Adyen's partners. The name of the pricing plan assigned to the merchant account.. - /// The currency of the country where the legal entity of this merchant account is registered. Format: [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, a legal entity based in the United States has USD as the primary settlement currency.. - /// Reference of the merchant account.. - /// The URL for the ecommerce website used with this merchant account.. - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. You cannot process new payments but you can still modify payments, for example issue refunds. You can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled.. - public Merchant(MerchantLinks links = default(MerchantLinks), string captureDelay = default(string), string companyId = default(string), List dataCenters = default(List), string defaultShopperInteraction = default(string), string description = default(string), string id = default(string), string merchantCity = default(string), string name = default(string), string pricingPlan = default(string), string primarySettlementCurrency = default(string), string reference = default(string), string shopWebAddress = default(string), string status = default(string)) - { - this.Links = links; - this.CaptureDelay = captureDelay; - this.CompanyId = companyId; - this.DataCenters = dataCenters; - this.DefaultShopperInteraction = defaultShopperInteraction; - this.Description = description; - this.Id = id; - this.MerchantCity = merchantCity; - this.Name = name; - this.PricingPlan = pricingPlan; - this.PrimarySettlementCurrency = primarySettlementCurrency; - this.Reference = reference; - this.ShopWebAddress = shopWebAddress; - this.Status = status; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public MerchantLinks Links { get; set; } - - /// - /// The [capture delay](https://docs.adyen.com/online-payments/capture#capture-delay) set for the merchant account. Possible values: * **Immediate** * **Manual** * Number of days from **1** to **29** - /// - /// The [capture delay](https://docs.adyen.com/online-payments/capture#capture-delay) set for the merchant account. Possible values: * **Immediate** * **Manual** * Number of days from **1** to **29** - [DataMember(Name = "captureDelay", EmitDefaultValue = false)] - public string CaptureDelay { get; set; } - - /// - /// The unique identifier of the company account this merchant belongs to - /// - /// The unique identifier of the company account this merchant belongs to - [DataMember(Name = "companyId", EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// List of available data centers. Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers. - /// - /// List of available data centers. Adyen has several data centers around the world.In the URL that you use for making API requests, we recommend you use the live URL prefix from the data center closest to your shoppers. - [DataMember(Name = "dataCenters", EmitDefaultValue = false)] - public List DataCenters { get; set; } - - /// - /// The default [`shopperInteraction`](https://docs.adyen.com/api-explorer/#/CheckoutService/v68/post/payments__reqParam_shopperInteraction) value used when processing payments through this merchant account. - /// - /// The default [`shopperInteraction`](https://docs.adyen.com/api-explorer/#/CheckoutService/v68/post/payments__reqParam_shopperInteraction) value used when processing payments through this merchant account. - [DataMember(Name = "defaultShopperInteraction", EmitDefaultValue = false)] - public string DefaultShopperInteraction { get; set; } - - /// - /// Your description for the merchant account, maximum 300 characters - /// - /// Your description for the merchant account, maximum 300 characters - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the merchant account. - /// - /// The unique identifier of the merchant account. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The city where the legal entity of this merchant account is registered. - /// - /// The city where the legal entity of this merchant account is registered. - [DataMember(Name = "merchantCity", EmitDefaultValue = false)] - public string MerchantCity { get; set; } - - /// - /// The name of the legal entity associated with the merchant account. - /// - /// The name of the legal entity associated with the merchant account. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Only applies to merchant accounts managed by Adyen's partners. The name of the pricing plan assigned to the merchant account. - /// - /// Only applies to merchant accounts managed by Adyen's partners. The name of the pricing plan assigned to the merchant account. - [DataMember(Name = "pricingPlan", EmitDefaultValue = false)] - public string PricingPlan { get; set; } - - /// - /// The currency of the country where the legal entity of this merchant account is registered. Format: [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, a legal entity based in the United States has USD as the primary settlement currency. - /// - /// The currency of the country where the legal entity of this merchant account is registered. Format: [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). For example, a legal entity based in the United States has USD as the primary settlement currency. - [DataMember(Name = "primarySettlementCurrency", EmitDefaultValue = false)] - public string PrimarySettlementCurrency { get; set; } - - /// - /// Reference of the merchant account. - /// - /// Reference of the merchant account. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The URL for the ecommerce website used with this merchant account. - /// - /// The URL for the ecommerce website used with this merchant account. - [DataMember(Name = "shopWebAddress", EmitDefaultValue = false)] - public string ShopWebAddress { get; set; } - - /// - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. You cannot process new payments but you can still modify payments, for example issue refunds. You can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. - /// - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. You cannot process new payments but you can still modify payments, for example issue refunds. You can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Merchant {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" CaptureDelay: ").Append(CaptureDelay).Append("\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" DataCenters: ").Append(DataCenters).Append("\n"); - sb.Append(" DefaultShopperInteraction: ").Append(DefaultShopperInteraction).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MerchantCity: ").Append(MerchantCity).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PricingPlan: ").Append(PricingPlan).Append("\n"); - sb.Append(" PrimarySettlementCurrency: ").Append(PrimarySettlementCurrency).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopWebAddress: ").Append(ShopWebAddress).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Merchant); - } - - /// - /// Returns true if Merchant instances are equal - /// - /// Instance of Merchant to be compared - /// Boolean - public bool Equals(Merchant input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.CaptureDelay == input.CaptureDelay || - (this.CaptureDelay != null && - this.CaptureDelay.Equals(input.CaptureDelay)) - ) && - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.DataCenters == input.DataCenters || - this.DataCenters != null && - input.DataCenters != null && - this.DataCenters.SequenceEqual(input.DataCenters) - ) && - ( - this.DefaultShopperInteraction == input.DefaultShopperInteraction || - (this.DefaultShopperInteraction != null && - this.DefaultShopperInteraction.Equals(input.DefaultShopperInteraction)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.MerchantCity == input.MerchantCity || - (this.MerchantCity != null && - this.MerchantCity.Equals(input.MerchantCity)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PricingPlan == input.PricingPlan || - (this.PricingPlan != null && - this.PricingPlan.Equals(input.PricingPlan)) - ) && - ( - this.PrimarySettlementCurrency == input.PrimarySettlementCurrency || - (this.PrimarySettlementCurrency != null && - this.PrimarySettlementCurrency.Equals(input.PrimarySettlementCurrency)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopWebAddress == input.ShopWebAddress || - (this.ShopWebAddress != null && - this.ShopWebAddress.Equals(input.ShopWebAddress)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.CaptureDelay != null) - { - hashCode = (hashCode * 59) + this.CaptureDelay.GetHashCode(); - } - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - if (this.DataCenters != null) - { - hashCode = (hashCode * 59) + this.DataCenters.GetHashCode(); - } - if (this.DefaultShopperInteraction != null) - { - hashCode = (hashCode * 59) + this.DefaultShopperInteraction.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.MerchantCity != null) - { - hashCode = (hashCode * 59) + this.MerchantCity.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PricingPlan != null) - { - hashCode = (hashCode * 59) + this.PricingPlan.GetHashCode(); - } - if (this.PrimarySettlementCurrency != null) - { - hashCode = (hashCode * 59) + this.PrimarySettlementCurrency.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ShopWebAddress != null) - { - hashCode = (hashCode * 59) + this.ShopWebAddress.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/MerchantLinks.cs b/Adyen/Model/Management/MerchantLinks.cs deleted file mode 100644 index 51d9a4ede..000000000 --- a/Adyen/Model/Management/MerchantLinks.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// MerchantLinks - /// - [DataContract(Name = "MerchantLinks")] - public partial class MerchantLinks : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MerchantLinks() { } - /// - /// Initializes a new instance of the class. - /// - /// apiCredentials. - /// self (required). - /// users. - /// webhooks. - public MerchantLinks(LinksElement apiCredentials = default(LinksElement), LinksElement self = default(LinksElement), LinksElement users = default(LinksElement), LinksElement webhooks = default(LinksElement)) - { - this.Self = self; - this.ApiCredentials = apiCredentials; - this.Users = users; - this.Webhooks = webhooks; - } - - /// - /// Gets or Sets ApiCredentials - /// - [DataMember(Name = "apiCredentials", EmitDefaultValue = false)] - public LinksElement ApiCredentials { get; set; } - - /// - /// Gets or Sets Self - /// - [DataMember(Name = "self", IsRequired = false, EmitDefaultValue = false)] - public LinksElement Self { get; set; } - - /// - /// Gets or Sets Users - /// - [DataMember(Name = "users", EmitDefaultValue = false)] - public LinksElement Users { get; set; } - - /// - /// Gets or Sets Webhooks - /// - [DataMember(Name = "webhooks", EmitDefaultValue = false)] - public LinksElement Webhooks { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantLinks {\n"); - sb.Append(" ApiCredentials: ").Append(ApiCredentials).Append("\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append(" Users: ").Append(Users).Append("\n"); - sb.Append(" Webhooks: ").Append(Webhooks).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantLinks); - } - - /// - /// Returns true if MerchantLinks instances are equal - /// - /// Instance of MerchantLinks to be compared - /// Boolean - public bool Equals(MerchantLinks input) - { - if (input == null) - { - return false; - } - return - ( - this.ApiCredentials == input.ApiCredentials || - (this.ApiCredentials != null && - this.ApiCredentials.Equals(input.ApiCredentials)) - ) && - ( - this.Self == input.Self || - (this.Self != null && - this.Self.Equals(input.Self)) - ) && - ( - this.Users == input.Users || - (this.Users != null && - this.Users.Equals(input.Users)) - ) && - ( - this.Webhooks == input.Webhooks || - (this.Webhooks != null && - this.Webhooks.Equals(input.Webhooks)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ApiCredentials != null) - { - hashCode = (hashCode * 59) + this.ApiCredentials.GetHashCode(); - } - if (this.Self != null) - { - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - } - if (this.Users != null) - { - hashCode = (hashCode * 59) + this.Users.GetHashCode(); - } - if (this.Webhooks != null) - { - hashCode = (hashCode * 59) + this.Webhooks.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/MinorUnitsMonetaryValue.cs b/Adyen/Model/Management/MinorUnitsMonetaryValue.cs deleted file mode 100644 index 0f2ded7ed..000000000 --- a/Adyen/Model/Management/MinorUnitsMonetaryValue.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// MinorUnitsMonetaryValue - /// - [DataContract(Name = "MinorUnitsMonetaryValue")] - public partial class MinorUnitsMonetaryValue : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The transaction amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes).. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).. - public MinorUnitsMonetaryValue(int? amount = default(int?), string currencyCode = default(string)) - { - this.Amount = amount; - this.CurrencyCode = currencyCode; - } - - /// - /// The transaction amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The transaction amount, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "amount", EmitDefaultValue = false)] - public int? Amount { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currencyCode", EmitDefaultValue = false)] - public string CurrencyCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MinorUnitsMonetaryValue {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MinorUnitsMonetaryValue); - } - - /// - /// Returns true if MinorUnitsMonetaryValue instances are equal - /// - /// Instance of MinorUnitsMonetaryValue to be compared - /// Boolean - public bool Equals(MinorUnitsMonetaryValue input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.CurrencyCode != null) - { - hashCode = (hashCode * 59) + this.CurrencyCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ModelConfiguration.cs b/Adyen/Model/Management/ModelConfiguration.cs deleted file mode 100644 index 03c8922ca..000000000 --- a/Adyen/Model/Management/ModelConfiguration.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ModelConfiguration - /// - [DataContract(Name = "_Configuration")] - public partial class ModelConfiguration : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ModelConfiguration() { } - /// - /// Initializes a new instance of the class. - /// - /// Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). (required). - /// Set to **true** to apply surcharges only to commercial/business cards.. - /// The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region.. - /// Currency and percentage or amount of the surcharge. (required). - /// Funding source. Possible values: * **Credit** * **Debit**. - public ModelConfiguration(string brand = default(string), bool? commercial = default(bool?), List country = default(List), List currencies = default(List), List sources = default(List)) - { - this.Brand = brand; - this.Currencies = currencies; - this.Commercial = commercial; - this.Country = country; - this.Sources = sources; - } - - /// - /// Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - /// - /// Payment method, like **eftpos_australia** or **mc**. See the [possible values](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - [DataMember(Name = "brand", IsRequired = false, EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// Set to **true** to apply surcharges only to commercial/business cards. - /// - /// Set to **true** to apply surcharges only to commercial/business cards. - [DataMember(Name = "commercial", EmitDefaultValue = false)] - public bool? Commercial { get; set; } - - /// - /// The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region. - /// - /// The country/region of the card issuer. If used, the surcharge settings only apply to the card issued in that country/region. - [DataMember(Name = "country", EmitDefaultValue = false)] - public List Country { get; set; } - - /// - /// Currency and percentage or amount of the surcharge. - /// - /// Currency and percentage or amount of the surcharge. - [DataMember(Name = "currencies", IsRequired = false, EmitDefaultValue = false)] - public List Currencies { get; set; } - - /// - /// Funding source. Possible values: * **Credit** * **Debit** - /// - /// Funding source. Possible values: * **Credit** * **Debit** - [DataMember(Name = "sources", EmitDefaultValue = false)] - public List Sources { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ModelConfiguration {\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" Commercial: ").Append(Commercial).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Currencies: ").Append(Currencies).Append("\n"); - sb.Append(" Sources: ").Append(Sources).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModelConfiguration); - } - - /// - /// Returns true if ModelConfiguration instances are equal - /// - /// Instance of ModelConfiguration to be compared - /// Boolean - public bool Equals(ModelConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Commercial == input.Commercial || - this.Commercial.Equals(input.Commercial) - ) && - ( - this.Country == input.Country || - this.Country != null && - input.Country != null && - this.Country.SequenceEqual(input.Country) - ) && - ( - this.Currencies == input.Currencies || - this.Currencies != null && - input.Currencies != null && - this.Currencies.SequenceEqual(input.Currencies) - ) && - ( - this.Sources == input.Sources || - this.Sources != null && - input.Sources != null && - this.Sources.SequenceEqual(input.Sources) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Commercial.GetHashCode(); - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Currencies != null) - { - hashCode = (hashCode * 59) + this.Currencies.GetHashCode(); - } - if (this.Sources != null) - { - hashCode = (hashCode * 59) + this.Sources.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Name.cs b/Adyen/Model/Management/Name.cs deleted file mode 100644 index be2ca717f..000000000 --- a/Adyen/Model/Management/Name.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Name - /// - [DataContract(Name = "Name")] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// The first name. (required). - /// The last name. (required). - public Name(string firstName = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Name2.cs b/Adyen/Model/Management/Name2.cs deleted file mode 100644 index 3516997e0..000000000 --- a/Adyen/Model/Management/Name2.cs +++ /dev/null @@ -1,160 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Name2 - /// - [DataContract(Name = "Name2")] - public partial class Name2 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The first name.. - /// The last name.. - public Name2(string firstName = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Name2 {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name2); - } - - /// - /// Returns true if Name2 instances are equal - /// - /// Instance of Name2 to be compared - /// Boolean - public bool Equals(Name2 input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Nexo.cs b/Adyen/Model/Management/Nexo.cs deleted file mode 100644 index 324ea6022..000000000 --- a/Adyen/Model/Management/Nexo.cs +++ /dev/null @@ -1,203 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Nexo - /// - [DataContract(Name = "Nexo")] - public partial class Nexo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// displayUrls. - /// encryptionKey. - /// eventUrls. - /// One or more URLs to send event messages to when using Terminal API.. - /// notification. - public Nexo(NotificationUrl displayUrls = default(NotificationUrl), Key encryptionKey = default(Key), EventUrl eventUrls = default(EventUrl), List nexoEventUrls = default(List), Notification notification = default(Notification)) - { - this.DisplayUrls = displayUrls; - this.EncryptionKey = encryptionKey; - this.EventUrls = eventUrls; - this.NexoEventUrls = nexoEventUrls; - this.Notification = notification; - } - - /// - /// Gets or Sets DisplayUrls - /// - [DataMember(Name = "displayUrls", EmitDefaultValue = false)] - public NotificationUrl DisplayUrls { get; set; } - - /// - /// Gets or Sets EncryptionKey - /// - [DataMember(Name = "encryptionKey", EmitDefaultValue = false)] - public Key EncryptionKey { get; set; } - - /// - /// Gets or Sets EventUrls - /// - [DataMember(Name = "eventUrls", EmitDefaultValue = false)] - public EventUrl EventUrls { get; set; } - - /// - /// One or more URLs to send event messages to when using Terminal API. - /// - /// One or more URLs to send event messages to when using Terminal API. - [DataMember(Name = "nexoEventUrls", EmitDefaultValue = false)] - [Obsolete("Deprecated since Management API v1. Use `eventUrls` instead.")] - public List NexoEventUrls { get; set; } - - /// - /// Gets or Sets Notification - /// - [DataMember(Name = "notification", EmitDefaultValue = false)] - public Notification Notification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Nexo {\n"); - sb.Append(" DisplayUrls: ").Append(DisplayUrls).Append("\n"); - sb.Append(" EncryptionKey: ").Append(EncryptionKey).Append("\n"); - sb.Append(" EventUrls: ").Append(EventUrls).Append("\n"); - sb.Append(" NexoEventUrls: ").Append(NexoEventUrls).Append("\n"); - sb.Append(" Notification: ").Append(Notification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Nexo); - } - - /// - /// Returns true if Nexo instances are equal - /// - /// Instance of Nexo to be compared - /// Boolean - public bool Equals(Nexo input) - { - if (input == null) - { - return false; - } - return - ( - this.DisplayUrls == input.DisplayUrls || - (this.DisplayUrls != null && - this.DisplayUrls.Equals(input.DisplayUrls)) - ) && - ( - this.EncryptionKey == input.EncryptionKey || - (this.EncryptionKey != null && - this.EncryptionKey.Equals(input.EncryptionKey)) - ) && - ( - this.EventUrls == input.EventUrls || - (this.EventUrls != null && - this.EventUrls.Equals(input.EventUrls)) - ) && - ( - this.NexoEventUrls == input.NexoEventUrls || - this.NexoEventUrls != null && - input.NexoEventUrls != null && - this.NexoEventUrls.SequenceEqual(input.NexoEventUrls) - ) && - ( - this.Notification == input.Notification || - (this.Notification != null && - this.Notification.Equals(input.Notification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisplayUrls != null) - { - hashCode = (hashCode * 59) + this.DisplayUrls.GetHashCode(); - } - if (this.EncryptionKey != null) - { - hashCode = (hashCode * 59) + this.EncryptionKey.GetHashCode(); - } - if (this.EventUrls != null) - { - hashCode = (hashCode * 59) + this.EventUrls.GetHashCode(); - } - if (this.NexoEventUrls != null) - { - hashCode = (hashCode * 59) + this.NexoEventUrls.GetHashCode(); - } - if (this.Notification != null) - { - hashCode = (hashCode * 59) + this.Notification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Notification.cs b/Adyen/Model/Management/Notification.cs deleted file mode 100644 index 9789da044..000000000 --- a/Adyen/Model/Management/Notification.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Notification - /// - [DataContract(Name = "Notification")] - public partial class Notification : IEquatable, IValidatableObject - { - /// - /// The type of event notification sent when you select the notification button. - /// - /// The type of event notification sent when you select the notification button. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum SaleWakeUp for value: SaleWakeUp - /// - [EnumMember(Value = "SaleWakeUp")] - SaleWakeUp = 1, - - /// - /// Enum KeyPressed for value: KeyPressed - /// - [EnumMember(Value = "KeyPressed")] - KeyPressed = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - - /// - /// The type of event notification sent when you select the notification button. - /// - /// The type of event notification sent when you select the notification button. - [DataMember(Name = "category", EmitDefaultValue = false)] - public CategoryEnum? Category { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of event notification sent when you select the notification button.. - /// The text shown in the prompt which opens when you select the notification button. For example, the description of the input box for pay-at-table.. - /// Enables sending event notifications either by pressing the Confirm key on terminals with a keypad or by tapping the event notification button on the terminal screen.. - /// Shows or hides the event notification button on the screen of terminal models that have a keypad.. - /// The name of the notification button on the terminal screen.. - public Notification(CategoryEnum? category = default(CategoryEnum?), string details = default(string), bool? enabled = default(bool?), bool? showButton = default(bool?), string title = default(string)) - { - this.Category = category; - this.Details = details; - this.Enabled = enabled; - this.ShowButton = showButton; - this.Title = title; - } - - /// - /// The text shown in the prompt which opens when you select the notification button. For example, the description of the input box for pay-at-table. - /// - /// The text shown in the prompt which opens when you select the notification button. For example, the description of the input box for pay-at-table. - [DataMember(Name = "details", EmitDefaultValue = false)] - public string Details { get; set; } - - /// - /// Enables sending event notifications either by pressing the Confirm key on terminals with a keypad or by tapping the event notification button on the terminal screen. - /// - /// Enables sending event notifications either by pressing the Confirm key on terminals with a keypad or by tapping the event notification button on the terminal screen. - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// Shows or hides the event notification button on the screen of terminal models that have a keypad. - /// - /// Shows or hides the event notification button on the screen of terminal models that have a keypad. - [DataMember(Name = "showButton", EmitDefaultValue = false)] - public bool? ShowButton { get; set; } - - /// - /// The name of the notification button on the terminal screen. - /// - /// The name of the notification button on the terminal screen. - [DataMember(Name = "title", EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Notification {\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Details: ").Append(Details).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" ShowButton: ").Append(ShowButton).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Notification); - } - - /// - /// Returns true if Notification instances are equal - /// - /// Instance of Notification to be compared - /// Boolean - public bool Equals(Notification input) - { - if (input == null) - { - return false; - } - return - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Details == input.Details || - (this.Details != null && - this.Details.Equals(input.Details)) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.ShowButton == input.ShowButton || - this.ShowButton.Equals(input.ShowButton) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - hashCode = (hashCode * 59) + this.ShowButton.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/NotificationUrl.cs b/Adyen/Model/Management/NotificationUrl.cs deleted file mode 100644 index 422eb5442..000000000 --- a/Adyen/Model/Management/NotificationUrl.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// NotificationUrl - /// - [DataContract(Name = "NotificationUrl")] - public partial class NotificationUrl : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// One or more local URLs to send notifications to when using Terminal API.. - /// One or more public URLs to send notifications to when using Terminal API.. - public NotificationUrl(List localUrls = default(List), List publicUrls = default(List)) - { - this.LocalUrls = localUrls; - this.PublicUrls = publicUrls; - } - - /// - /// One or more local URLs to send notifications to when using Terminal API. - /// - /// One or more local URLs to send notifications to when using Terminal API. - [DataMember(Name = "localUrls", EmitDefaultValue = false)] - public List LocalUrls { get; set; } - - /// - /// One or more public URLs to send notifications to when using Terminal API. - /// - /// One or more public URLs to send notifications to when using Terminal API. - [DataMember(Name = "publicUrls", EmitDefaultValue = false)] - public List PublicUrls { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NotificationUrl {\n"); - sb.Append(" LocalUrls: ").Append(LocalUrls).Append("\n"); - sb.Append(" PublicUrls: ").Append(PublicUrls).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotificationUrl); - } - - /// - /// Returns true if NotificationUrl instances are equal - /// - /// Instance of NotificationUrl to be compared - /// Boolean - public bool Equals(NotificationUrl input) - { - if (input == null) - { - return false; - } - return - ( - this.LocalUrls == input.LocalUrls || - this.LocalUrls != null && - input.LocalUrls != null && - this.LocalUrls.SequenceEqual(input.LocalUrls) - ) && - ( - this.PublicUrls == input.PublicUrls || - this.PublicUrls != null && - input.PublicUrls != null && - this.PublicUrls.SequenceEqual(input.PublicUrls) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LocalUrls != null) - { - hashCode = (hashCode * 59) + this.LocalUrls.GetHashCode(); - } - if (this.PublicUrls != null) - { - hashCode = (hashCode * 59) + this.PublicUrls.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/NyceInfo.cs b/Adyen/Model/Management/NyceInfo.cs deleted file mode 100644 index 78ecbf3bf..000000000 --- a/Adyen/Model/Management/NyceInfo.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// NyceInfo - /// - [DataContract(Name = "NyceInfo")] - public partial class NyceInfo : IEquatable, IValidatableObject - { - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ProcessingTypeEnum - { - /// - /// Enum Billpay for value: billpay - /// - [EnumMember(Value = "billpay")] - Billpay = 1, - - /// - /// Enum Ecom for value: ecom - /// - [EnumMember(Value = "ecom")] - Ecom = 2, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 3 - - } - - - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - [DataMember(Name = "processingType", IsRequired = false, EmitDefaultValue = false)] - public ProcessingTypeEnum ProcessingType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NyceInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. (required). - /// transactionDescription. - public NyceInfo(ProcessingTypeEnum processingType = default(ProcessingTypeEnum), TransactionDescriptionInfo transactionDescription = default(TransactionDescriptionInfo)) - { - this.ProcessingType = processingType; - this.TransactionDescription = transactionDescription; - } - - /// - /// Gets or Sets TransactionDescription - /// - [DataMember(Name = "transactionDescription", EmitDefaultValue = false)] - public TransactionDescriptionInfo TransactionDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NyceInfo {\n"); - sb.Append(" ProcessingType: ").Append(ProcessingType).Append("\n"); - sb.Append(" TransactionDescription: ").Append(TransactionDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NyceInfo); - } - - /// - /// Returns true if NyceInfo instances are equal - /// - /// Instance of NyceInfo to be compared - /// Boolean - public bool Equals(NyceInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ProcessingType == input.ProcessingType || - this.ProcessingType.Equals(input.ProcessingType) - ) && - ( - this.TransactionDescription == input.TransactionDescription || - (this.TransactionDescription != null && - this.TransactionDescription.Equals(input.TransactionDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ProcessingType.GetHashCode(); - if (this.TransactionDescription != null) - { - hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/OfflineProcessing.cs b/Adyen/Model/Management/OfflineProcessing.cs deleted file mode 100644 index 4845ed012..000000000 --- a/Adyen/Model/Management/OfflineProcessing.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// OfflineProcessing - /// - [DataContract(Name = "OfflineProcessing")] - public partial class OfflineProcessing : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The maximum offline transaction amount for chip cards, in the processing currency and specified in [minor units](https://docs.adyen.com/development-resources/currency-codes).. - /// The maximum offline transaction amount for swiped cards, in the specified currency.. - public OfflineProcessing(int? chipFloorLimit = default(int?), List offlineSwipeLimits = default(List)) - { - this.ChipFloorLimit = chipFloorLimit; - this.OfflineSwipeLimits = offlineSwipeLimits; - } - - /// - /// The maximum offline transaction amount for chip cards, in the processing currency and specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The maximum offline transaction amount for chip cards, in the processing currency and specified in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "chipFloorLimit", EmitDefaultValue = false)] - public int? ChipFloorLimit { get; set; } - - /// - /// The maximum offline transaction amount for swiped cards, in the specified currency. - /// - /// The maximum offline transaction amount for swiped cards, in the specified currency. - [DataMember(Name = "offlineSwipeLimits", EmitDefaultValue = false)] - public List OfflineSwipeLimits { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OfflineProcessing {\n"); - sb.Append(" ChipFloorLimit: ").Append(ChipFloorLimit).Append("\n"); - sb.Append(" OfflineSwipeLimits: ").Append(OfflineSwipeLimits).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OfflineProcessing); - } - - /// - /// Returns true if OfflineProcessing instances are equal - /// - /// Instance of OfflineProcessing to be compared - /// Boolean - public bool Equals(OfflineProcessing input) - { - if (input == null) - { - return false; - } - return - ( - this.ChipFloorLimit == input.ChipFloorLimit || - this.ChipFloorLimit.Equals(input.ChipFloorLimit) - ) && - ( - this.OfflineSwipeLimits == input.OfflineSwipeLimits || - this.OfflineSwipeLimits != null && - input.OfflineSwipeLimits != null && - this.OfflineSwipeLimits.SequenceEqual(input.OfflineSwipeLimits) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ChipFloorLimit.GetHashCode(); - if (this.OfflineSwipeLimits != null) - { - hashCode = (hashCode * 59) + this.OfflineSwipeLimits.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Opi.cs b/Adyen/Model/Management/Opi.cs deleted file mode 100644 index 79a625161..000000000 --- a/Adyen/Model/Management/Opi.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Opi - /// - [DataContract(Name = "Opi")] - public partial class Opi : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates if Pay at table is enabled.. - /// The store number to use for Pay at Table.. - /// The URL and port number used for Pay at Table communication.. - public Opi(bool? enablePayAtTable = default(bool?), string payAtTableStoreNumber = default(string), string payAtTableURL = default(string)) - { - this.EnablePayAtTable = enablePayAtTable; - this.PayAtTableStoreNumber = payAtTableStoreNumber; - this.PayAtTableURL = payAtTableURL; - } - - /// - /// Indicates if Pay at table is enabled. - /// - /// Indicates if Pay at table is enabled. - [DataMember(Name = "enablePayAtTable", EmitDefaultValue = false)] - public bool? EnablePayAtTable { get; set; } - - /// - /// The store number to use for Pay at Table. - /// - /// The store number to use for Pay at Table. - [DataMember(Name = "payAtTableStoreNumber", EmitDefaultValue = false)] - public string PayAtTableStoreNumber { get; set; } - - /// - /// The URL and port number used for Pay at Table communication. - /// - /// The URL and port number used for Pay at Table communication. - [DataMember(Name = "payAtTableURL", EmitDefaultValue = false)] - public string PayAtTableURL { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Opi {\n"); - sb.Append(" EnablePayAtTable: ").Append(EnablePayAtTable).Append("\n"); - sb.Append(" PayAtTableStoreNumber: ").Append(PayAtTableStoreNumber).Append("\n"); - sb.Append(" PayAtTableURL: ").Append(PayAtTableURL).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Opi); - } - - /// - /// Returns true if Opi instances are equal - /// - /// Instance of Opi to be compared - /// Boolean - public bool Equals(Opi input) - { - if (input == null) - { - return false; - } - return - ( - this.EnablePayAtTable == input.EnablePayAtTable || - this.EnablePayAtTable.Equals(input.EnablePayAtTable) - ) && - ( - this.PayAtTableStoreNumber == input.PayAtTableStoreNumber || - (this.PayAtTableStoreNumber != null && - this.PayAtTableStoreNumber.Equals(input.PayAtTableStoreNumber)) - ) && - ( - this.PayAtTableURL == input.PayAtTableURL || - (this.PayAtTableURL != null && - this.PayAtTableURL.Equals(input.PayAtTableURL)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EnablePayAtTable.GetHashCode(); - if (this.PayAtTableStoreNumber != null) - { - hashCode = (hashCode * 59) + this.PayAtTableStoreNumber.GetHashCode(); - } - if (this.PayAtTableURL != null) - { - hashCode = (hashCode * 59) + this.PayAtTableURL.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/OrderItem.cs b/Adyen/Model/Management/OrderItem.cs deleted file mode 100644 index a81c1001a..000000000 --- a/Adyen/Model/Management/OrderItem.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// OrderItem - /// - [DataContract(Name = "OrderItem")] - public partial class OrderItem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the product.. - /// The number of installments for the specified product `id`.. - /// The name of the product.. - /// The number of items with the specified product `id` included in the order.. - public OrderItem(string id = default(string), long? installments = default(long?), string name = default(string), int? quantity = default(int?)) - { - this.Id = id; - this.Installments = installments; - this.Name = name; - this.Quantity = quantity; - } - - /// - /// The unique identifier of the product. - /// - /// The unique identifier of the product. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The number of installments for the specified product `id`. - /// - /// The number of installments for the specified product `id`. - [DataMember(Name = "installments", EmitDefaultValue = false)] - public long? Installments { get; set; } - - /// - /// The name of the product. - /// - /// The name of the product. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The number of items with the specified product `id` included in the order. - /// - /// The number of items with the specified product `id` included in the order. - [DataMember(Name = "quantity", EmitDefaultValue = false)] - public int? Quantity { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OrderItem {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Installments: ").Append(Installments).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderItem); - } - - /// - /// Returns true if OrderItem instances are equal - /// - /// Instance of OrderItem to be compared - /// Boolean - public bool Equals(OrderItem input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Installments == input.Installments || - this.Installments.Equals(input.Installments) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Quantity == input.Quantity || - this.Quantity.Equals(input.Quantity) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Installments.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PaginationLinks.cs b/Adyen/Model/Management/PaginationLinks.cs deleted file mode 100644 index b951c03d2..000000000 --- a/Adyen/Model/Management/PaginationLinks.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PaginationLinks - /// - [DataContract(Name = "PaginationLinks")] - public partial class PaginationLinks : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaginationLinks() { } - /// - /// Initializes a new instance of the class. - /// - /// first (required). - /// last (required). - /// next. - /// prev. - /// self (required). - public PaginationLinks(LinksElement first = default(LinksElement), LinksElement last = default(LinksElement), LinksElement next = default(LinksElement), LinksElement prev = default(LinksElement), LinksElement self = default(LinksElement)) - { - this.First = first; - this.Last = last; - this.Self = self; - this.Next = next; - this.Prev = prev; - } - - /// - /// Gets or Sets First - /// - [DataMember(Name = "first", IsRequired = false, EmitDefaultValue = false)] - public LinksElement First { get; set; } - - /// - /// Gets or Sets Last - /// - [DataMember(Name = "last", IsRequired = false, EmitDefaultValue = false)] - public LinksElement Last { get; set; } - - /// - /// Gets or Sets Next - /// - [DataMember(Name = "next", EmitDefaultValue = false)] - public LinksElement Next { get; set; } - - /// - /// Gets or Sets Prev - /// - [DataMember(Name = "prev", EmitDefaultValue = false)] - public LinksElement Prev { get; set; } - - /// - /// Gets or Sets Self - /// - [DataMember(Name = "self", IsRequired = false, EmitDefaultValue = false)] - public LinksElement Self { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaginationLinks {\n"); - sb.Append(" First: ").Append(First).Append("\n"); - sb.Append(" Last: ").Append(Last).Append("\n"); - sb.Append(" Next: ").Append(Next).Append("\n"); - sb.Append(" Prev: ").Append(Prev).Append("\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaginationLinks); - } - - /// - /// Returns true if PaginationLinks instances are equal - /// - /// Instance of PaginationLinks to be compared - /// Boolean - public bool Equals(PaginationLinks input) - { - if (input == null) - { - return false; - } - return - ( - this.First == input.First || - (this.First != null && - this.First.Equals(input.First)) - ) && - ( - this.Last == input.Last || - (this.Last != null && - this.Last.Equals(input.Last)) - ) && - ( - this.Next == input.Next || - (this.Next != null && - this.Next.Equals(input.Next)) - ) && - ( - this.Prev == input.Prev || - (this.Prev != null && - this.Prev.Equals(input.Prev)) - ) && - ( - this.Self == input.Self || - (this.Self != null && - this.Self.Equals(input.Self)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.First != null) - { - hashCode = (hashCode * 59) + this.First.GetHashCode(); - } - if (this.Last != null) - { - hashCode = (hashCode * 59) + this.Last.GetHashCode(); - } - if (this.Next != null) - { - hashCode = (hashCode * 59) + this.Next.GetHashCode(); - } - if (this.Prev != null) - { - hashCode = (hashCode * 59) + this.Prev.GetHashCode(); - } - if (this.Self != null) - { - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Passcodes.cs b/Adyen/Model/Management/Passcodes.cs deleted file mode 100644 index 44ffb1605..000000000 --- a/Adyen/Model/Management/Passcodes.cs +++ /dev/null @@ -1,216 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Passcodes - /// - [DataContract(Name = "Passcodes")] - public partial class Passcodes : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The passcode for the Admin menu and the Settings menu.. - /// The passcode for referenced and unreferenced refunds on standalone terminals.. - /// The passcode to unlock the terminal screen after a timeout.. - /// The passcode for the Transactions menu.. - public Passcodes(string adminMenuPin = default(string), string refundPin = default(string), string screenLockPin = default(string), string txMenuPin = default(string)) - { - this.AdminMenuPin = adminMenuPin; - this.RefundPin = refundPin; - this.ScreenLockPin = screenLockPin; - this.TxMenuPin = txMenuPin; - } - - /// - /// The passcode for the Admin menu and the Settings menu. - /// - /// The passcode for the Admin menu and the Settings menu. - [DataMember(Name = "adminMenuPin", EmitDefaultValue = false)] - public string AdminMenuPin { get; set; } - - /// - /// The passcode for referenced and unreferenced refunds on standalone terminals. - /// - /// The passcode for referenced and unreferenced refunds on standalone terminals. - [DataMember(Name = "refundPin", EmitDefaultValue = false)] - public string RefundPin { get; set; } - - /// - /// The passcode to unlock the terminal screen after a timeout. - /// - /// The passcode to unlock the terminal screen after a timeout. - [DataMember(Name = "screenLockPin", EmitDefaultValue = false)] - public string ScreenLockPin { get; set; } - - /// - /// The passcode for the Transactions menu. - /// - /// The passcode for the Transactions menu. - [DataMember(Name = "txMenuPin", EmitDefaultValue = false)] - public string TxMenuPin { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Passcodes {\n"); - sb.Append(" AdminMenuPin: ").Append(AdminMenuPin).Append("\n"); - sb.Append(" RefundPin: ").Append(RefundPin).Append("\n"); - sb.Append(" ScreenLockPin: ").Append(ScreenLockPin).Append("\n"); - sb.Append(" TxMenuPin: ").Append(TxMenuPin).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Passcodes); - } - - /// - /// Returns true if Passcodes instances are equal - /// - /// Instance of Passcodes to be compared - /// Boolean - public bool Equals(Passcodes input) - { - if (input == null) - { - return false; - } - return - ( - this.AdminMenuPin == input.AdminMenuPin || - (this.AdminMenuPin != null && - this.AdminMenuPin.Equals(input.AdminMenuPin)) - ) && - ( - this.RefundPin == input.RefundPin || - (this.RefundPin != null && - this.RefundPin.Equals(input.RefundPin)) - ) && - ( - this.ScreenLockPin == input.ScreenLockPin || - (this.ScreenLockPin != null && - this.ScreenLockPin.Equals(input.ScreenLockPin)) - ) && - ( - this.TxMenuPin == input.TxMenuPin || - (this.TxMenuPin != null && - this.TxMenuPin.Equals(input.TxMenuPin)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdminMenuPin != null) - { - hashCode = (hashCode * 59) + this.AdminMenuPin.GetHashCode(); - } - if (this.RefundPin != null) - { - hashCode = (hashCode * 59) + this.RefundPin.GetHashCode(); - } - if (this.ScreenLockPin != null) - { - hashCode = (hashCode * 59) + this.ScreenLockPin.GetHashCode(); - } - if (this.TxMenuPin != null) - { - hashCode = (hashCode * 59) + this.TxMenuPin.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AdminMenuPin (string) maxLength - if (this.AdminMenuPin != null && this.AdminMenuPin.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AdminMenuPin, length must be less than 6.", new [] { "AdminMenuPin" }); - } - - // RefundPin (string) maxLength - if (this.RefundPin != null && this.RefundPin.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RefundPin, length must be less than 6.", new [] { "RefundPin" }); - } - - // ScreenLockPin (string) maxLength - if (this.ScreenLockPin != null && this.ScreenLockPin.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ScreenLockPin, length must be less than 6.", new [] { "ScreenLockPin" }); - } - - // ScreenLockPin (string) minLength - if (this.ScreenLockPin != null && this.ScreenLockPin.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ScreenLockPin, length must be greater than 4.", new [] { "ScreenLockPin" }); - } - - // TxMenuPin (string) maxLength - if (this.TxMenuPin != null && this.TxMenuPin.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TxMenuPin, length must be less than 6.", new [] { "TxMenuPin" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PayAtTable.cs b/Adyen/Model/Management/PayAtTable.cs deleted file mode 100644 index e154b1517..000000000 --- a/Adyen/Model/Management/PayAtTable.cs +++ /dev/null @@ -1,197 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PayAtTable - /// - [DataContract(Name = "PayAtTable")] - public partial class PayAtTable : IEquatable, IValidatableObject - { - /// - /// Allowed authentication methods: Magswipe, Manual Entry. - /// - /// Allowed authentication methods: Magswipe, Manual Entry. - [JsonConverter(typeof(StringEnumConverter))] - public enum AuthenticationMethodEnum - { - /// - /// Enum MAGSWIPE for value: MAGSWIPE - /// - [EnumMember(Value = "MAGSWIPE")] - MAGSWIPE = 1, - - /// - /// Enum MKE for value: MKE - /// - [EnumMember(Value = "MKE")] - MKE = 2 - - } - - - /// - /// Allowed authentication methods: Magswipe, Manual Entry. - /// - /// Allowed authentication methods: Magswipe, Manual Entry. - [DataMember(Name = "authenticationMethod", EmitDefaultValue = false)] - public AuthenticationMethodEnum? AuthenticationMethod { get; set; } - /// - /// Sets the allowed payment instrument for Pay at table transactions. Can be: **cash** or **card**. If not set, the terminal presents both options. - /// - /// Sets the allowed payment instrument for Pay at table transactions. Can be: **cash** or **card**. If not set, the terminal presents both options. - [JsonConverter(typeof(StringEnumConverter))] - public enum PaymentInstrumentEnum - { - /// - /// Enum Cash for value: Cash - /// - [EnumMember(Value = "Cash")] - Cash = 1, - - /// - /// Enum Card for value: Card - /// - [EnumMember(Value = "Card")] - Card = 2 - - } - - - /// - /// Sets the allowed payment instrument for Pay at table transactions. Can be: **cash** or **card**. If not set, the terminal presents both options. - /// - /// Sets the allowed payment instrument for Pay at table transactions. Can be: **cash** or **card**. If not set, the terminal presents both options. - [DataMember(Name = "paymentInstrument", EmitDefaultValue = false)] - public PaymentInstrumentEnum? PaymentInstrument { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Allowed authentication methods: Magswipe, Manual Entry.. - /// Enable Pay at table.. - /// Sets the allowed payment instrument for Pay at table transactions. Can be: **cash** or **card**. If not set, the terminal presents both options.. - public PayAtTable(AuthenticationMethodEnum? authenticationMethod = default(AuthenticationMethodEnum?), bool? enablePayAtTable = default(bool?), PaymentInstrumentEnum? paymentInstrument = default(PaymentInstrumentEnum?)) - { - this.AuthenticationMethod = authenticationMethod; - this.EnablePayAtTable = enablePayAtTable; - this.PaymentInstrument = paymentInstrument; - } - - /// - /// Enable Pay at table. - /// - /// Enable Pay at table. - [DataMember(Name = "enablePayAtTable", EmitDefaultValue = false)] - public bool? EnablePayAtTable { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayAtTable {\n"); - sb.Append(" AuthenticationMethod: ").Append(AuthenticationMethod).Append("\n"); - sb.Append(" EnablePayAtTable: ").Append(EnablePayAtTable).Append("\n"); - sb.Append(" PaymentInstrument: ").Append(PaymentInstrument).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayAtTable); - } - - /// - /// Returns true if PayAtTable instances are equal - /// - /// Instance of PayAtTable to be compared - /// Boolean - public bool Equals(PayAtTable input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthenticationMethod == input.AuthenticationMethod || - this.AuthenticationMethod.Equals(input.AuthenticationMethod) - ) && - ( - this.EnablePayAtTable == input.EnablePayAtTable || - this.EnablePayAtTable.Equals(input.EnablePayAtTable) - ) && - ( - this.PaymentInstrument == input.PaymentInstrument || - this.PaymentInstrument.Equals(input.PaymentInstrument) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AuthenticationMethod.GetHashCode(); - hashCode = (hashCode * 59) + this.EnablePayAtTable.GetHashCode(); - hashCode = (hashCode * 59) + this.PaymentInstrument.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PayMeInfo.cs b/Adyen/Model/Management/PayMeInfo.cs deleted file mode 100644 index bbab95e03..000000000 --- a/Adyen/Model/Management/PayMeInfo.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PayMeInfo - /// - [DataContract(Name = "PayMeInfo")] - public partial class PayMeInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayMeInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Merchant display name (required). - /// Merchant logo. Format: Base64-encoded string. (required). - /// The email address of merchant support. (required). - public PayMeInfo(string displayName = default(string), string logo = default(string), string supportEmail = default(string)) - { - this.DisplayName = displayName; - this.Logo = logo; - this.SupportEmail = supportEmail; - } - - /// - /// Merchant display name - /// - /// Merchant display name - [DataMember(Name = "displayName", IsRequired = false, EmitDefaultValue = false)] - public string DisplayName { get; set; } - - /// - /// Merchant logo. Format: Base64-encoded string. - /// - /// Merchant logo. Format: Base64-encoded string. - [DataMember(Name = "logo", IsRequired = false, EmitDefaultValue = false)] - public string Logo { get; set; } - - /// - /// The email address of merchant support. - /// - /// The email address of merchant support. - [DataMember(Name = "supportEmail", IsRequired = false, EmitDefaultValue = false)] - public string SupportEmail { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayMeInfo {\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" Logo: ").Append(Logo).Append("\n"); - sb.Append(" SupportEmail: ").Append(SupportEmail).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayMeInfo); - } - - /// - /// Returns true if PayMeInfo instances are equal - /// - /// Instance of PayMeInfo to be compared - /// Boolean - public bool Equals(PayMeInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.DisplayName == input.DisplayName || - (this.DisplayName != null && - this.DisplayName.Equals(input.DisplayName)) - ) && - ( - this.Logo == input.Logo || - (this.Logo != null && - this.Logo.Equals(input.Logo)) - ) && - ( - this.SupportEmail == input.SupportEmail || - (this.SupportEmail != null && - this.SupportEmail.Equals(input.SupportEmail)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisplayName != null) - { - hashCode = (hashCode * 59) + this.DisplayName.GetHashCode(); - } - if (this.Logo != null) - { - hashCode = (hashCode * 59) + this.Logo.GetHashCode(); - } - if (this.SupportEmail != null) - { - hashCode = (hashCode * 59) + this.SupportEmail.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PayPalInfo.cs b/Adyen/Model/Management/PayPalInfo.cs deleted file mode 100644 index 3f3608d12..000000000 --- a/Adyen/Model/Management/PayPalInfo.cs +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PayPalInfo - /// - [DataContract(Name = "PayPalInfo")] - public partial class PayPalInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayPalInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates if direct (immediate) capture for PayPal is enabled. If set to **true**, this setting overrides the [capture](https://docs.adyen.com/online-payments/capture) settings of your merchant account. Default value: **true**.. - /// PayPal Merchant ID. Character length and limitations: 13 single-byte alphanumeric characters. (required). - /// Your business email address. (required). - public PayPalInfo(bool? directCapture = default(bool?), string payerId = default(string), string subject = default(string)) - { - this.PayerId = payerId; - this.Subject = subject; - this.DirectCapture = directCapture; - } - - /// - /// Indicates if direct (immediate) capture for PayPal is enabled. If set to **true**, this setting overrides the [capture](https://docs.adyen.com/online-payments/capture) settings of your merchant account. Default value: **true**. - /// - /// Indicates if direct (immediate) capture for PayPal is enabled. If set to **true**, this setting overrides the [capture](https://docs.adyen.com/online-payments/capture) settings of your merchant account. Default value: **true**. - [DataMember(Name = "directCapture", EmitDefaultValue = false)] - public bool? DirectCapture { get; set; } - - /// - /// PayPal Merchant ID. Character length and limitations: 13 single-byte alphanumeric characters. - /// - /// PayPal Merchant ID. Character length and limitations: 13 single-byte alphanumeric characters. - [DataMember(Name = "payerId", IsRequired = false, EmitDefaultValue = false)] - public string PayerId { get; set; } - - /// - /// Your business email address. - /// - /// Your business email address. - [DataMember(Name = "subject", IsRequired = false, EmitDefaultValue = false)] - public string Subject { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayPalInfo {\n"); - sb.Append(" DirectCapture: ").Append(DirectCapture).Append("\n"); - sb.Append(" PayerId: ").Append(PayerId).Append("\n"); - sb.Append(" Subject: ").Append(Subject).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayPalInfo); - } - - /// - /// Returns true if PayPalInfo instances are equal - /// - /// Instance of PayPalInfo to be compared - /// Boolean - public bool Equals(PayPalInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.DirectCapture == input.DirectCapture || - this.DirectCapture.Equals(input.DirectCapture) - ) && - ( - this.PayerId == input.PayerId || - (this.PayerId != null && - this.PayerId.Equals(input.PayerId)) - ) && - ( - this.Subject == input.Subject || - (this.Subject != null && - this.Subject.Equals(input.Subject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.DirectCapture.GetHashCode(); - if (this.PayerId != null) - { - hashCode = (hashCode * 59) + this.PayerId.GetHashCode(); - } - if (this.Subject != null) - { - hashCode = (hashCode * 59) + this.Subject.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // PayerId (string) maxLength - if (this.PayerId != null && this.PayerId.Length > 13) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PayerId, length must be less than 13.", new [] { "PayerId" }); - } - - // PayerId (string) minLength - if (this.PayerId != null && this.PayerId.Length < 13) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PayerId, length must be greater than 13.", new [] { "PayerId" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PayToInfo.cs b/Adyen/Model/Management/PayToInfo.cs deleted file mode 100644 index 98bfc5685..000000000 --- a/Adyen/Model/Management/PayToInfo.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PayToInfo - /// - [DataContract(Name = "PayToInfo")] - public partial class PayToInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayToInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Merchant name displayed to the shopper in the Agreements (required). - /// Represents the purpose of the Agreements created, it relates to the business type **Allowed values**: mortgage, utility, loan, gambling, retail, salary, personal, government, pension, tax, other (required). - public PayToInfo(string merchantName = default(string), string payToPurpose = default(string)) - { - this.MerchantName = merchantName; - this.PayToPurpose = payToPurpose; - } - - /// - /// Merchant name displayed to the shopper in the Agreements - /// - /// Merchant name displayed to the shopper in the Agreements - [DataMember(Name = "merchantName", IsRequired = false, EmitDefaultValue = false)] - public string MerchantName { get; set; } - - /// - /// Represents the purpose of the Agreements created, it relates to the business type **Allowed values**: mortgage, utility, loan, gambling, retail, salary, personal, government, pension, tax, other - /// - /// Represents the purpose of the Agreements created, it relates to the business type **Allowed values**: mortgage, utility, loan, gambling, retail, salary, personal, government, pension, tax, other - [DataMember(Name = "payToPurpose", IsRequired = false, EmitDefaultValue = false)] - public string PayToPurpose { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayToInfo {\n"); - sb.Append(" MerchantName: ").Append(MerchantName).Append("\n"); - sb.Append(" PayToPurpose: ").Append(PayToPurpose).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayToInfo); - } - - /// - /// Returns true if PayToInfo instances are equal - /// - /// Instance of PayToInfo to be compared - /// Boolean - public bool Equals(PayToInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantName == input.MerchantName || - (this.MerchantName != null && - this.MerchantName.Equals(input.MerchantName)) - ) && - ( - this.PayToPurpose == input.PayToPurpose || - (this.PayToPurpose != null && - this.PayToPurpose.Equals(input.PayToPurpose)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantName != null) - { - hashCode = (hashCode * 59) + this.MerchantName.GetHashCode(); - } - if (this.PayToPurpose != null) - { - hashCode = (hashCode * 59) + this.PayToPurpose.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Payment.cs b/Adyen/Model/Management/Payment.cs deleted file mode 100644 index 784727c4a..000000000 --- a/Adyen/Model/Management/Payment.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Payment - /// - [DataContract(Name = "Payment")] - public partial class Payment : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.. - /// Hides the minor units for the listed [ISO currency codes](https://en.wikipedia.org/wiki/ISO_4217).. - public Payment(string contactlessCurrency = default(string), List hideMinorUnitsInCurrencies = default(List)) - { - this.ContactlessCurrency = contactlessCurrency; - this.HideMinorUnitsInCurrencies = hideMinorUnitsInCurrencies; - } - - /// - /// The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. - /// - /// The default currency for contactless payments on the payment terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. - [DataMember(Name = "contactlessCurrency", EmitDefaultValue = false)] - public string ContactlessCurrency { get; set; } - - /// - /// Hides the minor units for the listed [ISO currency codes](https://en.wikipedia.org/wiki/ISO_4217). - /// - /// Hides the minor units for the listed [ISO currency codes](https://en.wikipedia.org/wiki/ISO_4217). - [DataMember(Name = "hideMinorUnitsInCurrencies", EmitDefaultValue = false)] - public List HideMinorUnitsInCurrencies { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Payment {\n"); - sb.Append(" ContactlessCurrency: ").Append(ContactlessCurrency).Append("\n"); - sb.Append(" HideMinorUnitsInCurrencies: ").Append(HideMinorUnitsInCurrencies).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Payment); - } - - /// - /// Returns true if Payment instances are equal - /// - /// Instance of Payment to be compared - /// Boolean - public bool Equals(Payment input) - { - if (input == null) - { - return false; - } - return - ( - this.ContactlessCurrency == input.ContactlessCurrency || - (this.ContactlessCurrency != null && - this.ContactlessCurrency.Equals(input.ContactlessCurrency)) - ) && - ( - this.HideMinorUnitsInCurrencies == input.HideMinorUnitsInCurrencies || - this.HideMinorUnitsInCurrencies != null && - input.HideMinorUnitsInCurrencies != null && - this.HideMinorUnitsInCurrencies.SequenceEqual(input.HideMinorUnitsInCurrencies) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ContactlessCurrency != null) - { - hashCode = (hashCode * 59) + this.ContactlessCurrency.GetHashCode(); - } - if (this.HideMinorUnitsInCurrencies != null) - { - hashCode = (hashCode * 59) + this.HideMinorUnitsInCurrencies.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ContactlessCurrency (string) maxLength - if (this.ContactlessCurrency != null && this.ContactlessCurrency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ContactlessCurrency, length must be less than 3.", new [] { "ContactlessCurrency" }); - } - - // ContactlessCurrency (string) minLength - if (this.ContactlessCurrency != null && this.ContactlessCurrency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ContactlessCurrency, length must be greater than 3.", new [] { "ContactlessCurrency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PaymentMethod.cs b/Adyen/Model/Management/PaymentMethod.cs deleted file mode 100644 index a422ec6da..000000000 --- a/Adyen/Model/Management/PaymentMethod.cs +++ /dev/null @@ -1,1058 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PaymentMethod - /// - [DataContract(Name = "PaymentMethod")] - public partial class PaymentMethod : IEquatable, IValidatableObject - { - /// - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - /// - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - [JsonConverter(typeof(StringEnumConverter))] - public enum VerificationStatusEnum - { - /// - /// Enum Valid for value: valid - /// - [EnumMember(Value = "valid")] - Valid = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 3, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 4 - - } - - - /// - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - /// - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public VerificationStatusEnum? VerificationStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethod() { } - /// - /// Initializes a new instance of the class. - /// - /// accel. - /// affirm. - /// afterpayTouch. - /// Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account.. - /// amex. - /// applePay. - /// bcmc. - /// The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms).. - /// cartesBancaires. - /// clearpay. - /// The list of countries where a payment method is available. By default, all countries supported by the payment method.. - /// cup. - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method.. - /// The list of custom routing flags to route payment to the intended acquirer.. - /// diners. - /// discover. - /// eftDirectdebitCA. - /// eftposAustralia. - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**).. - /// giroPay. - /// girocard. - /// googlePay. - /// The identifier of the resource. (required). - /// ideal. - /// interacCard. - /// jcb. - /// klarna. - /// maestro. - /// mc. - /// mealVoucherFR. - /// nyce. - /// payme. - /// paypal. - /// payto. - /// pulse. - /// Your reference for the payment method. Supported characters a-z, A-Z, 0-9.. - /// The sales channel.. - /// sodexo. - /// sofort. - /// star. - /// The unique identifier of the store for which to configure the payment method, if any.. - /// swish. - /// ticket. - /// twint. - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api).. - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected**. - /// vipps. - /// visa. - /// wechatpay. - /// wechatpayPos. - public PaymentMethod(AccelInfo accel = default(AccelInfo), AffirmInfo affirm = default(AffirmInfo), AfterpayTouchInfo afterpayTouch = default(AfterpayTouchInfo), bool? allowed = default(bool?), AmexInfo amex = default(AmexInfo), ApplePayInfo applePay = default(ApplePayInfo), BcmcInfo bcmc = default(BcmcInfo), string businessLineId = default(string), CartesBancairesInfo cartesBancaires = default(CartesBancairesInfo), ClearpayInfo clearpay = default(ClearpayInfo), List countries = default(List), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List currencies = default(List), List customRoutingFlags = default(List), DinersInfo diners = default(DinersInfo), GenericPmWithTdiInfo discover = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftDirectdebitCA = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftposAustralia = default(GenericPmWithTdiInfo), bool? enabled = default(bool?), GiroPayInfo giroPay = default(GiroPayInfo), GenericPmWithTdiInfo girocard = default(GenericPmWithTdiInfo), GooglePayInfo googlePay = default(GooglePayInfo), string id = default(string), GenericPmWithTdiInfo ideal = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo interacCard = default(GenericPmWithTdiInfo), JCBInfo jcb = default(JCBInfo), KlarnaInfo klarna = default(KlarnaInfo), GenericPmWithTdiInfo maestro = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo mc = default(GenericPmWithTdiInfo), MealVoucherFRInfo mealVoucherFR = default(MealVoucherFRInfo), NyceInfo nyce = default(NyceInfo), PayMeInfo payme = default(PayMeInfo), PayPalInfo paypal = default(PayPalInfo), PayToInfo payto = default(PayToInfo), PulseInfo pulse = default(PulseInfo), string reference = default(string), string shopperInteraction = default(string), SodexoInfo sodexo = default(SodexoInfo), SofortInfo sofort = default(SofortInfo), StarInfo star = default(StarInfo), List storeIds = default(List), SwishInfo swish = default(SwishInfo), TicketInfo ticket = default(TicketInfo), TwintInfo twint = default(TwintInfo), string type = default(string), VerificationStatusEnum? verificationStatus = default(VerificationStatusEnum?), VippsInfo vipps = default(VippsInfo), GenericPmWithTdiInfo visa = default(GenericPmWithTdiInfo), WeChatPayInfo wechatpay = default(WeChatPayInfo), WeChatPayPosInfo wechatpayPos = default(WeChatPayPosInfo)) - { - this.Id = id; - this.Accel = accel; - this.Affirm = affirm; - this.AfterpayTouch = afterpayTouch; - this.Allowed = allowed; - this.Amex = amex; - this.ApplePay = applePay; - this.Bcmc = bcmc; - this.BusinessLineId = businessLineId; - this.CartesBancaires = cartesBancaires; - this.Clearpay = clearpay; - this.Countries = countries; - this.Cup = cup; - this.Currencies = currencies; - this.CustomRoutingFlags = customRoutingFlags; - this.Diners = diners; - this.Discover = discover; - this.EftDirectdebitCA = eftDirectdebitCA; - this.EftposAustralia = eftposAustralia; - this.Enabled = enabled; - this.GiroPay = giroPay; - this.Girocard = girocard; - this.GooglePay = googlePay; - this.Ideal = ideal; - this.InteracCard = interacCard; - this.Jcb = jcb; - this.Klarna = klarna; - this.Maestro = maestro; - this.Mc = mc; - this.MealVoucherFR = mealVoucherFR; - this.Nyce = nyce; - this.Payme = payme; - this.Paypal = paypal; - this.Payto = payto; - this.Pulse = pulse; - this.Reference = reference; - this.ShopperInteraction = shopperInteraction; - this.Sodexo = sodexo; - this.Sofort = sofort; - this.Star = star; - this.StoreIds = storeIds; - this.Swish = swish; - this.Ticket = ticket; - this.Twint = twint; - this.Type = type; - this.VerificationStatus = verificationStatus; - this.Vipps = vipps; - this.Visa = visa; - this.Wechatpay = wechatpay; - this.WechatpayPos = wechatpayPos; - } - - /// - /// Gets or Sets Accel - /// - [DataMember(Name = "accel", EmitDefaultValue = false)] - public AccelInfo Accel { get; set; } - - /// - /// Gets or Sets Affirm - /// - [DataMember(Name = "affirm", EmitDefaultValue = false)] - public AffirmInfo Affirm { get; set; } - - /// - /// Gets or Sets AfterpayTouch - /// - [DataMember(Name = "afterpayTouch", EmitDefaultValue = false)] - public AfterpayTouchInfo AfterpayTouch { get; set; } - - /// - /// Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account. - /// - /// Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; set; } - - /// - /// Gets or Sets Amex - /// - [DataMember(Name = "amex", EmitDefaultValue = false)] - public AmexInfo Amex { get; set; } - - /// - /// Gets or Sets ApplePay - /// - [DataMember(Name = "applePay", EmitDefaultValue = false)] - public ApplePayInfo ApplePay { get; set; } - - /// - /// Gets or Sets Bcmc - /// - [DataMember(Name = "bcmc", EmitDefaultValue = false)] - public BcmcInfo Bcmc { get; set; } - - /// - /// The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms). - /// - /// The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms). - [DataMember(Name = "businessLineId", EmitDefaultValue = false)] - public string BusinessLineId { get; set; } - - /// - /// Gets or Sets CartesBancaires - /// - [DataMember(Name = "cartesBancaires", EmitDefaultValue = false)] - public CartesBancairesInfo CartesBancaires { get; set; } - - /// - /// Gets or Sets Clearpay - /// - [DataMember(Name = "clearpay", EmitDefaultValue = false)] - public ClearpayInfo Clearpay { get; set; } - - /// - /// The list of countries where a payment method is available. By default, all countries supported by the payment method. - /// - /// The list of countries where a payment method is available. By default, all countries supported by the payment method. - [DataMember(Name = "countries", EmitDefaultValue = false)] - public List Countries { get; set; } - - /// - /// Gets or Sets Cup - /// - [DataMember(Name = "cup", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Cup { get; set; } - - /// - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method. - /// - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method. - [DataMember(Name = "currencies", EmitDefaultValue = false)] - public List Currencies { get; set; } - - /// - /// The list of custom routing flags to route payment to the intended acquirer. - /// - /// The list of custom routing flags to route payment to the intended acquirer. - [DataMember(Name = "customRoutingFlags", EmitDefaultValue = false)] - public List CustomRoutingFlags { get; set; } - - /// - /// Gets or Sets Diners - /// - [DataMember(Name = "diners", EmitDefaultValue = false)] - public DinersInfo Diners { get; set; } - - /// - /// Gets or Sets Discover - /// - [DataMember(Name = "discover", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Discover { get; set; } - - /// - /// Gets or Sets EftDirectdebitCA - /// - [DataMember(Name = "eft_directdebit_CA", EmitDefaultValue = false)] - public GenericPmWithTdiInfo EftDirectdebitCA { get; set; } - - /// - /// Gets or Sets EftposAustralia - /// - [DataMember(Name = "eftpos_australia", EmitDefaultValue = false)] - public GenericPmWithTdiInfo EftposAustralia { get; set; } - - /// - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**). - /// - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**). - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// Gets or Sets GiroPay - /// - [DataMember(Name = "giroPay", EmitDefaultValue = false)] - public GiroPayInfo GiroPay { get; set; } - - /// - /// Gets or Sets Girocard - /// - [DataMember(Name = "girocard", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Girocard { get; set; } - - /// - /// Gets or Sets GooglePay - /// - [DataMember(Name = "googlePay", EmitDefaultValue = false)] - public GooglePayInfo GooglePay { get; set; } - - /// - /// The identifier of the resource. - /// - /// The identifier of the resource. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Ideal - /// - [DataMember(Name = "ideal", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Ideal { get; set; } - - /// - /// Gets or Sets InteracCard - /// - [DataMember(Name = "interac_card", EmitDefaultValue = false)] - public GenericPmWithTdiInfo InteracCard { get; set; } - - /// - /// Gets or Sets Jcb - /// - [DataMember(Name = "jcb", EmitDefaultValue = false)] - public JCBInfo Jcb { get; set; } - - /// - /// Gets or Sets Klarna - /// - [DataMember(Name = "klarna", EmitDefaultValue = false)] - public KlarnaInfo Klarna { get; set; } - - /// - /// Gets or Sets Maestro - /// - [DataMember(Name = "maestro", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Maestro { get; set; } - - /// - /// Gets or Sets Mc - /// - [DataMember(Name = "mc", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Mc { get; set; } - - /// - /// Gets or Sets MealVoucherFR - /// - [DataMember(Name = "mealVoucher_FR", EmitDefaultValue = false)] - public MealVoucherFRInfo MealVoucherFR { get; set; } - - /// - /// Gets or Sets Nyce - /// - [DataMember(Name = "nyce", EmitDefaultValue = false)] - public NyceInfo Nyce { get; set; } - - /// - /// Gets or Sets Payme - /// - [DataMember(Name = "payme", EmitDefaultValue = false)] - public PayMeInfo Payme { get; set; } - - /// - /// Gets or Sets Paypal - /// - [DataMember(Name = "paypal", EmitDefaultValue = false)] - public PayPalInfo Paypal { get; set; } - - /// - /// Gets or Sets Payto - /// - [DataMember(Name = "payto", EmitDefaultValue = false)] - public PayToInfo Payto { get; set; } - - /// - /// Gets or Sets Pulse - /// - [DataMember(Name = "pulse", EmitDefaultValue = false)] - public PulseInfo Pulse { get; set; } - - /// - /// Your reference for the payment method. Supported characters a-z, A-Z, 0-9. - /// - /// Your reference for the payment method. Supported characters a-z, A-Z, 0-9. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The sales channel. - /// - /// The sales channel. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public string ShopperInteraction { get; set; } - - /// - /// Gets or Sets Sodexo - /// - [DataMember(Name = "sodexo", EmitDefaultValue = false)] - public SodexoInfo Sodexo { get; set; } - - /// - /// Gets or Sets Sofort - /// - [DataMember(Name = "sofort", EmitDefaultValue = false)] - public SofortInfo Sofort { get; set; } - - /// - /// Gets or Sets Star - /// - [DataMember(Name = "star", EmitDefaultValue = false)] - public StarInfo Star { get; set; } - - /// - /// The unique identifier of the store for which to configure the payment method, if any. - /// - /// The unique identifier of the store for which to configure the payment method, if any. - [DataMember(Name = "storeIds", EmitDefaultValue = false)] - public List StoreIds { get; set; } - - /// - /// Gets or Sets Swish - /// - [DataMember(Name = "swish", EmitDefaultValue = false)] - public SwishInfo Swish { get; set; } - - /// - /// Gets or Sets Ticket - /// - [DataMember(Name = "ticket", EmitDefaultValue = false)] - public TicketInfo Ticket { get; set; } - - /// - /// Gets or Sets Twint - /// - [DataMember(Name = "twint", EmitDefaultValue = false)] - public TwintInfo Twint { get; set; } - - /// - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - /// - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Gets or Sets Vipps - /// - [DataMember(Name = "vipps", EmitDefaultValue = false)] - public VippsInfo Vipps { get; set; } - - /// - /// Gets or Sets Visa - /// - [DataMember(Name = "visa", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Visa { get; set; } - - /// - /// Gets or Sets Wechatpay - /// - [DataMember(Name = "wechatpay", EmitDefaultValue = false)] - public WeChatPayInfo Wechatpay { get; set; } - - /// - /// Gets or Sets WechatpayPos - /// - [DataMember(Name = "wechatpay_pos", EmitDefaultValue = false)] - public WeChatPayPosInfo WechatpayPos { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethod {\n"); - sb.Append(" Accel: ").Append(Accel).Append("\n"); - sb.Append(" Affirm: ").Append(Affirm).Append("\n"); - sb.Append(" AfterpayTouch: ").Append(AfterpayTouch).Append("\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" Amex: ").Append(Amex).Append("\n"); - sb.Append(" ApplePay: ").Append(ApplePay).Append("\n"); - sb.Append(" Bcmc: ").Append(Bcmc).Append("\n"); - sb.Append(" BusinessLineId: ").Append(BusinessLineId).Append("\n"); - sb.Append(" CartesBancaires: ").Append(CartesBancaires).Append("\n"); - sb.Append(" Clearpay: ").Append(Clearpay).Append("\n"); - sb.Append(" Countries: ").Append(Countries).Append("\n"); - sb.Append(" Cup: ").Append(Cup).Append("\n"); - sb.Append(" Currencies: ").Append(Currencies).Append("\n"); - sb.Append(" CustomRoutingFlags: ").Append(CustomRoutingFlags).Append("\n"); - sb.Append(" Diners: ").Append(Diners).Append("\n"); - sb.Append(" Discover: ").Append(Discover).Append("\n"); - sb.Append(" EftDirectdebitCA: ").Append(EftDirectdebitCA).Append("\n"); - sb.Append(" EftposAustralia: ").Append(EftposAustralia).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" GiroPay: ").Append(GiroPay).Append("\n"); - sb.Append(" Girocard: ").Append(Girocard).Append("\n"); - sb.Append(" GooglePay: ").Append(GooglePay).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Ideal: ").Append(Ideal).Append("\n"); - sb.Append(" InteracCard: ").Append(InteracCard).Append("\n"); - sb.Append(" Jcb: ").Append(Jcb).Append("\n"); - sb.Append(" Klarna: ").Append(Klarna).Append("\n"); - sb.Append(" Maestro: ").Append(Maestro).Append("\n"); - sb.Append(" Mc: ").Append(Mc).Append("\n"); - sb.Append(" MealVoucherFR: ").Append(MealVoucherFR).Append("\n"); - sb.Append(" Nyce: ").Append(Nyce).Append("\n"); - sb.Append(" Payme: ").Append(Payme).Append("\n"); - sb.Append(" Paypal: ").Append(Paypal).Append("\n"); - sb.Append(" Payto: ").Append(Payto).Append("\n"); - sb.Append(" Pulse: ").Append(Pulse).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" Sodexo: ").Append(Sodexo).Append("\n"); - sb.Append(" Sofort: ").Append(Sofort).Append("\n"); - sb.Append(" Star: ").Append(Star).Append("\n"); - sb.Append(" StoreIds: ").Append(StoreIds).Append("\n"); - sb.Append(" Swish: ").Append(Swish).Append("\n"); - sb.Append(" Ticket: ").Append(Ticket).Append("\n"); - sb.Append(" Twint: ").Append(Twint).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append(" Vipps: ").Append(Vipps).Append("\n"); - sb.Append(" Visa: ").Append(Visa).Append("\n"); - sb.Append(" Wechatpay: ").Append(Wechatpay).Append("\n"); - sb.Append(" WechatpayPos: ").Append(WechatpayPos).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethod); - } - - /// - /// Returns true if PaymentMethod instances are equal - /// - /// Instance of PaymentMethod to be compared - /// Boolean - public bool Equals(PaymentMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Accel == input.Accel || - (this.Accel != null && - this.Accel.Equals(input.Accel)) - ) && - ( - this.Affirm == input.Affirm || - (this.Affirm != null && - this.Affirm.Equals(input.Affirm)) - ) && - ( - this.AfterpayTouch == input.AfterpayTouch || - (this.AfterpayTouch != null && - this.AfterpayTouch.Equals(input.AfterpayTouch)) - ) && - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.Amex == input.Amex || - (this.Amex != null && - this.Amex.Equals(input.Amex)) - ) && - ( - this.ApplePay == input.ApplePay || - (this.ApplePay != null && - this.ApplePay.Equals(input.ApplePay)) - ) && - ( - this.Bcmc == input.Bcmc || - (this.Bcmc != null && - this.Bcmc.Equals(input.Bcmc)) - ) && - ( - this.BusinessLineId == input.BusinessLineId || - (this.BusinessLineId != null && - this.BusinessLineId.Equals(input.BusinessLineId)) - ) && - ( - this.CartesBancaires == input.CartesBancaires || - (this.CartesBancaires != null && - this.CartesBancaires.Equals(input.CartesBancaires)) - ) && - ( - this.Clearpay == input.Clearpay || - (this.Clearpay != null && - this.Clearpay.Equals(input.Clearpay)) - ) && - ( - this.Countries == input.Countries || - this.Countries != null && - input.Countries != null && - this.Countries.SequenceEqual(input.Countries) - ) && - ( - this.Cup == input.Cup || - (this.Cup != null && - this.Cup.Equals(input.Cup)) - ) && - ( - this.Currencies == input.Currencies || - this.Currencies != null && - input.Currencies != null && - this.Currencies.SequenceEqual(input.Currencies) - ) && - ( - this.CustomRoutingFlags == input.CustomRoutingFlags || - this.CustomRoutingFlags != null && - input.CustomRoutingFlags != null && - this.CustomRoutingFlags.SequenceEqual(input.CustomRoutingFlags) - ) && - ( - this.Diners == input.Diners || - (this.Diners != null && - this.Diners.Equals(input.Diners)) - ) && - ( - this.Discover == input.Discover || - (this.Discover != null && - this.Discover.Equals(input.Discover)) - ) && - ( - this.EftDirectdebitCA == input.EftDirectdebitCA || - (this.EftDirectdebitCA != null && - this.EftDirectdebitCA.Equals(input.EftDirectdebitCA)) - ) && - ( - this.EftposAustralia == input.EftposAustralia || - (this.EftposAustralia != null && - this.EftposAustralia.Equals(input.EftposAustralia)) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.GiroPay == input.GiroPay || - (this.GiroPay != null && - this.GiroPay.Equals(input.GiroPay)) - ) && - ( - this.Girocard == input.Girocard || - (this.Girocard != null && - this.Girocard.Equals(input.Girocard)) - ) && - ( - this.GooglePay == input.GooglePay || - (this.GooglePay != null && - this.GooglePay.Equals(input.GooglePay)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Ideal == input.Ideal || - (this.Ideal != null && - this.Ideal.Equals(input.Ideal)) - ) && - ( - this.InteracCard == input.InteracCard || - (this.InteracCard != null && - this.InteracCard.Equals(input.InteracCard)) - ) && - ( - this.Jcb == input.Jcb || - (this.Jcb != null && - this.Jcb.Equals(input.Jcb)) - ) && - ( - this.Klarna == input.Klarna || - (this.Klarna != null && - this.Klarna.Equals(input.Klarna)) - ) && - ( - this.Maestro == input.Maestro || - (this.Maestro != null && - this.Maestro.Equals(input.Maestro)) - ) && - ( - this.Mc == input.Mc || - (this.Mc != null && - this.Mc.Equals(input.Mc)) - ) && - ( - this.MealVoucherFR == input.MealVoucherFR || - (this.MealVoucherFR != null && - this.MealVoucherFR.Equals(input.MealVoucherFR)) - ) && - ( - this.Nyce == input.Nyce || - (this.Nyce != null && - this.Nyce.Equals(input.Nyce)) - ) && - ( - this.Payme == input.Payme || - (this.Payme != null && - this.Payme.Equals(input.Payme)) - ) && - ( - this.Paypal == input.Paypal || - (this.Paypal != null && - this.Paypal.Equals(input.Paypal)) - ) && - ( - this.Payto == input.Payto || - (this.Payto != null && - this.Payto.Equals(input.Payto)) - ) && - ( - this.Pulse == input.Pulse || - (this.Pulse != null && - this.Pulse.Equals(input.Pulse)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - (this.ShopperInteraction != null && - this.ShopperInteraction.Equals(input.ShopperInteraction)) - ) && - ( - this.Sodexo == input.Sodexo || - (this.Sodexo != null && - this.Sodexo.Equals(input.Sodexo)) - ) && - ( - this.Sofort == input.Sofort || - (this.Sofort != null && - this.Sofort.Equals(input.Sofort)) - ) && - ( - this.Star == input.Star || - (this.Star != null && - this.Star.Equals(input.Star)) - ) && - ( - this.StoreIds == input.StoreIds || - this.StoreIds != null && - input.StoreIds != null && - this.StoreIds.SequenceEqual(input.StoreIds) - ) && - ( - this.Swish == input.Swish || - (this.Swish != null && - this.Swish.Equals(input.Swish)) - ) && - ( - this.Ticket == input.Ticket || - (this.Ticket != null && - this.Ticket.Equals(input.Ticket)) - ) && - ( - this.Twint == input.Twint || - (this.Twint != null && - this.Twint.Equals(input.Twint)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - this.VerificationStatus.Equals(input.VerificationStatus) - ) && - ( - this.Vipps == input.Vipps || - (this.Vipps != null && - this.Vipps.Equals(input.Vipps)) - ) && - ( - this.Visa == input.Visa || - (this.Visa != null && - this.Visa.Equals(input.Visa)) - ) && - ( - this.Wechatpay == input.Wechatpay || - (this.Wechatpay != null && - this.Wechatpay.Equals(input.Wechatpay)) - ) && - ( - this.WechatpayPos == input.WechatpayPos || - (this.WechatpayPos != null && - this.WechatpayPos.Equals(input.WechatpayPos)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Accel != null) - { - hashCode = (hashCode * 59) + this.Accel.GetHashCode(); - } - if (this.Affirm != null) - { - hashCode = (hashCode * 59) + this.Affirm.GetHashCode(); - } - if (this.AfterpayTouch != null) - { - hashCode = (hashCode * 59) + this.AfterpayTouch.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - if (this.Amex != null) - { - hashCode = (hashCode * 59) + this.Amex.GetHashCode(); - } - if (this.ApplePay != null) - { - hashCode = (hashCode * 59) + this.ApplePay.GetHashCode(); - } - if (this.Bcmc != null) - { - hashCode = (hashCode * 59) + this.Bcmc.GetHashCode(); - } - if (this.BusinessLineId != null) - { - hashCode = (hashCode * 59) + this.BusinessLineId.GetHashCode(); - } - if (this.CartesBancaires != null) - { - hashCode = (hashCode * 59) + this.CartesBancaires.GetHashCode(); - } - if (this.Clearpay != null) - { - hashCode = (hashCode * 59) + this.Clearpay.GetHashCode(); - } - if (this.Countries != null) - { - hashCode = (hashCode * 59) + this.Countries.GetHashCode(); - } - if (this.Cup != null) - { - hashCode = (hashCode * 59) + this.Cup.GetHashCode(); - } - if (this.Currencies != null) - { - hashCode = (hashCode * 59) + this.Currencies.GetHashCode(); - } - if (this.CustomRoutingFlags != null) - { - hashCode = (hashCode * 59) + this.CustomRoutingFlags.GetHashCode(); - } - if (this.Diners != null) - { - hashCode = (hashCode * 59) + this.Diners.GetHashCode(); - } - if (this.Discover != null) - { - hashCode = (hashCode * 59) + this.Discover.GetHashCode(); - } - if (this.EftDirectdebitCA != null) - { - hashCode = (hashCode * 59) + this.EftDirectdebitCA.GetHashCode(); - } - if (this.EftposAustralia != null) - { - hashCode = (hashCode * 59) + this.EftposAustralia.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.GiroPay != null) - { - hashCode = (hashCode * 59) + this.GiroPay.GetHashCode(); - } - if (this.Girocard != null) - { - hashCode = (hashCode * 59) + this.Girocard.GetHashCode(); - } - if (this.GooglePay != null) - { - hashCode = (hashCode * 59) + this.GooglePay.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Ideal != null) - { - hashCode = (hashCode * 59) + this.Ideal.GetHashCode(); - } - if (this.InteracCard != null) - { - hashCode = (hashCode * 59) + this.InteracCard.GetHashCode(); - } - if (this.Jcb != null) - { - hashCode = (hashCode * 59) + this.Jcb.GetHashCode(); - } - if (this.Klarna != null) - { - hashCode = (hashCode * 59) + this.Klarna.GetHashCode(); - } - if (this.Maestro != null) - { - hashCode = (hashCode * 59) + this.Maestro.GetHashCode(); - } - if (this.Mc != null) - { - hashCode = (hashCode * 59) + this.Mc.GetHashCode(); - } - if (this.MealVoucherFR != null) - { - hashCode = (hashCode * 59) + this.MealVoucherFR.GetHashCode(); - } - if (this.Nyce != null) - { - hashCode = (hashCode * 59) + this.Nyce.GetHashCode(); - } - if (this.Payme != null) - { - hashCode = (hashCode * 59) + this.Payme.GetHashCode(); - } - if (this.Paypal != null) - { - hashCode = (hashCode * 59) + this.Paypal.GetHashCode(); - } - if (this.Payto != null) - { - hashCode = (hashCode * 59) + this.Payto.GetHashCode(); - } - if (this.Pulse != null) - { - hashCode = (hashCode * 59) + this.Pulse.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ShopperInteraction != null) - { - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - } - if (this.Sodexo != null) - { - hashCode = (hashCode * 59) + this.Sodexo.GetHashCode(); - } - if (this.Sofort != null) - { - hashCode = (hashCode * 59) + this.Sofort.GetHashCode(); - } - if (this.Star != null) - { - hashCode = (hashCode * 59) + this.Star.GetHashCode(); - } - if (this.StoreIds != null) - { - hashCode = (hashCode * 59) + this.StoreIds.GetHashCode(); - } - if (this.Swish != null) - { - hashCode = (hashCode * 59) + this.Swish.GetHashCode(); - } - if (this.Ticket != null) - { - hashCode = (hashCode * 59) + this.Ticket.GetHashCode(); - } - if (this.Twint != null) - { - hashCode = (hashCode * 59) + this.Twint.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - if (this.Vipps != null) - { - hashCode = (hashCode * 59) + this.Vipps.GetHashCode(); - } - if (this.Visa != null) - { - hashCode = (hashCode * 59) + this.Visa.GetHashCode(); - } - if (this.Wechatpay != null) - { - hashCode = (hashCode * 59) + this.Wechatpay.GetHashCode(); - } - if (this.WechatpayPos != null) - { - hashCode = (hashCode * 59) + this.WechatpayPos.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PaymentMethodResponse.cs b/Adyen/Model/Management/PaymentMethodResponse.cs deleted file mode 100644 index 85e5fef3a..000000000 --- a/Adyen/Model/Management/PaymentMethodResponse.cs +++ /dev/null @@ -1,669 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PaymentMethodResponse - /// - [DataContract(Name = "PaymentMethodResponse")] - public partial class PaymentMethodResponse : IEquatable, IValidatableObject - { - /// - /// Defines TypesWithErrors - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypesWithErrorsEnum - { - /// - /// Enum Accel for value: accel - /// - [EnumMember(Value = "accel")] - Accel = 1, - - /// - /// Enum Ach for value: ach - /// - [EnumMember(Value = "ach")] - Ach = 2, - - /// - /// Enum Affirm for value: affirm - /// - [EnumMember(Value = "affirm")] - Affirm = 3, - - /// - /// Enum Afterpaytouch for value: afterpaytouch - /// - [EnumMember(Value = "afterpaytouch")] - Afterpaytouch = 4, - - /// - /// Enum Alelo for value: alelo - /// - [EnumMember(Value = "alelo")] - Alelo = 5, - - /// - /// Enum Alipay for value: alipay - /// - [EnumMember(Value = "alipay")] - Alipay = 6, - - /// - /// Enum AlipayHk for value: alipay_hk - /// - [EnumMember(Value = "alipay_hk")] - AlipayHk = 7, - - /// - /// Enum AlipayWap for value: alipay_wap - /// - [EnumMember(Value = "alipay_wap")] - AlipayWap = 8, - - /// - /// Enum Amex for value: amex - /// - [EnumMember(Value = "amex")] - Amex = 9, - - /// - /// Enum Applepay for value: applepay - /// - [EnumMember(Value = "applepay")] - Applepay = 10, - - /// - /// Enum BaneseCard for value: banese_card - /// - [EnumMember(Value = "banese_card")] - BaneseCard = 11, - - /// - /// Enum BaneseCardCredit for value: banese_card_credit - /// - [EnumMember(Value = "banese_card_credit")] - BaneseCardCredit = 12, - - /// - /// Enum BaneseCardDebit for value: banese_card_debit - /// - [EnumMember(Value = "banese_card_debit")] - BaneseCardDebit = 13, - - /// - /// Enum BaneseCardPrepaid for value: banese_card_prepaid - /// - [EnumMember(Value = "banese_card_prepaid")] - BaneseCardPrepaid = 14, - - /// - /// Enum Bcmc for value: bcmc - /// - [EnumMember(Value = "bcmc")] - Bcmc = 15, - - /// - /// Enum Blik for value: blik - /// - [EnumMember(Value = "blik")] - Blik = 16, - - /// - /// Enum Cartebancaire for value: cartebancaire - /// - [EnumMember(Value = "cartebancaire")] - Cartebancaire = 17, - - /// - /// Enum Clearpay for value: clearpay - /// - [EnumMember(Value = "clearpay")] - Clearpay = 18, - - /// - /// Enum Clicktopay for value: clicktopay - /// - [EnumMember(Value = "clicktopay")] - Clicktopay = 19, - - /// - /// Enum Credtodos for value: credtodos - /// - [EnumMember(Value = "credtodos")] - Credtodos = 20, - - /// - /// Enum CredtodosPrivateCredit for value: credtodos_private_credit - /// - [EnumMember(Value = "credtodos_private_credit")] - CredtodosPrivateCredit = 21, - - /// - /// Enum CredtodosPrivateDebit for value: credtodos_private_debit - /// - [EnumMember(Value = "credtodos_private_debit")] - CredtodosPrivateDebit = 22, - - /// - /// Enum Cup for value: cup - /// - [EnumMember(Value = "cup")] - Cup = 23, - - /// - /// Enum Diners for value: diners - /// - [EnumMember(Value = "diners")] - Diners = 24, - - /// - /// Enum DirectdebitGB for value: directdebit_GB - /// - [EnumMember(Value = "directdebit_GB")] - DirectdebitGB = 25, - - /// - /// Enum Discover for value: discover - /// - [EnumMember(Value = "discover")] - Discover = 26, - - /// - /// Enum EbankingFI for value: ebanking_FI - /// - [EnumMember(Value = "ebanking_FI")] - EbankingFI = 27, - - /// - /// Enum EftDirectdebitCA for value: eft_directdebit_CA - /// - [EnumMember(Value = "eft_directdebit_CA")] - EftDirectdebitCA = 28, - - /// - /// Enum EftposAustralia for value: eftpos_australia - /// - [EnumMember(Value = "eftpos_australia")] - EftposAustralia = 29, - - /// - /// Enum Elo for value: elo - /// - [EnumMember(Value = "elo")] - Elo = 30, - - /// - /// Enum Elocredit for value: elocredit - /// - [EnumMember(Value = "elocredit")] - Elocredit = 31, - - /// - /// Enum Elodebit for value: elodebit - /// - [EnumMember(Value = "elodebit")] - Elodebit = 32, - - /// - /// Enum Girocard for value: girocard - /// - [EnumMember(Value = "girocard")] - Girocard = 33, - - /// - /// Enum Googlepay for value: googlepay - /// - [EnumMember(Value = "googlepay")] - Googlepay = 34, - - /// - /// Enum Hiper for value: hiper - /// - [EnumMember(Value = "hiper")] - Hiper = 35, - - /// - /// Enum Hipercard for value: hipercard - /// - [EnumMember(Value = "hipercard")] - Hipercard = 36, - - /// - /// Enum Ideal for value: ideal - /// - [EnumMember(Value = "ideal")] - Ideal = 37, - - /// - /// Enum InteracCard for value: interac_card - /// - [EnumMember(Value = "interac_card")] - InteracCard = 38, - - /// - /// Enum Jcb for value: jcb - /// - [EnumMember(Value = "jcb")] - Jcb = 39, - - /// - /// Enum Klarna for value: klarna - /// - [EnumMember(Value = "klarna")] - Klarna = 40, - - /// - /// Enum KlarnaAccount for value: klarna_account - /// - [EnumMember(Value = "klarna_account")] - KlarnaAccount = 41, - - /// - /// Enum KlarnaPaynow for value: klarna_paynow - /// - [EnumMember(Value = "klarna_paynow")] - KlarnaPaynow = 42, - - /// - /// Enum Maestro for value: maestro - /// - [EnumMember(Value = "maestro")] - Maestro = 43, - - /// - /// Enum Mbway for value: mbway - /// - [EnumMember(Value = "mbway")] - Mbway = 44, - - /// - /// Enum Mc for value: mc - /// - [EnumMember(Value = "mc")] - Mc = 45, - - /// - /// Enum Mcdebit for value: mcdebit - /// - [EnumMember(Value = "mcdebit")] - Mcdebit = 46, - - /// - /// Enum MealVoucherFR for value: mealVoucher_FR - /// - [EnumMember(Value = "mealVoucher_FR")] - MealVoucherFR = 47, - - /// - /// Enum Mobilepay for value: mobilepay - /// - [EnumMember(Value = "mobilepay")] - Mobilepay = 48, - - /// - /// Enum Multibanco for value: multibanco - /// - [EnumMember(Value = "multibanco")] - Multibanco = 49, - - /// - /// Enum Nyce for value: nyce - /// - [EnumMember(Value = "nyce")] - Nyce = 50, - - /// - /// Enum OnlineBankingPL for value: onlineBanking_PL - /// - [EnumMember(Value = "onlineBanking_PL")] - OnlineBankingPL = 51, - - /// - /// Enum Paybybank for value: paybybank - /// - [EnumMember(Value = "paybybank")] - Paybybank = 52, - - /// - /// Enum Payme for value: payme - /// - [EnumMember(Value = "payme")] - Payme = 53, - - /// - /// Enum PaymePos for value: payme_pos - /// - [EnumMember(Value = "payme_pos")] - PaymePos = 54, - - /// - /// Enum Paynow for value: paynow - /// - [EnumMember(Value = "paynow")] - Paynow = 55, - - /// - /// Enum PaynowPos for value: paynow_pos - /// - [EnumMember(Value = "paynow_pos")] - PaynowPos = 56, - - /// - /// Enum Paypal for value: paypal - /// - [EnumMember(Value = "paypal")] - Paypal = 57, - - /// - /// Enum Payshop for value: payshop - /// - [EnumMember(Value = "payshop")] - Payshop = 58, - - /// - /// Enum Payto for value: payto - /// - [EnumMember(Value = "payto")] - Payto = 59, - - /// - /// Enum Pulse for value: pulse - /// - [EnumMember(Value = "pulse")] - Pulse = 60, - - /// - /// Enum Sodexo for value: sodexo - /// - [EnumMember(Value = "sodexo")] - Sodexo = 61, - - /// - /// Enum Star for value: star - /// - [EnumMember(Value = "star")] - Star = 62, - - /// - /// Enum Swish for value: swish - /// - [EnumMember(Value = "swish")] - Swish = 63, - - /// - /// Enum Ticket for value: ticket - /// - [EnumMember(Value = "ticket")] - Ticket = 64, - - /// - /// Enum TodoGiftcard for value: todo_giftcard - /// - [EnumMember(Value = "todo_giftcard")] - TodoGiftcard = 65, - - /// - /// Enum Trustly for value: trustly - /// - [EnumMember(Value = "trustly")] - Trustly = 66, - - /// - /// Enum Twint for value: twint - /// - [EnumMember(Value = "twint")] - Twint = 67, - - /// - /// Enum TwintPos for value: twint_pos - /// - [EnumMember(Value = "twint_pos")] - TwintPos = 68, - - /// - /// Enum UpBrazilCredit for value: up_brazil_credit - /// - [EnumMember(Value = "up_brazil_credit")] - UpBrazilCredit = 69, - - /// - /// Enum ValeRefeicao for value: vale_refeicao - /// - [EnumMember(Value = "vale_refeicao")] - ValeRefeicao = 70, - - /// - /// Enum ValeRefeicaoPrepaid for value: vale_refeicao_prepaid - /// - [EnumMember(Value = "vale_refeicao_prepaid")] - ValeRefeicaoPrepaid = 71, - - /// - /// Enum Vipps for value: vipps - /// - [EnumMember(Value = "vipps")] - Vipps = 72, - - /// - /// Enum Visa for value: visa - /// - [EnumMember(Value = "visa")] - Visa = 73, - - /// - /// Enum Visadebit for value: visadebit - /// - [EnumMember(Value = "visadebit")] - Visadebit = 74, - - /// - /// Enum Vpay for value: vpay - /// - [EnumMember(Value = "vpay")] - Vpay = 75, - - /// - /// Enum Wechatpay for value: wechatpay - /// - [EnumMember(Value = "wechatpay")] - Wechatpay = 76, - - /// - /// Enum WechatpayPos for value: wechatpay_pos - /// - [EnumMember(Value = "wechatpay_pos")] - WechatpayPos = 77 - - } - - - - /// - /// Payment method types with errors. - /// - /// Payment method types with errors. - [DataMember(Name = "typesWithErrors", EmitDefaultValue = false)] - public List TypesWithErrors { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethodResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of supported payment methods and their details.. - /// Total number of items. (required). - /// Total number of pages. (required). - /// Payment method types with errors.. - public PaymentMethodResponse(PaginationLinks links = default(PaginationLinks), List data = default(List), int? itemsTotal = default(int?), int? pagesTotal = default(int?), List typesWithErrors = default(List)) - { - this.ItemsTotal = itemsTotal; - this.PagesTotal = pagesTotal; - this.Links = links; - this.Data = data; - this.TypesWithErrors = typesWithErrors; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public PaginationLinks Links { get; set; } - - /// - /// The list of supported payment methods and their details. - /// - /// The list of supported payment methods and their details. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Total number of items. - /// - /// Total number of items. - [DataMember(Name = "itemsTotal", IsRequired = false, EmitDefaultValue = false)] - public int? ItemsTotal { get; set; } - - /// - /// Total number of pages. - /// - /// Total number of pages. - [DataMember(Name = "pagesTotal", IsRequired = false, EmitDefaultValue = false)] - public int? PagesTotal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" ItemsTotal: ").Append(ItemsTotal).Append("\n"); - sb.Append(" PagesTotal: ").Append(PagesTotal).Append("\n"); - sb.Append(" TypesWithErrors: ").Append(TypesWithErrors).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodResponse); - } - - /// - /// Returns true if PaymentMethodResponse instances are equal - /// - /// Instance of PaymentMethodResponse to be compared - /// Boolean - public bool Equals(PaymentMethodResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.ItemsTotal == input.ItemsTotal || - this.ItemsTotal.Equals(input.ItemsTotal) - ) && - ( - this.PagesTotal == input.PagesTotal || - this.PagesTotal.Equals(input.PagesTotal) - ) && - ( - this.TypesWithErrors == input.TypesWithErrors || - this.TypesWithErrors.SequenceEqual(input.TypesWithErrors) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ItemsTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.PagesTotal.GetHashCode(); - hashCode = (hashCode * 59) + this.TypesWithErrors.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PaymentMethodSetupInfo.cs b/Adyen/Model/Management/PaymentMethodSetupInfo.cs deleted file mode 100644 index ae77c38d7..000000000 --- a/Adyen/Model/Management/PaymentMethodSetupInfo.cs +++ /dev/null @@ -1,1457 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PaymentMethodSetupInfo - /// - [DataContract(Name = "PaymentMethodSetupInfo")] - public partial class PaymentMethodSetupInfo : IEquatable, IValidatableObject - { - /// - /// The sales channel. Required if the merchant account does not have a sales channel. When you provide this field, it overrides the default sales channel set on the merchant account. Possible values: **eCommerce**, **pos**, **contAuth**, and **moto**. - /// - /// The sales channel. Required if the merchant account does not have a sales channel. When you provide this field, it overrides the default sales channel set on the merchant account. Possible values: **eCommerce**, **pos**, **contAuth**, and **moto**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum ECommerce for value: eCommerce - /// - [EnumMember(Value = "eCommerce")] - ECommerce = 1, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 2, - - /// - /// Enum Moto for value: moto - /// - [EnumMember(Value = "moto")] - Moto = 3, - - /// - /// Enum ContAuth for value: contAuth - /// - [EnumMember(Value = "contAuth")] - ContAuth = 4 - - } - - - /// - /// The sales channel. Required if the merchant account does not have a sales channel. When you provide this field, it overrides the default sales channel set on the merchant account. Possible values: **eCommerce**, **pos**, **contAuth**, and **moto**. - /// - /// The sales channel. Required if the merchant account does not have a sales channel. When you provide this field, it overrides the default sales channel set on the merchant account. Possible values: **eCommerce**, **pos**, **contAuth**, and **moto**. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - /// - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Accel for value: accel - /// - [EnumMember(Value = "accel")] - Accel = 1, - - /// - /// Enum Ach for value: ach - /// - [EnumMember(Value = "ach")] - Ach = 2, - - /// - /// Enum Affirm for value: affirm - /// - [EnumMember(Value = "affirm")] - Affirm = 3, - - /// - /// Enum Afterpaytouch for value: afterpaytouch - /// - [EnumMember(Value = "afterpaytouch")] - Afterpaytouch = 4, - - /// - /// Enum Alelo for value: alelo - /// - [EnumMember(Value = "alelo")] - Alelo = 5, - - /// - /// Enum Alipay for value: alipay - /// - [EnumMember(Value = "alipay")] - Alipay = 6, - - /// - /// Enum AlipayHk for value: alipay_hk - /// - [EnumMember(Value = "alipay_hk")] - AlipayHk = 7, - - /// - /// Enum AlipayWap for value: alipay_wap - /// - [EnumMember(Value = "alipay_wap")] - AlipayWap = 8, - - /// - /// Enum Amex for value: amex - /// - [EnumMember(Value = "amex")] - Amex = 9, - - /// - /// Enum Applepay for value: applepay - /// - [EnumMember(Value = "applepay")] - Applepay = 10, - - /// - /// Enum BaneseCard for value: banese_card - /// - [EnumMember(Value = "banese_card")] - BaneseCard = 11, - - /// - /// Enum BaneseCardCredit for value: banese_card_credit - /// - [EnumMember(Value = "banese_card_credit")] - BaneseCardCredit = 12, - - /// - /// Enum BaneseCardDebit for value: banese_card_debit - /// - [EnumMember(Value = "banese_card_debit")] - BaneseCardDebit = 13, - - /// - /// Enum BaneseCardPrepaid for value: banese_card_prepaid - /// - [EnumMember(Value = "banese_card_prepaid")] - BaneseCardPrepaid = 14, - - /// - /// Enum Bcmc for value: bcmc - /// - [EnumMember(Value = "bcmc")] - Bcmc = 15, - - /// - /// Enum Blik for value: blik - /// - [EnumMember(Value = "blik")] - Blik = 16, - - /// - /// Enum Cartebancaire for value: cartebancaire - /// - [EnumMember(Value = "cartebancaire")] - Cartebancaire = 17, - - /// - /// Enum Clearpay for value: clearpay - /// - [EnumMember(Value = "clearpay")] - Clearpay = 18, - - /// - /// Enum Clicktopay for value: clicktopay - /// - [EnumMember(Value = "clicktopay")] - Clicktopay = 19, - - /// - /// Enum Credtodos for value: credtodos - /// - [EnumMember(Value = "credtodos")] - Credtodos = 20, - - /// - /// Enum CredtodosPrivateCredit for value: credtodos_private_credit - /// - [EnumMember(Value = "credtodos_private_credit")] - CredtodosPrivateCredit = 21, - - /// - /// Enum CredtodosPrivateDebit for value: credtodos_private_debit - /// - [EnumMember(Value = "credtodos_private_debit")] - CredtodosPrivateDebit = 22, - - /// - /// Enum Cup for value: cup - /// - [EnumMember(Value = "cup")] - Cup = 23, - - /// - /// Enum Diners for value: diners - /// - [EnumMember(Value = "diners")] - Diners = 24, - - /// - /// Enum DirectdebitGB for value: directdebit_GB - /// - [EnumMember(Value = "directdebit_GB")] - DirectdebitGB = 25, - - /// - /// Enum Discover for value: discover - /// - [EnumMember(Value = "discover")] - Discover = 26, - - /// - /// Enum EbankingFI for value: ebanking_FI - /// - [EnumMember(Value = "ebanking_FI")] - EbankingFI = 27, - - /// - /// Enum EftDirectdebitCA for value: eft_directdebit_CA - /// - [EnumMember(Value = "eft_directdebit_CA")] - EftDirectdebitCA = 28, - - /// - /// Enum EftposAustralia for value: eftpos_australia - /// - [EnumMember(Value = "eftpos_australia")] - EftposAustralia = 29, - - /// - /// Enum Elo for value: elo - /// - [EnumMember(Value = "elo")] - Elo = 30, - - /// - /// Enum Elocredit for value: elocredit - /// - [EnumMember(Value = "elocredit")] - Elocredit = 31, - - /// - /// Enum Elodebit for value: elodebit - /// - [EnumMember(Value = "elodebit")] - Elodebit = 32, - - /// - /// Enum Girocard for value: girocard - /// - [EnumMember(Value = "girocard")] - Girocard = 33, - - /// - /// Enum Googlepay for value: googlepay - /// - [EnumMember(Value = "googlepay")] - Googlepay = 34, - - /// - /// Enum Hiper for value: hiper - /// - [EnumMember(Value = "hiper")] - Hiper = 35, - - /// - /// Enum Hipercard for value: hipercard - /// - [EnumMember(Value = "hipercard")] - Hipercard = 36, - - /// - /// Enum Ideal for value: ideal - /// - [EnumMember(Value = "ideal")] - Ideal = 37, - - /// - /// Enum InteracCard for value: interac_card - /// - [EnumMember(Value = "interac_card")] - InteracCard = 38, - - /// - /// Enum Jcb for value: jcb - /// - [EnumMember(Value = "jcb")] - Jcb = 39, - - /// - /// Enum Klarna for value: klarna - /// - [EnumMember(Value = "klarna")] - Klarna = 40, - - /// - /// Enum KlarnaAccount for value: klarna_account - /// - [EnumMember(Value = "klarna_account")] - KlarnaAccount = 41, - - /// - /// Enum KlarnaPaynow for value: klarna_paynow - /// - [EnumMember(Value = "klarna_paynow")] - KlarnaPaynow = 42, - - /// - /// Enum Maestro for value: maestro - /// - [EnumMember(Value = "maestro")] - Maestro = 43, - - /// - /// Enum Mbway for value: mbway - /// - [EnumMember(Value = "mbway")] - Mbway = 44, - - /// - /// Enum Mc for value: mc - /// - [EnumMember(Value = "mc")] - Mc = 45, - - /// - /// Enum Mcdebit for value: mcdebit - /// - [EnumMember(Value = "mcdebit")] - Mcdebit = 46, - - /// - /// Enum MealVoucherFR for value: mealVoucher_FR - /// - [EnumMember(Value = "mealVoucher_FR")] - MealVoucherFR = 47, - - /// - /// Enum Mobilepay for value: mobilepay - /// - [EnumMember(Value = "mobilepay")] - Mobilepay = 48, - - /// - /// Enum Multibanco for value: multibanco - /// - [EnumMember(Value = "multibanco")] - Multibanco = 49, - - /// - /// Enum Nyce for value: nyce - /// - [EnumMember(Value = "nyce")] - Nyce = 50, - - /// - /// Enum OnlineBankingPL for value: onlineBanking_PL - /// - [EnumMember(Value = "onlineBanking_PL")] - OnlineBankingPL = 51, - - /// - /// Enum Paybybank for value: paybybank - /// - [EnumMember(Value = "paybybank")] - Paybybank = 52, - - /// - /// Enum Payme for value: payme - /// - [EnumMember(Value = "payme")] - Payme = 53, - - /// - /// Enum PaymePos for value: payme_pos - /// - [EnumMember(Value = "payme_pos")] - PaymePos = 54, - - /// - /// Enum Paynow for value: paynow - /// - [EnumMember(Value = "paynow")] - Paynow = 55, - - /// - /// Enum PaynowPos for value: paynow_pos - /// - [EnumMember(Value = "paynow_pos")] - PaynowPos = 56, - - /// - /// Enum Paypal for value: paypal - /// - [EnumMember(Value = "paypal")] - Paypal = 57, - - /// - /// Enum Payshop for value: payshop - /// - [EnumMember(Value = "payshop")] - Payshop = 58, - - /// - /// Enum Payto for value: payto - /// - [EnumMember(Value = "payto")] - Payto = 59, - - /// - /// Enum Pulse for value: pulse - /// - [EnumMember(Value = "pulse")] - Pulse = 60, - - /// - /// Enum Sodexo for value: sodexo - /// - [EnumMember(Value = "sodexo")] - Sodexo = 61, - - /// - /// Enum Star for value: star - /// - [EnumMember(Value = "star")] - Star = 62, - - /// - /// Enum Swish for value: swish - /// - [EnumMember(Value = "swish")] - Swish = 63, - - /// - /// Enum Ticket for value: ticket - /// - [EnumMember(Value = "ticket")] - Ticket = 64, - - /// - /// Enum TodoGiftcard for value: todo_giftcard - /// - [EnumMember(Value = "todo_giftcard")] - TodoGiftcard = 65, - - /// - /// Enum Trustly for value: trustly - /// - [EnumMember(Value = "trustly")] - Trustly = 66, - - /// - /// Enum Twint for value: twint - /// - [EnumMember(Value = "twint")] - Twint = 67, - - /// - /// Enum TwintPos for value: twint_pos - /// - [EnumMember(Value = "twint_pos")] - TwintPos = 68, - - /// - /// Enum UpBrazilCredit for value: up_brazil_credit - /// - [EnumMember(Value = "up_brazil_credit")] - UpBrazilCredit = 69, - - /// - /// Enum ValeRefeicao for value: vale_refeicao - /// - [EnumMember(Value = "vale_refeicao")] - ValeRefeicao = 70, - - /// - /// Enum ValeRefeicaoPrepaid for value: vale_refeicao_prepaid - /// - [EnumMember(Value = "vale_refeicao_prepaid")] - ValeRefeicaoPrepaid = 71, - - /// - /// Enum Vipps for value: vipps - /// - [EnumMember(Value = "vipps")] - Vipps = 72, - - /// - /// Enum Visa for value: visa - /// - [EnumMember(Value = "visa")] - Visa = 73, - - /// - /// Enum Visadebit for value: visadebit - /// - [EnumMember(Value = "visadebit")] - Visadebit = 74, - - /// - /// Enum Vpay for value: vpay - /// - [EnumMember(Value = "vpay")] - Vpay = 75, - - /// - /// Enum Wechatpay for value: wechatpay - /// - [EnumMember(Value = "wechatpay")] - Wechatpay = 76, - - /// - /// Enum WechatpayPos for value: wechatpay_pos - /// - [EnumMember(Value = "wechatpay_pos")] - WechatpayPos = 77 - - } - - - /// - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - /// - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethodSetupInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// accel. - /// affirm. - /// afterpayTouch. - /// amex. - /// applePay. - /// bcmc. - /// The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms).. - /// cartesBancaires. - /// clearpay. - /// The list of countries where a payment method is available. By default, all countries supported by the payment method.. - /// cup. - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method.. - /// The list of custom routing flags to route payment to the intended acquirer.. - /// diners. - /// discover. - /// eftDirectdebitCA. - /// eftposAustralia. - /// giroPay. - /// girocard. - /// googlePay. - /// ideal. - /// interacCard. - /// jcb. - /// klarna. - /// maestro. - /// mc. - /// mealVoucherFR. - /// nyce. - /// payme. - /// paypal. - /// payto. - /// pulse. - /// Your reference for the payment method. Supported characters a-z, A-Z, 0-9.. - /// The sales channel. Required if the merchant account does not have a sales channel. When you provide this field, it overrides the default sales channel set on the merchant account. Possible values: **eCommerce**, **pos**, **contAuth**, and **moto**. . - /// sodexo. - /// sofort. - /// star. - /// The unique identifier of the store for which to configure the payment method, if any.. - /// swish. - /// ticket. - /// twint. - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). (required). - /// vipps. - /// visa. - /// wechatpay. - /// wechatpayPos. - public PaymentMethodSetupInfo(AccelInfo accel = default(AccelInfo), AffirmInfo affirm = default(AffirmInfo), AfterpayTouchInfo afterpayTouch = default(AfterpayTouchInfo), AmexInfo amex = default(AmexInfo), ApplePayInfo applePay = default(ApplePayInfo), BcmcInfo bcmc = default(BcmcInfo), string businessLineId = default(string), CartesBancairesInfo cartesBancaires = default(CartesBancairesInfo), ClearpayInfo clearpay = default(ClearpayInfo), List countries = default(List), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List currencies = default(List), List customRoutingFlags = default(List), DinersInfo diners = default(DinersInfo), GenericPmWithTdiInfo discover = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftDirectdebitCA = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftposAustralia = default(GenericPmWithTdiInfo), GiroPayInfo giroPay = default(GiroPayInfo), GenericPmWithTdiInfo girocard = default(GenericPmWithTdiInfo), GooglePayInfo googlePay = default(GooglePayInfo), GenericPmWithTdiInfo ideal = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo interacCard = default(GenericPmWithTdiInfo), JCBInfo jcb = default(JCBInfo), KlarnaInfo klarna = default(KlarnaInfo), GenericPmWithTdiInfo maestro = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo mc = default(GenericPmWithTdiInfo), MealVoucherFRInfo mealVoucherFR = default(MealVoucherFRInfo), NyceInfo nyce = default(NyceInfo), PayMeInfo payme = default(PayMeInfo), PayPalInfo paypal = default(PayPalInfo), PayToInfo payto = default(PayToInfo), PulseInfo pulse = default(PulseInfo), string reference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), SodexoInfo sodexo = default(SodexoInfo), SofortInfo sofort = default(SofortInfo), StarInfo star = default(StarInfo), List storeIds = default(List), SwishInfo swish = default(SwishInfo), TicketInfo ticket = default(TicketInfo), TwintInfo twint = default(TwintInfo), TypeEnum type = default(TypeEnum), VippsInfo vipps = default(VippsInfo), GenericPmWithTdiInfo visa = default(GenericPmWithTdiInfo), WeChatPayInfo wechatpay = default(WeChatPayInfo), WeChatPayPosInfo wechatpayPos = default(WeChatPayPosInfo)) - { - this.Type = type; - this.Accel = accel; - this.Affirm = affirm; - this.AfterpayTouch = afterpayTouch; - this.Amex = amex; - this.ApplePay = applePay; - this.Bcmc = bcmc; - this.BusinessLineId = businessLineId; - this.CartesBancaires = cartesBancaires; - this.Clearpay = clearpay; - this.Countries = countries; - this.Cup = cup; - this.Currencies = currencies; - this.CustomRoutingFlags = customRoutingFlags; - this.Diners = diners; - this.Discover = discover; - this.EftDirectdebitCA = eftDirectdebitCA; - this.EftposAustralia = eftposAustralia; - this.GiroPay = giroPay; - this.Girocard = girocard; - this.GooglePay = googlePay; - this.Ideal = ideal; - this.InteracCard = interacCard; - this.Jcb = jcb; - this.Klarna = klarna; - this.Maestro = maestro; - this.Mc = mc; - this.MealVoucherFR = mealVoucherFR; - this.Nyce = nyce; - this.Payme = payme; - this.Paypal = paypal; - this.Payto = payto; - this.Pulse = pulse; - this.Reference = reference; - this.ShopperInteraction = shopperInteraction; - this.Sodexo = sodexo; - this.Sofort = sofort; - this.Star = star; - this.StoreIds = storeIds; - this.Swish = swish; - this.Ticket = ticket; - this.Twint = twint; - this.Vipps = vipps; - this.Visa = visa; - this.Wechatpay = wechatpay; - this.WechatpayPos = wechatpayPos; - } - - /// - /// Gets or Sets Accel - /// - [DataMember(Name = "accel", EmitDefaultValue = false)] - public AccelInfo Accel { get; set; } - - /// - /// Gets or Sets Affirm - /// - [DataMember(Name = "affirm", EmitDefaultValue = false)] - public AffirmInfo Affirm { get; set; } - - /// - /// Gets or Sets AfterpayTouch - /// - [DataMember(Name = "afterpayTouch", EmitDefaultValue = false)] - public AfterpayTouchInfo AfterpayTouch { get; set; } - - /// - /// Gets or Sets Amex - /// - [DataMember(Name = "amex", EmitDefaultValue = false)] - public AmexInfo Amex { get; set; } - - /// - /// Gets or Sets ApplePay - /// - [DataMember(Name = "applePay", EmitDefaultValue = false)] - public ApplePayInfo ApplePay { get; set; } - - /// - /// Gets or Sets Bcmc - /// - [DataMember(Name = "bcmc", EmitDefaultValue = false)] - public BcmcInfo Bcmc { get; set; } - - /// - /// The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms). - /// - /// The unique identifier of the business line. Required if you are a [platform model](https://docs.adyen.com/platforms). - [DataMember(Name = "businessLineId", EmitDefaultValue = false)] - public string BusinessLineId { get; set; } - - /// - /// Gets or Sets CartesBancaires - /// - [DataMember(Name = "cartesBancaires", EmitDefaultValue = false)] - public CartesBancairesInfo CartesBancaires { get; set; } - - /// - /// Gets or Sets Clearpay - /// - [DataMember(Name = "clearpay", EmitDefaultValue = false)] - public ClearpayInfo Clearpay { get; set; } - - /// - /// The list of countries where a payment method is available. By default, all countries supported by the payment method. - /// - /// The list of countries where a payment method is available. By default, all countries supported by the payment method. - [DataMember(Name = "countries", EmitDefaultValue = false)] - public List Countries { get; set; } - - /// - /// Gets or Sets Cup - /// - [DataMember(Name = "cup", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Cup { get; set; } - - /// - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method. - /// - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method. - [DataMember(Name = "currencies", EmitDefaultValue = false)] - public List Currencies { get; set; } - - /// - /// The list of custom routing flags to route payment to the intended acquirer. - /// - /// The list of custom routing flags to route payment to the intended acquirer. - [DataMember(Name = "customRoutingFlags", EmitDefaultValue = false)] - public List CustomRoutingFlags { get; set; } - - /// - /// Gets or Sets Diners - /// - [DataMember(Name = "diners", EmitDefaultValue = false)] - public DinersInfo Diners { get; set; } - - /// - /// Gets or Sets Discover - /// - [DataMember(Name = "discover", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Discover { get; set; } - - /// - /// Gets or Sets EftDirectdebitCA - /// - [DataMember(Name = "eft_directdebit_CA", EmitDefaultValue = false)] - public GenericPmWithTdiInfo EftDirectdebitCA { get; set; } - - /// - /// Gets or Sets EftposAustralia - /// - [DataMember(Name = "eftpos_australia", EmitDefaultValue = false)] - public GenericPmWithTdiInfo EftposAustralia { get; set; } - - /// - /// Gets or Sets GiroPay - /// - [DataMember(Name = "giroPay", EmitDefaultValue = false)] - public GiroPayInfo GiroPay { get; set; } - - /// - /// Gets or Sets Girocard - /// - [DataMember(Name = "girocard", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Girocard { get; set; } - - /// - /// Gets or Sets GooglePay - /// - [DataMember(Name = "googlePay", EmitDefaultValue = false)] - public GooglePayInfo GooglePay { get; set; } - - /// - /// Gets or Sets Ideal - /// - [DataMember(Name = "ideal", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Ideal { get; set; } - - /// - /// Gets or Sets InteracCard - /// - [DataMember(Name = "interac_card", EmitDefaultValue = false)] - public GenericPmWithTdiInfo InteracCard { get; set; } - - /// - /// Gets or Sets Jcb - /// - [DataMember(Name = "jcb", EmitDefaultValue = false)] - public JCBInfo Jcb { get; set; } - - /// - /// Gets or Sets Klarna - /// - [DataMember(Name = "klarna", EmitDefaultValue = false)] - public KlarnaInfo Klarna { get; set; } - - /// - /// Gets or Sets Maestro - /// - [DataMember(Name = "maestro", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Maestro { get; set; } - - /// - /// Gets or Sets Mc - /// - [DataMember(Name = "mc", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Mc { get; set; } - - /// - /// Gets or Sets MealVoucherFR - /// - [DataMember(Name = "mealVoucher_FR", EmitDefaultValue = false)] - public MealVoucherFRInfo MealVoucherFR { get; set; } - - /// - /// Gets or Sets Nyce - /// - [DataMember(Name = "nyce", EmitDefaultValue = false)] - public NyceInfo Nyce { get; set; } - - /// - /// Gets or Sets Payme - /// - [DataMember(Name = "payme", EmitDefaultValue = false)] - public PayMeInfo Payme { get; set; } - - /// - /// Gets or Sets Paypal - /// - [DataMember(Name = "paypal", EmitDefaultValue = false)] - public PayPalInfo Paypal { get; set; } - - /// - /// Gets or Sets Payto - /// - [DataMember(Name = "payto", EmitDefaultValue = false)] - public PayToInfo Payto { get; set; } - - /// - /// Gets or Sets Pulse - /// - [DataMember(Name = "pulse", EmitDefaultValue = false)] - public PulseInfo Pulse { get; set; } - - /// - /// Your reference for the payment method. Supported characters a-z, A-Z, 0-9. - /// - /// Your reference for the payment method. Supported characters a-z, A-Z, 0-9. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets Sodexo - /// - [DataMember(Name = "sodexo", EmitDefaultValue = false)] - public SodexoInfo Sodexo { get; set; } - - /// - /// Gets or Sets Sofort - /// - [DataMember(Name = "sofort", EmitDefaultValue = false)] - public SofortInfo Sofort { get; set; } - - /// - /// Gets or Sets Star - /// - [DataMember(Name = "star", EmitDefaultValue = false)] - public StarInfo Star { get; set; } - - /// - /// The unique identifier of the store for which to configure the payment method, if any. - /// - /// The unique identifier of the store for which to configure the payment method, if any. - [DataMember(Name = "storeIds", EmitDefaultValue = false)] - public List StoreIds { get; set; } - - /// - /// Gets or Sets Swish - /// - [DataMember(Name = "swish", EmitDefaultValue = false)] - public SwishInfo Swish { get; set; } - - /// - /// Gets or Sets Ticket - /// - [DataMember(Name = "ticket", EmitDefaultValue = false)] - public TicketInfo Ticket { get; set; } - - /// - /// Gets or Sets Twint - /// - [DataMember(Name = "twint", EmitDefaultValue = false)] - public TwintInfo Twint { get; set; } - - /// - /// Gets or Sets Vipps - /// - [DataMember(Name = "vipps", EmitDefaultValue = false)] - public VippsInfo Vipps { get; set; } - - /// - /// Gets or Sets Visa - /// - [DataMember(Name = "visa", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Visa { get; set; } - - /// - /// Gets or Sets Wechatpay - /// - [DataMember(Name = "wechatpay", EmitDefaultValue = false)] - public WeChatPayInfo Wechatpay { get; set; } - - /// - /// Gets or Sets WechatpayPos - /// - [DataMember(Name = "wechatpay_pos", EmitDefaultValue = false)] - public WeChatPayPosInfo WechatpayPos { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodSetupInfo {\n"); - sb.Append(" Accel: ").Append(Accel).Append("\n"); - sb.Append(" Affirm: ").Append(Affirm).Append("\n"); - sb.Append(" AfterpayTouch: ").Append(AfterpayTouch).Append("\n"); - sb.Append(" Amex: ").Append(Amex).Append("\n"); - sb.Append(" ApplePay: ").Append(ApplePay).Append("\n"); - sb.Append(" Bcmc: ").Append(Bcmc).Append("\n"); - sb.Append(" BusinessLineId: ").Append(BusinessLineId).Append("\n"); - sb.Append(" CartesBancaires: ").Append(CartesBancaires).Append("\n"); - sb.Append(" Clearpay: ").Append(Clearpay).Append("\n"); - sb.Append(" Countries: ").Append(Countries).Append("\n"); - sb.Append(" Cup: ").Append(Cup).Append("\n"); - sb.Append(" Currencies: ").Append(Currencies).Append("\n"); - sb.Append(" CustomRoutingFlags: ").Append(CustomRoutingFlags).Append("\n"); - sb.Append(" Diners: ").Append(Diners).Append("\n"); - sb.Append(" Discover: ").Append(Discover).Append("\n"); - sb.Append(" EftDirectdebitCA: ").Append(EftDirectdebitCA).Append("\n"); - sb.Append(" EftposAustralia: ").Append(EftposAustralia).Append("\n"); - sb.Append(" GiroPay: ").Append(GiroPay).Append("\n"); - sb.Append(" Girocard: ").Append(Girocard).Append("\n"); - sb.Append(" GooglePay: ").Append(GooglePay).Append("\n"); - sb.Append(" Ideal: ").Append(Ideal).Append("\n"); - sb.Append(" InteracCard: ").Append(InteracCard).Append("\n"); - sb.Append(" Jcb: ").Append(Jcb).Append("\n"); - sb.Append(" Klarna: ").Append(Klarna).Append("\n"); - sb.Append(" Maestro: ").Append(Maestro).Append("\n"); - sb.Append(" Mc: ").Append(Mc).Append("\n"); - sb.Append(" MealVoucherFR: ").Append(MealVoucherFR).Append("\n"); - sb.Append(" Nyce: ").Append(Nyce).Append("\n"); - sb.Append(" Payme: ").Append(Payme).Append("\n"); - sb.Append(" Paypal: ").Append(Paypal).Append("\n"); - sb.Append(" Payto: ").Append(Payto).Append("\n"); - sb.Append(" Pulse: ").Append(Pulse).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" Sodexo: ").Append(Sodexo).Append("\n"); - sb.Append(" Sofort: ").Append(Sofort).Append("\n"); - sb.Append(" Star: ").Append(Star).Append("\n"); - sb.Append(" StoreIds: ").Append(StoreIds).Append("\n"); - sb.Append(" Swish: ").Append(Swish).Append("\n"); - sb.Append(" Ticket: ").Append(Ticket).Append("\n"); - sb.Append(" Twint: ").Append(Twint).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Vipps: ").Append(Vipps).Append("\n"); - sb.Append(" Visa: ").Append(Visa).Append("\n"); - sb.Append(" Wechatpay: ").Append(Wechatpay).Append("\n"); - sb.Append(" WechatpayPos: ").Append(WechatpayPos).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodSetupInfo); - } - - /// - /// Returns true if PaymentMethodSetupInfo instances are equal - /// - /// Instance of PaymentMethodSetupInfo to be compared - /// Boolean - public bool Equals(PaymentMethodSetupInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Accel == input.Accel || - (this.Accel != null && - this.Accel.Equals(input.Accel)) - ) && - ( - this.Affirm == input.Affirm || - (this.Affirm != null && - this.Affirm.Equals(input.Affirm)) - ) && - ( - this.AfterpayTouch == input.AfterpayTouch || - (this.AfterpayTouch != null && - this.AfterpayTouch.Equals(input.AfterpayTouch)) - ) && - ( - this.Amex == input.Amex || - (this.Amex != null && - this.Amex.Equals(input.Amex)) - ) && - ( - this.ApplePay == input.ApplePay || - (this.ApplePay != null && - this.ApplePay.Equals(input.ApplePay)) - ) && - ( - this.Bcmc == input.Bcmc || - (this.Bcmc != null && - this.Bcmc.Equals(input.Bcmc)) - ) && - ( - this.BusinessLineId == input.BusinessLineId || - (this.BusinessLineId != null && - this.BusinessLineId.Equals(input.BusinessLineId)) - ) && - ( - this.CartesBancaires == input.CartesBancaires || - (this.CartesBancaires != null && - this.CartesBancaires.Equals(input.CartesBancaires)) - ) && - ( - this.Clearpay == input.Clearpay || - (this.Clearpay != null && - this.Clearpay.Equals(input.Clearpay)) - ) && - ( - this.Countries == input.Countries || - this.Countries != null && - input.Countries != null && - this.Countries.SequenceEqual(input.Countries) - ) && - ( - this.Cup == input.Cup || - (this.Cup != null && - this.Cup.Equals(input.Cup)) - ) && - ( - this.Currencies == input.Currencies || - this.Currencies != null && - input.Currencies != null && - this.Currencies.SequenceEqual(input.Currencies) - ) && - ( - this.CustomRoutingFlags == input.CustomRoutingFlags || - this.CustomRoutingFlags != null && - input.CustomRoutingFlags != null && - this.CustomRoutingFlags.SequenceEqual(input.CustomRoutingFlags) - ) && - ( - this.Diners == input.Diners || - (this.Diners != null && - this.Diners.Equals(input.Diners)) - ) && - ( - this.Discover == input.Discover || - (this.Discover != null && - this.Discover.Equals(input.Discover)) - ) && - ( - this.EftDirectdebitCA == input.EftDirectdebitCA || - (this.EftDirectdebitCA != null && - this.EftDirectdebitCA.Equals(input.EftDirectdebitCA)) - ) && - ( - this.EftposAustralia == input.EftposAustralia || - (this.EftposAustralia != null && - this.EftposAustralia.Equals(input.EftposAustralia)) - ) && - ( - this.GiroPay == input.GiroPay || - (this.GiroPay != null && - this.GiroPay.Equals(input.GiroPay)) - ) && - ( - this.Girocard == input.Girocard || - (this.Girocard != null && - this.Girocard.Equals(input.Girocard)) - ) && - ( - this.GooglePay == input.GooglePay || - (this.GooglePay != null && - this.GooglePay.Equals(input.GooglePay)) - ) && - ( - this.Ideal == input.Ideal || - (this.Ideal != null && - this.Ideal.Equals(input.Ideal)) - ) && - ( - this.InteracCard == input.InteracCard || - (this.InteracCard != null && - this.InteracCard.Equals(input.InteracCard)) - ) && - ( - this.Jcb == input.Jcb || - (this.Jcb != null && - this.Jcb.Equals(input.Jcb)) - ) && - ( - this.Klarna == input.Klarna || - (this.Klarna != null && - this.Klarna.Equals(input.Klarna)) - ) && - ( - this.Maestro == input.Maestro || - (this.Maestro != null && - this.Maestro.Equals(input.Maestro)) - ) && - ( - this.Mc == input.Mc || - (this.Mc != null && - this.Mc.Equals(input.Mc)) - ) && - ( - this.MealVoucherFR == input.MealVoucherFR || - (this.MealVoucherFR != null && - this.MealVoucherFR.Equals(input.MealVoucherFR)) - ) && - ( - this.Nyce == input.Nyce || - (this.Nyce != null && - this.Nyce.Equals(input.Nyce)) - ) && - ( - this.Payme == input.Payme || - (this.Payme != null && - this.Payme.Equals(input.Payme)) - ) && - ( - this.Paypal == input.Paypal || - (this.Paypal != null && - this.Paypal.Equals(input.Paypal)) - ) && - ( - this.Payto == input.Payto || - (this.Payto != null && - this.Payto.Equals(input.Payto)) - ) && - ( - this.Pulse == input.Pulse || - (this.Pulse != null && - this.Pulse.Equals(input.Pulse)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.Sodexo == input.Sodexo || - (this.Sodexo != null && - this.Sodexo.Equals(input.Sodexo)) - ) && - ( - this.Sofort == input.Sofort || - (this.Sofort != null && - this.Sofort.Equals(input.Sofort)) - ) && - ( - this.Star == input.Star || - (this.Star != null && - this.Star.Equals(input.Star)) - ) && - ( - this.StoreIds == input.StoreIds || - this.StoreIds != null && - input.StoreIds != null && - this.StoreIds.SequenceEqual(input.StoreIds) - ) && - ( - this.Swish == input.Swish || - (this.Swish != null && - this.Swish.Equals(input.Swish)) - ) && - ( - this.Ticket == input.Ticket || - (this.Ticket != null && - this.Ticket.Equals(input.Ticket)) - ) && - ( - this.Twint == input.Twint || - (this.Twint != null && - this.Twint.Equals(input.Twint)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.Vipps == input.Vipps || - (this.Vipps != null && - this.Vipps.Equals(input.Vipps)) - ) && - ( - this.Visa == input.Visa || - (this.Visa != null && - this.Visa.Equals(input.Visa)) - ) && - ( - this.Wechatpay == input.Wechatpay || - (this.Wechatpay != null && - this.Wechatpay.Equals(input.Wechatpay)) - ) && - ( - this.WechatpayPos == input.WechatpayPos || - (this.WechatpayPos != null && - this.WechatpayPos.Equals(input.WechatpayPos)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Accel != null) - { - hashCode = (hashCode * 59) + this.Accel.GetHashCode(); - } - if (this.Affirm != null) - { - hashCode = (hashCode * 59) + this.Affirm.GetHashCode(); - } - if (this.AfterpayTouch != null) - { - hashCode = (hashCode * 59) + this.AfterpayTouch.GetHashCode(); - } - if (this.Amex != null) - { - hashCode = (hashCode * 59) + this.Amex.GetHashCode(); - } - if (this.ApplePay != null) - { - hashCode = (hashCode * 59) + this.ApplePay.GetHashCode(); - } - if (this.Bcmc != null) - { - hashCode = (hashCode * 59) + this.Bcmc.GetHashCode(); - } - if (this.BusinessLineId != null) - { - hashCode = (hashCode * 59) + this.BusinessLineId.GetHashCode(); - } - if (this.CartesBancaires != null) - { - hashCode = (hashCode * 59) + this.CartesBancaires.GetHashCode(); - } - if (this.Clearpay != null) - { - hashCode = (hashCode * 59) + this.Clearpay.GetHashCode(); - } - if (this.Countries != null) - { - hashCode = (hashCode * 59) + this.Countries.GetHashCode(); - } - if (this.Cup != null) - { - hashCode = (hashCode * 59) + this.Cup.GetHashCode(); - } - if (this.Currencies != null) - { - hashCode = (hashCode * 59) + this.Currencies.GetHashCode(); - } - if (this.CustomRoutingFlags != null) - { - hashCode = (hashCode * 59) + this.CustomRoutingFlags.GetHashCode(); - } - if (this.Diners != null) - { - hashCode = (hashCode * 59) + this.Diners.GetHashCode(); - } - if (this.Discover != null) - { - hashCode = (hashCode * 59) + this.Discover.GetHashCode(); - } - if (this.EftDirectdebitCA != null) - { - hashCode = (hashCode * 59) + this.EftDirectdebitCA.GetHashCode(); - } - if (this.EftposAustralia != null) - { - hashCode = (hashCode * 59) + this.EftposAustralia.GetHashCode(); - } - if (this.GiroPay != null) - { - hashCode = (hashCode * 59) + this.GiroPay.GetHashCode(); - } - if (this.Girocard != null) - { - hashCode = (hashCode * 59) + this.Girocard.GetHashCode(); - } - if (this.GooglePay != null) - { - hashCode = (hashCode * 59) + this.GooglePay.GetHashCode(); - } - if (this.Ideal != null) - { - hashCode = (hashCode * 59) + this.Ideal.GetHashCode(); - } - if (this.InteracCard != null) - { - hashCode = (hashCode * 59) + this.InteracCard.GetHashCode(); - } - if (this.Jcb != null) - { - hashCode = (hashCode * 59) + this.Jcb.GetHashCode(); - } - if (this.Klarna != null) - { - hashCode = (hashCode * 59) + this.Klarna.GetHashCode(); - } - if (this.Maestro != null) - { - hashCode = (hashCode * 59) + this.Maestro.GetHashCode(); - } - if (this.Mc != null) - { - hashCode = (hashCode * 59) + this.Mc.GetHashCode(); - } - if (this.MealVoucherFR != null) - { - hashCode = (hashCode * 59) + this.MealVoucherFR.GetHashCode(); - } - if (this.Nyce != null) - { - hashCode = (hashCode * 59) + this.Nyce.GetHashCode(); - } - if (this.Payme != null) - { - hashCode = (hashCode * 59) + this.Payme.GetHashCode(); - } - if (this.Paypal != null) - { - hashCode = (hashCode * 59) + this.Paypal.GetHashCode(); - } - if (this.Payto != null) - { - hashCode = (hashCode * 59) + this.Payto.GetHashCode(); - } - if (this.Pulse != null) - { - hashCode = (hashCode * 59) + this.Pulse.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.Sodexo != null) - { - hashCode = (hashCode * 59) + this.Sodexo.GetHashCode(); - } - if (this.Sofort != null) - { - hashCode = (hashCode * 59) + this.Sofort.GetHashCode(); - } - if (this.Star != null) - { - hashCode = (hashCode * 59) + this.Star.GetHashCode(); - } - if (this.StoreIds != null) - { - hashCode = (hashCode * 59) + this.StoreIds.GetHashCode(); - } - if (this.Swish != null) - { - hashCode = (hashCode * 59) + this.Swish.GetHashCode(); - } - if (this.Ticket != null) - { - hashCode = (hashCode * 59) + this.Ticket.GetHashCode(); - } - if (this.Twint != null) - { - hashCode = (hashCode * 59) + this.Twint.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.Vipps != null) - { - hashCode = (hashCode * 59) + this.Vipps.GetHashCode(); - } - if (this.Visa != null) - { - hashCode = (hashCode * 59) + this.Visa.GetHashCode(); - } - if (this.Wechatpay != null) - { - hashCode = (hashCode * 59) + this.Wechatpay.GetHashCode(); - } - if (this.WechatpayPos != null) - { - hashCode = (hashCode * 59) + this.WechatpayPos.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PayoutSettings.cs b/Adyen/Model/Management/PayoutSettings.cs deleted file mode 100644 index 247f26c49..000000000 --- a/Adyen/Model/Management/PayoutSettings.cs +++ /dev/null @@ -1,292 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PayoutSettings - /// - [DataContract(Name = "PayoutSettings")] - public partial class PayoutSettings : IEquatable, IValidatableObject - { - /// - /// Determines how long it takes for the funds to reach the bank account. Adyen pays out based on the [payout frequency](https://docs.adyen.com/account/getting-paid#payout-frequency). Depending on the currencies and banks involved in transferring the money, it may take up to three days for the payout funds to arrive in the bank account. Possible values: * **first**: same day. * **urgent**: the next day. * **normal**: between 1 and 3 days. - /// - /// Determines how long it takes for the funds to reach the bank account. Adyen pays out based on the [payout frequency](https://docs.adyen.com/account/getting-paid#payout-frequency). Depending on the currencies and banks involved in transferring the money, it may take up to three days for the payout funds to arrive in the bank account. Possible values: * **first**: same day. * **urgent**: the next day. * **normal**: between 1 and 3 days. - [JsonConverter(typeof(StringEnumConverter))] - public enum PriorityEnum - { - /// - /// Enum First for value: first - /// - [EnumMember(Value = "first")] - First = 1, - - /// - /// Enum Normal for value: normal - /// - [EnumMember(Value = "normal")] - Normal = 2, - - /// - /// Enum Urgent for value: urgent - /// - [EnumMember(Value = "urgent")] - Urgent = 3 - - } - - - /// - /// Determines how long it takes for the funds to reach the bank account. Adyen pays out based on the [payout frequency](https://docs.adyen.com/account/getting-paid#payout-frequency). Depending on the currencies and banks involved in transferring the money, it may take up to three days for the payout funds to arrive in the bank account. Possible values: * **first**: same day. * **urgent**: the next day. * **normal**: between 1 and 3 days. - /// - /// Determines how long it takes for the funds to reach the bank account. Adyen pays out based on the [payout frequency](https://docs.adyen.com/account/getting-paid#payout-frequency). Depending on the currencies and banks involved in transferring the money, it may take up to three days for the payout funds to arrive in the bank account. Possible values: * **first**: same day. * **urgent**: the next day. * **normal**: between 1 and 3 days. - [DataMember(Name = "priority", EmitDefaultValue = false)] - public PriorityEnum? Priority { get; set; } - /// - /// The status of the verification process for the bank account. Possible values: * **valid**: the verification was successful. * **pending**: the verification is in progress. * **invalid**: the information provided is not complete. * **rejected**: there are reasons to refuse working with this entity. - /// - /// The status of the verification process for the bank account. Possible values: * **valid**: the verification was successful. * **pending**: the verification is in progress. * **invalid**: the information provided is not complete. * **rejected**: there are reasons to refuse working with this entity. - [JsonConverter(typeof(StringEnumConverter))] - public enum VerificationStatusEnum - { - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 3, - - /// - /// Enum Valid for value: valid - /// - [EnumMember(Value = "valid")] - Valid = 4 - - } - - - /// - /// The status of the verification process for the bank account. Possible values: * **valid**: the verification was successful. * **pending**: the verification is in progress. * **invalid**: the information provided is not complete. * **rejected**: there are reasons to refuse working with this entity. - /// - /// The status of the verification process for the bank account. Possible values: * **valid**: the verification was successful. * **pending**: the verification is in progress. * **invalid**: the information provided is not complete. * **rejected**: there are reasons to refuse working with this entity. - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public VerificationStatusEnum? VerificationStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayoutSettings() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates if payouts to the bank account are allowed. This value is set automatically based on the status of the verification process. The value is: * **true** if `verificationStatus` is **valid**. * **false** for all other values.. - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**.. - /// The date when Adyen starts paying out to this bank account. Format: [ISO 8601](https://www.w3.org/TR/NOTE-datetime), for example, **2019-11-23T12:25:28Z** or **2020-05-27T20:25:28+08:00**. If not specified, the `enabled` field indicates if payouts are enabled for this bank account. If a date is specified and: * `enabled`: **true**, payouts are enabled starting the specified date. * `enabled`: **false**, payouts are disabled until the specified date. On the specified date, `enabled` changes to **true** and this field is reset to **null**.. - /// The unique identifier of the payout setting. (required). - /// Determines how long it takes for the funds to reach the bank account. Adyen pays out based on the [payout frequency](https://docs.adyen.com/account/getting-paid#payout-frequency). Depending on the currencies and banks involved in transferring the money, it may take up to three days for the payout funds to arrive in the bank account. Possible values: * **first**: same day. * **urgent**: the next day. * **normal**: between 1 and 3 days.. - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments) that contains the details of the bank account. (required). - /// The status of the verification process for the bank account. Possible values: * **valid**: the verification was successful. * **pending**: the verification is in progress. * **invalid**: the information provided is not complete. * **rejected**: there are reasons to refuse working with this entity.. - public PayoutSettings(bool? allowed = default(bool?), bool? enabled = default(bool?), string enabledFromDate = default(string), string id = default(string), PriorityEnum? priority = default(PriorityEnum?), string transferInstrumentId = default(string), VerificationStatusEnum? verificationStatus = default(VerificationStatusEnum?)) - { - this.Id = id; - this.TransferInstrumentId = transferInstrumentId; - this.Allowed = allowed; - this.Enabled = enabled; - this.EnabledFromDate = enabledFromDate; - this.Priority = priority; - this.VerificationStatus = verificationStatus; - } - - /// - /// Indicates if payouts to the bank account are allowed. This value is set automatically based on the status of the verification process. The value is: * **true** if `verificationStatus` is **valid**. * **false** for all other values. - /// - /// Indicates if payouts to the bank account are allowed. This value is set automatically based on the status of the verification process. The value is: * **true** if `verificationStatus` is **valid**. * **false** for all other values. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; set; } - - /// - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**. - /// - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**. - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// The date when Adyen starts paying out to this bank account. Format: [ISO 8601](https://www.w3.org/TR/NOTE-datetime), for example, **2019-11-23T12:25:28Z** or **2020-05-27T20:25:28+08:00**. If not specified, the `enabled` field indicates if payouts are enabled for this bank account. If a date is specified and: * `enabled`: **true**, payouts are enabled starting the specified date. * `enabled`: **false**, payouts are disabled until the specified date. On the specified date, `enabled` changes to **true** and this field is reset to **null**. - /// - /// The date when Adyen starts paying out to this bank account. Format: [ISO 8601](https://www.w3.org/TR/NOTE-datetime), for example, **2019-11-23T12:25:28Z** or **2020-05-27T20:25:28+08:00**. If not specified, the `enabled` field indicates if payouts are enabled for this bank account. If a date is specified and: * `enabled`: **true**, payouts are enabled starting the specified date. * `enabled`: **false**, payouts are disabled until the specified date. On the specified date, `enabled` changes to **true** and this field is reset to **null**. - [DataMember(Name = "enabledFromDate", EmitDefaultValue = false)] - public string EnabledFromDate { get; set; } - - /// - /// The unique identifier of the payout setting. - /// - /// The unique identifier of the payout setting. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments) that contains the details of the bank account. - /// - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments) that contains the details of the bank account. - [DataMember(Name = "transferInstrumentId", IsRequired = false, EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutSettings {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" EnabledFromDate: ").Append(EnabledFromDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Priority: ").Append(Priority).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutSettings); - } - - /// - /// Returns true if PayoutSettings instances are equal - /// - /// Instance of PayoutSettings to be compared - /// Boolean - public bool Equals(PayoutSettings input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.EnabledFromDate == input.EnabledFromDate || - (this.EnabledFromDate != null && - this.EnabledFromDate.Equals(input.EnabledFromDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Priority == input.Priority || - this.Priority.Equals(input.Priority) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - this.VerificationStatus.Equals(input.VerificationStatus) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.EnabledFromDate != null) - { - hashCode = (hashCode * 59) + this.EnabledFromDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priority.GetHashCode(); - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PayoutSettingsRequest.cs b/Adyen/Model/Management/PayoutSettingsRequest.cs deleted file mode 100644 index 5e4ae632b..000000000 --- a/Adyen/Model/Management/PayoutSettingsRequest.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PayoutSettingsRequest - /// - [DataContract(Name = "PayoutSettingsRequest")] - public partial class PayoutSettingsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayoutSettingsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**.. - /// The date when Adyen starts paying out to this bank account. Format: [ISO 8601](https://www.w3.org/TR/NOTE-datetime), for example, **2019-11-23T12:25:28Z** or **2020-05-27T20:25:28+08:00**. If not specified, the `enabled` field indicates if payouts are enabled for this bank account. If a date is specified and: * `enabled`: **true**, payouts are enabled starting the specified date. * `enabled`: **false**, payouts are disabled until the specified date. On the specified date, `enabled` changes to **true** and this field is reset to **null**.. - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments) that contains the details of the bank account. (required). - public PayoutSettingsRequest(bool? enabled = default(bool?), string enabledFromDate = default(string), string transferInstrumentId = default(string)) - { - this.TransferInstrumentId = transferInstrumentId; - this.Enabled = enabled; - this.EnabledFromDate = enabledFromDate; - } - - /// - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**. - /// - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**. - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// The date when Adyen starts paying out to this bank account. Format: [ISO 8601](https://www.w3.org/TR/NOTE-datetime), for example, **2019-11-23T12:25:28Z** or **2020-05-27T20:25:28+08:00**. If not specified, the `enabled` field indicates if payouts are enabled for this bank account. If a date is specified and: * `enabled`: **true**, payouts are enabled starting the specified date. * `enabled`: **false**, payouts are disabled until the specified date. On the specified date, `enabled` changes to **true** and this field is reset to **null**. - /// - /// The date when Adyen starts paying out to this bank account. Format: [ISO 8601](https://www.w3.org/TR/NOTE-datetime), for example, **2019-11-23T12:25:28Z** or **2020-05-27T20:25:28+08:00**. If not specified, the `enabled` field indicates if payouts are enabled for this bank account. If a date is specified and: * `enabled`: **true**, payouts are enabled starting the specified date. * `enabled`: **false**, payouts are disabled until the specified date. On the specified date, `enabled` changes to **true** and this field is reset to **null**. - [DataMember(Name = "enabledFromDate", EmitDefaultValue = false)] - public string EnabledFromDate { get; set; } - - /// - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments) that contains the details of the bank account. - /// - /// The unique identifier of the [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments) that contains the details of the bank account. - [DataMember(Name = "transferInstrumentId", IsRequired = false, EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutSettingsRequest {\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" EnabledFromDate: ").Append(EnabledFromDate).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutSettingsRequest); - } - - /// - /// Returns true if PayoutSettingsRequest instances are equal - /// - /// Instance of PayoutSettingsRequest to be compared - /// Boolean - public bool Equals(PayoutSettingsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.EnabledFromDate == input.EnabledFromDate || - (this.EnabledFromDate != null && - this.EnabledFromDate.Equals(input.EnabledFromDate)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.EnabledFromDate != null) - { - hashCode = (hashCode * 59) + this.EnabledFromDate.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PayoutSettingsResponse.cs b/Adyen/Model/Management/PayoutSettingsResponse.cs deleted file mode 100644 index 9baf3b1ca..000000000 --- a/Adyen/Model/Management/PayoutSettingsResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PayoutSettingsResponse - /// - [DataContract(Name = "PayoutSettingsResponse")] - public partial class PayoutSettingsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of payout accounts.. - public PayoutSettingsResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// The list of payout accounts. - /// - /// The list of payout accounts. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutSettingsResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutSettingsResponse); - } - - /// - /// Returns true if PayoutSettingsResponse instances are equal - /// - /// Instance of PayoutSettingsResponse to be compared - /// Boolean - public bool Equals(PayoutSettingsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Profile.cs b/Adyen/Model/Management/Profile.cs deleted file mode 100644 index f50668620..000000000 --- a/Adyen/Model/Management/Profile.cs +++ /dev/null @@ -1,437 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Profile - /// - [DataContract(Name = "Profile")] - public partial class Profile : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Profile() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of Wi-Fi network. Possible values: **wpa-psk**, **wpa2-psk**, **wpa-eap**, **wpa2-eap**. (required). - /// Indicates whether to automatically select the best authentication method available. Does not work on older terminal models.. - /// Use **infra** for infrastructure-based networks. This applies to most networks. Use **adhoc** only if the communication is p2p-based between base stations. (required). - /// The channel number of the Wi-Fi network. The recommended setting is **0** for automatic channel selection.. - /// Indicates whether this is your preferred wireless network. If **true**, the terminal will try connecting to this network first.. - /// For `authType` **wpa-eap** or **wpa2-eap**. Possible values: **tls**, **peap**, **leap**, **fast**. - /// eapCaCert. - /// eapClientCert. - /// eapClientKey. - /// For `eap` **tls**. The password of the RSA key file, if that file is password-protected.. - /// For `authType` **wpa-eap** or **wpa2-eap**. The EAP-PEAP username from your MS-CHAP account. Must match the configuration of your RADIUS server.. - /// eapIntermediateCert. - /// For `eap` **peap**. The EAP-PEAP password from your MS-CHAP account. Must match the configuration of your RADIUS server.. - /// Indicates if the network doesn't broadcast its SSID. Mandatory for Android terminals, because these terminals rely on this setting to be able to connect to any network.. - /// Your name for the Wi-Fi profile.. - /// For `authType` **wpa-psk or **wpa2-psk**. The password to the wireless network.. - /// The name of the wireless network. (required). - /// The type of encryption. Possible values: **auto**, **ccmp** (recommended), **tkip** (required). - public Profile(string authType = default(string), bool? autoWifi = default(bool?), string bssType = default(string), int? channel = default(int?), bool? defaultProfile = default(bool?), string eap = default(string), File eapCaCert = default(File), File eapClientCert = default(File), File eapClientKey = default(File), string eapClientPwd = default(string), string eapIdentity = default(string), File eapIntermediateCert = default(File), string eapPwd = default(string), bool? hiddenSsid = default(bool?), string name = default(string), string psk = default(string), string ssid = default(string), string wsec = default(string)) - { - this.AuthType = authType; - this.BssType = bssType; - this.Ssid = ssid; - this.Wsec = wsec; - this.AutoWifi = autoWifi; - this.Channel = channel; - this.DefaultProfile = defaultProfile; - this.Eap = eap; - this.EapCaCert = eapCaCert; - this.EapClientCert = eapClientCert; - this.EapClientKey = eapClientKey; - this.EapClientPwd = eapClientPwd; - this.EapIdentity = eapIdentity; - this.EapIntermediateCert = eapIntermediateCert; - this.EapPwd = eapPwd; - this.HiddenSsid = hiddenSsid; - this.Name = name; - this.Psk = psk; - } - - /// - /// The type of Wi-Fi network. Possible values: **wpa-psk**, **wpa2-psk**, **wpa-eap**, **wpa2-eap**. - /// - /// The type of Wi-Fi network. Possible values: **wpa-psk**, **wpa2-psk**, **wpa-eap**, **wpa2-eap**. - [DataMember(Name = "authType", IsRequired = false, EmitDefaultValue = false)] - public string AuthType { get; set; } - - /// - /// Indicates whether to automatically select the best authentication method available. Does not work on older terminal models. - /// - /// Indicates whether to automatically select the best authentication method available. Does not work on older terminal models. - [DataMember(Name = "autoWifi", EmitDefaultValue = false)] - public bool? AutoWifi { get; set; } - - /// - /// Use **infra** for infrastructure-based networks. This applies to most networks. Use **adhoc** only if the communication is p2p-based between base stations. - /// - /// Use **infra** for infrastructure-based networks. This applies to most networks. Use **adhoc** only if the communication is p2p-based between base stations. - [DataMember(Name = "bssType", IsRequired = false, EmitDefaultValue = false)] - public string BssType { get; set; } - - /// - /// The channel number of the Wi-Fi network. The recommended setting is **0** for automatic channel selection. - /// - /// The channel number of the Wi-Fi network. The recommended setting is **0** for automatic channel selection. - [DataMember(Name = "channel", EmitDefaultValue = false)] - public int? Channel { get; set; } - - /// - /// Indicates whether this is your preferred wireless network. If **true**, the terminal will try connecting to this network first. - /// - /// Indicates whether this is your preferred wireless network. If **true**, the terminal will try connecting to this network first. - [DataMember(Name = "defaultProfile", EmitDefaultValue = false)] - public bool? DefaultProfile { get; set; } - - /// - /// For `authType` **wpa-eap** or **wpa2-eap**. Possible values: **tls**, **peap**, **leap**, **fast** - /// - /// For `authType` **wpa-eap** or **wpa2-eap**. Possible values: **tls**, **peap**, **leap**, **fast** - [DataMember(Name = "eap", EmitDefaultValue = false)] - public string Eap { get; set; } - - /// - /// Gets or Sets EapCaCert - /// - [DataMember(Name = "eapCaCert", EmitDefaultValue = false)] - public File EapCaCert { get; set; } - - /// - /// Gets or Sets EapClientCert - /// - [DataMember(Name = "eapClientCert", EmitDefaultValue = false)] - public File EapClientCert { get; set; } - - /// - /// Gets or Sets EapClientKey - /// - [DataMember(Name = "eapClientKey", EmitDefaultValue = false)] - public File EapClientKey { get; set; } - - /// - /// For `eap` **tls**. The password of the RSA key file, if that file is password-protected. - /// - /// For `eap` **tls**. The password of the RSA key file, if that file is password-protected. - [DataMember(Name = "eapClientPwd", EmitDefaultValue = false)] - public string EapClientPwd { get; set; } - - /// - /// For `authType` **wpa-eap** or **wpa2-eap**. The EAP-PEAP username from your MS-CHAP account. Must match the configuration of your RADIUS server. - /// - /// For `authType` **wpa-eap** or **wpa2-eap**. The EAP-PEAP username from your MS-CHAP account. Must match the configuration of your RADIUS server. - [DataMember(Name = "eapIdentity", EmitDefaultValue = false)] - public string EapIdentity { get; set; } - - /// - /// Gets or Sets EapIntermediateCert - /// - [DataMember(Name = "eapIntermediateCert", EmitDefaultValue = false)] - public File EapIntermediateCert { get; set; } - - /// - /// For `eap` **peap**. The EAP-PEAP password from your MS-CHAP account. Must match the configuration of your RADIUS server. - /// - /// For `eap` **peap**. The EAP-PEAP password from your MS-CHAP account. Must match the configuration of your RADIUS server. - [DataMember(Name = "eapPwd", EmitDefaultValue = false)] - public string EapPwd { get; set; } - - /// - /// Indicates if the network doesn't broadcast its SSID. Mandatory for Android terminals, because these terminals rely on this setting to be able to connect to any network. - /// - /// Indicates if the network doesn't broadcast its SSID. Mandatory for Android terminals, because these terminals rely on this setting to be able to connect to any network. - [DataMember(Name = "hiddenSsid", EmitDefaultValue = false)] - public bool? HiddenSsid { get; set; } - - /// - /// Your name for the Wi-Fi profile. - /// - /// Your name for the Wi-Fi profile. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// For `authType` **wpa-psk or **wpa2-psk**. The password to the wireless network. - /// - /// For `authType` **wpa-psk or **wpa2-psk**. The password to the wireless network. - [DataMember(Name = "psk", EmitDefaultValue = false)] - public string Psk { get; set; } - - /// - /// The name of the wireless network. - /// - /// The name of the wireless network. - [DataMember(Name = "ssid", IsRequired = false, EmitDefaultValue = false)] - public string Ssid { get; set; } - - /// - /// The type of encryption. Possible values: **auto**, **ccmp** (recommended), **tkip** - /// - /// The type of encryption. Possible values: **auto**, **ccmp** (recommended), **tkip** - [DataMember(Name = "wsec", IsRequired = false, EmitDefaultValue = false)] - public string Wsec { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Profile {\n"); - sb.Append(" AuthType: ").Append(AuthType).Append("\n"); - sb.Append(" AutoWifi: ").Append(AutoWifi).Append("\n"); - sb.Append(" BssType: ").Append(BssType).Append("\n"); - sb.Append(" Channel: ").Append(Channel).Append("\n"); - sb.Append(" DefaultProfile: ").Append(DefaultProfile).Append("\n"); - sb.Append(" Eap: ").Append(Eap).Append("\n"); - sb.Append(" EapCaCert: ").Append(EapCaCert).Append("\n"); - sb.Append(" EapClientCert: ").Append(EapClientCert).Append("\n"); - sb.Append(" EapClientKey: ").Append(EapClientKey).Append("\n"); - sb.Append(" EapClientPwd: ").Append(EapClientPwd).Append("\n"); - sb.Append(" EapIdentity: ").Append(EapIdentity).Append("\n"); - sb.Append(" EapIntermediateCert: ").Append(EapIntermediateCert).Append("\n"); - sb.Append(" EapPwd: ").Append(EapPwd).Append("\n"); - sb.Append(" HiddenSsid: ").Append(HiddenSsid).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Psk: ").Append(Psk).Append("\n"); - sb.Append(" Ssid: ").Append(Ssid).Append("\n"); - sb.Append(" Wsec: ").Append(Wsec).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Profile); - } - - /// - /// Returns true if Profile instances are equal - /// - /// Instance of Profile to be compared - /// Boolean - public bool Equals(Profile input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthType == input.AuthType || - (this.AuthType != null && - this.AuthType.Equals(input.AuthType)) - ) && - ( - this.AutoWifi == input.AutoWifi || - this.AutoWifi.Equals(input.AutoWifi) - ) && - ( - this.BssType == input.BssType || - (this.BssType != null && - this.BssType.Equals(input.BssType)) - ) && - ( - this.Channel == input.Channel || - this.Channel.Equals(input.Channel) - ) && - ( - this.DefaultProfile == input.DefaultProfile || - this.DefaultProfile.Equals(input.DefaultProfile) - ) && - ( - this.Eap == input.Eap || - (this.Eap != null && - this.Eap.Equals(input.Eap)) - ) && - ( - this.EapCaCert == input.EapCaCert || - (this.EapCaCert != null && - this.EapCaCert.Equals(input.EapCaCert)) - ) && - ( - this.EapClientCert == input.EapClientCert || - (this.EapClientCert != null && - this.EapClientCert.Equals(input.EapClientCert)) - ) && - ( - this.EapClientKey == input.EapClientKey || - (this.EapClientKey != null && - this.EapClientKey.Equals(input.EapClientKey)) - ) && - ( - this.EapClientPwd == input.EapClientPwd || - (this.EapClientPwd != null && - this.EapClientPwd.Equals(input.EapClientPwd)) - ) && - ( - this.EapIdentity == input.EapIdentity || - (this.EapIdentity != null && - this.EapIdentity.Equals(input.EapIdentity)) - ) && - ( - this.EapIntermediateCert == input.EapIntermediateCert || - (this.EapIntermediateCert != null && - this.EapIntermediateCert.Equals(input.EapIntermediateCert)) - ) && - ( - this.EapPwd == input.EapPwd || - (this.EapPwd != null && - this.EapPwd.Equals(input.EapPwd)) - ) && - ( - this.HiddenSsid == input.HiddenSsid || - this.HiddenSsid.Equals(input.HiddenSsid) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Psk == input.Psk || - (this.Psk != null && - this.Psk.Equals(input.Psk)) - ) && - ( - this.Ssid == input.Ssid || - (this.Ssid != null && - this.Ssid.Equals(input.Ssid)) - ) && - ( - this.Wsec == input.Wsec || - (this.Wsec != null && - this.Wsec.Equals(input.Wsec)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthType != null) - { - hashCode = (hashCode * 59) + this.AuthType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AutoWifi.GetHashCode(); - if (this.BssType != null) - { - hashCode = (hashCode * 59) + this.BssType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - hashCode = (hashCode * 59) + this.DefaultProfile.GetHashCode(); - if (this.Eap != null) - { - hashCode = (hashCode * 59) + this.Eap.GetHashCode(); - } - if (this.EapCaCert != null) - { - hashCode = (hashCode * 59) + this.EapCaCert.GetHashCode(); - } - if (this.EapClientCert != null) - { - hashCode = (hashCode * 59) + this.EapClientCert.GetHashCode(); - } - if (this.EapClientKey != null) - { - hashCode = (hashCode * 59) + this.EapClientKey.GetHashCode(); - } - if (this.EapClientPwd != null) - { - hashCode = (hashCode * 59) + this.EapClientPwd.GetHashCode(); - } - if (this.EapIdentity != null) - { - hashCode = (hashCode * 59) + this.EapIdentity.GetHashCode(); - } - if (this.EapIntermediateCert != null) - { - hashCode = (hashCode * 59) + this.EapIntermediateCert.GetHashCode(); - } - if (this.EapPwd != null) - { - hashCode = (hashCode * 59) + this.EapPwd.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HiddenSsid.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Psk != null) - { - hashCode = (hashCode * 59) + this.Psk.GetHashCode(); - } - if (this.Ssid != null) - { - hashCode = (hashCode * 59) + this.Ssid.GetHashCode(); - } - if (this.Wsec != null) - { - hashCode = (hashCode * 59) + this.Wsec.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/PulseInfo.cs b/Adyen/Model/Management/PulseInfo.cs deleted file mode 100644 index ab83e53d3..000000000 --- a/Adyen/Model/Management/PulseInfo.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// PulseInfo - /// - [DataContract(Name = "PulseInfo")] - public partial class PulseInfo : IEquatable, IValidatableObject - { - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ProcessingTypeEnum - { - /// - /// Enum Billpay for value: billpay - /// - [EnumMember(Value = "billpay")] - Billpay = 1, - - /// - /// Enum Ecom for value: ecom - /// - [EnumMember(Value = "ecom")] - Ecom = 2, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 3 - - } - - - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - [DataMember(Name = "processingType", IsRequired = false, EmitDefaultValue = false)] - public ProcessingTypeEnum ProcessingType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PulseInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. (required). - /// transactionDescription. - public PulseInfo(ProcessingTypeEnum processingType = default(ProcessingTypeEnum), TransactionDescriptionInfo transactionDescription = default(TransactionDescriptionInfo)) - { - this.ProcessingType = processingType; - this.TransactionDescription = transactionDescription; - } - - /// - /// Gets or Sets TransactionDescription - /// - [DataMember(Name = "transactionDescription", EmitDefaultValue = false)] - public TransactionDescriptionInfo TransactionDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PulseInfo {\n"); - sb.Append(" ProcessingType: ").Append(ProcessingType).Append("\n"); - sb.Append(" TransactionDescription: ").Append(TransactionDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PulseInfo); - } - - /// - /// Returns true if PulseInfo instances are equal - /// - /// Instance of PulseInfo to be compared - /// Boolean - public bool Equals(PulseInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ProcessingType == input.ProcessingType || - this.ProcessingType.Equals(input.ProcessingType) - ) && - ( - this.TransactionDescription == input.TransactionDescription || - (this.TransactionDescription != null && - this.TransactionDescription.Equals(input.TransactionDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ProcessingType.GetHashCode(); - if (this.TransactionDescription != null) - { - hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ReceiptOptions.cs b/Adyen/Model/Management/ReceiptOptions.cs deleted file mode 100644 index d6c86ed29..000000000 --- a/Adyen/Model/Management/ReceiptOptions.cs +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ReceiptOptions - /// - [DataContract(Name = "ReceiptOptions")] - public partial class ReceiptOptions : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px.. - /// Indicates whether a screen appears asking if you want to print the shopper receipt.. - /// Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**.. - public ReceiptOptions(string logo = default(string), bool? promptBeforePrinting = default(bool?), string qrCodeData = default(string)) - { - this.Logo = logo; - this.PromptBeforePrinting = promptBeforePrinting; - this.QrCodeData = qrCodeData; - } - - /// - /// The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px. - /// - /// The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px. - [DataMember(Name = "logo", EmitDefaultValue = false)] - public string Logo { get; set; } - - /// - /// Indicates whether a screen appears asking if you want to print the shopper receipt. - /// - /// Indicates whether a screen appears asking if you want to print the shopper receipt. - [DataMember(Name = "promptBeforePrinting", EmitDefaultValue = false)] - public bool? PromptBeforePrinting { get; set; } - - /// - /// Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**. - /// - /// Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**. - [DataMember(Name = "qrCodeData", EmitDefaultValue = false)] - public string QrCodeData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReceiptOptions {\n"); - sb.Append(" Logo: ").Append(Logo).Append("\n"); - sb.Append(" PromptBeforePrinting: ").Append(PromptBeforePrinting).Append("\n"); - sb.Append(" QrCodeData: ").Append(QrCodeData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReceiptOptions); - } - - /// - /// Returns true if ReceiptOptions instances are equal - /// - /// Instance of ReceiptOptions to be compared - /// Boolean - public bool Equals(ReceiptOptions input) - { - if (input == null) - { - return false; - } - return - ( - this.Logo == input.Logo || - (this.Logo != null && - this.Logo.Equals(input.Logo)) - ) && - ( - this.PromptBeforePrinting == input.PromptBeforePrinting || - this.PromptBeforePrinting.Equals(input.PromptBeforePrinting) - ) && - ( - this.QrCodeData == input.QrCodeData || - (this.QrCodeData != null && - this.QrCodeData.Equals(input.QrCodeData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Logo != null) - { - hashCode = (hashCode * 59) + this.Logo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PromptBeforePrinting.GetHashCode(); - if (this.QrCodeData != null) - { - hashCode = (hashCode * 59) + this.QrCodeData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Logo (string) maxLength - if (this.Logo != null && this.Logo.Length > 350000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Logo, length must be less than 350000.", new [] { "Logo" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ReceiptPrinting.cs b/Adyen/Model/Management/ReceiptPrinting.cs deleted file mode 100644 index f53dcceb2..000000000 --- a/Adyen/Model/Management/ReceiptPrinting.cs +++ /dev/null @@ -1,350 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ReceiptPrinting - /// - [DataContract(Name = "ReceiptPrinting")] - public partial class ReceiptPrinting : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Print a merchant receipt when the payment is approved.. - /// Print a merchant receipt when the transaction is cancelled.. - /// Print a merchant receipt when capturing the payment is approved.. - /// Print a merchant receipt when capturing the payment is refused.. - /// Print a merchant receipt when the refund is approved.. - /// Print a merchant receipt when the refund is refused.. - /// Print a merchant receipt when the payment is refused.. - /// Print a merchant receipt when a previous transaction is voided.. - /// Print a shopper receipt when the payment is approved.. - /// Print a shopper receipt when the transaction is cancelled.. - /// Print a shopper receipt when capturing the payment is approved.. - /// Print a shopper receipt when capturing the payment is refused.. - /// Print a shopper receipt when the refund is approved.. - /// Print a shopper receipt when the refund is refused.. - /// Print a shopper receipt when the payment is refused.. - /// Print a shopper receipt when a previous transaction is voided.. - public ReceiptPrinting(bool? merchantApproved = default(bool?), bool? merchantCancelled = default(bool?), bool? merchantCaptureApproved = default(bool?), bool? merchantCaptureRefused = default(bool?), bool? merchantRefundApproved = default(bool?), bool? merchantRefundRefused = default(bool?), bool? merchantRefused = default(bool?), bool? merchantVoid = default(bool?), bool? shopperApproved = default(bool?), bool? shopperCancelled = default(bool?), bool? shopperCaptureApproved = default(bool?), bool? shopperCaptureRefused = default(bool?), bool? shopperRefundApproved = default(bool?), bool? shopperRefundRefused = default(bool?), bool? shopperRefused = default(bool?), bool? shopperVoid = default(bool?)) - { - this.MerchantApproved = merchantApproved; - this.MerchantCancelled = merchantCancelled; - this.MerchantCaptureApproved = merchantCaptureApproved; - this.MerchantCaptureRefused = merchantCaptureRefused; - this.MerchantRefundApproved = merchantRefundApproved; - this.MerchantRefundRefused = merchantRefundRefused; - this.MerchantRefused = merchantRefused; - this.MerchantVoid = merchantVoid; - this.ShopperApproved = shopperApproved; - this.ShopperCancelled = shopperCancelled; - this.ShopperCaptureApproved = shopperCaptureApproved; - this.ShopperCaptureRefused = shopperCaptureRefused; - this.ShopperRefundApproved = shopperRefundApproved; - this.ShopperRefundRefused = shopperRefundRefused; - this.ShopperRefused = shopperRefused; - this.ShopperVoid = shopperVoid; - } - - /// - /// Print a merchant receipt when the payment is approved. - /// - /// Print a merchant receipt when the payment is approved. - [DataMember(Name = "merchantApproved", EmitDefaultValue = false)] - public bool? MerchantApproved { get; set; } - - /// - /// Print a merchant receipt when the transaction is cancelled. - /// - /// Print a merchant receipt when the transaction is cancelled. - [DataMember(Name = "merchantCancelled", EmitDefaultValue = false)] - public bool? MerchantCancelled { get; set; } - - /// - /// Print a merchant receipt when capturing the payment is approved. - /// - /// Print a merchant receipt when capturing the payment is approved. - [DataMember(Name = "merchantCaptureApproved", EmitDefaultValue = false)] - public bool? MerchantCaptureApproved { get; set; } - - /// - /// Print a merchant receipt when capturing the payment is refused. - /// - /// Print a merchant receipt when capturing the payment is refused. - [DataMember(Name = "merchantCaptureRefused", EmitDefaultValue = false)] - public bool? MerchantCaptureRefused { get; set; } - - /// - /// Print a merchant receipt when the refund is approved. - /// - /// Print a merchant receipt when the refund is approved. - [DataMember(Name = "merchantRefundApproved", EmitDefaultValue = false)] - public bool? MerchantRefundApproved { get; set; } - - /// - /// Print a merchant receipt when the refund is refused. - /// - /// Print a merchant receipt when the refund is refused. - [DataMember(Name = "merchantRefundRefused", EmitDefaultValue = false)] - public bool? MerchantRefundRefused { get; set; } - - /// - /// Print a merchant receipt when the payment is refused. - /// - /// Print a merchant receipt when the payment is refused. - [DataMember(Name = "merchantRefused", EmitDefaultValue = false)] - public bool? MerchantRefused { get; set; } - - /// - /// Print a merchant receipt when a previous transaction is voided. - /// - /// Print a merchant receipt when a previous transaction is voided. - [DataMember(Name = "merchantVoid", EmitDefaultValue = false)] - public bool? MerchantVoid { get; set; } - - /// - /// Print a shopper receipt when the payment is approved. - /// - /// Print a shopper receipt when the payment is approved. - [DataMember(Name = "shopperApproved", EmitDefaultValue = false)] - public bool? ShopperApproved { get; set; } - - /// - /// Print a shopper receipt when the transaction is cancelled. - /// - /// Print a shopper receipt when the transaction is cancelled. - [DataMember(Name = "shopperCancelled", EmitDefaultValue = false)] - public bool? ShopperCancelled { get; set; } - - /// - /// Print a shopper receipt when capturing the payment is approved. - /// - /// Print a shopper receipt when capturing the payment is approved. - [DataMember(Name = "shopperCaptureApproved", EmitDefaultValue = false)] - public bool? ShopperCaptureApproved { get; set; } - - /// - /// Print a shopper receipt when capturing the payment is refused. - /// - /// Print a shopper receipt when capturing the payment is refused. - [DataMember(Name = "shopperCaptureRefused", EmitDefaultValue = false)] - public bool? ShopperCaptureRefused { get; set; } - - /// - /// Print a shopper receipt when the refund is approved. - /// - /// Print a shopper receipt when the refund is approved. - [DataMember(Name = "shopperRefundApproved", EmitDefaultValue = false)] - public bool? ShopperRefundApproved { get; set; } - - /// - /// Print a shopper receipt when the refund is refused. - /// - /// Print a shopper receipt when the refund is refused. - [DataMember(Name = "shopperRefundRefused", EmitDefaultValue = false)] - public bool? ShopperRefundRefused { get; set; } - - /// - /// Print a shopper receipt when the payment is refused. - /// - /// Print a shopper receipt when the payment is refused. - [DataMember(Name = "shopperRefused", EmitDefaultValue = false)] - public bool? ShopperRefused { get; set; } - - /// - /// Print a shopper receipt when a previous transaction is voided. - /// - /// Print a shopper receipt when a previous transaction is voided. - [DataMember(Name = "shopperVoid", EmitDefaultValue = false)] - public bool? ShopperVoid { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReceiptPrinting {\n"); - sb.Append(" MerchantApproved: ").Append(MerchantApproved).Append("\n"); - sb.Append(" MerchantCancelled: ").Append(MerchantCancelled).Append("\n"); - sb.Append(" MerchantCaptureApproved: ").Append(MerchantCaptureApproved).Append("\n"); - sb.Append(" MerchantCaptureRefused: ").Append(MerchantCaptureRefused).Append("\n"); - sb.Append(" MerchantRefundApproved: ").Append(MerchantRefundApproved).Append("\n"); - sb.Append(" MerchantRefundRefused: ").Append(MerchantRefundRefused).Append("\n"); - sb.Append(" MerchantRefused: ").Append(MerchantRefused).Append("\n"); - sb.Append(" MerchantVoid: ").Append(MerchantVoid).Append("\n"); - sb.Append(" ShopperApproved: ").Append(ShopperApproved).Append("\n"); - sb.Append(" ShopperCancelled: ").Append(ShopperCancelled).Append("\n"); - sb.Append(" ShopperCaptureApproved: ").Append(ShopperCaptureApproved).Append("\n"); - sb.Append(" ShopperCaptureRefused: ").Append(ShopperCaptureRefused).Append("\n"); - sb.Append(" ShopperRefundApproved: ").Append(ShopperRefundApproved).Append("\n"); - sb.Append(" ShopperRefundRefused: ").Append(ShopperRefundRefused).Append("\n"); - sb.Append(" ShopperRefused: ").Append(ShopperRefused).Append("\n"); - sb.Append(" ShopperVoid: ").Append(ShopperVoid).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReceiptPrinting); - } - - /// - /// Returns true if ReceiptPrinting instances are equal - /// - /// Instance of ReceiptPrinting to be compared - /// Boolean - public bool Equals(ReceiptPrinting input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantApproved == input.MerchantApproved || - this.MerchantApproved.Equals(input.MerchantApproved) - ) && - ( - this.MerchantCancelled == input.MerchantCancelled || - this.MerchantCancelled.Equals(input.MerchantCancelled) - ) && - ( - this.MerchantCaptureApproved == input.MerchantCaptureApproved || - this.MerchantCaptureApproved.Equals(input.MerchantCaptureApproved) - ) && - ( - this.MerchantCaptureRefused == input.MerchantCaptureRefused || - this.MerchantCaptureRefused.Equals(input.MerchantCaptureRefused) - ) && - ( - this.MerchantRefundApproved == input.MerchantRefundApproved || - this.MerchantRefundApproved.Equals(input.MerchantRefundApproved) - ) && - ( - this.MerchantRefundRefused == input.MerchantRefundRefused || - this.MerchantRefundRefused.Equals(input.MerchantRefundRefused) - ) && - ( - this.MerchantRefused == input.MerchantRefused || - this.MerchantRefused.Equals(input.MerchantRefused) - ) && - ( - this.MerchantVoid == input.MerchantVoid || - this.MerchantVoid.Equals(input.MerchantVoid) - ) && - ( - this.ShopperApproved == input.ShopperApproved || - this.ShopperApproved.Equals(input.ShopperApproved) - ) && - ( - this.ShopperCancelled == input.ShopperCancelled || - this.ShopperCancelled.Equals(input.ShopperCancelled) - ) && - ( - this.ShopperCaptureApproved == input.ShopperCaptureApproved || - this.ShopperCaptureApproved.Equals(input.ShopperCaptureApproved) - ) && - ( - this.ShopperCaptureRefused == input.ShopperCaptureRefused || - this.ShopperCaptureRefused.Equals(input.ShopperCaptureRefused) - ) && - ( - this.ShopperRefundApproved == input.ShopperRefundApproved || - this.ShopperRefundApproved.Equals(input.ShopperRefundApproved) - ) && - ( - this.ShopperRefundRefused == input.ShopperRefundRefused || - this.ShopperRefundRefused.Equals(input.ShopperRefundRefused) - ) && - ( - this.ShopperRefused == input.ShopperRefused || - this.ShopperRefused.Equals(input.ShopperRefused) - ) && - ( - this.ShopperVoid == input.ShopperVoid || - this.ShopperVoid.Equals(input.ShopperVoid) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.MerchantApproved.GetHashCode(); - hashCode = (hashCode * 59) + this.MerchantCancelled.GetHashCode(); - hashCode = (hashCode * 59) + this.MerchantCaptureApproved.GetHashCode(); - hashCode = (hashCode * 59) + this.MerchantCaptureRefused.GetHashCode(); - hashCode = (hashCode * 59) + this.MerchantRefundApproved.GetHashCode(); - hashCode = (hashCode * 59) + this.MerchantRefundRefused.GetHashCode(); - hashCode = (hashCode * 59) + this.MerchantRefused.GetHashCode(); - hashCode = (hashCode * 59) + this.MerchantVoid.GetHashCode(); - hashCode = (hashCode * 59) + this.ShopperApproved.GetHashCode(); - hashCode = (hashCode * 59) + this.ShopperCancelled.GetHashCode(); - hashCode = (hashCode * 59) + this.ShopperCaptureApproved.GetHashCode(); - hashCode = (hashCode * 59) + this.ShopperCaptureRefused.GetHashCode(); - hashCode = (hashCode * 59) + this.ShopperRefundApproved.GetHashCode(); - hashCode = (hashCode * 59) + this.ShopperRefundRefused.GetHashCode(); - hashCode = (hashCode * 59) + this.ShopperRefused.GetHashCode(); - hashCode = (hashCode * 59) + this.ShopperVoid.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Referenced.cs b/Adyen/Model/Management/Referenced.cs deleted file mode 100644 index 7a384ce2f..000000000 --- a/Adyen/Model/Management/Referenced.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Referenced - /// - [DataContract(Name = "Referenced")] - public partial class Referenced : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether referenced refunds are enabled on the standalone terminal.. - public Referenced(bool? enableStandaloneRefunds = default(bool?)) - { - this.EnableStandaloneRefunds = enableStandaloneRefunds; - } - - /// - /// Indicates whether referenced refunds are enabled on the standalone terminal. - /// - /// Indicates whether referenced refunds are enabled on the standalone terminal. - [DataMember(Name = "enableStandaloneRefunds", EmitDefaultValue = false)] - public bool? EnableStandaloneRefunds { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Referenced {\n"); - sb.Append(" EnableStandaloneRefunds: ").Append(EnableStandaloneRefunds).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Referenced); - } - - /// - /// Returns true if Referenced instances are equal - /// - /// Instance of Referenced to be compared - /// Boolean - public bool Equals(Referenced input) - { - if (input == null) - { - return false; - } - return - ( - this.EnableStandaloneRefunds == input.EnableStandaloneRefunds || - this.EnableStandaloneRefunds.Equals(input.EnableStandaloneRefunds) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EnableStandaloneRefunds.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Refunds.cs b/Adyen/Model/Management/Refunds.cs deleted file mode 100644 index cfd89f4df..000000000 --- a/Adyen/Model/Management/Refunds.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Refunds - /// - [DataContract(Name = "Refunds")] - public partial class Refunds : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// referenced. - public Refunds(Referenced referenced = default(Referenced)) - { - this.Referenced = referenced; - } - - /// - /// Gets or Sets Referenced - /// - [DataMember(Name = "referenced", EmitDefaultValue = false)] - public Referenced Referenced { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Refunds {\n"); - sb.Append(" Referenced: ").Append(Referenced).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Refunds); - } - - /// - /// Returns true if Refunds instances are equal - /// - /// Instance of Refunds to be compared - /// Boolean - public bool Equals(Refunds input) - { - if (input == null) - { - return false; - } - return - ( - this.Referenced == input.Referenced || - (this.Referenced != null && - this.Referenced.Equals(input.Referenced)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Referenced != null) - { - hashCode = (hashCode * 59) + this.Referenced.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ReleaseUpdateDetails.cs b/Adyen/Model/Management/ReleaseUpdateDetails.cs deleted file mode 100644 index 7f931333f..000000000 --- a/Adyen/Model/Management/ReleaseUpdateDetails.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ReleaseUpdateDetails - /// - [DataContract(Name = "ReleaseUpdateDetails")] - public partial class ReleaseUpdateDetails : IEquatable, IValidatableObject - { - /// - /// Type of terminal action: Update Release. - /// - /// Type of terminal action: Update Release. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum ReleaseUpdate for value: ReleaseUpdate - /// - [EnumMember(Value = "ReleaseUpdate")] - ReleaseUpdate = 1 - - } - - - /// - /// Type of terminal action: Update Release. - /// - /// Type of terminal action: Update Release. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Type of terminal action: Update Release. (default to TypeEnum.ReleaseUpdate). - /// Boolean flag that tells if the terminal should update at the first next maintenance call. If false, terminal will update on its configured reboot time.. - public ReleaseUpdateDetails(TypeEnum? type = TypeEnum.ReleaseUpdate, bool? updateAtFirstMaintenanceCall = default(bool?)) - { - this.Type = type; - this.UpdateAtFirstMaintenanceCall = updateAtFirstMaintenanceCall; - } - - /// - /// Boolean flag that tells if the terminal should update at the first next maintenance call. If false, terminal will update on its configured reboot time. - /// - /// Boolean flag that tells if the terminal should update at the first next maintenance call. If false, terminal will update on its configured reboot time. - [DataMember(Name = "updateAtFirstMaintenanceCall", EmitDefaultValue = false)] - public bool? UpdateAtFirstMaintenanceCall { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReleaseUpdateDetails {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UpdateAtFirstMaintenanceCall: ").Append(UpdateAtFirstMaintenanceCall).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReleaseUpdateDetails); - } - - /// - /// Returns true if ReleaseUpdateDetails instances are equal - /// - /// Instance of ReleaseUpdateDetails to be compared - /// Boolean - public bool Equals(ReleaseUpdateDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UpdateAtFirstMaintenanceCall == input.UpdateAtFirstMaintenanceCall || - this.UpdateAtFirstMaintenanceCall.Equals(input.UpdateAtFirstMaintenanceCall) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - hashCode = (hashCode * 59) + this.UpdateAtFirstMaintenanceCall.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ReprocessAndroidAppResponse.cs b/Adyen/Model/Management/ReprocessAndroidAppResponse.cs deleted file mode 100644 index 3e0121b08..000000000 --- a/Adyen/Model/Management/ReprocessAndroidAppResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ReprocessAndroidAppResponse - /// - [DataContract(Name = "ReprocessAndroidAppResponse")] - public partial class ReprocessAndroidAppResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The result of the reprocess.. - public ReprocessAndroidAppResponse(string message = default(string)) - { - this.Message = message; - } - - /// - /// The result of the reprocess. - /// - /// The result of the reprocess. - [DataMember(Name = "Message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReprocessAndroidAppResponse {\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReprocessAndroidAppResponse); - } - - /// - /// Returns true if ReprocessAndroidAppResponse instances are equal - /// - /// Instance of ReprocessAndroidAppResponse to be compared - /// Boolean - public bool Equals(ReprocessAndroidAppResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/RequestActivationResponse.cs b/Adyen/Model/Management/RequestActivationResponse.cs deleted file mode 100644 index 97b63d9e3..000000000 --- a/Adyen/Model/Management/RequestActivationResponse.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// RequestActivationResponse - /// - [DataContract(Name = "RequestActivationResponse")] - public partial class RequestActivationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the company account.. - /// The unique identifier of the merchant account you requested to activate.. - public RequestActivationResponse(string companyId = default(string), string merchantId = default(string)) - { - this.CompanyId = companyId; - this.MerchantId = merchantId; - } - - /// - /// The unique identifier of the company account. - /// - /// The unique identifier of the company account. - [DataMember(Name = "companyId", EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// The unique identifier of the merchant account you requested to activate. - /// - /// The unique identifier of the merchant account you requested to activate. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RequestActivationResponse {\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RequestActivationResponse); - } - - /// - /// Returns true if RequestActivationResponse instances are equal - /// - /// Instance of RequestActivationResponse to be compared - /// Boolean - public bool Equals(RequestActivationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/RestServiceError.cs b/Adyen/Model/Management/RestServiceError.cs deleted file mode 100644 index 5f6fe3271..000000000 --- a/Adyen/Model/Management/RestServiceError.cs +++ /dev/null @@ -1,282 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// RestServiceError - /// - [DataContract(Name = "RestServiceError")] - public partial class RestServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RestServiceError() { } - /// - /// Initializes a new instance of the class. - /// - /// A human-readable explanation specific to this occurrence of the problem. (required). - /// A code that identifies the problem type. (required). - /// A unique URI that identifies the specific occurrence of the problem.. - /// Detailed explanation of each validation error, when applicable.. - /// A unique reference for the request, essentially the same as `pspReference`.. - /// response. - /// The HTTP status code. (required). - /// A short, human-readable summary of the problem type. (required). - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. (required). - public RestServiceError(string detail = default(string), string errorCode = default(string), string instance = default(string), List invalidFields = default(List), string requestId = default(string), Object response = default(Object), int? status = default(int?), string title = default(string), string type = default(string)) - { - this.Detail = detail; - this.ErrorCode = errorCode; - this.Status = status; - this.Title = title; - this.Type = type; - this.Instance = instance; - this.InvalidFields = invalidFields; - this.RequestId = requestId; - this.Response = response; - } - - /// - /// A human-readable explanation specific to this occurrence of the problem. - /// - /// A human-readable explanation specific to this occurrence of the problem. - [DataMember(Name = "detail", IsRequired = false, EmitDefaultValue = false)] - public string Detail { get; set; } - - /// - /// A code that identifies the problem type. - /// - /// A code that identifies the problem type. - [DataMember(Name = "errorCode", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// A unique URI that identifies the specific occurrence of the problem. - /// - /// A unique URI that identifies the specific occurrence of the problem. - [DataMember(Name = "instance", EmitDefaultValue = false)] - public string Instance { get; set; } - - /// - /// Detailed explanation of each validation error, when applicable. - /// - /// Detailed explanation of each validation error, when applicable. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A unique reference for the request, essentially the same as `pspReference`. - /// - /// A unique reference for the request, essentially the same as `pspReference`. - [DataMember(Name = "requestId", EmitDefaultValue = false)] - public string RequestId { get; set; } - - /// - /// Gets or Sets Response - /// - [DataMember(Name = "response", EmitDefaultValue = false)] - public Object Response { get; set; } - - /// - /// The HTTP status code. - /// - /// The HTTP status code. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// A short, human-readable summary of the problem type. - /// - /// A short, human-readable summary of the problem type. - [DataMember(Name = "title", IsRequired = false, EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. - /// - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RestServiceError {\n"); - sb.Append(" Detail: ").Append(Detail).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Instance: ").Append(Instance).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" RequestId: ").Append(RequestId).Append("\n"); - sb.Append(" Response: ").Append(Response).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RestServiceError); - } - - /// - /// Returns true if RestServiceError instances are equal - /// - /// Instance of RestServiceError to be compared - /// Boolean - public bool Equals(RestServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.Detail == input.Detail || - (this.Detail != null && - this.Detail.Equals(input.Detail)) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.Instance == input.Instance || - (this.Instance != null && - this.Instance.Equals(input.Instance)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.RequestId == input.RequestId || - (this.RequestId != null && - this.RequestId.Equals(input.RequestId)) - ) && - ( - this.Response == input.Response || - (this.Response != null && - this.Response.Equals(input.Response)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Detail != null) - { - hashCode = (hashCode * 59) + this.Detail.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.Instance != null) - { - hashCode = (hashCode * 59) + this.Instance.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.RequestId != null) - { - hashCode = (hashCode * 59) + this.RequestId.GetHashCode(); - } - if (this.Response != null) - { - hashCode = (hashCode * 59) + this.Response.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ScheduleTerminalActionsRequest.cs b/Adyen/Model/Management/ScheduleTerminalActionsRequest.cs deleted file mode 100644 index f61ab02b4..000000000 --- a/Adyen/Model/Management/ScheduleTerminalActionsRequest.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ScheduleTerminalActionsRequest - /// - [DataContract(Name = "ScheduleTerminalActionsRequest")] - public partial class ScheduleTerminalActionsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// actionDetails. - /// The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.. - /// The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store.. - /// A list of unique IDs of the terminals to apply the action to. You can extract the IDs from the [GET `/terminals`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/terminals) response. Maximum length: 100 IDs.. - public ScheduleTerminalActionsRequest(ScheduleTerminalActionsRequestActionDetails actionDetails = default(ScheduleTerminalActionsRequestActionDetails), string scheduledAt = default(string), string storeId = default(string), List terminalIds = default(List)) - { - this.ActionDetails = actionDetails; - this.ScheduledAt = scheduledAt; - this.StoreId = storeId; - this.TerminalIds = terminalIds; - } - - /// - /// Gets or Sets ActionDetails - /// - [DataMember(Name = "actionDetails", EmitDefaultValue = false)] - public ScheduleTerminalActionsRequestActionDetails ActionDetails { get; set; } - - /// - /// The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. - /// - /// The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. - [DataMember(Name = "scheduledAt", EmitDefaultValue = false)] - public string ScheduledAt { get; set; } - - /// - /// The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store. - /// - /// The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// A list of unique IDs of the terminals to apply the action to. You can extract the IDs from the [GET `/terminals`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/terminals) response. Maximum length: 100 IDs. - /// - /// A list of unique IDs of the terminals to apply the action to. You can extract the IDs from the [GET `/terminals`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/terminals) response. Maximum length: 100 IDs. - [DataMember(Name = "terminalIds", EmitDefaultValue = false)] - public List TerminalIds { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ScheduleTerminalActionsRequest {\n"); - sb.Append(" ActionDetails: ").Append(ActionDetails).Append("\n"); - sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append(" TerminalIds: ").Append(TerminalIds).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ScheduleTerminalActionsRequest); - } - - /// - /// Returns true if ScheduleTerminalActionsRequest instances are equal - /// - /// Instance of ScheduleTerminalActionsRequest to be compared - /// Boolean - public bool Equals(ScheduleTerminalActionsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionDetails == input.ActionDetails || - (this.ActionDetails != null && - this.ActionDetails.Equals(input.ActionDetails)) - ) && - ( - this.ScheduledAt == input.ScheduledAt || - (this.ScheduledAt != null && - this.ScheduledAt.Equals(input.ScheduledAt)) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ) && - ( - this.TerminalIds == input.TerminalIds || - this.TerminalIds != null && - input.TerminalIds != null && - this.TerminalIds.SequenceEqual(input.TerminalIds) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionDetails != null) - { - hashCode = (hashCode * 59) + this.ActionDetails.GetHashCode(); - } - if (this.ScheduledAt != null) - { - hashCode = (hashCode * 59) + this.ScheduledAt.GetHashCode(); - } - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - if (this.TerminalIds != null) - { - hashCode = (hashCode * 59) + this.TerminalIds.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.cs b/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.cs deleted file mode 100644 index 5c13b02f3..000000000 --- a/Adyen/Model/Management/ScheduleTerminalActionsRequestActionDetails.cs +++ /dev/null @@ -1,380 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Management -{ - /// - /// Information about the action to take. - /// - [JsonConverter(typeof(ScheduleTerminalActionsRequestActionDetailsJsonConverter))] - [DataContract(Name = "ScheduleTerminalActionsRequest_actionDetails")] - public partial class ScheduleTerminalActionsRequestActionDetails : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InstallAndroidAppDetails. - public ScheduleTerminalActionsRequestActionDetails(InstallAndroidAppDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InstallAndroidCertificateDetails. - public ScheduleTerminalActionsRequestActionDetails(InstallAndroidCertificateDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ReleaseUpdateDetails. - public ScheduleTerminalActionsRequestActionDetails(ReleaseUpdateDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UninstallAndroidAppDetails. - public ScheduleTerminalActionsRequestActionDetails(UninstallAndroidAppDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UninstallAndroidCertificateDetails. - public ScheduleTerminalActionsRequestActionDetails(UninstallAndroidCertificateDetails actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(InstallAndroidAppDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(InstallAndroidCertificateDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(ReleaseUpdateDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UninstallAndroidAppDetails)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UninstallAndroidCertificateDetails)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: InstallAndroidAppDetails, InstallAndroidCertificateDetails, ReleaseUpdateDetails, UninstallAndroidAppDetails, UninstallAndroidCertificateDetails"); - } - } - } - - /// - /// Get the actual instance of `InstallAndroidAppDetails`. If the actual instance is not `InstallAndroidAppDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of InstallAndroidAppDetails - public InstallAndroidAppDetails GetInstallAndroidAppDetails() - { - return (InstallAndroidAppDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `InstallAndroidCertificateDetails`. If the actual instance is not `InstallAndroidCertificateDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of InstallAndroidCertificateDetails - public InstallAndroidCertificateDetails GetInstallAndroidCertificateDetails() - { - return (InstallAndroidCertificateDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `ReleaseUpdateDetails`. If the actual instance is not `ReleaseUpdateDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of ReleaseUpdateDetails - public ReleaseUpdateDetails GetReleaseUpdateDetails() - { - return (ReleaseUpdateDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `UninstallAndroidAppDetails`. If the actual instance is not `UninstallAndroidAppDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of UninstallAndroidAppDetails - public UninstallAndroidAppDetails GetUninstallAndroidAppDetails() - { - return (UninstallAndroidAppDetails)this.ActualInstance; - } - - /// - /// Get the actual instance of `UninstallAndroidCertificateDetails`. If the actual instance is not `UninstallAndroidCertificateDetails`, - /// the InvalidClassException will be thrown - /// - /// An instance of UninstallAndroidCertificateDetails - public UninstallAndroidCertificateDetails GetUninstallAndroidCertificateDetails() - { - return (UninstallAndroidCertificateDetails)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ScheduleTerminalActionsRequestActionDetails {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, ScheduleTerminalActionsRequestActionDetails.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of ScheduleTerminalActionsRequestActionDetails - /// - /// JSON string - /// An instance of ScheduleTerminalActionsRequestActionDetails - public static ScheduleTerminalActionsRequestActionDetails FromJson(string jsonString) - { - ScheduleTerminalActionsRequestActionDetails newScheduleTerminalActionsRequestActionDetails = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newScheduleTerminalActionsRequestActionDetails; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the InstallAndroidAppDetails type enums - if (ContainsValue(type)) - { - newScheduleTerminalActionsRequestActionDetails = new ScheduleTerminalActionsRequestActionDetails(JsonConvert.DeserializeObject(jsonString, ScheduleTerminalActionsRequestActionDetails.SerializerSettings)); - matchedTypes.Add("InstallAndroidAppDetails"); - match++; - } - // Check if the jsonString type enum matches the InstallAndroidCertificateDetails type enums - if (ContainsValue(type)) - { - newScheduleTerminalActionsRequestActionDetails = new ScheduleTerminalActionsRequestActionDetails(JsonConvert.DeserializeObject(jsonString, ScheduleTerminalActionsRequestActionDetails.SerializerSettings)); - matchedTypes.Add("InstallAndroidCertificateDetails"); - match++; - } - // Check if the jsonString type enum matches the ReleaseUpdateDetails type enums - if (ContainsValue(type)) - { - newScheduleTerminalActionsRequestActionDetails = new ScheduleTerminalActionsRequestActionDetails(JsonConvert.DeserializeObject(jsonString, ScheduleTerminalActionsRequestActionDetails.SerializerSettings)); - matchedTypes.Add("ReleaseUpdateDetails"); - match++; - } - // Check if the jsonString type enum matches the UninstallAndroidAppDetails type enums - if (ContainsValue(type)) - { - newScheduleTerminalActionsRequestActionDetails = new ScheduleTerminalActionsRequestActionDetails(JsonConvert.DeserializeObject(jsonString, ScheduleTerminalActionsRequestActionDetails.SerializerSettings)); - matchedTypes.Add("UninstallAndroidAppDetails"); - match++; - } - // Check if the jsonString type enum matches the UninstallAndroidCertificateDetails type enums - if (ContainsValue(type)) - { - newScheduleTerminalActionsRequestActionDetails = new ScheduleTerminalActionsRequestActionDetails(JsonConvert.DeserializeObject(jsonString, ScheduleTerminalActionsRequestActionDetails.SerializerSettings)); - matchedTypes.Add("UninstallAndroidCertificateDetails"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newScheduleTerminalActionsRequestActionDetails; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ScheduleTerminalActionsRequestActionDetails); - } - - /// - /// Returns true if ScheduleTerminalActionsRequestActionDetails instances are equal - /// - /// Instance of ScheduleTerminalActionsRequestActionDetails to be compared - /// Boolean - public bool Equals(ScheduleTerminalActionsRequestActionDetails input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for ScheduleTerminalActionsRequestActionDetails - /// - public class ScheduleTerminalActionsRequestActionDetailsJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(ScheduleTerminalActionsRequestActionDetails).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return ScheduleTerminalActionsRequestActionDetails.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Management/ScheduleTerminalActionsResponse.cs b/Adyen/Model/Management/ScheduleTerminalActionsResponse.cs deleted file mode 100644 index 5e747f021..000000000 --- a/Adyen/Model/Management/ScheduleTerminalActionsResponse.cs +++ /dev/null @@ -1,236 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ScheduleTerminalActionsResponse - /// - [DataContract(Name = "ScheduleTerminalActionsResponse")] - public partial class ScheduleTerminalActionsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// actionDetails. - /// A list containing a terminal ID and an action ID for each terminal that the action was scheduled for.. - /// The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call.. - /// The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store.. - /// The validation errors that occurred in the list of terminals, and for each error the IDs of the terminals that the error applies to.. - /// The number of terminals for which scheduling the action failed.. - /// The number of terminals for which the action was successfully scheduled. This doesn't mean the action has happened yet.. - public ScheduleTerminalActionsResponse(ScheduleTerminalActionsRequestActionDetails actionDetails = default(ScheduleTerminalActionsRequestActionDetails), List items = default(List), string scheduledAt = default(string), string storeId = default(string), Dictionary> terminalsWithErrors = default(Dictionary>), int? totalErrors = default(int?), int? totalScheduled = default(int?)) - { - this.ActionDetails = actionDetails; - this.Items = items; - this.ScheduledAt = scheduledAt; - this.StoreId = storeId; - this.TerminalsWithErrors = terminalsWithErrors; - this.TotalErrors = totalErrors; - this.TotalScheduled = totalScheduled; - } - - /// - /// Gets or Sets ActionDetails - /// - [DataMember(Name = "actionDetails", EmitDefaultValue = false)] - public ScheduleTerminalActionsRequestActionDetails ActionDetails { get; set; } - - /// - /// A list containing a terminal ID and an action ID for each terminal that the action was scheduled for. - /// - /// A list containing a terminal ID and an action ID for each terminal that the action was scheduled for. - [DataMember(Name = "items", EmitDefaultValue = false)] - public List Items { get; set; } - - /// - /// The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. - /// - /// The date and time when the action should happen. Format: [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339), but without the **Z** before the time offset. For example, **2021-11-15T12:16:21+0100** The action is sent with the first [maintenance call](https://docs.adyen.com/point-of-sale/automating-terminal-management/terminal-actions-api#when-actions-take-effect) after the specified date and time in the time zone of the terminal. An empty value causes the action to be sent as soon as possible: at the next maintenance call. - [DataMember(Name = "scheduledAt", EmitDefaultValue = false)] - public string ScheduledAt { get; set; } - - /// - /// The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store. - /// - /// The unique ID of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores). If present, all terminals in the `terminalIds` list must be assigned to this store. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// The validation errors that occurred in the list of terminals, and for each error the IDs of the terminals that the error applies to. - /// - /// The validation errors that occurred in the list of terminals, and for each error the IDs of the terminals that the error applies to. - [DataMember(Name = "terminalsWithErrors", EmitDefaultValue = false)] - public Dictionary> TerminalsWithErrors { get; set; } - - /// - /// The number of terminals for which scheduling the action failed. - /// - /// The number of terminals for which scheduling the action failed. - [DataMember(Name = "totalErrors", EmitDefaultValue = false)] - public int? TotalErrors { get; set; } - - /// - /// The number of terminals for which the action was successfully scheduled. This doesn't mean the action has happened yet. - /// - /// The number of terminals for which the action was successfully scheduled. This doesn't mean the action has happened yet. - [DataMember(Name = "totalScheduled", EmitDefaultValue = false)] - public int? TotalScheduled { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ScheduleTerminalActionsResponse {\n"); - sb.Append(" ActionDetails: ").Append(ActionDetails).Append("\n"); - sb.Append(" Items: ").Append(Items).Append("\n"); - sb.Append(" ScheduledAt: ").Append(ScheduledAt).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append(" TerminalsWithErrors: ").Append(TerminalsWithErrors).Append("\n"); - sb.Append(" TotalErrors: ").Append(TotalErrors).Append("\n"); - sb.Append(" TotalScheduled: ").Append(TotalScheduled).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ScheduleTerminalActionsResponse); - } - - /// - /// Returns true if ScheduleTerminalActionsResponse instances are equal - /// - /// Instance of ScheduleTerminalActionsResponse to be compared - /// Boolean - public bool Equals(ScheduleTerminalActionsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.ActionDetails == input.ActionDetails || - (this.ActionDetails != null && - this.ActionDetails.Equals(input.ActionDetails)) - ) && - ( - this.Items == input.Items || - this.Items != null && - input.Items != null && - this.Items.SequenceEqual(input.Items) - ) && - ( - this.ScheduledAt == input.ScheduledAt || - (this.ScheduledAt != null && - this.ScheduledAt.Equals(input.ScheduledAt)) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ) && - ( - this.TerminalsWithErrors == input.TerminalsWithErrors || - this.TerminalsWithErrors != null && - input.TerminalsWithErrors != null && - this.TerminalsWithErrors.SequenceEqual(input.TerminalsWithErrors) - ) && - ( - this.TotalErrors == input.TotalErrors || - this.TotalErrors.Equals(input.TotalErrors) - ) && - ( - this.TotalScheduled == input.TotalScheduled || - this.TotalScheduled.Equals(input.TotalScheduled) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActionDetails != null) - { - hashCode = (hashCode * 59) + this.ActionDetails.GetHashCode(); - } - if (this.Items != null) - { - hashCode = (hashCode * 59) + this.Items.GetHashCode(); - } - if (this.ScheduledAt != null) - { - hashCode = (hashCode * 59) + this.ScheduledAt.GetHashCode(); - } - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - if (this.TerminalsWithErrors != null) - { - hashCode = (hashCode * 59) + this.TerminalsWithErrors.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TotalErrors.GetHashCode(); - hashCode = (hashCode * 59) + this.TotalScheduled.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Settings.cs b/Adyen/Model/Management/Settings.cs deleted file mode 100644 index 98ddbb3ff..000000000 --- a/Adyen/Model/Management/Settings.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Settings - /// - [DataContract(Name = "Settings")] - public partial class Settings : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The preferred Wi-Fi band, for use if the terminals support multiple bands. Possible values: All, 2.4GHz, 5GHz.. - /// Indicates whether roaming is enabled on the terminals.. - /// The connection time-out in seconds. Minimum value: 0.. - public Settings(string band = default(string), bool? roaming = default(bool?), int? timeout = default(int?)) - { - this.Band = band; - this.Roaming = roaming; - this.Timeout = timeout; - } - - /// - /// The preferred Wi-Fi band, for use if the terminals support multiple bands. Possible values: All, 2.4GHz, 5GHz. - /// - /// The preferred Wi-Fi band, for use if the terminals support multiple bands. Possible values: All, 2.4GHz, 5GHz. - [DataMember(Name = "band", EmitDefaultValue = false)] - public string Band { get; set; } - - /// - /// Indicates whether roaming is enabled on the terminals. - /// - /// Indicates whether roaming is enabled on the terminals. - [DataMember(Name = "roaming", EmitDefaultValue = false)] - public bool? Roaming { get; set; } - - /// - /// The connection time-out in seconds. Minimum value: 0. - /// - /// The connection time-out in seconds. Minimum value: 0. - [DataMember(Name = "timeout", EmitDefaultValue = false)] - public int? Timeout { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Settings {\n"); - sb.Append(" Band: ").Append(Band).Append("\n"); - sb.Append(" Roaming: ").Append(Roaming).Append("\n"); - sb.Append(" Timeout: ").Append(Timeout).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Settings); - } - - /// - /// Returns true if Settings instances are equal - /// - /// Instance of Settings to be compared - /// Boolean - public bool Equals(Settings input) - { - if (input == null) - { - return false; - } - return - ( - this.Band == input.Band || - (this.Band != null && - this.Band.Equals(input.Band)) - ) && - ( - this.Roaming == input.Roaming || - this.Roaming.Equals(input.Roaming) - ) && - ( - this.Timeout == input.Timeout || - this.Timeout.Equals(input.Timeout) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Band != null) - { - hashCode = (hashCode * 59) + this.Band.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Roaming.GetHashCode(); - hashCode = (hashCode * 59) + this.Timeout.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ShippingLocation.cs b/Adyen/Model/Management/ShippingLocation.cs deleted file mode 100644 index dbf1c4bf6..000000000 --- a/Adyen/Model/Management/ShippingLocation.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ShippingLocation - /// - [DataContract(Name = "ShippingLocation")] - public partial class ShippingLocation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// address. - /// contact. - /// The unique identifier of the shipping location, for use as `shippingLocationId` when creating an order.. - /// The unique name of the shipping location.. - public ShippingLocation(Address address = default(Address), Contact contact = default(Contact), string id = default(string), string name = default(string)) - { - this.Address = address; - this.Contact = contact; - this.Id = id; - this.Name = name; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public Address Address { get; set; } - - /// - /// Gets or Sets Contact - /// - [DataMember(Name = "contact", EmitDefaultValue = false)] - public Contact Contact { get; set; } - - /// - /// The unique identifier of the shipping location, for use as `shippingLocationId` when creating an order. - /// - /// The unique identifier of the shipping location, for use as `shippingLocationId` when creating an order. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique name of the shipping location. - /// - /// The unique name of the shipping location. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ShippingLocation {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Contact: ").Append(Contact).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ShippingLocation); - } - - /// - /// Returns true if ShippingLocation instances are equal - /// - /// Instance of ShippingLocation to be compared - /// Boolean - public bool Equals(ShippingLocation input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Contact == input.Contact || - (this.Contact != null && - this.Contact.Equals(input.Contact)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Contact != null) - { - hashCode = (hashCode * 59) + this.Contact.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/ShippingLocationsResponse.cs b/Adyen/Model/Management/ShippingLocationsResponse.cs deleted file mode 100644 index f151786fc..000000000 --- a/Adyen/Model/Management/ShippingLocationsResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// ShippingLocationsResponse - /// - [DataContract(Name = "ShippingLocationsResponse")] - public partial class ShippingLocationsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Physical locations where orders can be shipped to.. - public ShippingLocationsResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// Physical locations where orders can be shipped to. - /// - /// Physical locations where orders can be shipped to. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ShippingLocationsResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ShippingLocationsResponse); - } - - /// - /// Returns true if ShippingLocationsResponse instances are equal - /// - /// Instance of ShippingLocationsResponse to be compared - /// Boolean - public bool Equals(ShippingLocationsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Signature.cs b/Adyen/Model/Management/Signature.cs deleted file mode 100644 index ca1f16b03..000000000 --- a/Adyen/Model/Management/Signature.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Signature - /// - [DataContract(Name = "Signature")] - public partial class Signature : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// If `skipSignature` is false, indicates whether the shopper should provide a signature on the display (**true**) or on the merchant receipt (**false**).. - /// Name that identifies the terminal.. - /// Slogan shown on the start screen of the device.. - /// Skip asking for a signature. This is possible because all global card schemes (American Express, Diners, Discover, JCB, MasterCard, VISA, and UnionPay) regard a signature as optional.. - public Signature(bool? askSignatureOnScreen = default(bool?), string deviceName = default(string), string deviceSlogan = default(string), bool? skipSignature = default(bool?)) - { - this.AskSignatureOnScreen = askSignatureOnScreen; - this.DeviceName = deviceName; - this.DeviceSlogan = deviceSlogan; - this.SkipSignature = skipSignature; - } - - /// - /// If `skipSignature` is false, indicates whether the shopper should provide a signature on the display (**true**) or on the merchant receipt (**false**). - /// - /// If `skipSignature` is false, indicates whether the shopper should provide a signature on the display (**true**) or on the merchant receipt (**false**). - [DataMember(Name = "askSignatureOnScreen", EmitDefaultValue = false)] - public bool? AskSignatureOnScreen { get; set; } - - /// - /// Name that identifies the terminal. - /// - /// Name that identifies the terminal. - [DataMember(Name = "deviceName", EmitDefaultValue = false)] - public string DeviceName { get; set; } - - /// - /// Slogan shown on the start screen of the device. - /// - /// Slogan shown on the start screen of the device. - [DataMember(Name = "deviceSlogan", EmitDefaultValue = false)] - public string DeviceSlogan { get; set; } - - /// - /// Skip asking for a signature. This is possible because all global card schemes (American Express, Diners, Discover, JCB, MasterCard, VISA, and UnionPay) regard a signature as optional. - /// - /// Skip asking for a signature. This is possible because all global card schemes (American Express, Diners, Discover, JCB, MasterCard, VISA, and UnionPay) regard a signature as optional. - [DataMember(Name = "skipSignature", EmitDefaultValue = false)] - public bool? SkipSignature { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Signature {\n"); - sb.Append(" AskSignatureOnScreen: ").Append(AskSignatureOnScreen).Append("\n"); - sb.Append(" DeviceName: ").Append(DeviceName).Append("\n"); - sb.Append(" DeviceSlogan: ").Append(DeviceSlogan).Append("\n"); - sb.Append(" SkipSignature: ").Append(SkipSignature).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Signature); - } - - /// - /// Returns true if Signature instances are equal - /// - /// Instance of Signature to be compared - /// Boolean - public bool Equals(Signature input) - { - if (input == null) - { - return false; - } - return - ( - this.AskSignatureOnScreen == input.AskSignatureOnScreen || - this.AskSignatureOnScreen.Equals(input.AskSignatureOnScreen) - ) && - ( - this.DeviceName == input.DeviceName || - (this.DeviceName != null && - this.DeviceName.Equals(input.DeviceName)) - ) && - ( - this.DeviceSlogan == input.DeviceSlogan || - (this.DeviceSlogan != null && - this.DeviceSlogan.Equals(input.DeviceSlogan)) - ) && - ( - this.SkipSignature == input.SkipSignature || - this.SkipSignature.Equals(input.SkipSignature) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AskSignatureOnScreen.GetHashCode(); - if (this.DeviceName != null) - { - hashCode = (hashCode * 59) + this.DeviceName.GetHashCode(); - } - if (this.DeviceSlogan != null) - { - hashCode = (hashCode * 59) + this.DeviceSlogan.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SkipSignature.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // DeviceSlogan (string) maxLength - if (this.DeviceSlogan != null && this.DeviceSlogan.Length > 50) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DeviceSlogan, length must be less than 50.", new [] { "DeviceSlogan" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/SodexoInfo.cs b/Adyen/Model/Management/SodexoInfo.cs deleted file mode 100644 index 149db962d..000000000 --- a/Adyen/Model/Management/SodexoInfo.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// SodexoInfo - /// - [DataContract(Name = "SodexoInfo")] - public partial class SodexoInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SodexoInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Sodexo merchantContactPhone (required). - public SodexoInfo(string merchantContactPhone = default(string)) - { - this.MerchantContactPhone = merchantContactPhone; - } - - /// - /// Sodexo merchantContactPhone - /// - /// Sodexo merchantContactPhone - [DataMember(Name = "merchantContactPhone", IsRequired = false, EmitDefaultValue = false)] - public string MerchantContactPhone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SodexoInfo {\n"); - sb.Append(" MerchantContactPhone: ").Append(MerchantContactPhone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SodexoInfo); - } - - /// - /// Returns true if SodexoInfo instances are equal - /// - /// Instance of SodexoInfo to be compared - /// Boolean - public bool Equals(SodexoInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantContactPhone == input.MerchantContactPhone || - (this.MerchantContactPhone != null && - this.MerchantContactPhone.Equals(input.MerchantContactPhone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantContactPhone != null) - { - hashCode = (hashCode * 59) + this.MerchantContactPhone.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/SofortInfo.cs b/Adyen/Model/Management/SofortInfo.cs deleted file mode 100644 index 90a388a7b..000000000 --- a/Adyen/Model/Management/SofortInfo.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// SofortInfo - /// - [DataContract(Name = "SofortInfo")] - public partial class SofortInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SofortInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Sofort currency code. For example, **EUR**. (required). - /// Sofort logo. Format: Base64-encoded string. (required). - public SofortInfo(string currencyCode = default(string), string logo = default(string)) - { - this.CurrencyCode = currencyCode; - this.Logo = logo; - } - - /// - /// Sofort currency code. For example, **EUR**. - /// - /// Sofort currency code. For example, **EUR**. - [DataMember(Name = "currencyCode", IsRequired = false, EmitDefaultValue = false)] - public string CurrencyCode { get; set; } - - /// - /// Sofort logo. Format: Base64-encoded string. - /// - /// Sofort logo. Format: Base64-encoded string. - [DataMember(Name = "logo", IsRequired = false, EmitDefaultValue = false)] - public string Logo { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SofortInfo {\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append(" Logo: ").Append(Logo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SofortInfo); - } - - /// - /// Returns true if SofortInfo instances are equal - /// - /// Instance of SofortInfo to be compared - /// Boolean - public bool Equals(SofortInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ) && - ( - this.Logo == input.Logo || - (this.Logo != null && - this.Logo.Equals(input.Logo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CurrencyCode != null) - { - hashCode = (hashCode * 59) + this.CurrencyCode.GetHashCode(); - } - if (this.Logo != null) - { - hashCode = (hashCode * 59) + this.Logo.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/SplitConfiguration.cs b/Adyen/Model/Management/SplitConfiguration.cs deleted file mode 100644 index ab02dc89d..000000000 --- a/Adyen/Model/Management/SplitConfiguration.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// SplitConfiguration - /// - [DataContract(Name = "SplitConfiguration")] - public partial class SplitConfiguration : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SplitConfiguration() { } - /// - /// Initializes a new instance of the class. - /// - /// Your description for the split configuration. (required). - /// Array of rules that define the split configuration behavior. (required). - public SplitConfiguration(string description = default(string), List rules = default(List)) - { - this.Description = description; - this.Rules = rules; - } - - /// - /// Your description for the split configuration. - /// - /// Your description for the split configuration. - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Array of rules that define the split configuration behavior. - /// - /// Array of rules that define the split configuration behavior. - [DataMember(Name = "rules", IsRequired = false, EmitDefaultValue = false)] - public List Rules { get; set; } - - /// - /// Unique identifier of the split configuration. - /// - /// Unique identifier of the split configuration. - [DataMember(Name = "splitConfigurationId", EmitDefaultValue = false)] - public string SplitConfigurationId { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SplitConfiguration {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Rules: ").Append(Rules).Append("\n"); - sb.Append(" SplitConfigurationId: ").Append(SplitConfigurationId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SplitConfiguration); - } - - /// - /// Returns true if SplitConfiguration instances are equal - /// - /// Instance of SplitConfiguration to be compared - /// Boolean - public bool Equals(SplitConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Rules == input.Rules || - this.Rules != null && - input.Rules != null && - this.Rules.SequenceEqual(input.Rules) - ) && - ( - this.SplitConfigurationId == input.SplitConfigurationId || - (this.SplitConfigurationId != null && - this.SplitConfigurationId.Equals(input.SplitConfigurationId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Rules != null) - { - hashCode = (hashCode * 59) + this.Rules.GetHashCode(); - } - if (this.SplitConfigurationId != null) - { - hashCode = (hashCode * 59) + this.SplitConfigurationId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/SplitConfigurationList.cs b/Adyen/Model/Management/SplitConfigurationList.cs deleted file mode 100644 index e3a514eb5..000000000 --- a/Adyen/Model/Management/SplitConfigurationList.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// SplitConfigurationList - /// - [DataContract(Name = "SplitConfigurationList")] - public partial class SplitConfigurationList : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of split configurations applied to the stores under the merchant account.. - public SplitConfigurationList(List data = default(List)) - { - this.Data = data; - } - - /// - /// List of split configurations applied to the stores under the merchant account. - /// - /// List of split configurations applied to the stores under the merchant account. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SplitConfigurationList {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SplitConfigurationList); - } - - /// - /// Returns true if SplitConfigurationList instances are equal - /// - /// Instance of SplitConfigurationList to be compared - /// Boolean - public bool Equals(SplitConfigurationList input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/SplitConfigurationLogic.cs b/Adyen/Model/Management/SplitConfigurationLogic.cs deleted file mode 100644 index 4931956bf..000000000 --- a/Adyen/Model/Management/SplitConfigurationLogic.cs +++ /dev/null @@ -1,684 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// SplitConfigurationLogic - /// - [DataContract(Name = "SplitConfigurationLogic")] - public partial class SplitConfigurationLogic : IEquatable, IValidatableObject - { - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AcquiringFeesEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "acquiringFees", EmitDefaultValue = false)] - public AcquiringFeesEnum? AcquiringFees { get; set; } - /// - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AdyenCommissionEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "adyenCommission", EmitDefaultValue = false)] - public AdyenCommissionEnum? AdyenCommission { get; set; } - /// - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AdyenFeesEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "adyenFees", EmitDefaultValue = false)] - public AdyenFeesEnum? AdyenFees { get; set; } - /// - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AdyenMarkupEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "adyenMarkup", EmitDefaultValue = false)] - public AdyenMarkupEnum? AdyenMarkup { get; set; } - /// - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - /// - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ChargebackEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2, - - /// - /// Enum DeductAccordingToSplitRatio for value: deductAccordingToSplitRatio - /// - [EnumMember(Value = "deductAccordingToSplitRatio")] - DeductAccordingToSplitRatio = 3 - - } - - - /// - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - /// - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - [DataMember(Name = "chargeback", EmitDefaultValue = false)] - public ChargebackEnum? Chargeback { get; set; } - /// - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - /// - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - [JsonConverter(typeof(StringEnumConverter))] - public enum ChargebackCostAllocationEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - /// - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - [DataMember(Name = "chargebackCostAllocation", EmitDefaultValue = false)] - public ChargebackCostAllocationEnum? ChargebackCostAllocation { get; set; } - /// - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum InterchangeEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "interchange", EmitDefaultValue = false)] - public InterchangeEnum? Interchange { get; set; } - /// - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum PaymentFeeEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "paymentFee", EmitDefaultValue = false)] - public PaymentFeeEnum? PaymentFee { get; set; } - /// - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** - /// - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** - [JsonConverter(typeof(StringEnumConverter))] - public enum RefundEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2, - - /// - /// Enum DeductAccordingToSplitRatio for value: deductAccordingToSplitRatio - /// - [EnumMember(Value = "deductAccordingToSplitRatio")] - DeductAccordingToSplitRatio = 3 - - } - - - /// - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** - /// - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** - [DataMember(Name = "refund", EmitDefaultValue = false)] - public RefundEnum? Refund { get; set; } - /// - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - /// - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - [JsonConverter(typeof(StringEnumConverter))] - public enum RefundCostAllocationEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - /// - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - [DataMember(Name = "refundCostAllocation", EmitDefaultValue = false)] - public RefundCostAllocationEnum? RefundCostAllocation { get; set; } - /// - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RemainderEnum - { - /// - /// Enum AddToLiableAccount for value: addToLiableAccount - /// - [EnumMember(Value = "addToLiableAccount")] - AddToLiableAccount = 1, - - /// - /// Enum AddToOneBalanceAccount for value: addToOneBalanceAccount - /// - [EnumMember(Value = "addToOneBalanceAccount")] - AddToOneBalanceAccount = 2 - - } - - - /// - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - [DataMember(Name = "remainder", EmitDefaultValue = false)] - public RemainderEnum? Remainder { get; set; } - /// - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum SchemeFeeEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "schemeFee", EmitDefaultValue = false)] - public SchemeFeeEnum? SchemeFee { get; set; } - /// - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** - /// - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** - [JsonConverter(typeof(StringEnumConverter))] - public enum SurchargeEnum - { - /// - /// Enum AddToLiableAccount for value: addToLiableAccount - /// - [EnumMember(Value = "addToLiableAccount")] - AddToLiableAccount = 1, - - /// - /// Enum AddToOneBalanceAccount for value: addToOneBalanceAccount - /// - [EnumMember(Value = "addToOneBalanceAccount")] - AddToOneBalanceAccount = 2 - - } - - - /// - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** - /// - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** - [DataMember(Name = "surcharge", EmitDefaultValue = false)] - public SurchargeEnum? Surcharge { get; set; } - /// - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TipEnum - { - /// - /// Enum AddToLiableAccount for value: addToLiableAccount - /// - [EnumMember(Value = "addToLiableAccount")] - AddToLiableAccount = 1, - - /// - /// Enum AddToOneBalanceAccount for value: addToOneBalanceAccount - /// - [EnumMember(Value = "addToOneBalanceAccount")] - AddToOneBalanceAccount = 2 - - } - - - /// - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - [DataMember(Name = "tip", EmitDefaultValue = false)] - public TipEnum? Tip { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SplitConfigurationLogic() { } - /// - /// Initializes a new instance of the class. - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// additionalCommission. - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**.. - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// commission (required). - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. - public SplitConfigurationLogic(AcquiringFeesEnum? acquiringFees = default(AcquiringFeesEnum?), AdditionalCommission additionalCommission = default(AdditionalCommission), AdyenCommissionEnum? adyenCommission = default(AdyenCommissionEnum?), AdyenFeesEnum? adyenFees = default(AdyenFeesEnum?), AdyenMarkupEnum? adyenMarkup = default(AdyenMarkupEnum?), ChargebackEnum? chargeback = default(ChargebackEnum?), ChargebackCostAllocationEnum? chargebackCostAllocation = default(ChargebackCostAllocationEnum?), Commission commission = default(Commission), InterchangeEnum? interchange = default(InterchangeEnum?), PaymentFeeEnum? paymentFee = default(PaymentFeeEnum?), RefundEnum? refund = default(RefundEnum?), RefundCostAllocationEnum? refundCostAllocation = default(RefundCostAllocationEnum?), RemainderEnum? remainder = default(RemainderEnum?), SchemeFeeEnum? schemeFee = default(SchemeFeeEnum?), SurchargeEnum? surcharge = default(SurchargeEnum?), TipEnum? tip = default(TipEnum?)) - { - this.Commission = commission; - this.AcquiringFees = acquiringFees; - this.AdditionalCommission = additionalCommission; - this.AdyenCommission = adyenCommission; - this.AdyenFees = adyenFees; - this.AdyenMarkup = adyenMarkup; - this.Chargeback = chargeback; - this.ChargebackCostAllocation = chargebackCostAllocation; - this.Interchange = interchange; - this.PaymentFee = paymentFee; - this.Refund = refund; - this.RefundCostAllocation = refundCostAllocation; - this.Remainder = remainder; - this.SchemeFee = schemeFee; - this.Surcharge = surcharge; - this.Tip = tip; - } - - /// - /// Gets or Sets AdditionalCommission - /// - [DataMember(Name = "additionalCommission", EmitDefaultValue = false)] - public AdditionalCommission AdditionalCommission { get; set; } - - /// - /// Gets or Sets Commission - /// - [DataMember(Name = "commission", IsRequired = false, EmitDefaultValue = false)] - public Commission Commission { get; set; } - - /// - /// Unique identifier of the collection of split instructions that are applied when the rule conditions are met. - /// - /// Unique identifier of the collection of split instructions that are applied when the rule conditions are met. - [DataMember(Name = "splitLogicId", EmitDefaultValue = false)] - public string SplitLogicId { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SplitConfigurationLogic {\n"); - sb.Append(" AcquiringFees: ").Append(AcquiringFees).Append("\n"); - sb.Append(" AdditionalCommission: ").Append(AdditionalCommission).Append("\n"); - sb.Append(" AdyenCommission: ").Append(AdyenCommission).Append("\n"); - sb.Append(" AdyenFees: ").Append(AdyenFees).Append("\n"); - sb.Append(" AdyenMarkup: ").Append(AdyenMarkup).Append("\n"); - sb.Append(" Chargeback: ").Append(Chargeback).Append("\n"); - sb.Append(" ChargebackCostAllocation: ").Append(ChargebackCostAllocation).Append("\n"); - sb.Append(" Commission: ").Append(Commission).Append("\n"); - sb.Append(" Interchange: ").Append(Interchange).Append("\n"); - sb.Append(" PaymentFee: ").Append(PaymentFee).Append("\n"); - sb.Append(" Refund: ").Append(Refund).Append("\n"); - sb.Append(" RefundCostAllocation: ").Append(RefundCostAllocation).Append("\n"); - sb.Append(" Remainder: ").Append(Remainder).Append("\n"); - sb.Append(" SchemeFee: ").Append(SchemeFee).Append("\n"); - sb.Append(" SplitLogicId: ").Append(SplitLogicId).Append("\n"); - sb.Append(" Surcharge: ").Append(Surcharge).Append("\n"); - sb.Append(" Tip: ").Append(Tip).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SplitConfigurationLogic); - } - - /// - /// Returns true if SplitConfigurationLogic instances are equal - /// - /// Instance of SplitConfigurationLogic to be compared - /// Boolean - public bool Equals(SplitConfigurationLogic input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquiringFees == input.AcquiringFees || - this.AcquiringFees.Equals(input.AcquiringFees) - ) && - ( - this.AdditionalCommission == input.AdditionalCommission || - (this.AdditionalCommission != null && - this.AdditionalCommission.Equals(input.AdditionalCommission)) - ) && - ( - this.AdyenCommission == input.AdyenCommission || - this.AdyenCommission.Equals(input.AdyenCommission) - ) && - ( - this.AdyenFees == input.AdyenFees || - this.AdyenFees.Equals(input.AdyenFees) - ) && - ( - this.AdyenMarkup == input.AdyenMarkup || - this.AdyenMarkup.Equals(input.AdyenMarkup) - ) && - ( - this.Chargeback == input.Chargeback || - this.Chargeback.Equals(input.Chargeback) - ) && - ( - this.ChargebackCostAllocation == input.ChargebackCostAllocation || - this.ChargebackCostAllocation.Equals(input.ChargebackCostAllocation) - ) && - ( - this.Commission == input.Commission || - (this.Commission != null && - this.Commission.Equals(input.Commission)) - ) && - ( - this.Interchange == input.Interchange || - this.Interchange.Equals(input.Interchange) - ) && - ( - this.PaymentFee == input.PaymentFee || - this.PaymentFee.Equals(input.PaymentFee) - ) && - ( - this.Refund == input.Refund || - this.Refund.Equals(input.Refund) - ) && - ( - this.RefundCostAllocation == input.RefundCostAllocation || - this.RefundCostAllocation.Equals(input.RefundCostAllocation) - ) && - ( - this.Remainder == input.Remainder || - this.Remainder.Equals(input.Remainder) - ) && - ( - this.SchemeFee == input.SchemeFee || - this.SchemeFee.Equals(input.SchemeFee) - ) && - ( - this.SplitLogicId == input.SplitLogicId || - (this.SplitLogicId != null && - this.SplitLogicId.Equals(input.SplitLogicId)) - ) && - ( - this.Surcharge == input.Surcharge || - this.Surcharge.Equals(input.Surcharge) - ) && - ( - this.Tip == input.Tip || - this.Tip.Equals(input.Tip) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AcquiringFees.GetHashCode(); - if (this.AdditionalCommission != null) - { - hashCode = (hashCode * 59) + this.AdditionalCommission.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AdyenCommission.GetHashCode(); - hashCode = (hashCode * 59) + this.AdyenFees.GetHashCode(); - hashCode = (hashCode * 59) + this.AdyenMarkup.GetHashCode(); - hashCode = (hashCode * 59) + this.Chargeback.GetHashCode(); - hashCode = (hashCode * 59) + this.ChargebackCostAllocation.GetHashCode(); - if (this.Commission != null) - { - hashCode = (hashCode * 59) + this.Commission.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Interchange.GetHashCode(); - hashCode = (hashCode * 59) + this.PaymentFee.GetHashCode(); - hashCode = (hashCode * 59) + this.Refund.GetHashCode(); - hashCode = (hashCode * 59) + this.RefundCostAllocation.GetHashCode(); - hashCode = (hashCode * 59) + this.Remainder.GetHashCode(); - hashCode = (hashCode * 59) + this.SchemeFee.GetHashCode(); - if (this.SplitLogicId != null) - { - hashCode = (hashCode * 59) + this.SplitLogicId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Surcharge.GetHashCode(); - hashCode = (hashCode * 59) + this.Tip.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/SplitConfigurationRule.cs b/Adyen/Model/Management/SplitConfigurationRule.cs deleted file mode 100644 index d82d51e76..000000000 --- a/Adyen/Model/Management/SplitConfigurationRule.cs +++ /dev/null @@ -1,301 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// SplitConfigurationRule - /// - [DataContract(Name = "SplitConfigurationRule")] - public partial class SplitConfigurationRule : IEquatable, IValidatableObject - { - /// - /// The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** - /// - /// The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** - [JsonConverter(typeof(StringEnumConverter))] - public enum FundingSourceEnum - { - /// - /// Enum Credit for value: credit - /// - [EnumMember(Value = "credit")] - Credit = 1, - - /// - /// Enum Debit for value: debit - /// - [EnumMember(Value = "debit")] - Debit = 2, - - /// - /// Enum ANY for value: ANY - /// - [EnumMember(Value = "ANY")] - ANY = 3, - - /// - /// Enum Charged for value: charged - /// - [EnumMember(Value = "charged")] - Charged = 4, - - /// - /// Enum DeferredDebit for value: deferred_debit - /// - [EnumMember(Value = "deferred_debit")] - DeferredDebit = 5, - - /// - /// Enum Prepaid for value: prepaid - /// - [EnumMember(Value = "prepaid")] - Prepaid = 6 - } - - - /// - /// The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** - /// - /// The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public FundingSourceEnum? FundingSource { get; set; } - /// - /// The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. - /// - /// The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4, - - /// - /// Enum ANY for value: ANY - /// - [EnumMember(Value = "ANY")] - ANY = 5 - - } - - - /// - /// The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. - /// - /// The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. - [DataMember(Name = "shopperInteraction", IsRequired = false, EmitDefaultValue = false)] - public ShopperInteractionEnum ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SplitConfigurationRule() { } - /// - /// Initializes a new instance of the class. - /// - /// The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). (required). - /// The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**. - /// The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. (required). - /// The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. (required). - /// splitLogic (required). - public SplitConfigurationRule(string currency = default(string), FundingSourceEnum? fundingSource = default(FundingSourceEnum?), string paymentMethod = default(string), ShopperInteractionEnum shopperInteraction = default(ShopperInteractionEnum), SplitConfigurationLogic splitLogic = default(SplitConfigurationLogic)) - { - this.Currency = currency; - this.PaymentMethod = paymentMethod; - this.ShopperInteraction = shopperInteraction; - this.SplitLogic = splitLogic; - this.FundingSource = fundingSource; - } - - /// - /// The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - /// - /// The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. - /// - /// The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public string PaymentMethod { get; set; } - - /// - /// The unique identifier of the split configuration rule. - /// - /// The unique identifier of the split configuration rule. - [DataMember(Name = "ruleId", EmitDefaultValue = false)] - public string RuleId { get; private set; } - - /// - /// Gets or Sets SplitLogic - /// - [DataMember(Name = "splitLogic", IsRequired = false, EmitDefaultValue = false)] - public SplitConfigurationLogic SplitLogic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SplitConfigurationRule {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" RuleId: ").Append(RuleId).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" SplitLogic: ").Append(SplitLogic).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SplitConfigurationRule); - } - - /// - /// Returns true if SplitConfigurationRule instances are equal - /// - /// Instance of SplitConfigurationRule to be compared - /// Boolean - public bool Equals(SplitConfigurationRule input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.FundingSource == input.FundingSource || - this.FundingSource.Equals(input.FundingSource) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.RuleId == input.RuleId || - (this.RuleId != null && - this.RuleId.Equals(input.RuleId)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.SplitLogic == input.SplitLogic || - (this.SplitLogic != null && - this.SplitLogic.Equals(input.SplitLogic)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.RuleId != null) - { - hashCode = (hashCode * 59) + this.RuleId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.SplitLogic != null) - { - hashCode = (hashCode * 59) + this.SplitLogic.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Standalone.cs b/Adyen/Model/Management/Standalone.cs deleted file mode 100644 index 8dc02d2ff..000000000 --- a/Adyen/Model/Management/Standalone.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Standalone - /// - [DataContract(Name = "Standalone")] - public partial class Standalone : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The default currency of the standalone payment terminal as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.. - /// Enable standalone mode.. - public Standalone(string currencyCode = default(string), bool? enableStandalone = default(bool?)) - { - this.CurrencyCode = currencyCode; - this.EnableStandalone = enableStandalone; - } - - /// - /// The default currency of the standalone payment terminal as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. - /// - /// The default currency of the standalone payment terminal as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. - [DataMember(Name = "currencyCode", EmitDefaultValue = false)] - public string CurrencyCode { get; set; } - - /// - /// Enable standalone mode. - /// - /// Enable standalone mode. - [DataMember(Name = "enableStandalone", EmitDefaultValue = false)] - public bool? EnableStandalone { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Standalone {\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append(" EnableStandalone: ").Append(EnableStandalone).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Standalone); - } - - /// - /// Returns true if Standalone instances are equal - /// - /// Instance of Standalone to be compared - /// Boolean - public bool Equals(Standalone input) - { - if (input == null) - { - return false; - } - return - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ) && - ( - this.EnableStandalone == input.EnableStandalone || - this.EnableStandalone.Equals(input.EnableStandalone) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CurrencyCode != null) - { - hashCode = (hashCode * 59) + this.CurrencyCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EnableStandalone.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // CurrencyCode (string) maxLength - if (this.CurrencyCode != null && this.CurrencyCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CurrencyCode, length must be less than 3.", new [] { "CurrencyCode" }); - } - - // CurrencyCode (string) minLength - if (this.CurrencyCode != null && this.CurrencyCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for CurrencyCode, length must be greater than 3.", new [] { "CurrencyCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/StarInfo.cs b/Adyen/Model/Management/StarInfo.cs deleted file mode 100644 index 234da6d7d..000000000 --- a/Adyen/Model/Management/StarInfo.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// StarInfo - /// - [DataContract(Name = "StarInfo")] - public partial class StarInfo : IEquatable, IValidatableObject - { - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ProcessingTypeEnum - { - /// - /// Enum Billpay for value: billpay - /// - [EnumMember(Value = "billpay")] - Billpay = 1, - - /// - /// Enum Ecom for value: ecom - /// - [EnumMember(Value = "ecom")] - Ecom = 2, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 3 - - } - - - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. - [DataMember(Name = "processingType", IsRequired = false, EmitDefaultValue = false)] - public ProcessingTypeEnum ProcessingType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StarInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of transactions processed over this payment method. Allowed values: - **pos** for in-person payments. - **billpay** for subscription payments, both the initial payment and the later recurring payments. These transactions have `recurringProcessingModel` **Subscription**. - **ecom** for all other card not present transactions. This includes non-recurring transactions and transactions with `recurringProcessingModel` **CardOnFile** or **UnscheduledCardOnFile**. (required). - /// transactionDescription. - public StarInfo(ProcessingTypeEnum processingType = default(ProcessingTypeEnum), TransactionDescriptionInfo transactionDescription = default(TransactionDescriptionInfo)) - { - this.ProcessingType = processingType; - this.TransactionDescription = transactionDescription; - } - - /// - /// Gets or Sets TransactionDescription - /// - [DataMember(Name = "transactionDescription", EmitDefaultValue = false)] - public TransactionDescriptionInfo TransactionDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StarInfo {\n"); - sb.Append(" ProcessingType: ").Append(ProcessingType).Append("\n"); - sb.Append(" TransactionDescription: ").Append(TransactionDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StarInfo); - } - - /// - /// Returns true if StarInfo instances are equal - /// - /// Instance of StarInfo to be compared - /// Boolean - public bool Equals(StarInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ProcessingType == input.ProcessingType || - this.ProcessingType.Equals(input.ProcessingType) - ) && - ( - this.TransactionDescription == input.TransactionDescription || - (this.TransactionDescription != null && - this.TransactionDescription.Equals(input.TransactionDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ProcessingType.GetHashCode(); - if (this.TransactionDescription != null) - { - hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Store.cs b/Adyen/Model/Management/Store.cs deleted file mode 100644 index 4964018a7..000000000 --- a/Adyen/Model/Management/Store.cs +++ /dev/null @@ -1,359 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Store - /// - [DataContract(Name = "Store")] - public partial class Store : IEquatable, IValidatableObject - { - /// - /// The status of the store. Possible values are: - **active**. This value is assigned automatically when a store is created. - **inactive**. The terminals under the store are blocked from accepting new transactions, but capturing outstanding transactions is still possible. - **closed**. This status is irreversible. The terminals under the store are reassigned to the merchant inventory. - /// - /// The status of the store. Possible values are: - **active**. This value is assigned automatically when a store is created. - **inactive**. The terminals under the store are blocked from accepting new transactions, but capturing outstanding transactions is still possible. - **closed**. This status is irreversible. The terminals under the store are reassigned to the merchant inventory. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3 - - } - - - /// - /// The status of the store. Possible values are: - **active**. This value is assigned automatically when a store is created. - **inactive**. The terminals under the store are blocked from accepting new transactions, but capturing outstanding transactions is still possible. - **closed**. This status is irreversible. The terminals under the store are reassigned to the merchant inventory. - /// - /// The status of the store. Possible values are: - **active**. This value is assigned automatically when a store is created. - **inactive**. The terminals under the store are blocked from accepting new transactions, but capturing outstanding transactions is still possible. - **closed**. This status is irreversible. The terminals under the store are reassigned to the merchant inventory. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// address. - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account.. - /// The description of the store.. - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. . - /// The unique identifier of the store. This value is generated by Adyen.. - /// The unique identifier of the merchant account that the store belongs to.. - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. . - /// A reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). - /// The store name shown on the shopper's bank or credit card statement and on the shopper receipt.. - /// splitConfiguration. - /// The status of the store. Possible values are: - **active**. This value is assigned automatically when a store is created. - **inactive**. The terminals under the store are blocked from accepting new transactions, but capturing outstanding transactions is still possible. - **closed**. This status is irreversible. The terminals under the store are reassigned to the merchant inventory.. - public Store(Links links = default(Links), StoreLocation address = default(StoreLocation), List businessLineIds = default(List), string description = default(string), string externalReferenceId = default(string), string id = default(string), string merchantId = default(string), string phoneNumber = default(string), string reference = default(string), string shopperStatement = default(string), StoreSplitConfiguration splitConfiguration = default(StoreSplitConfiguration), StatusEnum? status = default(StatusEnum?)) - { - this.Links = links; - this.Address = address; - this.BusinessLineIds = businessLineIds; - this.Description = description; - this.ExternalReferenceId = externalReferenceId; - this.Id = id; - this.MerchantId = merchantId; - this.PhoneNumber = phoneNumber; - this.Reference = reference; - this.ShopperStatement = shopperStatement; - this.SplitConfiguration = splitConfiguration; - this.Status = status; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public StoreLocation Address { get; set; } - - /// - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. - /// - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businesslines__resParam_id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. - [DataMember(Name = "businessLineIds", EmitDefaultValue = false)] - public List BusinessLineIds { get; set; } - - /// - /// The description of the store. - /// - /// The description of the store. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. - /// - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. - [DataMember(Name = "externalReferenceId", EmitDefaultValue = false)] - public string ExternalReferenceId { get; set; } - - /// - /// The unique identifier of the store. This value is generated by Adyen. - /// - /// The unique identifier of the store. This value is generated by Adyen. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the merchant account that the store belongs to. - /// - /// The unique identifier of the merchant account that the store belongs to. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. - /// - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// A reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) - /// - /// A reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_) - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The store name shown on the shopper's bank or credit card statement and on the shopper receipt. - /// - /// The store name shown on the shopper's bank or credit card statement and on the shopper receipt. - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// Gets or Sets SplitConfiguration - /// - [DataMember(Name = "splitConfiguration", EmitDefaultValue = false)] - public StoreSplitConfiguration SplitConfiguration { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Store {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BusinessLineIds: ").Append(BusinessLineIds).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ExternalReferenceId: ").Append(ExternalReferenceId).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" SplitConfiguration: ").Append(SplitConfiguration).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Store); - } - - /// - /// Returns true if Store instances are equal - /// - /// Instance of Store to be compared - /// Boolean - public bool Equals(Store input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BusinessLineIds == input.BusinessLineIds || - this.BusinessLineIds != null && - input.BusinessLineIds != null && - this.BusinessLineIds.SequenceEqual(input.BusinessLineIds) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExternalReferenceId == input.ExternalReferenceId || - (this.ExternalReferenceId != null && - this.ExternalReferenceId.Equals(input.ExternalReferenceId)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.SplitConfiguration == input.SplitConfiguration || - (this.SplitConfiguration != null && - this.SplitConfiguration.Equals(input.SplitConfiguration)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BusinessLineIds != null) - { - hashCode = (hashCode * 59) + this.BusinessLineIds.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExternalReferenceId != null) - { - hashCode = (hashCode * 59) + this.ExternalReferenceId.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - if (this.SplitConfiguration != null) - { - hashCode = (hashCode * 59) + this.SplitConfiguration.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/StoreAndForward.cs b/Adyen/Model/Management/StoreAndForward.cs deleted file mode 100644 index 651db77a2..000000000 --- a/Adyen/Model/Management/StoreAndForward.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// StoreAndForward - /// - [DataContract(Name = "StoreAndForward")] - public partial class StoreAndForward : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The maximum amount that the terminal accepts for a single store-and-forward payment.. - /// The maximum number of store-and-forward transactions per terminal that you can process while offline.. - /// supportedCardTypes. - public StoreAndForward(List maxAmount = default(List), int? maxPayments = default(int?), SupportedCardTypes supportedCardTypes = default(SupportedCardTypes)) - { - this.MaxAmount = maxAmount; - this.MaxPayments = maxPayments; - this.SupportedCardTypes = supportedCardTypes; - } - - /// - /// The maximum amount that the terminal accepts for a single store-and-forward payment. - /// - /// The maximum amount that the terminal accepts for a single store-and-forward payment. - [DataMember(Name = "maxAmount", EmitDefaultValue = false)] - public List MaxAmount { get; set; } - - /// - /// The maximum number of store-and-forward transactions per terminal that you can process while offline. - /// - /// The maximum number of store-and-forward transactions per terminal that you can process while offline. - [DataMember(Name = "maxPayments", EmitDefaultValue = false)] - public int? MaxPayments { get; set; } - - /// - /// Gets or Sets SupportedCardTypes - /// - [DataMember(Name = "supportedCardTypes", EmitDefaultValue = false)] - public SupportedCardTypes SupportedCardTypes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreAndForward {\n"); - sb.Append(" MaxAmount: ").Append(MaxAmount).Append("\n"); - sb.Append(" MaxPayments: ").Append(MaxPayments).Append("\n"); - sb.Append(" SupportedCardTypes: ").Append(SupportedCardTypes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreAndForward); - } - - /// - /// Returns true if StoreAndForward instances are equal - /// - /// Instance of StoreAndForward to be compared - /// Boolean - public bool Equals(StoreAndForward input) - { - if (input == null) - { - return false; - } - return - ( - this.MaxAmount == input.MaxAmount || - this.MaxAmount != null && - input.MaxAmount != null && - this.MaxAmount.SequenceEqual(input.MaxAmount) - ) && - ( - this.MaxPayments == input.MaxPayments || - this.MaxPayments.Equals(input.MaxPayments) - ) && - ( - this.SupportedCardTypes == input.SupportedCardTypes || - (this.SupportedCardTypes != null && - this.SupportedCardTypes.Equals(input.SupportedCardTypes)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MaxAmount != null) - { - hashCode = (hashCode * 59) + this.MaxAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MaxPayments.GetHashCode(); - if (this.SupportedCardTypes != null) - { - hashCode = (hashCode * 59) + this.SupportedCardTypes.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/StoreCreationRequest.cs b/Adyen/Model/Management/StoreCreationRequest.cs deleted file mode 100644 index 56e190f6c..000000000 --- a/Adyen/Model/Management/StoreCreationRequest.cs +++ /dev/null @@ -1,266 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// StoreCreationRequest - /// - [DataContract(Name = "StoreCreationRequest")] - public partial class StoreCreationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreCreationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account.. - /// Your description of the store. (required). - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. . - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. (required). - /// Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id).. - /// The store name to be shown on the shopper's bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can't be all numbers. (required). - /// splitConfiguration. - public StoreCreationRequest(StoreLocation address = default(StoreLocation), List businessLineIds = default(List), string description = default(string), string externalReferenceId = default(string), string phoneNumber = default(string), string reference = default(string), string shopperStatement = default(string), StoreSplitConfiguration splitConfiguration = default(StoreSplitConfiguration)) - { - this.Address = address; - this.Description = description; - this.PhoneNumber = phoneNumber; - this.ShopperStatement = shopperStatement; - this.BusinessLineIds = businessLineIds; - this.ExternalReferenceId = externalReferenceId; - this.Reference = reference; - this.SplitConfiguration = splitConfiguration; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public StoreLocation Address { get; set; } - - /// - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. - /// - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. - [DataMember(Name = "businessLineIds", EmitDefaultValue = false)] - public List BusinessLineIds { get; set; } - - /// - /// Your description of the store. - /// - /// Your description of the store. - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. - /// - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. - [DataMember(Name = "externalReferenceId", EmitDefaultValue = false)] - public string ExternalReferenceId { get; set; } - - /// - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. - /// - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. - [DataMember(Name = "phoneNumber", IsRequired = false, EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). - /// - /// Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The store name to be shown on the shopper's bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can't be all numbers. - /// - /// The store name to be shown on the shopper's bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can't be all numbers. - [DataMember(Name = "shopperStatement", IsRequired = false, EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// Gets or Sets SplitConfiguration - /// - [DataMember(Name = "splitConfiguration", EmitDefaultValue = false)] - public StoreSplitConfiguration SplitConfiguration { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreCreationRequest {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BusinessLineIds: ").Append(BusinessLineIds).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ExternalReferenceId: ").Append(ExternalReferenceId).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" SplitConfiguration: ").Append(SplitConfiguration).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreCreationRequest); - } - - /// - /// Returns true if StoreCreationRequest instances are equal - /// - /// Instance of StoreCreationRequest to be compared - /// Boolean - public bool Equals(StoreCreationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BusinessLineIds == input.BusinessLineIds || - this.BusinessLineIds != null && - input.BusinessLineIds != null && - this.BusinessLineIds.SequenceEqual(input.BusinessLineIds) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExternalReferenceId == input.ExternalReferenceId || - (this.ExternalReferenceId != null && - this.ExternalReferenceId.Equals(input.ExternalReferenceId)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.SplitConfiguration == input.SplitConfiguration || - (this.SplitConfiguration != null && - this.SplitConfiguration.Equals(input.SplitConfiguration)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BusinessLineIds != null) - { - hashCode = (hashCode * 59) + this.BusinessLineIds.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExternalReferenceId != null) - { - hashCode = (hashCode * 59) + this.ExternalReferenceId.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - if (this.SplitConfiguration != null) - { - hashCode = (hashCode * 59) + this.SplitConfiguration.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.cs b/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.cs deleted file mode 100644 index 761593d54..000000000 --- a/Adyen/Model/Management/StoreCreationWithMerchantCodeRequest.cs +++ /dev/null @@ -1,285 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// StoreCreationWithMerchantCodeRequest - /// - [DataContract(Name = "StoreCreationWithMerchantCodeRequest")] - public partial class StoreCreationWithMerchantCodeRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreCreationWithMerchantCodeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account.. - /// Your description of the store. (required). - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. . - /// The unique identifier of the merchant account that the store belongs to. (required). - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. (required). - /// Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id).. - /// The store name to be shown on the shopper's bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can't be all numbers. (required). - /// splitConfiguration. - public StoreCreationWithMerchantCodeRequest(StoreLocation address = default(StoreLocation), List businessLineIds = default(List), string description = default(string), string externalReferenceId = default(string), string merchantId = default(string), string phoneNumber = default(string), string reference = default(string), string shopperStatement = default(string), StoreSplitConfiguration splitConfiguration = default(StoreSplitConfiguration)) - { - this.Address = address; - this.Description = description; - this.MerchantId = merchantId; - this.PhoneNumber = phoneNumber; - this.ShopperStatement = shopperStatement; - this.BusinessLineIds = businessLineIds; - this.ExternalReferenceId = externalReferenceId; - this.Reference = reference; - this.SplitConfiguration = splitConfiguration; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public StoreLocation Address { get; set; } - - /// - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. - /// - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/legalentity/latest/post/businessLines#responses-200-id) that the store is associated with. If not specified, the business line of the merchant account is used. Required when there are multiple business lines under the merchant account. - [DataMember(Name = "businessLineIds", EmitDefaultValue = false)] - public List BusinessLineIds { get; set; } - - /// - /// Your description of the store. - /// - /// Your description of the store. - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. - /// - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. - [DataMember(Name = "externalReferenceId", EmitDefaultValue = false)] - public string ExternalReferenceId { get; set; } - - /// - /// The unique identifier of the merchant account that the store belongs to. - /// - /// The unique identifier of the merchant account that the store belongs to. - [DataMember(Name = "merchantId", IsRequired = false, EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. - /// - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. - [DataMember(Name = "phoneNumber", IsRequired = false, EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). - /// - /// Your reference to recognize the store by. Also known as the store code. Allowed characters: lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (_). If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The store name to be shown on the shopper's bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can't be all numbers. - /// - /// The store name to be shown on the shopper's bank or credit card statement and on the shopper receipt. Maximum length: 22 characters; can't be all numbers. - [DataMember(Name = "shopperStatement", IsRequired = false, EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// Gets or Sets SplitConfiguration - /// - [DataMember(Name = "splitConfiguration", EmitDefaultValue = false)] - public StoreSplitConfiguration SplitConfiguration { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreCreationWithMerchantCodeRequest {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BusinessLineIds: ").Append(BusinessLineIds).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ExternalReferenceId: ").Append(ExternalReferenceId).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" SplitConfiguration: ").Append(SplitConfiguration).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreCreationWithMerchantCodeRequest); - } - - /// - /// Returns true if StoreCreationWithMerchantCodeRequest instances are equal - /// - /// Instance of StoreCreationWithMerchantCodeRequest to be compared - /// Boolean - public bool Equals(StoreCreationWithMerchantCodeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BusinessLineIds == input.BusinessLineIds || - this.BusinessLineIds != null && - input.BusinessLineIds != null && - this.BusinessLineIds.SequenceEqual(input.BusinessLineIds) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExternalReferenceId == input.ExternalReferenceId || - (this.ExternalReferenceId != null && - this.ExternalReferenceId.Equals(input.ExternalReferenceId)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.SplitConfiguration == input.SplitConfiguration || - (this.SplitConfiguration != null && - this.SplitConfiguration.Equals(input.SplitConfiguration)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BusinessLineIds != null) - { - hashCode = (hashCode * 59) + this.BusinessLineIds.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExternalReferenceId != null) - { - hashCode = (hashCode * 59) + this.ExternalReferenceId.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - if (this.SplitConfiguration != null) - { - hashCode = (hashCode * 59) + this.SplitConfiguration.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/StoreLocation.cs b/Adyen/Model/Management/StoreLocation.cs deleted file mode 100644 index 7706e1e9b..000000000 --- a/Adyen/Model/Management/StoreLocation.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// StoreLocation - /// - [DataContract(Name = "StoreLocation")] - public partial class StoreLocation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreLocation() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city.. - /// The two-letter country code in [ISO_3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. (required). - /// The street address.. - /// Second address line.. - /// Third address line.. - /// The postal code.. - /// The state or province code as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Required for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States. - public StoreLocation(string city = default(string), string country = default(string), string line1 = default(string), string line2 = default(string), string line3 = default(string), string postalCode = default(string), string stateOrProvince = default(string)) - { - this.Country = country; - this.City = city; - this.Line1 = line1; - this.Line2 = line2; - this.Line3 = line3; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. - /// - /// The name of the city. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-letter country code in [ISO_3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. - /// - /// The two-letter country code in [ISO_3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The street address. - /// - /// The street address. - [DataMember(Name = "line1", EmitDefaultValue = false)] - public string Line1 { get; set; } - - /// - /// Second address line. - /// - /// Second address line. - [DataMember(Name = "line2", EmitDefaultValue = false)] - public string Line2 { get; set; } - - /// - /// Third address line. - /// - /// Third address line. - [DataMember(Name = "line3", EmitDefaultValue = false)] - public string Line3 { get; set; } - - /// - /// The postal code. - /// - /// The postal code. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The state or province code as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Required for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States - /// - /// The state or province code as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Required for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreLocation {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Line1: ").Append(Line1).Append("\n"); - sb.Append(" Line2: ").Append(Line2).Append("\n"); - sb.Append(" Line3: ").Append(Line3).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreLocation); - } - - /// - /// Returns true if StoreLocation instances are equal - /// - /// Instance of StoreLocation to be compared - /// Boolean - public bool Equals(StoreLocation input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Line1 == input.Line1 || - (this.Line1 != null && - this.Line1.Equals(input.Line1)) - ) && - ( - this.Line2 == input.Line2 || - (this.Line2 != null && - this.Line2.Equals(input.Line2)) - ) && - ( - this.Line3 == input.Line3 || - (this.Line3 != null && - this.Line3.Equals(input.Line3)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Line1 != null) - { - hashCode = (hashCode * 59) + this.Line1.GetHashCode(); - } - if (this.Line2 != null) - { - hashCode = (hashCode * 59) + this.Line2.GetHashCode(); - } - if (this.Line3 != null) - { - hashCode = (hashCode * 59) + this.Line3.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/StoreSplitConfiguration.cs b/Adyen/Model/Management/StoreSplitConfiguration.cs deleted file mode 100644 index 05a2609c8..000000000 --- a/Adyen/Model/Management/StoreSplitConfiguration.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// StoreSplitConfiguration - /// - [DataContract(Name = "StoreSplitConfiguration")] - public partial class StoreSplitConfiguration : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The [unique identifier of the balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id) to which the split amount must be booked, depending on the defined [split logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/_merchantId_/splitConfigurations#request-rules-splitLogic).. - /// The unique identifier of the [split configuration profile](https://docs.adyen.com/platforms/automatic-split-configuration/create-split-configuration/).. - public StoreSplitConfiguration(string balanceAccountId = default(string), string splitConfigurationId = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.SplitConfigurationId = splitConfigurationId; - } - - /// - /// The [unique identifier of the balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id) to which the split amount must be booked, depending on the defined [split logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/_merchantId_/splitConfigurations#request-rules-splitLogic). - /// - /// The [unique identifier of the balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id) to which the split amount must be booked, depending on the defined [split logic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/_merchantId_/splitConfigurations#request-rules-splitLogic). - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// The unique identifier of the [split configuration profile](https://docs.adyen.com/platforms/automatic-split-configuration/create-split-configuration/). - /// - /// The unique identifier of the [split configuration profile](https://docs.adyen.com/platforms/automatic-split-configuration/create-split-configuration/). - [DataMember(Name = "splitConfigurationId", EmitDefaultValue = false)] - public string SplitConfigurationId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreSplitConfiguration {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" SplitConfigurationId: ").Append(SplitConfigurationId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreSplitConfiguration); - } - - /// - /// Returns true if StoreSplitConfiguration instances are equal - /// - /// Instance of StoreSplitConfiguration to be compared - /// Boolean - public bool Equals(StoreSplitConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.SplitConfigurationId == input.SplitConfigurationId || - (this.SplitConfigurationId != null && - this.SplitConfigurationId.Equals(input.SplitConfigurationId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.SplitConfigurationId != null) - { - hashCode = (hashCode * 59) + this.SplitConfigurationId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/SupportedCardTypes.cs b/Adyen/Model/Management/SupportedCardTypes.cs deleted file mode 100644 index d9410842a..000000000 --- a/Adyen/Model/Management/SupportedCardTypes.cs +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// SupportedCardTypes - /// - [DataContract(Name = "SupportedCardTypes")] - public partial class SupportedCardTypes : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Set to **true** to accept credit cards.. - /// Set to **true** to accept debit cards.. - /// Set to **true** to accept cards that allow deferred debit.. - /// Set to **true** to accept prepaid cards.. - /// Set to **true** to accept card types for which the terminal can't determine the funding source while offline.. - public SupportedCardTypes(bool? credit = default(bool?), bool? debit = default(bool?), bool? deferredDebit = default(bool?), bool? prepaid = default(bool?), bool? unknown = default(bool?)) - { - this.Credit = credit; - this.Debit = debit; - this.DeferredDebit = deferredDebit; - this.Prepaid = prepaid; - this.Unknown = unknown; - } - - /// - /// Set to **true** to accept credit cards. - /// - /// Set to **true** to accept credit cards. - [DataMember(Name = "credit", EmitDefaultValue = false)] - public bool? Credit { get; set; } - - /// - /// Set to **true** to accept debit cards. - /// - /// Set to **true** to accept debit cards. - [DataMember(Name = "debit", EmitDefaultValue = false)] - public bool? Debit { get; set; } - - /// - /// Set to **true** to accept cards that allow deferred debit. - /// - /// Set to **true** to accept cards that allow deferred debit. - [DataMember(Name = "deferredDebit", EmitDefaultValue = false)] - public bool? DeferredDebit { get; set; } - - /// - /// Set to **true** to accept prepaid cards. - /// - /// Set to **true** to accept prepaid cards. - [DataMember(Name = "prepaid", EmitDefaultValue = false)] - public bool? Prepaid { get; set; } - - /// - /// Set to **true** to accept card types for which the terminal can't determine the funding source while offline. - /// - /// Set to **true** to accept card types for which the terminal can't determine the funding source while offline. - [DataMember(Name = "unknown", EmitDefaultValue = false)] - public bool? Unknown { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SupportedCardTypes {\n"); - sb.Append(" Credit: ").Append(Credit).Append("\n"); - sb.Append(" Debit: ").Append(Debit).Append("\n"); - sb.Append(" DeferredDebit: ").Append(DeferredDebit).Append("\n"); - sb.Append(" Prepaid: ").Append(Prepaid).Append("\n"); - sb.Append(" Unknown: ").Append(Unknown).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SupportedCardTypes); - } - - /// - /// Returns true if SupportedCardTypes instances are equal - /// - /// Instance of SupportedCardTypes to be compared - /// Boolean - public bool Equals(SupportedCardTypes input) - { - if (input == null) - { - return false; - } - return - ( - this.Credit == input.Credit || - this.Credit.Equals(input.Credit) - ) && - ( - this.Debit == input.Debit || - this.Debit.Equals(input.Debit) - ) && - ( - this.DeferredDebit == input.DeferredDebit || - this.DeferredDebit.Equals(input.DeferredDebit) - ) && - ( - this.Prepaid == input.Prepaid || - this.Prepaid.Equals(input.Prepaid) - ) && - ( - this.Unknown == input.Unknown || - this.Unknown.Equals(input.Unknown) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Credit.GetHashCode(); - hashCode = (hashCode * 59) + this.Debit.GetHashCode(); - hashCode = (hashCode * 59) + this.DeferredDebit.GetHashCode(); - hashCode = (hashCode * 59) + this.Prepaid.GetHashCode(); - hashCode = (hashCode * 59) + this.Unknown.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Surcharge.cs b/Adyen/Model/Management/Surcharge.cs deleted file mode 100644 index 4e5febafa..000000000 --- a/Adyen/Model/Management/Surcharge.cs +++ /dev/null @@ -1,160 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Surcharge - /// - [DataContract(Name = "Surcharge")] - public partial class Surcharge : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Show the surcharge details on the terminal, so the shopper can confirm.. - /// Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies.. - /// Exclude the tip amount from the surcharge calculation.. - public Surcharge(bool? askConfirmation = default(bool?), List configurations = default(List), bool? excludeGratuityFromSurcharge = default(bool?)) - { - this.AskConfirmation = askConfirmation; - this.Configurations = configurations; - this.ExcludeGratuityFromSurcharge = excludeGratuityFromSurcharge; - } - - /// - /// Show the surcharge details on the terminal, so the shopper can confirm. - /// - /// Show the surcharge details on the terminal, so the shopper can confirm. - [DataMember(Name = "askConfirmation", EmitDefaultValue = false)] - public bool? AskConfirmation { get; set; } - - /// - /// Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies. - /// - /// Surcharge fees or percentages for specific cards, funding sources (credit or debit), and currencies. - [DataMember(Name = "configurations", EmitDefaultValue = false)] - public List Configurations { get; set; } - - /// - /// Exclude the tip amount from the surcharge calculation. - /// - /// Exclude the tip amount from the surcharge calculation. - [DataMember(Name = "excludeGratuityFromSurcharge", EmitDefaultValue = false)] - public bool? ExcludeGratuityFromSurcharge { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Surcharge {\n"); - sb.Append(" AskConfirmation: ").Append(AskConfirmation).Append("\n"); - sb.Append(" Configurations: ").Append(Configurations).Append("\n"); - sb.Append(" ExcludeGratuityFromSurcharge: ").Append(ExcludeGratuityFromSurcharge).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Surcharge); - } - - /// - /// Returns true if Surcharge instances are equal - /// - /// Instance of Surcharge to be compared - /// Boolean - public bool Equals(Surcharge input) - { - if (input == null) - { - return false; - } - return - ( - this.AskConfirmation == input.AskConfirmation || - this.AskConfirmation.Equals(input.AskConfirmation) - ) && - ( - this.Configurations == input.Configurations || - this.Configurations != null && - input.Configurations != null && - this.Configurations.SequenceEqual(input.Configurations) - ) && - ( - this.ExcludeGratuityFromSurcharge == input.ExcludeGratuityFromSurcharge || - this.ExcludeGratuityFromSurcharge.Equals(input.ExcludeGratuityFromSurcharge) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AskConfirmation.GetHashCode(); - if (this.Configurations != null) - { - hashCode = (hashCode * 59) + this.Configurations.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExcludeGratuityFromSurcharge.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/SwishInfo.cs b/Adyen/Model/Management/SwishInfo.cs deleted file mode 100644 index 63b040c11..000000000 --- a/Adyen/Model/Management/SwishInfo.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// SwishInfo - /// - [DataContract(Name = "SwishInfo")] - public partial class SwishInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SwishInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Swish number. Format: 10 digits without spaces. For example, **1231111111**. (required). - public SwishInfo(string swishNumber = default(string)) - { - this.SwishNumber = swishNumber; - } - - /// - /// Swish number. Format: 10 digits without spaces. For example, **1231111111**. - /// - /// Swish number. Format: 10 digits without spaces. For example, **1231111111**. - [DataMember(Name = "swishNumber", IsRequired = false, EmitDefaultValue = false)] - public string SwishNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SwishInfo {\n"); - sb.Append(" SwishNumber: ").Append(SwishNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SwishInfo); - } - - /// - /// Returns true if SwishInfo instances are equal - /// - /// Instance of SwishInfo to be compared - /// Boolean - public bool Equals(SwishInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.SwishNumber == input.SwishNumber || - (this.SwishNumber != null && - this.SwishNumber.Equals(input.SwishNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SwishNumber != null) - { - hashCode = (hashCode * 59) + this.SwishNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // SwishNumber (string) maxLength - if (this.SwishNumber != null && this.SwishNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SwishNumber, length must be less than 10.", new [] { "SwishNumber" }); - } - - // SwishNumber (string) minLength - if (this.SwishNumber != null && this.SwishNumber.Length < 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SwishNumber, length must be greater than 10.", new [] { "SwishNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TapToPay.cs b/Adyen/Model/Management/TapToPay.cs deleted file mode 100644 index 915f85bd2..000000000 --- a/Adyen/Model/Management/TapToPay.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TapToPay - /// - [DataContract(Name = "TapToPay")] - public partial class TapToPay : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The text shown on the screen during the Tap to Pay transaction.. - public TapToPay(string merchantDisplayName = default(string)) - { - this.MerchantDisplayName = merchantDisplayName; - } - - /// - /// The text shown on the screen during the Tap to Pay transaction. - /// - /// The text shown on the screen during the Tap to Pay transaction. - [DataMember(Name = "merchantDisplayName", EmitDefaultValue = false)] - public string MerchantDisplayName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TapToPay {\n"); - sb.Append(" MerchantDisplayName: ").Append(MerchantDisplayName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TapToPay); - } - - /// - /// Returns true if TapToPay instances are equal - /// - /// Instance of TapToPay to be compared - /// Boolean - public bool Equals(TapToPay input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantDisplayName == input.MerchantDisplayName || - (this.MerchantDisplayName != null && - this.MerchantDisplayName.Equals(input.MerchantDisplayName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantDisplayName != null) - { - hashCode = (hashCode * 59) + this.MerchantDisplayName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Terminal.cs b/Adyen/Model/Management/Terminal.cs deleted file mode 100644 index 39c450014..000000000 --- a/Adyen/Model/Management/Terminal.cs +++ /dev/null @@ -1,279 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Terminal - /// - [DataContract(Name = "Terminal")] - public partial class Terminal : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// assignment. - /// connectivity. - /// The software release currently in use on the terminal.. - /// The unique identifier of the terminal.. - /// Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago.. - /// Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago.. - /// The model name of the terminal.. - /// The exact time of the terminal reboot, in the timezone of the terminal in **HH:mm** format.. - /// The serial number of the terminal.. - public Terminal(TerminalAssignment assignment = default(TerminalAssignment), TerminalConnectivity connectivity = default(TerminalConnectivity), string firmwareVersion = default(string), string id = default(string), DateTime lastActivityAt = default(DateTime), DateTime lastTransactionAt = default(DateTime), string model = default(string), string restartLocalTime = default(string), string serialNumber = default(string)) - { - this.Assignment = assignment; - this.Connectivity = connectivity; - this.FirmwareVersion = firmwareVersion; - this.Id = id; - this.LastActivityAt = lastActivityAt; - this.LastTransactionAt = lastTransactionAt; - this.Model = model; - this.RestartLocalTime = restartLocalTime; - this.SerialNumber = serialNumber; - } - - /// - /// Gets or Sets Assignment - /// - [DataMember(Name = "assignment", EmitDefaultValue = false)] - public TerminalAssignment Assignment { get; set; } - - /// - /// Gets or Sets Connectivity - /// - [DataMember(Name = "connectivity", EmitDefaultValue = false)] - public TerminalConnectivity Connectivity { get; set; } - - /// - /// The software release currently in use on the terminal. - /// - /// The software release currently in use on the terminal. - [DataMember(Name = "firmwareVersion", EmitDefaultValue = false)] - public string FirmwareVersion { get; set; } - - /// - /// The unique identifier of the terminal. - /// - /// The unique identifier of the terminal. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago. - /// - /// Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago. - [DataMember(Name = "lastActivityAt", EmitDefaultValue = false)] - public DateTime LastActivityAt { get; set; } - - /// - /// Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago. - /// - /// Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago. - [DataMember(Name = "lastTransactionAt", EmitDefaultValue = false)] - public DateTime LastTransactionAt { get; set; } - - /// - /// The model name of the terminal. - /// - /// The model name of the terminal. - [DataMember(Name = "model", EmitDefaultValue = false)] - public string Model { get; set; } - - /// - /// The exact time of the terminal reboot, in the timezone of the terminal in **HH:mm** format. - /// - /// The exact time of the terminal reboot, in the timezone of the terminal in **HH:mm** format. - [DataMember(Name = "restartLocalTime", EmitDefaultValue = false)] - public string RestartLocalTime { get; set; } - - /// - /// The serial number of the terminal. - /// - /// The serial number of the terminal. - [DataMember(Name = "serialNumber", EmitDefaultValue = false)] - public string SerialNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Terminal {\n"); - sb.Append(" Assignment: ").Append(Assignment).Append("\n"); - sb.Append(" Connectivity: ").Append(Connectivity).Append("\n"); - sb.Append(" FirmwareVersion: ").Append(FirmwareVersion).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LastActivityAt: ").Append(LastActivityAt).Append("\n"); - sb.Append(" LastTransactionAt: ").Append(LastTransactionAt).Append("\n"); - sb.Append(" Model: ").Append(Model).Append("\n"); - sb.Append(" RestartLocalTime: ").Append(RestartLocalTime).Append("\n"); - sb.Append(" SerialNumber: ").Append(SerialNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Terminal); - } - - /// - /// Returns true if Terminal instances are equal - /// - /// Instance of Terminal to be compared - /// Boolean - public bool Equals(Terminal input) - { - if (input == null) - { - return false; - } - return - ( - this.Assignment == input.Assignment || - (this.Assignment != null && - this.Assignment.Equals(input.Assignment)) - ) && - ( - this.Connectivity == input.Connectivity || - (this.Connectivity != null && - this.Connectivity.Equals(input.Connectivity)) - ) && - ( - this.FirmwareVersion == input.FirmwareVersion || - (this.FirmwareVersion != null && - this.FirmwareVersion.Equals(input.FirmwareVersion)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LastActivityAt == input.LastActivityAt || - (this.LastActivityAt != null && - this.LastActivityAt.Equals(input.LastActivityAt)) - ) && - ( - this.LastTransactionAt == input.LastTransactionAt || - (this.LastTransactionAt != null && - this.LastTransactionAt.Equals(input.LastTransactionAt)) - ) && - ( - this.Model == input.Model || - (this.Model != null && - this.Model.Equals(input.Model)) - ) && - ( - this.RestartLocalTime == input.RestartLocalTime || - (this.RestartLocalTime != null && - this.RestartLocalTime.Equals(input.RestartLocalTime)) - ) && - ( - this.SerialNumber == input.SerialNumber || - (this.SerialNumber != null && - this.SerialNumber.Equals(input.SerialNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Assignment != null) - { - hashCode = (hashCode * 59) + this.Assignment.GetHashCode(); - } - if (this.Connectivity != null) - { - hashCode = (hashCode * 59) + this.Connectivity.GetHashCode(); - } - if (this.FirmwareVersion != null) - { - hashCode = (hashCode * 59) + this.FirmwareVersion.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LastActivityAt != null) - { - hashCode = (hashCode * 59) + this.LastActivityAt.GetHashCode(); - } - if (this.LastTransactionAt != null) - { - hashCode = (hashCode * 59) + this.LastTransactionAt.GetHashCode(); - } - if (this.Model != null) - { - hashCode = (hashCode * 59) + this.Model.GetHashCode(); - } - if (this.RestartLocalTime != null) - { - hashCode = (hashCode * 59) + this.RestartLocalTime.GetHashCode(); - } - if (this.SerialNumber != null) - { - hashCode = (hashCode * 59) + this.SerialNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalActionScheduleDetail.cs b/Adyen/Model/Management/TerminalActionScheduleDetail.cs deleted file mode 100644 index 29788e6da..000000000 --- a/Adyen/Model/Management/TerminalActionScheduleDetail.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalActionScheduleDetail - /// - [DataContract(Name = "TerminalActionScheduleDetail")] - public partial class TerminalActionScheduleDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The ID of the action on the specified terminal.. - /// The unique ID of the terminal that the action applies to.. - public TerminalActionScheduleDetail(string id = default(string), string terminalId = default(string)) - { - this.Id = id; - this.TerminalId = terminalId; - } - - /// - /// The ID of the action on the specified terminal. - /// - /// The ID of the action on the specified terminal. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique ID of the terminal that the action applies to. - /// - /// The unique ID of the terminal that the action applies to. - [DataMember(Name = "terminalId", EmitDefaultValue = false)] - public string TerminalId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalActionScheduleDetail {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" TerminalId: ").Append(TerminalId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalActionScheduleDetail); - } - - /// - /// Returns true if TerminalActionScheduleDetail instances are equal - /// - /// Instance of TerminalActionScheduleDetail to be compared - /// Boolean - public bool Equals(TerminalActionScheduleDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.TerminalId == input.TerminalId || - (this.TerminalId != null && - this.TerminalId.Equals(input.TerminalId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.TerminalId != null) - { - hashCode = (hashCode * 59) + this.TerminalId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalAssignment.cs b/Adyen/Model/Management/TerminalAssignment.cs deleted file mode 100644 index ba356a7cb..000000000 --- a/Adyen/Model/Management/TerminalAssignment.cs +++ /dev/null @@ -1,238 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalAssignment - /// - [DataContract(Name = "TerminalAssignment")] - public partial class TerminalAssignment : IEquatable, IValidatableObject - { - /// - /// The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions. - /// - /// The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Boarded for value: boarded - /// - [EnumMember(Value = "boarded")] - Boarded = 1, - - /// - /// Enum Deployed for value: deployed - /// - [EnumMember(Value = "deployed")] - Deployed = 2, - - /// - /// Enum Inventory for value: inventory - /// - [EnumMember(Value = "inventory")] - Inventory = 3, - - /// - /// Enum ReassignmentInProgress for value: reassignmentInProgress - /// - [EnumMember(Value = "reassignmentInProgress")] - ReassignmentInProgress = 4 - - } - - - /// - /// The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions. - /// - /// The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TerminalAssignment() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the company account to which terminal is assigned. (required). - /// The unique identifier of the merchant account to which terminal is assigned.. - /// reassignmentTarget. - /// The status of the reassignment. Possible values: * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform. * `deployed`: the terminal is deployed and reassigned. * `inventory`: the terminal is in inventory and cannot process transactions. * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions. (required). - /// The unique identifier of the store to which terminal is assigned.. - public TerminalAssignment(string companyId = default(string), string merchantId = default(string), TerminalReassignmentTarget reassignmentTarget = default(TerminalReassignmentTarget), StatusEnum status = default(StatusEnum), string storeId = default(string)) - { - this.CompanyId = companyId; - this.Status = status; - this.MerchantId = merchantId; - this.ReassignmentTarget = reassignmentTarget; - this.StoreId = storeId; - } - - /// - /// The unique identifier of the company account to which terminal is assigned. - /// - /// The unique identifier of the company account to which terminal is assigned. - [DataMember(Name = "companyId", IsRequired = false, EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// The unique identifier of the merchant account to which terminal is assigned. - /// - /// The unique identifier of the merchant account to which terminal is assigned. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// Gets or Sets ReassignmentTarget - /// - [DataMember(Name = "reassignmentTarget", EmitDefaultValue = false)] - public TerminalReassignmentTarget ReassignmentTarget { get; set; } - - /// - /// The unique identifier of the store to which terminal is assigned. - /// - /// The unique identifier of the store to which terminal is assigned. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalAssignment {\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" ReassignmentTarget: ").Append(ReassignmentTarget).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalAssignment); - } - - /// - /// Returns true if TerminalAssignment instances are equal - /// - /// Instance of TerminalAssignment to be compared - /// Boolean - public bool Equals(TerminalAssignment input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.ReassignmentTarget == input.ReassignmentTarget || - (this.ReassignmentTarget != null && - this.ReassignmentTarget.Equals(input.ReassignmentTarget)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.ReassignmentTarget != null) - { - hashCode = (hashCode * 59) + this.ReassignmentTarget.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalConnectivity.cs b/Adyen/Model/Management/TerminalConnectivity.cs deleted file mode 100644 index a0970488c..000000000 --- a/Adyen/Model/Management/TerminalConnectivity.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalConnectivity - /// - [DataContract(Name = "TerminalConnectivity")] - public partial class TerminalConnectivity : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// bluetooth. - /// cellular. - /// ethernet. - /// wifi. - public TerminalConnectivity(TerminalConnectivityBluetooth bluetooth = default(TerminalConnectivityBluetooth), TerminalConnectivityCellular cellular = default(TerminalConnectivityCellular), TerminalConnectivityEthernet ethernet = default(TerminalConnectivityEthernet), TerminalConnectivityWifi wifi = default(TerminalConnectivityWifi)) - { - this.Bluetooth = bluetooth; - this.Cellular = cellular; - this.Ethernet = ethernet; - this.Wifi = wifi; - } - - /// - /// Gets or Sets Bluetooth - /// - [DataMember(Name = "bluetooth", EmitDefaultValue = false)] - public TerminalConnectivityBluetooth Bluetooth { get; set; } - - /// - /// Gets or Sets Cellular - /// - [DataMember(Name = "cellular", EmitDefaultValue = false)] - public TerminalConnectivityCellular Cellular { get; set; } - - /// - /// Gets or Sets Ethernet - /// - [DataMember(Name = "ethernet", EmitDefaultValue = false)] - public TerminalConnectivityEthernet Ethernet { get; set; } - - /// - /// Gets or Sets Wifi - /// - [DataMember(Name = "wifi", EmitDefaultValue = false)] - public TerminalConnectivityWifi Wifi { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalConnectivity {\n"); - sb.Append(" Bluetooth: ").Append(Bluetooth).Append("\n"); - sb.Append(" Cellular: ").Append(Cellular).Append("\n"); - sb.Append(" Ethernet: ").Append(Ethernet).Append("\n"); - sb.Append(" Wifi: ").Append(Wifi).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalConnectivity); - } - - /// - /// Returns true if TerminalConnectivity instances are equal - /// - /// Instance of TerminalConnectivity to be compared - /// Boolean - public bool Equals(TerminalConnectivity input) - { - if (input == null) - { - return false; - } - return - ( - this.Bluetooth == input.Bluetooth || - (this.Bluetooth != null && - this.Bluetooth.Equals(input.Bluetooth)) - ) && - ( - this.Cellular == input.Cellular || - (this.Cellular != null && - this.Cellular.Equals(input.Cellular)) - ) && - ( - this.Ethernet == input.Ethernet || - (this.Ethernet != null && - this.Ethernet.Equals(input.Ethernet)) - ) && - ( - this.Wifi == input.Wifi || - (this.Wifi != null && - this.Wifi.Equals(input.Wifi)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bluetooth != null) - { - hashCode = (hashCode * 59) + this.Bluetooth.GetHashCode(); - } - if (this.Cellular != null) - { - hashCode = (hashCode * 59) + this.Cellular.GetHashCode(); - } - if (this.Ethernet != null) - { - hashCode = (hashCode * 59) + this.Ethernet.GetHashCode(); - } - if (this.Wifi != null) - { - hashCode = (hashCode * 59) + this.Wifi.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalConnectivityBluetooth.cs b/Adyen/Model/Management/TerminalConnectivityBluetooth.cs deleted file mode 100644 index e58882c35..000000000 --- a/Adyen/Model/Management/TerminalConnectivityBluetooth.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalConnectivityBluetooth - /// - [DataContract(Name = "TerminalConnectivityBluetooth")] - public partial class TerminalConnectivityBluetooth : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The terminal's Bluetooth IP address.. - /// The terminal's Bluetooth MAC address.. - public TerminalConnectivityBluetooth(string ipAddress = default(string), string macAddress = default(string)) - { - this.IpAddress = ipAddress; - this.MacAddress = macAddress; - } - - /// - /// The terminal's Bluetooth IP address. - /// - /// The terminal's Bluetooth IP address. - [DataMember(Name = "ipAddress", EmitDefaultValue = false)] - public string IpAddress { get; set; } - - /// - /// The terminal's Bluetooth MAC address. - /// - /// The terminal's Bluetooth MAC address. - [DataMember(Name = "macAddress", EmitDefaultValue = false)] - public string MacAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalConnectivityBluetooth {\n"); - sb.Append(" IpAddress: ").Append(IpAddress).Append("\n"); - sb.Append(" MacAddress: ").Append(MacAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalConnectivityBluetooth); - } - - /// - /// Returns true if TerminalConnectivityBluetooth instances are equal - /// - /// Instance of TerminalConnectivityBluetooth to be compared - /// Boolean - public bool Equals(TerminalConnectivityBluetooth input) - { - if (input == null) - { - return false; - } - return - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ) && - ( - this.MacAddress == input.MacAddress || - (this.MacAddress != null && - this.MacAddress.Equals(input.MacAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - if (this.MacAddress != null) - { - hashCode = (hashCode * 59) + this.MacAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalConnectivityCellular.cs b/Adyen/Model/Management/TerminalConnectivityCellular.cs deleted file mode 100644 index 98e82cf32..000000000 --- a/Adyen/Model/Management/TerminalConnectivityCellular.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalConnectivityCellular - /// - [DataContract(Name = "TerminalConnectivityCellular")] - public partial class TerminalConnectivityCellular : IEquatable, IValidatableObject - { - /// - /// On a terminal that supports 3G or 4G connectivity, indicates the status of the primary SIM card in the terminal. - /// - /// On a terminal that supports 3G or 4G connectivity, indicates the status of the primary SIM card in the terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Activated for value: activated - /// - [EnumMember(Value = "activated")] - Activated = 1, - - /// - /// Enum Deactivated for value: deactivated - /// - [EnumMember(Value = "deactivated")] - Deactivated = 2, - - /// - /// Enum Deprecated for value: deprecated - /// - [EnumMember(Value = "deprecated")] - Deprecated = 3, - - /// - /// Enum Inventory for value: inventory - /// - [EnumMember(Value = "inventory")] - Inventory = 4, - - /// - /// Enum ReadyForActivation for value: readyForActivation - /// - [EnumMember(Value = "readyForActivation")] - ReadyForActivation = 5 - - } - - - /// - /// On a terminal that supports 3G or 4G connectivity, indicates the status of the primary SIM card in the terminal. - /// - /// On a terminal that supports 3G or 4G connectivity, indicates the status of the primary SIM card in the terminal. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The integrated circuit card identifier (ICCID) of the primary SIM card in the terminal.. - /// The integrated circuit card identifier (ICCID) of the secondary SIM card in the terminal, typically used for a [third-party SIM card](https://docs.adyen.com/point-of-sale/design-your-integration/network-and-connectivity/cellular-failover/#using-a-third-party-sim-card).. - /// On a terminal that supports 3G or 4G connectivity, indicates the status of the primary SIM card in the terminal.. - public TerminalConnectivityCellular(string iccid = default(string), string iccid2 = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.Iccid = iccid; - this.Iccid2 = iccid2; - this.Status = status; - } - - /// - /// The integrated circuit card identifier (ICCID) of the primary SIM card in the terminal. - /// - /// The integrated circuit card identifier (ICCID) of the primary SIM card in the terminal. - [DataMember(Name = "iccid", EmitDefaultValue = false)] - public string Iccid { get; set; } - - /// - /// The integrated circuit card identifier (ICCID) of the secondary SIM card in the terminal, typically used for a [third-party SIM card](https://docs.adyen.com/point-of-sale/design-your-integration/network-and-connectivity/cellular-failover/#using-a-third-party-sim-card). - /// - /// The integrated circuit card identifier (ICCID) of the secondary SIM card in the terminal, typically used for a [third-party SIM card](https://docs.adyen.com/point-of-sale/design-your-integration/network-and-connectivity/cellular-failover/#using-a-third-party-sim-card). - [DataMember(Name = "iccid2", EmitDefaultValue = false)] - public string Iccid2 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalConnectivityCellular {\n"); - sb.Append(" Iccid: ").Append(Iccid).Append("\n"); - sb.Append(" Iccid2: ").Append(Iccid2).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalConnectivityCellular); - } - - /// - /// Returns true if TerminalConnectivityCellular instances are equal - /// - /// Instance of TerminalConnectivityCellular to be compared - /// Boolean - public bool Equals(TerminalConnectivityCellular input) - { - if (input == null) - { - return false; - } - return - ( - this.Iccid == input.Iccid || - (this.Iccid != null && - this.Iccid.Equals(input.Iccid)) - ) && - ( - this.Iccid2 == input.Iccid2 || - (this.Iccid2 != null && - this.Iccid2.Equals(input.Iccid2)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Iccid != null) - { - hashCode = (hashCode * 59) + this.Iccid.GetHashCode(); - } - if (this.Iccid2 != null) - { - hashCode = (hashCode * 59) + this.Iccid2.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalConnectivityEthernet.cs b/Adyen/Model/Management/TerminalConnectivityEthernet.cs deleted file mode 100644 index 7a70ae083..000000000 --- a/Adyen/Model/Management/TerminalConnectivityEthernet.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalConnectivityEthernet - /// - [DataContract(Name = "TerminalConnectivityEthernet")] - public partial class TerminalConnectivityEthernet : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The terminal's ethernet IP address.. - /// The ethernet link negotiation that the terminal uses.. - /// The terminal's ethernet MAC address.. - public TerminalConnectivityEthernet(string ipAddress = default(string), string linkNegotiation = default(string), string macAddress = default(string)) - { - this.IpAddress = ipAddress; - this.LinkNegotiation = linkNegotiation; - this.MacAddress = macAddress; - } - - /// - /// The terminal's ethernet IP address. - /// - /// The terminal's ethernet IP address. - [DataMember(Name = "ipAddress", EmitDefaultValue = false)] - public string IpAddress { get; set; } - - /// - /// The ethernet link negotiation that the terminal uses. - /// - /// The ethernet link negotiation that the terminal uses. - [DataMember(Name = "linkNegotiation", EmitDefaultValue = false)] - public string LinkNegotiation { get; set; } - - /// - /// The terminal's ethernet MAC address. - /// - /// The terminal's ethernet MAC address. - [DataMember(Name = "macAddress", EmitDefaultValue = false)] - public string MacAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalConnectivityEthernet {\n"); - sb.Append(" IpAddress: ").Append(IpAddress).Append("\n"); - sb.Append(" LinkNegotiation: ").Append(LinkNegotiation).Append("\n"); - sb.Append(" MacAddress: ").Append(MacAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalConnectivityEthernet); - } - - /// - /// Returns true if TerminalConnectivityEthernet instances are equal - /// - /// Instance of TerminalConnectivityEthernet to be compared - /// Boolean - public bool Equals(TerminalConnectivityEthernet input) - { - if (input == null) - { - return false; - } - return - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ) && - ( - this.LinkNegotiation == input.LinkNegotiation || - (this.LinkNegotiation != null && - this.LinkNegotiation.Equals(input.LinkNegotiation)) - ) && - ( - this.MacAddress == input.MacAddress || - (this.MacAddress != null && - this.MacAddress.Equals(input.MacAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - if (this.LinkNegotiation != null) - { - hashCode = (hashCode * 59) + this.LinkNegotiation.GetHashCode(); - } - if (this.MacAddress != null) - { - hashCode = (hashCode * 59) + this.MacAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalConnectivityWifi.cs b/Adyen/Model/Management/TerminalConnectivityWifi.cs deleted file mode 100644 index a67dc09d5..000000000 --- a/Adyen/Model/Management/TerminalConnectivityWifi.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalConnectivityWifi - /// - [DataContract(Name = "TerminalConnectivityWifi")] - public partial class TerminalConnectivityWifi : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The terminal's IP address in the Wi-Fi network.. - /// The terminal's MAC address in the Wi-Fi network.. - /// The SSID of the Wi-Fi network that the terminal is connected to.. - public TerminalConnectivityWifi(string ipAddress = default(string), string macAddress = default(string), string ssid = default(string)) - { - this.IpAddress = ipAddress; - this.MacAddress = macAddress; - this.Ssid = ssid; - } - - /// - /// The terminal's IP address in the Wi-Fi network. - /// - /// The terminal's IP address in the Wi-Fi network. - [DataMember(Name = "ipAddress", EmitDefaultValue = false)] - public string IpAddress { get; set; } - - /// - /// The terminal's MAC address in the Wi-Fi network. - /// - /// The terminal's MAC address in the Wi-Fi network. - [DataMember(Name = "macAddress", EmitDefaultValue = false)] - public string MacAddress { get; set; } - - /// - /// The SSID of the Wi-Fi network that the terminal is connected to. - /// - /// The SSID of the Wi-Fi network that the terminal is connected to. - [DataMember(Name = "ssid", EmitDefaultValue = false)] - public string Ssid { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalConnectivityWifi {\n"); - sb.Append(" IpAddress: ").Append(IpAddress).Append("\n"); - sb.Append(" MacAddress: ").Append(MacAddress).Append("\n"); - sb.Append(" Ssid: ").Append(Ssid).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalConnectivityWifi); - } - - /// - /// Returns true if TerminalConnectivityWifi instances are equal - /// - /// Instance of TerminalConnectivityWifi to be compared - /// Boolean - public bool Equals(TerminalConnectivityWifi input) - { - if (input == null) - { - return false; - } - return - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ) && - ( - this.MacAddress == input.MacAddress || - (this.MacAddress != null && - this.MacAddress.Equals(input.MacAddress)) - ) && - ( - this.Ssid == input.Ssid || - (this.Ssid != null && - this.Ssid.Equals(input.Ssid)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - if (this.MacAddress != null) - { - hashCode = (hashCode * 59) + this.MacAddress.GetHashCode(); - } - if (this.Ssid != null) - { - hashCode = (hashCode * 59) + this.Ssid.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalInstructions.cs b/Adyen/Model/Management/TerminalInstructions.cs deleted file mode 100644 index 3f2c33779..000000000 --- a/Adyen/Model/Management/TerminalInstructions.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalInstructions - /// - [DataContract(Name = "TerminalInstructions")] - public partial class TerminalInstructions : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether the Adyen app on the payment terminal restarts automatically when the configuration is updated.. - public TerminalInstructions(bool? adyenAppRestart = default(bool?)) - { - this.AdyenAppRestart = adyenAppRestart; - } - - /// - /// Indicates whether the Adyen app on the payment terminal restarts automatically when the configuration is updated. - /// - /// Indicates whether the Adyen app on the payment terminal restarts automatically when the configuration is updated. - [DataMember(Name = "adyenAppRestart", EmitDefaultValue = false)] - public bool? AdyenAppRestart { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalInstructions {\n"); - sb.Append(" AdyenAppRestart: ").Append(AdyenAppRestart).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalInstructions); - } - - /// - /// Returns true if TerminalInstructions instances are equal - /// - /// Instance of TerminalInstructions to be compared - /// Boolean - public bool Equals(TerminalInstructions input) - { - if (input == null) - { - return false; - } - return - ( - this.AdyenAppRestart == input.AdyenAppRestart || - this.AdyenAppRestart.Equals(input.AdyenAppRestart) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AdyenAppRestart.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalModelsResponse.cs b/Adyen/Model/Management/TerminalModelsResponse.cs deleted file mode 100644 index c640dfeb6..000000000 --- a/Adyen/Model/Management/TerminalModelsResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalModelsResponse - /// - [DataContract(Name = "TerminalModelsResponse")] - public partial class TerminalModelsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The terminal models that the API credential has access to.. - public TerminalModelsResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// The terminal models that the API credential has access to. - /// - /// The terminal models that the API credential has access to. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalModelsResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalModelsResponse); - } - - /// - /// Returns true if TerminalModelsResponse instances are equal - /// - /// Instance of TerminalModelsResponse to be compared - /// Boolean - public bool Equals(TerminalModelsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalOrder.cs b/Adyen/Model/Management/TerminalOrder.cs deleted file mode 100644 index cdf40bb51..000000000 --- a/Adyen/Model/Management/TerminalOrder.cs +++ /dev/null @@ -1,261 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalOrder - /// - [DataContract(Name = "TerminalOrder")] - public partial class TerminalOrder : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// billingEntity. - /// The merchant-defined purchase order number. This will be printed on the packing list.. - /// The unique identifier of the order.. - /// The products included in the order.. - /// The date and time that the order was placed, in UTC ISO 8601 format. For example, \"2011-12-03T10:15:30Z\".. - /// shippingLocation. - /// The processing status of the order.. - /// The URL, provided by the carrier company, where the shipment can be tracked.. - public TerminalOrder(BillingEntity billingEntity = default(BillingEntity), string customerOrderReference = default(string), string id = default(string), List items = default(List), string orderDate = default(string), ShippingLocation shippingLocation = default(ShippingLocation), string status = default(string), string trackingUrl = default(string)) - { - this.BillingEntity = billingEntity; - this.CustomerOrderReference = customerOrderReference; - this.Id = id; - this.Items = items; - this.OrderDate = orderDate; - this.ShippingLocation = shippingLocation; - this.Status = status; - this.TrackingUrl = trackingUrl; - } - - /// - /// Gets or Sets BillingEntity - /// - [DataMember(Name = "billingEntity", EmitDefaultValue = false)] - public BillingEntity BillingEntity { get; set; } - - /// - /// The merchant-defined purchase order number. This will be printed on the packing list. - /// - /// The merchant-defined purchase order number. This will be printed on the packing list. - [DataMember(Name = "customerOrderReference", EmitDefaultValue = false)] - public string CustomerOrderReference { get; set; } - - /// - /// The unique identifier of the order. - /// - /// The unique identifier of the order. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The products included in the order. - /// - /// The products included in the order. - [DataMember(Name = "items", EmitDefaultValue = false)] - public List Items { get; set; } - - /// - /// The date and time that the order was placed, in UTC ISO 8601 format. For example, \"2011-12-03T10:15:30Z\". - /// - /// The date and time that the order was placed, in UTC ISO 8601 format. For example, \"2011-12-03T10:15:30Z\". - [DataMember(Name = "orderDate", EmitDefaultValue = false)] - public string OrderDate { get; set; } - - /// - /// Gets or Sets ShippingLocation - /// - [DataMember(Name = "shippingLocation", EmitDefaultValue = false)] - public ShippingLocation ShippingLocation { get; set; } - - /// - /// The processing status of the order. - /// - /// The processing status of the order. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// The URL, provided by the carrier company, where the shipment can be tracked. - /// - /// The URL, provided by the carrier company, where the shipment can be tracked. - [DataMember(Name = "trackingUrl", EmitDefaultValue = false)] - public string TrackingUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalOrder {\n"); - sb.Append(" BillingEntity: ").Append(BillingEntity).Append("\n"); - sb.Append(" CustomerOrderReference: ").Append(CustomerOrderReference).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Items: ").Append(Items).Append("\n"); - sb.Append(" OrderDate: ").Append(OrderDate).Append("\n"); - sb.Append(" ShippingLocation: ").Append(ShippingLocation).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TrackingUrl: ").Append(TrackingUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalOrder); - } - - /// - /// Returns true if TerminalOrder instances are equal - /// - /// Instance of TerminalOrder to be compared - /// Boolean - public bool Equals(TerminalOrder input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingEntity == input.BillingEntity || - (this.BillingEntity != null && - this.BillingEntity.Equals(input.BillingEntity)) - ) && - ( - this.CustomerOrderReference == input.CustomerOrderReference || - (this.CustomerOrderReference != null && - this.CustomerOrderReference.Equals(input.CustomerOrderReference)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Items == input.Items || - this.Items != null && - input.Items != null && - this.Items.SequenceEqual(input.Items) - ) && - ( - this.OrderDate == input.OrderDate || - (this.OrderDate != null && - this.OrderDate.Equals(input.OrderDate)) - ) && - ( - this.ShippingLocation == input.ShippingLocation || - (this.ShippingLocation != null && - this.ShippingLocation.Equals(input.ShippingLocation)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.TrackingUrl == input.TrackingUrl || - (this.TrackingUrl != null && - this.TrackingUrl.Equals(input.TrackingUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingEntity != null) - { - hashCode = (hashCode * 59) + this.BillingEntity.GetHashCode(); - } - if (this.CustomerOrderReference != null) - { - hashCode = (hashCode * 59) + this.CustomerOrderReference.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Items != null) - { - hashCode = (hashCode * 59) + this.Items.GetHashCode(); - } - if (this.OrderDate != null) - { - hashCode = (hashCode * 59) + this.OrderDate.GetHashCode(); - } - if (this.ShippingLocation != null) - { - hashCode = (hashCode * 59) + this.ShippingLocation.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.TrackingUrl != null) - { - hashCode = (hashCode * 59) + this.TrackingUrl.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalOrderRequest.cs b/Adyen/Model/Management/TerminalOrderRequest.cs deleted file mode 100644 index 66738c243..000000000 --- a/Adyen/Model/Management/TerminalOrderRequest.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalOrderRequest - /// - [DataContract(Name = "TerminalOrderRequest")] - public partial class TerminalOrderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The identification of the billing entity to use for the order. > When ordering products in Brazil, you do not need to include the `billingEntityId` in the request.. - /// The merchant-defined purchase order reference.. - /// The products included in the order.. - /// Type of order. - /// The identification of the shipping location to use for the order.. - /// The tax number of the billing entity.. - public TerminalOrderRequest(string billingEntityId = default(string), string customerOrderReference = default(string), List items = default(List), string orderType = default(string), string shippingLocationId = default(string), string taxId = default(string)) - { - this.BillingEntityId = billingEntityId; - this.CustomerOrderReference = customerOrderReference; - this.Items = items; - this.OrderType = orderType; - this.ShippingLocationId = shippingLocationId; - this.TaxId = taxId; - } - - /// - /// The identification of the billing entity to use for the order. > When ordering products in Brazil, you do not need to include the `billingEntityId` in the request. - /// - /// The identification of the billing entity to use for the order. > When ordering products in Brazil, you do not need to include the `billingEntityId` in the request. - [DataMember(Name = "billingEntityId", EmitDefaultValue = false)] - public string BillingEntityId { get; set; } - - /// - /// The merchant-defined purchase order reference. - /// - /// The merchant-defined purchase order reference. - [DataMember(Name = "customerOrderReference", EmitDefaultValue = false)] - public string CustomerOrderReference { get; set; } - - /// - /// The products included in the order. - /// - /// The products included in the order. - [DataMember(Name = "items", EmitDefaultValue = false)] - public List Items { get; set; } - - /// - /// Type of order - /// - /// Type of order - [DataMember(Name = "orderType", EmitDefaultValue = false)] - public string OrderType { get; set; } - - /// - /// The identification of the shipping location to use for the order. - /// - /// The identification of the shipping location to use for the order. - [DataMember(Name = "shippingLocationId", EmitDefaultValue = false)] - public string ShippingLocationId { get; set; } - - /// - /// The tax number of the billing entity. - /// - /// The tax number of the billing entity. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalOrderRequest {\n"); - sb.Append(" BillingEntityId: ").Append(BillingEntityId).Append("\n"); - sb.Append(" CustomerOrderReference: ").Append(CustomerOrderReference).Append("\n"); - sb.Append(" Items: ").Append(Items).Append("\n"); - sb.Append(" OrderType: ").Append(OrderType).Append("\n"); - sb.Append(" ShippingLocationId: ").Append(ShippingLocationId).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalOrderRequest); - } - - /// - /// Returns true if TerminalOrderRequest instances are equal - /// - /// Instance of TerminalOrderRequest to be compared - /// Boolean - public bool Equals(TerminalOrderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingEntityId == input.BillingEntityId || - (this.BillingEntityId != null && - this.BillingEntityId.Equals(input.BillingEntityId)) - ) && - ( - this.CustomerOrderReference == input.CustomerOrderReference || - (this.CustomerOrderReference != null && - this.CustomerOrderReference.Equals(input.CustomerOrderReference)) - ) && - ( - this.Items == input.Items || - this.Items != null && - input.Items != null && - this.Items.SequenceEqual(input.Items) - ) && - ( - this.OrderType == input.OrderType || - (this.OrderType != null && - this.OrderType.Equals(input.OrderType)) - ) && - ( - this.ShippingLocationId == input.ShippingLocationId || - (this.ShippingLocationId != null && - this.ShippingLocationId.Equals(input.ShippingLocationId)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingEntityId != null) - { - hashCode = (hashCode * 59) + this.BillingEntityId.GetHashCode(); - } - if (this.CustomerOrderReference != null) - { - hashCode = (hashCode * 59) + this.CustomerOrderReference.GetHashCode(); - } - if (this.Items != null) - { - hashCode = (hashCode * 59) + this.Items.GetHashCode(); - } - if (this.OrderType != null) - { - hashCode = (hashCode * 59) + this.OrderType.GetHashCode(); - } - if (this.ShippingLocationId != null) - { - hashCode = (hashCode * 59) + this.ShippingLocationId.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalOrdersResponse.cs b/Adyen/Model/Management/TerminalOrdersResponse.cs deleted file mode 100644 index bbe82b3cf..000000000 --- a/Adyen/Model/Management/TerminalOrdersResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalOrdersResponse - /// - [DataContract(Name = "TerminalOrdersResponse")] - public partial class TerminalOrdersResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of orders for payment terminal packages and parts.. - public TerminalOrdersResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// List of orders for payment terminal packages and parts. - /// - /// List of orders for payment terminal packages and parts. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalOrdersResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalOrdersResponse); - } - - /// - /// Returns true if TerminalOrdersResponse instances are equal - /// - /// Instance of TerminalOrdersResponse to be compared - /// Boolean - public bool Equals(TerminalOrdersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalProduct.cs b/Adyen/Model/Management/TerminalProduct.cs deleted file mode 100644 index 74f8ce06e..000000000 --- a/Adyen/Model/Management/TerminalProduct.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalProduct - /// - [DataContract(Name = "TerminalProduct")] - public partial class TerminalProduct : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Information about items included and integration options.. - /// The unique identifier of the product.. - /// A list of parts included in the terminal package.. - /// The descriptive name of the product.. - /// price. - public TerminalProduct(string description = default(string), string id = default(string), List itemsIncluded = default(List), string name = default(string), TerminalProductPrice price = default(TerminalProductPrice)) - { - this.Description = description; - this.Id = id; - this.ItemsIncluded = itemsIncluded; - this.Name = name; - this.Price = price; - } - - /// - /// Information about items included and integration options. - /// - /// Information about items included and integration options. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the product. - /// - /// The unique identifier of the product. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// A list of parts included in the terminal package. - /// - /// A list of parts included in the terminal package. - [DataMember(Name = "itemsIncluded", EmitDefaultValue = false)] - public List ItemsIncluded { get; set; } - - /// - /// The descriptive name of the product. - /// - /// The descriptive name of the product. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Gets or Sets Price - /// - [DataMember(Name = "price", EmitDefaultValue = false)] - public TerminalProductPrice Price { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalProduct {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" ItemsIncluded: ").Append(ItemsIncluded).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Price: ").Append(Price).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalProduct); - } - - /// - /// Returns true if TerminalProduct instances are equal - /// - /// Instance of TerminalProduct to be compared - /// Boolean - public bool Equals(TerminalProduct input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ItemsIncluded == input.ItemsIncluded || - this.ItemsIncluded != null && - input.ItemsIncluded != null && - this.ItemsIncluded.SequenceEqual(input.ItemsIncluded) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Price == input.Price || - (this.Price != null && - this.Price.Equals(input.Price)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ItemsIncluded != null) - { - hashCode = (hashCode * 59) + this.ItemsIncluded.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Price != null) - { - hashCode = (hashCode * 59) + this.Price.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalProductPrice.cs b/Adyen/Model/Management/TerminalProductPrice.cs deleted file mode 100644 index 182ccca0a..000000000 --- a/Adyen/Model/Management/TerminalProductPrice.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalProductPrice - /// - [DataContract(Name = "TerminalProductPrice")] - public partial class TerminalProductPrice : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).. - /// The price of the item.. - public TerminalProductPrice(string currency = default(string), double? value = default(double?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The price of the item. - /// - /// The price of the item. - [DataMember(Name = "value", EmitDefaultValue = false)] - public double? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalProductPrice {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalProductPrice); - } - - /// - /// Returns true if TerminalProductPrice instances are equal - /// - /// Instance of TerminalProductPrice to be compared - /// Boolean - public bool Equals(TerminalProductPrice input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalProductsResponse.cs b/Adyen/Model/Management/TerminalProductsResponse.cs deleted file mode 100644 index 944e4f79c..000000000 --- a/Adyen/Model/Management/TerminalProductsResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalProductsResponse - /// - [DataContract(Name = "TerminalProductsResponse")] - public partial class TerminalProductsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Terminal products that can be ordered.. - public TerminalProductsResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// Terminal products that can be ordered. - /// - /// Terminal products that can be ordered. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalProductsResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalProductsResponse); - } - - /// - /// Returns true if TerminalProductsResponse instances are equal - /// - /// Instance of TerminalProductsResponse to be compared - /// Boolean - public bool Equals(TerminalProductsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalReassignmentRequest.cs b/Adyen/Model/Management/TerminalReassignmentRequest.cs deleted file mode 100644 index 556f356b0..000000000 --- a/Adyen/Model/Management/TerminalReassignmentRequest.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalReassignmentRequest - /// - [DataContract(Name = "TerminalReassignmentRequest")] - public partial class TerminalReassignmentRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the company account to which the terminal is reassigned.. - /// Must be specified when reassigning terminals to a merchant account: - If set to **true**, reassigns terminals to the inventory of the merchant account and the terminals cannot process transactions. - If set to **false**, reassigns terminals directly to the merchant account and the terminals can process transactions.. - /// The unique identifier of the merchant account to which the terminal is reassigned. When reassigning terminals to a merchant account, you must specify the `inventory` field.. - /// The unique identifier of the store to which the terminal is reassigned.. - public TerminalReassignmentRequest(string companyId = default(string), bool? inventory = default(bool?), string merchantId = default(string), string storeId = default(string)) - { - this.CompanyId = companyId; - this.Inventory = inventory; - this.MerchantId = merchantId; - this.StoreId = storeId; - } - - /// - /// The unique identifier of the company account to which the terminal is reassigned. - /// - /// The unique identifier of the company account to which the terminal is reassigned. - [DataMember(Name = "companyId", EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// Must be specified when reassigning terminals to a merchant account: - If set to **true**, reassigns terminals to the inventory of the merchant account and the terminals cannot process transactions. - If set to **false**, reassigns terminals directly to the merchant account and the terminals can process transactions. - /// - /// Must be specified when reassigning terminals to a merchant account: - If set to **true**, reassigns terminals to the inventory of the merchant account and the terminals cannot process transactions. - If set to **false**, reassigns terminals directly to the merchant account and the terminals can process transactions. - [DataMember(Name = "inventory", EmitDefaultValue = false)] - public bool? Inventory { get; set; } - - /// - /// The unique identifier of the merchant account to which the terminal is reassigned. When reassigning terminals to a merchant account, you must specify the `inventory` field. - /// - /// The unique identifier of the merchant account to which the terminal is reassigned. When reassigning terminals to a merchant account, you must specify the `inventory` field. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The unique identifier of the store to which the terminal is reassigned. - /// - /// The unique identifier of the store to which the terminal is reassigned. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalReassignmentRequest {\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" Inventory: ").Append(Inventory).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalReassignmentRequest); - } - - /// - /// Returns true if TerminalReassignmentRequest instances are equal - /// - /// Instance of TerminalReassignmentRequest to be compared - /// Boolean - public bool Equals(TerminalReassignmentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.Inventory == input.Inventory || - this.Inventory.Equals(input.Inventory) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Inventory.GetHashCode(); - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalReassignmentTarget.cs b/Adyen/Model/Management/TerminalReassignmentTarget.cs deleted file mode 100644 index a77a09884..000000000 --- a/Adyen/Model/Management/TerminalReassignmentTarget.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalReassignmentTarget - /// - [DataContract(Name = "TerminalReassignmentTarget")] - public partial class TerminalReassignmentTarget : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TerminalReassignmentTarget() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the company account to which the terminal is reassigned.. - /// Indicates if the terminal is reassigned to the inventory of the merchant account. - If **true**, the terminal is in the inventory of the merchant account and cannot process transactions. - If **false**, the terminal is reassigned directly to the merchant account and can process transactions. (required). - /// The unique identifier of the merchant account to which the terminal is reassigned.. - /// The unique identifier of the store to which the terminal is reassigned.. - public TerminalReassignmentTarget(string companyId = default(string), bool? inventory = default(bool?), string merchantId = default(string), string storeId = default(string)) - { - this.Inventory = inventory; - this.CompanyId = companyId; - this.MerchantId = merchantId; - this.StoreId = storeId; - } - - /// - /// The unique identifier of the company account to which the terminal is reassigned. - /// - /// The unique identifier of the company account to which the terminal is reassigned. - [DataMember(Name = "companyId", EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// Indicates if the terminal is reassigned to the inventory of the merchant account. - If **true**, the terminal is in the inventory of the merchant account and cannot process transactions. - If **false**, the terminal is reassigned directly to the merchant account and can process transactions. - /// - /// Indicates if the terminal is reassigned to the inventory of the merchant account. - If **true**, the terminal is in the inventory of the merchant account and cannot process transactions. - If **false**, the terminal is reassigned directly to the merchant account and can process transactions. - [DataMember(Name = "inventory", IsRequired = false, EmitDefaultValue = false)] - public bool? Inventory { get; set; } - - /// - /// The unique identifier of the merchant account to which the terminal is reassigned. - /// - /// The unique identifier of the merchant account to which the terminal is reassigned. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The unique identifier of the store to which the terminal is reassigned. - /// - /// The unique identifier of the store to which the terminal is reassigned. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalReassignmentTarget {\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" Inventory: ").Append(Inventory).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalReassignmentTarget); - } - - /// - /// Returns true if TerminalReassignmentTarget instances are equal - /// - /// Instance of TerminalReassignmentTarget to be compared - /// Boolean - public bool Equals(TerminalReassignmentTarget input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.Inventory == input.Inventory || - this.Inventory.Equals(input.Inventory) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Inventory.GetHashCode(); - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TerminalSettings.cs b/Adyen/Model/Management/TerminalSettings.cs deleted file mode 100644 index 1f3ba0cd3..000000000 --- a/Adyen/Model/Management/TerminalSettings.cs +++ /dev/null @@ -1,508 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TerminalSettings - /// - [DataContract(Name = "TerminalSettings")] - public partial class TerminalSettings : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// cardholderReceipt. - /// connectivity. - /// Settings for tipping with or without predefined options to choose from. The maximum number of predefined options is four, or three plus the option to enter a custom tip.. - /// hardware. - /// localization. - /// nexo. - /// offlineProcessing. - /// opi. - /// passcodes. - /// payAtTable. - /// payment. - /// receiptOptions. - /// receiptPrinting. - /// refunds. - /// signature. - /// standalone. - /// storeAndForward. - /// surcharge. - /// tapToPay. - /// terminalInstructions. - /// timeouts. - /// wifiProfiles. - public TerminalSettings(CardholderReceipt cardholderReceipt = default(CardholderReceipt), Connectivity connectivity = default(Connectivity), List gratuities = default(List), Hardware hardware = default(Hardware), Localization localization = default(Localization), Nexo nexo = default(Nexo), OfflineProcessing offlineProcessing = default(OfflineProcessing), Opi opi = default(Opi), Passcodes passcodes = default(Passcodes), PayAtTable payAtTable = default(PayAtTable), Payment payment = default(Payment), ReceiptOptions receiptOptions = default(ReceiptOptions), ReceiptPrinting receiptPrinting = default(ReceiptPrinting), Refunds refunds = default(Refunds), Signature signature = default(Signature), Standalone standalone = default(Standalone), StoreAndForward storeAndForward = default(StoreAndForward), Surcharge surcharge = default(Surcharge), TapToPay tapToPay = default(TapToPay), TerminalInstructions terminalInstructions = default(TerminalInstructions), Timeouts timeouts = default(Timeouts), WifiProfiles wifiProfiles = default(WifiProfiles)) - { - this.CardholderReceipt = cardholderReceipt; - this.Connectivity = connectivity; - this.Gratuities = gratuities; - this.Hardware = hardware; - this.Localization = localization; - this.Nexo = nexo; - this.OfflineProcessing = offlineProcessing; - this.Opi = opi; - this.Passcodes = passcodes; - this.PayAtTable = payAtTable; - this.Payment = payment; - this.ReceiptOptions = receiptOptions; - this.ReceiptPrinting = receiptPrinting; - this.Refunds = refunds; - this.Signature = signature; - this.Standalone = standalone; - this.StoreAndForward = storeAndForward; - this.Surcharge = surcharge; - this.TapToPay = tapToPay; - this.TerminalInstructions = terminalInstructions; - this.Timeouts = timeouts; - this.WifiProfiles = wifiProfiles; - } - - /// - /// Gets or Sets CardholderReceipt - /// - [DataMember(Name = "cardholderReceipt", EmitDefaultValue = false)] - public CardholderReceipt CardholderReceipt { get; set; } - - /// - /// Gets or Sets Connectivity - /// - [DataMember(Name = "connectivity", EmitDefaultValue = false)] - public Connectivity Connectivity { get; set; } - - /// - /// Settings for tipping with or without predefined options to choose from. The maximum number of predefined options is four, or three plus the option to enter a custom tip. - /// - /// Settings for tipping with or without predefined options to choose from. The maximum number of predefined options is four, or three plus the option to enter a custom tip. - [DataMember(Name = "gratuities", EmitDefaultValue = false)] - public List Gratuities { get; set; } - - /// - /// Gets or Sets Hardware - /// - [DataMember(Name = "hardware", EmitDefaultValue = false)] - public Hardware Hardware { get; set; } - - /// - /// Gets or Sets Localization - /// - [DataMember(Name = "localization", EmitDefaultValue = false)] - public Localization Localization { get; set; } - - /// - /// Gets or Sets Nexo - /// - [DataMember(Name = "nexo", EmitDefaultValue = false)] - public Nexo Nexo { get; set; } - - /// - /// Gets or Sets OfflineProcessing - /// - [DataMember(Name = "offlineProcessing", EmitDefaultValue = false)] - public OfflineProcessing OfflineProcessing { get; set; } - - /// - /// Gets or Sets Opi - /// - [DataMember(Name = "opi", EmitDefaultValue = false)] - public Opi Opi { get; set; } - - /// - /// Gets or Sets Passcodes - /// - [DataMember(Name = "passcodes", EmitDefaultValue = false)] - public Passcodes Passcodes { get; set; } - - /// - /// Gets or Sets PayAtTable - /// - [DataMember(Name = "payAtTable", EmitDefaultValue = false)] - public PayAtTable PayAtTable { get; set; } - - /// - /// Gets or Sets Payment - /// - [DataMember(Name = "payment", EmitDefaultValue = false)] - public Payment Payment { get; set; } - - /// - /// Gets or Sets ReceiptOptions - /// - [DataMember(Name = "receiptOptions", EmitDefaultValue = false)] - public ReceiptOptions ReceiptOptions { get; set; } - - /// - /// Gets or Sets ReceiptPrinting - /// - [DataMember(Name = "receiptPrinting", EmitDefaultValue = false)] - public ReceiptPrinting ReceiptPrinting { get; set; } - - /// - /// Gets or Sets Refunds - /// - [DataMember(Name = "refunds", EmitDefaultValue = false)] - public Refunds Refunds { get; set; } - - /// - /// Gets or Sets Signature - /// - [DataMember(Name = "signature", EmitDefaultValue = false)] - public Signature Signature { get; set; } - - /// - /// Gets or Sets Standalone - /// - [DataMember(Name = "standalone", EmitDefaultValue = false)] - public Standalone Standalone { get; set; } - - /// - /// Gets or Sets StoreAndForward - /// - [DataMember(Name = "storeAndForward", EmitDefaultValue = false)] - public StoreAndForward StoreAndForward { get; set; } - - /// - /// Gets or Sets Surcharge - /// - [DataMember(Name = "surcharge", EmitDefaultValue = false)] - public Surcharge Surcharge { get; set; } - - /// - /// Gets or Sets TapToPay - /// - [DataMember(Name = "tapToPay", EmitDefaultValue = false)] - public TapToPay TapToPay { get; set; } - - /// - /// Gets or Sets TerminalInstructions - /// - [DataMember(Name = "terminalInstructions", EmitDefaultValue = false)] - public TerminalInstructions TerminalInstructions { get; set; } - - /// - /// Gets or Sets Timeouts - /// - [DataMember(Name = "timeouts", EmitDefaultValue = false)] - public Timeouts Timeouts { get; set; } - - /// - /// Gets or Sets WifiProfiles - /// - [DataMember(Name = "wifiProfiles", EmitDefaultValue = false)] - public WifiProfiles WifiProfiles { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalSettings {\n"); - sb.Append(" CardholderReceipt: ").Append(CardholderReceipt).Append("\n"); - sb.Append(" Connectivity: ").Append(Connectivity).Append("\n"); - sb.Append(" Gratuities: ").Append(Gratuities).Append("\n"); - sb.Append(" Hardware: ").Append(Hardware).Append("\n"); - sb.Append(" Localization: ").Append(Localization).Append("\n"); - sb.Append(" Nexo: ").Append(Nexo).Append("\n"); - sb.Append(" OfflineProcessing: ").Append(OfflineProcessing).Append("\n"); - sb.Append(" Opi: ").Append(Opi).Append("\n"); - sb.Append(" Passcodes: ").Append(Passcodes).Append("\n"); - sb.Append(" PayAtTable: ").Append(PayAtTable).Append("\n"); - sb.Append(" Payment: ").Append(Payment).Append("\n"); - sb.Append(" ReceiptOptions: ").Append(ReceiptOptions).Append("\n"); - sb.Append(" ReceiptPrinting: ").Append(ReceiptPrinting).Append("\n"); - sb.Append(" Refunds: ").Append(Refunds).Append("\n"); - sb.Append(" Signature: ").Append(Signature).Append("\n"); - sb.Append(" Standalone: ").Append(Standalone).Append("\n"); - sb.Append(" StoreAndForward: ").Append(StoreAndForward).Append("\n"); - sb.Append(" Surcharge: ").Append(Surcharge).Append("\n"); - sb.Append(" TapToPay: ").Append(TapToPay).Append("\n"); - sb.Append(" TerminalInstructions: ").Append(TerminalInstructions).Append("\n"); - sb.Append(" Timeouts: ").Append(Timeouts).Append("\n"); - sb.Append(" WifiProfiles: ").Append(WifiProfiles).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalSettings); - } - - /// - /// Returns true if TerminalSettings instances are equal - /// - /// Instance of TerminalSettings to be compared - /// Boolean - public bool Equals(TerminalSettings input) - { - if (input == null) - { - return false; - } - return - ( - this.CardholderReceipt == input.CardholderReceipt || - (this.CardholderReceipt != null && - this.CardholderReceipt.Equals(input.CardholderReceipt)) - ) && - ( - this.Connectivity == input.Connectivity || - (this.Connectivity != null && - this.Connectivity.Equals(input.Connectivity)) - ) && - ( - this.Gratuities == input.Gratuities || - this.Gratuities != null && - input.Gratuities != null && - this.Gratuities.SequenceEqual(input.Gratuities) - ) && - ( - this.Hardware == input.Hardware || - (this.Hardware != null && - this.Hardware.Equals(input.Hardware)) - ) && - ( - this.Localization == input.Localization || - (this.Localization != null && - this.Localization.Equals(input.Localization)) - ) && - ( - this.Nexo == input.Nexo || - (this.Nexo != null && - this.Nexo.Equals(input.Nexo)) - ) && - ( - this.OfflineProcessing == input.OfflineProcessing || - (this.OfflineProcessing != null && - this.OfflineProcessing.Equals(input.OfflineProcessing)) - ) && - ( - this.Opi == input.Opi || - (this.Opi != null && - this.Opi.Equals(input.Opi)) - ) && - ( - this.Passcodes == input.Passcodes || - (this.Passcodes != null && - this.Passcodes.Equals(input.Passcodes)) - ) && - ( - this.PayAtTable == input.PayAtTable || - (this.PayAtTable != null && - this.PayAtTable.Equals(input.PayAtTable)) - ) && - ( - this.Payment == input.Payment || - (this.Payment != null && - this.Payment.Equals(input.Payment)) - ) && - ( - this.ReceiptOptions == input.ReceiptOptions || - (this.ReceiptOptions != null && - this.ReceiptOptions.Equals(input.ReceiptOptions)) - ) && - ( - this.ReceiptPrinting == input.ReceiptPrinting || - (this.ReceiptPrinting != null && - this.ReceiptPrinting.Equals(input.ReceiptPrinting)) - ) && - ( - this.Refunds == input.Refunds || - (this.Refunds != null && - this.Refunds.Equals(input.Refunds)) - ) && - ( - this.Signature == input.Signature || - (this.Signature != null && - this.Signature.Equals(input.Signature)) - ) && - ( - this.Standalone == input.Standalone || - (this.Standalone != null && - this.Standalone.Equals(input.Standalone)) - ) && - ( - this.StoreAndForward == input.StoreAndForward || - (this.StoreAndForward != null && - this.StoreAndForward.Equals(input.StoreAndForward)) - ) && - ( - this.Surcharge == input.Surcharge || - (this.Surcharge != null && - this.Surcharge.Equals(input.Surcharge)) - ) && - ( - this.TapToPay == input.TapToPay || - (this.TapToPay != null && - this.TapToPay.Equals(input.TapToPay)) - ) && - ( - this.TerminalInstructions == input.TerminalInstructions || - (this.TerminalInstructions != null && - this.TerminalInstructions.Equals(input.TerminalInstructions)) - ) && - ( - this.Timeouts == input.Timeouts || - (this.Timeouts != null && - this.Timeouts.Equals(input.Timeouts)) - ) && - ( - this.WifiProfiles == input.WifiProfiles || - (this.WifiProfiles != null && - this.WifiProfiles.Equals(input.WifiProfiles)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardholderReceipt != null) - { - hashCode = (hashCode * 59) + this.CardholderReceipt.GetHashCode(); - } - if (this.Connectivity != null) - { - hashCode = (hashCode * 59) + this.Connectivity.GetHashCode(); - } - if (this.Gratuities != null) - { - hashCode = (hashCode * 59) + this.Gratuities.GetHashCode(); - } - if (this.Hardware != null) - { - hashCode = (hashCode * 59) + this.Hardware.GetHashCode(); - } - if (this.Localization != null) - { - hashCode = (hashCode * 59) + this.Localization.GetHashCode(); - } - if (this.Nexo != null) - { - hashCode = (hashCode * 59) + this.Nexo.GetHashCode(); - } - if (this.OfflineProcessing != null) - { - hashCode = (hashCode * 59) + this.OfflineProcessing.GetHashCode(); - } - if (this.Opi != null) - { - hashCode = (hashCode * 59) + this.Opi.GetHashCode(); - } - if (this.Passcodes != null) - { - hashCode = (hashCode * 59) + this.Passcodes.GetHashCode(); - } - if (this.PayAtTable != null) - { - hashCode = (hashCode * 59) + this.PayAtTable.GetHashCode(); - } - if (this.Payment != null) - { - hashCode = (hashCode * 59) + this.Payment.GetHashCode(); - } - if (this.ReceiptOptions != null) - { - hashCode = (hashCode * 59) + this.ReceiptOptions.GetHashCode(); - } - if (this.ReceiptPrinting != null) - { - hashCode = (hashCode * 59) + this.ReceiptPrinting.GetHashCode(); - } - if (this.Refunds != null) - { - hashCode = (hashCode * 59) + this.Refunds.GetHashCode(); - } - if (this.Signature != null) - { - hashCode = (hashCode * 59) + this.Signature.GetHashCode(); - } - if (this.Standalone != null) - { - hashCode = (hashCode * 59) + this.Standalone.GetHashCode(); - } - if (this.StoreAndForward != null) - { - hashCode = (hashCode * 59) + this.StoreAndForward.GetHashCode(); - } - if (this.Surcharge != null) - { - hashCode = (hashCode * 59) + this.Surcharge.GetHashCode(); - } - if (this.TapToPay != null) - { - hashCode = (hashCode * 59) + this.TapToPay.GetHashCode(); - } - if (this.TerminalInstructions != null) - { - hashCode = (hashCode * 59) + this.TerminalInstructions.GetHashCode(); - } - if (this.Timeouts != null) - { - hashCode = (hashCode * 59) + this.Timeouts.GetHashCode(); - } - if (this.WifiProfiles != null) - { - hashCode = (hashCode * 59) + this.WifiProfiles.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TestCompanyWebhookRequest.cs b/Adyen/Model/Management/TestCompanyWebhookRequest.cs deleted file mode 100644 index e60daf021..000000000 --- a/Adyen/Model/Management/TestCompanyWebhookRequest.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TestCompanyWebhookRequest - /// - [DataContract(Name = "TestCompanyWebhookRequest")] - public partial class TestCompanyWebhookRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications.. - /// notification. - /// List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** . - public TestCompanyWebhookRequest(List merchantIds = default(List), CustomNotification notification = default(CustomNotification), List types = default(List)) - { - this.MerchantIds = merchantIds; - this.Notification = notification; - this.Types = types; - } - - /// - /// List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications. - /// - /// List of `merchantId` values for which test webhooks will be sent. The list can have a maximum of 20 `merchantId` values. If not specified, we send sample notifications to all the merchant accounts that the webhook is configured for. If this is more than 20 merchant accounts, use this list to specify a subset of the merchant accounts for which to send test notifications. - [DataMember(Name = "merchantIds", EmitDefaultValue = false)] - public List MerchantIds { get; set; } - - /// - /// Gets or Sets Notification - /// - [DataMember(Name = "notification", EmitDefaultValue = false)] - public CustomNotification Notification { get; set; } - - /// - /// List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** - /// - /// List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** - [DataMember(Name = "types", EmitDefaultValue = false)] - public List Types { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TestCompanyWebhookRequest {\n"); - sb.Append(" MerchantIds: ").Append(MerchantIds).Append("\n"); - sb.Append(" Notification: ").Append(Notification).Append("\n"); - sb.Append(" Types: ").Append(Types).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TestCompanyWebhookRequest); - } - - /// - /// Returns true if TestCompanyWebhookRequest instances are equal - /// - /// Instance of TestCompanyWebhookRequest to be compared - /// Boolean - public bool Equals(TestCompanyWebhookRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantIds == input.MerchantIds || - this.MerchantIds != null && - input.MerchantIds != null && - this.MerchantIds.SequenceEqual(input.MerchantIds) - ) && - ( - this.Notification == input.Notification || - (this.Notification != null && - this.Notification.Equals(input.Notification)) - ) && - ( - this.Types == input.Types || - this.Types != null && - input.Types != null && - this.Types.SequenceEqual(input.Types) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantIds != null) - { - hashCode = (hashCode * 59) + this.MerchantIds.GetHashCode(); - } - if (this.Notification != null) - { - hashCode = (hashCode * 59) + this.Notification.GetHashCode(); - } - if (this.Types != null) - { - hashCode = (hashCode * 59) + this.Types.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TestOutput.cs b/Adyen/Model/Management/TestOutput.cs deleted file mode 100644 index 41c67dd97..000000000 --- a/Adyen/Model/Management/TestOutput.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TestOutput - /// - [DataContract(Name = "TestOutput")] - public partial class TestOutput : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TestOutput() { } - /// - /// Initializes a new instance of the class. - /// - /// Unique identifier of the merchant account that the notification is about.. - /// The response your server returned for the test webhook. Your server must respond with **HTTP 2xx* for the test webhook to be successful (`data.status`: **success**). Find out more about [accepting notifications](https://docs.adyen.com/development-resources/webhooks#accept-notifications) You can use the value of this field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot unsuccessful test webhooks.. - /// The [body of the notification webhook](https://docs.adyen.com/development-resources/webhooks/understand-notifications#notification-structure) that was sent to your server.. - /// The HTTP response code for your server's response to the test webhook. You can use the value of this field together with the the [`output`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-output) field value to troubleshoot failed test webhooks.. - /// The time between sending the test webhook and receiving the response from your server. You can use it as an indication of how long your server takes to process a webhook notification. Measured in milliseconds, for example **304 ms**.. - /// The status of the test request. Possible values are: * **success**, `data.responseCode`: **2xx**. * **failed**, in all other cases. You can use the value of the [`output`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-output) field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot failed test webhooks. (required). - public TestOutput(string merchantId = default(string), string output = default(string), string requestSent = default(string), string responseCode = default(string), string responseTime = default(string), string status = default(string)) - { - this.Status = status; - this.MerchantId = merchantId; - this.Output = output; - this.RequestSent = requestSent; - this.ResponseCode = responseCode; - this.ResponseTime = responseTime; - } - - /// - /// Unique identifier of the merchant account that the notification is about. - /// - /// Unique identifier of the merchant account that the notification is about. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The response your server returned for the test webhook. Your server must respond with **HTTP 2xx* for the test webhook to be successful (`data.status`: **success**). Find out more about [accepting notifications](https://docs.adyen.com/development-resources/webhooks#accept-notifications) You can use the value of this field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot unsuccessful test webhooks. - /// - /// The response your server returned for the test webhook. Your server must respond with **HTTP 2xx* for the test webhook to be successful (`data.status`: **success**). Find out more about [accepting notifications](https://docs.adyen.com/development-resources/webhooks#accept-notifications) You can use the value of this field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot unsuccessful test webhooks. - [DataMember(Name = "output", EmitDefaultValue = false)] - public string Output { get; set; } - - /// - /// The [body of the notification webhook](https://docs.adyen.com/development-resources/webhooks/understand-notifications#notification-structure) that was sent to your server. - /// - /// The [body of the notification webhook](https://docs.adyen.com/development-resources/webhooks/understand-notifications#notification-structure) that was sent to your server. - [DataMember(Name = "requestSent", EmitDefaultValue = false)] - public string RequestSent { get; set; } - - /// - /// The HTTP response code for your server's response to the test webhook. You can use the value of this field together with the the [`output`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-output) field value to troubleshoot failed test webhooks. - /// - /// The HTTP response code for your server's response to the test webhook. You can use the value of this field together with the the [`output`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-output) field value to troubleshoot failed test webhooks. - [DataMember(Name = "responseCode", EmitDefaultValue = false)] - public string ResponseCode { get; set; } - - /// - /// The time between sending the test webhook and receiving the response from your server. You can use it as an indication of how long your server takes to process a webhook notification. Measured in milliseconds, for example **304 ms**. - /// - /// The time between sending the test webhook and receiving the response from your server. You can use it as an indication of how long your server takes to process a webhook notification. Measured in milliseconds, for example **304 ms**. - [DataMember(Name = "responseTime", EmitDefaultValue = false)] - public string ResponseTime { get; set; } - - /// - /// The status of the test request. Possible values are: * **success**, `data.responseCode`: **2xx**. * **failed**, in all other cases. You can use the value of the [`output`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-output) field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot failed test webhooks. - /// - /// The status of the test request. Possible values are: * **success**, `data.responseCode`: **2xx**. * **failed**, in all other cases. You can use the value of the [`output`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-output) field together with the [`responseCode`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/merchants/{merchantId}/webhooks/{id}/test__resParam_data-responseCode) value to troubleshoot failed test webhooks. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TestOutput {\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" Output: ").Append(Output).Append("\n"); - sb.Append(" RequestSent: ").Append(RequestSent).Append("\n"); - sb.Append(" ResponseCode: ").Append(ResponseCode).Append("\n"); - sb.Append(" ResponseTime: ").Append(ResponseTime).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TestOutput); - } - - /// - /// Returns true if TestOutput instances are equal - /// - /// Instance of TestOutput to be compared - /// Boolean - public bool Equals(TestOutput input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.Output == input.Output || - (this.Output != null && - this.Output.Equals(input.Output)) - ) && - ( - this.RequestSent == input.RequestSent || - (this.RequestSent != null && - this.RequestSent.Equals(input.RequestSent)) - ) && - ( - this.ResponseCode == input.ResponseCode || - (this.ResponseCode != null && - this.ResponseCode.Equals(input.ResponseCode)) - ) && - ( - this.ResponseTime == input.ResponseTime || - (this.ResponseTime != null && - this.ResponseTime.Equals(input.ResponseTime)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.Output != null) - { - hashCode = (hashCode * 59) + this.Output.GetHashCode(); - } - if (this.RequestSent != null) - { - hashCode = (hashCode * 59) + this.RequestSent.GetHashCode(); - } - if (this.ResponseCode != null) - { - hashCode = (hashCode * 59) + this.ResponseCode.GetHashCode(); - } - if (this.ResponseTime != null) - { - hashCode = (hashCode * 59) + this.ResponseTime.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TestWebhookRequest.cs b/Adyen/Model/Management/TestWebhookRequest.cs deleted file mode 100644 index a6bd5203a..000000000 --- a/Adyen/Model/Management/TestWebhookRequest.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TestWebhookRequest - /// - [DataContract(Name = "TestWebhookRequest")] - public partial class TestWebhookRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// notification. - /// List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** . - public TestWebhookRequest(CustomNotification notification = default(CustomNotification), List types = default(List)) - { - this.Notification = notification; - this.Types = types; - } - - /// - /// Gets or Sets Notification - /// - [DataMember(Name = "notification", EmitDefaultValue = false)] - public CustomNotification Notification { get; set; } - - /// - /// List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** - /// - /// List of event codes for which to send test notifications. Only the webhook types below are supported. Possible values if webhook `type`: **standard**: * **AUTHORISATION** * **CHARGEBACK_REVERSED** * **ORDER_CLOSED** * **ORDER_OPENED** * **PAIDOUT_REVERSED** * **PAYOUT_THIRDPARTY** * **REFUNDED_REVERSED** * **REFUND_WITH_DATA** * **REPORT_AVAILABLE** * **CUSTOM** - set your custom notification fields in the [`notification`](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookId}/test__reqParam_notification) object. Possible values if webhook `type`: **banktransfer-notification**: * **PENDING** Possible values if webhook `type`: **report-notification**: * **REPORT_AVAILABLE** Possible values if webhook `type`: **ideal-notification**: * **AUTHORISATION** Possible values if webhook `type`: **pending-notification**: * **PENDING** - [DataMember(Name = "types", EmitDefaultValue = false)] - public List Types { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TestWebhookRequest {\n"); - sb.Append(" Notification: ").Append(Notification).Append("\n"); - sb.Append(" Types: ").Append(Types).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TestWebhookRequest); - } - - /// - /// Returns true if TestWebhookRequest instances are equal - /// - /// Instance of TestWebhookRequest to be compared - /// Boolean - public bool Equals(TestWebhookRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Notification == input.Notification || - (this.Notification != null && - this.Notification.Equals(input.Notification)) - ) && - ( - this.Types == input.Types || - this.Types != null && - input.Types != null && - this.Types.SequenceEqual(input.Types) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Notification != null) - { - hashCode = (hashCode * 59) + this.Notification.GetHashCode(); - } - if (this.Types != null) - { - hashCode = (hashCode * 59) + this.Types.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TestWebhookResponse.cs b/Adyen/Model/Management/TestWebhookResponse.cs deleted file mode 100644 index 49621e571..000000000 --- a/Adyen/Model/Management/TestWebhookResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TestWebhookResponse - /// - [DataContract(Name = "TestWebhookResponse")] - public partial class TestWebhookResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List with test results. Each test webhook we send has a list element with the result.. - public TestWebhookResponse(List data = default(List)) - { - this.Data = data; - } - - /// - /// List with test results. Each test webhook we send has a list element with the result. - /// - /// List with test results. Each test webhook we send has a list element with the result. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TestWebhookResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TestWebhookResponse); - } - - /// - /// Returns true if TestWebhookResponse instances are equal - /// - /// Instance of TestWebhookResponse to be compared - /// Boolean - public bool Equals(TestWebhookResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TicketInfo.cs b/Adyen/Model/Management/TicketInfo.cs deleted file mode 100644 index f86f3e44a..000000000 --- a/Adyen/Model/Management/TicketInfo.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TicketInfo - /// - [DataContract(Name = "TicketInfo")] - public partial class TicketInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Ticket requestorId. - public TicketInfo(string requestorId = default(string)) - { - this.RequestorId = requestorId; - } - - /// - /// Ticket requestorId - /// - /// Ticket requestorId - [DataMember(Name = "requestorId", EmitDefaultValue = false)] - public string RequestorId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TicketInfo {\n"); - sb.Append(" RequestorId: ").Append(RequestorId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TicketInfo); - } - - /// - /// Returns true if TicketInfo instances are equal - /// - /// Instance of TicketInfo to be compared - /// Boolean - public bool Equals(TicketInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.RequestorId == input.RequestorId || - (this.RequestorId != null && - this.RequestorId.Equals(input.RequestorId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RequestorId != null) - { - hashCode = (hashCode * 59) + this.RequestorId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Timeouts.cs b/Adyen/Model/Management/Timeouts.cs deleted file mode 100644 index 27310c146..000000000 --- a/Adyen/Model/Management/Timeouts.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Timeouts - /// - [DataContract(Name = "Timeouts")] - public partial class Timeouts : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates the number of seconds of inactivity after which the terminal display goes into sleep mode.. - public Timeouts(int? fromActiveToSleep = default(int?)) - { - this.FromActiveToSleep = fromActiveToSleep; - } - - /// - /// Indicates the number of seconds of inactivity after which the terminal display goes into sleep mode. - /// - /// Indicates the number of seconds of inactivity after which the terminal display goes into sleep mode. - [DataMember(Name = "fromActiveToSleep", EmitDefaultValue = false)] - public int? FromActiveToSleep { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Timeouts {\n"); - sb.Append(" FromActiveToSleep: ").Append(FromActiveToSleep).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Timeouts); - } - - /// - /// Returns true if Timeouts instances are equal - /// - /// Instance of Timeouts to be compared - /// Boolean - public bool Equals(Timeouts input) - { - if (input == null) - { - return false; - } - return - ( - this.FromActiveToSleep == input.FromActiveToSleep || - this.FromActiveToSleep.Equals(input.FromActiveToSleep) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.FromActiveToSleep.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TransactionDescriptionInfo.cs b/Adyen/Model/Management/TransactionDescriptionInfo.cs deleted file mode 100644 index b68fdf697..000000000 --- a/Adyen/Model/Management/TransactionDescriptionInfo.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TransactionDescriptionInfo - /// - [DataContract(Name = "TransactionDescriptionInfo")] - public partial class TransactionDescriptionInfo : IEquatable, IValidatableObject - { - /// - /// The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method. - /// - /// The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Append for value: append - /// - [EnumMember(Value = "append")] - Append = 1, - - /// - /// Enum Dynamic for value: dynamic - /// - [EnumMember(Value = "dynamic")] - Dynamic = 2, - - /// - /// Enum Fixed for value: fixed - /// - [EnumMember(Value = "fixed")] - Fixed = 3 - - } - - - /// - /// The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method. - /// - /// The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**.. - /// The type of transaction description you want to use: - **fixed**: The transaction description set in this request is used for all payments with this payment method. - **append**: The transaction description set in this request is used as a base for all payments with this payment method. The [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is appended to this base description. Note that if the combined length exceeds 22 characters, banks may truncate the string. - **dynamic**: Only the [transaction description set in the request to process the payment](https://docs.adyen.com/api-explorer/Checkout/70/post/sessions#request-shopperStatement) is used for payments with this payment method. (default to TypeEnum.Dynamic). - public TransactionDescriptionInfo(string doingBusinessAsName = default(string), TypeEnum? type = TypeEnum.Dynamic) - { - this.DoingBusinessAsName = doingBusinessAsName; - this.Type = type; - } - - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - /// - /// The text to be shown on the shopper's bank statement. We recommend sending a maximum of 22 characters, otherwise banks might truncate the string. Allowed characters: **a-z**, **A-Z**, **0-9**, spaces, and special characters **. , ' _ - ? + * /_**. - [DataMember(Name = "doingBusinessAsName", EmitDefaultValue = false)] - public string DoingBusinessAsName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionDescriptionInfo {\n"); - sb.Append(" DoingBusinessAsName: ").Append(DoingBusinessAsName).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionDescriptionInfo); - } - - /// - /// Returns true if TransactionDescriptionInfo instances are equal - /// - /// Instance of TransactionDescriptionInfo to be compared - /// Boolean - public bool Equals(TransactionDescriptionInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.DoingBusinessAsName == input.DoingBusinessAsName || - (this.DoingBusinessAsName != null && - this.DoingBusinessAsName.Equals(input.DoingBusinessAsName)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DoingBusinessAsName != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAsName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // DoingBusinessAsName (string) maxLength - if (this.DoingBusinessAsName != null && this.DoingBusinessAsName.Length > 22) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoingBusinessAsName, length must be less than 22.", new [] { "DoingBusinessAsName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/TwintInfo.cs b/Adyen/Model/Management/TwintInfo.cs deleted file mode 100644 index 6853c8d3c..000000000 --- a/Adyen/Model/Management/TwintInfo.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// TwintInfo - /// - [DataContract(Name = "TwintInfo")] - public partial class TwintInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TwintInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Twint logo. Format: Base64-encoded string. (required). - public TwintInfo(string logo = default(string)) - { - this.Logo = logo; - } - - /// - /// Twint logo. Format: Base64-encoded string. - /// - /// Twint logo. Format: Base64-encoded string. - [DataMember(Name = "logo", IsRequired = false, EmitDefaultValue = false)] - public string Logo { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TwintInfo {\n"); - sb.Append(" Logo: ").Append(Logo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TwintInfo); - } - - /// - /// Returns true if TwintInfo instances are equal - /// - /// Instance of TwintInfo to be compared - /// Boolean - public bool Equals(TwintInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Logo == input.Logo || - (this.Logo != null && - this.Logo.Equals(input.Logo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Logo != null) - { - hashCode = (hashCode * 59) + this.Logo.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UninstallAndroidAppDetails.cs b/Adyen/Model/Management/UninstallAndroidAppDetails.cs deleted file mode 100644 index 96e6bab52..000000000 --- a/Adyen/Model/Management/UninstallAndroidAppDetails.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UninstallAndroidAppDetails - /// - [DataContract(Name = "UninstallAndroidAppDetails")] - public partial class UninstallAndroidAppDetails : IEquatable, IValidatableObject - { - /// - /// Type of terminal action: Uninstall an Android app. - /// - /// Type of terminal action: Uninstall an Android app. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UninstallAndroidApp for value: UninstallAndroidApp - /// - [EnumMember(Value = "UninstallAndroidApp")] - UninstallAndroidApp = 1 - - } - - - /// - /// Type of terminal action: Uninstall an Android app. - /// - /// Type of terminal action: Uninstall an Android app. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the app to be uninstalled.. - /// Type of terminal action: Uninstall an Android app. (default to TypeEnum.UninstallAndroidApp). - public UninstallAndroidAppDetails(string appId = default(string), TypeEnum? type = TypeEnum.UninstallAndroidApp) - { - this.AppId = appId; - this.Type = type; - } - - /// - /// The unique identifier of the app to be uninstalled. - /// - /// The unique identifier of the app to be uninstalled. - [DataMember(Name = "appId", EmitDefaultValue = false)] - public string AppId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UninstallAndroidAppDetails {\n"); - sb.Append(" AppId: ").Append(AppId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UninstallAndroidAppDetails); - } - - /// - /// Returns true if UninstallAndroidAppDetails instances are equal - /// - /// Instance of UninstallAndroidAppDetails to be compared - /// Boolean - public bool Equals(UninstallAndroidAppDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.AppId == input.AppId || - (this.AppId != null && - this.AppId.Equals(input.AppId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AppId != null) - { - hashCode = (hashCode * 59) + this.AppId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UninstallAndroidCertificateDetails.cs b/Adyen/Model/Management/UninstallAndroidCertificateDetails.cs deleted file mode 100644 index 5d1251366..000000000 --- a/Adyen/Model/Management/UninstallAndroidCertificateDetails.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UninstallAndroidCertificateDetails - /// - [DataContract(Name = "UninstallAndroidCertificateDetails")] - public partial class UninstallAndroidCertificateDetails : IEquatable, IValidatableObject - { - /// - /// Type of terminal action: Uninstall an Android certificate. - /// - /// Type of terminal action: Uninstall an Android certificate. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UninstallAndroidCertificate for value: UninstallAndroidCertificate - /// - [EnumMember(Value = "UninstallAndroidCertificate")] - UninstallAndroidCertificate = 1 - - } - - - /// - /// Type of terminal action: Uninstall an Android certificate. - /// - /// Type of terminal action: Uninstall an Android certificate. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the certificate to be uninstalled.. - /// Type of terminal action: Uninstall an Android certificate. (default to TypeEnum.UninstallAndroidCertificate). - public UninstallAndroidCertificateDetails(string certificateId = default(string), TypeEnum? type = TypeEnum.UninstallAndroidCertificate) - { - this.CertificateId = certificateId; - this.Type = type; - } - - /// - /// The unique identifier of the certificate to be uninstalled. - /// - /// The unique identifier of the certificate to be uninstalled. - [DataMember(Name = "certificateId", EmitDefaultValue = false)] - public string CertificateId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UninstallAndroidCertificateDetails {\n"); - sb.Append(" CertificateId: ").Append(CertificateId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UninstallAndroidCertificateDetails); - } - - /// - /// Returns true if UninstallAndroidCertificateDetails instances are equal - /// - /// Instance of UninstallAndroidCertificateDetails to be compared - /// Boolean - public bool Equals(UninstallAndroidCertificateDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.CertificateId == input.CertificateId || - (this.CertificateId != null && - this.CertificateId.Equals(input.CertificateId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CertificateId != null) - { - hashCode = (hashCode * 59) + this.CertificateId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdatableAddress.cs b/Adyen/Model/Management/UpdatableAddress.cs deleted file mode 100644 index d1d25dff1..000000000 --- a/Adyen/Model/Management/UpdatableAddress.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdatableAddress - /// - [DataContract(Name = "UpdatableAddress")] - public partial class UpdatableAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The name of the city.. - /// The street address.. - /// Second address line.. - /// Third address line.. - /// The postal code.. - /// The state or province code as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Required for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States. - public UpdatableAddress(string city = default(string), string line1 = default(string), string line2 = default(string), string line3 = default(string), string postalCode = default(string), string stateOrProvince = default(string)) - { - this.City = city; - this.Line1 = line1; - this.Line2 = line2; - this.Line3 = line3; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. - /// - /// The name of the city. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The street address. - /// - /// The street address. - [DataMember(Name = "line1", EmitDefaultValue = false)] - public string Line1 { get; set; } - - /// - /// Second address line. - /// - /// Second address line. - [DataMember(Name = "line2", EmitDefaultValue = false)] - public string Line2 { get; set; } - - /// - /// Third address line. - /// - /// Third address line. - [DataMember(Name = "line3", EmitDefaultValue = false)] - public string Line3 { get; set; } - - /// - /// The postal code. - /// - /// The postal code. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The state or province code as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Required for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States - /// - /// The state or province code as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Required for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdatableAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Line1: ").Append(Line1).Append("\n"); - sb.Append(" Line2: ").Append(Line2).Append("\n"); - sb.Append(" Line3: ").Append(Line3).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdatableAddress); - } - - /// - /// Returns true if UpdatableAddress instances are equal - /// - /// Instance of UpdatableAddress to be compared - /// Boolean - public bool Equals(UpdatableAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Line1 == input.Line1 || - (this.Line1 != null && - this.Line1.Equals(input.Line1)) - ) && - ( - this.Line2 == input.Line2 || - (this.Line2 != null && - this.Line2.Equals(input.Line2)) - ) && - ( - this.Line3 == input.Line3 || - (this.Line3 != null && - this.Line3.Equals(input.Line3)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Line1 != null) - { - hashCode = (hashCode * 59) + this.Line1.GetHashCode(); - } - if (this.Line2 != null) - { - hashCode = (hashCode * 59) + this.Line2.GetHashCode(); - } - if (this.Line3 != null) - { - hashCode = (hashCode * 59) + this.Line3.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.cs b/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.cs deleted file mode 100644 index 5030f04ce..000000000 --- a/Adyen/Model/Management/UpdateCompanyApiCredentialRequest.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateCompanyApiCredentialRequest - /// - [DataContract(Name = "UpdateCompanyApiCredentialRequest")] - public partial class UpdateCompanyApiCredentialRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates if the API credential is enabled.. - /// The new list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the API credential.. - /// List of merchant accounts that the API credential has access to.. - /// Description of the API credential.. - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials.. - public UpdateCompanyApiCredentialRequest(bool? active = default(bool?), List allowedOrigins = default(List), List associatedMerchantAccounts = default(List), string description = default(string), List roles = default(List)) - { - this.Active = active; - this.AllowedOrigins = allowedOrigins; - this.AssociatedMerchantAccounts = associatedMerchantAccounts; - this.Description = description; - this.Roles = roles; - } - - /// - /// Indicates if the API credential is enabled. - /// - /// Indicates if the API credential is enabled. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// The new list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the API credential. - /// - /// The new list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// List of merchant accounts that the API credential has access to. - /// - /// List of merchant accounts that the API credential has access to. - [DataMember(Name = "associatedMerchantAccounts", EmitDefaultValue = false)] - public List AssociatedMerchantAccounts { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials. - [DataMember(Name = "roles", EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateCompanyApiCredentialRequest {\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" AssociatedMerchantAccounts: ").Append(AssociatedMerchantAccounts).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCompanyApiCredentialRequest); - } - - /// - /// Returns true if UpdateCompanyApiCredentialRequest instances are equal - /// - /// Instance of UpdateCompanyApiCredentialRequest to be compared - /// Boolean - public bool Equals(UpdateCompanyApiCredentialRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.AssociatedMerchantAccounts == input.AssociatedMerchantAccounts || - this.AssociatedMerchantAccounts != null && - input.AssociatedMerchantAccounts != null && - this.AssociatedMerchantAccounts.SequenceEqual(input.AssociatedMerchantAccounts) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.AssociatedMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.AssociatedMerchantAccounts.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateCompanyUserRequest.cs b/Adyen/Model/Management/UpdateCompanyUserRequest.cs deleted file mode 100644 index d6e905dd2..000000000 --- a/Adyen/Model/Management/UpdateCompanyUserRequest.cs +++ /dev/null @@ -1,260 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateCompanyUserRequest - /// - [DataContract(Name = "UpdateCompanyUserRequest")] - public partial class UpdateCompanyUserRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.. - /// Indicates whether this user is active.. - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) to associate the user with.. - /// The email address of the user.. - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** . - /// name. - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user.. - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.. - public UpdateCompanyUserRequest(List accountGroups = default(List), bool? active = default(bool?), List associatedMerchantAccounts = default(List), string email = default(string), string loginMethod = default(string), Name2 name = default(Name2), List roles = default(List), string timeZoneCode = default(string)) - { - this.AccountGroups = accountGroups; - this.Active = active; - this.AssociatedMerchantAccounts = associatedMerchantAccounts; - this.Email = email; - this.LoginMethod = loginMethod; - this.Name = name; - this.Roles = roles; - this.TimeZoneCode = timeZoneCode; - } - - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - [DataMember(Name = "accountGroups", EmitDefaultValue = false)] - public List AccountGroups { get; set; } - - /// - /// Indicates whether this user is active. - /// - /// Indicates whether this user is active. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) to associate the user with. - /// - /// The list of [merchant accounts](https://docs.adyen.com/account/account-structure#merchant-accounts) to associate the user with. - [DataMember(Name = "associatedMerchantAccounts", EmitDefaultValue = false)] - public List AssociatedMerchantAccounts { get; set; } - - /// - /// The email address of the user. - /// - /// The email address of the user. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** - /// - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** - [DataMember(Name = "loginMethod", EmitDefaultValue = false)] - public string LoginMethod { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public Name2 Name { get; set; } - - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - [DataMember(Name = "roles", EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - [DataMember(Name = "timeZoneCode", EmitDefaultValue = false)] - public string TimeZoneCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateCompanyUserRequest {\n"); - sb.Append(" AccountGroups: ").Append(AccountGroups).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AssociatedMerchantAccounts: ").Append(AssociatedMerchantAccounts).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" LoginMethod: ").Append(LoginMethod).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" TimeZoneCode: ").Append(TimeZoneCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCompanyUserRequest); - } - - /// - /// Returns true if UpdateCompanyUserRequest instances are equal - /// - /// Instance of UpdateCompanyUserRequest to be compared - /// Boolean - public bool Equals(UpdateCompanyUserRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountGroups == input.AccountGroups || - this.AccountGroups != null && - input.AccountGroups != null && - this.AccountGroups.SequenceEqual(input.AccountGroups) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AssociatedMerchantAccounts == input.AssociatedMerchantAccounts || - this.AssociatedMerchantAccounts != null && - input.AssociatedMerchantAccounts != null && - this.AssociatedMerchantAccounts.SequenceEqual(input.AssociatedMerchantAccounts) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.LoginMethod == input.LoginMethod || - (this.LoginMethod != null && - this.LoginMethod.Equals(input.LoginMethod)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.TimeZoneCode == input.TimeZoneCode || - (this.TimeZoneCode != null && - this.TimeZoneCode.Equals(input.TimeZoneCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountGroups != null) - { - hashCode = (hashCode * 59) + this.AccountGroups.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AssociatedMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.AssociatedMerchantAccounts.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.LoginMethod != null) - { - hashCode = (hashCode * 59) + this.LoginMethod.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.TimeZoneCode != null) - { - hashCode = (hashCode * 59) + this.TimeZoneCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateCompanyWebhookRequest.cs b/Adyen/Model/Management/UpdateCompanyWebhookRequest.cs deleted file mode 100644 index 4c0441eac..000000000 --- a/Adyen/Model/Management/UpdateCompanyWebhookRequest.cs +++ /dev/null @@ -1,467 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateCompanyWebhookRequest - /// - [DataContract(Name = "UpdateCompanyWebhookRequest")] - public partial class UpdateCompanyWebhookRequest : IEquatable, IValidatableObject - { - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [JsonConverter(typeof(StringEnumConverter))] - public enum CommunicationFormatEnum - { - /// - /// Enum Http for value: http - /// - [EnumMember(Value = "http")] - Http = 1, - - /// - /// Enum Json for value: json - /// - [EnumMember(Value = "json")] - Json = 2, - - /// - /// Enum Soap for value: soap - /// - [EnumMember(Value = "soap")] - Soap = 3 - - } - - - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [DataMember(Name = "communicationFormat", EmitDefaultValue = false)] - public CommunicationFormatEnum? CommunicationFormat { get; set; } - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [JsonConverter(typeof(StringEnumConverter))] - public enum EncryptionProtocolEnum - { - /// - /// Enum HTTP for value: HTTP - /// - [EnumMember(Value = "HTTP")] - HTTP = 1, - - /// - /// Enum TLSv12 for value: TLSv1.2 - /// - [EnumMember(Value = "TLSv1.2")] - TLSv12 = 2, - - /// - /// Enum TLSv13 for value: TLSv1.3 - /// - [EnumMember(Value = "TLSv1.3")] - TLSv13 = 3 - - } - - - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [DataMember(Name = "encryptionProtocol", EmitDefaultValue = false)] - public EncryptionProtocolEnum? EncryptionProtocol { get; set; } - /// - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. - /// - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. - [JsonConverter(typeof(StringEnumConverter))] - public enum FilterMerchantAccountTypeEnum - { - /// - /// Enum AllAccounts for value: allAccounts - /// - [EnumMember(Value = "allAccounts")] - AllAccounts = 1, - - /// - /// Enum ExcludeAccounts for value: excludeAccounts - /// - [EnumMember(Value = "excludeAccounts")] - ExcludeAccounts = 2, - - /// - /// Enum IncludeAccounts for value: includeAccounts - /// - [EnumMember(Value = "includeAccounts")] - IncludeAccounts = 3 - - } - - - /// - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. - /// - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. - [DataMember(Name = "filterMerchantAccountType", EmitDefaultValue = false)] - public FilterMerchantAccountTypeEnum? FilterMerchantAccountType { get; set; } - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - [JsonConverter(typeof(StringEnumConverter))] - public enum NetworkTypeEnum - { - /// - /// Enum Local for value: local - /// - [EnumMember(Value = "local")] - Local = 1, - - /// - /// Enum Public for value: public - /// - [EnumMember(Value = "public")] - Public = 2 - - } - - - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - [DataMember(Name = "networkType", EmitDefaultValue = false)] - public NetworkTypeEnum? NetworkType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**.. - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**.. - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**.. - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account.. - /// additionalSettings. - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** . - /// Your description for this webhook configuration.. - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.. - /// Shows how merchant accounts are filtered when configuring the webhook. Possible values: * **includeAccounts**: The webhook is configured for the merchant accounts listed in `filterMerchantAccounts`. * **excludeAccounts**: The webhook is not configured for the merchant accounts listed in `filterMerchantAccounts`. * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`.. - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**.. - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**.. - /// Password to access the webhook URL.. - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**.. - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**.. - /// Username to access the webhook URL.. - public UpdateCompanyWebhookRequest(bool? acceptsExpiredCertificate = default(bool?), bool? acceptsSelfSignedCertificate = default(bool?), bool? acceptsUntrustedRootCertificate = default(bool?), bool? active = default(bool?), AdditionalSettings additionalSettings = default(AdditionalSettings), CommunicationFormatEnum? communicationFormat = default(CommunicationFormatEnum?), string description = default(string), EncryptionProtocolEnum? encryptionProtocol = default(EncryptionProtocolEnum?), FilterMerchantAccountTypeEnum? filterMerchantAccountType = default(FilterMerchantAccountTypeEnum?), List filterMerchantAccounts = default(List), NetworkTypeEnum? networkType = default(NetworkTypeEnum?), string password = default(string), bool? populateSoapActionHeader = default(bool?), string url = default(string), string username = default(string)) - { - this.AcceptsExpiredCertificate = acceptsExpiredCertificate; - this.AcceptsSelfSignedCertificate = acceptsSelfSignedCertificate; - this.AcceptsUntrustedRootCertificate = acceptsUntrustedRootCertificate; - this.Active = active; - this.AdditionalSettings = additionalSettings; - this.CommunicationFormat = communicationFormat; - this.Description = description; - this.EncryptionProtocol = encryptionProtocol; - this.FilterMerchantAccountType = filterMerchantAccountType; - this.FilterMerchantAccounts = filterMerchantAccounts; - this.NetworkType = networkType; - this.Password = password; - this.PopulateSoapActionHeader = populateSoapActionHeader; - this.Url = url; - this.Username = username; - } - - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsExpiredCertificate", EmitDefaultValue = false)] - public bool? AcceptsExpiredCertificate { get; set; } - - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsSelfSignedCertificate", EmitDefaultValue = false)] - public bool? AcceptsSelfSignedCertificate { get; set; } - - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsUntrustedRootCertificate", EmitDefaultValue = false)] - public bool? AcceptsUntrustedRootCertificate { get; set; } - - /// - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. - /// - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Gets or Sets AdditionalSettings - /// - [DataMember(Name = "additionalSettings", EmitDefaultValue = false)] - public AdditionalSettings AdditionalSettings { get; set; } - - /// - /// Your description for this webhook configuration. - /// - /// Your description for this webhook configuration. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. - /// - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. - [DataMember(Name = "filterMerchantAccounts", EmitDefaultValue = false)] - public List FilterMerchantAccounts { get; set; } - - /// - /// Password to access the webhook URL. - /// - /// Password to access the webhook URL. - [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - [DataMember(Name = "populateSoapActionHeader", EmitDefaultValue = false)] - public bool? PopulateSoapActionHeader { get; set; } - - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Username to access the webhook URL. - /// - /// Username to access the webhook URL. - [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateCompanyWebhookRequest {\n"); - sb.Append(" AcceptsExpiredCertificate: ").Append(AcceptsExpiredCertificate).Append("\n"); - sb.Append(" AcceptsSelfSignedCertificate: ").Append(AcceptsSelfSignedCertificate).Append("\n"); - sb.Append(" AcceptsUntrustedRootCertificate: ").Append(AcceptsUntrustedRootCertificate).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AdditionalSettings: ").Append(AdditionalSettings).Append("\n"); - sb.Append(" CommunicationFormat: ").Append(CommunicationFormat).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EncryptionProtocol: ").Append(EncryptionProtocol).Append("\n"); - sb.Append(" FilterMerchantAccountType: ").Append(FilterMerchantAccountType).Append("\n"); - sb.Append(" FilterMerchantAccounts: ").Append(FilterMerchantAccounts).Append("\n"); - sb.Append(" NetworkType: ").Append(NetworkType).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PopulateSoapActionHeader: ").Append(PopulateSoapActionHeader).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCompanyWebhookRequest); - } - - /// - /// Returns true if UpdateCompanyWebhookRequest instances are equal - /// - /// Instance of UpdateCompanyWebhookRequest to be compared - /// Boolean - public bool Equals(UpdateCompanyWebhookRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptsExpiredCertificate == input.AcceptsExpiredCertificate || - this.AcceptsExpiredCertificate.Equals(input.AcceptsExpiredCertificate) - ) && - ( - this.AcceptsSelfSignedCertificate == input.AcceptsSelfSignedCertificate || - this.AcceptsSelfSignedCertificate.Equals(input.AcceptsSelfSignedCertificate) - ) && - ( - this.AcceptsUntrustedRootCertificate == input.AcceptsUntrustedRootCertificate || - this.AcceptsUntrustedRootCertificate.Equals(input.AcceptsUntrustedRootCertificate) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AdditionalSettings == input.AdditionalSettings || - (this.AdditionalSettings != null && - this.AdditionalSettings.Equals(input.AdditionalSettings)) - ) && - ( - this.CommunicationFormat == input.CommunicationFormat || - this.CommunicationFormat.Equals(input.CommunicationFormat) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EncryptionProtocol == input.EncryptionProtocol || - this.EncryptionProtocol.Equals(input.EncryptionProtocol) - ) && - ( - this.FilterMerchantAccountType == input.FilterMerchantAccountType || - this.FilterMerchantAccountType.Equals(input.FilterMerchantAccountType) - ) && - ( - this.FilterMerchantAccounts == input.FilterMerchantAccounts || - this.FilterMerchantAccounts != null && - input.FilterMerchantAccounts != null && - this.FilterMerchantAccounts.SequenceEqual(input.FilterMerchantAccounts) - ) && - ( - this.NetworkType == input.NetworkType || - this.NetworkType.Equals(input.NetworkType) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.PopulateSoapActionHeader == input.PopulateSoapActionHeader || - this.PopulateSoapActionHeader.Equals(input.PopulateSoapActionHeader) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AcceptsExpiredCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsSelfSignedCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsUntrustedRootCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AdditionalSettings != null) - { - hashCode = (hashCode * 59) + this.AdditionalSettings.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CommunicationFormat.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EncryptionProtocol.GetHashCode(); - hashCode = (hashCode * 59) + this.FilterMerchantAccountType.GetHashCode(); - if (this.FilterMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.FilterMerchantAccounts.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NetworkType.GetHashCode(); - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PopulateSoapActionHeader.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.cs b/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.cs deleted file mode 100644 index 9cf47f71c..000000000 --- a/Adyen/Model/Management/UpdateMerchantApiCredentialRequest.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateMerchantApiCredentialRequest - /// - [DataContract(Name = "UpdateMerchantApiCredentialRequest")] - public partial class UpdateMerchantApiCredentialRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates if the API credential is enabled.. - /// The new list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the API credential.. - /// Description of the API credential.. - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials.. - public UpdateMerchantApiCredentialRequest(bool? active = default(bool?), List allowedOrigins = default(List), string description = default(string), List roles = default(List)) - { - this.Active = active; - this.AllowedOrigins = allowedOrigins; - this.Description = description; - this.Roles = roles; - } - - /// - /// Indicates if the API credential is enabled. - /// - /// Indicates if the API credential is enabled. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// The new list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the API credential. - /// - /// The new list of [allowed origins](https://docs.adyen.com/development-resources/client-side-authentication#allowed-origins) for the API credential. - [DataMember(Name = "allowedOrigins", EmitDefaultValue = false)] - public List AllowedOrigins { get; set; } - - /// - /// Description of the API credential. - /// - /// Description of the API credential. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials. - /// - /// List of [roles](https://docs.adyen.com/development-resources/api-credentials#roles-1) for the API credential. Only roles assigned to 'ws@Company.<CompanyName>' can be assigned to other API credentials. - [DataMember(Name = "roles", EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateMerchantApiCredentialRequest {\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AllowedOrigins: ").Append(AllowedOrigins).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateMerchantApiCredentialRequest); - } - - /// - /// Returns true if UpdateMerchantApiCredentialRequest instances are equal - /// - /// Instance of UpdateMerchantApiCredentialRequest to be compared - /// Boolean - public bool Equals(UpdateMerchantApiCredentialRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AllowedOrigins == input.AllowedOrigins || - this.AllowedOrigins != null && - input.AllowedOrigins != null && - this.AllowedOrigins.SequenceEqual(input.AllowedOrigins) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AllowedOrigins != null) - { - hashCode = (hashCode * 59) + this.AllowedOrigins.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateMerchantUserRequest.cs b/Adyen/Model/Management/UpdateMerchantUserRequest.cs deleted file mode 100644 index 4c756c77c..000000000 --- a/Adyen/Model/Management/UpdateMerchantUserRequest.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateMerchantUserRequest - /// - [DataContract(Name = "UpdateMerchantUserRequest")] - public partial class UpdateMerchantUserRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.. - /// Sets the status of the user to active (**true**) or inactive (**false**).. - /// The email address of the user.. - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** . - /// name. - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user.. - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**.. - public UpdateMerchantUserRequest(List accountGroups = default(List), bool? active = default(bool?), string email = default(string), string loginMethod = default(string), Name2 name = default(Name2), List roles = default(List), string timeZoneCode = default(string)) - { - this.AccountGroups = accountGroups; - this.Active = active; - this.Email = email; - this.LoginMethod = loginMethod; - this.Name = name; - this.Roles = roles; - this.TimeZoneCode = timeZoneCode; - } - - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - [DataMember(Name = "accountGroups", EmitDefaultValue = false)] - public List AccountGroups { get; set; } - - /// - /// Sets the status of the user to active (**true**) or inactive (**false**). - /// - /// Sets the status of the user to active (**true**) or inactive (**false**). - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// The email address of the user. - /// - /// The email address of the user. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** - /// - /// The requested login method for the user. To use SSO, you must already have SSO configured with Adyen before creating the user. Possible values: **Username & account**, **Email**, or **SSO** - [DataMember(Name = "loginMethod", EmitDefaultValue = false)] - public string LoginMethod { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public Name2 Name { get; set; } - - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - [DataMember(Name = "roles", EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - [DataMember(Name = "timeZoneCode", EmitDefaultValue = false)] - public string TimeZoneCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateMerchantUserRequest {\n"); - sb.Append(" AccountGroups: ").Append(AccountGroups).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" LoginMethod: ").Append(LoginMethod).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" TimeZoneCode: ").Append(TimeZoneCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateMerchantUserRequest); - } - - /// - /// Returns true if UpdateMerchantUserRequest instances are equal - /// - /// Instance of UpdateMerchantUserRequest to be compared - /// Boolean - public bool Equals(UpdateMerchantUserRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountGroups == input.AccountGroups || - this.AccountGroups != null && - input.AccountGroups != null && - this.AccountGroups.SequenceEqual(input.AccountGroups) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.LoginMethod == input.LoginMethod || - (this.LoginMethod != null && - this.LoginMethod.Equals(input.LoginMethod)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.TimeZoneCode == input.TimeZoneCode || - (this.TimeZoneCode != null && - this.TimeZoneCode.Equals(input.TimeZoneCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountGroups != null) - { - hashCode = (hashCode * 59) + this.AccountGroups.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.LoginMethod != null) - { - hashCode = (hashCode * 59) + this.LoginMethod.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.TimeZoneCode != null) - { - hashCode = (hashCode * 59) + this.TimeZoneCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateMerchantWebhookRequest.cs b/Adyen/Model/Management/UpdateMerchantWebhookRequest.cs deleted file mode 100644 index 8e141e522..000000000 --- a/Adyen/Model/Management/UpdateMerchantWebhookRequest.cs +++ /dev/null @@ -1,405 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateMerchantWebhookRequest - /// - [DataContract(Name = "UpdateMerchantWebhookRequest")] - public partial class UpdateMerchantWebhookRequest : IEquatable, IValidatableObject - { - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [JsonConverter(typeof(StringEnumConverter))] - public enum CommunicationFormatEnum - { - /// - /// Enum Http for value: http - /// - [EnumMember(Value = "http")] - Http = 1, - - /// - /// Enum Json for value: json - /// - [EnumMember(Value = "json")] - Json = 2, - - /// - /// Enum Soap for value: soap - /// - [EnumMember(Value = "soap")] - Soap = 3 - - } - - - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [DataMember(Name = "communicationFormat", EmitDefaultValue = false)] - public CommunicationFormatEnum? CommunicationFormat { get; set; } - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [JsonConverter(typeof(StringEnumConverter))] - public enum EncryptionProtocolEnum - { - /// - /// Enum HTTP for value: HTTP - /// - [EnumMember(Value = "HTTP")] - HTTP = 1, - - /// - /// Enum TLSv12 for value: TLSv1.2 - /// - [EnumMember(Value = "TLSv1.2")] - TLSv12 = 2, - - /// - /// Enum TLSv13 for value: TLSv1.3 - /// - [EnumMember(Value = "TLSv1.3")] - TLSv13 = 3 - - } - - - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [DataMember(Name = "encryptionProtocol", EmitDefaultValue = false)] - public EncryptionProtocolEnum? EncryptionProtocol { get; set; } - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - [JsonConverter(typeof(StringEnumConverter))] - public enum NetworkTypeEnum - { - /// - /// Enum Local for value: local - /// - [EnumMember(Value = "local")] - Local = 1, - - /// - /// Enum Public for value: public - /// - [EnumMember(Value = "public")] - Public = 2 - - } - - - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - /// - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**. - [DataMember(Name = "networkType", EmitDefaultValue = false)] - public NetworkTypeEnum? NetworkType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**.. - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**.. - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**.. - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account.. - /// additionalSettings. - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** . - /// Your description for this webhook configuration.. - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.. - /// Network type for Terminal API notification webhooks. Possible values: * **public** * **local** Default Value: **public**.. - /// Password to access the webhook URL.. - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**.. - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**.. - /// Username to access the webhook URL.. - public UpdateMerchantWebhookRequest(bool? acceptsExpiredCertificate = default(bool?), bool? acceptsSelfSignedCertificate = default(bool?), bool? acceptsUntrustedRootCertificate = default(bool?), bool? active = default(bool?), AdditionalSettings additionalSettings = default(AdditionalSettings), CommunicationFormatEnum? communicationFormat = default(CommunicationFormatEnum?), string description = default(string), EncryptionProtocolEnum? encryptionProtocol = default(EncryptionProtocolEnum?), NetworkTypeEnum? networkType = default(NetworkTypeEnum?), string password = default(string), bool? populateSoapActionHeader = default(bool?), string url = default(string), string username = default(string)) - { - this.AcceptsExpiredCertificate = acceptsExpiredCertificate; - this.AcceptsSelfSignedCertificate = acceptsSelfSignedCertificate; - this.AcceptsUntrustedRootCertificate = acceptsUntrustedRootCertificate; - this.Active = active; - this.AdditionalSettings = additionalSettings; - this.CommunicationFormat = communicationFormat; - this.Description = description; - this.EncryptionProtocol = encryptionProtocol; - this.NetworkType = networkType; - this.Password = password; - this.PopulateSoapActionHeader = populateSoapActionHeader; - this.Url = url; - this.Username = username; - } - - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsExpiredCertificate", EmitDefaultValue = false)] - public bool? AcceptsExpiredCertificate { get; set; } - - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsSelfSignedCertificate", EmitDefaultValue = false)] - public bool? AcceptsSelfSignedCertificate { get; set; } - - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsUntrustedRootCertificate", EmitDefaultValue = false)] - public bool? AcceptsUntrustedRootCertificate { get; set; } - - /// - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. - /// - /// Indicates if the webhook configuration is active. The field must be **true** for us to send webhooks about events related an account. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Gets or Sets AdditionalSettings - /// - [DataMember(Name = "additionalSettings", EmitDefaultValue = false)] - public AdditionalSettings AdditionalSettings { get; set; } - - /// - /// Your description for this webhook configuration. - /// - /// Your description for this webhook configuration. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Password to access the webhook URL. - /// - /// Password to access the webhook URL. - [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - [DataMember(Name = "populateSoapActionHeader", EmitDefaultValue = false)] - public bool? PopulateSoapActionHeader { get; set; } - - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Username to access the webhook URL. - /// - /// Username to access the webhook URL. - [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateMerchantWebhookRequest {\n"); - sb.Append(" AcceptsExpiredCertificate: ").Append(AcceptsExpiredCertificate).Append("\n"); - sb.Append(" AcceptsSelfSignedCertificate: ").Append(AcceptsSelfSignedCertificate).Append("\n"); - sb.Append(" AcceptsUntrustedRootCertificate: ").Append(AcceptsUntrustedRootCertificate).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AdditionalSettings: ").Append(AdditionalSettings).Append("\n"); - sb.Append(" CommunicationFormat: ").Append(CommunicationFormat).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EncryptionProtocol: ").Append(EncryptionProtocol).Append("\n"); - sb.Append(" NetworkType: ").Append(NetworkType).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PopulateSoapActionHeader: ").Append(PopulateSoapActionHeader).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateMerchantWebhookRequest); - } - - /// - /// Returns true if UpdateMerchantWebhookRequest instances are equal - /// - /// Instance of UpdateMerchantWebhookRequest to be compared - /// Boolean - public bool Equals(UpdateMerchantWebhookRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AcceptsExpiredCertificate == input.AcceptsExpiredCertificate || - this.AcceptsExpiredCertificate.Equals(input.AcceptsExpiredCertificate) - ) && - ( - this.AcceptsSelfSignedCertificate == input.AcceptsSelfSignedCertificate || - this.AcceptsSelfSignedCertificate.Equals(input.AcceptsSelfSignedCertificate) - ) && - ( - this.AcceptsUntrustedRootCertificate == input.AcceptsUntrustedRootCertificate || - this.AcceptsUntrustedRootCertificate.Equals(input.AcceptsUntrustedRootCertificate) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AdditionalSettings == input.AdditionalSettings || - (this.AdditionalSettings != null && - this.AdditionalSettings.Equals(input.AdditionalSettings)) - ) && - ( - this.CommunicationFormat == input.CommunicationFormat || - this.CommunicationFormat.Equals(input.CommunicationFormat) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EncryptionProtocol == input.EncryptionProtocol || - this.EncryptionProtocol.Equals(input.EncryptionProtocol) - ) && - ( - this.NetworkType == input.NetworkType || - this.NetworkType.Equals(input.NetworkType) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.PopulateSoapActionHeader == input.PopulateSoapActionHeader || - this.PopulateSoapActionHeader.Equals(input.PopulateSoapActionHeader) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AcceptsExpiredCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsSelfSignedCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsUntrustedRootCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AdditionalSettings != null) - { - hashCode = (hashCode * 59) + this.AdditionalSettings.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CommunicationFormat.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EncryptionProtocol.GetHashCode(); - hashCode = (hashCode * 59) + this.NetworkType.GetHashCode(); - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PopulateSoapActionHeader.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdatePaymentMethodInfo.cs b/Adyen/Model/Management/UpdatePaymentMethodInfo.cs deleted file mode 100644 index 7f77b101b..000000000 --- a/Adyen/Model/Management/UpdatePaymentMethodInfo.cs +++ /dev/null @@ -1,549 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdatePaymentMethodInfo - /// - [DataContract(Name = "UpdatePaymentMethodInfo")] - public partial class UpdatePaymentMethodInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accel. - /// bcmc. - /// cartesBancaires. - /// The list of countries where a payment method is available. By default, all countries supported by the payment method.. - /// cup. - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method.. - /// Custom routing flags for acquirer routing.. - /// diners. - /// discover. - /// eftDirectdebitCA. - /// eftposAustralia. - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**).. - /// girocard. - /// ideal. - /// interacCard. - /// jcb. - /// maestro. - /// mc. - /// nyce. - /// pulse. - /// star. - /// The store for this payment method. - /// The list of stores for this payment method. - /// visa. - public UpdatePaymentMethodInfo(AccelInfo accel = default(AccelInfo), BcmcInfo bcmc = default(BcmcInfo), CartesBancairesInfo cartesBancaires = default(CartesBancairesInfo), List countries = default(List), GenericPmWithTdiInfo cup = default(GenericPmWithTdiInfo), List currencies = default(List), List customRoutingFlags = default(List), GenericPmWithTdiInfo diners = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo discover = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftDirectdebitCA = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo eftposAustralia = default(GenericPmWithTdiInfo), bool? enabled = default(bool?), GenericPmWithTdiInfo girocard = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo ideal = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo interacCard = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo jcb = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo maestro = default(GenericPmWithTdiInfo), GenericPmWithTdiInfo mc = default(GenericPmWithTdiInfo), NyceInfo nyce = default(NyceInfo), PulseInfo pulse = default(PulseInfo), StarInfo star = default(StarInfo), string storeId = default(string), List storeIds = default(List), GenericPmWithTdiInfo visa = default(GenericPmWithTdiInfo)) - { - this.Accel = accel; - this.Bcmc = bcmc; - this.CartesBancaires = cartesBancaires; - this.Countries = countries; - this.Cup = cup; - this.Currencies = currencies; - this.CustomRoutingFlags = customRoutingFlags; - this.Diners = diners; - this.Discover = discover; - this.EftDirectdebitCA = eftDirectdebitCA; - this.EftposAustralia = eftposAustralia; - this.Enabled = enabled; - this.Girocard = girocard; - this.Ideal = ideal; - this.InteracCard = interacCard; - this.Jcb = jcb; - this.Maestro = maestro; - this.Mc = mc; - this.Nyce = nyce; - this.Pulse = pulse; - this.Star = star; - this.StoreId = storeId; - this.StoreIds = storeIds; - this.Visa = visa; - } - - /// - /// Gets or Sets Accel - /// - [DataMember(Name = "accel", EmitDefaultValue = false)] - public AccelInfo Accel { get; set; } - - /// - /// Gets or Sets Bcmc - /// - [DataMember(Name = "bcmc", EmitDefaultValue = false)] - public BcmcInfo Bcmc { get; set; } - - /// - /// Gets or Sets CartesBancaires - /// - [DataMember(Name = "cartesBancaires", EmitDefaultValue = false)] - public CartesBancairesInfo CartesBancaires { get; set; } - - /// - /// The list of countries where a payment method is available. By default, all countries supported by the payment method. - /// - /// The list of countries where a payment method is available. By default, all countries supported by the payment method. - [DataMember(Name = "countries", EmitDefaultValue = false)] - public List Countries { get; set; } - - /// - /// Gets or Sets Cup - /// - [DataMember(Name = "cup", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Cup { get; set; } - - /// - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method. - /// - /// The list of currencies that a payment method supports. By default, all currencies supported by the payment method. - [DataMember(Name = "currencies", EmitDefaultValue = false)] - public List Currencies { get; set; } - - /// - /// Custom routing flags for acquirer routing. - /// - /// Custom routing flags for acquirer routing. - [DataMember(Name = "customRoutingFlags", EmitDefaultValue = false)] - public List CustomRoutingFlags { get; set; } - - /// - /// Gets or Sets Diners - /// - [DataMember(Name = "diners", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Diners { get; set; } - - /// - /// Gets or Sets Discover - /// - [DataMember(Name = "discover", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Discover { get; set; } - - /// - /// Gets or Sets EftDirectdebitCA - /// - [DataMember(Name = "eft_directdebit_CA", EmitDefaultValue = false)] - public GenericPmWithTdiInfo EftDirectdebitCA { get; set; } - - /// - /// Gets or Sets EftposAustralia - /// - [DataMember(Name = "eftpos_australia", EmitDefaultValue = false)] - public GenericPmWithTdiInfo EftposAustralia { get; set; } - - /// - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**). - /// - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**). - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// Gets or Sets Girocard - /// - [DataMember(Name = "girocard", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Girocard { get; set; } - - /// - /// Gets or Sets Ideal - /// - [DataMember(Name = "ideal", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Ideal { get; set; } - - /// - /// Gets or Sets InteracCard - /// - [DataMember(Name = "interac_card", EmitDefaultValue = false)] - public GenericPmWithTdiInfo InteracCard { get; set; } - - /// - /// Gets or Sets Jcb - /// - [DataMember(Name = "jcb", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Jcb { get; set; } - - /// - /// Gets or Sets Maestro - /// - [DataMember(Name = "maestro", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Maestro { get; set; } - - /// - /// Gets or Sets Mc - /// - [DataMember(Name = "mc", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Mc { get; set; } - - /// - /// Gets or Sets Nyce - /// - [DataMember(Name = "nyce", EmitDefaultValue = false)] - public NyceInfo Nyce { get; set; } - - /// - /// Gets or Sets Pulse - /// - [DataMember(Name = "pulse", EmitDefaultValue = false)] - public PulseInfo Pulse { get; set; } - - /// - /// Gets or Sets Star - /// - [DataMember(Name = "star", EmitDefaultValue = false)] - public StarInfo Star { get; set; } - - /// - /// The store for this payment method - /// - /// The store for this payment method - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// The list of stores for this payment method - /// - /// The list of stores for this payment method - [DataMember(Name = "storeIds", EmitDefaultValue = false)] - [Obsolete("Deprecated since Management API v3. Use `storeId` instead. Only one store per payment method is allowed.")] - public List StoreIds { get; set; } - - /// - /// Gets or Sets Visa - /// - [DataMember(Name = "visa", EmitDefaultValue = false)] - public GenericPmWithTdiInfo Visa { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdatePaymentMethodInfo {\n"); - sb.Append(" Accel: ").Append(Accel).Append("\n"); - sb.Append(" Bcmc: ").Append(Bcmc).Append("\n"); - sb.Append(" CartesBancaires: ").Append(CartesBancaires).Append("\n"); - sb.Append(" Countries: ").Append(Countries).Append("\n"); - sb.Append(" Cup: ").Append(Cup).Append("\n"); - sb.Append(" Currencies: ").Append(Currencies).Append("\n"); - sb.Append(" CustomRoutingFlags: ").Append(CustomRoutingFlags).Append("\n"); - sb.Append(" Diners: ").Append(Diners).Append("\n"); - sb.Append(" Discover: ").Append(Discover).Append("\n"); - sb.Append(" EftDirectdebitCA: ").Append(EftDirectdebitCA).Append("\n"); - sb.Append(" EftposAustralia: ").Append(EftposAustralia).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" Girocard: ").Append(Girocard).Append("\n"); - sb.Append(" Ideal: ").Append(Ideal).Append("\n"); - sb.Append(" InteracCard: ").Append(InteracCard).Append("\n"); - sb.Append(" Jcb: ").Append(Jcb).Append("\n"); - sb.Append(" Maestro: ").Append(Maestro).Append("\n"); - sb.Append(" Mc: ").Append(Mc).Append("\n"); - sb.Append(" Nyce: ").Append(Nyce).Append("\n"); - sb.Append(" Pulse: ").Append(Pulse).Append("\n"); - sb.Append(" Star: ").Append(Star).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append(" StoreIds: ").Append(StoreIds).Append("\n"); - sb.Append(" Visa: ").Append(Visa).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdatePaymentMethodInfo); - } - - /// - /// Returns true if UpdatePaymentMethodInfo instances are equal - /// - /// Instance of UpdatePaymentMethodInfo to be compared - /// Boolean - public bool Equals(UpdatePaymentMethodInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Accel == input.Accel || - (this.Accel != null && - this.Accel.Equals(input.Accel)) - ) && - ( - this.Bcmc == input.Bcmc || - (this.Bcmc != null && - this.Bcmc.Equals(input.Bcmc)) - ) && - ( - this.CartesBancaires == input.CartesBancaires || - (this.CartesBancaires != null && - this.CartesBancaires.Equals(input.CartesBancaires)) - ) && - ( - this.Countries == input.Countries || - this.Countries != null && - input.Countries != null && - this.Countries.SequenceEqual(input.Countries) - ) && - ( - this.Cup == input.Cup || - (this.Cup != null && - this.Cup.Equals(input.Cup)) - ) && - ( - this.Currencies == input.Currencies || - this.Currencies != null && - input.Currencies != null && - this.Currencies.SequenceEqual(input.Currencies) - ) && - ( - this.CustomRoutingFlags == input.CustomRoutingFlags || - this.CustomRoutingFlags != null && - input.CustomRoutingFlags != null && - this.CustomRoutingFlags.SequenceEqual(input.CustomRoutingFlags) - ) && - ( - this.Diners == input.Diners || - (this.Diners != null && - this.Diners.Equals(input.Diners)) - ) && - ( - this.Discover == input.Discover || - (this.Discover != null && - this.Discover.Equals(input.Discover)) - ) && - ( - this.EftDirectdebitCA == input.EftDirectdebitCA || - (this.EftDirectdebitCA != null && - this.EftDirectdebitCA.Equals(input.EftDirectdebitCA)) - ) && - ( - this.EftposAustralia == input.EftposAustralia || - (this.EftposAustralia != null && - this.EftposAustralia.Equals(input.EftposAustralia)) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.Girocard == input.Girocard || - (this.Girocard != null && - this.Girocard.Equals(input.Girocard)) - ) && - ( - this.Ideal == input.Ideal || - (this.Ideal != null && - this.Ideal.Equals(input.Ideal)) - ) && - ( - this.InteracCard == input.InteracCard || - (this.InteracCard != null && - this.InteracCard.Equals(input.InteracCard)) - ) && - ( - this.Jcb == input.Jcb || - (this.Jcb != null && - this.Jcb.Equals(input.Jcb)) - ) && - ( - this.Maestro == input.Maestro || - (this.Maestro != null && - this.Maestro.Equals(input.Maestro)) - ) && - ( - this.Mc == input.Mc || - (this.Mc != null && - this.Mc.Equals(input.Mc)) - ) && - ( - this.Nyce == input.Nyce || - (this.Nyce != null && - this.Nyce.Equals(input.Nyce)) - ) && - ( - this.Pulse == input.Pulse || - (this.Pulse != null && - this.Pulse.Equals(input.Pulse)) - ) && - ( - this.Star == input.Star || - (this.Star != null && - this.Star.Equals(input.Star)) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ) && - ( - this.StoreIds == input.StoreIds || - this.StoreIds != null && - input.StoreIds != null && - this.StoreIds.SequenceEqual(input.StoreIds) - ) && - ( - this.Visa == input.Visa || - (this.Visa != null && - this.Visa.Equals(input.Visa)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Accel != null) - { - hashCode = (hashCode * 59) + this.Accel.GetHashCode(); - } - if (this.Bcmc != null) - { - hashCode = (hashCode * 59) + this.Bcmc.GetHashCode(); - } - if (this.CartesBancaires != null) - { - hashCode = (hashCode * 59) + this.CartesBancaires.GetHashCode(); - } - if (this.Countries != null) - { - hashCode = (hashCode * 59) + this.Countries.GetHashCode(); - } - if (this.Cup != null) - { - hashCode = (hashCode * 59) + this.Cup.GetHashCode(); - } - if (this.Currencies != null) - { - hashCode = (hashCode * 59) + this.Currencies.GetHashCode(); - } - if (this.CustomRoutingFlags != null) - { - hashCode = (hashCode * 59) + this.CustomRoutingFlags.GetHashCode(); - } - if (this.Diners != null) - { - hashCode = (hashCode * 59) + this.Diners.GetHashCode(); - } - if (this.Discover != null) - { - hashCode = (hashCode * 59) + this.Discover.GetHashCode(); - } - if (this.EftDirectdebitCA != null) - { - hashCode = (hashCode * 59) + this.EftDirectdebitCA.GetHashCode(); - } - if (this.EftposAustralia != null) - { - hashCode = (hashCode * 59) + this.EftposAustralia.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.Girocard != null) - { - hashCode = (hashCode * 59) + this.Girocard.GetHashCode(); - } - if (this.Ideal != null) - { - hashCode = (hashCode * 59) + this.Ideal.GetHashCode(); - } - if (this.InteracCard != null) - { - hashCode = (hashCode * 59) + this.InteracCard.GetHashCode(); - } - if (this.Jcb != null) - { - hashCode = (hashCode * 59) + this.Jcb.GetHashCode(); - } - if (this.Maestro != null) - { - hashCode = (hashCode * 59) + this.Maestro.GetHashCode(); - } - if (this.Mc != null) - { - hashCode = (hashCode * 59) + this.Mc.GetHashCode(); - } - if (this.Nyce != null) - { - hashCode = (hashCode * 59) + this.Nyce.GetHashCode(); - } - if (this.Pulse != null) - { - hashCode = (hashCode * 59) + this.Pulse.GetHashCode(); - } - if (this.Star != null) - { - hashCode = (hashCode * 59) + this.Star.GetHashCode(); - } - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - if (this.StoreIds != null) - { - hashCode = (hashCode * 59) + this.StoreIds.GetHashCode(); - } - if (this.Visa != null) - { - hashCode = (hashCode * 59) + this.Visa.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdatePayoutSettingsRequest.cs b/Adyen/Model/Management/UpdatePayoutSettingsRequest.cs deleted file mode 100644 index 03a5fc387..000000000 --- a/Adyen/Model/Management/UpdatePayoutSettingsRequest.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdatePayoutSettingsRequest - /// - [DataContract(Name = "UpdatePayoutSettingsRequest")] - public partial class UpdatePayoutSettingsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**.. - public UpdatePayoutSettingsRequest(bool? enabled = default(bool?)) - { - this.Enabled = enabled; - } - - /// - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**. - /// - /// Indicates if payouts to this bank account are enabled. Default: **true**. To receive payouts into this bank account, both `enabled` and `allowed` must be **true**. - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdatePayoutSettingsRequest {\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdatePayoutSettingsRequest); - } - - /// - /// Returns true if UpdatePayoutSettingsRequest instances are equal - /// - /// Instance of UpdatePayoutSettingsRequest to be compared - /// Boolean - public bool Equals(UpdatePayoutSettingsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.cs b/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.cs deleted file mode 100644 index eaebc3c40..000000000 --- a/Adyen/Model/Management/UpdateSplitConfigurationLogicRequest.cs +++ /dev/null @@ -1,684 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateSplitConfigurationLogicRequest - /// - [DataContract(Name = "UpdateSplitConfigurationLogicRequest")] - public partial class UpdateSplitConfigurationLogicRequest : IEquatable, IValidatableObject - { - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AcquiringFeesEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "acquiringFees", EmitDefaultValue = false)] - public AcquiringFeesEnum? AcquiringFees { get; set; } - /// - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AdyenCommissionEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "adyenCommission", EmitDefaultValue = false)] - public AdyenCommissionEnum? AdyenCommission { get; set; } - /// - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AdyenFeesEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "adyenFees", EmitDefaultValue = false)] - public AdyenFeesEnum? AdyenFees { get; set; } - /// - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AdyenMarkupEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "adyenMarkup", EmitDefaultValue = false)] - public AdyenMarkupEnum? AdyenMarkup { get; set; } - /// - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - /// - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ChargebackEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2, - - /// - /// Enum DeductAccordingToSplitRatio for value: deductAccordingToSplitRatio - /// - [EnumMember(Value = "deductAccordingToSplitRatio")] - DeductAccordingToSplitRatio = 3 - - } - - - /// - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - /// - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - [DataMember(Name = "chargeback", EmitDefaultValue = false)] - public ChargebackEnum? Chargeback { get; set; } - /// - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - /// - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - [JsonConverter(typeof(StringEnumConverter))] - public enum ChargebackCostAllocationEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - /// - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - [DataMember(Name = "chargebackCostAllocation", EmitDefaultValue = false)] - public ChargebackCostAllocationEnum? ChargebackCostAllocation { get; set; } - /// - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum InterchangeEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "interchange", EmitDefaultValue = false)] - public InterchangeEnum? Interchange { get; set; } - /// - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum PaymentFeeEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "paymentFee", EmitDefaultValue = false)] - public PaymentFeeEnum? PaymentFee { get; set; } - /// - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** - /// - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** - [JsonConverter(typeof(StringEnumConverter))] - public enum RefundEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2, - - /// - /// Enum DeductAccordingToSplitRatio for value: deductAccordingToSplitRatio - /// - [EnumMember(Value = "deductAccordingToSplitRatio")] - DeductAccordingToSplitRatio = 3 - - } - - - /// - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** - /// - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio** - [DataMember(Name = "refund", EmitDefaultValue = false)] - public RefundEnum? Refund { get; set; } - /// - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - /// - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - [JsonConverter(typeof(StringEnumConverter))] - public enum RefundCostAllocationEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - /// - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount** - [DataMember(Name = "refundCostAllocation", EmitDefaultValue = false)] - public RefundCostAllocationEnum? RefundCostAllocation { get; set; } - /// - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum RemainderEnum - { - /// - /// Enum AddToLiableAccount for value: addToLiableAccount - /// - [EnumMember(Value = "addToLiableAccount")] - AddToLiableAccount = 1, - - /// - /// Enum AddToOneBalanceAccount for value: addToOneBalanceAccount - /// - [EnumMember(Value = "addToOneBalanceAccount")] - AddToOneBalanceAccount = 2 - - } - - - /// - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - [DataMember(Name = "remainder", EmitDefaultValue = false)] - public RemainderEnum? Remainder { get; set; } - /// - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum SchemeFeeEnum - { - /// - /// Enum DeductFromLiableAccount for value: deductFromLiableAccount - /// - [EnumMember(Value = "deductFromLiableAccount")] - DeductFromLiableAccount = 1, - - /// - /// Enum DeductFromOneBalanceAccount for value: deductFromOneBalanceAccount - /// - [EnumMember(Value = "deductFromOneBalanceAccount")] - DeductFromOneBalanceAccount = 2 - - } - - - /// - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - [DataMember(Name = "schemeFee", EmitDefaultValue = false)] - public SchemeFeeEnum? SchemeFee { get; set; } - /// - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** - /// - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** - [JsonConverter(typeof(StringEnumConverter))] - public enum SurchargeEnum - { - /// - /// Enum AddToLiableAccount for value: addToLiableAccount - /// - [EnumMember(Value = "addToLiableAccount")] - AddToLiableAccount = 1, - - /// - /// Enum AddToOneBalanceAccount for value: addToOneBalanceAccount - /// - [EnumMember(Value = "addToOneBalanceAccount")] - AddToOneBalanceAccount = 2 - - } - - - /// - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** - /// - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount** - [DataMember(Name = "surcharge", EmitDefaultValue = false)] - public SurchargeEnum? Surcharge { get; set; } - /// - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TipEnum - { - /// - /// Enum AddToLiableAccount for value: addToLiableAccount - /// - [EnumMember(Value = "addToLiableAccount")] - AddToLiableAccount = 1, - - /// - /// Enum AddToOneBalanceAccount for value: addToOneBalanceAccount - /// - [EnumMember(Value = "addToOneBalanceAccount")] - AddToOneBalanceAccount = 2 - - } - - - /// - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - [DataMember(Name = "tip", EmitDefaultValue = false)] - public TipEnum? Tip { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateSplitConfigurationLogicRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Deducts the acquiring fees (the aggregated amount of interchange and scheme fee) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// additionalCommission. - /// Deducts the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Deducts the fees due to Adyen (markup or commission) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Deducts the transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/what-is-interchange) from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies how and from which balance account(s) to deduct the chargeback amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**.. - /// Deducts the chargeback costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// commission (required). - /// Deducts the interchange fee from specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Deducts all transaction fees incurred by the payment from the specified balance account. The transaction fees include the acquiring fees (interchange and scheme fee), and the fees due to Adyen (markup or commission). You can book any and all these fees to different balance account by specifying other transaction fee parameters in your split configuration profile: - [`adyenCommission`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenCommission): The transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`adyenMarkup`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenMarkup): The transaction fee due to Adyen under [Interchange ++ pricing](https://www.adyen.com/knowledge-hub/interchange-fees-explained#interchange-vs-blended). - [`schemeFee`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-schemeFee): The fee paid to the card scheme for using their network. - [`interchange`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-interchange): The fee paid to the issuer for each payment transaction made with the card network. - [`adyenFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-adyenFees): The aggregated amount of Adyen's commission and markup. - [`acquiringFees`](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/(merchantId)/splitConfigurations#request-rules-splitLogic-acquiringFees): The aggregated amount of the interchange and scheme fees. If you don't include at least one transaction fee type in the `splitLogic` object, Adyen updates the payment request with the `paymentFee` parameter, booking all transaction fees to your platform's liable balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Specifies how and from which balance account(s) to deduct the refund amount. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**, **deductAccordingToSplitRatio**. - /// Deducts the refund costs from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**. - /// Books the amount left over after currency conversion to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. - /// Deducts the scheme fee from the specified balance account. Possible values: **deductFromLiableAccount**, **deductFromOneBalanceAccount**.. - /// Books the surcharge amount to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**. - /// Books the tips (gratuity) to the specified balance account. Possible values: **addToLiableAccount**, **addToOneBalanceAccount**.. - public UpdateSplitConfigurationLogicRequest(AcquiringFeesEnum? acquiringFees = default(AcquiringFeesEnum?), AdditionalCommission additionalCommission = default(AdditionalCommission), AdyenCommissionEnum? adyenCommission = default(AdyenCommissionEnum?), AdyenFeesEnum? adyenFees = default(AdyenFeesEnum?), AdyenMarkupEnum? adyenMarkup = default(AdyenMarkupEnum?), ChargebackEnum? chargeback = default(ChargebackEnum?), ChargebackCostAllocationEnum? chargebackCostAllocation = default(ChargebackCostAllocationEnum?), Commission commission = default(Commission), InterchangeEnum? interchange = default(InterchangeEnum?), PaymentFeeEnum? paymentFee = default(PaymentFeeEnum?), RefundEnum? refund = default(RefundEnum?), RefundCostAllocationEnum? refundCostAllocation = default(RefundCostAllocationEnum?), RemainderEnum? remainder = default(RemainderEnum?), SchemeFeeEnum? schemeFee = default(SchemeFeeEnum?), SurchargeEnum? surcharge = default(SurchargeEnum?), TipEnum? tip = default(TipEnum?)) - { - this.Commission = commission; - this.AcquiringFees = acquiringFees; - this.AdditionalCommission = additionalCommission; - this.AdyenCommission = adyenCommission; - this.AdyenFees = adyenFees; - this.AdyenMarkup = adyenMarkup; - this.Chargeback = chargeback; - this.ChargebackCostAllocation = chargebackCostAllocation; - this.Interchange = interchange; - this.PaymentFee = paymentFee; - this.Refund = refund; - this.RefundCostAllocation = refundCostAllocation; - this.Remainder = remainder; - this.SchemeFee = schemeFee; - this.Surcharge = surcharge; - this.Tip = tip; - } - - /// - /// Gets or Sets AdditionalCommission - /// - [DataMember(Name = "additionalCommission", EmitDefaultValue = false)] - public AdditionalCommission AdditionalCommission { get; set; } - - /// - /// Gets or Sets Commission - /// - [DataMember(Name = "commission", IsRequired = false, EmitDefaultValue = false)] - public Commission Commission { get; set; } - - /// - /// Unique identifier of the collection of split instructions that are applied when the rule conditions are met. - /// - /// Unique identifier of the collection of split instructions that are applied when the rule conditions are met. - [DataMember(Name = "splitLogicId", EmitDefaultValue = false)] - public string SplitLogicId { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateSplitConfigurationLogicRequest {\n"); - sb.Append(" AcquiringFees: ").Append(AcquiringFees).Append("\n"); - sb.Append(" AdditionalCommission: ").Append(AdditionalCommission).Append("\n"); - sb.Append(" AdyenCommission: ").Append(AdyenCommission).Append("\n"); - sb.Append(" AdyenFees: ").Append(AdyenFees).Append("\n"); - sb.Append(" AdyenMarkup: ").Append(AdyenMarkup).Append("\n"); - sb.Append(" Chargeback: ").Append(Chargeback).Append("\n"); - sb.Append(" ChargebackCostAllocation: ").Append(ChargebackCostAllocation).Append("\n"); - sb.Append(" Commission: ").Append(Commission).Append("\n"); - sb.Append(" Interchange: ").Append(Interchange).Append("\n"); - sb.Append(" PaymentFee: ").Append(PaymentFee).Append("\n"); - sb.Append(" Refund: ").Append(Refund).Append("\n"); - sb.Append(" RefundCostAllocation: ").Append(RefundCostAllocation).Append("\n"); - sb.Append(" Remainder: ").Append(Remainder).Append("\n"); - sb.Append(" SchemeFee: ").Append(SchemeFee).Append("\n"); - sb.Append(" SplitLogicId: ").Append(SplitLogicId).Append("\n"); - sb.Append(" Surcharge: ").Append(Surcharge).Append("\n"); - sb.Append(" Tip: ").Append(Tip).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateSplitConfigurationLogicRequest); - } - - /// - /// Returns true if UpdateSplitConfigurationLogicRequest instances are equal - /// - /// Instance of UpdateSplitConfigurationLogicRequest to be compared - /// Boolean - public bool Equals(UpdateSplitConfigurationLogicRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquiringFees == input.AcquiringFees || - this.AcquiringFees.Equals(input.AcquiringFees) - ) && - ( - this.AdditionalCommission == input.AdditionalCommission || - (this.AdditionalCommission != null && - this.AdditionalCommission.Equals(input.AdditionalCommission)) - ) && - ( - this.AdyenCommission == input.AdyenCommission || - this.AdyenCommission.Equals(input.AdyenCommission) - ) && - ( - this.AdyenFees == input.AdyenFees || - this.AdyenFees.Equals(input.AdyenFees) - ) && - ( - this.AdyenMarkup == input.AdyenMarkup || - this.AdyenMarkup.Equals(input.AdyenMarkup) - ) && - ( - this.Chargeback == input.Chargeback || - this.Chargeback.Equals(input.Chargeback) - ) && - ( - this.ChargebackCostAllocation == input.ChargebackCostAllocation || - this.ChargebackCostAllocation.Equals(input.ChargebackCostAllocation) - ) && - ( - this.Commission == input.Commission || - (this.Commission != null && - this.Commission.Equals(input.Commission)) - ) && - ( - this.Interchange == input.Interchange || - this.Interchange.Equals(input.Interchange) - ) && - ( - this.PaymentFee == input.PaymentFee || - this.PaymentFee.Equals(input.PaymentFee) - ) && - ( - this.Refund == input.Refund || - this.Refund.Equals(input.Refund) - ) && - ( - this.RefundCostAllocation == input.RefundCostAllocation || - this.RefundCostAllocation.Equals(input.RefundCostAllocation) - ) && - ( - this.Remainder == input.Remainder || - this.Remainder.Equals(input.Remainder) - ) && - ( - this.SchemeFee == input.SchemeFee || - this.SchemeFee.Equals(input.SchemeFee) - ) && - ( - this.SplitLogicId == input.SplitLogicId || - (this.SplitLogicId != null && - this.SplitLogicId.Equals(input.SplitLogicId)) - ) && - ( - this.Surcharge == input.Surcharge || - this.Surcharge.Equals(input.Surcharge) - ) && - ( - this.Tip == input.Tip || - this.Tip.Equals(input.Tip) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AcquiringFees.GetHashCode(); - if (this.AdditionalCommission != null) - { - hashCode = (hashCode * 59) + this.AdditionalCommission.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AdyenCommission.GetHashCode(); - hashCode = (hashCode * 59) + this.AdyenFees.GetHashCode(); - hashCode = (hashCode * 59) + this.AdyenMarkup.GetHashCode(); - hashCode = (hashCode * 59) + this.Chargeback.GetHashCode(); - hashCode = (hashCode * 59) + this.ChargebackCostAllocation.GetHashCode(); - if (this.Commission != null) - { - hashCode = (hashCode * 59) + this.Commission.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Interchange.GetHashCode(); - hashCode = (hashCode * 59) + this.PaymentFee.GetHashCode(); - hashCode = (hashCode * 59) + this.Refund.GetHashCode(); - hashCode = (hashCode * 59) + this.RefundCostAllocation.GetHashCode(); - hashCode = (hashCode * 59) + this.Remainder.GetHashCode(); - hashCode = (hashCode * 59) + this.SchemeFee.GetHashCode(); - if (this.SplitLogicId != null) - { - hashCode = (hashCode * 59) + this.SplitLogicId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Surcharge.GetHashCode(); - hashCode = (hashCode * 59) + this.Tip.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateSplitConfigurationRequest.cs b/Adyen/Model/Management/UpdateSplitConfigurationRequest.cs deleted file mode 100644 index 9a257ce0f..000000000 --- a/Adyen/Model/Management/UpdateSplitConfigurationRequest.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateSplitConfigurationRequest - /// - [DataContract(Name = "UpdateSplitConfigurationRequest")] - public partial class UpdateSplitConfigurationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateSplitConfigurationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Your description for the split configuration. (required). - public UpdateSplitConfigurationRequest(string description = default(string)) - { - this.Description = description; - } - - /// - /// Your description for the split configuration. - /// - /// Your description for the split configuration. - [DataMember(Name = "description", IsRequired = false, EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateSplitConfigurationRequest {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateSplitConfigurationRequest); - } - - /// - /// Returns true if UpdateSplitConfigurationRequest instances are equal - /// - /// Instance of UpdateSplitConfigurationRequest to be compared - /// Boolean - public bool Equals(UpdateSplitConfigurationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 300) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 300.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.cs b/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.cs deleted file mode 100644 index a7dfe7248..000000000 --- a/Adyen/Model/Management/UpdateSplitConfigurationRuleRequest.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateSplitConfigurationRuleRequest - /// - [DataContract(Name = "UpdateSplitConfigurationRuleRequest")] - public partial class UpdateSplitConfigurationRuleRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateSplitConfigurationRuleRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). (required). - /// The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY**. - /// The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. (required). - /// The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. (required). - public UpdateSplitConfigurationRuleRequest(string currency = default(string), string fundingSource = default(string), string paymentMethod = default(string), string shopperInteraction = default(string)) - { - this.Currency = currency; - this.PaymentMethod = paymentMethod; - this.ShopperInteraction = shopperInteraction; - this.FundingSource = fundingSource; - } - - /// - /// The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - /// - /// The currency condition that defines whether the split logic applies. Its value must be a three-character [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** - /// - /// The funding source of the payment method. This only applies to card transactions. Possible values: * **credit** * **debit** * **prepaid** * **deferred_debit** * **charged** * **ANY** - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public string FundingSource { get; set; } - - /// - /// The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. - /// - /// The payment method condition that defines whether the split logic applies. Possible values: * [Payment method variant](https://docs.adyen.com/development-resources/paymentmethodvariant): Apply the split logic for a specific payment method. * **ANY**: Apply the split logic for all available payment methods. - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public string PaymentMethod { get; set; } - - /// - /// The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. - /// - /// The sales channel condition that defines whether the split logic applies. Possible values: * **Ecommerce**: Online transactions where the cardholder is present. * **ContAuth**: Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). * **Moto**: Mail-order and telephone-order transactions where the customer is in contact with the merchant via email or telephone. * **POS**: Point-of-sale transactions where the customer is physically present to make a payment using a secure payment terminal. * **ANY**: All sales channels. - [DataMember(Name = "shopperInteraction", IsRequired = false, EmitDefaultValue = false)] - public string ShopperInteraction { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateSplitConfigurationRuleRequest {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateSplitConfigurationRuleRequest); - } - - /// - /// Returns true if UpdateSplitConfigurationRuleRequest instances are equal - /// - /// Instance of UpdateSplitConfigurationRuleRequest to be compared - /// Boolean - public bool Equals(UpdateSplitConfigurationRuleRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.FundingSource == input.FundingSource || - (this.FundingSource != null && - this.FundingSource.Equals(input.FundingSource)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - (this.ShopperInteraction != null && - this.ShopperInteraction.Equals(input.ShopperInteraction)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.FundingSource != null) - { - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.ShopperInteraction != null) - { - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UpdateStoreRequest.cs b/Adyen/Model/Management/UpdateStoreRequest.cs deleted file mode 100644 index 553664e04..000000000 --- a/Adyen/Model/Management/UpdateStoreRequest.cs +++ /dev/null @@ -1,265 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UpdateStoreRequest - /// - [DataContract(Name = "UpdateStoreRequest")] - public partial class UpdateStoreRequest : IEquatable, IValidatableObject - { - /// - /// The status of the store. Possible values are: - **active**: This value is assigned automatically when a store is created. - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can't process payments. You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**. Once **closed**, a store can't be reopened. - /// - /// The status of the store. Possible values are: - **active**: This value is assigned automatically when a store is created. - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can't process payments. You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**. Once **closed**, a store can't be reopened. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Closed for value: closed - /// - [EnumMember(Value = "closed")] - Closed = 2, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 3 - - } - - - /// - /// The status of the store. Possible values are: - **active**: This value is assigned automatically when a store is created. - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can't process payments. You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**. Once **closed**, a store can't be reopened. - /// - /// The status of the store. Possible values are: - **active**: This value is assigned automatically when a store is created. - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can't process payments. You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**. Once **closed**, a store can't be reopened. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with.. - /// The description of the store.. - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. . - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. . - /// splitConfiguration. - /// The status of the store. Possible values are: - **active**: This value is assigned automatically when a store is created. - **inactive**: The maximum [transaction limits and number of Store-and-Forward transactions](https://docs.adyen.com/point-of-sale/determine-account-structure/configure-features#payment-features) for the store are set to 0. This blocks new transactions, but captures are still possible. - **closed**: The terminals of the store are reassigned to the merchant inventory, so they can't process payments. You can change the status from **active** to **inactive**, and from **inactive** to **active** or **closed**. Once **closed**, a store can't be reopened.. - public UpdateStoreRequest(UpdatableAddress address = default(UpdatableAddress), List businessLineIds = default(List), string description = default(string), string externalReferenceId = default(string), string phoneNumber = default(string), StoreSplitConfiguration splitConfiguration = default(StoreSplitConfiguration), StatusEnum? status = default(StatusEnum?)) - { - this.Address = address; - this.BusinessLineIds = businessLineIds; - this.Description = description; - this.ExternalReferenceId = externalReferenceId; - this.PhoneNumber = phoneNumber; - this.SplitConfiguration = splitConfiguration; - this.Status = status; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public UpdatableAddress Address { get; set; } - - /// - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with. - /// - /// The unique identifiers of the [business lines](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/businessLines__resParam_id) that the store is associated with. - [DataMember(Name = "businessLineIds", EmitDefaultValue = false)] - public List BusinessLineIds { get; set; } - - /// - /// The description of the store. - /// - /// The description of the store. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. - /// - /// The unique identifier of the store, used by certain payment methods and tax authorities. Required for CNPJ in Brazil, in the format 00.000.000/0000-00 separated by dots, slashes, hyphens, or without separators. Optional for SIRET in France, up to 14 digits. Optional for Zip in Australia, up to 50 digits. - [DataMember(Name = "externalReferenceId", EmitDefaultValue = false)] - public string ExternalReferenceId { get; set; } - - /// - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. - /// - /// The phone number of the store, including '+' and country code in the [E.164](https://en.wikipedia.org/wiki/E.164) format. If passed in a different format, we convert and validate the phone number against E.164. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// Gets or Sets SplitConfiguration - /// - [DataMember(Name = "splitConfiguration", EmitDefaultValue = false)] - public StoreSplitConfiguration SplitConfiguration { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateStoreRequest {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BusinessLineIds: ").Append(BusinessLineIds).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ExternalReferenceId: ").Append(ExternalReferenceId).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" SplitConfiguration: ").Append(SplitConfiguration).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateStoreRequest); - } - - /// - /// Returns true if UpdateStoreRequest instances are equal - /// - /// Instance of UpdateStoreRequest to be compared - /// Boolean - public bool Equals(UpdateStoreRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BusinessLineIds == input.BusinessLineIds || - this.BusinessLineIds != null && - input.BusinessLineIds != null && - this.BusinessLineIds.SequenceEqual(input.BusinessLineIds) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExternalReferenceId == input.ExternalReferenceId || - (this.ExternalReferenceId != null && - this.ExternalReferenceId.Equals(input.ExternalReferenceId)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.SplitConfiguration == input.SplitConfiguration || - (this.SplitConfiguration != null && - this.SplitConfiguration.Equals(input.SplitConfiguration)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BusinessLineIds != null) - { - hashCode = (hashCode * 59) + this.BusinessLineIds.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExternalReferenceId != null) - { - hashCode = (hashCode * 59) + this.ExternalReferenceId.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.SplitConfiguration != null) - { - hashCode = (hashCode * 59) + this.SplitConfiguration.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UploadAndroidAppResponse.cs b/Adyen/Model/Management/UploadAndroidAppResponse.cs deleted file mode 100644 index 0273cbc18..000000000 --- a/Adyen/Model/Management/UploadAndroidAppResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UploadAndroidAppResponse - /// - [DataContract(Name = "UploadAndroidAppResponse")] - public partial class UploadAndroidAppResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the uploaded Android app.. - public UploadAndroidAppResponse(string id = default(string)) - { - this.Id = id; - } - - /// - /// The unique identifier of the uploaded Android app. - /// - /// The unique identifier of the uploaded Android app. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UploadAndroidAppResponse {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UploadAndroidAppResponse); - } - - /// - /// Returns true if UploadAndroidAppResponse instances are equal - /// - /// Instance of UploadAndroidAppResponse to be compared - /// Boolean - public bool Equals(UploadAndroidAppResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/UploadAndroidCertificateResponse.cs b/Adyen/Model/Management/UploadAndroidCertificateResponse.cs deleted file mode 100644 index 3aa1079fd..000000000 --- a/Adyen/Model/Management/UploadAndroidCertificateResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// UploadAndroidCertificateResponse - /// - [DataContract(Name = "UploadAndroidCertificateResponse")] - public partial class UploadAndroidCertificateResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the uploaded Android certificate.. - public UploadAndroidCertificateResponse(string id = default(string)) - { - this.Id = id; - } - - /// - /// The unique identifier of the uploaded Android certificate. - /// - /// The unique identifier of the uploaded Android certificate. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UploadAndroidCertificateResponse {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UploadAndroidCertificateResponse); - } - - /// - /// Returns true if UploadAndroidCertificateResponse instances are equal - /// - /// Instance of UploadAndroidCertificateResponse to be compared - /// Boolean - public bool Equals(UploadAndroidCertificateResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Url.cs b/Adyen/Model/Management/Url.cs deleted file mode 100644 index 1e0eb0baf..000000000 --- a/Adyen/Model/Management/Url.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Url - /// - [DataContract(Name = "Url")] - public partial class Url : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates if the message sent to this URL should be encrypted.. - /// The password for authentication of the notifications.. - /// The URL in the format: http(s)://domain.com.. - /// The username for authentication of the notifications.. - public Url(bool? encrypted = default(bool?), string password = default(string), string url = default(string), string username = default(string)) - { - this.Encrypted = encrypted; - this.Password = password; - this._Url = url; - this.Username = username; - } - - /// - /// Indicates if the message sent to this URL should be encrypted. - /// - /// Indicates if the message sent to this URL should be encrypted. - [DataMember(Name = "encrypted", EmitDefaultValue = false)] - public bool? Encrypted { get; set; } - - /// - /// The password for authentication of the notifications. - /// - /// The password for authentication of the notifications. - [DataMember(Name = "password", EmitDefaultValue = false)] - public string Password { get; set; } - - /// - /// The URL in the format: http(s)://domain.com. - /// - /// The URL in the format: http(s)://domain.com. - [DataMember(Name = "url", EmitDefaultValue = false)] - public string _Url { get; set; } - - /// - /// The username for authentication of the notifications. - /// - /// The username for authentication of the notifications. - [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Url {\n"); - sb.Append(" Encrypted: ").Append(Encrypted).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" _Url: ").Append(_Url).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Url); - } - - /// - /// Returns true if Url instances are equal - /// - /// Instance of Url to be compared - /// Boolean - public bool Equals(Url input) - { - if (input == null) - { - return false; - } - return - ( - this.Encrypted == input.Encrypted || - this.Encrypted.Equals(input.Encrypted) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this._Url == input._Url || - (this._Url != null && - this._Url.Equals(input._Url)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Encrypted.GetHashCode(); - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this._Url != null) - { - hashCode = (hashCode * 59) + this._Url.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/User.cs b/Adyen/Model/Management/User.cs deleted file mode 100644 index e9bf6e66d..000000000 --- a/Adyen/Model/Management/User.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// User - /// - [DataContract(Name = "User")] - public partial class User : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected User() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user.. - /// Indicates whether this user is active.. - /// Set of apps available to this user. - /// The email address of the user. (required). - /// The unique identifier of the user. (required). - /// name. - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. (required). - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. (required). - /// The username for this user. (required). - public User(Links links = default(Links), List accountGroups = default(List), bool? active = default(bool?), List apps = default(List), string email = default(string), string id = default(string), Name name = default(Name), List roles = default(List), string timeZoneCode = default(string), string username = default(string)) - { - this.Email = email; - this.Id = id; - this.Roles = roles; - this.TimeZoneCode = timeZoneCode; - this.Username = username; - this.Links = links; - this.AccountGroups = accountGroups; - this.Active = active; - this.Apps = apps; - this.Name = name; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - /// - /// The list of [account groups](https://docs.adyen.com/account/account-structure#account-groups) associated with this user. - [DataMember(Name = "accountGroups", EmitDefaultValue = false)] - public List AccountGroups { get; set; } - - /// - /// Indicates whether this user is active. - /// - /// Indicates whether this user is active. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Set of apps available to this user - /// - /// Set of apps available to this user - [DataMember(Name = "apps", EmitDefaultValue = false)] - public List Apps { get; set; } - - /// - /// The email address of the user. - /// - /// The email address of the user. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The unique identifier of the user. - /// - /// The unique identifier of the user. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public Name Name { get; set; } - - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - /// - /// The list of [roles](https://docs.adyen.com/account/user-roles) for this user. - [DataMember(Name = "roles", IsRequired = false, EmitDefaultValue = false)] - public List Roles { get; set; } - - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - /// - /// The [tz database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) of the time zone of the user. For example, **Europe/Amsterdam**. - [DataMember(Name = "timeZoneCode", IsRequired = false, EmitDefaultValue = false)] - public string TimeZoneCode { get; set; } - - /// - /// The username for this user. - /// - /// The username for this user. - [DataMember(Name = "username", IsRequired = false, EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class User {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" AccountGroups: ").Append(AccountGroups).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" Apps: ").Append(Apps).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Roles: ").Append(Roles).Append("\n"); - sb.Append(" TimeZoneCode: ").Append(TimeZoneCode).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as User); - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.AccountGroups == input.AccountGroups || - this.AccountGroups != null && - input.AccountGroups != null && - this.AccountGroups.SequenceEqual(input.AccountGroups) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.Apps == input.Apps || - this.Apps != null && - input.Apps != null && - this.Apps.SequenceEqual(input.Apps) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Roles == input.Roles || - this.Roles != null && - input.Roles != null && - this.Roles.SequenceEqual(input.Roles) - ) && - ( - this.TimeZoneCode == input.TimeZoneCode || - (this.TimeZoneCode != null && - this.TimeZoneCode.Equals(input.TimeZoneCode)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.AccountGroups != null) - { - hashCode = (hashCode * 59) + this.AccountGroups.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.Apps != null) - { - hashCode = (hashCode * 59) + this.Apps.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Roles != null) - { - hashCode = (hashCode * 59) + this.Roles.GetHashCode(); - } - if (this.TimeZoneCode != null) - { - hashCode = (hashCode * 59) + this.TimeZoneCode.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Username (string) maxLength - if (this.Username != null && this.Username.Length > 255) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be less than 255.", new [] { "Username" }); - } - - // Username (string) minLength - if (this.Username != null && this.Username.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Username, length must be greater than 1.", new [] { "Username" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Management/VippsInfo.cs b/Adyen/Model/Management/VippsInfo.cs deleted file mode 100644 index 1069f7a70..000000000 --- a/Adyen/Model/Management/VippsInfo.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// VippsInfo - /// - [DataContract(Name = "VippsInfo")] - public partial class VippsInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected VippsInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// Vipps logo. Format: Base64-encoded string. (required). - /// Vipps subscription cancel url (required in case of [recurring payments](https://docs.adyen.com/online-payments/tokenization)). - public VippsInfo(string logo = default(string), string subscriptionCancelUrl = default(string)) - { - this.Logo = logo; - this.SubscriptionCancelUrl = subscriptionCancelUrl; - } - - /// - /// Vipps logo. Format: Base64-encoded string. - /// - /// Vipps logo. Format: Base64-encoded string. - [DataMember(Name = "logo", IsRequired = false, EmitDefaultValue = false)] - public string Logo { get; set; } - - /// - /// Vipps subscription cancel url (required in case of [recurring payments](https://docs.adyen.com/online-payments/tokenization)) - /// - /// Vipps subscription cancel url (required in case of [recurring payments](https://docs.adyen.com/online-payments/tokenization)) - [DataMember(Name = "subscriptionCancelUrl", EmitDefaultValue = false)] - public string SubscriptionCancelUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VippsInfo {\n"); - sb.Append(" Logo: ").Append(Logo).Append("\n"); - sb.Append(" SubscriptionCancelUrl: ").Append(SubscriptionCancelUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VippsInfo); - } - - /// - /// Returns true if VippsInfo instances are equal - /// - /// Instance of VippsInfo to be compared - /// Boolean - public bool Equals(VippsInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Logo == input.Logo || - (this.Logo != null && - this.Logo.Equals(input.Logo)) - ) && - ( - this.SubscriptionCancelUrl == input.SubscriptionCancelUrl || - (this.SubscriptionCancelUrl != null && - this.SubscriptionCancelUrl.Equals(input.SubscriptionCancelUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Logo != null) - { - hashCode = (hashCode * 59) + this.Logo.GetHashCode(); - } - if (this.SubscriptionCancelUrl != null) - { - hashCode = (hashCode * 59) + this.SubscriptionCancelUrl.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/WeChatPayInfo.cs b/Adyen/Model/Management/WeChatPayInfo.cs deleted file mode 100644 index 52f52447f..000000000 --- a/Adyen/Model/Management/WeChatPayInfo.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// WeChatPayInfo - /// - [DataContract(Name = "WeChatPayInfo")] - public partial class WeChatPayInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected WeChatPayInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the contact person from merchant support. (required). - /// The email address of merchant support. (required). - public WeChatPayInfo(string contactPersonName = default(string), string email = default(string)) - { - this.ContactPersonName = contactPersonName; - this.Email = email; - } - - /// - /// The name of the contact person from merchant support. - /// - /// The name of the contact person from merchant support. - [DataMember(Name = "contactPersonName", IsRequired = false, EmitDefaultValue = false)] - public string ContactPersonName { get; set; } - - /// - /// The email address of merchant support. - /// - /// The email address of merchant support. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WeChatPayInfo {\n"); - sb.Append(" ContactPersonName: ").Append(ContactPersonName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WeChatPayInfo); - } - - /// - /// Returns true if WeChatPayInfo instances are equal - /// - /// Instance of WeChatPayInfo to be compared - /// Boolean - public bool Equals(WeChatPayInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ContactPersonName == input.ContactPersonName || - (this.ContactPersonName != null && - this.ContactPersonName.Equals(input.ContactPersonName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ContactPersonName != null) - { - hashCode = (hashCode * 59) + this.ContactPersonName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/WeChatPayPosInfo.cs b/Adyen/Model/Management/WeChatPayPosInfo.cs deleted file mode 100644 index 3de20a6ea..000000000 --- a/Adyen/Model/Management/WeChatPayPosInfo.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// WeChatPayPosInfo - /// - [DataContract(Name = "WeChatPayPosInfo")] - public partial class WeChatPayPosInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected WeChatPayPosInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the contact person from merchant support. (required). - /// The email address of merchant support. (required). - public WeChatPayPosInfo(string contactPersonName = default(string), string email = default(string)) - { - this.ContactPersonName = contactPersonName; - this.Email = email; - } - - /// - /// The name of the contact person from merchant support. - /// - /// The name of the contact person from merchant support. - [DataMember(Name = "contactPersonName", IsRequired = false, EmitDefaultValue = false)] - public string ContactPersonName { get; set; } - - /// - /// The email address of merchant support. - /// - /// The email address of merchant support. - [DataMember(Name = "email", IsRequired = false, EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WeChatPayPosInfo {\n"); - sb.Append(" ContactPersonName: ").Append(ContactPersonName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WeChatPayPosInfo); - } - - /// - /// Returns true if WeChatPayPosInfo instances are equal - /// - /// Instance of WeChatPayPosInfo to be compared - /// Boolean - public bool Equals(WeChatPayPosInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.ContactPersonName == input.ContactPersonName || - (this.ContactPersonName != null && - this.ContactPersonName.Equals(input.ContactPersonName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ContactPersonName != null) - { - hashCode = (hashCode * 59) + this.ContactPersonName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/Webhook.cs b/Adyen/Model/Management/Webhook.cs deleted file mode 100644 index bda9e2cec..000000000 --- a/Adyen/Model/Management/Webhook.cs +++ /dev/null @@ -1,590 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// Webhook - /// - [DataContract(Name = "Webhook")] - public partial class Webhook : IEquatable, IValidatableObject - { - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [JsonConverter(typeof(StringEnumConverter))] - public enum CommunicationFormatEnum - { - /// - /// Enum Http for value: http - /// - [EnumMember(Value = "http")] - Http = 1, - - /// - /// Enum Json for value: json - /// - [EnumMember(Value = "json")] - Json = 2, - - /// - /// Enum Soap for value: soap - /// - [EnumMember(Value = "soap")] - Soap = 3 - - } - - - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - /// - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** - [DataMember(Name = "communicationFormat", IsRequired = false, EmitDefaultValue = false)] - public CommunicationFormatEnum CommunicationFormat { get; set; } - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [JsonConverter(typeof(StringEnumConverter))] - public enum EncryptionProtocolEnum - { - /// - /// Enum HTTP for value: HTTP - /// - [EnumMember(Value = "HTTP")] - HTTP = 1, - - /// - /// Enum TLSv12 for value: TLSv1.2 - /// - [EnumMember(Value = "TLSv1.2")] - TLSv12 = 2, - - /// - /// Enum TLSv13 for value: TLSv1.3 - /// - [EnumMember(Value = "TLSv1.3")] - TLSv13 = 3 - - } - - - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - /// - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**. - [DataMember(Name = "encryptionProtocol", EmitDefaultValue = false)] - public EncryptionProtocolEnum? EncryptionProtocol { get; set; } - /// - /// Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. - /// - /// Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. - [JsonConverter(typeof(StringEnumConverter))] - public enum FilterMerchantAccountTypeEnum - { - /// - /// Enum AllAccounts for value: allAccounts - /// - [EnumMember(Value = "allAccounts")] - AllAccounts = 1, - - /// - /// Enum ExcludeAccounts for value: excludeAccounts - /// - [EnumMember(Value = "excludeAccounts")] - ExcludeAccounts = 2, - - /// - /// Enum IncludeAccounts for value: includeAccounts - /// - [EnumMember(Value = "includeAccounts")] - IncludeAccounts = 3 - - } - - - /// - /// Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. - /// - /// Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`. - [DataMember(Name = "filterMerchantAccountType", EmitDefaultValue = false)] - public FilterMerchantAccountTypeEnum? FilterMerchantAccountType { get; set; } - /// - /// Network type for Terminal API details webhooks. - /// - /// Network type for Terminal API details webhooks. - [JsonConverter(typeof(StringEnumConverter))] - public enum NetworkTypeEnum - { - /// - /// Enum Local for value: local - /// - [EnumMember(Value = "local")] - Local = 1, - - /// - /// Enum Public for value: public - /// - [EnumMember(Value = "public")] - Public = 2 - - } - - - /// - /// Network type for Terminal API details webhooks. - /// - /// Network type for Terminal API details webhooks. - [DataMember(Name = "networkType", EmitDefaultValue = false)] - public NetworkTypeEnum? NetworkType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Webhook() { } - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Indicates if expired SSL certificates are accepted. Default value: **false**.. - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**.. - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**.. - /// Reference to the account the webook is set on.. - /// Indicates if the webhook configuration is active. The field must be **true** for you to receive webhooks about events related an account. (required). - /// additionalSettings. - /// The alias of our SSL certificate. When you receive a notification from us, the alias from the HMAC signature will match this alias.. - /// Format or protocol for receiving webhooks. Possible values: * **soap** * **http** * **json** (required). - /// Your description for this webhook configuration.. - /// SSL version to access the public webhook URL specified in the `url` field. Possible values: * **TLSv1.3** * **TLSv1.2** * **HTTP** - Only allowed on Test environment. If not specified, the webhook will use `sslVersion`: **TLSv1.2**.. - /// Shows how merchant accounts are included in company-level webhooks. Possible values: * **includeAccounts** * **excludeAccounts** * **allAccounts**: Includes all merchant accounts, and does not require specifying `filterMerchantAccounts`.. - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**.. - /// Indicates if the webhook configuration has errors that need troubleshooting. If the value is **true**, troubleshoot the configuration using the [testing endpoint](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookid}/test).. - /// Indicates if the webhook is password protected.. - /// The [checksum](https://en.wikipedia.org/wiki/Key_checksum_value) of the HMAC key generated for this webhook. You can use this value to uniquely identify the HMAC key configured for this webhook.. - /// Unique identifier for this webhook.. - /// Network type for Terminal API details webhooks.. - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**.. - /// The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). (required). - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. (required). - /// Username to access the webhook URL.. - public Webhook(WebhookLinks links = default(WebhookLinks), bool? acceptsExpiredCertificate = default(bool?), bool? acceptsSelfSignedCertificate = default(bool?), bool? acceptsUntrustedRootCertificate = default(bool?), string accountReference = default(string), bool? active = default(bool?), AdditionalSettingsResponse additionalSettings = default(AdditionalSettingsResponse), string certificateAlias = default(string), CommunicationFormatEnum communicationFormat = default(CommunicationFormatEnum), string description = default(string), EncryptionProtocolEnum? encryptionProtocol = default(EncryptionProtocolEnum?), FilterMerchantAccountTypeEnum? filterMerchantAccountType = default(FilterMerchantAccountTypeEnum?), List filterMerchantAccounts = default(List), bool? hasError = default(bool?), bool? hasPassword = default(bool?), string hmacKeyCheckValue = default(string), string id = default(string), NetworkTypeEnum? networkType = default(NetworkTypeEnum?), bool? populateSoapActionHeader = default(bool?), string type = default(string), string url = default(string), string username = default(string)) - { - this.Active = active; - this.CommunicationFormat = communicationFormat; - this.Type = type; - this.Url = url; - this.Links = links; - this.AcceptsExpiredCertificate = acceptsExpiredCertificate; - this.AcceptsSelfSignedCertificate = acceptsSelfSignedCertificate; - this.AcceptsUntrustedRootCertificate = acceptsUntrustedRootCertificate; - this.AccountReference = accountReference; - this.AdditionalSettings = additionalSettings; - this.CertificateAlias = certificateAlias; - this.Description = description; - this.EncryptionProtocol = encryptionProtocol; - this.FilterMerchantAccountType = filterMerchantAccountType; - this.FilterMerchantAccounts = filterMerchantAccounts; - this.HasError = hasError; - this.HasPassword = hasPassword; - this.HmacKeyCheckValue = hmacKeyCheckValue; - this.Id = id; - this.NetworkType = networkType; - this.PopulateSoapActionHeader = populateSoapActionHeader; - this.Username = username; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public WebhookLinks Links { get; set; } - - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if expired SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsExpiredCertificate", EmitDefaultValue = false)] - public bool? AcceptsExpiredCertificate { get; set; } - - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if self-signed SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsSelfSignedCertificate", EmitDefaultValue = false)] - public bool? AcceptsSelfSignedCertificate { get; set; } - - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - /// - /// Indicates if untrusted SSL certificates are accepted. Default value: **false**. - [DataMember(Name = "acceptsUntrustedRootCertificate", EmitDefaultValue = false)] - public bool? AcceptsUntrustedRootCertificate { get; set; } - - /// - /// Reference to the account the webook is set on. - /// - /// Reference to the account the webook is set on. - [DataMember(Name = "accountReference", EmitDefaultValue = false)] - public string AccountReference { get; set; } - - /// - /// Indicates if the webhook configuration is active. The field must be **true** for you to receive webhooks about events related an account. - /// - /// Indicates if the webhook configuration is active. The field must be **true** for you to receive webhooks about events related an account. - [DataMember(Name = "active", IsRequired = false, EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// Gets or Sets AdditionalSettings - /// - [DataMember(Name = "additionalSettings", EmitDefaultValue = false)] - public AdditionalSettingsResponse AdditionalSettings { get; set; } - - /// - /// The alias of our SSL certificate. When you receive a notification from us, the alias from the HMAC signature will match this alias. - /// - /// The alias of our SSL certificate. When you receive a notification from us, the alias from the HMAC signature will match this alias. - [DataMember(Name = "certificateAlias", EmitDefaultValue = false)] - public string CertificateAlias { get; set; } - - /// - /// Your description for this webhook configuration. - /// - /// Your description for this webhook configuration. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. - /// - /// A list of merchant account names that are included or excluded from receiving the webhook. Inclusion or exclusion is based on the value defined for `filterMerchantAccountType`. Required if `filterMerchantAccountType` is either: * **includeAccounts** * **excludeAccounts** Not needed for `filterMerchantAccountType`: **allAccounts**. - [DataMember(Name = "filterMerchantAccounts", EmitDefaultValue = false)] - public List FilterMerchantAccounts { get; set; } - - /// - /// Indicates if the webhook configuration has errors that need troubleshooting. If the value is **true**, troubleshoot the configuration using the [testing endpoint](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookid}/test). - /// - /// Indicates if the webhook configuration has errors that need troubleshooting. If the value is **true**, troubleshoot the configuration using the [testing endpoint](https://docs.adyen.com/api-explorer/#/ManagementService/v1/post/companies/{companyId}/webhooks/{webhookid}/test). - [DataMember(Name = "hasError", EmitDefaultValue = false)] - public bool? HasError { get; set; } - - /// - /// Indicates if the webhook is password protected. - /// - /// Indicates if the webhook is password protected. - [DataMember(Name = "hasPassword", EmitDefaultValue = false)] - public bool? HasPassword { get; set; } - - /// - /// The [checksum](https://en.wikipedia.org/wiki/Key_checksum_value) of the HMAC key generated for this webhook. You can use this value to uniquely identify the HMAC key configured for this webhook. - /// - /// The [checksum](https://en.wikipedia.org/wiki/Key_checksum_value) of the HMAC key generated for this webhook. You can use this value to uniquely identify the HMAC key configured for this webhook. - [DataMember(Name = "hmacKeyCheckValue", EmitDefaultValue = false)] - public string HmacKeyCheckValue { get; set; } - - /// - /// Unique identifier for this webhook. - /// - /// Unique identifier for this webhook. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - /// - /// Indicates if the SOAP action header needs to be populated. Default value: **false**. Only applies if `communicationFormat`: **soap**. - [DataMember(Name = "populateSoapActionHeader", EmitDefaultValue = false)] - public bool? PopulateSoapActionHeader { get; set; } - - /// - /// The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). - /// - /// The type of webhook. Possible values are: - **standard** - **account-settings-notification** - **banktransfer-notification** - **boletobancario-notification** - **directdebit-notification** - **ach-notification-of-change-notification** - **pending-notification** - **ideal-notification** - **ideal-pending-notification** - **report-notification** - **terminal-api-notification** - **terminal-settings** - **terminal-boarding** Find out more about [standard notification webhooks](https://docs.adyen.com/development-resources/webhooks/understand-notifications#event-codes) and [other types of notifications](https://docs.adyen.com/development-resources/webhooks/understand-notifications#other-notifications). - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - /// - /// Public URL where webhooks will be sent, for example **https://www.domain.com/webhook-endpoint**. - [DataMember(Name = "url", IsRequired = false, EmitDefaultValue = false)] - public string Url { get; set; } - - /// - /// Username to access the webhook URL. - /// - /// Username to access the webhook URL. - [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Webhook {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" AcceptsExpiredCertificate: ").Append(AcceptsExpiredCertificate).Append("\n"); - sb.Append(" AcceptsSelfSignedCertificate: ").Append(AcceptsSelfSignedCertificate).Append("\n"); - sb.Append(" AcceptsUntrustedRootCertificate: ").Append(AcceptsUntrustedRootCertificate).Append("\n"); - sb.Append(" AccountReference: ").Append(AccountReference).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" AdditionalSettings: ").Append(AdditionalSettings).Append("\n"); - sb.Append(" CertificateAlias: ").Append(CertificateAlias).Append("\n"); - sb.Append(" CommunicationFormat: ").Append(CommunicationFormat).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EncryptionProtocol: ").Append(EncryptionProtocol).Append("\n"); - sb.Append(" FilterMerchantAccountType: ").Append(FilterMerchantAccountType).Append("\n"); - sb.Append(" FilterMerchantAccounts: ").Append(FilterMerchantAccounts).Append("\n"); - sb.Append(" HasError: ").Append(HasError).Append("\n"); - sb.Append(" HasPassword: ").Append(HasPassword).Append("\n"); - sb.Append(" HmacKeyCheckValue: ").Append(HmacKeyCheckValue).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" NetworkType: ").Append(NetworkType).Append("\n"); - sb.Append(" PopulateSoapActionHeader: ").Append(PopulateSoapActionHeader).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Webhook); - } - - /// - /// Returns true if Webhook instances are equal - /// - /// Instance of Webhook to be compared - /// Boolean - public bool Equals(Webhook input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.AcceptsExpiredCertificate == input.AcceptsExpiredCertificate || - this.AcceptsExpiredCertificate.Equals(input.AcceptsExpiredCertificate) - ) && - ( - this.AcceptsSelfSignedCertificate == input.AcceptsSelfSignedCertificate || - this.AcceptsSelfSignedCertificate.Equals(input.AcceptsSelfSignedCertificate) - ) && - ( - this.AcceptsUntrustedRootCertificate == input.AcceptsUntrustedRootCertificate || - this.AcceptsUntrustedRootCertificate.Equals(input.AcceptsUntrustedRootCertificate) - ) && - ( - this.AccountReference == input.AccountReference || - (this.AccountReference != null && - this.AccountReference.Equals(input.AccountReference)) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.AdditionalSettings == input.AdditionalSettings || - (this.AdditionalSettings != null && - this.AdditionalSettings.Equals(input.AdditionalSettings)) - ) && - ( - this.CertificateAlias == input.CertificateAlias || - (this.CertificateAlias != null && - this.CertificateAlias.Equals(input.CertificateAlias)) - ) && - ( - this.CommunicationFormat == input.CommunicationFormat || - this.CommunicationFormat.Equals(input.CommunicationFormat) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EncryptionProtocol == input.EncryptionProtocol || - this.EncryptionProtocol.Equals(input.EncryptionProtocol) - ) && - ( - this.FilterMerchantAccountType == input.FilterMerchantAccountType || - this.FilterMerchantAccountType.Equals(input.FilterMerchantAccountType) - ) && - ( - this.FilterMerchantAccounts == input.FilterMerchantAccounts || - this.FilterMerchantAccounts != null && - input.FilterMerchantAccounts != null && - this.FilterMerchantAccounts.SequenceEqual(input.FilterMerchantAccounts) - ) && - ( - this.HasError == input.HasError || - this.HasError.Equals(input.HasError) - ) && - ( - this.HasPassword == input.HasPassword || - this.HasPassword.Equals(input.HasPassword) - ) && - ( - this.HmacKeyCheckValue == input.HmacKeyCheckValue || - (this.HmacKeyCheckValue != null && - this.HmacKeyCheckValue.Equals(input.HmacKeyCheckValue)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.NetworkType == input.NetworkType || - this.NetworkType.Equals(input.NetworkType) - ) && - ( - this.PopulateSoapActionHeader == input.PopulateSoapActionHeader || - this.PopulateSoapActionHeader.Equals(input.PopulateSoapActionHeader) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AcceptsExpiredCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsSelfSignedCertificate.GetHashCode(); - hashCode = (hashCode * 59) + this.AcceptsUntrustedRootCertificate.GetHashCode(); - if (this.AccountReference != null) - { - hashCode = (hashCode * 59) + this.AccountReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.AdditionalSettings != null) - { - hashCode = (hashCode * 59) + this.AdditionalSettings.GetHashCode(); - } - if (this.CertificateAlias != null) - { - hashCode = (hashCode * 59) + this.CertificateAlias.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CommunicationFormat.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EncryptionProtocol.GetHashCode(); - hashCode = (hashCode * 59) + this.FilterMerchantAccountType.GetHashCode(); - if (this.FilterMerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.FilterMerchantAccounts.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasError.GetHashCode(); - hashCode = (hashCode * 59) + this.HasPassword.GetHashCode(); - if (this.HmacKeyCheckValue != null) - { - hashCode = (hashCode * 59) + this.HmacKeyCheckValue.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NetworkType.GetHashCode(); - hashCode = (hashCode * 59) + this.PopulateSoapActionHeader.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/WebhookLinks.cs b/Adyen/Model/Management/WebhookLinks.cs deleted file mode 100644 index faa2edffd..000000000 --- a/Adyen/Model/Management/WebhookLinks.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// WebhookLinks - /// - [DataContract(Name = "WebhookLinks")] - public partial class WebhookLinks : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected WebhookLinks() { } - /// - /// Initializes a new instance of the class. - /// - /// company. - /// generateHmac (required). - /// merchant. - /// self (required). - /// testWebhook (required). - public WebhookLinks(LinksElement company = default(LinksElement), LinksElement generateHmac = default(LinksElement), LinksElement merchant = default(LinksElement), LinksElement self = default(LinksElement), LinksElement testWebhook = default(LinksElement)) - { - this.GenerateHmac = generateHmac; - this.Self = self; - this.TestWebhook = testWebhook; - this.Company = company; - this.Merchant = merchant; - } - - /// - /// Gets or Sets Company - /// - [DataMember(Name = "company", EmitDefaultValue = false)] - public LinksElement Company { get; set; } - - /// - /// Gets or Sets GenerateHmac - /// - [DataMember(Name = "generateHmac", IsRequired = false, EmitDefaultValue = false)] - public LinksElement GenerateHmac { get; set; } - - /// - /// Gets or Sets Merchant - /// - [DataMember(Name = "merchant", EmitDefaultValue = false)] - public LinksElement Merchant { get; set; } - - /// - /// Gets or Sets Self - /// - [DataMember(Name = "self", IsRequired = false, EmitDefaultValue = false)] - public LinksElement Self { get; set; } - - /// - /// Gets or Sets TestWebhook - /// - [DataMember(Name = "testWebhook", IsRequired = false, EmitDefaultValue = false)] - public LinksElement TestWebhook { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WebhookLinks {\n"); - sb.Append(" Company: ").Append(Company).Append("\n"); - sb.Append(" GenerateHmac: ").Append(GenerateHmac).Append("\n"); - sb.Append(" Merchant: ").Append(Merchant).Append("\n"); - sb.Append(" Self: ").Append(Self).Append("\n"); - sb.Append(" TestWebhook: ").Append(TestWebhook).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookLinks); - } - - /// - /// Returns true if WebhookLinks instances are equal - /// - /// Instance of WebhookLinks to be compared - /// Boolean - public bool Equals(WebhookLinks input) - { - if (input == null) - { - return false; - } - return - ( - this.Company == input.Company || - (this.Company != null && - this.Company.Equals(input.Company)) - ) && - ( - this.GenerateHmac == input.GenerateHmac || - (this.GenerateHmac != null && - this.GenerateHmac.Equals(input.GenerateHmac)) - ) && - ( - this.Merchant == input.Merchant || - (this.Merchant != null && - this.Merchant.Equals(input.Merchant)) - ) && - ( - this.Self == input.Self || - (this.Self != null && - this.Self.Equals(input.Self)) - ) && - ( - this.TestWebhook == input.TestWebhook || - (this.TestWebhook != null && - this.TestWebhook.Equals(input.TestWebhook)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Company != null) - { - hashCode = (hashCode * 59) + this.Company.GetHashCode(); - } - if (this.GenerateHmac != null) - { - hashCode = (hashCode * 59) + this.GenerateHmac.GetHashCode(); - } - if (this.Merchant != null) - { - hashCode = (hashCode * 59) + this.Merchant.GetHashCode(); - } - if (this.Self != null) - { - hashCode = (hashCode * 59) + this.Self.GetHashCode(); - } - if (this.TestWebhook != null) - { - hashCode = (hashCode * 59) + this.TestWebhook.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Management/WifiProfiles.cs b/Adyen/Model/Management/WifiProfiles.cs deleted file mode 100644 index 227bdb6ca..000000000 --- a/Adyen/Model/Management/WifiProfiles.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Management -{ - /// - /// WifiProfiles - /// - [DataContract(Name = "WifiProfiles")] - public partial class WifiProfiles : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of remote Wi-Fi profiles.. - /// settings. - public WifiProfiles(List profiles = default(List), Settings settings = default(Settings)) - { - this.Profiles = profiles; - this.Settings = settings; - } - - /// - /// List of remote Wi-Fi profiles. - /// - /// List of remote Wi-Fi profiles. - [DataMember(Name = "profiles", EmitDefaultValue = false)] - public List Profiles { get; set; } - - /// - /// Gets or Sets Settings - /// - [DataMember(Name = "settings", EmitDefaultValue = false)] - public Settings Settings { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class WifiProfiles {\n"); - sb.Append(" Profiles: ").Append(Profiles).Append("\n"); - sb.Append(" Settings: ").Append(Settings).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WifiProfiles); - } - - /// - /// Returns true if WifiProfiles instances are equal - /// - /// Instance of WifiProfiles to be compared - /// Boolean - public bool Equals(WifiProfiles input) - { - if (input == null) - { - return false; - } - return - ( - this.Profiles == input.Profiles || - this.Profiles != null && - input.Profiles != null && - this.Profiles.SequenceEqual(input.Profiles) - ) && - ( - this.Settings == input.Settings || - (this.Settings != null && - this.Settings.Equals(input.Settings)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Profiles != null) - { - hashCode = (hashCode * 59) + this.Profiles.GetHashCode(); - } - if (this.Settings != null) - { - hashCode = (hashCode * 59) + this.Settings.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/ManagementWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index 514938c2e..000000000 --- a/Adyen/Model/ManagementWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/ManagementWebhooks/AccountCapabilityData.cs b/Adyen/Model/ManagementWebhooks/AccountCapabilityData.cs deleted file mode 100644 index 03926ac0a..000000000 --- a/Adyen/Model/ManagementWebhooks/AccountCapabilityData.cs +++ /dev/null @@ -1,260 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// AccountCapabilityData - /// - [DataContract(Name = "AccountCapabilityData")] - public partial class AccountCapabilityData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountCapabilityData() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful.. - /// The allowed level of the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**.. - /// The name of the capability. For example, **sendToTransferInstrument**.. - /// List of entities that has problems with verification. The information includes the details of the errors and the actions that you can take to resolve them.. - /// Indicates whether you requested the capability. (required). - /// The level that you requested for the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. (required). - /// The verification deadline for the capability that will be disallowed if verification errors are not resolved.. - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification was successful. * **rejected**: Adyen checked the information and found reasons to not allow the capability. . - public AccountCapabilityData(bool? allowed = default(bool?), string allowedLevel = default(string), string capability = default(string), List problems = default(List), bool? requested = default(bool?), string requestedLevel = default(string), DateTime verificationDeadline = default(DateTime), string verificationStatus = default(string)) - { - this.Requested = requested; - this.RequestedLevel = requestedLevel; - this.Allowed = allowed; - this.AllowedLevel = allowedLevel; - this.Capability = capability; - this.Problems = problems; - this.VerificationDeadline = verificationDeadline; - this.VerificationStatus = verificationStatus; - } - - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. - /// - /// Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; set; } - - /// - /// The allowed level of the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The allowed level of the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "allowedLevel", EmitDefaultValue = false)] - public string AllowedLevel { get; set; } - - /// - /// The name of the capability. For example, **sendToTransferInstrument**. - /// - /// The name of the capability. For example, **sendToTransferInstrument**. - [DataMember(Name = "capability", EmitDefaultValue = false)] - public string Capability { get; set; } - - /// - /// List of entities that has problems with verification. The information includes the details of the errors and the actions that you can take to resolve them. - /// - /// List of entities that has problems with verification. The information includes the details of the errors and the actions that you can take to resolve them. - [DataMember(Name = "problems", EmitDefaultValue = false)] - public List Problems { get; set; } - - /// - /// Indicates whether you requested the capability. - /// - /// Indicates whether you requested the capability. - [DataMember(Name = "requested", IsRequired = false, EmitDefaultValue = false)] - public bool? Requested { get; set; } - - /// - /// The level that you requested for the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. - /// - /// The level that you requested for the capability. Some capabilities have different levels which correspond to thresholds. Higher levels may require additional checks and increased monitoring.Possible values: **notApplicable**, **low**, **medium**, **high**. - [DataMember(Name = "requestedLevel", IsRequired = false, EmitDefaultValue = false)] - public string RequestedLevel { get; set; } - - /// - /// The verification deadline for the capability that will be disallowed if verification errors are not resolved. - /// - /// The verification deadline for the capability that will be disallowed if verification errors are not resolved. - [DataMember(Name = "verificationDeadline", EmitDefaultValue = false)] - public DateTime VerificationDeadline { get; set; } - - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification was successful. * **rejected**: Adyen checked the information and found reasons to not allow the capability. - /// - /// The status of the verification checks for the capability. Possible values: * **pending**: Adyen is running the verification. * **invalid**: The verification failed. Check if the `errors` array contains more information. * **valid**: The verification was successful. * **rejected**: Adyen checked the information and found reasons to not allow the capability. - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public string VerificationStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountCapabilityData {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" AllowedLevel: ").Append(AllowedLevel).Append("\n"); - sb.Append(" Capability: ").Append(Capability).Append("\n"); - sb.Append(" Problems: ").Append(Problems).Append("\n"); - sb.Append(" Requested: ").Append(Requested).Append("\n"); - sb.Append(" RequestedLevel: ").Append(RequestedLevel).Append("\n"); - sb.Append(" VerificationDeadline: ").Append(VerificationDeadline).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountCapabilityData); - } - - /// - /// Returns true if AccountCapabilityData instances are equal - /// - /// Instance of AccountCapabilityData to be compared - /// Boolean - public bool Equals(AccountCapabilityData input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.AllowedLevel == input.AllowedLevel || - (this.AllowedLevel != null && - this.AllowedLevel.Equals(input.AllowedLevel)) - ) && - ( - this.Capability == input.Capability || - (this.Capability != null && - this.Capability.Equals(input.Capability)) - ) && - ( - this.Problems == input.Problems || - this.Problems != null && - input.Problems != null && - this.Problems.SequenceEqual(input.Problems) - ) && - ( - this.Requested == input.Requested || - this.Requested.Equals(input.Requested) - ) && - ( - this.RequestedLevel == input.RequestedLevel || - (this.RequestedLevel != null && - this.RequestedLevel.Equals(input.RequestedLevel)) - ) && - ( - this.VerificationDeadline == input.VerificationDeadline || - (this.VerificationDeadline != null && - this.VerificationDeadline.Equals(input.VerificationDeadline)) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - (this.VerificationStatus != null && - this.VerificationStatus.Equals(input.VerificationStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - if (this.AllowedLevel != null) - { - hashCode = (hashCode * 59) + this.AllowedLevel.GetHashCode(); - } - if (this.Capability != null) - { - hashCode = (hashCode * 59) + this.Capability.GetHashCode(); - } - if (this.Problems != null) - { - hashCode = (hashCode * 59) + this.Problems.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Requested.GetHashCode(); - if (this.RequestedLevel != null) - { - hashCode = (hashCode * 59) + this.RequestedLevel.GetHashCode(); - } - if (this.VerificationDeadline != null) - { - hashCode = (hashCode * 59) + this.VerificationDeadline.GetHashCode(); - } - if (this.VerificationStatus != null) - { - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.cs b/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.cs deleted file mode 100644 index 8f3036712..000000000 --- a/Adyen/Model/ManagementWebhooks/AccountCreateNotificationData.cs +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// AccountCreateNotificationData - /// - [DataContract(Name = "AccountCreateNotificationData")] - public partial class AccountCreateNotificationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountCreateNotificationData() { } - /// - /// Initializes a new instance of the class. - /// - /// Key-value pairs that specify the actions that the merchant account can do and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out funds to the bank account. The value is an object containing the settings for the capability. (required). - /// The unique identifier of the company account. (required). - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).. - /// The unique identifier of the merchant account. (required). - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. (required). - public AccountCreateNotificationData(Dictionary capabilities = default(Dictionary), string companyId = default(string), string legalEntityId = default(string), string merchantId = default(string), string status = default(string)) - { - this.Capabilities = capabilities; - this.CompanyId = companyId; - this.MerchantId = merchantId; - this.Status = status; - this.LegalEntityId = legalEntityId; - } - - /// - /// Key-value pairs that specify the actions that the merchant account can do and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out funds to the bank account. The value is an object containing the settings for the capability. - /// - /// Key-value pairs that specify the actions that the merchant account can do and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out funds to the bank account. The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", IsRequired = false, EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// The unique identifier of the company account. - /// - /// The unique identifier of the company account. - [DataMember(Name = "companyId", IsRequired = false, EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - [DataMember(Name = "legalEntityId", EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// The unique identifier of the merchant account. - /// - /// The unique identifier of the merchant account. - [DataMember(Name = "merchantId", IsRequired = false, EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. - /// - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountCreateNotificationData {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountCreateNotificationData); - } - - /// - /// Returns true if AccountCreateNotificationData instances are equal - /// - /// Instance of AccountCreateNotificationData to be compared - /// Boolean - public bool Equals(AccountCreateNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.cs b/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.cs deleted file mode 100644 index 700df6dc5..000000000 --- a/Adyen/Model/ManagementWebhooks/AccountNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// AccountNotificationResponse - /// - [DataContract(Name = "AccountNotificationResponse")] - public partial class AccountNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public AccountNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountNotificationResponse); - } - - /// - /// Returns true if AccountNotificationResponse instances are equal - /// - /// Instance of AccountNotificationResponse to be compared - /// Boolean - public bool Equals(AccountNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.cs b/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.cs deleted file mode 100644 index 4ee1f510b..000000000 --- a/Adyen/Model/ManagementWebhooks/AccountUpdateNotificationData.cs +++ /dev/null @@ -1,192 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// AccountUpdateNotificationData - /// - [DataContract(Name = "AccountUpdateNotificationData")] - public partial class AccountUpdateNotificationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountUpdateNotificationData() { } - /// - /// Initializes a new instance of the class. - /// - /// Key-value pairs that specify what you can do with the merchant account and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out the funds of a merchant account to a [bank account](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). The value is an object containing the settings for the capability. (required). - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id).. - /// The unique identifier of the merchant account. (required). - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. (required). - public AccountUpdateNotificationData(Dictionary capabilities = default(Dictionary), string legalEntityId = default(string), string merchantId = default(string), string status = default(string)) - { - this.Capabilities = capabilities; - this.MerchantId = merchantId; - this.Status = status; - this.LegalEntityId = legalEntityId; - } - - /// - /// Key-value pairs that specify what you can do with the merchant account and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out the funds of a merchant account to a [bank account](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). The value is an object containing the settings for the capability. - /// - /// Key-value pairs that specify what you can do with the merchant account and its settings. The key is a capability. For example, the **sendToTransferInstrument** is the capability required before you can pay out the funds of a merchant account to a [bank account](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments). The value is an object containing the settings for the capability. - [DataMember(Name = "capabilities", IsRequired = false, EmitDefaultValue = false)] - public Dictionary Capabilities { get; set; } - - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - /// - /// The unique identifier of the [legal entity](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#responses-200-id). - [DataMember(Name = "legalEntityId", EmitDefaultValue = false)] - public string LegalEntityId { get; set; } - - /// - /// The unique identifier of the merchant account. - /// - /// The unique identifier of the merchant account. - [DataMember(Name = "merchantId", IsRequired = false, EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. - /// - /// The status of the merchant account. Possible values: * **PreActive**: The merchant account has been created. Users cannot access the merchant account in the Customer Area. The account cannot process payments. * **Active**: Users can access the merchant account in the Customer Area. If the company account is also **Active**, then payment processing and payouts are enabled. * **InactiveWithModifications**: Users can access the merchant account in the Customer Area. The account cannot process new payments but can still modify payments, for example issue refunds. The account can still receive payouts. * **Inactive**: Users can access the merchant account in the Customer Area. Payment processing and payouts are disabled. * **Closed**: The account is closed and this cannot be reversed. Users cannot log in. Payment processing and payouts are disabled. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountUpdateNotificationData {\n"); - sb.Append(" Capabilities: ").Append(Capabilities).Append("\n"); - sb.Append(" LegalEntityId: ").Append(LegalEntityId).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountUpdateNotificationData); - } - - /// - /// Returns true if AccountUpdateNotificationData instances are equal - /// - /// Instance of AccountUpdateNotificationData to be compared - /// Boolean - public bool Equals(AccountUpdateNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.Capabilities == input.Capabilities || - this.Capabilities != null && - input.Capabilities != null && - this.Capabilities.SequenceEqual(input.Capabilities) - ) && - ( - this.LegalEntityId == input.LegalEntityId || - (this.LegalEntityId != null && - this.LegalEntityId.Equals(input.LegalEntityId)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Capabilities != null) - { - hashCode = (hashCode * 59) + this.Capabilities.GetHashCode(); - } - if (this.LegalEntityId != null) - { - hashCode = (hashCode * 59) + this.LegalEntityId.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/CapabilityProblem.cs b/Adyen/Model/ManagementWebhooks/CapabilityProblem.cs deleted file mode 100644 index e6481cb57..000000000 --- a/Adyen/Model/ManagementWebhooks/CapabilityProblem.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// CapabilityProblem - /// - [DataContract(Name = "CapabilityProblem")] - public partial class CapabilityProblem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// entity. - /// List of verification errors.. - public CapabilityProblem(CapabilityProblemEntity entity = default(CapabilityProblemEntity), List verificationErrors = default(List)) - { - this.Entity = entity; - this.VerificationErrors = verificationErrors; - } - - /// - /// Gets or Sets Entity - /// - [DataMember(Name = "entity", EmitDefaultValue = false)] - public CapabilityProblemEntity Entity { get; set; } - - /// - /// List of verification errors. - /// - /// List of verification errors. - [DataMember(Name = "verificationErrors", EmitDefaultValue = false)] - public List VerificationErrors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblem {\n"); - sb.Append(" Entity: ").Append(Entity).Append("\n"); - sb.Append(" VerificationErrors: ").Append(VerificationErrors).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblem); - } - - /// - /// Returns true if CapabilityProblem instances are equal - /// - /// Instance of CapabilityProblem to be compared - /// Boolean - public bool Equals(CapabilityProblem input) - { - if (input == null) - { - return false; - } - return - ( - this.Entity == input.Entity || - (this.Entity != null && - this.Entity.Equals(input.Entity)) - ) && - ( - this.VerificationErrors == input.VerificationErrors || - this.VerificationErrors != null && - input.VerificationErrors != null && - this.VerificationErrors.SequenceEqual(input.VerificationErrors) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Entity != null) - { - hashCode = (hashCode * 59) + this.Entity.GetHashCode(); - } - if (this.VerificationErrors != null) - { - hashCode = (hashCode * 59) + this.VerificationErrors.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.cs b/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.cs deleted file mode 100644 index f29387968..000000000 --- a/Adyen/Model/ManagementWebhooks/CapabilityProblemEntity.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// CapabilityProblemEntity - /// - [DataContract(Name = "CapabilityProblemEntity")] - public partial class CapabilityProblemEntity : IEquatable, IValidatableObject - { - /// - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. - /// - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Document for value: Document - /// - [EnumMember(Value = "Document")] - Document = 2, - - /// - /// Enum LegalEntity for value: LegalEntity - /// - [EnumMember(Value = "LegalEntity")] - LegalEntity = 3 - - } - - - /// - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. - /// - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to.. - /// The ID of the entity.. - /// owner. - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**.. - public CapabilityProblemEntity(List documents = default(List), string id = default(string), CapabilityProblemEntityRecursive owner = default(CapabilityProblemEntityRecursive), TypeEnum? type = default(TypeEnum?)) - { - this.Documents = documents; - this.Id = id; - this.Owner = owner; - this.Type = type; - } - - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - [DataMember(Name = "documents", EmitDefaultValue = false)] - public List Documents { get; set; } - - /// - /// The ID of the entity. - /// - /// The ID of the entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Owner - /// - [DataMember(Name = "owner", EmitDefaultValue = false)] - public CapabilityProblemEntityRecursive Owner { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblemEntity {\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Owner: ").Append(Owner).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblemEntity); - } - - /// - /// Returns true if CapabilityProblemEntity instances are equal - /// - /// Instance of CapabilityProblemEntity to be compared - /// Boolean - public bool Equals(CapabilityProblemEntity input) - { - if (input == null) - { - return false; - } - return - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Owner == input.Owner || - (this.Owner != null && - this.Owner.Equals(input.Owner)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Owner != null) - { - hashCode = (hashCode * 59) + this.Owner.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.cs b/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.cs deleted file mode 100644 index 6136bc30c..000000000 --- a/Adyen/Model/ManagementWebhooks/CapabilityProblemEntityRecursive.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// CapabilityProblemEntityRecursive - /// - [DataContract(Name = "CapabilityProblemEntity-recursive")] - public partial class CapabilityProblemEntityRecursive : IEquatable, IValidatableObject - { - /// - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. - /// - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankAccount for value: BankAccount - /// - [EnumMember(Value = "BankAccount")] - BankAccount = 1, - - /// - /// Enum Document for value: Document - /// - [EnumMember(Value = "Document")] - Document = 2, - - /// - /// Enum LegalEntity for value: LegalEntity - /// - [EnumMember(Value = "LegalEntity")] - LegalEntity = 3 - - } - - - /// - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. - /// - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to.. - /// The ID of the entity.. - /// The type of entity. Possible values: **LegalEntity**, **BankAccount**, or **Document**.. - public CapabilityProblemEntityRecursive(List documents = default(List), string id = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Documents = documents; - this.Id = id; - this.Type = type; - } - - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - /// - /// List of document IDs to which the verification errors related to the capabilities correspond to. - [DataMember(Name = "documents", EmitDefaultValue = false)] - public List Documents { get; set; } - - /// - /// The ID of the entity. - /// - /// The ID of the entity. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapabilityProblemEntityRecursive {\n"); - sb.Append(" Documents: ").Append(Documents).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapabilityProblemEntityRecursive); - } - - /// - /// Returns true if CapabilityProblemEntityRecursive instances are equal - /// - /// Instance of CapabilityProblemEntityRecursive to be compared - /// Boolean - public bool Equals(CapabilityProblemEntityRecursive input) - { - if (input == null) - { - return false; - } - return - ( - this.Documents == input.Documents || - this.Documents != null && - input.Documents != null && - this.Documents.SequenceEqual(input.Documents) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Documents != null) - { - hashCode = (hashCode * 59) + this.Documents.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.cs b/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.cs deleted file mode 100644 index 2a0a11201..000000000 --- a/Adyen/Model/ManagementWebhooks/MerchantCreatedNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// MerchantCreatedNotificationRequest - /// - [DataContract(Name = "MerchantCreatedNotificationRequest")] - public partial class MerchantCreatedNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum MerchantCreated for value: merchant.created - /// - [EnumMember(Value = "merchant.created")] - MerchantCreated = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MerchantCreatedNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Timestamp for when the webhook was created. (required). - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// Type of notification. (required). - public MerchantCreatedNotificationRequest(DateTime createdAt = default(DateTime), AccountCreateNotificationData data = default(AccountCreateNotificationData), string environment = default(string), TypeEnum type = default(TypeEnum)) - { - this.CreatedAt = createdAt; - this.Data = data; - this.Environment = environment; - this.Type = type; - } - - /// - /// Timestamp for when the webhook was created. - /// - /// Timestamp for when the webhook was created. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public AccountCreateNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantCreatedNotificationRequest {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantCreatedNotificationRequest); - } - - /// - /// Returns true if MerchantCreatedNotificationRequest instances are equal - /// - /// Instance of MerchantCreatedNotificationRequest to be compared - /// Boolean - public bool Equals(MerchantCreatedNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.cs b/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.cs deleted file mode 100644 index 8e56172f3..000000000 --- a/Adyen/Model/ManagementWebhooks/MerchantUpdatedNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// MerchantUpdatedNotificationRequest - /// - [DataContract(Name = "MerchantUpdatedNotificationRequest")] - public partial class MerchantUpdatedNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum MerchantUpdated for value: merchant.updated - /// - [EnumMember(Value = "merchant.updated")] - MerchantUpdated = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MerchantUpdatedNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Timestamp for when the webhook was created. (required). - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// Type of notification. (required). - public MerchantUpdatedNotificationRequest(DateTime createdAt = default(DateTime), AccountUpdateNotificationData data = default(AccountUpdateNotificationData), string environment = default(string), TypeEnum type = default(TypeEnum)) - { - this.CreatedAt = createdAt; - this.Data = data; - this.Environment = environment; - this.Type = type; - } - - /// - /// Timestamp for when the webhook was created. - /// - /// Timestamp for when the webhook was created. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public AccountUpdateNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantUpdatedNotificationRequest {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantUpdatedNotificationRequest); - } - - /// - /// Returns true if MerchantUpdatedNotificationRequest instances are equal - /// - /// Instance of MerchantUpdatedNotificationRequest to be compared - /// Boolean - public bool Equals(MerchantUpdatedNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.cs b/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.cs deleted file mode 100644 index 53353ac44..000000000 --- a/Adyen/Model/ManagementWebhooks/MidServiceNotificationData.cs +++ /dev/null @@ -1,342 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// MidServiceNotificationData - /// - [DataContract(Name = "MidServiceNotificationData")] - public partial class MidServiceNotificationData : IEquatable, IValidatableObject - { - /// - /// The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **capabilityPending**: the **receivePayments** capability is not allowed. - /// - /// The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **capabilityPending**: the **receivePayments** capability is not allowed. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Success for value: success - /// - [EnumMember(Value = "success")] - Success = 1, - - /// - /// Enum Failure for value: failure - /// - [EnumMember(Value = "failure")] - Failure = 2, - - /// - /// Enum CapabilityPending for value: capabilityPending - /// - [EnumMember(Value = "capabilityPending")] - CapabilityPending = 3, - - /// - /// Enum DataRequired for value: dataRequired - /// - [EnumMember(Value = "dataRequired")] - DataRequired = 4, - - /// - /// Enum UpdatesExpected for value: updatesExpected - /// - [EnumMember(Value = "updatesExpected")] - UpdatesExpected = 5 - - } - - - /// - /// The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **capabilityPending**: the **receivePayments** capability is not allowed. - /// - /// The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **capabilityPending**: the **receivePayments** capability is not allowed. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - /// - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - [JsonConverter(typeof(StringEnumConverter))] - public enum VerificationStatusEnum - { - /// - /// Enum Valid for value: valid - /// - [EnumMember(Value = "valid")] - Valid = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Invalid for value: invalid - /// - [EnumMember(Value = "invalid")] - Invalid = 3, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 4 - - } - - - /// - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - /// - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected** - [DataMember(Name = "verificationStatus", EmitDefaultValue = false)] - public VerificationStatusEnum? VerificationStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MidServiceNotificationData() { } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account.. - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**).. - /// The unique identifier of the resource. (required). - /// The unique identifier of the merchant account. (required). - /// Your reference for the payment method.. - /// The status of the request to add a payment method. Possible values: * **success**: the payment method was added. * **failure**: the request failed. * **capabilityPending**: the **receivePayments** capability is not allowed. (required). - /// The unique identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any.. - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). (required). - /// Payment method status. Possible values: * **valid** * **pending** * **invalid** * **rejected**. - public MidServiceNotificationData(bool? allowed = default(bool?), bool? enabled = default(bool?), string id = default(string), string merchantId = default(string), string reference = default(string), StatusEnum status = default(StatusEnum), string storeId = default(string), string type = default(string), VerificationStatusEnum? verificationStatus = default(VerificationStatusEnum?)) - { - this.Id = id; - this.MerchantId = merchantId; - this.Status = status; - this.Type = type; - this.Allowed = allowed; - this.Enabled = enabled; - this.Reference = reference; - this.StoreId = storeId; - this.VerificationStatus = verificationStatus; - } - - /// - /// Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account. - /// - /// Indicates whether receiving payments is allowed. This value is set to **true** by Adyen after screening your merchant account. - [DataMember(Name = "allowed", EmitDefaultValue = false)] - public bool? Allowed { get; set; } - - /// - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**). - /// - /// Indicates whether the payment method is enabled (**true**) or disabled (**false**). - [DataMember(Name = "enabled", EmitDefaultValue = false)] - public bool? Enabled { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the merchant account. - /// - /// The unique identifier of the merchant account. - [DataMember(Name = "merchantId", IsRequired = false, EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// Your reference for the payment method. - /// - /// Your reference for the payment method. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The unique identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any. - /// - /// The unique identifier of the [store](https://docs.adyen.com/api-explorer/#/ManagementService/latest/post/merchants/{id}/paymentMethodSettings__reqParam_storeId), if any. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - /// - /// Payment method [variant](https://docs.adyen.com/development-resources/paymentmethodvariant#management-api). - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MidServiceNotificationData {\n"); - sb.Append(" Allowed: ").Append(Allowed).Append("\n"); - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VerificationStatus: ").Append(VerificationStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MidServiceNotificationData); - } - - /// - /// Returns true if MidServiceNotificationData instances are equal - /// - /// Instance of MidServiceNotificationData to be compared - /// Boolean - public bool Equals(MidServiceNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.Allowed == input.Allowed || - this.Allowed.Equals(input.Allowed) - ) && - ( - this.Enabled == input.Enabled || - this.Enabled.Equals(input.Enabled) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.VerificationStatus == input.VerificationStatus || - this.VerificationStatus.Equals(input.VerificationStatus) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Allowed.GetHashCode(); - hashCode = (hashCode * 59) + this.Enabled.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VerificationStatus.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.cs b/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.cs deleted file mode 100644 index 2f70b4fbc..000000000 --- a/Adyen/Model/ManagementWebhooks/PaymentMethodCreatedNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// PaymentMethodCreatedNotificationRequest - /// - [DataContract(Name = "PaymentMethodCreatedNotificationRequest")] - public partial class PaymentMethodCreatedNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PaymentMethodCreated for value: paymentMethod.created - /// - [EnumMember(Value = "paymentMethod.created")] - PaymentMethodCreated = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethodCreatedNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Timestamp for when the webhook was created. (required). - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// Type of notification. (required). - public PaymentMethodCreatedNotificationRequest(DateTime createdAt = default(DateTime), MidServiceNotificationData data = default(MidServiceNotificationData), string environment = default(string), TypeEnum type = default(TypeEnum)) - { - this.CreatedAt = createdAt; - this.Data = data; - this.Environment = environment; - this.Type = type; - } - - /// - /// Timestamp for when the webhook was created. - /// - /// Timestamp for when the webhook was created. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public MidServiceNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodCreatedNotificationRequest {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCreatedNotificationRequest); - } - - /// - /// Returns true if PaymentMethodCreatedNotificationRequest instances are equal - /// - /// Instance of PaymentMethodCreatedNotificationRequest to be compared - /// Boolean - public bool Equals(PaymentMethodCreatedNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.cs b/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.cs deleted file mode 100644 index a62853668..000000000 --- a/Adyen/Model/ManagementWebhooks/PaymentMethodNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// PaymentMethodNotificationResponse - /// - [DataContract(Name = "PaymentMethodNotificationResponse")] - public partial class PaymentMethodNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public PaymentMethodNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodNotificationResponse); - } - - /// - /// Returns true if PaymentMethodNotificationResponse instances are equal - /// - /// Instance of PaymentMethodNotificationResponse to be compared - /// Boolean - public bool Equals(PaymentMethodNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.cs b/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.cs deleted file mode 100644 index f20a53997..000000000 --- a/Adyen/Model/ManagementWebhooks/PaymentMethodRequestRemovedNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// PaymentMethodRequestRemovedNotificationRequest - /// - [DataContract(Name = "PaymentMethodRequestRemovedNotificationRequest")] - public partial class PaymentMethodRequestRemovedNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PaymentMethodRequestRemoved for value: paymentMethodRequest.removed - /// - [EnumMember(Value = "paymentMethodRequest.removed")] - PaymentMethodRequestRemoved = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethodRequestRemovedNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Timestamp for when the webhook was created. (required). - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// Type of notification. (required). - public PaymentMethodRequestRemovedNotificationRequest(DateTime createdAt = default(DateTime), MidServiceNotificationData data = default(MidServiceNotificationData), string environment = default(string), TypeEnum type = default(TypeEnum)) - { - this.CreatedAt = createdAt; - this.Data = data; - this.Environment = environment; - this.Type = type; - } - - /// - /// Timestamp for when the webhook was created. - /// - /// Timestamp for when the webhook was created. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public MidServiceNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodRequestRemovedNotificationRequest {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodRequestRemovedNotificationRequest); - } - - /// - /// Returns true if PaymentMethodRequestRemovedNotificationRequest instances are equal - /// - /// Instance of PaymentMethodRequestRemovedNotificationRequest to be compared - /// Boolean - public bool Equals(PaymentMethodRequestRemovedNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.cs b/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.cs deleted file mode 100644 index 9c448f5c9..000000000 --- a/Adyen/Model/ManagementWebhooks/PaymentMethodScheduledForRemovalNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// PaymentMethodScheduledForRemovalNotificationRequest - /// - [DataContract(Name = "PaymentMethodScheduledForRemovalNotificationRequest")] - public partial class PaymentMethodScheduledForRemovalNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PaymentMethodRequestScheduledForRemoval for value: paymentMethodRequest.scheduledForRemoval - /// - [EnumMember(Value = "paymentMethodRequest.scheduledForRemoval")] - PaymentMethodRequestScheduledForRemoval = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentMethodScheduledForRemovalNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Timestamp for when the webhook was created. (required). - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// Type of notification. (required). - public PaymentMethodScheduledForRemovalNotificationRequest(DateTime createdAt = default(DateTime), MidServiceNotificationData data = default(MidServiceNotificationData), string environment = default(string), TypeEnum type = default(TypeEnum)) - { - this.CreatedAt = createdAt; - this.Data = data; - this.Environment = environment; - this.Type = type; - } - - /// - /// Timestamp for when the webhook was created. - /// - /// Timestamp for when the webhook was created. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public MidServiceNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodScheduledForRemovalNotificationRequest {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodScheduledForRemovalNotificationRequest); - } - - /// - /// Returns true if PaymentMethodScheduledForRemovalNotificationRequest instances are equal - /// - /// Instance of PaymentMethodScheduledForRemovalNotificationRequest to be compared - /// Boolean - public bool Equals(PaymentMethodScheduledForRemovalNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/RemediatingAction.cs b/Adyen/Model/ManagementWebhooks/RemediatingAction.cs deleted file mode 100644 index e55dd930f..000000000 --- a/Adyen/Model/ManagementWebhooks/RemediatingAction.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// RemediatingAction - /// - [DataContract(Name = "RemediatingAction")] - public partial class RemediatingAction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The remediating action code.. - /// A description of how you can resolve the verification error.. - public RemediatingAction(string code = default(string), string message = default(string)) - { - this.Code = code; - this.Message = message; - } - - /// - /// The remediating action code. - /// - /// The remediating action code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// A description of how you can resolve the verification error. - /// - /// A description of how you can resolve the verification error. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RemediatingAction {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RemediatingAction); - } - - /// - /// Returns true if RemediatingAction instances are equal - /// - /// Instance of RemediatingAction to be compared - /// Boolean - public bool Equals(RemediatingAction input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/TerminalAssignmentNotificationRequest.cs b/Adyen/Model/ManagementWebhooks/TerminalAssignmentNotificationRequest.cs deleted file mode 100644 index dbabd1309..000000000 --- a/Adyen/Model/ManagementWebhooks/TerminalAssignmentNotificationRequest.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// TerminalAssignmentNotificationRequest - /// - [DataContract(Name = "TerminalAssignmentNotificationRequest")] - public partial class TerminalAssignmentNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TerminalAssignmentNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the merchant/company account to which the terminal is assigned. (required). - /// The unique identifier of the store to which the terminal is assigned.. - /// The date and time when an event has been completed. (required). - /// The PSP reference of the request from which the notification originates. (required). - /// The unique identifier of the terminal. (required). - public TerminalAssignmentNotificationRequest(string assignedToAccount = default(string), string assignedToStore = default(string), string eventDate = default(string), string pspReference = default(string), string uniqueTerminalId = default(string)) - { - this.AssignedToAccount = assignedToAccount; - this.EventDate = eventDate; - this.PspReference = pspReference; - this.UniqueTerminalId = uniqueTerminalId; - this.AssignedToStore = assignedToStore; - } - - /// - /// The unique identifier of the merchant/company account to which the terminal is assigned. - /// - /// The unique identifier of the merchant/company account to which the terminal is assigned. - [DataMember(Name = "assignedToAccount", IsRequired = false, EmitDefaultValue = false)] - public string AssignedToAccount { get; set; } - - /// - /// The unique identifier of the store to which the terminal is assigned. - /// - /// The unique identifier of the store to which the terminal is assigned. - [DataMember(Name = "assignedToStore", EmitDefaultValue = false)] - public string AssignedToStore { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public string EventDate { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The unique identifier of the terminal. - /// - /// The unique identifier of the terminal. - [DataMember(Name = "uniqueTerminalId", IsRequired = false, EmitDefaultValue = false)] - public string UniqueTerminalId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalAssignmentNotificationRequest {\n"); - sb.Append(" AssignedToAccount: ").Append(AssignedToAccount).Append("\n"); - sb.Append(" AssignedToStore: ").Append(AssignedToStore).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" UniqueTerminalId: ").Append(UniqueTerminalId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalAssignmentNotificationRequest); - } - - /// - /// Returns true if TerminalAssignmentNotificationRequest instances are equal - /// - /// Instance of TerminalAssignmentNotificationRequest to be compared - /// Boolean - public bool Equals(TerminalAssignmentNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AssignedToAccount == input.AssignedToAccount || - (this.AssignedToAccount != null && - this.AssignedToAccount.Equals(input.AssignedToAccount)) - ) && - ( - this.AssignedToStore == input.AssignedToStore || - (this.AssignedToStore != null && - this.AssignedToStore.Equals(input.AssignedToStore)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.UniqueTerminalId == input.UniqueTerminalId || - (this.UniqueTerminalId != null && - this.UniqueTerminalId.Equals(input.UniqueTerminalId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AssignedToAccount != null) - { - hashCode = (hashCode * 59) + this.AssignedToAccount.GetHashCode(); - } - if (this.AssignedToStore != null) - { - hashCode = (hashCode * 59) + this.AssignedToStore.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.UniqueTerminalId != null) - { - hashCode = (hashCode * 59) + this.UniqueTerminalId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/TerminalAssignmentNotificationResponse.cs b/Adyen/Model/ManagementWebhooks/TerminalAssignmentNotificationResponse.cs deleted file mode 100644 index bda1c09a4..000000000 --- a/Adyen/Model/ManagementWebhooks/TerminalAssignmentNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// TerminalAssignmentNotificationResponse - /// - [DataContract(Name = "TerminalAssignmentNotificationResponse")] - public partial class TerminalAssignmentNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public TerminalAssignmentNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalAssignmentNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalAssignmentNotificationResponse); - } - - /// - /// Returns true if TerminalAssignmentNotificationResponse instances are equal - /// - /// Instance of TerminalAssignmentNotificationResponse to be compared - /// Boolean - public bool Equals(TerminalAssignmentNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/TerminalBoardingData.cs b/Adyen/Model/ManagementWebhooks/TerminalBoardingData.cs deleted file mode 100644 index bc3475005..000000000 --- a/Adyen/Model/ManagementWebhooks/TerminalBoardingData.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// TerminalBoardingData - /// - [DataContract(Name = "TerminalBoardingData")] - public partial class TerminalBoardingData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TerminalBoardingData() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the company account. (required). - /// The unique identifier of the merchant account.. - /// The unique identifier of the store.. - /// The unique identifier of the terminal. (required). - public TerminalBoardingData(string companyId = default(string), string merchantId = default(string), string storeId = default(string), string uniqueTerminalId = default(string)) - { - this.CompanyId = companyId; - this.UniqueTerminalId = uniqueTerminalId; - this.MerchantId = merchantId; - this.StoreId = storeId; - } - - /// - /// The unique identifier of the company account. - /// - /// The unique identifier of the company account. - [DataMember(Name = "companyId", IsRequired = false, EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// The unique identifier of the merchant account. - /// - /// The unique identifier of the merchant account. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The unique identifier of the store. - /// - /// The unique identifier of the store. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// The unique identifier of the terminal. - /// - /// The unique identifier of the terminal. - [DataMember(Name = "uniqueTerminalId", IsRequired = false, EmitDefaultValue = false)] - public string UniqueTerminalId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalBoardingData {\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append(" UniqueTerminalId: ").Append(UniqueTerminalId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalBoardingData); - } - - /// - /// Returns true if TerminalBoardingData instances are equal - /// - /// Instance of TerminalBoardingData to be compared - /// Boolean - public bool Equals(TerminalBoardingData input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ) && - ( - this.UniqueTerminalId == input.UniqueTerminalId || - (this.UniqueTerminalId != null && - this.UniqueTerminalId.Equals(input.UniqueTerminalId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - if (this.UniqueTerminalId != null) - { - hashCode = (hashCode * 59) + this.UniqueTerminalId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/TerminalBoardingNotificationRequest.cs b/Adyen/Model/ManagementWebhooks/TerminalBoardingNotificationRequest.cs deleted file mode 100644 index 57eff2642..000000000 --- a/Adyen/Model/ManagementWebhooks/TerminalBoardingNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// TerminalBoardingNotificationRequest - /// - [DataContract(Name = "TerminalBoardingNotificationRequest")] - public partial class TerminalBoardingNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum TerminalBoardingTriggered for value: terminalBoarding.triggered - /// - [EnumMember(Value = "terminalBoarding.triggered")] - TerminalBoardingTriggered = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TerminalBoardingNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Timestamp for when the webhook was created. (required). - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// Type of notification. (required). - public TerminalBoardingNotificationRequest(DateTime createdAt = default(DateTime), TerminalBoardingData data = default(TerminalBoardingData), string environment = default(string), TypeEnum type = default(TypeEnum)) - { - this.CreatedAt = createdAt; - this.Data = data; - this.Environment = environment; - this.Type = type; - } - - /// - /// Timestamp for when the webhook was created. - /// - /// Timestamp for when the webhook was created. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public TerminalBoardingData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalBoardingNotificationRequest {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalBoardingNotificationRequest); - } - - /// - /// Returns true if TerminalBoardingNotificationRequest instances are equal - /// - /// Instance of TerminalBoardingNotificationRequest to be compared - /// Boolean - public bool Equals(TerminalBoardingNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/TerminalBoardingNotificationResponse.cs b/Adyen/Model/ManagementWebhooks/TerminalBoardingNotificationResponse.cs deleted file mode 100644 index b3ce1fb7a..000000000 --- a/Adyen/Model/ManagementWebhooks/TerminalBoardingNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// TerminalBoardingNotificationResponse - /// - [DataContract(Name = "TerminalBoardingNotificationResponse")] - public partial class TerminalBoardingNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public TerminalBoardingNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalBoardingNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalBoardingNotificationResponse); - } - - /// - /// Returns true if TerminalBoardingNotificationResponse instances are equal - /// - /// Instance of TerminalBoardingNotificationResponse to be compared - /// Boolean - public bool Equals(TerminalBoardingNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/TerminalSettingsData.cs b/Adyen/Model/ManagementWebhooks/TerminalSettingsData.cs deleted file mode 100644 index 071dd5ada..000000000 --- a/Adyen/Model/ManagementWebhooks/TerminalSettingsData.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// TerminalSettingsData - /// - [DataContract(Name = "TerminalSettingsData")] - public partial class TerminalSettingsData : IEquatable, IValidatableObject - { - /// - /// Indicates whether the terminal settings were updated using the Customer Area or the Management API. - /// - /// Indicates whether the terminal settings were updated using the Customer Area or the Management API. - [JsonConverter(typeof(StringEnumConverter))] - public enum UpdateSourceEnum - { - /// - /// Enum CustomerArea for value: Customer Area - /// - [EnumMember(Value = "Customer Area")] - CustomerArea = 1, - - /// - /// Enum ManagementApi for value: Management Api - /// - [EnumMember(Value = "Management Api")] - ManagementApi = 2 - - } - - - /// - /// Indicates whether the terminal settings were updated using the Customer Area or the Management API. - /// - /// Indicates whether the terminal settings were updated using the Customer Area or the Management API. - [DataMember(Name = "updateSource", IsRequired = false, EmitDefaultValue = false)] - public UpdateSourceEnum UpdateSource { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TerminalSettingsData() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the company account.. - /// The unique identifier of the merchant account.. - /// The unique identifier of the store.. - /// The unique identifier of the terminal.. - /// Indicates whether the terminal settings were updated using the Customer Area or the Management API. (required). - /// The user that updated the terminal settings. Can be Adyen or your API credential username. (required). - public TerminalSettingsData(string companyId = default(string), string merchantId = default(string), string storeId = default(string), string terminalId = default(string), UpdateSourceEnum updateSource = default(UpdateSourceEnum), string user = default(string)) - { - this.UpdateSource = updateSource; - this.User = user; - this.CompanyId = companyId; - this.MerchantId = merchantId; - this.StoreId = storeId; - this.TerminalId = terminalId; - } - - /// - /// The unique identifier of the company account. - /// - /// The unique identifier of the company account. - [DataMember(Name = "companyId", EmitDefaultValue = false)] - public string CompanyId { get; set; } - - /// - /// The unique identifier of the merchant account. - /// - /// The unique identifier of the merchant account. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The unique identifier of the store. - /// - /// The unique identifier of the store. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// The unique identifier of the terminal. - /// - /// The unique identifier of the terminal. - [DataMember(Name = "terminalId", EmitDefaultValue = false)] - public string TerminalId { get; set; } - - /// - /// The user that updated the terminal settings. Can be Adyen or your API credential username. - /// - /// The user that updated the terminal settings. Can be Adyen or your API credential username. - [DataMember(Name = "user", IsRequired = false, EmitDefaultValue = false)] - public string User { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalSettingsData {\n"); - sb.Append(" CompanyId: ").Append(CompanyId).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append(" TerminalId: ").Append(TerminalId).Append("\n"); - sb.Append(" UpdateSource: ").Append(UpdateSource).Append("\n"); - sb.Append(" User: ").Append(User).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalSettingsData); - } - - /// - /// Returns true if TerminalSettingsData instances are equal - /// - /// Instance of TerminalSettingsData to be compared - /// Boolean - public bool Equals(TerminalSettingsData input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyId == input.CompanyId || - (this.CompanyId != null && - this.CompanyId.Equals(input.CompanyId)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ) && - ( - this.TerminalId == input.TerminalId || - (this.TerminalId != null && - this.TerminalId.Equals(input.TerminalId)) - ) && - ( - this.UpdateSource == input.UpdateSource || - this.UpdateSource.Equals(input.UpdateSource) - ) && - ( - this.User == input.User || - (this.User != null && - this.User.Equals(input.User)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyId != null) - { - hashCode = (hashCode * 59) + this.CompanyId.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - if (this.TerminalId != null) - { - hashCode = (hashCode * 59) + this.TerminalId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UpdateSource.GetHashCode(); - if (this.User != null) - { - hashCode = (hashCode * 59) + this.User.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationRequest.cs b/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationRequest.cs deleted file mode 100644 index 5ccf7bdcc..000000000 --- a/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// TerminalSettingsNotificationRequest - /// - [DataContract(Name = "TerminalSettingsNotificationRequest")] - public partial class TerminalSettingsNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of notification. - /// - /// Type of notification. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum TerminalSettingsModified for value: terminalSettings.modified - /// - [EnumMember(Value = "terminalSettings.modified")] - TerminalSettingsModified = 1 - - } - - - /// - /// Type of notification. - /// - /// Type of notification. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TerminalSettingsNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Timestamp for when the webhook was created. (required). - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// Type of notification. (required). - public TerminalSettingsNotificationRequest(DateTime createdAt = default(DateTime), TerminalSettingsData data = default(TerminalSettingsData), string environment = default(string), TypeEnum type = default(TypeEnum)) - { - this.CreatedAt = createdAt; - this.Data = data; - this.Environment = environment; - this.Type = type; - } - - /// - /// Timestamp for when the webhook was created. - /// - /// Timestamp for when the webhook was created. - [DataMember(Name = "createdAt", IsRequired = false, EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public TerminalSettingsData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalSettingsNotificationRequest {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalSettingsNotificationRequest); - } - - /// - /// Returns true if TerminalSettingsNotificationRequest instances are equal - /// - /// Instance of TerminalSettingsNotificationRequest to be compared - /// Boolean - public bool Equals(TerminalSettingsNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationResponse.cs b/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationResponse.cs deleted file mode 100644 index a1b5873d1..000000000 --- a/Adyen/Model/ManagementWebhooks/TerminalSettingsNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// TerminalSettingsNotificationResponse - /// - [DataContract(Name = "TerminalSettingsNotificationResponse")] - public partial class TerminalSettingsNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public TerminalSettingsNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TerminalSettingsNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TerminalSettingsNotificationResponse); - } - - /// - /// Returns true if TerminalSettingsNotificationResponse instances are equal - /// - /// Instance of TerminalSettingsNotificationResponse to be compared - /// Boolean - public bool Equals(TerminalSettingsNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/VerificationError.cs b/Adyen/Model/ManagementWebhooks/VerificationError.cs deleted file mode 100644 index a529d7dae..000000000 --- a/Adyen/Model/ManagementWebhooks/VerificationError.cs +++ /dev/null @@ -1,230 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// VerificationError - /// - [DataContract(Name = "VerificationError")] - public partial class VerificationError : IEquatable, IValidatableObject - { - /// - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. - /// - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DataMissing for value: dataMissing - /// - [EnumMember(Value = "dataMissing")] - DataMissing = 1, - - /// - /// Enum InvalidInput for value: invalidInput - /// - [EnumMember(Value = "invalidInput")] - InvalidInput = 2, - - /// - /// Enum PendingStatus for value: pendingStatus - /// - [EnumMember(Value = "pendingStatus")] - PendingStatus = 3 - - } - - - /// - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. - /// - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The verification error code.. - /// The verification error message.. - /// The actions that you can take to resolve the verification error.. - /// More granular information about the verification error.. - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**.. - public VerificationError(string code = default(string), string message = default(string), List remediatingActions = default(List), List subErrors = default(List), TypeEnum? type = default(TypeEnum?)) - { - this.Code = code; - this.Message = message; - this.RemediatingActions = remediatingActions; - this.SubErrors = subErrors; - this.Type = type; - } - - /// - /// The verification error code. - /// - /// The verification error code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The verification error message. - /// - /// The verification error message. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The actions that you can take to resolve the verification error. - /// - /// The actions that you can take to resolve the verification error. - [DataMember(Name = "remediatingActions", EmitDefaultValue = false)] - public List RemediatingActions { get; set; } - - /// - /// More granular information about the verification error. - /// - /// More granular information about the verification error. - [DataMember(Name = "subErrors", EmitDefaultValue = false)] - public List SubErrors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationError {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" RemediatingActions: ").Append(RemediatingActions).Append("\n"); - sb.Append(" SubErrors: ").Append(SubErrors).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationError); - } - - /// - /// Returns true if VerificationError instances are equal - /// - /// Instance of VerificationError to be compared - /// Boolean - public bool Equals(VerificationError input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.RemediatingActions == input.RemediatingActions || - this.RemediatingActions != null && - input.RemediatingActions != null && - this.RemediatingActions.SequenceEqual(input.RemediatingActions) - ) && - ( - this.SubErrors == input.SubErrors || - this.SubErrors != null && - input.SubErrors != null && - this.SubErrors.SequenceEqual(input.SubErrors) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.RemediatingActions != null) - { - hashCode = (hashCode * 59) + this.RemediatingActions.GetHashCode(); - } - if (this.SubErrors != null) - { - hashCode = (hashCode * 59) + this.SubErrors.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.cs b/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.cs deleted file mode 100644 index b2347d5d1..000000000 --- a/Adyen/Model/ManagementWebhooks/VerificationErrorRecursive.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Management Webhooks -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ManagementWebhooks -{ - /// - /// VerificationErrorRecursive - /// - [DataContract(Name = "VerificationError-recursive")] - public partial class VerificationErrorRecursive : IEquatable, IValidatableObject - { - /// - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. - /// - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DataMissing for value: dataMissing - /// - [EnumMember(Value = "dataMissing")] - DataMissing = 1, - - /// - /// Enum InvalidInput for value: invalidInput - /// - [EnumMember(Value = "invalidInput")] - InvalidInput = 2, - - /// - /// Enum PendingStatus for value: pendingStatus - /// - [EnumMember(Value = "pendingStatus")] - PendingStatus = 3 - - } - - - /// - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. - /// - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The verification error code.. - /// The verification error message.. - /// The type of verification error. Possible values: **invalidInput**, **dataMissing**, and **pendingStatus**.. - /// The actions that you can take to resolve the verification error.. - public VerificationErrorRecursive(string code = default(string), string message = default(string), TypeEnum? type = default(TypeEnum?), List remediatingActions = default(List)) - { - this.Code = code; - this.Message = message; - this.Type = type; - this.RemediatingActions = remediatingActions; - } - - /// - /// The verification error code. - /// - /// The verification error code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The verification error message. - /// - /// The verification error message. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The actions that you can take to resolve the verification error. - /// - /// The actions that you can take to resolve the verification error. - [DataMember(Name = "remediatingActions", EmitDefaultValue = false)] - public List RemediatingActions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class VerificationErrorRecursive {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" RemediatingActions: ").Append(RemediatingActions).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as VerificationErrorRecursive); - } - - /// - /// Returns true if VerificationErrorRecursive instances are equal - /// - /// Instance of VerificationErrorRecursive to be compared - /// Boolean - public bool Equals(VerificationErrorRecursive input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.RemediatingActions == input.RemediatingActions || - this.RemediatingActions != null && - input.RemediatingActions != null && - this.RemediatingActions.SequenceEqual(input.RemediatingActions) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.RemediatingActions != null) - { - hashCode = (hashCode * 59) + this.RemediatingActions.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/NegativeBalanceWarningWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/NegativeBalanceWarningWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index f938f5ba5..000000000 --- a/Adyen/Model/NegativeBalanceWarningWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Negative balance compensation warning -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.NegativeBalanceWarningWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.cs b/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.cs deleted file mode 100644 index c4429e3d6..000000000 --- a/Adyen/Model/NegativeBalanceWarningWebhooks/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Negative balance compensation warning -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.NegativeBalanceWarningWebhooks -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationData.cs b/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationData.cs deleted file mode 100644 index 51e4f29a2..000000000 --- a/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationData.cs +++ /dev/null @@ -1,260 +0,0 @@ -/* -* Negative balance compensation warning -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.NegativeBalanceWarningWebhooks -{ - /// - /// NegativeBalanceCompensationWarningNotificationData - /// - [DataContract(Name = "NegativeBalanceCompensationWarningNotificationData")] - public partial class NegativeBalanceCompensationWarningNotificationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountHolder. - /// amount. - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The ID of the resource.. - /// The balance account ID of the account that will be used to compensate the balance account whose balance is negative.. - /// The date the balance for the account became negative.. - /// The date when a compensation transfer to the account is scheduled to happen.. - public NegativeBalanceCompensationWarningNotificationData(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), string balancePlatform = default(string), DateTime creationDate = default(DateTime), string id = default(string), string liableBalanceAccountId = default(string), DateTime negativeBalanceSince = default(DateTime), DateTime scheduledCompensationAt = default(DateTime)) - { - this.AccountHolder = accountHolder; - this.Amount = amount; - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Id = id; - this.LiableBalanceAccountId = liableBalanceAccountId; - this.NegativeBalanceSince = negativeBalanceSince; - this.ScheduledCompensationAt = scheduledCompensationAt; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", EmitDefaultValue = false)] - public ResourceReference AccountHolder { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The balance account ID of the account that will be used to compensate the balance account whose balance is negative. - /// - /// The balance account ID of the account that will be used to compensate the balance account whose balance is negative. - [DataMember(Name = "liableBalanceAccountId", EmitDefaultValue = false)] - public string LiableBalanceAccountId { get; set; } - - /// - /// The date the balance for the account became negative. - /// - /// The date the balance for the account became negative. - [DataMember(Name = "negativeBalanceSince", EmitDefaultValue = false)] - public DateTime NegativeBalanceSince { get; set; } - - /// - /// The date when a compensation transfer to the account is scheduled to happen. - /// - /// The date when a compensation transfer to the account is scheduled to happen. - [DataMember(Name = "scheduledCompensationAt", EmitDefaultValue = false)] - public DateTime ScheduledCompensationAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NegativeBalanceCompensationWarningNotificationData {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" LiableBalanceAccountId: ").Append(LiableBalanceAccountId).Append("\n"); - sb.Append(" NegativeBalanceSince: ").Append(NegativeBalanceSince).Append("\n"); - sb.Append(" ScheduledCompensationAt: ").Append(ScheduledCompensationAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NegativeBalanceCompensationWarningNotificationData); - } - - /// - /// Returns true if NegativeBalanceCompensationWarningNotificationData instances are equal - /// - /// Instance of NegativeBalanceCompensationWarningNotificationData to be compared - /// Boolean - public bool Equals(NegativeBalanceCompensationWarningNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LiableBalanceAccountId == input.LiableBalanceAccountId || - (this.LiableBalanceAccountId != null && - this.LiableBalanceAccountId.Equals(input.LiableBalanceAccountId)) - ) && - ( - this.NegativeBalanceSince == input.NegativeBalanceSince || - (this.NegativeBalanceSince != null && - this.NegativeBalanceSince.Equals(input.NegativeBalanceSince)) - ) && - ( - this.ScheduledCompensationAt == input.ScheduledCompensationAt || - (this.ScheduledCompensationAt != null && - this.ScheduledCompensationAt.Equals(input.ScheduledCompensationAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LiableBalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.LiableBalanceAccountId.GetHashCode(); - } - if (this.NegativeBalanceSince != null) - { - hashCode = (hashCode * 59) + this.NegativeBalanceSince.GetHashCode(); - } - if (this.ScheduledCompensationAt != null) - { - hashCode = (hashCode * 59) + this.ScheduledCompensationAt.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.cs b/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.cs deleted file mode 100644 index 536d563ae..000000000 --- a/Adyen/Model/NegativeBalanceWarningWebhooks/NegativeBalanceCompensationWarningNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Negative balance compensation warning -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.NegativeBalanceWarningWebhooks -{ - /// - /// NegativeBalanceCompensationWarningNotificationRequest - /// - [DataContract(Name = "NegativeBalanceCompensationWarningNotificationRequest")] - public partial class NegativeBalanceCompensationWarningNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of webhook. - /// - /// Type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BalancePlatformNegativeBalanceCompensationWarningScheduled for value: balancePlatform.negativeBalanceCompensationWarning.scheduled - /// - [EnumMember(Value = "balancePlatform.negativeBalanceCompensationWarning.scheduled")] - BalancePlatformNegativeBalanceCompensationWarningScheduled = 1 - - } - - - /// - /// Type of webhook. - /// - /// Type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NegativeBalanceCompensationWarningNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of webhook. (required). - public NegativeBalanceCompensationWarningNotificationRequest(NegativeBalanceCompensationWarningNotificationData data = default(NegativeBalanceCompensationWarningNotificationData), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public NegativeBalanceCompensationWarningNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NegativeBalanceCompensationWarningNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NegativeBalanceCompensationWarningNotificationRequest); - } - - /// - /// Returns true if NegativeBalanceCompensationWarningNotificationRequest instances are equal - /// - /// Instance of NegativeBalanceCompensationWarningNotificationRequest to be compared - /// Boolean - public bool Equals(NegativeBalanceCompensationWarningNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.cs b/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.cs deleted file mode 100644 index 6a1cea6a5..000000000 --- a/Adyen/Model/NegativeBalanceWarningWebhooks/Resource.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Negative balance compensation warning -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.NegativeBalanceWarningWebhooks -{ - /// - /// Resource - /// - [DataContract(Name = "Resource")] - public partial class Resource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The ID of the resource.. - public Resource(string balancePlatform = default(string), DateTime creationDate = default(DateTime), string id = default(string)) - { - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Id = id; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Resource {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Resource); - } - - /// - /// Returns true if Resource instances are equal - /// - /// Instance of Resource to be compared - /// Boolean - public bool Equals(Resource input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.cs b/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.cs deleted file mode 100644 index 5f34a4fec..000000000 --- a/Adyen/Model/NegativeBalanceWarningWebhooks/ResourceReference.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Negative balance compensation warning -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.NegativeBalanceWarningWebhooks -{ - /// - /// ResourceReference - /// - [DataContract(Name = "ResourceReference")] - public partial class ResourceReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The reference for the resource.. - public ResourceReference(string description = default(string), string id = default(string), string reference = default(string)) - { - this.Description = description; - this.Id = id; - this.Reference = reference; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResourceReference {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResourceReference); - } - - /// - /// Returns true if ResourceReference instances are equal - /// - /// Instance of ResourceReference to be compared - /// Boolean - public bool Equals(ResourceReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Notification/NotificationRequest.cs b/Adyen/Model/Notification/NotificationRequest.cs deleted file mode 100644 index 038da3cba..000000000 --- a/Adyen/Model/Notification/NotificationRequest.cs +++ /dev/null @@ -1,61 +0,0 @@ -#region License -// /* -// * ###### -// * ###### -// * ############ ####( ###### #####. ###### ############ ############ -// * ############# #####( ###### #####. ###### ############# ############# -// * ###### #####( ###### #####. ###### ##### ###### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ###### -// * ############# ############# ############# ############# ##### ###### -// * ############ ############ ############# ############ ##### ###### -// * ###### -// * ############# -// * ############ -// * -// * Adyen Dotnet API Library -// * -// * Copyright (c) 2020 Adyen B.V. -// * This file is open source and available under the MIT license. -// * See the LICENSE file for more info. -// */ -#endregion - -using Newtonsoft.Json; -using System.Collections.Generic; -using System.Text; - -namespace Adyen.Model.Notification -{ - public class NotificationRequest - { - public string Live { get; set; } - - [JsonProperty("NotificationItems")] - public List NotificationItemContainers { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class NotificationRequest {\n"); - sb.Append(" Live: ").Append(this.Live).Append("\n"); - sb.Append(" NotificationItemContainers: ").Append(NotificationItemContainers).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - } -} diff --git a/Adyen/Model/Notification/NotificationRequestConst.cs b/Adyen/Model/Notification/NotificationRequestConst.cs deleted file mode 100644 index bcbe9af48..000000000 --- a/Adyen/Model/Notification/NotificationRequestConst.cs +++ /dev/null @@ -1,68 +0,0 @@ -#region License -// /* -// * ###### -// * ###### -// * ############ ####( ###### #####. ###### ############ ############ -// * ############# #####( ###### #####. ###### ############# ############# -// * ###### #####( ###### #####. ###### ##### ###### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ###### -// * ############# ############# ############# ############# ##### ###### -// * ############ ############ ############# ############ ##### ###### -// * ###### -// * ############# -// * ############ -// * -// * Adyen Dotnet API Library -// * -// * Copyright (c) 2020 Adyen B.V. -// * This file is open source and available under the MIT license. -// * See the LICENSE file for more info. -// */ -#endregion - -namespace Adyen.Model.Notification -{ - public class NotificationRequestConst - { - //Event codes - public const string EventCodeAuthorisation = "AUTHORISATION"; - public const string EventCodeAuthorisationAdjustment = "AUTHORISATION_ADJUSTMENT"; - public const string EventCodeCancellation = "CANCELLATION"; - public const string EventCodeCancelOrRefund = "CANCEL_OR_REFUND"; - public const string EventCodeCapture = "CAPTURE"; - public const string EventCodeCaptureFailed = "CAPTURE_FAILED"; - public const string EventCodeChargeback = "CHARGEBACK"; - public const string EventCodeChargebackReversed = "CHARGEBACK_REVERSED"; - public const string EventCodeHandledExternally = "HANDLED_EXTERNALLY"; - public const string EventCodeManualReviewAccept = "MANUAL_REVIEW_ACCEPT"; - public const string EventCodeManualReviewReject = "MANUAL_REVIEW_REJECT"; - public const string EventCodeNotificationOfChargeback = "NOTIFICATION_OF_CHARGEBACK"; - public const string EventCodeNotificationOfFraud = "NOTIFICATION_OF_FRAUD"; - public const string EventCodeOfferClosed = "OFFER_CLOSED"; - public const string EventCodeOrderClosed = "ORDER_CLOSED"; - public const string EventCodeOrderOpened = "ORDER_OPENED"; - public const string EventCodePaidoutReversed = "PAIDOUT_REVERSED"; - public const string EventCodePayoutDecline = "PAYOUT_DECLINE"; - public const string EventCodePayoutExpire = "PAYOUT_EXPIRE"; - public const string EventCodePayoutThirdparty = "PAYOUT_THIRDPARTY"; - public const string EventCodePending = "PENDING"; - public const string EventCodePostponedRefund = "POSTPONED_REFUND"; - public const string EventCodePrearbitrationLost = "PREARBITRATION_LOST"; - public const string EventCodePrearbitrationWon = "PREARBITRATION_WON"; - public const string EventCodeProcessRetry = "PROCESS_RETRY"; - public const string EventCodeRecurringContract = "RECURRING_CONTRACT"; - public const string EventCodeRefund = "REFUND"; - public const string EventCodeRefundedReversed = "REFUNDED_REVERSED"; - public const string EventCodeRefundFailed = "REFUND_FAILED"; - public const string EventCodeRefundWithData = "REFUND_WITH_DATA"; - public const string EventCodeReportAvailable = "REPORT_AVAILABLE"; - public const string EventCodeRequestForInformation = "REQUEST_FOR_INFORMATION"; - public const string EventCodeSecondChargeback = "SECOND_CHARGEBACK"; - public const string EventCodeVoidPendingRefund = "VOID_PENDING_REFUND"; - - //Additional Data - public const string AdditionalDataTotalFraudScore = "totalFraudScore"; - public const string AdditionalDataFraudCheckPattern = "fraudCheck-(\\d+)-([A-Za-z0-9]+)"; - } -} \ No newline at end of file diff --git a/Adyen/Model/Notification/NotificationRequestItem.cs b/Adyen/Model/Notification/NotificationRequestItem.cs deleted file mode 100644 index 153a43583..000000000 --- a/Adyen/Model/Notification/NotificationRequestItem.cs +++ /dev/null @@ -1,44 +0,0 @@ -#region License -// /* -// * ###### -// * ###### -// * ############ ####( ###### #####. ###### ############ ############ -// * ############# #####( ###### #####. ###### ############# ############# -// * ###### #####( ###### #####. ###### ##### ###### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ###### -// * ############# ############# ############# ############# ##### ###### -// * ############ ############ ############# ############ ##### ###### -// * ###### -// * ############# -// * ############ -// * -// * Adyen Dotnet API Library -// * -// * Copyright (c) 2020 Adyen B.V. -// * This file is open source and available under the MIT license. -// * See the LICENSE file for more info. -// */ -#endregion - -using System.Collections.Generic; -using Adyen.Model.Checkout; - -namespace Adyen.Model.Notification -{ - public class NotificationRequestItem - { - public Amount Amount { get; set; } - public string EventCode { get; set; } - public string EventDate { get; set; } - public string MerchantAccountCode { get; set; } - public string MerchantReference { get; set; } - public string OriginalReference { get; set; } - public string PspReference { get; set; } - public string Reason { get; set; } - public bool Success { get; set; } - public string PaymentMethod { get; set; } - public List Operations { get; set; } - public Dictionary AdditionalData { get; set; } - } -} \ No newline at end of file diff --git a/Adyen/Model/Notification/NotificationRequestItemContainer.cs b/Adyen/Model/Notification/NotificationRequestItemContainer.cs deleted file mode 100644 index 01ea102cd..000000000 --- a/Adyen/Model/Notification/NotificationRequestItemContainer.cs +++ /dev/null @@ -1,46 +0,0 @@ -#region License -// /* -// * ###### -// * ###### -// * ############ ####( ###### #####. ###### ############ ############ -// * ############# #####( ###### #####. ###### ############# ############# -// * ###### #####( ###### #####. ###### ##### ###### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ##### ###### -// * ###### ###### #####( ###### #####. ###### ##### ##### ###### -// * ############# ############# ############# ############# ##### ###### -// * ############ ############ ############# ############ ##### ###### -// * ###### -// * ############# -// * ############ -// * -// * Adyen Dotnet API Library -// * -// * Copyright (c) 2020 Adyen B.V. -// * This file is open source and available under the MIT license. -// * See the LICENSE file for more info. -// */ -#endregion - -using Adyen.Util; -using System.Text; - -namespace Adyen.Model.Notification -{ - using Newtonsoft.Json; - - public class NotificationRequestItemContainer - { - [JsonProperty("NotificationRequestItem")] - public NotificationRequestItem NotificationItem { get; set; } - - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NotificationRequestItemContainer {\n"); - - sb.Append(" notificationItem: ").Append(NotificationItem).Append("\n"); - sb.Append("}"); - return sb.ToString(); - } - } -} \ No newline at end of file diff --git a/Adyen/Model/PaymentsApp/AbstractOpenAPISchema.cs b/Adyen/Model/PaymentsApp/AbstractOpenAPISchema.cs deleted file mode 100644 index 2ea557709..000000000 --- a/Adyen/Model/PaymentsApp/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Payments App API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.PaymentsApp -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/PaymentsApp/BoardingTokenRequest.cs b/Adyen/Model/PaymentsApp/BoardingTokenRequest.cs deleted file mode 100644 index 65d6e80e9..000000000 --- a/Adyen/Model/PaymentsApp/BoardingTokenRequest.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Payments App API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PaymentsApp -{ - /// - /// BoardingTokenRequest - /// - [DataContract(Name = "BoardingTokenRequest")] - public partial class BoardingTokenRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BoardingTokenRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The boardingToken request token. (required). - public BoardingTokenRequest(string boardingRequestToken = default(string)) - { - this.BoardingRequestToken = boardingRequestToken; - } - - /// - /// The boardingToken request token. - /// - /// The boardingToken request token. - [DataMember(Name = "boardingRequestToken", IsRequired = false, EmitDefaultValue = false)] - public string BoardingRequestToken { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BoardingTokenRequest {\n"); - sb.Append(" BoardingRequestToken: ").Append(BoardingRequestToken).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BoardingTokenRequest); - } - - /// - /// Returns true if BoardingTokenRequest instances are equal - /// - /// Instance of BoardingTokenRequest to be compared - /// Boolean - public bool Equals(BoardingTokenRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.BoardingRequestToken == input.BoardingRequestToken || - (this.BoardingRequestToken != null && - this.BoardingRequestToken.Equals(input.BoardingRequestToken)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BoardingRequestToken != null) - { - hashCode = (hashCode * 59) + this.BoardingRequestToken.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PaymentsApp/BoardingTokenResponse.cs b/Adyen/Model/PaymentsApp/BoardingTokenResponse.cs deleted file mode 100644 index 60e754525..000000000 --- a/Adyen/Model/PaymentsApp/BoardingTokenResponse.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Payments App API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PaymentsApp -{ - /// - /// BoardingTokenResponse - /// - [DataContract(Name = "BoardingTokenResponse")] - public partial class BoardingTokenResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BoardingTokenResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The boarding token that allows the Payments App to board. (required). - /// The unique identifier of the Payments App instance. (required). - public BoardingTokenResponse(string boardingToken = default(string), string installationId = default(string)) - { - this.BoardingToken = boardingToken; - this.InstallationId = installationId; - } - - /// - /// The boarding token that allows the Payments App to board. - /// - /// The boarding token that allows the Payments App to board. - [DataMember(Name = "boardingToken", IsRequired = false, EmitDefaultValue = false)] - public string BoardingToken { get; set; } - - /// - /// The unique identifier of the Payments App instance. - /// - /// The unique identifier of the Payments App instance. - [DataMember(Name = "installationId", IsRequired = false, EmitDefaultValue = false)] - public string InstallationId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BoardingTokenResponse {\n"); - sb.Append(" BoardingToken: ").Append(BoardingToken).Append("\n"); - sb.Append(" InstallationId: ").Append(InstallationId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BoardingTokenResponse); - } - - /// - /// Returns true if BoardingTokenResponse instances are equal - /// - /// Instance of BoardingTokenResponse to be compared - /// Boolean - public bool Equals(BoardingTokenResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.BoardingToken == input.BoardingToken || - (this.BoardingToken != null && - this.BoardingToken.Equals(input.BoardingToken)) - ) && - ( - this.InstallationId == input.InstallationId || - (this.InstallationId != null && - this.InstallationId.Equals(input.InstallationId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BoardingToken != null) - { - hashCode = (hashCode * 59) + this.BoardingToken.GetHashCode(); - } - if (this.InstallationId != null) - { - hashCode = (hashCode * 59) + this.InstallationId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.cs b/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.cs deleted file mode 100644 index 8eb7552b6..000000000 --- a/Adyen/Model/PaymentsApp/DefaultErrorResponseEntity.cs +++ /dev/null @@ -1,259 +0,0 @@ -/* -* Payments App API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PaymentsApp -{ - /// - /// Standardized error response following RFC-7807 format - /// - [DataContract(Name = "DefaultErrorResponseEntity")] - public partial class DefaultErrorResponseEntity : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A human-readable explanation specific to this occurrence of the problem.. - /// Unique business error code.. - /// A URI that identifies the specific occurrence of the problem if applicable.. - /// Array of fields with validation errors when applicable.. - /// The unique reference for the request.. - /// The HTTP status code.. - /// A short, human-readable summary of the problem type.. - /// A URI that identifies the validation error type. It points to human-readable documentation for the problem type.. - public DefaultErrorResponseEntity(string detail = default(string), string errorCode = default(string), string instance = default(string), List invalidFields = default(List), string requestId = default(string), int? status = default(int?), string title = default(string), string type = default(string)) - { - this.Detail = detail; - this.ErrorCode = errorCode; - this.Instance = instance; - this.InvalidFields = invalidFields; - this.RequestId = requestId; - this.Status = status; - this.Title = title; - this.Type = type; - } - - /// - /// A human-readable explanation specific to this occurrence of the problem. - /// - /// A human-readable explanation specific to this occurrence of the problem. - [DataMember(Name = "detail", EmitDefaultValue = false)] - public string Detail { get; set; } - - /// - /// Unique business error code. - /// - /// Unique business error code. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// A URI that identifies the specific occurrence of the problem if applicable. - /// - /// A URI that identifies the specific occurrence of the problem if applicable. - [DataMember(Name = "instance", EmitDefaultValue = false)] - public string Instance { get; set; } - - /// - /// Array of fields with validation errors when applicable. - /// - /// Array of fields with validation errors when applicable. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The unique reference for the request. - /// - /// The unique reference for the request. - [DataMember(Name = "requestId", EmitDefaultValue = false)] - public string RequestId { get; set; } - - /// - /// The HTTP status code. - /// - /// The HTTP status code. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// A short, human-readable summary of the problem type. - /// - /// A short, human-readable summary of the problem type. - [DataMember(Name = "title", EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// A URI that identifies the validation error type. It points to human-readable documentation for the problem type. - /// - /// A URI that identifies the validation error type. It points to human-readable documentation for the problem type. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DefaultErrorResponseEntity {\n"); - sb.Append(" Detail: ").Append(Detail).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Instance: ").Append(Instance).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" RequestId: ").Append(RequestId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DefaultErrorResponseEntity); - } - - /// - /// Returns true if DefaultErrorResponseEntity instances are equal - /// - /// Instance of DefaultErrorResponseEntity to be compared - /// Boolean - public bool Equals(DefaultErrorResponseEntity input) - { - if (input == null) - { - return false; - } - return - ( - this.Detail == input.Detail || - (this.Detail != null && - this.Detail.Equals(input.Detail)) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.Instance == input.Instance || - (this.Instance != null && - this.Instance.Equals(input.Instance)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.RequestId == input.RequestId || - (this.RequestId != null && - this.RequestId.Equals(input.RequestId)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Detail != null) - { - hashCode = (hashCode * 59) + this.Detail.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.Instance != null) - { - hashCode = (hashCode * 59) + this.Instance.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.RequestId != null) - { - hashCode = (hashCode * 59) + this.RequestId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PaymentsApp/InvalidField.cs b/Adyen/Model/PaymentsApp/InvalidField.cs deleted file mode 100644 index 903c312dd..000000000 --- a/Adyen/Model/PaymentsApp/InvalidField.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Payments App API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PaymentsApp -{ - /// - /// InvalidField - /// - [DataContract(Name = "InvalidField")] - public partial class InvalidField : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InvalidField() { } - /// - /// Initializes a new instance of the class. - /// - /// The field that has an invalid value. (required). - /// The invalid value. (required). - /// Description of the validation error. (required). - public InvalidField(string name = default(string), string value = default(string), string message = default(string)) - { - this.Name = name; - this.Value = value; - this.Message = message; - } - - /// - /// The field that has an invalid value. - /// - /// The field that has an invalid value. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The invalid value. - /// - /// The invalid value. - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Description of the validation error. - /// - /// Description of the validation error. - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InvalidField {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InvalidField); - } - - /// - /// Returns true if InvalidField instances are equal - /// - /// Instance of InvalidField to be compared - /// Boolean - public bool Equals(InvalidField input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PaymentsApp/PaymentsAppDto.cs b/Adyen/Model/PaymentsApp/PaymentsAppDto.cs deleted file mode 100644 index 299067e58..000000000 --- a/Adyen/Model/PaymentsApp/PaymentsAppDto.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Payments App API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PaymentsApp -{ - /// - /// PaymentsAppDto - /// - [DataContract(Name = "PaymentsAppDto")] - public partial class PaymentsAppDto : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentsAppDto() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the Payments App instance. (required). - /// The account code associated with the Payments App instance. (required). - /// The store code associated with the Payments App instance.. - /// The status of the Payments App instance. (required). - public PaymentsAppDto(string installationId = default(string), string merchantAccountCode = default(string), string merchantStoreCode = default(string), string status = default(string)) - { - this.InstallationId = installationId; - this.MerchantAccountCode = merchantAccountCode; - this.Status = status; - this.MerchantStoreCode = merchantStoreCode; - } - - /// - /// The unique identifier of the Payments App instance. - /// - /// The unique identifier of the Payments App instance. - [DataMember(Name = "installationId", IsRequired = false, EmitDefaultValue = false)] - public string InstallationId { get; set; } - - /// - /// The account code associated with the Payments App instance. - /// - /// The account code associated with the Payments App instance. - [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// The store code associated with the Payments App instance. - /// - /// The store code associated with the Payments App instance. - [DataMember(Name = "merchantStoreCode", EmitDefaultValue = false)] - public string MerchantStoreCode { get; set; } - - /// - /// The status of the Payments App instance. - /// - /// The status of the Payments App instance. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentsAppDto {\n"); - sb.Append(" InstallationId: ").Append(InstallationId).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append(" MerchantStoreCode: ").Append(MerchantStoreCode).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentsAppDto); - } - - /// - /// Returns true if PaymentsAppDto instances are equal - /// - /// Instance of PaymentsAppDto to be compared - /// Boolean - public bool Equals(PaymentsAppDto input) - { - if (input == null) - { - return false; - } - return - ( - this.InstallationId == input.InstallationId || - (this.InstallationId != null && - this.InstallationId.Equals(input.InstallationId)) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ) && - ( - this.MerchantStoreCode == input.MerchantStoreCode || - (this.MerchantStoreCode != null && - this.MerchantStoreCode.Equals(input.MerchantStoreCode)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InstallationId != null) - { - hashCode = (hashCode * 59) + this.InstallationId.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - if (this.MerchantStoreCode != null) - { - hashCode = (hashCode * 59) + this.MerchantStoreCode.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PaymentsApp/PaymentsAppResponse.cs b/Adyen/Model/PaymentsApp/PaymentsAppResponse.cs deleted file mode 100644 index 6936546f1..000000000 --- a/Adyen/Model/PaymentsApp/PaymentsAppResponse.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Payments App API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PaymentsApp -{ - /// - /// PaymentsAppResponse - /// - [DataContract(Name = "PaymentsAppResponse")] - public partial class PaymentsAppResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentsAppResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// List of Payments Apps. (required). - public PaymentsAppResponse(List paymentsApps = default(List)) - { - this.PaymentsApps = paymentsApps; - } - - /// - /// List of Payments Apps. - /// - /// List of Payments Apps. - [DataMember(Name = "paymentsApps", IsRequired = false, EmitDefaultValue = false)] - public List PaymentsApps { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentsAppResponse {\n"); - sb.Append(" PaymentsApps: ").Append(PaymentsApps).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentsAppResponse); - } - - /// - /// Returns true if PaymentsAppResponse instances are equal - /// - /// Instance of PaymentsAppResponse to be compared - /// Boolean - public bool Equals(PaymentsAppResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.PaymentsApps == input.PaymentsApps || - this.PaymentsApps != null && - input.PaymentsApps != null && - this.PaymentsApps.SequenceEqual(input.PaymentsApps) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PaymentsApps != null) - { - hashCode = (hashCode * 59) + this.PaymentsApps.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/AbstractOpenAPISchema.cs b/Adyen/Model/Payout/AbstractOpenAPISchema.cs deleted file mode 100644 index 036cde57b..000000000 --- a/Adyen/Model/Payout/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.Payout -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/Payout/Address.cs b/Adyen/Model/Payout/Address.cs deleted file mode 100644 index 024473717..000000000 --- a/Adyen/Model/Payout/Address.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Address() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Maximum length: 3000 characters. (required). - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// The number or name of the house. Maximum length: 3000 characters. (required). - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). - public Address(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.City = city; - this.Country = country; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.Street = street; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Maximum length: 3000 characters. - /// - /// The name of the city. Maximum length: 3000 characters. - [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The number or name of the house. Maximum length: 3000 characters. - /// - /// The number or name of the house. Maximum length: 3000 characters. - [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) maxLength - if (this.City != null && this.City.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); - } - - // HouseNumberOrName (string) maxLength - if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); - } - - // Street (string) maxLength - if (this.Street != null && this.Street.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/Amount.cs b/Adyen/Model/Payout/Amount.cs deleted file mode 100644 index cbd0cd634..000000000 --- a/Adyen/Model/Payout/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/BankAccount.cs b/Adyen/Model/Payout/BankAccount.cs deleted file mode 100644 index 620c4958d..000000000 --- a/Adyen/Model/Payout/BankAccount.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// BankAccount - /// - [DataContract(Name = "BankAccount")] - public partial class BankAccount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators).. - /// The bank city.. - /// The location id of the bank. The field value is `nil` in most cases.. - /// The name of the bank.. - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.. - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').. - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).. - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.. - /// The bank account holder's tax ID.. - public BankAccount(string bankAccountNumber = default(string), string bankCity = default(string), string bankLocationId = default(string), string bankName = default(string), string bic = default(string), string countryCode = default(string), string iban = default(string), string ownerName = default(string), string taxId = default(string)) - { - this.BankAccountNumber = bankAccountNumber; - this.BankCity = bankCity; - this.BankLocationId = bankLocationId; - this.BankName = bankName; - this.Bic = bic; - this.CountryCode = countryCode; - this.Iban = iban; - this.OwnerName = ownerName; - this.TaxId = taxId; - } - - /// - /// The bank account number (without separators). - /// - /// The bank account number (without separators). - [DataMember(Name = "bankAccountNumber", EmitDefaultValue = false)] - public string BankAccountNumber { get; set; } - - /// - /// The bank city. - /// - /// The bank city. - [DataMember(Name = "bankCity", EmitDefaultValue = false)] - public string BankCity { get; set; } - - /// - /// The location id of the bank. The field value is `nil` in most cases. - /// - /// The location id of the bank. The field value is `nil` in most cases. - [DataMember(Name = "bankLocationId", EmitDefaultValue = false)] - public string BankLocationId { get; set; } - - /// - /// The name of the bank. - /// - /// The name of the bank. - [DataMember(Name = "bankName", EmitDefaultValue = false)] - public string BankName { get; set; } - - /// - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - /// - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - [DataMember(Name = "bic", EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL'). - /// - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL'). - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - /// - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The bank account holder's tax ID. - /// - /// The bank account holder's tax ID. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccount {\n"); - sb.Append(" BankAccountNumber: ").Append(BankAccountNumber).Append("\n"); - sb.Append(" BankCity: ").Append(BankCity).Append("\n"); - sb.Append(" BankLocationId: ").Append(BankLocationId).Append("\n"); - sb.Append(" BankName: ").Append(BankName).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccount); - } - - /// - /// Returns true if BankAccount instances are equal - /// - /// Instance of BankAccount to be compared - /// Boolean - public bool Equals(BankAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccountNumber == input.BankAccountNumber || - (this.BankAccountNumber != null && - this.BankAccountNumber.Equals(input.BankAccountNumber)) - ) && - ( - this.BankCity == input.BankCity || - (this.BankCity != null && - this.BankCity.Equals(input.BankCity)) - ) && - ( - this.BankLocationId == input.BankLocationId || - (this.BankLocationId != null && - this.BankLocationId.Equals(input.BankLocationId)) - ) && - ( - this.BankName == input.BankName || - (this.BankName != null && - this.BankName.Equals(input.BankName)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccountNumber != null) - { - hashCode = (hashCode * 59) + this.BankAccountNumber.GetHashCode(); - } - if (this.BankCity != null) - { - hashCode = (hashCode * 59) + this.BankCity.GetHashCode(); - } - if (this.BankLocationId != null) - { - hashCode = (hashCode * 59) + this.BankLocationId.GetHashCode(); - } - if (this.BankName != null) - { - hashCode = (hashCode * 59) + this.BankName.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/Card.cs b/Adyen/Model/Payout/Card.cs deleted file mode 100644 index 540e87def..000000000 --- a/Adyen/Model/Payout/Card.cs +++ /dev/null @@ -1,358 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// Card - /// - [DataContract(Name = "Card")] - public partial class Card : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored.. - /// The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November. - /// The card expiry year. Format: 4 digits. For example: 2020. - /// The name of the cardholder, as printed on the card.. - /// The issue number of the card (for some UK debit cards only).. - /// The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned.. - /// The month component of the start date (for some UK debit cards only).. - /// The year component of the start date (for some UK debit cards only).. - public Card(string cvc = default(string), string expiryMonth = default(string), string expiryYear = default(string), string holderName = default(string), string issueNumber = default(string), string number = default(string), string startMonth = default(string), string startYear = default(string)) - { - this.Cvc = cvc; - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.HolderName = holderName; - this.IssueNumber = issueNumber; - this.Number = number; - this.StartMonth = startMonth; - this.StartYear = startYear; - } - - /// - /// The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored. - /// - /// The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored. - [DataMember(Name = "cvc", EmitDefaultValue = false)] - public string Cvc { get; set; } - - /// - /// The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November - /// - /// The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The card expiry year. Format: 4 digits. For example: 2020 - /// - /// The card expiry year. Format: 4 digits. For example: 2020 - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The name of the cardholder, as printed on the card. - /// - /// The name of the cardholder, as printed on the card. - [DataMember(Name = "holderName", EmitDefaultValue = false)] - public string HolderName { get; set; } - - /// - /// The issue number of the card (for some UK debit cards only). - /// - /// The issue number of the card (for some UK debit cards only). - [DataMember(Name = "issueNumber", EmitDefaultValue = false)] - public string IssueNumber { get; set; } - - /// - /// The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned. - /// - /// The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// The month component of the start date (for some UK debit cards only). - /// - /// The month component of the start date (for some UK debit cards only). - [DataMember(Name = "startMonth", EmitDefaultValue = false)] - public string StartMonth { get; set; } - - /// - /// The year component of the start date (for some UK debit cards only). - /// - /// The year component of the start date (for some UK debit cards only). - [DataMember(Name = "startYear", EmitDefaultValue = false)] - public string StartYear { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Card {\n"); - sb.Append(" Cvc: ").Append(Cvc).Append("\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" HolderName: ").Append(HolderName).Append("\n"); - sb.Append(" IssueNumber: ").Append(IssueNumber).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" StartMonth: ").Append(StartMonth).Append("\n"); - sb.Append(" StartYear: ").Append(StartYear).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Card); - } - - /// - /// Returns true if Card instances are equal - /// - /// Instance of Card to be compared - /// Boolean - public bool Equals(Card input) - { - if (input == null) - { - return false; - } - return - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.HolderName == input.HolderName || - (this.HolderName != null && - this.HolderName.Equals(input.HolderName)) - ) && - ( - this.IssueNumber == input.IssueNumber || - (this.IssueNumber != null && - this.IssueNumber.Equals(input.IssueNumber)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.StartMonth == input.StartMonth || - (this.StartMonth != null && - this.StartMonth.Equals(input.StartMonth)) - ) && - ( - this.StartYear == input.StartYear || - (this.StartYear != null && - this.StartYear.Equals(input.StartYear)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.HolderName != null) - { - hashCode = (hashCode * 59) + this.HolderName.GetHashCode(); - } - if (this.IssueNumber != null) - { - hashCode = (hashCode * 59) + this.IssueNumber.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.StartMonth != null) - { - hashCode = (hashCode * 59) + this.StartMonth.GetHashCode(); - } - if (this.StartYear != null) - { - hashCode = (hashCode * 59) + this.StartYear.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Cvc (string) maxLength - if (this.Cvc != null && this.Cvc.Length > 20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cvc, length must be less than 20.", new [] { "Cvc" }); - } - - // Cvc (string) minLength - if (this.Cvc != null && this.Cvc.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cvc, length must be greater than 1.", new [] { "Cvc" }); - } - - // ExpiryMonth (string) maxLength - if (this.ExpiryMonth != null && this.ExpiryMonth.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryMonth, length must be less than 2.", new [] { "ExpiryMonth" }); - } - - // ExpiryMonth (string) minLength - if (this.ExpiryMonth != null && this.ExpiryMonth.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryMonth, length must be greater than 1.", new [] { "ExpiryMonth" }); - } - - // ExpiryYear (string) maxLength - if (this.ExpiryYear != null && this.ExpiryYear.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryYear, length must be less than 4.", new [] { "ExpiryYear" }); - } - - // ExpiryYear (string) minLength - if (this.ExpiryYear != null && this.ExpiryYear.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryYear, length must be greater than 4.", new [] { "ExpiryYear" }); - } - - // HolderName (string) maxLength - if (this.HolderName != null && this.HolderName.Length > 50) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HolderName, length must be less than 50.", new [] { "HolderName" }); - } - - // HolderName (string) minLength - if (this.HolderName != null && this.HolderName.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HolderName, length must be greater than 1.", new [] { "HolderName" }); - } - - // IssueNumber (string) maxLength - if (this.IssueNumber != null && this.IssueNumber.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssueNumber, length must be less than 2.", new [] { "IssueNumber" }); - } - - // IssueNumber (string) minLength - if (this.IssueNumber != null && this.IssueNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssueNumber, length must be greater than 1.", new [] { "IssueNumber" }); - } - - // Number (string) maxLength - if (this.Number != null && this.Number.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, length must be less than 19.", new [] { "Number" }); - } - - // Number (string) minLength - if (this.Number != null && this.Number.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, length must be greater than 4.", new [] { "Number" }); - } - - // StartMonth (string) maxLength - if (this.StartMonth != null && this.StartMonth.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartMonth, length must be less than 2.", new [] { "StartMonth" }); - } - - // StartMonth (string) minLength - if (this.StartMonth != null && this.StartMonth.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartMonth, length must be greater than 1.", new [] { "StartMonth" }); - } - - // StartYear (string) maxLength - if (this.StartYear != null && this.StartYear.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartYear, length must be less than 4.", new [] { "StartYear" }); - } - - // StartYear (string) minLength - if (this.StartYear != null && this.StartYear.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartYear, length must be greater than 4.", new [] { "StartYear" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/FraudCheckResult.cs b/Adyen/Model/Payout/FraudCheckResult.cs deleted file mode 100644 index e6f49f364..000000000 --- a/Adyen/Model/Payout/FraudCheckResult.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// FraudCheckResult - /// - [DataContract(Name = "FraudCheckResult")] - public partial class FraudCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FraudCheckResult() { } - /// - /// Initializes a new instance of the class. - /// - /// The fraud score generated by the risk check. (required). - /// The ID of the risk check. (required). - /// The name of the risk check. (required). - public FraudCheckResult(int? accountScore = default(int?), int? checkId = default(int?), string name = default(string)) - { - this.AccountScore = accountScore; - this.CheckId = checkId; - this.Name = name; - } - - /// - /// The fraud score generated by the risk check. - /// - /// The fraud score generated by the risk check. - [DataMember(Name = "accountScore", IsRequired = false, EmitDefaultValue = false)] - public int? AccountScore { get; set; } - - /// - /// The ID of the risk check. - /// - /// The ID of the risk check. - [DataMember(Name = "checkId", IsRequired = false, EmitDefaultValue = false)] - public int? CheckId { get; set; } - - /// - /// The name of the risk check. - /// - /// The name of the risk check. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FraudCheckResult {\n"); - sb.Append(" AccountScore: ").Append(AccountScore).Append("\n"); - sb.Append(" CheckId: ").Append(CheckId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FraudCheckResult); - } - - /// - /// Returns true if FraudCheckResult instances are equal - /// - /// Instance of FraudCheckResult to be compared - /// Boolean - public bool Equals(FraudCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountScore == input.AccountScore || - this.AccountScore.Equals(input.AccountScore) - ) && - ( - this.CheckId == input.CheckId || - this.CheckId.Equals(input.CheckId) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountScore.GetHashCode(); - hashCode = (hashCode * 59) + this.CheckId.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/FraudCheckResultWrapper.cs b/Adyen/Model/Payout/FraudCheckResultWrapper.cs deleted file mode 100644 index faea42047..000000000 --- a/Adyen/Model/Payout/FraudCheckResultWrapper.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// FraudCheckResultWrapper - /// - [DataContract(Name = "FraudCheckResultWrapper")] - public partial class FraudCheckResultWrapper : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// fraudCheckResult. - public FraudCheckResultWrapper(FraudCheckResult fraudCheckResult = default(FraudCheckResult)) - { - this.FraudCheckResult = fraudCheckResult; - } - - /// - /// Gets or Sets FraudCheckResult - /// - [DataMember(Name = "FraudCheckResult", EmitDefaultValue = false)] - public FraudCheckResult FraudCheckResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FraudCheckResultWrapper {\n"); - sb.Append(" FraudCheckResult: ").Append(FraudCheckResult).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FraudCheckResultWrapper); - } - - /// - /// Returns true if FraudCheckResultWrapper instances are equal - /// - /// Instance of FraudCheckResultWrapper to be compared - /// Boolean - public bool Equals(FraudCheckResultWrapper input) - { - if (input == null) - { - return false; - } - return - ( - this.FraudCheckResult == input.FraudCheckResult || - (this.FraudCheckResult != null && - this.FraudCheckResult.Equals(input.FraudCheckResult)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FraudCheckResult != null) - { - hashCode = (hashCode * 59) + this.FraudCheckResult.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/FraudResult.cs b/Adyen/Model/Payout/FraudResult.cs deleted file mode 100644 index 622b497c3..000000000 --- a/Adyen/Model/Payout/FraudResult.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// FraudResult - /// - [DataContract(Name = "FraudResult")] - public partial class FraudResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FraudResult() { } - /// - /// Initializes a new instance of the class. - /// - /// The total fraud score generated by the risk checks. (required). - /// The result of the individual risk checks.. - public FraudResult(int? accountScore = default(int?), List results = default(List)) - { - this.AccountScore = accountScore; - this.Results = results; - } - - /// - /// The total fraud score generated by the risk checks. - /// - /// The total fraud score generated by the risk checks. - [DataMember(Name = "accountScore", IsRequired = false, EmitDefaultValue = false)] - public int? AccountScore { get; set; } - - /// - /// The result of the individual risk checks. - /// - /// The result of the individual risk checks. - [DataMember(Name = "results", EmitDefaultValue = false)] - public List Results { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FraudResult {\n"); - sb.Append(" AccountScore: ").Append(AccountScore).Append("\n"); - sb.Append(" Results: ").Append(Results).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FraudResult); - } - - /// - /// Returns true if FraudResult instances are equal - /// - /// Instance of FraudResult to be compared - /// Boolean - public bool Equals(FraudResult input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountScore == input.AccountScore || - this.AccountScore.Equals(input.AccountScore) - ) && - ( - this.Results == input.Results || - this.Results != null && - input.Results != null && - this.Results.SequenceEqual(input.Results) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountScore.GetHashCode(); - if (this.Results != null) - { - hashCode = (hashCode * 59) + this.Results.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/FundSource.cs b/Adyen/Model/Payout/FundSource.cs deleted file mode 100644 index 0e8ef194a..000000000 --- a/Adyen/Model/Payout/FundSource.cs +++ /dev/null @@ -1,222 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// FundSource - /// - [DataContract(Name = "FundSource")] - public partial class FundSource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A map of name-value pairs for passing additional or industry-specific data.. - /// billingAddress. - /// card. - /// Email address of the person.. - /// shopperName. - /// Phone number of the person. - public FundSource(Dictionary additionalData = default(Dictionary), Address billingAddress = default(Address), Card card = default(Card), string shopperEmail = default(string), Name shopperName = default(Name), string telephoneNumber = default(string)) - { - this.AdditionalData = additionalData; - this.BillingAddress = billingAddress; - this.Card = card; - this.ShopperEmail = shopperEmail; - this.ShopperName = shopperName; - this.TelephoneNumber = telephoneNumber; - } - - /// - /// A map of name-value pairs for passing additional or industry-specific data. - /// - /// A map of name-value pairs for passing additional or industry-specific data. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Email address of the person. - /// - /// Email address of the person. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Phone number of the person - /// - /// Phone number of the person - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FundSource {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FundSource); - } - - /// - /// Returns true if FundSource instances are equal - /// - /// Instance of FundSource to be compared - /// Boolean - public bool Equals(FundSource input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ModifyRequest.cs b/Adyen/Model/Payout/ModifyRequest.cs deleted file mode 100644 index ecad906e5..000000000 --- a/Adyen/Model/Payout/ModifyRequest.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ModifyRequest - /// - [DataContract(Name = "ModifyRequest")] - public partial class ModifyRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ModifyRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be required for a particular payout request.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The PSP reference received in the `/submitThirdParty` response. (required). - public ModifyRequest(Dictionary additionalData = default(Dictionary), string merchantAccount = default(string), string originalReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.OriginalReference = originalReference; - this.AdditionalData = additionalData; - } - - /// - /// This field contains additional data, which may be required for a particular payout request. - /// - /// This field contains additional data, which may be required for a particular payout request. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The PSP reference received in the `/submitThirdParty` response. - /// - /// The PSP reference received in the `/submitThirdParty` response. - [DataMember(Name = "originalReference", IsRequired = false, EmitDefaultValue = false)] - public string OriginalReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ModifyRequest {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" OriginalReference: ").Append(OriginalReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModifyRequest); - } - - /// - /// Returns true if ModifyRequest instances are equal - /// - /// Instance of ModifyRequest to be compared - /// Boolean - public bool Equals(ModifyRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.OriginalReference == input.OriginalReference || - (this.OriginalReference != null && - this.OriginalReference.Equals(input.OriginalReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.OriginalReference != null) - { - hashCode = (hashCode * 59) + this.OriginalReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ModifyResponse.cs b/Adyen/Model/Payout/ModifyResponse.cs deleted file mode 100644 index 434f4d7d7..000000000 --- a/Adyen/Model/Payout/ModifyResponse.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ModifyResponse - /// - [DataContract(Name = "ModifyResponse")] - public partial class ModifyResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ModifyResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be returned in a particular response.. - /// Adyen's 16-character string reference associated with the transaction. This value is globally unique; quote it when communicating with us about this response. (required). - /// The response: * In case of success, it is either `payout-confirm-received` or `payout-decline-received`. * In case of an error, an informational message is returned. (required). - public ModifyResponse(Dictionary additionalData = default(Dictionary), string pspReference = default(string), string response = default(string)) - { - this.PspReference = pspReference; - this.Response = response; - this.AdditionalData = additionalData; - } - - /// - /// This field contains additional data, which may be returned in a particular response. - /// - /// This field contains additional data, which may be returned in a particular response. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction. This value is globally unique; quote it when communicating with us about this response. - /// - /// Adyen's 16-character string reference associated with the transaction. This value is globally unique; quote it when communicating with us about this response. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The response: * In case of success, it is either `payout-confirm-received` or `payout-decline-received`. * In case of an error, an informational message is returned. - /// - /// The response: * In case of success, it is either `payout-confirm-received` or `payout-decline-received`. * In case of an error, an informational message is returned. - [DataMember(Name = "response", IsRequired = false, EmitDefaultValue = false)] - public string Response { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ModifyResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Response: ").Append(Response).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModifyResponse); - } - - /// - /// Returns true if ModifyResponse instances are equal - /// - /// Instance of ModifyResponse to be compared - /// Boolean - public bool Equals(ModifyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Response == input.Response || - (this.Response != null && - this.Response.Equals(input.Response)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Response != null) - { - hashCode = (hashCode * 59) + this.Response.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/Name.cs b/Adyen/Model/Payout/Name.cs deleted file mode 100644 index 359d3438a..000000000 --- a/Adyen/Model/Payout/Name.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// Name - /// - [DataContract(Name = "Name")] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// The first name. (required). - /// The last name. (required). - public Name(string firstName = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/PayoutRequest.cs b/Adyen/Model/Payout/PayoutRequest.cs deleted file mode 100644 index d4432f17e..000000000 --- a/Adyen/Model/Payout/PayoutRequest.cs +++ /dev/null @@ -1,400 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// PayoutRequest - /// - [DataContract(Name = "PayoutRequest")] - public partial class PayoutRequest : IEquatable, IValidatableObject - { - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayoutRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// billingAddress. - /// card. - /// An integer value that is added to the normal fraud score. The value can be either positive or negative.. - /// fundSource. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// recurring. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required). - /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail.. - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations.. - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// shopperName. - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address.. - /// The shopper's telephone number.. - public PayoutRequest(Amount amount = default(Amount), Address billingAddress = default(Address), Card card = default(Card), int? fraudOffset = default(int?), FundSource fundSource = default(FundSource), string merchantAccount = default(string), Recurring recurring = default(Recurring), string reference = default(string), string selectedRecurringDetailReference = default(string), string shopperEmail = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), Name shopperName = default(Name), string shopperReference = default(string), string telephoneNumber = default(string)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.Reference = reference; - this.BillingAddress = billingAddress; - this.Card = card; - this.FraudOffset = fraudOffset; - this.FundSource = fundSource; - this.Recurring = recurring; - this.SelectedRecurringDetailReference = selectedRecurringDetailReference; - this.ShopperEmail = shopperEmail; - this.ShopperInteraction = shopperInteraction; - this.ShopperName = shopperName; - this.ShopperReference = shopperReference; - this.TelephoneNumber = telephoneNumber; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - [DataMember(Name = "fraudOffset", EmitDefaultValue = false)] - public int? FraudOffset { get; set; } - - /// - /// Gets or Sets FundSource - /// - [DataMember(Name = "fundSource", EmitDefaultValue = false)] - public FundSource FundSource { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets Recurring - /// - [DataMember(Name = "recurring", EmitDefaultValue = false)] - public Recurring Recurring { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - /// - /// The `recurringDetailReference` you want to use for this payment. The value `LATEST` can be used to select the most recently stored recurring detail. - [DataMember(Name = "selectedRecurringDetailReference", EmitDefaultValue = false)] - public string SelectedRecurringDetailReference { get; set; } - - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. - /// - /// The shopper's email address. We recommend that you provide this data, as it is used in velocity fraud checks. > For 3D Secure 2 transactions, schemes require `shopperEmail` for all browser-based and mobile implementations. - [DataMember(Name = "shopperEmail", EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - /// - /// Required for recurring payments. Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters. > Your reference must not include personally identifiable information (PII) such as name or email address. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The shopper's telephone number. - /// - /// The shopper's telephone number. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" FraudOffset: ").Append(FraudOffset).Append("\n"); - sb.Append(" FundSource: ").Append(FundSource).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Recurring: ").Append(Recurring).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SelectedRecurringDetailReference: ").Append(SelectedRecurringDetailReference).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutRequest); - } - - /// - /// Returns true if PayoutRequest instances are equal - /// - /// Instance of PayoutRequest to be compared - /// Boolean - public bool Equals(PayoutRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.FraudOffset == input.FraudOffset || - this.FraudOffset.Equals(input.FraudOffset) - ) && - ( - this.FundSource == input.FundSource || - (this.FundSource != null && - this.FundSource.Equals(input.FundSource)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Recurring == input.Recurring || - (this.Recurring != null && - this.Recurring.Equals(input.Recurring)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SelectedRecurringDetailReference == input.SelectedRecurringDetailReference || - (this.SelectedRecurringDetailReference != null && - this.SelectedRecurringDetailReference.Equals(input.SelectedRecurringDetailReference)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FraudOffset.GetHashCode(); - if (this.FundSource != null) - { - hashCode = (hashCode * 59) + this.FundSource.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Recurring != null) - { - hashCode = (hashCode * 59) + this.Recurring.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SelectedRecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.SelectedRecurringDetailReference.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/PayoutResponse.cs b/Adyen/Model/Payout/PayoutResponse.cs deleted file mode 100644 index 0e566e697..000000000 --- a/Adyen/Model/Payout/PayoutResponse.cs +++ /dev/null @@ -1,413 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// PayoutResponse - /// - [DataContract(Name = "PayoutResponse")] - public partial class PayoutResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum AuthenticationFinished for value: AuthenticationFinished - /// - [EnumMember(Value = "AuthenticationFinished")] - AuthenticationFinished = 1, - - /// - /// Enum AuthenticationNotRequired for value: AuthenticationNotRequired - /// - [EnumMember(Value = "AuthenticationNotRequired")] - AuthenticationNotRequired = 2, - - /// - /// Enum Authorised for value: Authorised - /// - [EnumMember(Value = "Authorised")] - Authorised = 3, - - /// - /// Enum Cancelled for value: Cancelled - /// - [EnumMember(Value = "Cancelled")] - Cancelled = 4, - - /// - /// Enum ChallengeShopper for value: ChallengeShopper - /// - [EnumMember(Value = "ChallengeShopper")] - ChallengeShopper = 5, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 6, - - /// - /// Enum IdentifyShopper for value: IdentifyShopper - /// - [EnumMember(Value = "IdentifyShopper")] - IdentifyShopper = 7, - - /// - /// Enum PartiallyAuthorised for value: PartiallyAuthorised - /// - [EnumMember(Value = "PartiallyAuthorised")] - PartiallyAuthorised = 8, - - /// - /// Enum Pending for value: Pending - /// - [EnumMember(Value = "Pending")] - Pending = 9, - - /// - /// Enum PresentToShopper for value: PresentToShopper - /// - [EnumMember(Value = "PresentToShopper")] - PresentToShopper = 10, - - /// - /// Enum Received for value: Received - /// - [EnumMember(Value = "Received")] - Received = 11, - - /// - /// Enum RedirectShopper for value: RedirectShopper - /// - [EnumMember(Value = "RedirectShopper")] - RedirectShopper = 12, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 13, - - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 14 - - } - - - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - /// - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**.. - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty.. - /// dccAmount. - /// Cryptographic signature used to verify `dccQuote`. > This value only applies if you have implemented Dynamic Currency Conversion. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new).. - /// fraudResult. - /// The URL to direct the shopper to. > In case of SecurePlus, do not redirect a shopper to this URL.. - /// The payment session.. - /// The 3D request data for the issuer. If the value is **CUPSecurePlus-CollectSMSVerificationCode**, collect an SMS code from the shopper and pass it in the `/authorise3D` request. For more information, see [3D Secure](https://docs.adyen.com/classic-integration/3d-secure).. - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons).. - /// The result of the payment. For more information, see [Result codes](https://docs.adyen.com/online-payments/payment-result-codes). Possible values: * **AuthenticationFinished** – The payment has been successfully authenticated with 3D Secure 2. Returned for 3D Secure 2 authentication-only transactions. * **AuthenticationNotRequired** – The transaction does not require 3D Secure authentication. Returned for [standalone authentication-only integrations](https://docs.adyen.com/online-payments/3d-secure/other-3ds-flows/authentication-only). * **Authorised** – The payment was successfully authorised. This state serves as an indicator to proceed with the delivery of goods and services. This is a final state. * **Cancelled** – Indicates the payment has been cancelled (either by the shopper or the merchant) before processing was completed. This is a final state. * **ChallengeShopper** – The issuer requires further shopper interaction before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **Error** – There was an error when the payment was being processed. The reason is given in the `refusalReason` field. This is a final state. * **IdentifyShopper** – The issuer requires the shopper's device fingerprint before the payment can be authenticated. Returned for 3D Secure 2 transactions. * **PartiallyAuthorised** – The payment has been authorised for a partial amount. This happens for card payments when the merchant supports Partial Authorisations and the cardholder has insufficient funds. * **Pending** – Indicates that it is not possible to obtain the final status of the payment. This can happen if the systems providing final status information for the payment are unavailable, or if the shopper needs to take further action to complete the payment. * **PresentToShopper** – Indicates that the response contains additional information that you need to present to a shopper, so that they can use it to complete a payment. * **Received** – Indicates the payment has successfully been received by Adyen, and will be processed. This is the initial state for all payments. * **RedirectShopper** – Indicates the shopper should be redirected to an external web page or app to complete the authorisation. * **Refused** – Indicates the payment was refused. The reason is given in the `refusalReason` field. This is a final state.. - public PayoutResponse(Dictionary additionalData = default(Dictionary), string authCode = default(string), Amount dccAmount = default(Amount), string dccSignature = default(string), FraudResult fraudResult = default(FraudResult), string issuerUrl = default(string), string md = default(string), string paRequest = default(string), string pspReference = default(string), string refusalReason = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?)) - { - this.AdditionalData = additionalData; - this.AuthCode = authCode; - this.DccAmount = dccAmount; - this.DccSignature = dccSignature; - this.FraudResult = fraudResult; - this.IssuerUrl = issuerUrl; - this.Md = md; - this.PaRequest = paRequest; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.ResultCode = resultCode; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first: Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - /// - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - [DataMember(Name = "authCode", EmitDefaultValue = false)] - public string AuthCode { get; set; } - - /// - /// Gets or Sets DccAmount - /// - [DataMember(Name = "dccAmount", EmitDefaultValue = false)] - public Amount DccAmount { get; set; } - - /// - /// Cryptographic signature used to verify `dccQuote`. > This value only applies if you have implemented Dynamic Currency Conversion. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - /// - /// Cryptographic signature used to verify `dccQuote`. > This value only applies if you have implemented Dynamic Currency Conversion. For more information, [contact Support](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "dccSignature", EmitDefaultValue = false)] - public string DccSignature { get; set; } - - /// - /// Gets or Sets FraudResult - /// - [DataMember(Name = "fraudResult", EmitDefaultValue = false)] - public FraudResult FraudResult { get; set; } - - /// - /// The URL to direct the shopper to. > In case of SecurePlus, do not redirect a shopper to this URL. - /// - /// The URL to direct the shopper to. > In case of SecurePlus, do not redirect a shopper to this URL. - [DataMember(Name = "issuerUrl", EmitDefaultValue = false)] - public string IssuerUrl { get; set; } - - /// - /// The payment session. - /// - /// The payment session. - [DataMember(Name = "md", EmitDefaultValue = false)] - public string Md { get; set; } - - /// - /// The 3D request data for the issuer. If the value is **CUPSecurePlus-CollectSMSVerificationCode**, collect an SMS code from the shopper and pass it in the `/authorise3D` request. For more information, see [3D Secure](https://docs.adyen.com/classic-integration/3d-secure). - /// - /// The 3D request data for the issuer. If the value is **CUPSecurePlus-CollectSMSVerificationCode**, collect an SMS code from the shopper and pass it in the `/authorise3D` request. For more information, see [3D Secure](https://docs.adyen.com/classic-integration/3d-secure). - [DataMember(Name = "paRequest", EmitDefaultValue = false)] - public string PaRequest { get; set; } - - /// - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - /// - /// If the payment's authorisation is refused or an error occurs during authorisation, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. For more information, see [Refusal reasons](https://docs.adyen.com/development-resources/refusal-reasons). - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" DccAmount: ").Append(DccAmount).Append("\n"); - sb.Append(" DccSignature: ").Append(DccSignature).Append("\n"); - sb.Append(" FraudResult: ").Append(FraudResult).Append("\n"); - sb.Append(" IssuerUrl: ").Append(IssuerUrl).Append("\n"); - sb.Append(" Md: ").Append(Md).Append("\n"); - sb.Append(" PaRequest: ").Append(PaRequest).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutResponse); - } - - /// - /// Returns true if PayoutResponse instances are equal - /// - /// Instance of PayoutResponse to be compared - /// Boolean - public bool Equals(PayoutResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.DccAmount == input.DccAmount || - (this.DccAmount != null && - this.DccAmount.Equals(input.DccAmount)) - ) && - ( - this.DccSignature == input.DccSignature || - (this.DccSignature != null && - this.DccSignature.Equals(input.DccSignature)) - ) && - ( - this.FraudResult == input.FraudResult || - (this.FraudResult != null && - this.FraudResult.Equals(input.FraudResult)) - ) && - ( - this.IssuerUrl == input.IssuerUrl || - (this.IssuerUrl != null && - this.IssuerUrl.Equals(input.IssuerUrl)) - ) && - ( - this.Md == input.Md || - (this.Md != null && - this.Md.Equals(input.Md)) - ) && - ( - this.PaRequest == input.PaRequest || - (this.PaRequest != null && - this.PaRequest.Equals(input.PaRequest)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.DccAmount != null) - { - hashCode = (hashCode * 59) + this.DccAmount.GetHashCode(); - } - if (this.DccSignature != null) - { - hashCode = (hashCode * 59) + this.DccSignature.GetHashCode(); - } - if (this.FraudResult != null) - { - hashCode = (hashCode * 59) + this.FraudResult.GetHashCode(); - } - if (this.IssuerUrl != null) - { - hashCode = (hashCode * 59) + this.IssuerUrl.GetHashCode(); - } - if (this.Md != null) - { - hashCode = (hashCode * 59) + this.Md.GetHashCode(); - } - if (this.PaRequest != null) - { - hashCode = (hashCode * 59) + this.PaRequest.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Md (string) maxLength - if (this.Md != null && this.Md.Length > 20000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Md, length must be less than 20000.", new [] { "Md" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/Recurring.cs b/Adyen/Model/Payout/Recurring.cs deleted file mode 100644 index 7e4237d58..000000000 --- a/Adyen/Model/Payout/Recurring.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// Recurring - /// - [DataContract(Name = "Recurring")] - public partial class Recurring : IEquatable, IValidatableObject - { - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - [JsonConverter(typeof(StringEnumConverter))] - public enum ContractEnum - { - /// - /// Enum ONECLICK for value: ONECLICK - /// - [EnumMember(Value = "ONECLICK")] - ONECLICK = 1, - - /// - /// Enum RECURRING for value: RECURRING - /// - [EnumMember(Value = "RECURRING")] - RECURRING = 2, - - /// - /// Enum PAYOUT for value: PAYOUT - /// - [EnumMember(Value = "PAYOUT")] - PAYOUT = 3 - - } - - - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - [DataMember(Name = "contract", EmitDefaultValue = false)] - public ContractEnum? Contract { get; set; } - /// - /// The name of the token service. - /// - /// The name of the token service. - [JsonConverter(typeof(StringEnumConverter))] - public enum TokenServiceEnum - { - /// - /// Enum VISATOKENSERVICE for value: VISATOKENSERVICE - /// - [EnumMember(Value = "VISATOKENSERVICE")] - VISATOKENSERVICE = 1, - - /// - /// Enum MCTOKENSERVICE for value: MCTOKENSERVICE - /// - [EnumMember(Value = "MCTOKENSERVICE")] - MCTOKENSERVICE = 2, - - /// - /// Enum AMEXTOKENSERVICE for value: AMEXTOKENSERVICE - /// - [EnumMember(Value = "AMEXTOKENSERVICE")] - AMEXTOKENSERVICE = 3, - - /// - /// Enum TOKENSHARING for value: TOKEN_SHARING - /// - [EnumMember(Value = "TOKEN_SHARING")] - TOKENSHARING = 4 - - } - - - /// - /// The name of the token service. - /// - /// The name of the token service. - [DataMember(Name = "tokenService", EmitDefaultValue = false)] - public TokenServiceEnum? TokenService { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts).. - /// A descriptive name for this detail.. - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.. - /// Minimum number of days between authorisations. Only for 3D Secure 2.. - /// The name of the token service.. - public Recurring(ContractEnum? contract = default(ContractEnum?), string recurringDetailName = default(string), DateTime recurringExpiry = default(DateTime), string recurringFrequency = default(string), TokenServiceEnum? tokenService = default(TokenServiceEnum?)) - { - this.Contract = contract; - this.RecurringDetailName = recurringDetailName; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.TokenService = tokenService; - } - - /// - /// A descriptive name for this detail. - /// - /// A descriptive name for this detail. - [DataMember(Name = "recurringDetailName", EmitDefaultValue = false)] - public string RecurringDetailName { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public DateTime RecurringExpiry { get; set; } - - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Recurring {\n"); - sb.Append(" Contract: ").Append(Contract).Append("\n"); - sb.Append(" RecurringDetailName: ").Append(RecurringDetailName).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" TokenService: ").Append(TokenService).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Recurring); - } - - /// - /// Returns true if Recurring instances are equal - /// - /// Instance of Recurring to be compared - /// Boolean - public bool Equals(Recurring input) - { - if (input == null) - { - return false; - } - return - ( - this.Contract == input.Contract || - this.Contract.Equals(input.Contract) - ) && - ( - this.RecurringDetailName == input.RecurringDetailName || - (this.RecurringDetailName != null && - this.RecurringDetailName.Equals(input.RecurringDetailName)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.TokenService == input.TokenService || - this.TokenService.Equals(input.TokenService) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Contract.GetHashCode(); - if (this.RecurringDetailName != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailName.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TokenService.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalData3DSecure.cs b/Adyen/Model/Payout/ResponseAdditionalData3DSecure.cs deleted file mode 100644 index f260fd904..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalData3DSecure.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalData3DSecure - /// - [DataContract(Name = "ResponseAdditionalData3DSecure")] - public partial class ResponseAdditionalData3DSecure : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. . - /// The Cardholder Authentication Verification Value (CAVV) for the 3D Secure authentication session, as a Base64-encoded 20-byte array.. - /// The CAVV algorithm used.. - /// Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** . - /// Indicates whether a card is enrolled for 3D Secure 2.. - public ResponseAdditionalData3DSecure(string cardHolderInfo = default(string), string cavv = default(string), string cavvAlgorithm = default(string), string scaExemptionRequested = default(string), bool? threeds2CardEnrolled = default(bool?)) - { - this.CardHolderInfo = cardHolderInfo; - this.Cavv = cavv; - this.CavvAlgorithm = cavvAlgorithm; - this.ScaExemptionRequested = scaExemptionRequested; - this.Threeds2CardEnrolled = threeds2CardEnrolled; - } - - /// - /// Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. - /// - /// Information provided by the issuer to the cardholder. If this field is present, you need to display this information to the cardholder. - [DataMember(Name = "cardHolderInfo", EmitDefaultValue = false)] - public string CardHolderInfo { get; set; } - - /// - /// The Cardholder Authentication Verification Value (CAVV) for the 3D Secure authentication session, as a Base64-encoded 20-byte array. - /// - /// The Cardholder Authentication Verification Value (CAVV) for the 3D Secure authentication session, as a Base64-encoded 20-byte array. - [DataMember(Name = "cavv", EmitDefaultValue = false)] - public string Cavv { get; set; } - - /// - /// The CAVV algorithm used. - /// - /// The CAVV algorithm used. - [DataMember(Name = "cavvAlgorithm", EmitDefaultValue = false)] - public string CavvAlgorithm { get; set; } - - /// - /// Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** - /// - /// Shows the [exemption type](https://docs.adyen.com/payments-fundamentals/psd2-sca-compliance-and-implementation-guide#specifypreferenceinyourapirequest) that Adyen requested for the payment. Possible values: * **lowValue** * **secureCorporate** * **trustedBeneficiary** * **transactionRiskAnalysis** - [DataMember(Name = "scaExemptionRequested", EmitDefaultValue = false)] - public string ScaExemptionRequested { get; set; } - - /// - /// Indicates whether a card is enrolled for 3D Secure 2. - /// - /// Indicates whether a card is enrolled for 3D Secure 2. - [DataMember(Name = "threeds2.cardEnrolled", EmitDefaultValue = false)] - public bool? Threeds2CardEnrolled { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalData3DSecure {\n"); - sb.Append(" CardHolderInfo: ").Append(CardHolderInfo).Append("\n"); - sb.Append(" Cavv: ").Append(Cavv).Append("\n"); - sb.Append(" CavvAlgorithm: ").Append(CavvAlgorithm).Append("\n"); - sb.Append(" ScaExemptionRequested: ").Append(ScaExemptionRequested).Append("\n"); - sb.Append(" Threeds2CardEnrolled: ").Append(Threeds2CardEnrolled).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalData3DSecure); - } - - /// - /// Returns true if ResponseAdditionalData3DSecure instances are equal - /// - /// Instance of ResponseAdditionalData3DSecure to be compared - /// Boolean - public bool Equals(ResponseAdditionalData3DSecure input) - { - if (input == null) - { - return false; - } - return - ( - this.CardHolderInfo == input.CardHolderInfo || - (this.CardHolderInfo != null && - this.CardHolderInfo.Equals(input.CardHolderInfo)) - ) && - ( - this.Cavv == input.Cavv || - (this.Cavv != null && - this.Cavv.Equals(input.Cavv)) - ) && - ( - this.CavvAlgorithm == input.CavvAlgorithm || - (this.CavvAlgorithm != null && - this.CavvAlgorithm.Equals(input.CavvAlgorithm)) - ) && - ( - this.ScaExemptionRequested == input.ScaExemptionRequested || - (this.ScaExemptionRequested != null && - this.ScaExemptionRequested.Equals(input.ScaExemptionRequested)) - ) && - ( - this.Threeds2CardEnrolled == input.Threeds2CardEnrolled || - this.Threeds2CardEnrolled.Equals(input.Threeds2CardEnrolled) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardHolderInfo != null) - { - hashCode = (hashCode * 59) + this.CardHolderInfo.GetHashCode(); - } - if (this.Cavv != null) - { - hashCode = (hashCode * 59) + this.Cavv.GetHashCode(); - } - if (this.CavvAlgorithm != null) - { - hashCode = (hashCode * 59) + this.CavvAlgorithm.GetHashCode(); - } - if (this.ScaExemptionRequested != null) - { - hashCode = (hashCode * 59) + this.ScaExemptionRequested.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Threeds2CardEnrolled.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.cs b/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.cs deleted file mode 100644 index 21343577a..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalDataBillingAddress.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalDataBillingAddress - /// - [DataContract(Name = "ResponseAdditionalDataBillingAddress")] - public partial class ResponseAdditionalDataBillingAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The billing address city passed in the payment request.. - /// The billing address country passed in the payment request. Example: NL. - /// The billing address house number or name passed in the payment request.. - /// The billing address postal code passed in the payment request. Example: 1011 DJ. - /// The billing address state or province passed in the payment request. Example: NH. - /// The billing address street passed in the payment request.. - public ResponseAdditionalDataBillingAddress(string billingAddressCity = default(string), string billingAddressCountry = default(string), string billingAddressHouseNumberOrName = default(string), string billingAddressPostalCode = default(string), string billingAddressStateOrProvince = default(string), string billingAddressStreet = default(string)) - { - this.BillingAddressCity = billingAddressCity; - this.BillingAddressCountry = billingAddressCountry; - this.BillingAddressHouseNumberOrName = billingAddressHouseNumberOrName; - this.BillingAddressPostalCode = billingAddressPostalCode; - this.BillingAddressStateOrProvince = billingAddressStateOrProvince; - this.BillingAddressStreet = billingAddressStreet; - } - - /// - /// The billing address city passed in the payment request. - /// - /// The billing address city passed in the payment request. - [DataMember(Name = "billingAddress.city", EmitDefaultValue = false)] - public string BillingAddressCity { get; set; } - - /// - /// The billing address country passed in the payment request. Example: NL - /// - /// The billing address country passed in the payment request. Example: NL - [DataMember(Name = "billingAddress.country", EmitDefaultValue = false)] - public string BillingAddressCountry { get; set; } - - /// - /// The billing address house number or name passed in the payment request. - /// - /// The billing address house number or name passed in the payment request. - [DataMember(Name = "billingAddress.houseNumberOrName", EmitDefaultValue = false)] - public string BillingAddressHouseNumberOrName { get; set; } - - /// - /// The billing address postal code passed in the payment request. Example: 1011 DJ - /// - /// The billing address postal code passed in the payment request. Example: 1011 DJ - [DataMember(Name = "billingAddress.postalCode", EmitDefaultValue = false)] - public string BillingAddressPostalCode { get; set; } - - /// - /// The billing address state or province passed in the payment request. Example: NH - /// - /// The billing address state or province passed in the payment request. Example: NH - [DataMember(Name = "billingAddress.stateOrProvince", EmitDefaultValue = false)] - public string BillingAddressStateOrProvince { get; set; } - - /// - /// The billing address street passed in the payment request. - /// - /// The billing address street passed in the payment request. - [DataMember(Name = "billingAddress.street", EmitDefaultValue = false)] - public string BillingAddressStreet { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataBillingAddress {\n"); - sb.Append(" BillingAddressCity: ").Append(BillingAddressCity).Append("\n"); - sb.Append(" BillingAddressCountry: ").Append(BillingAddressCountry).Append("\n"); - sb.Append(" BillingAddressHouseNumberOrName: ").Append(BillingAddressHouseNumberOrName).Append("\n"); - sb.Append(" BillingAddressPostalCode: ").Append(BillingAddressPostalCode).Append("\n"); - sb.Append(" BillingAddressStateOrProvince: ").Append(BillingAddressStateOrProvince).Append("\n"); - sb.Append(" BillingAddressStreet: ").Append(BillingAddressStreet).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataBillingAddress); - } - - /// - /// Returns true if ResponseAdditionalDataBillingAddress instances are equal - /// - /// Instance of ResponseAdditionalDataBillingAddress to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataBillingAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingAddressCity == input.BillingAddressCity || - (this.BillingAddressCity != null && - this.BillingAddressCity.Equals(input.BillingAddressCity)) - ) && - ( - this.BillingAddressCountry == input.BillingAddressCountry || - (this.BillingAddressCountry != null && - this.BillingAddressCountry.Equals(input.BillingAddressCountry)) - ) && - ( - this.BillingAddressHouseNumberOrName == input.BillingAddressHouseNumberOrName || - (this.BillingAddressHouseNumberOrName != null && - this.BillingAddressHouseNumberOrName.Equals(input.BillingAddressHouseNumberOrName)) - ) && - ( - this.BillingAddressPostalCode == input.BillingAddressPostalCode || - (this.BillingAddressPostalCode != null && - this.BillingAddressPostalCode.Equals(input.BillingAddressPostalCode)) - ) && - ( - this.BillingAddressStateOrProvince == input.BillingAddressStateOrProvince || - (this.BillingAddressStateOrProvince != null && - this.BillingAddressStateOrProvince.Equals(input.BillingAddressStateOrProvince)) - ) && - ( - this.BillingAddressStreet == input.BillingAddressStreet || - (this.BillingAddressStreet != null && - this.BillingAddressStreet.Equals(input.BillingAddressStreet)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingAddressCity != null) - { - hashCode = (hashCode * 59) + this.BillingAddressCity.GetHashCode(); - } - if (this.BillingAddressCountry != null) - { - hashCode = (hashCode * 59) + this.BillingAddressCountry.GetHashCode(); - } - if (this.BillingAddressHouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.BillingAddressHouseNumberOrName.GetHashCode(); - } - if (this.BillingAddressPostalCode != null) - { - hashCode = (hashCode * 59) + this.BillingAddressPostalCode.GetHashCode(); - } - if (this.BillingAddressStateOrProvince != null) - { - hashCode = (hashCode * 59) + this.BillingAddressStateOrProvince.GetHashCode(); - } - if (this.BillingAddressStreet != null) - { - hashCode = (hashCode * 59) + this.BillingAddressStreet.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalDataCard.cs b/Adyen/Model/Payout/ResponseAdditionalDataCard.cs deleted file mode 100644 index 19528be32..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalDataCard.cs +++ /dev/null @@ -1,352 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalDataCard - /// - [DataContract(Name = "ResponseAdditionalDataCard")] - public partial class ResponseAdditionalDataCard : IEquatable, IValidatableObject - { - /// - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit - /// - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit - [JsonConverter(typeof(StringEnumConverter))] - public enum CardProductIdEnum - { - /// - /// Enum A for value: A - /// - [EnumMember(Value = "A")] - A = 1, - - /// - /// Enum B for value: B - /// - [EnumMember(Value = "B")] - B = 2, - - /// - /// Enum C for value: C - /// - [EnumMember(Value = "C")] - C = 3, - - /// - /// Enum D for value: D - /// - [EnumMember(Value = "D")] - D = 4, - - /// - /// Enum F for value: F - /// - [EnumMember(Value = "F")] - F = 5, - - /// - /// Enum MCC for value: MCC - /// - [EnumMember(Value = "MCC")] - MCC = 6, - - /// - /// Enum MCE for value: MCE - /// - [EnumMember(Value = "MCE")] - MCE = 7, - - /// - /// Enum MCF for value: MCF - /// - [EnumMember(Value = "MCF")] - MCF = 8, - - /// - /// Enum MCG for value: MCG - /// - [EnumMember(Value = "MCG")] - MCG = 9, - - /// - /// Enum MCH for value: MCH - /// - [EnumMember(Value = "MCH")] - MCH = 10, - - /// - /// Enum MCI for value: MCI - /// - [EnumMember(Value = "MCI")] - MCI = 11 - - } - - - /// - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit - /// - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit - [DataMember(Name = "cardProductId", EmitDefaultValue = false)] - public CardProductIdEnum? CardProductId { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The first six digits of the card number. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with a six-digit BIN. Example: 521234. - /// The cardholder name passed in the payment request.. - /// The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available.. - /// The country where the card was issued. Example: US. - /// The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD. - /// The card payment method used for the transaction. Example: amex. - /// The Card Product ID represents the type of card following card scheme product definitions and can be returned for Adyen Acquiring service level payments. Possible values Visa: * **A** - Visa Traditional * **B** - Visa Traditional Rewards * **C** - Visa Signature * **D** - Visa Signature Preferred * **F** - Visa Classic Possible values Mastercard: * **MCC** - Mastercard Card * **MCE** - Mastercard Electronic Card * **MCF** - Mastercard Corporate Fleet Card * **MCG** - Gold Mastercard Card * **MCH** - Mastercard Premium Charge * **MCI** - Mastercard Select Debit . - /// The last four digits of a card number. > Returned only in case of a card payment.. - /// The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423. - public ResponseAdditionalDataCard(string cardBin = default(string), string cardHolderName = default(string), string cardIssuingBank = default(string), string cardIssuingCountry = default(string), string cardIssuingCurrency = default(string), string cardPaymentMethod = default(string), CardProductIdEnum? cardProductId = default(CardProductIdEnum?), string cardSummary = default(string), string issuerBin = default(string)) - { - this.CardBin = cardBin; - this.CardHolderName = cardHolderName; - this.CardIssuingBank = cardIssuingBank; - this.CardIssuingCountry = cardIssuingCountry; - this.CardIssuingCurrency = cardIssuingCurrency; - this.CardPaymentMethod = cardPaymentMethod; - this.CardProductId = cardProductId; - this.CardSummary = cardSummary; - this.IssuerBin = issuerBin; - } - - /// - /// The first six digits of the card number. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with a six-digit BIN. Example: 521234 - /// - /// The first six digits of the card number. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with a six-digit BIN. Example: 521234 - [DataMember(Name = "cardBin", EmitDefaultValue = false)] - public string CardBin { get; set; } - - /// - /// The cardholder name passed in the payment request. - /// - /// The cardholder name passed in the payment request. - [DataMember(Name = "cardHolderName", EmitDefaultValue = false)] - public string CardHolderName { get; set; } - - /// - /// The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available. - /// - /// The bank or the financial institution granting lines of credit through card association branded payment cards. This information can be included when available. - [DataMember(Name = "cardIssuingBank", EmitDefaultValue = false)] - public string CardIssuingBank { get; set; } - - /// - /// The country where the card was issued. Example: US - /// - /// The country where the card was issued. Example: US - [DataMember(Name = "cardIssuingCountry", EmitDefaultValue = false)] - public string CardIssuingCountry { get; set; } - - /// - /// The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD - /// - /// The currency in which the card is issued, if this information is available. Provided as the currency code or currency number from the ISO-4217 standard. Example: USD - [DataMember(Name = "cardIssuingCurrency", EmitDefaultValue = false)] - public string CardIssuingCurrency { get; set; } - - /// - /// The card payment method used for the transaction. Example: amex - /// - /// The card payment method used for the transaction. Example: amex - [DataMember(Name = "cardPaymentMethod", EmitDefaultValue = false)] - public string CardPaymentMethod { get; set; } - - /// - /// The last four digits of a card number. > Returned only in case of a card payment. - /// - /// The last four digits of a card number. > Returned only in case of a card payment. - [DataMember(Name = "cardSummary", EmitDefaultValue = false)] - public string CardSummary { get; set; } - - /// - /// The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423 - /// - /// The first eight digits of the card number. Only returned if the card number is 16 digits or more. This is the [Bank Identification Number (BIN)](https://docs.adyen.com/get-started-with-adyen/payment-glossary#bank-identification-number-bin) for card numbers with an eight-digit BIN. Example: 52123423 - [DataMember(Name = "issuerBin", EmitDefaultValue = false)] - public string IssuerBin { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataCard {\n"); - sb.Append(" CardBin: ").Append(CardBin).Append("\n"); - sb.Append(" CardHolderName: ").Append(CardHolderName).Append("\n"); - sb.Append(" CardIssuingBank: ").Append(CardIssuingBank).Append("\n"); - sb.Append(" CardIssuingCountry: ").Append(CardIssuingCountry).Append("\n"); - sb.Append(" CardIssuingCurrency: ").Append(CardIssuingCurrency).Append("\n"); - sb.Append(" CardPaymentMethod: ").Append(CardPaymentMethod).Append("\n"); - sb.Append(" CardProductId: ").Append(CardProductId).Append("\n"); - sb.Append(" CardSummary: ").Append(CardSummary).Append("\n"); - sb.Append(" IssuerBin: ").Append(IssuerBin).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataCard); - } - - /// - /// Returns true if ResponseAdditionalDataCard instances are equal - /// - /// Instance of ResponseAdditionalDataCard to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataCard input) - { - if (input == null) - { - return false; - } - return - ( - this.CardBin == input.CardBin || - (this.CardBin != null && - this.CardBin.Equals(input.CardBin)) - ) && - ( - this.CardHolderName == input.CardHolderName || - (this.CardHolderName != null && - this.CardHolderName.Equals(input.CardHolderName)) - ) && - ( - this.CardIssuingBank == input.CardIssuingBank || - (this.CardIssuingBank != null && - this.CardIssuingBank.Equals(input.CardIssuingBank)) - ) && - ( - this.CardIssuingCountry == input.CardIssuingCountry || - (this.CardIssuingCountry != null && - this.CardIssuingCountry.Equals(input.CardIssuingCountry)) - ) && - ( - this.CardIssuingCurrency == input.CardIssuingCurrency || - (this.CardIssuingCurrency != null && - this.CardIssuingCurrency.Equals(input.CardIssuingCurrency)) - ) && - ( - this.CardPaymentMethod == input.CardPaymentMethod || - (this.CardPaymentMethod != null && - this.CardPaymentMethod.Equals(input.CardPaymentMethod)) - ) && - ( - this.CardProductId == input.CardProductId || - this.CardProductId.Equals(input.CardProductId) - ) && - ( - this.CardSummary == input.CardSummary || - (this.CardSummary != null && - this.CardSummary.Equals(input.CardSummary)) - ) && - ( - this.IssuerBin == input.IssuerBin || - (this.IssuerBin != null && - this.IssuerBin.Equals(input.IssuerBin)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardBin != null) - { - hashCode = (hashCode * 59) + this.CardBin.GetHashCode(); - } - if (this.CardHolderName != null) - { - hashCode = (hashCode * 59) + this.CardHolderName.GetHashCode(); - } - if (this.CardIssuingBank != null) - { - hashCode = (hashCode * 59) + this.CardIssuingBank.GetHashCode(); - } - if (this.CardIssuingCountry != null) - { - hashCode = (hashCode * 59) + this.CardIssuingCountry.GetHashCode(); - } - if (this.CardIssuingCurrency != null) - { - hashCode = (hashCode * 59) + this.CardIssuingCurrency.GetHashCode(); - } - if (this.CardPaymentMethod != null) - { - hashCode = (hashCode * 59) + this.CardPaymentMethod.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CardProductId.GetHashCode(); - if (this.CardSummary != null) - { - hashCode = (hashCode * 59) + this.CardSummary.GetHashCode(); - } - if (this.IssuerBin != null) - { - hashCode = (hashCode * 59) + this.IssuerBin.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalDataCommon.cs b/Adyen/Model/Payout/ResponseAdditionalDataCommon.cs deleted file mode 100644 index 303a9262a..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalDataCommon.cs +++ /dev/null @@ -1,1407 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalDataCommon - /// - [DataContract(Name = "ResponseAdditionalDataCommon")] - public partial class ResponseAdditionalDataCommon : IEquatable, IValidatableObject - { - /// - /// The fraud result properties of the payment. - /// - /// The fraud result properties of the payment. - [JsonConverter(typeof(StringEnumConverter))] - public enum FraudResultTypeEnum - { - /// - /// Enum GREEN for value: GREEN - /// - [EnumMember(Value = "GREEN")] - GREEN = 1, - - /// - /// Enum FRAUD for value: FRAUD - /// - [EnumMember(Value = "FRAUD")] - FRAUD = 2 - - } - - - /// - /// The fraud result properties of the payment. - /// - /// The fraud result properties of the payment. - [DataMember(Name = "fraudResultType", EmitDefaultValue = false)] - public FraudResultTypeEnum? FraudResultType { get; set; } - /// - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are:\\n* veryLow\\n* low\\n* medium\\n* high\\n* veryHigh\\n\\n> - /// - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are:\\n* veryLow\\n* low\\n* medium\\n* high\\n* veryHigh\\n\\n> - [JsonConverter(typeof(StringEnumConverter))] - public enum FraudRiskLevelEnum - { - /// - /// Enum VeryLow for value: veryLow - /// - [EnumMember(Value = "veryLow")] - VeryLow = 1, - - /// - /// Enum Low for value: low - /// - [EnumMember(Value = "low")] - Low = 2, - - /// - /// Enum Medium for value: medium - /// - [EnumMember(Value = "medium")] - Medium = 3, - - /// - /// Enum High for value: high - /// - [EnumMember(Value = "high")] - High = 4, - - /// - /// Enum VeryHigh for value: veryHigh - /// - [EnumMember(Value = "veryHigh")] - VeryHigh = 5 - - } - - - /// - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are:\\n* veryLow\\n* low\\n* medium\\n* high\\n* veryHigh\\n\\n> - /// - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are:\\n* veryLow\\n* low\\n* medium\\n* high\\n* veryHigh\\n\\n> - [DataMember(Name = "fraudRiskLevel", EmitDefaultValue = false)] - public FraudRiskLevelEnum? FraudRiskLevel { get; set; } - /// - /// The processing model used for the recurring transaction. - /// - /// The processing model used for the recurring transaction. - [JsonConverter(typeof(StringEnumConverter))] - public enum RecurringProcessingModelEnum - { - /// - /// Enum CardOnFile for value: CardOnFile - /// - [EnumMember(Value = "CardOnFile")] - CardOnFile = 1, - - /// - /// Enum Subscription for value: Subscription - /// - [EnumMember(Value = "Subscription")] - Subscription = 2, - - /// - /// Enum UnscheduledCardOnFile for value: UnscheduledCardOnFile - /// - [EnumMember(Value = "UnscheduledCardOnFile")] - UnscheduledCardOnFile = 3 - - } - - - /// - /// The processing model used for the recurring transaction. - /// - /// The processing model used for the recurring transaction. - [DataMember(Name = "recurringProcessingModel", EmitDefaultValue = false)] - public RecurringProcessingModelEnum? RecurringProcessingModel { get; set; } - /// - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. - /// - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. - [JsonConverter(typeof(StringEnumConverter))] - public enum TokenizationStoreOperationTypeEnum - { - /// - /// Enum Created for value: created - /// - [EnumMember(Value = "created")] - Created = 1, - - /// - /// Enum Updated for value: updated - /// - [EnumMember(Value = "updated")] - Updated = 2, - - /// - /// Enum AlreadyExisting for value: alreadyExisting - /// - [EnumMember(Value = "alreadyExisting")] - AlreadyExisting = 3 - - } - - - /// - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. - /// - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. - [DataMember(Name = "tokenization.store.operationType", EmitDefaultValue = false)] - public TokenizationStoreOperationTypeEnum? TokenizationStoreOperationType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions.. - /// The name of the acquirer processing the payment request. Example: TestPmmAcquirer. - /// The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9. - /// The Adyen alias of the card. Example: H167852639363479. - /// The type of the card alias. Example: Default. - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747. - /// Merchant ID known by the acquirer.. - /// The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).. - /// Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes).. - /// The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs).. - /// Raw AVS result received from the acquirer, where available. Example: D. - /// BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions.. - /// Includes the co-branded card information.. - /// The result of CVC verification.. - /// The raw result of CVC verification.. - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction.. - /// The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02. - /// The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment.. - /// The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR. - /// The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units.. - /// The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair.. - /// Indicates if the payment is sent to manual review.. - /// The fraud result properties of the payment.. - /// The risk level of the transaction as classified by the [machine learning](https://docs.adyen.com/risk-management/configure-your-risk-profile/machine-learning-rules/) fraud risk rule. The risk level indicates the likelihood that a transaction will result in a fraudulent dispute. The possible return values are:\\n* veryLow\\n* low\\n* medium\\n* high\\n* veryHigh\\n\\n>. - /// Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**.. - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\".. - /// Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card. - /// Indicates if the card is used for business purposes only.. - /// The issuing country of the card based on the BIN list that Adyen maintains. Example: JP. - /// A Boolean value indicating whether a liability shift was offered for this payment.. - /// The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field.. - /// The Merchant Advice Code (MAC) can be returned by Mastercard issuers for refused payments. If present, the MAC contains information about why the payment failed, and whether it can be retried. For more information see [Mastercard Merchant Advice Codes](https://docs.adyen.com/development-resources/raw-acquirer-responses#mastercard-merchant-advice-codes).. - /// The reference provided for the transaction.. - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID.. - /// The owner name of a bank account. Only relevant for SEPA Direct Debit transactions.. - /// The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters.. - /// The payment method used in the transaction.. - /// The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro. - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown). - /// The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder. - /// Message to be displayed on the terminal.. - /// The recurring contract types applicable to the transaction.. - /// The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team.. - /// The reference that uniquely identifies the recurring transaction.. - /// The provided reference of the shopper for a recurring transaction.. - /// The processing model used for the recurring transaction.. - /// If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true. - /// Raw refusal reason received from the acquirer, where available. Example: AUTHORISED. - /// The amount of the payment request.. - /// The currency of the payment request.. - /// The shopper interaction type of the payment request. Example: Ecommerce. - /// The shopperReference passed in the payment request. Example: AdyenTestShopperXX. - /// The terminal ID used in a point-of-sale payment. Example: 06022622. - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true. - /// The raw 3DS authentication result from the card issuer. Example: N. - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true. - /// The raw enrollment result from the 3DS directory services of the card schemes. Example: Y. - /// The 3D Secure 2 version.. - /// The reference for the shopper that you sent when tokenizing the payment details.. - /// The operation performed on the token. Possible values: * **created**: the token has been created. * **updated**: the existing token has been updated. * **alreadyExisting**: the details have already been stored. . - /// The reference that uniquely identifies tokenized payment details.. - /// The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field.. - /// The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA=. - public ResponseAdditionalDataCommon(string acquirerAccountCode = default(string), string acquirerCode = default(string), string acquirerReference = default(string), string alias = default(string), string aliasType = default(string), string authCode = default(string), string authorisationMid = default(string), string authorisedAmountCurrency = default(string), string authorisedAmountValue = default(string), string avsResult = default(string), string avsResultRaw = default(string), string bic = default(string), string coBrandedWith = default(string), string cvcResult = default(string), string cvcResultRaw = default(string), string dsTransID = default(string), string eci = default(string), string expiryDate = default(string), string extraCostsCurrency = default(string), string extraCostsValue = default(string), string fraudCheckItemNrFraudCheckname = default(string), string fraudManualReview = default(string), FraudResultTypeEnum? fraudResultType = default(FraudResultTypeEnum?), FraudRiskLevelEnum? fraudRiskLevel = default(FraudRiskLevelEnum?), string fundingSource = default(string), string fundsAvailability = default(string), string inferredRefusalReason = default(string), string isCardCommercial = default(string), string issuerCountry = default(string), string liabilityShift = default(string), string mcBankNetReferenceNumber = default(string), string merchantAdviceCode = default(string), string merchantReference = default(string), string networkTxReference = default(string), string ownerName = default(string), string paymentAccountReference = default(string), string paymentMethod = default(string), string paymentMethodVariant = default(string), string payoutEligible = default(string), string realtimeAccountUpdaterStatus = default(string), string receiptFreeText = default(string), string recurringContractTypes = default(string), string recurringFirstPspReference = default(string), string recurringRecurringDetailReference = default(string), string recurringShopperReference = default(string), RecurringProcessingModelEnum? recurringProcessingModel = default(RecurringProcessingModelEnum?), string referred = default(string), string refusalReasonRaw = default(string), string requestAmount = default(string), string requestCurrencyCode = default(string), string shopperInteraction = default(string), string shopperReference = default(string), string terminalId = default(string), string threeDAuthenticated = default(string), string threeDAuthenticatedResponse = default(string), string threeDOffered = default(string), string threeDOfferedResponse = default(string), string threeDSVersion = default(string), string tokenizationShopperReference = default(string), TokenizationStoreOperationTypeEnum? tokenizationStoreOperationType = default(TokenizationStoreOperationTypeEnum?), string tokenizationStoredPaymentMethodId = default(string), string visaTransactionId = default(string), string xid = default(string)) - { - this.AcquirerAccountCode = acquirerAccountCode; - this.AcquirerCode = acquirerCode; - this.AcquirerReference = acquirerReference; - this.Alias = alias; - this.AliasType = aliasType; - this.AuthCode = authCode; - this.AuthorisationMid = authorisationMid; - this.AuthorisedAmountCurrency = authorisedAmountCurrency; - this.AuthorisedAmountValue = authorisedAmountValue; - this.AvsResult = avsResult; - this.AvsResultRaw = avsResultRaw; - this.Bic = bic; - this.CoBrandedWith = coBrandedWith; - this.CvcResult = cvcResult; - this.CvcResultRaw = cvcResultRaw; - this.DsTransID = dsTransID; - this.Eci = eci; - this.ExpiryDate = expiryDate; - this.ExtraCostsCurrency = extraCostsCurrency; - this.ExtraCostsValue = extraCostsValue; - this.FraudCheckItemNrFraudCheckname = fraudCheckItemNrFraudCheckname; - this.FraudManualReview = fraudManualReview; - this.FraudResultType = fraudResultType; - this.FraudRiskLevel = fraudRiskLevel; - this.FundingSource = fundingSource; - this.FundsAvailability = fundsAvailability; - this.InferredRefusalReason = inferredRefusalReason; - this.IsCardCommercial = isCardCommercial; - this.IssuerCountry = issuerCountry; - this.LiabilityShift = liabilityShift; - this.McBankNetReferenceNumber = mcBankNetReferenceNumber; - this.MerchantAdviceCode = merchantAdviceCode; - this.MerchantReference = merchantReference; - this.NetworkTxReference = networkTxReference; - this.OwnerName = ownerName; - this.PaymentAccountReference = paymentAccountReference; - this.PaymentMethod = paymentMethod; - this.PaymentMethodVariant = paymentMethodVariant; - this.PayoutEligible = payoutEligible; - this.RealtimeAccountUpdaterStatus = realtimeAccountUpdaterStatus; - this.ReceiptFreeText = receiptFreeText; - this.RecurringContractTypes = recurringContractTypes; - this.RecurringFirstPspReference = recurringFirstPspReference; - this.RecurringRecurringDetailReference = recurringRecurringDetailReference; - this.RecurringShopperReference = recurringShopperReference; - this.RecurringProcessingModel = recurringProcessingModel; - this.Referred = referred; - this.RefusalReasonRaw = refusalReasonRaw; - this.RequestAmount = requestAmount; - this.RequestCurrencyCode = requestCurrencyCode; - this.ShopperInteraction = shopperInteraction; - this.ShopperReference = shopperReference; - this.TerminalId = terminalId; - this.ThreeDAuthenticated = threeDAuthenticated; - this.ThreeDAuthenticatedResponse = threeDAuthenticatedResponse; - this.ThreeDOffered = threeDOffered; - this.ThreeDOfferedResponse = threeDOfferedResponse; - this.ThreeDSVersion = threeDSVersion; - this.TokenizationShopperReference = tokenizationShopperReference; - this.TokenizationStoreOperationType = tokenizationStoreOperationType; - this.TokenizationStoredPaymentMethodId = tokenizationStoredPaymentMethodId; - this.VisaTransactionId = visaTransactionId; - this.Xid = xid; - } - - /// - /// The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions. - /// - /// The name of the Adyen acquirer account. Example: PayPalSandbox_TestAcquirer > Only relevant for PayPal transactions. - [DataMember(Name = "acquirerAccountCode", EmitDefaultValue = false)] - public string AcquirerAccountCode { get; set; } - - /// - /// The name of the acquirer processing the payment request. Example: TestPmmAcquirer - /// - /// The name of the acquirer processing the payment request. Example: TestPmmAcquirer - [DataMember(Name = "acquirerCode", EmitDefaultValue = false)] - public string AcquirerCode { get; set; } - - /// - /// The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9 - /// - /// The reference number that can be used for reconciliation in case a non-Adyen acquirer is used for settlement. Example: 7C9N3FNBKT9 - [DataMember(Name = "acquirerReference", EmitDefaultValue = false)] - public string AcquirerReference { get; set; } - - /// - /// The Adyen alias of the card. Example: H167852639363479 - /// - /// The Adyen alias of the card. Example: H167852639363479 - [DataMember(Name = "alias", EmitDefaultValue = false)] - public string Alias { get; set; } - - /// - /// The type of the card alias. Example: Default - /// - /// The type of the card alias. Example: Default - [DataMember(Name = "aliasType", EmitDefaultValue = false)] - public string AliasType { get; set; } - - /// - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747 - /// - /// Authorisation code: * When the payment is authorised successfully, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. Example: 58747 - [DataMember(Name = "authCode", EmitDefaultValue = false)] - public string AuthCode { get; set; } - - /// - /// Merchant ID known by the acquirer. - /// - /// Merchant ID known by the acquirer. - [DataMember(Name = "authorisationMid", EmitDefaultValue = false)] - public string AuthorisationMid { get; set; } - - /// - /// The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The currency of the authorised amount, as a three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "authorisedAmountCurrency", EmitDefaultValue = false)] - public string AuthorisedAmountCurrency { get; set; } - - /// - /// Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - /// - /// Value of the amount authorised. This amount is represented in minor units according to the [following table](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "authorisedAmountValue", EmitDefaultValue = false)] - public string AuthorisedAmountValue { get; set; } - - /// - /// The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs). - /// - /// The AVS result code of the payment, which provides information about the outcome of the AVS check. For possible values, see [AVS](https://docs.adyen.com/risk-management/configure-standard-risk-rules/consistency-rules#billing-address-does-not-match-cardholder-address-avs). - [DataMember(Name = "avsResult", EmitDefaultValue = false)] - public string AvsResult { get; set; } - - /// - /// Raw AVS result received from the acquirer, where available. Example: D - /// - /// Raw AVS result received from the acquirer, where available. Example: D - [DataMember(Name = "avsResultRaw", EmitDefaultValue = false)] - public string AvsResultRaw { get; set; } - - /// - /// BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions. - /// - /// BIC of a bank account. Example: TESTNL01 > Only relevant for SEPA Direct Debit transactions. - [DataMember(Name = "bic", EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Includes the co-branded card information. - /// - /// Includes the co-branded card information. - [DataMember(Name = "coBrandedWith", EmitDefaultValue = false)] - public string CoBrandedWith { get; set; } - - /// - /// The result of CVC verification. - /// - /// The result of CVC verification. - [DataMember(Name = "cvcResult", EmitDefaultValue = false)] - public string CvcResult { get; set; } - - /// - /// The raw result of CVC verification. - /// - /// The raw result of CVC verification. - [DataMember(Name = "cvcResultRaw", EmitDefaultValue = false)] - public string CvcResultRaw { get; set; } - - /// - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction. - /// - /// Supported for 3D Secure 2. The unique transaction identifier assigned by the DS to identify a single transaction. - [DataMember(Name = "dsTransID", EmitDefaultValue = false)] - public string DsTransID { get; set; } - - /// - /// The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02 - /// - /// The Electronic Commerce Indicator returned from the schemes for the 3DS payment session. Example: 02 - [DataMember(Name = "eci", EmitDefaultValue = false)] - public string Eci { get; set; } - - /// - /// The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment. - /// - /// The expiry date on the card. Example: 6/2016 > Returned only in case of a card payment. - [DataMember(Name = "expiryDate", EmitDefaultValue = false)] - public string ExpiryDate { get; set; } - - /// - /// The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR - /// - /// The currency of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. Example: EUR - [DataMember(Name = "extraCostsCurrency", EmitDefaultValue = false)] - public string ExtraCostsCurrency { get; set; } - - /// - /// The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units. - /// - /// The value of the extra amount charged due to additional amounts set in the skin used in the HPP payment request. The amount is in minor units. - [DataMember(Name = "extraCostsValue", EmitDefaultValue = false)] - public string ExtraCostsValue { get; set; } - - /// - /// The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair. - /// - /// The fraud score due to a particular fraud check. The fraud check name is found in the key of the key-value pair. - [DataMember(Name = "fraudCheck-[itemNr]-[FraudCheckname]", EmitDefaultValue = false)] - public string FraudCheckItemNrFraudCheckname { get; set; } - - /// - /// Indicates if the payment is sent to manual review. - /// - /// Indicates if the payment is sent to manual review. - [DataMember(Name = "fraudManualReview", EmitDefaultValue = false)] - public string FraudManualReview { get; set; } - - /// - /// Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. - /// - /// Information regarding the funding type of the card. The possible return values are: * CHARGE * CREDIT * DEBIT * PREPAID * PREPAID_RELOADABLE * PREPAID_NONRELOADABLE * DEFFERED_DEBIT > This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. For receiving this field in the notification, enable **Include Funding Source** in **Notifications** > **Additional settings**. - [DataMember(Name = "fundingSource", EmitDefaultValue = false)] - public string FundingSource { get; set; } - - /// - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\". - /// - /// Indicates availability of funds. Visa: * \"I\" (fast funds are supported) * \"N\" (otherwise) Mastercard: * \"I\" (product type is Prepaid or Debit, or issuing country is in CEE/HGEM list) * \"N\" (otherwise) > Returned when you verify a card BIN or estimate costs, and only if payoutEligible is \"Y\" or \"D\". - [DataMember(Name = "fundsAvailability", EmitDefaultValue = false)] - public string FundsAvailability { get; set; } - - /// - /// Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card - /// - /// Provides the more granular indication of why a transaction was refused. When a transaction fails with either \"Refused\", \"Restricted Card\", \"Transaction Not Permitted\", \"Not supported\" or \"DeclinedNon Generic\" refusalReason from the issuer, Adyen cross references its PSP-wide data for extra insight into the refusal reason. If an inferred refusal reason is available, the `inferredRefusalReason`, field is populated and the `refusalReason`, is set to \"Not Supported\". Possible values: * 3D Secure Mandated * Closed Account * ContAuth Not Supported * CVC Mandated * Ecommerce Not Allowed * Crossborder Not Supported * Card Updated * Low Authrate Bin * Non-reloadable prepaid card - [DataMember(Name = "inferredRefusalReason", EmitDefaultValue = false)] - public string InferredRefusalReason { get; set; } - - /// - /// Indicates if the card is used for business purposes only. - /// - /// Indicates if the card is used for business purposes only. - [DataMember(Name = "isCardCommercial", EmitDefaultValue = false)] - public string IsCardCommercial { get; set; } - - /// - /// The issuing country of the card based on the BIN list that Adyen maintains. Example: JP - /// - /// The issuing country of the card based on the BIN list that Adyen maintains. Example: JP - [DataMember(Name = "issuerCountry", EmitDefaultValue = false)] - public string IssuerCountry { get; set; } - - /// - /// A Boolean value indicating whether a liability shift was offered for this payment. - /// - /// A Boolean value indicating whether a liability shift was offered for this payment. - [DataMember(Name = "liabilityShift", EmitDefaultValue = false)] - public string LiabilityShift { get; set; } - - /// - /// The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field. - /// - /// The `mcBankNetReferenceNumber`, is a minimum of six characters and a maximum of nine characters long. > Contact Support Team to enable this field. - [DataMember(Name = "mcBankNetReferenceNumber", EmitDefaultValue = false)] - public string McBankNetReferenceNumber { get; set; } - - /// - /// The Merchant Advice Code (MAC) can be returned by Mastercard issuers for refused payments. If present, the MAC contains information about why the payment failed, and whether it can be retried. For more information see [Mastercard Merchant Advice Codes](https://docs.adyen.com/development-resources/raw-acquirer-responses#mastercard-merchant-advice-codes). - /// - /// The Merchant Advice Code (MAC) can be returned by Mastercard issuers for refused payments. If present, the MAC contains information about why the payment failed, and whether it can be retried. For more information see [Mastercard Merchant Advice Codes](https://docs.adyen.com/development-resources/raw-acquirer-responses#mastercard-merchant-advice-codes). - [DataMember(Name = "merchantAdviceCode", EmitDefaultValue = false)] - public string MerchantAdviceCode { get; set; } - - /// - /// The reference provided for the transaction. - /// - /// The reference provided for the transaction. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - [DataMember(Name = "networkTxReference", EmitDefaultValue = false)] - public string NetworkTxReference { get; set; } - - /// - /// The owner name of a bank account. Only relevant for SEPA Direct Debit transactions. - /// - /// The owner name of a bank account. Only relevant for SEPA Direct Debit transactions. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters. - /// - /// The Payment Account Reference (PAR) value links a network token with the underlying primary account number (PAN). The PAR value consists of 29 uppercase alphanumeric characters. - [DataMember(Name = "paymentAccountReference", EmitDefaultValue = false)] - public string PaymentAccountReference { get; set; } - - /// - /// The payment method used in the transaction. - /// - /// The payment method used in the transaction. - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public string PaymentMethod { get; set; } - - /// - /// The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro - /// - /// The Adyen sub-variant of the payment method used for the payment request. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). Example: mcpro - [DataMember(Name = "paymentMethodVariant", EmitDefaultValue = false)] - public string PaymentMethodVariant { get; set; } - - /// - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) - /// - /// Indicates whether a payout is eligible or not for this card. Visa: * \"Y\" * \"N\" Mastercard: * \"Y\" (domestic and cross-border) * \"D\" (only domestic) * \"N\" (no MoneySend) * \"U\" (unknown) - [DataMember(Name = "payoutEligible", EmitDefaultValue = false)] - public string PayoutEligible { get; set; } - - /// - /// The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder - /// - /// The response code from the Real Time Account Updater service. Possible return values are: * CardChanged * CardExpiryChanged * CloseAccount * ContactCardAccountHolder - [DataMember(Name = "realtimeAccountUpdaterStatus", EmitDefaultValue = false)] - public string RealtimeAccountUpdaterStatus { get; set; } - - /// - /// Message to be displayed on the terminal. - /// - /// Message to be displayed on the terminal. - [DataMember(Name = "receiptFreeText", EmitDefaultValue = false)] - public string ReceiptFreeText { get; set; } - - /// - /// The recurring contract types applicable to the transaction. - /// - /// The recurring contract types applicable to the transaction. - [DataMember(Name = "recurring.contractTypes", EmitDefaultValue = false)] - public string RecurringContractTypes { get; set; } - - /// - /// The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. - /// - /// The `pspReference`, of the first recurring payment that created the recurring detail. This functionality requires additional configuration on Adyen's end. To enable it, contact the Support Team. - [DataMember(Name = "recurring.firstPspReference", EmitDefaultValue = false)] - public string RecurringFirstPspReference { get; set; } - - /// - /// The reference that uniquely identifies the recurring transaction. - /// - /// The reference that uniquely identifies the recurring transaction. - [DataMember(Name = "recurring.recurringDetailReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Payout API v68. Use tokenization.storedPaymentMethodId instead.")] - public string RecurringRecurringDetailReference { get; set; } - - /// - /// The provided reference of the shopper for a recurring transaction. - /// - /// The provided reference of the shopper for a recurring transaction. - [DataMember(Name = "recurring.shopperReference", EmitDefaultValue = false)] - [Obsolete("Deprecated since Adyen Payout API v68. Use tokenization.shopperReference instead.")] - public string RecurringShopperReference { get; set; } - - /// - /// If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true - /// - /// If the payment is referred, this field is set to true. This field is unavailable if the payment is referred and is usually not returned with ecommerce transactions. Example: true - [DataMember(Name = "referred", EmitDefaultValue = false)] - public string Referred { get; set; } - - /// - /// Raw refusal reason received from the acquirer, where available. Example: AUTHORISED - /// - /// Raw refusal reason received from the acquirer, where available. Example: AUTHORISED - [DataMember(Name = "refusalReasonRaw", EmitDefaultValue = false)] - public string RefusalReasonRaw { get; set; } - - /// - /// The amount of the payment request. - /// - /// The amount of the payment request. - [DataMember(Name = "requestAmount", EmitDefaultValue = false)] - public string RequestAmount { get; set; } - - /// - /// The currency of the payment request. - /// - /// The currency of the payment request. - [DataMember(Name = "requestCurrencyCode", EmitDefaultValue = false)] - public string RequestCurrencyCode { get; set; } - - /// - /// The shopper interaction type of the payment request. Example: Ecommerce - /// - /// The shopper interaction type of the payment request. Example: Ecommerce - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public string ShopperInteraction { get; set; } - - /// - /// The shopperReference passed in the payment request. Example: AdyenTestShopperXX - /// - /// The shopperReference passed in the payment request. Example: AdyenTestShopperXX - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The terminal ID used in a point-of-sale payment. Example: 06022622 - /// - /// The terminal ID used in a point-of-sale payment. Example: 06022622 - [DataMember(Name = "terminalId", EmitDefaultValue = false)] - public string TerminalId { get; set; } - - /// - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - /// - /// A Boolean value indicating whether 3DS authentication was completed on this payment. Example: true - [DataMember(Name = "threeDAuthenticated", EmitDefaultValue = false)] - public string ThreeDAuthenticated { get; set; } - - /// - /// The raw 3DS authentication result from the card issuer. Example: N - /// - /// The raw 3DS authentication result from the card issuer. Example: N - [DataMember(Name = "threeDAuthenticatedResponse", EmitDefaultValue = false)] - public string ThreeDAuthenticatedResponse { get; set; } - - /// - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true - /// - /// A Boolean value indicating whether 3DS was offered for this payment. Example: true - [DataMember(Name = "threeDOffered", EmitDefaultValue = false)] - public string ThreeDOffered { get; set; } - - /// - /// The raw enrollment result from the 3DS directory services of the card schemes. Example: Y - /// - /// The raw enrollment result from the 3DS directory services of the card schemes. Example: Y - [DataMember(Name = "threeDOfferedResponse", EmitDefaultValue = false)] - public string ThreeDOfferedResponse { get; set; } - - /// - /// The 3D Secure 2 version. - /// - /// The 3D Secure 2 version. - [DataMember(Name = "threeDSVersion", EmitDefaultValue = false)] - public string ThreeDSVersion { get; set; } - - /// - /// The reference for the shopper that you sent when tokenizing the payment details. - /// - /// The reference for the shopper that you sent when tokenizing the payment details. - [DataMember(Name = "tokenization.shopperReference", EmitDefaultValue = false)] - public string TokenizationShopperReference { get; set; } - - /// - /// The reference that uniquely identifies tokenized payment details. - /// - /// The reference that uniquely identifies tokenized payment details. - [DataMember(Name = "tokenization.storedPaymentMethodId", EmitDefaultValue = false)] - public string TokenizationStoredPaymentMethodId { get; set; } - - /// - /// The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field. - /// - /// The `visaTransactionId`, has a fixed length of 15 numeric characters. > Contact Support Team to enable this field. - [DataMember(Name = "visaTransactionId", EmitDefaultValue = false)] - public string VisaTransactionId { get; set; } - - /// - /// The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= - /// - /// The 3DS transaction ID of the 3DS session sent in notifications. The value is Base64-encoded and is returned for transactions with directoryResponse 'N' or 'Y'. Example: ODgxNDc2MDg2MDExODk5MAAAAAA= - [DataMember(Name = "xid", EmitDefaultValue = false)] - public string Xid { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataCommon {\n"); - sb.Append(" AcquirerAccountCode: ").Append(AcquirerAccountCode).Append("\n"); - sb.Append(" AcquirerCode: ").Append(AcquirerCode).Append("\n"); - sb.Append(" AcquirerReference: ").Append(AcquirerReference).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" AliasType: ").Append(AliasType).Append("\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" AuthorisationMid: ").Append(AuthorisationMid).Append("\n"); - sb.Append(" AuthorisedAmountCurrency: ").Append(AuthorisedAmountCurrency).Append("\n"); - sb.Append(" AuthorisedAmountValue: ").Append(AuthorisedAmountValue).Append("\n"); - sb.Append(" AvsResult: ").Append(AvsResult).Append("\n"); - sb.Append(" AvsResultRaw: ").Append(AvsResultRaw).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" CoBrandedWith: ").Append(CoBrandedWith).Append("\n"); - sb.Append(" CvcResult: ").Append(CvcResult).Append("\n"); - sb.Append(" CvcResultRaw: ").Append(CvcResultRaw).Append("\n"); - sb.Append(" DsTransID: ").Append(DsTransID).Append("\n"); - sb.Append(" Eci: ").Append(Eci).Append("\n"); - sb.Append(" ExpiryDate: ").Append(ExpiryDate).Append("\n"); - sb.Append(" ExtraCostsCurrency: ").Append(ExtraCostsCurrency).Append("\n"); - sb.Append(" ExtraCostsValue: ").Append(ExtraCostsValue).Append("\n"); - sb.Append(" FraudCheckItemNrFraudCheckname: ").Append(FraudCheckItemNrFraudCheckname).Append("\n"); - sb.Append(" FraudManualReview: ").Append(FraudManualReview).Append("\n"); - sb.Append(" FraudResultType: ").Append(FraudResultType).Append("\n"); - sb.Append(" FraudRiskLevel: ").Append(FraudRiskLevel).Append("\n"); - sb.Append(" FundingSource: ").Append(FundingSource).Append("\n"); - sb.Append(" FundsAvailability: ").Append(FundsAvailability).Append("\n"); - sb.Append(" InferredRefusalReason: ").Append(InferredRefusalReason).Append("\n"); - sb.Append(" IsCardCommercial: ").Append(IsCardCommercial).Append("\n"); - sb.Append(" IssuerCountry: ").Append(IssuerCountry).Append("\n"); - sb.Append(" LiabilityShift: ").Append(LiabilityShift).Append("\n"); - sb.Append(" McBankNetReferenceNumber: ").Append(McBankNetReferenceNumber).Append("\n"); - sb.Append(" MerchantAdviceCode: ").Append(MerchantAdviceCode).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" NetworkTxReference: ").Append(NetworkTxReference).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" PaymentAccountReference: ").Append(PaymentAccountReference).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" PaymentMethodVariant: ").Append(PaymentMethodVariant).Append("\n"); - sb.Append(" PayoutEligible: ").Append(PayoutEligible).Append("\n"); - sb.Append(" RealtimeAccountUpdaterStatus: ").Append(RealtimeAccountUpdaterStatus).Append("\n"); - sb.Append(" ReceiptFreeText: ").Append(ReceiptFreeText).Append("\n"); - sb.Append(" RecurringContractTypes: ").Append(RecurringContractTypes).Append("\n"); - sb.Append(" RecurringFirstPspReference: ").Append(RecurringFirstPspReference).Append("\n"); - sb.Append(" RecurringRecurringDetailReference: ").Append(RecurringRecurringDetailReference).Append("\n"); - sb.Append(" RecurringShopperReference: ").Append(RecurringShopperReference).Append("\n"); - sb.Append(" RecurringProcessingModel: ").Append(RecurringProcessingModel).Append("\n"); - sb.Append(" Referred: ").Append(Referred).Append("\n"); - sb.Append(" RefusalReasonRaw: ").Append(RefusalReasonRaw).Append("\n"); - sb.Append(" RequestAmount: ").Append(RequestAmount).Append("\n"); - sb.Append(" RequestCurrencyCode: ").Append(RequestCurrencyCode).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" TerminalId: ").Append(TerminalId).Append("\n"); - sb.Append(" ThreeDAuthenticated: ").Append(ThreeDAuthenticated).Append("\n"); - sb.Append(" ThreeDAuthenticatedResponse: ").Append(ThreeDAuthenticatedResponse).Append("\n"); - sb.Append(" ThreeDOffered: ").Append(ThreeDOffered).Append("\n"); - sb.Append(" ThreeDOfferedResponse: ").Append(ThreeDOfferedResponse).Append("\n"); - sb.Append(" ThreeDSVersion: ").Append(ThreeDSVersion).Append("\n"); - sb.Append(" TokenizationShopperReference: ").Append(TokenizationShopperReference).Append("\n"); - sb.Append(" TokenizationStoreOperationType: ").Append(TokenizationStoreOperationType).Append("\n"); - sb.Append(" TokenizationStoredPaymentMethodId: ").Append(TokenizationStoredPaymentMethodId).Append("\n"); - sb.Append(" VisaTransactionId: ").Append(VisaTransactionId).Append("\n"); - sb.Append(" Xid: ").Append(Xid).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataCommon); - } - - /// - /// Returns true if ResponseAdditionalDataCommon instances are equal - /// - /// Instance of ResponseAdditionalDataCommon to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataCommon input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquirerAccountCode == input.AcquirerAccountCode || - (this.AcquirerAccountCode != null && - this.AcquirerAccountCode.Equals(input.AcquirerAccountCode)) - ) && - ( - this.AcquirerCode == input.AcquirerCode || - (this.AcquirerCode != null && - this.AcquirerCode.Equals(input.AcquirerCode)) - ) && - ( - this.AcquirerReference == input.AcquirerReference || - (this.AcquirerReference != null && - this.AcquirerReference.Equals(input.AcquirerReference)) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.AliasType == input.AliasType || - (this.AliasType != null && - this.AliasType.Equals(input.AliasType)) - ) && - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.AuthorisationMid == input.AuthorisationMid || - (this.AuthorisationMid != null && - this.AuthorisationMid.Equals(input.AuthorisationMid)) - ) && - ( - this.AuthorisedAmountCurrency == input.AuthorisedAmountCurrency || - (this.AuthorisedAmountCurrency != null && - this.AuthorisedAmountCurrency.Equals(input.AuthorisedAmountCurrency)) - ) && - ( - this.AuthorisedAmountValue == input.AuthorisedAmountValue || - (this.AuthorisedAmountValue != null && - this.AuthorisedAmountValue.Equals(input.AuthorisedAmountValue)) - ) && - ( - this.AvsResult == input.AvsResult || - (this.AvsResult != null && - this.AvsResult.Equals(input.AvsResult)) - ) && - ( - this.AvsResultRaw == input.AvsResultRaw || - (this.AvsResultRaw != null && - this.AvsResultRaw.Equals(input.AvsResultRaw)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.CoBrandedWith == input.CoBrandedWith || - (this.CoBrandedWith != null && - this.CoBrandedWith.Equals(input.CoBrandedWith)) - ) && - ( - this.CvcResult == input.CvcResult || - (this.CvcResult != null && - this.CvcResult.Equals(input.CvcResult)) - ) && - ( - this.CvcResultRaw == input.CvcResultRaw || - (this.CvcResultRaw != null && - this.CvcResultRaw.Equals(input.CvcResultRaw)) - ) && - ( - this.DsTransID == input.DsTransID || - (this.DsTransID != null && - this.DsTransID.Equals(input.DsTransID)) - ) && - ( - this.Eci == input.Eci || - (this.Eci != null && - this.Eci.Equals(input.Eci)) - ) && - ( - this.ExpiryDate == input.ExpiryDate || - (this.ExpiryDate != null && - this.ExpiryDate.Equals(input.ExpiryDate)) - ) && - ( - this.ExtraCostsCurrency == input.ExtraCostsCurrency || - (this.ExtraCostsCurrency != null && - this.ExtraCostsCurrency.Equals(input.ExtraCostsCurrency)) - ) && - ( - this.ExtraCostsValue == input.ExtraCostsValue || - (this.ExtraCostsValue != null && - this.ExtraCostsValue.Equals(input.ExtraCostsValue)) - ) && - ( - this.FraudCheckItemNrFraudCheckname == input.FraudCheckItemNrFraudCheckname || - (this.FraudCheckItemNrFraudCheckname != null && - this.FraudCheckItemNrFraudCheckname.Equals(input.FraudCheckItemNrFraudCheckname)) - ) && - ( - this.FraudManualReview == input.FraudManualReview || - (this.FraudManualReview != null && - this.FraudManualReview.Equals(input.FraudManualReview)) - ) && - ( - this.FraudResultType == input.FraudResultType || - this.FraudResultType.Equals(input.FraudResultType) - ) && - ( - this.FraudRiskLevel == input.FraudRiskLevel || - this.FraudRiskLevel.Equals(input.FraudRiskLevel) - ) && - ( - this.FundingSource == input.FundingSource || - (this.FundingSource != null && - this.FundingSource.Equals(input.FundingSource)) - ) && - ( - this.FundsAvailability == input.FundsAvailability || - (this.FundsAvailability != null && - this.FundsAvailability.Equals(input.FundsAvailability)) - ) && - ( - this.InferredRefusalReason == input.InferredRefusalReason || - (this.InferredRefusalReason != null && - this.InferredRefusalReason.Equals(input.InferredRefusalReason)) - ) && - ( - this.IsCardCommercial == input.IsCardCommercial || - (this.IsCardCommercial != null && - this.IsCardCommercial.Equals(input.IsCardCommercial)) - ) && - ( - this.IssuerCountry == input.IssuerCountry || - (this.IssuerCountry != null && - this.IssuerCountry.Equals(input.IssuerCountry)) - ) && - ( - this.LiabilityShift == input.LiabilityShift || - (this.LiabilityShift != null && - this.LiabilityShift.Equals(input.LiabilityShift)) - ) && - ( - this.McBankNetReferenceNumber == input.McBankNetReferenceNumber || - (this.McBankNetReferenceNumber != null && - this.McBankNetReferenceNumber.Equals(input.McBankNetReferenceNumber)) - ) && - ( - this.MerchantAdviceCode == input.MerchantAdviceCode || - (this.MerchantAdviceCode != null && - this.MerchantAdviceCode.Equals(input.MerchantAdviceCode)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.NetworkTxReference == input.NetworkTxReference || - (this.NetworkTxReference != null && - this.NetworkTxReference.Equals(input.NetworkTxReference)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.PaymentAccountReference == input.PaymentAccountReference || - (this.PaymentAccountReference != null && - this.PaymentAccountReference.Equals(input.PaymentAccountReference)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.PaymentMethodVariant == input.PaymentMethodVariant || - (this.PaymentMethodVariant != null && - this.PaymentMethodVariant.Equals(input.PaymentMethodVariant)) - ) && - ( - this.PayoutEligible == input.PayoutEligible || - (this.PayoutEligible != null && - this.PayoutEligible.Equals(input.PayoutEligible)) - ) && - ( - this.RealtimeAccountUpdaterStatus == input.RealtimeAccountUpdaterStatus || - (this.RealtimeAccountUpdaterStatus != null && - this.RealtimeAccountUpdaterStatus.Equals(input.RealtimeAccountUpdaterStatus)) - ) && - ( - this.ReceiptFreeText == input.ReceiptFreeText || - (this.ReceiptFreeText != null && - this.ReceiptFreeText.Equals(input.ReceiptFreeText)) - ) && - ( - this.RecurringContractTypes == input.RecurringContractTypes || - (this.RecurringContractTypes != null && - this.RecurringContractTypes.Equals(input.RecurringContractTypes)) - ) && - ( - this.RecurringFirstPspReference == input.RecurringFirstPspReference || - (this.RecurringFirstPspReference != null && - this.RecurringFirstPspReference.Equals(input.RecurringFirstPspReference)) - ) && - ( - this.RecurringRecurringDetailReference == input.RecurringRecurringDetailReference || - (this.RecurringRecurringDetailReference != null && - this.RecurringRecurringDetailReference.Equals(input.RecurringRecurringDetailReference)) - ) && - ( - this.RecurringShopperReference == input.RecurringShopperReference || - (this.RecurringShopperReference != null && - this.RecurringShopperReference.Equals(input.RecurringShopperReference)) - ) && - ( - this.RecurringProcessingModel == input.RecurringProcessingModel || - this.RecurringProcessingModel.Equals(input.RecurringProcessingModel) - ) && - ( - this.Referred == input.Referred || - (this.Referred != null && - this.Referred.Equals(input.Referred)) - ) && - ( - this.RefusalReasonRaw == input.RefusalReasonRaw || - (this.RefusalReasonRaw != null && - this.RefusalReasonRaw.Equals(input.RefusalReasonRaw)) - ) && - ( - this.RequestAmount == input.RequestAmount || - (this.RequestAmount != null && - this.RequestAmount.Equals(input.RequestAmount)) - ) && - ( - this.RequestCurrencyCode == input.RequestCurrencyCode || - (this.RequestCurrencyCode != null && - this.RequestCurrencyCode.Equals(input.RequestCurrencyCode)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - (this.ShopperInteraction != null && - this.ShopperInteraction.Equals(input.ShopperInteraction)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.TerminalId == input.TerminalId || - (this.TerminalId != null && - this.TerminalId.Equals(input.TerminalId)) - ) && - ( - this.ThreeDAuthenticated == input.ThreeDAuthenticated || - (this.ThreeDAuthenticated != null && - this.ThreeDAuthenticated.Equals(input.ThreeDAuthenticated)) - ) && - ( - this.ThreeDAuthenticatedResponse == input.ThreeDAuthenticatedResponse || - (this.ThreeDAuthenticatedResponse != null && - this.ThreeDAuthenticatedResponse.Equals(input.ThreeDAuthenticatedResponse)) - ) && - ( - this.ThreeDOffered == input.ThreeDOffered || - (this.ThreeDOffered != null && - this.ThreeDOffered.Equals(input.ThreeDOffered)) - ) && - ( - this.ThreeDOfferedResponse == input.ThreeDOfferedResponse || - (this.ThreeDOfferedResponse != null && - this.ThreeDOfferedResponse.Equals(input.ThreeDOfferedResponse)) - ) && - ( - this.ThreeDSVersion == input.ThreeDSVersion || - (this.ThreeDSVersion != null && - this.ThreeDSVersion.Equals(input.ThreeDSVersion)) - ) && - ( - this.TokenizationShopperReference == input.TokenizationShopperReference || - (this.TokenizationShopperReference != null && - this.TokenizationShopperReference.Equals(input.TokenizationShopperReference)) - ) && - ( - this.TokenizationStoreOperationType == input.TokenizationStoreOperationType || - this.TokenizationStoreOperationType.Equals(input.TokenizationStoreOperationType) - ) && - ( - this.TokenizationStoredPaymentMethodId == input.TokenizationStoredPaymentMethodId || - (this.TokenizationStoredPaymentMethodId != null && - this.TokenizationStoredPaymentMethodId.Equals(input.TokenizationStoredPaymentMethodId)) - ) && - ( - this.VisaTransactionId == input.VisaTransactionId || - (this.VisaTransactionId != null && - this.VisaTransactionId.Equals(input.VisaTransactionId)) - ) && - ( - this.Xid == input.Xid || - (this.Xid != null && - this.Xid.Equals(input.Xid)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcquirerAccountCode != null) - { - hashCode = (hashCode * 59) + this.AcquirerAccountCode.GetHashCode(); - } - if (this.AcquirerCode != null) - { - hashCode = (hashCode * 59) + this.AcquirerCode.GetHashCode(); - } - if (this.AcquirerReference != null) - { - hashCode = (hashCode * 59) + this.AcquirerReference.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.AliasType != null) - { - hashCode = (hashCode * 59) + this.AliasType.GetHashCode(); - } - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.AuthorisationMid != null) - { - hashCode = (hashCode * 59) + this.AuthorisationMid.GetHashCode(); - } - if (this.AuthorisedAmountCurrency != null) - { - hashCode = (hashCode * 59) + this.AuthorisedAmountCurrency.GetHashCode(); - } - if (this.AuthorisedAmountValue != null) - { - hashCode = (hashCode * 59) + this.AuthorisedAmountValue.GetHashCode(); - } - if (this.AvsResult != null) - { - hashCode = (hashCode * 59) + this.AvsResult.GetHashCode(); - } - if (this.AvsResultRaw != null) - { - hashCode = (hashCode * 59) + this.AvsResultRaw.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - if (this.CoBrandedWith != null) - { - hashCode = (hashCode * 59) + this.CoBrandedWith.GetHashCode(); - } - if (this.CvcResult != null) - { - hashCode = (hashCode * 59) + this.CvcResult.GetHashCode(); - } - if (this.CvcResultRaw != null) - { - hashCode = (hashCode * 59) + this.CvcResultRaw.GetHashCode(); - } - if (this.DsTransID != null) - { - hashCode = (hashCode * 59) + this.DsTransID.GetHashCode(); - } - if (this.Eci != null) - { - hashCode = (hashCode * 59) + this.Eci.GetHashCode(); - } - if (this.ExpiryDate != null) - { - hashCode = (hashCode * 59) + this.ExpiryDate.GetHashCode(); - } - if (this.ExtraCostsCurrency != null) - { - hashCode = (hashCode * 59) + this.ExtraCostsCurrency.GetHashCode(); - } - if (this.ExtraCostsValue != null) - { - hashCode = (hashCode * 59) + this.ExtraCostsValue.GetHashCode(); - } - if (this.FraudCheckItemNrFraudCheckname != null) - { - hashCode = (hashCode * 59) + this.FraudCheckItemNrFraudCheckname.GetHashCode(); - } - if (this.FraudManualReview != null) - { - hashCode = (hashCode * 59) + this.FraudManualReview.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FraudResultType.GetHashCode(); - hashCode = (hashCode * 59) + this.FraudRiskLevel.GetHashCode(); - if (this.FundingSource != null) - { - hashCode = (hashCode * 59) + this.FundingSource.GetHashCode(); - } - if (this.FundsAvailability != null) - { - hashCode = (hashCode * 59) + this.FundsAvailability.GetHashCode(); - } - if (this.InferredRefusalReason != null) - { - hashCode = (hashCode * 59) + this.InferredRefusalReason.GetHashCode(); - } - if (this.IsCardCommercial != null) - { - hashCode = (hashCode * 59) + this.IsCardCommercial.GetHashCode(); - } - if (this.IssuerCountry != null) - { - hashCode = (hashCode * 59) + this.IssuerCountry.GetHashCode(); - } - if (this.LiabilityShift != null) - { - hashCode = (hashCode * 59) + this.LiabilityShift.GetHashCode(); - } - if (this.McBankNetReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.McBankNetReferenceNumber.GetHashCode(); - } - if (this.MerchantAdviceCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAdviceCode.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.NetworkTxReference != null) - { - hashCode = (hashCode * 59) + this.NetworkTxReference.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.PaymentAccountReference != null) - { - hashCode = (hashCode * 59) + this.PaymentAccountReference.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.PaymentMethodVariant != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodVariant.GetHashCode(); - } - if (this.PayoutEligible != null) - { - hashCode = (hashCode * 59) + this.PayoutEligible.GetHashCode(); - } - if (this.RealtimeAccountUpdaterStatus != null) - { - hashCode = (hashCode * 59) + this.RealtimeAccountUpdaterStatus.GetHashCode(); - } - if (this.ReceiptFreeText != null) - { - hashCode = (hashCode * 59) + this.ReceiptFreeText.GetHashCode(); - } - if (this.RecurringContractTypes != null) - { - hashCode = (hashCode * 59) + this.RecurringContractTypes.GetHashCode(); - } - if (this.RecurringFirstPspReference != null) - { - hashCode = (hashCode * 59) + this.RecurringFirstPspReference.GetHashCode(); - } - if (this.RecurringRecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringRecurringDetailReference.GetHashCode(); - } - if (this.RecurringShopperReference != null) - { - hashCode = (hashCode * 59) + this.RecurringShopperReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.RecurringProcessingModel.GetHashCode(); - if (this.Referred != null) - { - hashCode = (hashCode * 59) + this.Referred.GetHashCode(); - } - if (this.RefusalReasonRaw != null) - { - hashCode = (hashCode * 59) + this.RefusalReasonRaw.GetHashCode(); - } - if (this.RequestAmount != null) - { - hashCode = (hashCode * 59) + this.RequestAmount.GetHashCode(); - } - if (this.RequestCurrencyCode != null) - { - hashCode = (hashCode * 59) + this.RequestCurrencyCode.GetHashCode(); - } - if (this.ShopperInteraction != null) - { - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.TerminalId != null) - { - hashCode = (hashCode * 59) + this.TerminalId.GetHashCode(); - } - if (this.ThreeDAuthenticated != null) - { - hashCode = (hashCode * 59) + this.ThreeDAuthenticated.GetHashCode(); - } - if (this.ThreeDAuthenticatedResponse != null) - { - hashCode = (hashCode * 59) + this.ThreeDAuthenticatedResponse.GetHashCode(); - } - if (this.ThreeDOffered != null) - { - hashCode = (hashCode * 59) + this.ThreeDOffered.GetHashCode(); - } - if (this.ThreeDOfferedResponse != null) - { - hashCode = (hashCode * 59) + this.ThreeDOfferedResponse.GetHashCode(); - } - if (this.ThreeDSVersion != null) - { - hashCode = (hashCode * 59) + this.ThreeDSVersion.GetHashCode(); - } - if (this.TokenizationShopperReference != null) - { - hashCode = (hashCode * 59) + this.TokenizationShopperReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TokenizationStoreOperationType.GetHashCode(); - if (this.TokenizationStoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.TokenizationStoredPaymentMethodId.GetHashCode(); - } - if (this.VisaTransactionId != null) - { - hashCode = (hashCode * 59) + this.VisaTransactionId.GetHashCode(); - } - if (this.Xid != null) - { - hashCode = (hashCode * 59) + this.Xid.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.cs b/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.cs deleted file mode 100644 index b43d57253..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalDataDomesticError.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalDataDomesticError - /// - [DataContract(Name = "ResponseAdditionalDataDomesticError")] - public partial class ResponseAdditionalDataDomesticError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan.. - /// The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan.. - public ResponseAdditionalDataDomesticError(string domesticRefusalReasonRaw = default(string), string domesticShopperAdvice = default(string)) - { - this.DomesticRefusalReasonRaw = domesticRefusalReasonRaw; - this.DomesticShopperAdvice = domesticShopperAdvice; - } - - /// - /// The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. - /// - /// The reason the transaction was declined, given by the local issuer. Currently available for merchants in Japan. - [DataMember(Name = "domesticRefusalReasonRaw", EmitDefaultValue = false)] - public string DomesticRefusalReasonRaw { get; set; } - - /// - /// The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. - /// - /// The action the shopper should take, in a local language. Currently available in Japanese, for merchants in Japan. - [DataMember(Name = "domesticShopperAdvice", EmitDefaultValue = false)] - public string DomesticShopperAdvice { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataDomesticError {\n"); - sb.Append(" DomesticRefusalReasonRaw: ").Append(DomesticRefusalReasonRaw).Append("\n"); - sb.Append(" DomesticShopperAdvice: ").Append(DomesticShopperAdvice).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataDomesticError); - } - - /// - /// Returns true if ResponseAdditionalDataDomesticError instances are equal - /// - /// Instance of ResponseAdditionalDataDomesticError to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataDomesticError input) - { - if (input == null) - { - return false; - } - return - ( - this.DomesticRefusalReasonRaw == input.DomesticRefusalReasonRaw || - (this.DomesticRefusalReasonRaw != null && - this.DomesticRefusalReasonRaw.Equals(input.DomesticRefusalReasonRaw)) - ) && - ( - this.DomesticShopperAdvice == input.DomesticShopperAdvice || - (this.DomesticShopperAdvice != null && - this.DomesticShopperAdvice.Equals(input.DomesticShopperAdvice)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DomesticRefusalReasonRaw != null) - { - hashCode = (hashCode * 59) + this.DomesticRefusalReasonRaw.GetHashCode(); - } - if (this.DomesticShopperAdvice != null) - { - hashCode = (hashCode * 59) + this.DomesticShopperAdvice.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalDataInstallments.cs b/Adyen/Model/Payout/ResponseAdditionalDataInstallments.cs deleted file mode 100644 index a552e3755..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalDataInstallments.cs +++ /dev/null @@ -1,338 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalDataInstallments - /// - [DataContract(Name = "ResponseAdditionalDataInstallments")] - public partial class ResponseAdditionalDataInstallments : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Type of installment. The value of `installmentType` should be **IssuerFinanced**.. - /// Annual interest rate.. - /// First Installment Amount in minor units.. - /// Installment fee amount in minor units.. - /// Interest rate for the installment period.. - /// Maximum number of installments possible for this payment.. - /// Minimum number of installments possible for this payment.. - /// Total number of installments possible for this payment.. - /// Subsequent Installment Amount in minor units.. - /// Total amount in minor units.. - /// Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments. - /// The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments.. - public ResponseAdditionalDataInstallments(string installmentPaymentDataInstallmentType = default(string), string installmentPaymentDataOptionItemNrAnnualPercentageRate = default(string), string installmentPaymentDataOptionItemNrFirstInstallmentAmount = default(string), string installmentPaymentDataOptionItemNrInstallmentFee = default(string), string installmentPaymentDataOptionItemNrInterestRate = default(string), string installmentPaymentDataOptionItemNrMaximumNumberOfInstallments = default(string), string installmentPaymentDataOptionItemNrMinimumNumberOfInstallments = default(string), string installmentPaymentDataOptionItemNrNumberOfInstallments = default(string), string installmentPaymentDataOptionItemNrSubsequentInstallmentAmount = default(string), string installmentPaymentDataOptionItemNrTotalAmountDue = default(string), string installmentPaymentDataPaymentOptions = default(string), string installmentsValue = default(string)) - { - this.InstallmentPaymentDataInstallmentType = installmentPaymentDataInstallmentType; - this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate = installmentPaymentDataOptionItemNrAnnualPercentageRate; - this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount = installmentPaymentDataOptionItemNrFirstInstallmentAmount; - this.InstallmentPaymentDataOptionItemNrInstallmentFee = installmentPaymentDataOptionItemNrInstallmentFee; - this.InstallmentPaymentDataOptionItemNrInterestRate = installmentPaymentDataOptionItemNrInterestRate; - this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments = installmentPaymentDataOptionItemNrMaximumNumberOfInstallments; - this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments = installmentPaymentDataOptionItemNrMinimumNumberOfInstallments; - this.InstallmentPaymentDataOptionItemNrNumberOfInstallments = installmentPaymentDataOptionItemNrNumberOfInstallments; - this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount = installmentPaymentDataOptionItemNrSubsequentInstallmentAmount; - this.InstallmentPaymentDataOptionItemNrTotalAmountDue = installmentPaymentDataOptionItemNrTotalAmountDue; - this.InstallmentPaymentDataPaymentOptions = installmentPaymentDataPaymentOptions; - this.InstallmentsValue = installmentsValue; - } - - /// - /// Type of installment. The value of `installmentType` should be **IssuerFinanced**. - /// - /// Type of installment. The value of `installmentType` should be **IssuerFinanced**. - [DataMember(Name = "installmentPaymentData.installmentType", EmitDefaultValue = false)] - public string InstallmentPaymentDataInstallmentType { get; set; } - - /// - /// Annual interest rate. - /// - /// Annual interest rate. - [DataMember(Name = "installmentPaymentData.option[itemNr].annualPercentageRate", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrAnnualPercentageRate { get; set; } - - /// - /// First Installment Amount in minor units. - /// - /// First Installment Amount in minor units. - [DataMember(Name = "installmentPaymentData.option[itemNr].firstInstallmentAmount", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrFirstInstallmentAmount { get; set; } - - /// - /// Installment fee amount in minor units. - /// - /// Installment fee amount in minor units. - [DataMember(Name = "installmentPaymentData.option[itemNr].installmentFee", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrInstallmentFee { get; set; } - - /// - /// Interest rate for the installment period. - /// - /// Interest rate for the installment period. - [DataMember(Name = "installmentPaymentData.option[itemNr].interestRate", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrInterestRate { get; set; } - - /// - /// Maximum number of installments possible for this payment. - /// - /// Maximum number of installments possible for this payment. - [DataMember(Name = "installmentPaymentData.option[itemNr].maximumNumberOfInstallments", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments { get; set; } - - /// - /// Minimum number of installments possible for this payment. - /// - /// Minimum number of installments possible for this payment. - [DataMember(Name = "installmentPaymentData.option[itemNr].minimumNumberOfInstallments", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments { get; set; } - - /// - /// Total number of installments possible for this payment. - /// - /// Total number of installments possible for this payment. - [DataMember(Name = "installmentPaymentData.option[itemNr].numberOfInstallments", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrNumberOfInstallments { get; set; } - - /// - /// Subsequent Installment Amount in minor units. - /// - /// Subsequent Installment Amount in minor units. - [DataMember(Name = "installmentPaymentData.option[itemNr].subsequentInstallmentAmount", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount { get; set; } - - /// - /// Total amount in minor units. - /// - /// Total amount in minor units. - [DataMember(Name = "installmentPaymentData.option[itemNr].totalAmountDue", EmitDefaultValue = false)] - public string InstallmentPaymentDataOptionItemNrTotalAmountDue { get; set; } - - /// - /// Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments - /// - /// Possible values: * PayInInstallmentsOnly * PayInFullOnly * PayInFullOrInstallments - [DataMember(Name = "installmentPaymentData.paymentOptions", EmitDefaultValue = false)] - public string InstallmentPaymentDataPaymentOptions { get; set; } - - /// - /// The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments. - /// - /// The number of installments that the payment amount should be charged with. Example: 5 > Only relevant for card payments in countries that support installments. - [DataMember(Name = "installments.value", EmitDefaultValue = false)] - public string InstallmentsValue { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataInstallments {\n"); - sb.Append(" InstallmentPaymentDataInstallmentType: ").Append(InstallmentPaymentDataInstallmentType).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrAnnualPercentageRate: ").Append(InstallmentPaymentDataOptionItemNrAnnualPercentageRate).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrFirstInstallmentAmount: ").Append(InstallmentPaymentDataOptionItemNrFirstInstallmentAmount).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrInstallmentFee: ").Append(InstallmentPaymentDataOptionItemNrInstallmentFee).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrInterestRate: ").Append(InstallmentPaymentDataOptionItemNrInterestRate).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments: ").Append(InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments: ").Append(InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrNumberOfInstallments: ").Append(InstallmentPaymentDataOptionItemNrNumberOfInstallments).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount: ").Append(InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount).Append("\n"); - sb.Append(" InstallmentPaymentDataOptionItemNrTotalAmountDue: ").Append(InstallmentPaymentDataOptionItemNrTotalAmountDue).Append("\n"); - sb.Append(" InstallmentPaymentDataPaymentOptions: ").Append(InstallmentPaymentDataPaymentOptions).Append("\n"); - sb.Append(" InstallmentsValue: ").Append(InstallmentsValue).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataInstallments); - } - - /// - /// Returns true if ResponseAdditionalDataInstallments instances are equal - /// - /// Instance of ResponseAdditionalDataInstallments to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataInstallments input) - { - if (input == null) - { - return false; - } - return - ( - this.InstallmentPaymentDataInstallmentType == input.InstallmentPaymentDataInstallmentType || - (this.InstallmentPaymentDataInstallmentType != null && - this.InstallmentPaymentDataInstallmentType.Equals(input.InstallmentPaymentDataInstallmentType)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate == input.InstallmentPaymentDataOptionItemNrAnnualPercentageRate || - (this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate != null && - this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate.Equals(input.InstallmentPaymentDataOptionItemNrAnnualPercentageRate)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount == input.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount || - (this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount != null && - this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount.Equals(input.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrInstallmentFee == input.InstallmentPaymentDataOptionItemNrInstallmentFee || - (this.InstallmentPaymentDataOptionItemNrInstallmentFee != null && - this.InstallmentPaymentDataOptionItemNrInstallmentFee.Equals(input.InstallmentPaymentDataOptionItemNrInstallmentFee)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrInterestRate == input.InstallmentPaymentDataOptionItemNrInterestRate || - (this.InstallmentPaymentDataOptionItemNrInterestRate != null && - this.InstallmentPaymentDataOptionItemNrInterestRate.Equals(input.InstallmentPaymentDataOptionItemNrInterestRate)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments == input.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments || - (this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments != null && - this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments.Equals(input.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments == input.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments || - (this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments != null && - this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments.Equals(input.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrNumberOfInstallments == input.InstallmentPaymentDataOptionItemNrNumberOfInstallments || - (this.InstallmentPaymentDataOptionItemNrNumberOfInstallments != null && - this.InstallmentPaymentDataOptionItemNrNumberOfInstallments.Equals(input.InstallmentPaymentDataOptionItemNrNumberOfInstallments)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount == input.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount || - (this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount != null && - this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount.Equals(input.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount)) - ) && - ( - this.InstallmentPaymentDataOptionItemNrTotalAmountDue == input.InstallmentPaymentDataOptionItemNrTotalAmountDue || - (this.InstallmentPaymentDataOptionItemNrTotalAmountDue != null && - this.InstallmentPaymentDataOptionItemNrTotalAmountDue.Equals(input.InstallmentPaymentDataOptionItemNrTotalAmountDue)) - ) && - ( - this.InstallmentPaymentDataPaymentOptions == input.InstallmentPaymentDataPaymentOptions || - (this.InstallmentPaymentDataPaymentOptions != null && - this.InstallmentPaymentDataPaymentOptions.Equals(input.InstallmentPaymentDataPaymentOptions)) - ) && - ( - this.InstallmentsValue == input.InstallmentsValue || - (this.InstallmentsValue != null && - this.InstallmentsValue.Equals(input.InstallmentsValue)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InstallmentPaymentDataInstallmentType != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataInstallmentType.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrAnnualPercentageRate.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrFirstInstallmentAmount.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrInstallmentFee != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrInstallmentFee.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrInterestRate != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrInterestRate.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrMaximumNumberOfInstallments.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrMinimumNumberOfInstallments.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrNumberOfInstallments != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrNumberOfInstallments.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrSubsequentInstallmentAmount.GetHashCode(); - } - if (this.InstallmentPaymentDataOptionItemNrTotalAmountDue != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataOptionItemNrTotalAmountDue.GetHashCode(); - } - if (this.InstallmentPaymentDataPaymentOptions != null) - { - hashCode = (hashCode * 59) + this.InstallmentPaymentDataPaymentOptions.GetHashCode(); - } - if (this.InstallmentsValue != null) - { - hashCode = (hashCode * 59) + this.InstallmentsValue.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.cs b/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.cs deleted file mode 100644 index 0a5941461..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalDataNetworkTokens.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalDataNetworkTokens - /// - [DataContract(Name = "ResponseAdditionalDataNetworkTokens")] - public partial class ResponseAdditionalDataNetworkTokens : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether a network token is available for the specified card.. - /// The Bank Identification Number of a tokenized card, which is the first six digits of a card number.. - /// The last four digits of a network token.. - public ResponseAdditionalDataNetworkTokens(string networkTokenAvailable = default(string), string networkTokenBin = default(string), string networkTokenTokenSummary = default(string)) - { - this.NetworkTokenAvailable = networkTokenAvailable; - this.NetworkTokenBin = networkTokenBin; - this.NetworkTokenTokenSummary = networkTokenTokenSummary; - } - - /// - /// Indicates whether a network token is available for the specified card. - /// - /// Indicates whether a network token is available for the specified card. - [DataMember(Name = "networkToken.available", EmitDefaultValue = false)] - public string NetworkTokenAvailable { get; set; } - - /// - /// The Bank Identification Number of a tokenized card, which is the first six digits of a card number. - /// - /// The Bank Identification Number of a tokenized card, which is the first six digits of a card number. - [DataMember(Name = "networkToken.bin", EmitDefaultValue = false)] - public string NetworkTokenBin { get; set; } - - /// - /// The last four digits of a network token. - /// - /// The last four digits of a network token. - [DataMember(Name = "networkToken.tokenSummary", EmitDefaultValue = false)] - public string NetworkTokenTokenSummary { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataNetworkTokens {\n"); - sb.Append(" NetworkTokenAvailable: ").Append(NetworkTokenAvailable).Append("\n"); - sb.Append(" NetworkTokenBin: ").Append(NetworkTokenBin).Append("\n"); - sb.Append(" NetworkTokenTokenSummary: ").Append(NetworkTokenTokenSummary).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataNetworkTokens); - } - - /// - /// Returns true if ResponseAdditionalDataNetworkTokens instances are equal - /// - /// Instance of ResponseAdditionalDataNetworkTokens to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataNetworkTokens input) - { - if (input == null) - { - return false; - } - return - ( - this.NetworkTokenAvailable == input.NetworkTokenAvailable || - (this.NetworkTokenAvailable != null && - this.NetworkTokenAvailable.Equals(input.NetworkTokenAvailable)) - ) && - ( - this.NetworkTokenBin == input.NetworkTokenBin || - (this.NetworkTokenBin != null && - this.NetworkTokenBin.Equals(input.NetworkTokenBin)) - ) && - ( - this.NetworkTokenTokenSummary == input.NetworkTokenTokenSummary || - (this.NetworkTokenTokenSummary != null && - this.NetworkTokenTokenSummary.Equals(input.NetworkTokenTokenSummary)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NetworkTokenAvailable != null) - { - hashCode = (hashCode * 59) + this.NetworkTokenAvailable.GetHashCode(); - } - if (this.NetworkTokenBin != null) - { - hashCode = (hashCode * 59) + this.NetworkTokenBin.GetHashCode(); - } - if (this.NetworkTokenTokenSummary != null) - { - hashCode = (hashCode * 59) + this.NetworkTokenTokenSummary.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalDataOpi.cs b/Adyen/Model/Payout/ResponseAdditionalDataOpi.cs deleted file mode 100644 index 14a16753b..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalDataOpi.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalDataOpi - /// - [DataContract(Name = "ResponseAdditionalDataOpi")] - public partial class ResponseAdditionalDataOpi : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce).. - public ResponseAdditionalDataOpi(string opiTransToken = default(string)) - { - this.OpiTransToken = opiTransToken; - } - - /// - /// Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). - /// - /// Returned in the response if you included `opi.includeTransToken: true` in an ecommerce payment request. This contains an Oracle Payment Interface token that you can store in your Oracle Opera database to identify tokenized ecommerce transactions. For more information and required settings, see [Oracle Opera](https://docs.adyen.com/plugins/oracle-opera#opi-token-ecommerce). - [DataMember(Name = "opi.transToken", EmitDefaultValue = false)] - public string OpiTransToken { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataOpi {\n"); - sb.Append(" OpiTransToken: ").Append(OpiTransToken).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataOpi); - } - - /// - /// Returns true if ResponseAdditionalDataOpi instances are equal - /// - /// Instance of ResponseAdditionalDataOpi to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataOpi input) - { - if (input == null) - { - return false; - } - return - ( - this.OpiTransToken == input.OpiTransToken || - (this.OpiTransToken != null && - this.OpiTransToken.Equals(input.OpiTransToken)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OpiTransToken != null) - { - hashCode = (hashCode * 59) + this.OpiTransToken.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ResponseAdditionalDataSepa.cs b/Adyen/Model/Payout/ResponseAdditionalDataSepa.cs deleted file mode 100644 index f0a5f3080..000000000 --- a/Adyen/Model/Payout/ResponseAdditionalDataSepa.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ResponseAdditionalDataSepa - /// - [DataContract(Name = "ResponseAdditionalDataSepa")] - public partial class ResponseAdditionalDataSepa : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The transaction signature date. Format: yyyy-MM-dd. - /// Its value corresponds to the pspReference value of the transaction.. - /// This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF. - public ResponseAdditionalDataSepa(string sepadirectdebitDateOfSignature = default(string), string sepadirectdebitMandateId = default(string), string sepadirectdebitSequenceType = default(string)) - { - this.SepadirectdebitDateOfSignature = sepadirectdebitDateOfSignature; - this.SepadirectdebitMandateId = sepadirectdebitMandateId; - this.SepadirectdebitSequenceType = sepadirectdebitSequenceType; - } - - /// - /// The transaction signature date. Format: yyyy-MM-dd - /// - /// The transaction signature date. Format: yyyy-MM-dd - [DataMember(Name = "sepadirectdebit.dateOfSignature", EmitDefaultValue = false)] - public string SepadirectdebitDateOfSignature { get; set; } - - /// - /// Its value corresponds to the pspReference value of the transaction. - /// - /// Its value corresponds to the pspReference value of the transaction. - [DataMember(Name = "sepadirectdebit.mandateId", EmitDefaultValue = false)] - public string SepadirectdebitMandateId { get; set; } - - /// - /// This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF - /// - /// This field can take one of the following values: * OneOff: (OOFF) Direct debit instruction to initiate exactly one direct debit transaction. * First: (FRST) Initial/first collection in a series of direct debit instructions. * Recurring: (RCUR) Direct debit instruction to carry out regular direct debit transactions initiated by the creditor. * Final: (FNAL) Last/final collection in a series of direct debit instructions. Example: OOFF - [DataMember(Name = "sepadirectdebit.sequenceType", EmitDefaultValue = false)] - public string SepadirectdebitSequenceType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResponseAdditionalDataSepa {\n"); - sb.Append(" SepadirectdebitDateOfSignature: ").Append(SepadirectdebitDateOfSignature).Append("\n"); - sb.Append(" SepadirectdebitMandateId: ").Append(SepadirectdebitMandateId).Append("\n"); - sb.Append(" SepadirectdebitSequenceType: ").Append(SepadirectdebitSequenceType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResponseAdditionalDataSepa); - } - - /// - /// Returns true if ResponseAdditionalDataSepa instances are equal - /// - /// Instance of ResponseAdditionalDataSepa to be compared - /// Boolean - public bool Equals(ResponseAdditionalDataSepa input) - { - if (input == null) - { - return false; - } - return - ( - this.SepadirectdebitDateOfSignature == input.SepadirectdebitDateOfSignature || - (this.SepadirectdebitDateOfSignature != null && - this.SepadirectdebitDateOfSignature.Equals(input.SepadirectdebitDateOfSignature)) - ) && - ( - this.SepadirectdebitMandateId == input.SepadirectdebitMandateId || - (this.SepadirectdebitMandateId != null && - this.SepadirectdebitMandateId.Equals(input.SepadirectdebitMandateId)) - ) && - ( - this.SepadirectdebitSequenceType == input.SepadirectdebitSequenceType || - (this.SepadirectdebitSequenceType != null && - this.SepadirectdebitSequenceType.Equals(input.SepadirectdebitSequenceType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SepadirectdebitDateOfSignature != null) - { - hashCode = (hashCode * 59) + this.SepadirectdebitDateOfSignature.GetHashCode(); - } - if (this.SepadirectdebitMandateId != null) - { - hashCode = (hashCode * 59) + this.SepadirectdebitMandateId.GetHashCode(); - } - if (this.SepadirectdebitSequenceType != null) - { - hashCode = (hashCode * 59) + this.SepadirectdebitSequenceType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/ServiceError.cs b/Adyen/Model/Payout/ServiceError.cs deleted file mode 100644 index a8b4c1bfd..000000000 --- a/Adyen/Model/Payout/ServiceError.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.. - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(Dictionary additionalData = default(Dictionary), string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.AdditionalData = additionalData; - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/StoreDetailAndSubmitRequest.cs b/Adyen/Model/Payout/StoreDetailAndSubmitRequest.cs deleted file mode 100644 index 71044b262..000000000 --- a/Adyen/Model/Payout/StoreDetailAndSubmitRequest.cs +++ /dev/null @@ -1,491 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// StoreDetailAndSubmitRequest - /// - [DataContract(Name = "StoreDetailAndSubmitRequest")] - public partial class StoreDetailAndSubmitRequest : IEquatable, IValidatableObject - { - /// - /// The type of the entity the payout is processed for. - /// - /// The type of the entity the payout is processed for. - [JsonConverter(typeof(StringEnumConverter))] - public enum EntityTypeEnum - { - /// - /// Enum NaturalPerson for value: NaturalPerson - /// - [EnumMember(Value = "NaturalPerson")] - NaturalPerson = 1, - - /// - /// Enum Company for value: Company - /// - [EnumMember(Value = "Company")] - Company = 2 - - } - - - /// - /// The type of the entity the payout is processed for. - /// - /// The type of the entity the payout is processed for. - [DataMember(Name = "entityType", IsRequired = false, EmitDefaultValue = false)] - public EntityTypeEnum EntityType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreDetailAndSubmitRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be required for a particular request.. - /// amount (required). - /// bank. - /// billingAddress. - /// card. - /// The date of birth. Format: [ISO-8601](https://www.w3.org/TR/NOTE-datetime); example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. (required). - /// The type of the entity the payout is processed for. (required). - /// An integer value that is added to the normal fraud score. The value can be either positive or negative.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). (required). - /// recurring (required). - /// The merchant reference for this payment. This reference will be used in all communication to the merchant about the status of the payout. Although it is a good idea to make sure it is unique, this is not a requirement. (required). - /// The name of the brand to make a payout to. For Paysafecard it must be set to `paysafecard`.. - /// The shopper's email address. (required). - /// shopperName. - /// The shopper's reference for the payment transaction. (required). - /// The description of this payout. This description is shown on the bank statement of the shopper (if this is supported by the chosen payment method).. - /// The shopper's social security number.. - /// The shopper's phone number.. - public StoreDetailAndSubmitRequest(Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), BankAccount bank = default(BankAccount), Address billingAddress = default(Address), Card card = default(Card), DateTime dateOfBirth = default(DateTime), EntityTypeEnum entityType = default(EntityTypeEnum), int? fraudOffset = default(int?), string merchantAccount = default(string), string nationality = default(string), Recurring recurring = default(Recurring), string reference = default(string), string selectedBrand = default(string), string shopperEmail = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), string socialSecurityNumber = default(string), string telephoneNumber = default(string)) - { - this.Amount = amount; - this.DateOfBirth = dateOfBirth; - this.EntityType = entityType; - this.MerchantAccount = merchantAccount; - this.Nationality = nationality; - this.Recurring = recurring; - this.Reference = reference; - this.ShopperEmail = shopperEmail; - this.ShopperReference = shopperReference; - this.AdditionalData = additionalData; - this.Bank = bank; - this.BillingAddress = billingAddress; - this.Card = card; - this.FraudOffset = fraudOffset; - this.SelectedBrand = selectedBrand; - this.ShopperName = shopperName; - this.ShopperStatement = shopperStatement; - this.SocialSecurityNumber = socialSecurityNumber; - this.TelephoneNumber = telephoneNumber; - } - - /// - /// This field contains additional data, which may be required for a particular request. - /// - /// This field contains additional data, which may be required for a particular request. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets Bank - /// - [DataMember(Name = "bank", EmitDefaultValue = false)] - public BankAccount Bank { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// The date of birth. Format: [ISO-8601](https://www.w3.org/TR/NOTE-datetime); example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. - /// - /// The date of birth. Format: [ISO-8601](https://www.w3.org/TR/NOTE-datetime); example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. - [DataMember(Name = "dateOfBirth", IsRequired = false, EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - [DataMember(Name = "fraudOffset", EmitDefaultValue = false)] - public int? FraudOffset { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). - /// - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). - [DataMember(Name = "nationality", IsRequired = false, EmitDefaultValue = false)] - public string Nationality { get; set; } - - /// - /// Gets or Sets Recurring - /// - [DataMember(Name = "recurring", IsRequired = false, EmitDefaultValue = false)] - public Recurring Recurring { get; set; } - - /// - /// The merchant reference for this payment. This reference will be used in all communication to the merchant about the status of the payout. Although it is a good idea to make sure it is unique, this is not a requirement. - /// - /// The merchant reference for this payment. This reference will be used in all communication to the merchant about the status of the payout. Although it is a good idea to make sure it is unique, this is not a requirement. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The name of the brand to make a payout to. For Paysafecard it must be set to `paysafecard`. - /// - /// The name of the brand to make a payout to. For Paysafecard it must be set to `paysafecard`. - [DataMember(Name = "selectedBrand", EmitDefaultValue = false)] - public string SelectedBrand { get; set; } - - /// - /// The shopper's email address. - /// - /// The shopper's email address. - [DataMember(Name = "shopperEmail", IsRequired = false, EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// The shopper's reference for the payment transaction. - /// - /// The shopper's reference for the payment transaction. - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The description of this payout. This description is shown on the bank statement of the shopper (if this is supported by the chosen payment method). - /// - /// The description of this payout. This description is shown on the bank statement of the shopper (if this is supported by the chosen payment method). - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// The shopper's phone number. - /// - /// The shopper's phone number. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreDetailAndSubmitRequest {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Bank: ").Append(Bank).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" EntityType: ").Append(EntityType).Append("\n"); - sb.Append(" FraudOffset: ").Append(FraudOffset).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Nationality: ").Append(Nationality).Append("\n"); - sb.Append(" Recurring: ").Append(Recurring).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SelectedBrand: ").Append(SelectedBrand).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreDetailAndSubmitRequest); - } - - /// - /// Returns true if StoreDetailAndSubmitRequest instances are equal - /// - /// Instance of StoreDetailAndSubmitRequest to be compared - /// Boolean - public bool Equals(StoreDetailAndSubmitRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.EntityType == input.EntityType || - this.EntityType.Equals(input.EntityType) - ) && - ( - this.FraudOffset == input.FraudOffset || - this.FraudOffset.Equals(input.FraudOffset) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Nationality == input.Nationality || - (this.Nationality != null && - this.Nationality.Equals(input.Nationality)) - ) && - ( - this.Recurring == input.Recurring || - (this.Recurring != null && - this.Recurring.Equals(input.Recurring)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SelectedBrand == input.SelectedBrand || - (this.SelectedBrand != null && - this.SelectedBrand.Equals(input.SelectedBrand)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EntityType.GetHashCode(); - hashCode = (hashCode * 59) + this.FraudOffset.GetHashCode(); - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Nationality != null) - { - hashCode = (hashCode * 59) + this.Nationality.GetHashCode(); - } - if (this.Recurring != null) - { - hashCode = (hashCode * 59) + this.Recurring.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SelectedBrand != null) - { - hashCode = (hashCode * 59) + this.SelectedBrand.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Nationality (string) maxLength - if (this.Nationality != null && this.Nationality.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Nationality, length must be less than 2.", new [] { "Nationality" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/StoreDetailAndSubmitResponse.cs b/Adyen/Model/Payout/StoreDetailAndSubmitResponse.cs deleted file mode 100644 index 26498a86d..000000000 --- a/Adyen/Model/Payout/StoreDetailAndSubmitResponse.cs +++ /dev/null @@ -1,192 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// StoreDetailAndSubmitResponse - /// - [DataContract(Name = "StoreDetailAndSubmitResponse")] - public partial class StoreDetailAndSubmitResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreDetailAndSubmitResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be returned in a particular response.. - /// A new reference to uniquely identify this request. (required). - /// In case of refusal, an informational message for the reason.. - /// The response: * In case of success is payout-submit-received. * In case of an error, an informational message is returned. (required). - public StoreDetailAndSubmitResponse(Dictionary additionalData = default(Dictionary), string pspReference = default(string), string refusalReason = default(string), string resultCode = default(string)) - { - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.AdditionalData = additionalData; - this.RefusalReason = refusalReason; - } - - /// - /// This field contains additional data, which may be returned in a particular response. - /// - /// This field contains additional data, which may be returned in a particular response. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// A new reference to uniquely identify this request. - /// - /// A new reference to uniquely identify this request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// In case of refusal, an informational message for the reason. - /// - /// In case of refusal, an informational message for the reason. - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// The response: * In case of success is payout-submit-received. * In case of an error, an informational message is returned. - /// - /// The response: * In case of success is payout-submit-received. * In case of an error, an informational message is returned. - [DataMember(Name = "resultCode", IsRequired = false, EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreDetailAndSubmitResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreDetailAndSubmitResponse); - } - - /// - /// Returns true if StoreDetailAndSubmitResponse instances are equal - /// - /// Instance of StoreDetailAndSubmitResponse to be compared - /// Boolean - public bool Equals(StoreDetailAndSubmitResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/StoreDetailRequest.cs b/Adyen/Model/Payout/StoreDetailRequest.cs deleted file mode 100644 index 8fb1fc6d7..000000000 --- a/Adyen/Model/Payout/StoreDetailRequest.cs +++ /dev/null @@ -1,435 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// StoreDetailRequest - /// - [DataContract(Name = "StoreDetailRequest")] - public partial class StoreDetailRequest : IEquatable, IValidatableObject - { - /// - /// The type of the entity the payout is processed for. - /// - /// The type of the entity the payout is processed for. - [JsonConverter(typeof(StringEnumConverter))] - public enum EntityTypeEnum - { - /// - /// Enum NaturalPerson for value: NaturalPerson - /// - [EnumMember(Value = "NaturalPerson")] - NaturalPerson = 1, - - /// - /// Enum Company for value: Company - /// - [EnumMember(Value = "Company")] - Company = 2 - - } - - - /// - /// The type of the entity the payout is processed for. - /// - /// The type of the entity the payout is processed for. - [DataMember(Name = "entityType", IsRequired = false, EmitDefaultValue = false)] - public EntityTypeEnum EntityType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreDetailRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be required for a particular request.. - /// bank. - /// billingAddress. - /// card. - /// The date of birth. Format: [ISO-8601](https://www.w3.org/TR/NOTE-datetime); example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. (required). - /// The type of the entity the payout is processed for. (required). - /// An integer value that is added to the normal fraud score. The value can be either positive or negative.. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). (required). - /// recurring (required). - /// The name of the brand to make a payout to. For Paysafecard it must be set to `paysafecard`.. - /// The shopper's email address. (required). - /// shopperName. - /// The shopper's reference for the payment transaction. (required). - /// The shopper's social security number.. - /// The shopper's phone number.. - public StoreDetailRequest(Dictionary additionalData = default(Dictionary), BankAccount bank = default(BankAccount), Address billingAddress = default(Address), Card card = default(Card), DateTime dateOfBirth = default(DateTime), EntityTypeEnum entityType = default(EntityTypeEnum), int? fraudOffset = default(int?), string merchantAccount = default(string), string nationality = default(string), Recurring recurring = default(Recurring), string selectedBrand = default(string), string shopperEmail = default(string), Name shopperName = default(Name), string shopperReference = default(string), string socialSecurityNumber = default(string), string telephoneNumber = default(string)) - { - this.DateOfBirth = dateOfBirth; - this.EntityType = entityType; - this.MerchantAccount = merchantAccount; - this.Nationality = nationality; - this.Recurring = recurring; - this.ShopperEmail = shopperEmail; - this.ShopperReference = shopperReference; - this.AdditionalData = additionalData; - this.Bank = bank; - this.BillingAddress = billingAddress; - this.Card = card; - this.FraudOffset = fraudOffset; - this.SelectedBrand = selectedBrand; - this.ShopperName = shopperName; - this.SocialSecurityNumber = socialSecurityNumber; - this.TelephoneNumber = telephoneNumber; - } - - /// - /// This field contains additional data, which may be required for a particular request. - /// - /// This field contains additional data, which may be required for a particular request. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Bank - /// - [DataMember(Name = "bank", EmitDefaultValue = false)] - public BankAccount Bank { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// The date of birth. Format: [ISO-8601](https://www.w3.org/TR/NOTE-datetime); example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. - /// - /// The date of birth. Format: [ISO-8601](https://www.w3.org/TR/NOTE-datetime); example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. - [DataMember(Name = "dateOfBirth", IsRequired = false, EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - [DataMember(Name = "fraudOffset", EmitDefaultValue = false)] - public int? FraudOffset { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). - /// - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). - [DataMember(Name = "nationality", IsRequired = false, EmitDefaultValue = false)] - public string Nationality { get; set; } - - /// - /// Gets or Sets Recurring - /// - [DataMember(Name = "recurring", IsRequired = false, EmitDefaultValue = false)] - public Recurring Recurring { get; set; } - - /// - /// The name of the brand to make a payout to. For Paysafecard it must be set to `paysafecard`. - /// - /// The name of the brand to make a payout to. For Paysafecard it must be set to `paysafecard`. - [DataMember(Name = "selectedBrand", EmitDefaultValue = false)] - public string SelectedBrand { get; set; } - - /// - /// The shopper's email address. - /// - /// The shopper's email address. - [DataMember(Name = "shopperEmail", IsRequired = false, EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// The shopper's reference for the payment transaction. - /// - /// The shopper's reference for the payment transaction. - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// The shopper's phone number. - /// - /// The shopper's phone number. - [DataMember(Name = "telephoneNumber", EmitDefaultValue = false)] - public string TelephoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreDetailRequest {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Bank: ").Append(Bank).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" EntityType: ").Append(EntityType).Append("\n"); - sb.Append(" FraudOffset: ").Append(FraudOffset).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Nationality: ").Append(Nationality).Append("\n"); - sb.Append(" Recurring: ").Append(Recurring).Append("\n"); - sb.Append(" SelectedBrand: ").Append(SelectedBrand).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" TelephoneNumber: ").Append(TelephoneNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreDetailRequest); - } - - /// - /// Returns true if StoreDetailRequest instances are equal - /// - /// Instance of StoreDetailRequest to be compared - /// Boolean - public bool Equals(StoreDetailRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.EntityType == input.EntityType || - this.EntityType.Equals(input.EntityType) - ) && - ( - this.FraudOffset == input.FraudOffset || - this.FraudOffset.Equals(input.FraudOffset) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Nationality == input.Nationality || - (this.Nationality != null && - this.Nationality.Equals(input.Nationality)) - ) && - ( - this.Recurring == input.Recurring || - (this.Recurring != null && - this.Recurring.Equals(input.Recurring)) - ) && - ( - this.SelectedBrand == input.SelectedBrand || - (this.SelectedBrand != null && - this.SelectedBrand.Equals(input.SelectedBrand)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.TelephoneNumber == input.TelephoneNumber || - (this.TelephoneNumber != null && - this.TelephoneNumber.Equals(input.TelephoneNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EntityType.GetHashCode(); - hashCode = (hashCode * 59) + this.FraudOffset.GetHashCode(); - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Nationality != null) - { - hashCode = (hashCode * 59) + this.Nationality.GetHashCode(); - } - if (this.Recurring != null) - { - hashCode = (hashCode * 59) + this.Recurring.GetHashCode(); - } - if (this.SelectedBrand != null) - { - hashCode = (hashCode * 59) + this.SelectedBrand.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - if (this.TelephoneNumber != null) - { - hashCode = (hashCode * 59) + this.TelephoneNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Nationality (string) maxLength - if (this.Nationality != null && this.Nationality.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Nationality, length must be less than 2.", new [] { "Nationality" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/StoreDetailResponse.cs b/Adyen/Model/Payout/StoreDetailResponse.cs deleted file mode 100644 index a618e8a77..000000000 --- a/Adyen/Model/Payout/StoreDetailResponse.cs +++ /dev/null @@ -1,192 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// StoreDetailResponse - /// - [DataContract(Name = "StoreDetailResponse")] - public partial class StoreDetailResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreDetailResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be returned in a particular response.. - /// A new reference to uniquely identify this request. (required). - /// The token which you can use later on for submitting the payout. (required). - /// The result code of the transaction. `Success` indicates that the details were stored successfully. (required). - public StoreDetailResponse(Dictionary additionalData = default(Dictionary), string pspReference = default(string), string recurringDetailReference = default(string), string resultCode = default(string)) - { - this.PspReference = pspReference; - this.RecurringDetailReference = recurringDetailReference; - this.ResultCode = resultCode; - this.AdditionalData = additionalData; - } - - /// - /// This field contains additional data, which may be returned in a particular response. - /// - /// This field contains additional data, which may be returned in a particular response. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// A new reference to uniquely identify this request. - /// - /// A new reference to uniquely identify this request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The token which you can use later on for submitting the payout. - /// - /// The token which you can use later on for submitting the payout. - [DataMember(Name = "recurringDetailReference", IsRequired = false, EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The result code of the transaction. `Success` indicates that the details were stored successfully. - /// - /// The result code of the transaction. `Success` indicates that the details were stored successfully. - [DataMember(Name = "resultCode", IsRequired = false, EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreDetailResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreDetailResponse); - } - - /// - /// Returns true if StoreDetailResponse instances are equal - /// - /// Instance of StoreDetailResponse to be compared - /// Boolean - public bool Equals(StoreDetailResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/SubmitRequest.cs b/Adyen/Model/Payout/SubmitRequest.cs deleted file mode 100644 index b865e665b..000000000 --- a/Adyen/Model/Payout/SubmitRequest.cs +++ /dev/null @@ -1,412 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// SubmitRequest - /// - [DataContract(Name = "SubmitRequest")] - public partial class SubmitRequest : IEquatable, IValidatableObject - { - /// - /// The type of the entity the payout is processed for. Allowed values: * NaturalPerson * Company > This field is required to update the existing `entityType` that is associated with this recurring contract. - /// - /// The type of the entity the payout is processed for. Allowed values: * NaturalPerson * Company > This field is required to update the existing `entityType` that is associated with this recurring contract. - [JsonConverter(typeof(StringEnumConverter))] - public enum EntityTypeEnum - { - /// - /// Enum NaturalPerson for value: NaturalPerson - /// - [EnumMember(Value = "NaturalPerson")] - NaturalPerson = 1, - - /// - /// Enum Company for value: Company - /// - [EnumMember(Value = "Company")] - Company = 2 - - } - - - /// - /// The type of the entity the payout is processed for. Allowed values: * NaturalPerson * Company > This field is required to update the existing `entityType` that is associated with this recurring contract. - /// - /// The type of the entity the payout is processed for. Allowed values: * NaturalPerson * Company > This field is required to update the existing `entityType` that is associated with this recurring contract. - [DataMember(Name = "entityType", EmitDefaultValue = false)] - public EntityTypeEnum? EntityType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SubmitRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be required for a particular request.. - /// amount (required). - /// The date of birth. Format: ISO-8601; example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. > This field is required to update the existing `dateOfBirth` that is associated with this recurring contract.. - /// The type of the entity the payout is processed for. Allowed values: * NaturalPerson * Company > This field is required to update the existing `entityType` that is associated with this recurring contract.. - /// An integer value that is added to the normal fraud score. The value can be either positive or negative.. - /// The merchant account identifier you want to process the transaction request with. (required). - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). > This field is required to update the existing nationality that is associated with this recurring contract.. - /// recurring (required). - /// The merchant reference for this payout. This reference will be used in all communication to the merchant about the status of the payout. Although it is a good idea to make sure it is unique, this is not a requirement. (required). - /// This is the `recurringDetailReference` you want to use for this payout. You can use the value LATEST to select the most recently used recurring detail. (required). - /// The shopper's email address. (required). - /// shopperName. - /// The shopper's reference for the payout transaction. (required). - /// The description of this payout. This description is shown on the bank statement of the shopper (if this is supported by the chosen payment method).. - /// The shopper's social security number.. - public SubmitRequest(Dictionary additionalData = default(Dictionary), Amount amount = default(Amount), DateTime dateOfBirth = default(DateTime), EntityTypeEnum? entityType = default(EntityTypeEnum?), int? fraudOffset = default(int?), string merchantAccount = default(string), string nationality = default(string), Recurring recurring = default(Recurring), string reference = default(string), string selectedRecurringDetailReference = default(string), string shopperEmail = default(string), Name shopperName = default(Name), string shopperReference = default(string), string shopperStatement = default(string), string socialSecurityNumber = default(string)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.Recurring = recurring; - this.Reference = reference; - this.SelectedRecurringDetailReference = selectedRecurringDetailReference; - this.ShopperEmail = shopperEmail; - this.ShopperReference = shopperReference; - this.AdditionalData = additionalData; - this.DateOfBirth = dateOfBirth; - this.EntityType = entityType; - this.FraudOffset = fraudOffset; - this.Nationality = nationality; - this.ShopperName = shopperName; - this.ShopperStatement = shopperStatement; - this.SocialSecurityNumber = socialSecurityNumber; - } - - /// - /// This field contains additional data, which may be required for a particular request. - /// - /// This field contains additional data, which may be required for a particular request. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The date of birth. Format: ISO-8601; example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. > This field is required to update the existing `dateOfBirth` that is associated with this recurring contract. - /// - /// The date of birth. Format: ISO-8601; example: YYYY-MM-DD For Paysafecard it must be the same as used when registering the Paysafecard account. > This field is mandatory for natural persons. > This field is required to update the existing `dateOfBirth` that is associated with this recurring contract. - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - /// - /// An integer value that is added to the normal fraud score. The value can be either positive or negative. - [DataMember(Name = "fraudOffset", EmitDefaultValue = false)] - public int? FraudOffset { get; set; } - - /// - /// The merchant account identifier you want to process the transaction request with. - /// - /// The merchant account identifier you want to process the transaction request with. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). > This field is required to update the existing nationality that is associated with this recurring contract. - /// - /// The shopper's nationality. A valid value is an ISO 2-character country code (e.g. 'NL'). > This field is required to update the existing nationality that is associated with this recurring contract. - [DataMember(Name = "nationality", EmitDefaultValue = false)] - public string Nationality { get; set; } - - /// - /// Gets or Sets Recurring - /// - [DataMember(Name = "recurring", IsRequired = false, EmitDefaultValue = false)] - public Recurring Recurring { get; set; } - - /// - /// The merchant reference for this payout. This reference will be used in all communication to the merchant about the status of the payout. Although it is a good idea to make sure it is unique, this is not a requirement. - /// - /// The merchant reference for this payout. This reference will be used in all communication to the merchant about the status of the payout. Although it is a good idea to make sure it is unique, this is not a requirement. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// This is the `recurringDetailReference` you want to use for this payout. You can use the value LATEST to select the most recently used recurring detail. - /// - /// This is the `recurringDetailReference` you want to use for this payout. You can use the value LATEST to select the most recently used recurring detail. - [DataMember(Name = "selectedRecurringDetailReference", IsRequired = false, EmitDefaultValue = false)] - public string SelectedRecurringDetailReference { get; set; } - - /// - /// The shopper's email address. - /// - /// The shopper's email address. - [DataMember(Name = "shopperEmail", IsRequired = false, EmitDefaultValue = false)] - public string ShopperEmail { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// The shopper's reference for the payout transaction. - /// - /// The shopper's reference for the payout transaction. - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The description of this payout. This description is shown on the bank statement of the shopper (if this is supported by the chosen payment method). - /// - /// The description of this payout. This description is shown on the bank statement of the shopper (if this is supported by the chosen payment method). - [DataMember(Name = "shopperStatement", EmitDefaultValue = false)] - public string ShopperStatement { get; set; } - - /// - /// The shopper's social security number. - /// - /// The shopper's social security number. - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SubmitRequest {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" EntityType: ").Append(EntityType).Append("\n"); - sb.Append(" FraudOffset: ").Append(FraudOffset).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Nationality: ").Append(Nationality).Append("\n"); - sb.Append(" Recurring: ").Append(Recurring).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SelectedRecurringDetailReference: ").Append(SelectedRecurringDetailReference).Append("\n"); - sb.Append(" ShopperEmail: ").Append(ShopperEmail).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" ShopperStatement: ").Append(ShopperStatement).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubmitRequest); - } - - /// - /// Returns true if SubmitRequest instances are equal - /// - /// Instance of SubmitRequest to be compared - /// Boolean - public bool Equals(SubmitRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.EntityType == input.EntityType || - this.EntityType.Equals(input.EntityType) - ) && - ( - this.FraudOffset == input.FraudOffset || - this.FraudOffset.Equals(input.FraudOffset) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Nationality == input.Nationality || - (this.Nationality != null && - this.Nationality.Equals(input.Nationality)) - ) && - ( - this.Recurring == input.Recurring || - (this.Recurring != null && - this.Recurring.Equals(input.Recurring)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SelectedRecurringDetailReference == input.SelectedRecurringDetailReference || - (this.SelectedRecurringDetailReference != null && - this.SelectedRecurringDetailReference.Equals(input.SelectedRecurringDetailReference)) - ) && - ( - this.ShopperEmail == input.ShopperEmail || - (this.ShopperEmail != null && - this.ShopperEmail.Equals(input.ShopperEmail)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.ShopperStatement == input.ShopperStatement || - (this.ShopperStatement != null && - this.ShopperStatement.Equals(input.ShopperStatement)) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EntityType.GetHashCode(); - hashCode = (hashCode * 59) + this.FraudOffset.GetHashCode(); - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Nationality != null) - { - hashCode = (hashCode * 59) + this.Nationality.GetHashCode(); - } - if (this.Recurring != null) - { - hashCode = (hashCode * 59) + this.Recurring.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SelectedRecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.SelectedRecurringDetailReference.GetHashCode(); - } - if (this.ShopperEmail != null) - { - hashCode = (hashCode * 59) + this.ShopperEmail.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.ShopperStatement != null) - { - hashCode = (hashCode * 59) + this.ShopperStatement.GetHashCode(); - } - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Payout/SubmitResponse.cs b/Adyen/Model/Payout/SubmitResponse.cs deleted file mode 100644 index 38ce0ff15..000000000 --- a/Adyen/Model/Payout/SubmitResponse.cs +++ /dev/null @@ -1,192 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Payout -{ - /// - /// SubmitResponse - /// - [DataContract(Name = "SubmitResponse")] - public partial class SubmitResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SubmitResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be returned in a particular response.. - /// A new reference to uniquely identify this request. (required). - /// In case of refusal, an informational message for the reason.. - /// The response: * In case of success, it is `payout-submit-received`. * In case of an error, an informational message is returned. (required). - public SubmitResponse(Dictionary additionalData = default(Dictionary), string pspReference = default(string), string refusalReason = default(string), string resultCode = default(string)) - { - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.AdditionalData = additionalData; - this.RefusalReason = refusalReason; - } - - /// - /// This field contains additional data, which may be returned in a particular response. - /// - /// This field contains additional data, which may be returned in a particular response. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// A new reference to uniquely identify this request. - /// - /// A new reference to uniquely identify this request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// In case of refusal, an informational message for the reason. - /// - /// In case of refusal, an informational message for the reason. - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// The response: * In case of success, it is `payout-submit-received`. * In case of an error, an informational message is returned. - /// - /// The response: * In case of success, it is `payout-submit-received`. * In case of an error, an informational message is returned. - [DataMember(Name = "resultCode", IsRequired = false, EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SubmitResponse {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubmitResponse); - } - - /// - /// Returns true if SubmitResponse instances are equal - /// - /// Instance of SubmitResponse to be compared - /// Boolean - public bool Equals(SubmitResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/AbstractOpenAPISchema.cs b/Adyen/Model/PlatformsAccount/AbstractOpenAPISchema.cs deleted file mode 100644 index b06152931..000000000 --- a/Adyen/Model/PlatformsAccount/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/PlatformsAccount/Account.cs b/Adyen/Model/PlatformsAccount/Account.cs deleted file mode 100644 index fe19ad070..000000000 --- a/Adyen/Model/PlatformsAccount/Account.cs +++ /dev/null @@ -1,323 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// Account - /// - [DataContract(Name = "Account")] - public partial class Account : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account.. - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.. - /// The beneficiary of the account.. - /// The reason that a beneficiary has been set up for this account. This may have been supplied during the setup of a beneficiary at the discretion of the executing user.. - /// A description of the account.. - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.. - /// payoutSchedule. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.. - /// The status of the account. Possible values: `Active`, `Inactive`, `Suspended`, `Closed`.. - public Account(string accountCode = default(string), string bankAccountUUID = default(string), string beneficiaryAccount = default(string), string beneficiaryMerchantReference = default(string), string description = default(string), Dictionary metadata = default(Dictionary), string payoutMethodCode = default(string), PayoutScheduleResponse payoutSchedule = default(PayoutScheduleResponse), PayoutSpeedEnum? payoutSpeed = default(PayoutSpeedEnum?), string status = default(string)) - { - this.AccountCode = accountCode; - this.BankAccountUUID = bankAccountUUID; - this.BeneficiaryAccount = beneficiaryAccount; - this.BeneficiaryMerchantReference = beneficiaryMerchantReference; - this.Description = description; - this.Metadata = metadata; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutSchedule = payoutSchedule; - this.PayoutSpeed = payoutSpeed; - this.Status = status; - } - - /// - /// The code of the account. - /// - /// The code of the account. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The beneficiary of the account. - /// - /// The beneficiary of the account. - [DataMember(Name = "beneficiaryAccount", EmitDefaultValue = false)] - public string BeneficiaryAccount { get; set; } - - /// - /// The reason that a beneficiary has been set up for this account. This may have been supplied during the setup of a beneficiary at the discretion of the executing user. - /// - /// The reason that a beneficiary has been set up for this account. This may have been supplied during the setup of a beneficiary at the discretion of the executing user. - [DataMember(Name = "beneficiaryMerchantReference", EmitDefaultValue = false)] - public string BeneficiaryMerchantReference { get; set; } - - /// - /// A description of the account. - /// - /// A description of the account. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Gets or Sets PayoutSchedule - /// - [DataMember(Name = "payoutSchedule", EmitDefaultValue = false)] - public PayoutScheduleResponse PayoutSchedule { get; set; } - - /// - /// The status of the account. Possible values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The status of the account. Possible values: `Active`, `Inactive`, `Suspended`, `Closed`. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Account {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" BeneficiaryAccount: ").Append(BeneficiaryAccount).Append("\n"); - sb.Append(" BeneficiaryMerchantReference: ").Append(BeneficiaryMerchantReference).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutSchedule: ").Append(PayoutSchedule).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Account); - } - - /// - /// Returns true if Account instances are equal - /// - /// Instance of Account to be compared - /// Boolean - public bool Equals(Account input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.BeneficiaryAccount == input.BeneficiaryAccount || - (this.BeneficiaryAccount != null && - this.BeneficiaryAccount.Equals(input.BeneficiaryAccount)) - ) && - ( - this.BeneficiaryMerchantReference == input.BeneficiaryMerchantReference || - (this.BeneficiaryMerchantReference != null && - this.BeneficiaryMerchantReference.Equals(input.BeneficiaryMerchantReference)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutSchedule == input.PayoutSchedule || - (this.PayoutSchedule != null && - this.PayoutSchedule.Equals(input.PayoutSchedule)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.BeneficiaryAccount != null) - { - hashCode = (hashCode * 59) + this.BeneficiaryAccount.GetHashCode(); - } - if (this.BeneficiaryMerchantReference != null) - { - hashCode = (hashCode * 59) + this.BeneficiaryMerchantReference.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.PayoutSchedule != null) - { - hashCode = (hashCode * 59) + this.PayoutSchedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/AccountEvent.cs b/Adyen/Model/PlatformsAccount/AccountEvent.cs deleted file mode 100644 index 9a3a0ddb9..000000000 --- a/Adyen/Model/PlatformsAccount/AccountEvent.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// AccountEvent - /// - [DataContract(Name = "AccountEvent")] - public partial class AccountEvent : IEquatable, IValidatableObject - { - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). - [JsonConverter(typeof(StringEnumConverter))] - public enum EventEnum - { - /// - /// Enum InactivateAccount for value: InactivateAccount - /// - [EnumMember(Value = "InactivateAccount")] - InactivateAccount = 1, - - /// - /// Enum RefundNotPaidOutTransfers for value: RefundNotPaidOutTransfers - /// - [EnumMember(Value = "RefundNotPaidOutTransfers")] - RefundNotPaidOutTransfers = 2 - - } - - - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). - [DataMember(Name = "event", EmitDefaultValue = false)] - public EventEnum? Event { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).. - /// The date on which the event will take place.. - /// The reason why this event has been created.. - public AccountEvent(EventEnum? _event = default(EventEnum?), DateTime executionDate = default(DateTime), string reason = default(string)) - { - this.Event = _event; - this.ExecutionDate = executionDate; - this.Reason = reason; - } - - /// - /// The date on which the event will take place. - /// - /// The date on which the event will take place. - [DataMember(Name = "executionDate", EmitDefaultValue = false)] - public DateTime ExecutionDate { get; set; } - - /// - /// The reason why this event has been created. - /// - /// The reason why this event has been created. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountEvent {\n"); - sb.Append(" Event: ").Append(Event).Append("\n"); - sb.Append(" ExecutionDate: ").Append(ExecutionDate).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountEvent); - } - - /// - /// Returns true if AccountEvent instances are equal - /// - /// Instance of AccountEvent to be compared - /// Boolean - public bool Equals(AccountEvent input) - { - if (input == null) - { - return false; - } - return - ( - this.Event == input.Event || - this.Event.Equals(input.Event) - ) && - ( - this.ExecutionDate == input.ExecutionDate || - (this.ExecutionDate != null && - this.ExecutionDate.Equals(input.ExecutionDate)) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Event.GetHashCode(); - if (this.ExecutionDate != null) - { - hashCode = (hashCode * 59) + this.ExecutionDate.GetHashCode(); - } - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/AccountHolderDetails.cs b/Adyen/Model/PlatformsAccount/AccountHolderDetails.cs deleted file mode 100644 index 8f33483fd..000000000 --- a/Adyen/Model/PlatformsAccount/AccountHolderDetails.cs +++ /dev/null @@ -1,401 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// AccountHolderDetails - /// - [DataContract(Name = "AccountHolderDetails")] - public partial class AccountHolderDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information).. - /// The opaque reference value returned by the Adyen API during bank account login.. - /// businessDetails. - /// The email address of the account holder.. - /// The phone number of the account holder provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// individualDetails. - /// Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**.. - /// An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements).. - /// The Merchant Category Code of the account holder. > If not specified in the request, this will be derived from the platform account (which is configured by Adyen).. - /// A set of key and value pairs for general use by the account holder or merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards).. - /// principalBusinessAddress. - /// Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos).. - /// The URL of the website of the account holder.. - public AccountHolderDetails(ViasAddress address = default(ViasAddress), List bankAccountDetails = default(List), string bankAggregatorDataReference = default(string), BusinessDetails businessDetails = default(BusinessDetails), string email = default(string), string fullPhoneNumber = default(string), IndividualDetails individualDetails = default(IndividualDetails), string lastReviewDate = default(string), List legalArrangements = default(List), string merchantCategoryCode = default(string), Dictionary metadata = default(Dictionary), List payoutMethods = default(List), ViasAddress principalBusinessAddress = default(ViasAddress), List storeDetails = default(List), string webAddress = default(string)) - { - this.Address = address; - this.BankAccountDetails = bankAccountDetails; - this.BankAggregatorDataReference = bankAggregatorDataReference; - this.BusinessDetails = businessDetails; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.IndividualDetails = individualDetails; - this.LastReviewDate = lastReviewDate; - this.LegalArrangements = legalArrangements; - this.MerchantCategoryCode = merchantCategoryCode; - this.Metadata = metadata; - this.PayoutMethods = payoutMethods; - this.PrincipalBusinessAddress = principalBusinessAddress; - this.StoreDetails = storeDetails; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information). - /// - /// Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information). - [DataMember(Name = "bankAccountDetails", EmitDefaultValue = false)] - public List BankAccountDetails { get; set; } - - /// - /// The opaque reference value returned by the Adyen API during bank account login. - /// - /// The opaque reference value returned by the Adyen API during bank account login. - [DataMember(Name = "bankAggregatorDataReference", EmitDefaultValue = false)] - public string BankAggregatorDataReference { get; set; } - - /// - /// Gets or Sets BusinessDetails - /// - [DataMember(Name = "businessDetails", EmitDefaultValue = false)] - public BusinessDetails BusinessDetails { get; set; } - - /// - /// The email address of the account holder. - /// - /// The email address of the account holder. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The phone number of the account holder provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the account holder provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Gets or Sets IndividualDetails - /// - [DataMember(Name = "individualDetails", EmitDefaultValue = false)] - public IndividualDetails IndividualDetails { get; set; } - - /// - /// Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**. - /// - /// Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**. - [DataMember(Name = "lastReviewDate", EmitDefaultValue = false)] - public string LastReviewDate { get; set; } - - /// - /// An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements). - /// - /// An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements). - [DataMember(Name = "legalArrangements", EmitDefaultValue = false)] - public List LegalArrangements { get; set; } - - /// - /// The Merchant Category Code of the account holder. > If not specified in the request, this will be derived from the platform account (which is configured by Adyen). - /// - /// The Merchant Category Code of the account holder. > If not specified in the request, this will be derived from the platform account (which is configured by Adyen). - [DataMember(Name = "merchantCategoryCode", EmitDefaultValue = false)] - public string MerchantCategoryCode { get; set; } - - /// - /// A set of key and value pairs for general use by the account holder or merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use by the account holder or merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards). - /// - /// Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards). - [DataMember(Name = "payoutMethods", EmitDefaultValue = false)] - public List PayoutMethods { get; set; } - - /// - /// Gets or Sets PrincipalBusinessAddress - /// - [DataMember(Name = "principalBusinessAddress", EmitDefaultValue = false)] - public ViasAddress PrincipalBusinessAddress { get; set; } - - /// - /// Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos). - /// - /// Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos). - [DataMember(Name = "storeDetails", EmitDefaultValue = false)] - public List StoreDetails { get; set; } - - /// - /// The URL of the website of the account holder. - /// - /// The URL of the website of the account holder. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderDetails {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BankAccountDetails: ").Append(BankAccountDetails).Append("\n"); - sb.Append(" BankAggregatorDataReference: ").Append(BankAggregatorDataReference).Append("\n"); - sb.Append(" BusinessDetails: ").Append(BusinessDetails).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" IndividualDetails: ").Append(IndividualDetails).Append("\n"); - sb.Append(" LastReviewDate: ").Append(LastReviewDate).Append("\n"); - sb.Append(" LegalArrangements: ").Append(LegalArrangements).Append("\n"); - sb.Append(" MerchantCategoryCode: ").Append(MerchantCategoryCode).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethods: ").Append(PayoutMethods).Append("\n"); - sb.Append(" PrincipalBusinessAddress: ").Append(PrincipalBusinessAddress).Append("\n"); - sb.Append(" StoreDetails: ").Append(StoreDetails).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderDetails); - } - - /// - /// Returns true if AccountHolderDetails instances are equal - /// - /// Instance of AccountHolderDetails to be compared - /// Boolean - public bool Equals(AccountHolderDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BankAccountDetails == input.BankAccountDetails || - this.BankAccountDetails != null && - input.BankAccountDetails != null && - this.BankAccountDetails.SequenceEqual(input.BankAccountDetails) - ) && - ( - this.BankAggregatorDataReference == input.BankAggregatorDataReference || - (this.BankAggregatorDataReference != null && - this.BankAggregatorDataReference.Equals(input.BankAggregatorDataReference)) - ) && - ( - this.BusinessDetails == input.BusinessDetails || - (this.BusinessDetails != null && - this.BusinessDetails.Equals(input.BusinessDetails)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.IndividualDetails == input.IndividualDetails || - (this.IndividualDetails != null && - this.IndividualDetails.Equals(input.IndividualDetails)) - ) && - ( - this.LastReviewDate == input.LastReviewDate || - (this.LastReviewDate != null && - this.LastReviewDate.Equals(input.LastReviewDate)) - ) && - ( - this.LegalArrangements == input.LegalArrangements || - this.LegalArrangements != null && - input.LegalArrangements != null && - this.LegalArrangements.SequenceEqual(input.LegalArrangements) - ) && - ( - this.MerchantCategoryCode == input.MerchantCategoryCode || - (this.MerchantCategoryCode != null && - this.MerchantCategoryCode.Equals(input.MerchantCategoryCode)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethods == input.PayoutMethods || - this.PayoutMethods != null && - input.PayoutMethods != null && - this.PayoutMethods.SequenceEqual(input.PayoutMethods) - ) && - ( - this.PrincipalBusinessAddress == input.PrincipalBusinessAddress || - (this.PrincipalBusinessAddress != null && - this.PrincipalBusinessAddress.Equals(input.PrincipalBusinessAddress)) - ) && - ( - this.StoreDetails == input.StoreDetails || - this.StoreDetails != null && - input.StoreDetails != null && - this.StoreDetails.SequenceEqual(input.StoreDetails) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BankAccountDetails != null) - { - hashCode = (hashCode * 59) + this.BankAccountDetails.GetHashCode(); - } - if (this.BankAggregatorDataReference != null) - { - hashCode = (hashCode * 59) + this.BankAggregatorDataReference.GetHashCode(); - } - if (this.BusinessDetails != null) - { - hashCode = (hashCode * 59) + this.BusinessDetails.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.IndividualDetails != null) - { - hashCode = (hashCode * 59) + this.IndividualDetails.GetHashCode(); - } - if (this.LastReviewDate != null) - { - hashCode = (hashCode * 59) + this.LastReviewDate.GetHashCode(); - } - if (this.LegalArrangements != null) - { - hashCode = (hashCode * 59) + this.LegalArrangements.GetHashCode(); - } - if (this.MerchantCategoryCode != null) - { - hashCode = (hashCode * 59) + this.MerchantCategoryCode.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethods != null) - { - hashCode = (hashCode * 59) + this.PayoutMethods.GetHashCode(); - } - if (this.PrincipalBusinessAddress != null) - { - hashCode = (hashCode * 59) + this.PrincipalBusinessAddress.GetHashCode(); - } - if (this.StoreDetails != null) - { - hashCode = (hashCode * 59) + this.StoreDetails.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/AccountHolderStatus.cs b/Adyen/Model/PlatformsAccount/AccountHolderStatus.cs deleted file mode 100644 index 7c2a70694..000000000 --- a/Adyen/Model/PlatformsAccount/AccountHolderStatus.cs +++ /dev/null @@ -1,238 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// AccountHolderStatus - /// - [DataContract(Name = "AccountHolderStatus")] - public partial class AccountHolderStatus : IEquatable, IValidatableObject - { - /// - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: Suspended - /// - [EnumMember(Value = "Suspended")] - Suspended = 4 - - } - - - /// - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderStatus() { } - /// - /// Initializes a new instance of the class. - /// - /// A list of events scheduled for the account holder.. - /// payoutState. - /// processingState. - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. (required). - /// The reason why the status was assigned to the account holder.. - public AccountHolderStatus(List events = default(List), AccountPayoutState payoutState = default(AccountPayoutState), AccountProcessingState processingState = default(AccountProcessingState), StatusEnum status = default(StatusEnum), string statusReason = default(string)) - { - this.Status = status; - this.Events = events; - this.PayoutState = payoutState; - this.ProcessingState = processingState; - this.StatusReason = statusReason; - } - - /// - /// A list of events scheduled for the account holder. - /// - /// A list of events scheduled for the account holder. - [DataMember(Name = "events", EmitDefaultValue = false)] - public List Events { get; set; } - - /// - /// Gets or Sets PayoutState - /// - [DataMember(Name = "payoutState", EmitDefaultValue = false)] - public AccountPayoutState PayoutState { get; set; } - - /// - /// Gets or Sets ProcessingState - /// - [DataMember(Name = "processingState", EmitDefaultValue = false)] - public AccountProcessingState ProcessingState { get; set; } - - /// - /// The reason why the status was assigned to the account holder. - /// - /// The reason why the status was assigned to the account holder. - [DataMember(Name = "statusReason", EmitDefaultValue = false)] - public string StatusReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderStatus {\n"); - sb.Append(" Events: ").Append(Events).Append("\n"); - sb.Append(" PayoutState: ").Append(PayoutState).Append("\n"); - sb.Append(" ProcessingState: ").Append(ProcessingState).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StatusReason: ").Append(StatusReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderStatus); - } - - /// - /// Returns true if AccountHolderStatus instances are equal - /// - /// Instance of AccountHolderStatus to be compared - /// Boolean - public bool Equals(AccountHolderStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Events == input.Events || - this.Events != null && - input.Events != null && - this.Events.SequenceEqual(input.Events) - ) && - ( - this.PayoutState == input.PayoutState || - (this.PayoutState != null && - this.PayoutState.Equals(input.PayoutState)) - ) && - ( - this.ProcessingState == input.ProcessingState || - (this.ProcessingState != null && - this.ProcessingState.Equals(input.ProcessingState)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StatusReason == input.StatusReason || - (this.StatusReason != null && - this.StatusReason.Equals(input.StatusReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Events != null) - { - hashCode = (hashCode * 59) + this.Events.GetHashCode(); - } - if (this.PayoutState != null) - { - hashCode = (hashCode * 59) + this.PayoutState.GetHashCode(); - } - if (this.ProcessingState != null) - { - hashCode = (hashCode * 59) + this.ProcessingState.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StatusReason != null) - { - hashCode = (hashCode * 59) + this.StatusReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/AccountPayoutState.cs b/Adyen/Model/PlatformsAccount/AccountPayoutState.cs deleted file mode 100644 index e0aa0b656..000000000 --- a/Adyen/Model/PlatformsAccount/AccountPayoutState.cs +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// AccountPayoutState - /// - [DataContract(Name = "AccountPayoutState")] - public partial class AccountPayoutState : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts.. - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why.. - /// Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors.. - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen.. - /// payoutLimit. - /// The payout tier that the account holder occupies.. - public AccountPayoutState(bool? allowPayout = default(bool?), string disableReason = default(string), bool? disabled = default(bool?), string notAllowedReason = default(string), Amount payoutLimit = default(Amount), int? tierNumber = default(int?)) - { - this.AllowPayout = allowPayout; - this.DisableReason = disableReason; - this.Disabled = disabled; - this.NotAllowedReason = notAllowedReason; - this.PayoutLimit = payoutLimit; - this.TierNumber = tierNumber; - } - - /// - /// Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts. - /// - /// Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts. - [DataMember(Name = "allowPayout", EmitDefaultValue = false)] - public bool? AllowPayout { get; set; } - - /// - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why. - /// - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why. - [DataMember(Name = "disableReason", EmitDefaultValue = false)] - public string DisableReason { get; set; } - - /// - /// Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors. - /// - /// Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors. - [DataMember(Name = "disabled", EmitDefaultValue = false)] - public bool? Disabled { get; set; } - - /// - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen. - /// - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen. - [DataMember(Name = "notAllowedReason", EmitDefaultValue = false)] - public string NotAllowedReason { get; set; } - - /// - /// Gets or Sets PayoutLimit - /// - [DataMember(Name = "payoutLimit", EmitDefaultValue = false)] - public Amount PayoutLimit { get; set; } - - /// - /// The payout tier that the account holder occupies. - /// - /// The payout tier that the account holder occupies. - [DataMember(Name = "tierNumber", EmitDefaultValue = false)] - public int? TierNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountPayoutState {\n"); - sb.Append(" AllowPayout: ").Append(AllowPayout).Append("\n"); - sb.Append(" DisableReason: ").Append(DisableReason).Append("\n"); - sb.Append(" Disabled: ").Append(Disabled).Append("\n"); - sb.Append(" NotAllowedReason: ").Append(NotAllowedReason).Append("\n"); - sb.Append(" PayoutLimit: ").Append(PayoutLimit).Append("\n"); - sb.Append(" TierNumber: ").Append(TierNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountPayoutState); - } - - /// - /// Returns true if AccountPayoutState instances are equal - /// - /// Instance of AccountPayoutState to be compared - /// Boolean - public bool Equals(AccountPayoutState input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowPayout == input.AllowPayout || - this.AllowPayout.Equals(input.AllowPayout) - ) && - ( - this.DisableReason == input.DisableReason || - (this.DisableReason != null && - this.DisableReason.Equals(input.DisableReason)) - ) && - ( - this.Disabled == input.Disabled || - this.Disabled.Equals(input.Disabled) - ) && - ( - this.NotAllowedReason == input.NotAllowedReason || - (this.NotAllowedReason != null && - this.NotAllowedReason.Equals(input.NotAllowedReason)) - ) && - ( - this.PayoutLimit == input.PayoutLimit || - (this.PayoutLimit != null && - this.PayoutLimit.Equals(input.PayoutLimit)) - ) && - ( - this.TierNumber == input.TierNumber || - this.TierNumber.Equals(input.TierNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AllowPayout.GetHashCode(); - if (this.DisableReason != null) - { - hashCode = (hashCode * 59) + this.DisableReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Disabled.GetHashCode(); - if (this.NotAllowedReason != null) - { - hashCode = (hashCode * 59) + this.NotAllowedReason.GetHashCode(); - } - if (this.PayoutLimit != null) - { - hashCode = (hashCode * 59) + this.PayoutLimit.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TierNumber.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/AccountProcessingState.cs b/Adyen/Model/PlatformsAccount/AccountProcessingState.cs deleted file mode 100644 index 1c19b6e56..000000000 --- a/Adyen/Model/PlatformsAccount/AccountProcessingState.cs +++ /dev/null @@ -1,195 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// AccountProcessingState - /// - [DataContract(Name = "AccountProcessingState")] - public partial class AccountProcessingState : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The reason why processing has been disabled.. - /// Indicates whether the processing of payments is allowed.. - /// processedFrom. - /// processedTo. - /// The processing tier that the account holder occupies.. - public AccountProcessingState(string disableReason = default(string), bool? disabled = default(bool?), Amount processedFrom = default(Amount), Amount processedTo = default(Amount), int? tierNumber = default(int?)) - { - this.DisableReason = disableReason; - this.Disabled = disabled; - this.ProcessedFrom = processedFrom; - this.ProcessedTo = processedTo; - this.TierNumber = tierNumber; - } - - /// - /// The reason why processing has been disabled. - /// - /// The reason why processing has been disabled. - [DataMember(Name = "disableReason", EmitDefaultValue = false)] - public string DisableReason { get; set; } - - /// - /// Indicates whether the processing of payments is allowed. - /// - /// Indicates whether the processing of payments is allowed. - [DataMember(Name = "disabled", EmitDefaultValue = false)] - public bool? Disabled { get; set; } - - /// - /// Gets or Sets ProcessedFrom - /// - [DataMember(Name = "processedFrom", EmitDefaultValue = false)] - public Amount ProcessedFrom { get; set; } - - /// - /// Gets or Sets ProcessedTo - /// - [DataMember(Name = "processedTo", EmitDefaultValue = false)] - public Amount ProcessedTo { get; set; } - - /// - /// The processing tier that the account holder occupies. - /// - /// The processing tier that the account holder occupies. - [DataMember(Name = "tierNumber", EmitDefaultValue = false)] - public int? TierNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountProcessingState {\n"); - sb.Append(" DisableReason: ").Append(DisableReason).Append("\n"); - sb.Append(" Disabled: ").Append(Disabled).Append("\n"); - sb.Append(" ProcessedFrom: ").Append(ProcessedFrom).Append("\n"); - sb.Append(" ProcessedTo: ").Append(ProcessedTo).Append("\n"); - sb.Append(" TierNumber: ").Append(TierNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountProcessingState); - } - - /// - /// Returns true if AccountProcessingState instances are equal - /// - /// Instance of AccountProcessingState to be compared - /// Boolean - public bool Equals(AccountProcessingState input) - { - if (input == null) - { - return false; - } - return - ( - this.DisableReason == input.DisableReason || - (this.DisableReason != null && - this.DisableReason.Equals(input.DisableReason)) - ) && - ( - this.Disabled == input.Disabled || - this.Disabled.Equals(input.Disabled) - ) && - ( - this.ProcessedFrom == input.ProcessedFrom || - (this.ProcessedFrom != null && - this.ProcessedFrom.Equals(input.ProcessedFrom)) - ) && - ( - this.ProcessedTo == input.ProcessedTo || - (this.ProcessedTo != null && - this.ProcessedTo.Equals(input.ProcessedTo)) - ) && - ( - this.TierNumber == input.TierNumber || - this.TierNumber.Equals(input.TierNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisableReason != null) - { - hashCode = (hashCode * 59) + this.DisableReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Disabled.GetHashCode(); - if (this.ProcessedFrom != null) - { - hashCode = (hashCode * 59) + this.ProcessedFrom.GetHashCode(); - } - if (this.ProcessedTo != null) - { - hashCode = (hashCode * 59) + this.ProcessedTo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TierNumber.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/Amount.cs b/Adyen/Model/PlatformsAccount/Amount.cs deleted file mode 100644 index ce5a23e37..000000000 --- a/Adyen/Model/PlatformsAccount/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/BankAccountDetail.cs b/Adyen/Model/PlatformsAccount/BankAccountDetail.cs deleted file mode 100644 index 3d0a4e28e..000000000 --- a/Adyen/Model/PlatformsAccount/BankAccountDetail.cs +++ /dev/null @@ -1,601 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// BankAccountDetail - /// - [DataContract(Name = "BankAccountDetail")] - public partial class BankAccountDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the bank account.. - /// Merchant reference to the bank account.. - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. . - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). . - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31).. - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// If set to true, the bank account is a primary account.. - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - public BankAccountDetail(string accountNumber = default(string), string accountType = default(string), string bankAccountName = default(string), string bankAccountReference = default(string), string bankAccountUUID = default(string), string bankBicSwift = default(string), string bankCity = default(string), string bankCode = default(string), string bankName = default(string), string branchCode = default(string), string checkCode = default(string), string countryCode = default(string), string currencyCode = default(string), string iban = default(string), string ownerCity = default(string), string ownerCountryCode = default(string), string ownerDateOfBirth = default(string), string ownerHouseNumberOrName = default(string), string ownerName = default(string), string ownerNationality = default(string), string ownerPostalCode = default(string), string ownerState = default(string), string ownerStreet = default(string), bool? primaryAccount = default(bool?), string taxId = default(string), string urlForVerification = default(string)) - { - this.AccountNumber = accountNumber; - this.AccountType = accountType; - this.BankAccountName = bankAccountName; - this.BankAccountReference = bankAccountReference; - this.BankAccountUUID = bankAccountUUID; - this.BankBicSwift = bankBicSwift; - this.BankCity = bankCity; - this.BankCode = bankCode; - this.BankName = bankName; - this.BranchCode = branchCode; - this.CheckCode = checkCode; - this.CountryCode = countryCode; - this.CurrencyCode = currencyCode; - this.Iban = iban; - this.OwnerCity = ownerCity; - this.OwnerCountryCode = ownerCountryCode; - this.OwnerDateOfBirth = ownerDateOfBirth; - this.OwnerHouseNumberOrName = ownerHouseNumberOrName; - this.OwnerName = ownerName; - this.OwnerNationality = ownerNationality; - this.OwnerPostalCode = ownerPostalCode; - this.OwnerState = ownerState; - this.OwnerStreet = ownerStreet; - this.PrimaryAccount = primaryAccount; - this.TaxId = taxId; - this.UrlForVerification = urlForVerification; - } - - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "accountNumber", EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public string AccountType { get; set; } - - /// - /// The name of the bank account. - /// - /// The name of the bank account. - [DataMember(Name = "bankAccountName", EmitDefaultValue = false)] - public string BankAccountName { get; set; } - - /// - /// Merchant reference to the bank account. - /// - /// Merchant reference to the bank account. - [DataMember(Name = "bankAccountReference", EmitDefaultValue = false)] - public string BankAccountReference { get; set; } - - /// - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. - /// - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankBicSwift", EmitDefaultValue = false)] - public string BankBicSwift { get; set; } - - /// - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankCity", EmitDefaultValue = false)] - public string BankCity { get; set; } - - /// - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankCode", EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankName", EmitDefaultValue = false)] - public string BankName { get; set; } - - /// - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "branchCode", EmitDefaultValue = false)] - public string BranchCode { get; set; } - - /// - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "checkCode", EmitDefaultValue = false)] - public string CheckCode { get; set; } - - /// - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). - /// - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). - [DataMember(Name = "currencyCode", EmitDefaultValue = false)] - public string CurrencyCode { get; set; } - - /// - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerCity", EmitDefaultValue = false)] - public string OwnerCity { get; set; } - - /// - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerCountryCode", EmitDefaultValue = false)] - public string OwnerCountryCode { get; set; } - - /// - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). - /// - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). - [DataMember(Name = "ownerDateOfBirth", EmitDefaultValue = false)] - [Obsolete] - public string OwnerDateOfBirth { get; set; } - - /// - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerHouseNumberOrName", EmitDefaultValue = false)] - public string OwnerHouseNumberOrName { get; set; } - - /// - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerNationality", EmitDefaultValue = false)] - public string OwnerNationality { get; set; } - - /// - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerPostalCode", EmitDefaultValue = false)] - public string OwnerPostalCode { get; set; } - - /// - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerState", EmitDefaultValue = false)] - public string OwnerState { get; set; } - - /// - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerStreet", EmitDefaultValue = false)] - public string OwnerStreet { get; set; } - - /// - /// If set to true, the bank account is a primary account. - /// - /// If set to true, the bank account is a primary account. - [DataMember(Name = "primaryAccount", EmitDefaultValue = false)] - public bool? PrimaryAccount { get; set; } - - /// - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "urlForVerification", EmitDefaultValue = false)] - public string UrlForVerification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountDetail {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" BankAccountName: ").Append(BankAccountName).Append("\n"); - sb.Append(" BankAccountReference: ").Append(BankAccountReference).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" BankBicSwift: ").Append(BankBicSwift).Append("\n"); - sb.Append(" BankCity: ").Append(BankCity).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" BankName: ").Append(BankName).Append("\n"); - sb.Append(" BranchCode: ").Append(BranchCode).Append("\n"); - sb.Append(" CheckCode: ").Append(CheckCode).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" OwnerCity: ").Append(OwnerCity).Append("\n"); - sb.Append(" OwnerCountryCode: ").Append(OwnerCountryCode).Append("\n"); - sb.Append(" OwnerDateOfBirth: ").Append(OwnerDateOfBirth).Append("\n"); - sb.Append(" OwnerHouseNumberOrName: ").Append(OwnerHouseNumberOrName).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" OwnerNationality: ").Append(OwnerNationality).Append("\n"); - sb.Append(" OwnerPostalCode: ").Append(OwnerPostalCode).Append("\n"); - sb.Append(" OwnerState: ").Append(OwnerState).Append("\n"); - sb.Append(" OwnerStreet: ").Append(OwnerStreet).Append("\n"); - sb.Append(" PrimaryAccount: ").Append(PrimaryAccount).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append(" UrlForVerification: ").Append(UrlForVerification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountDetail); - } - - /// - /// Returns true if BankAccountDetail instances are equal - /// - /// Instance of BankAccountDetail to be compared - /// Boolean - public bool Equals(BankAccountDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.BankAccountName == input.BankAccountName || - (this.BankAccountName != null && - this.BankAccountName.Equals(input.BankAccountName)) - ) && - ( - this.BankAccountReference == input.BankAccountReference || - (this.BankAccountReference != null && - this.BankAccountReference.Equals(input.BankAccountReference)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.BankBicSwift == input.BankBicSwift || - (this.BankBicSwift != null && - this.BankBicSwift.Equals(input.BankBicSwift)) - ) && - ( - this.BankCity == input.BankCity || - (this.BankCity != null && - this.BankCity.Equals(input.BankCity)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.BankName == input.BankName || - (this.BankName != null && - this.BankName.Equals(input.BankName)) - ) && - ( - this.BranchCode == input.BranchCode || - (this.BranchCode != null && - this.BranchCode.Equals(input.BranchCode)) - ) && - ( - this.CheckCode == input.CheckCode || - (this.CheckCode != null && - this.CheckCode.Equals(input.CheckCode)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.OwnerCity == input.OwnerCity || - (this.OwnerCity != null && - this.OwnerCity.Equals(input.OwnerCity)) - ) && - ( - this.OwnerCountryCode == input.OwnerCountryCode || - (this.OwnerCountryCode != null && - this.OwnerCountryCode.Equals(input.OwnerCountryCode)) - ) && - ( - this.OwnerDateOfBirth == input.OwnerDateOfBirth || - (this.OwnerDateOfBirth != null && - this.OwnerDateOfBirth.Equals(input.OwnerDateOfBirth)) - ) && - ( - this.OwnerHouseNumberOrName == input.OwnerHouseNumberOrName || - (this.OwnerHouseNumberOrName != null && - this.OwnerHouseNumberOrName.Equals(input.OwnerHouseNumberOrName)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.OwnerNationality == input.OwnerNationality || - (this.OwnerNationality != null && - this.OwnerNationality.Equals(input.OwnerNationality)) - ) && - ( - this.OwnerPostalCode == input.OwnerPostalCode || - (this.OwnerPostalCode != null && - this.OwnerPostalCode.Equals(input.OwnerPostalCode)) - ) && - ( - this.OwnerState == input.OwnerState || - (this.OwnerState != null && - this.OwnerState.Equals(input.OwnerState)) - ) && - ( - this.OwnerStreet == input.OwnerStreet || - (this.OwnerStreet != null && - this.OwnerStreet.Equals(input.OwnerStreet)) - ) && - ( - this.PrimaryAccount == input.PrimaryAccount || - this.PrimaryAccount.Equals(input.PrimaryAccount) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.UrlForVerification == input.UrlForVerification || - (this.UrlForVerification != null && - this.UrlForVerification.Equals(input.UrlForVerification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.BankAccountName != null) - { - hashCode = (hashCode * 59) + this.BankAccountName.GetHashCode(); - } - if (this.BankAccountReference != null) - { - hashCode = (hashCode * 59) + this.BankAccountReference.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.BankBicSwift != null) - { - hashCode = (hashCode * 59) + this.BankBicSwift.GetHashCode(); - } - if (this.BankCity != null) - { - hashCode = (hashCode * 59) + this.BankCity.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - if (this.BankName != null) - { - hashCode = (hashCode * 59) + this.BankName.GetHashCode(); - } - if (this.BranchCode != null) - { - hashCode = (hashCode * 59) + this.BranchCode.GetHashCode(); - } - if (this.CheckCode != null) - { - hashCode = (hashCode * 59) + this.CheckCode.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.CurrencyCode != null) - { - hashCode = (hashCode * 59) + this.CurrencyCode.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.OwnerCity != null) - { - hashCode = (hashCode * 59) + this.OwnerCity.GetHashCode(); - } - if (this.OwnerCountryCode != null) - { - hashCode = (hashCode * 59) + this.OwnerCountryCode.GetHashCode(); - } - if (this.OwnerDateOfBirth != null) - { - hashCode = (hashCode * 59) + this.OwnerDateOfBirth.GetHashCode(); - } - if (this.OwnerHouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.OwnerHouseNumberOrName.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.OwnerNationality != null) - { - hashCode = (hashCode * 59) + this.OwnerNationality.GetHashCode(); - } - if (this.OwnerPostalCode != null) - { - hashCode = (hashCode * 59) + this.OwnerPostalCode.GetHashCode(); - } - if (this.OwnerState != null) - { - hashCode = (hashCode * 59) + this.OwnerState.GetHashCode(); - } - if (this.OwnerStreet != null) - { - hashCode = (hashCode * 59) + this.OwnerStreet.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrimaryAccount.GetHashCode(); - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.UrlForVerification != null) - { - hashCode = (hashCode * 59) + this.UrlForVerification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/BusinessDetails.cs b/Adyen/Model/PlatformsAccount/BusinessDetails.cs deleted file mode 100644 index b884af81d..000000000 --- a/Adyen/Model/PlatformsAccount/BusinessDetails.cs +++ /dev/null @@ -1,303 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// BusinessDetails - /// - [DataContract(Name = "BusinessDetails")] - public partial class BusinessDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The registered name of the company (if it differs from the legal name of the company).. - /// The legal name of the company.. - /// Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company.. - /// The registration number of the company.. - /// Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos).. - /// Signatories associated with the company. Each array entry should represent one signatory.. - /// Market Identifier Code (MIC).. - /// International Securities Identification Number (ISIN).. - /// Stock Ticker symbol.. - /// The tax ID of the company.. - public BusinessDetails(string doingBusinessAs = default(string), string legalBusinessName = default(string), List listedUltimateParentCompany = default(List), string registrationNumber = default(string), List shareholders = default(List), List signatories = default(List), string stockExchange = default(string), string stockNumber = default(string), string stockTicker = default(string), string taxId = default(string)) - { - this.DoingBusinessAs = doingBusinessAs; - this.LegalBusinessName = legalBusinessName; - this.ListedUltimateParentCompany = listedUltimateParentCompany; - this.RegistrationNumber = registrationNumber; - this.Shareholders = shareholders; - this.Signatories = signatories; - this.StockExchange = stockExchange; - this.StockNumber = stockNumber; - this.StockTicker = stockTicker; - this.TaxId = taxId; - } - - /// - /// The registered name of the company (if it differs from the legal name of the company). - /// - /// The registered name of the company (if it differs from the legal name of the company). - [DataMember(Name = "doingBusinessAs", EmitDefaultValue = false)] - public string DoingBusinessAs { get; set; } - - /// - /// The legal name of the company. - /// - /// The legal name of the company. - [DataMember(Name = "legalBusinessName", EmitDefaultValue = false)] - public string LegalBusinessName { get; set; } - - /// - /// Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company. - /// - /// Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company. - [DataMember(Name = "listedUltimateParentCompany", EmitDefaultValue = false)] - public List ListedUltimateParentCompany { get; set; } - - /// - /// The registration number of the company. - /// - /// The registration number of the company. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos). - /// - /// Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos). - [DataMember(Name = "shareholders", EmitDefaultValue = false)] - public List Shareholders { get; set; } - - /// - /// Signatories associated with the company. Each array entry should represent one signatory. - /// - /// Signatories associated with the company. Each array entry should represent one signatory. - [DataMember(Name = "signatories", EmitDefaultValue = false)] - public List Signatories { get; set; } - - /// - /// Market Identifier Code (MIC). - /// - /// Market Identifier Code (MIC). - [DataMember(Name = "stockExchange", EmitDefaultValue = false)] - public string StockExchange { get; set; } - - /// - /// International Securities Identification Number (ISIN). - /// - /// International Securities Identification Number (ISIN). - [DataMember(Name = "stockNumber", EmitDefaultValue = false)] - public string StockNumber { get; set; } - - /// - /// Stock Ticker symbol. - /// - /// Stock Ticker symbol. - [DataMember(Name = "stockTicker", EmitDefaultValue = false)] - public string StockTicker { get; set; } - - /// - /// The tax ID of the company. - /// - /// The tax ID of the company. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BusinessDetails {\n"); - sb.Append(" DoingBusinessAs: ").Append(DoingBusinessAs).Append("\n"); - sb.Append(" LegalBusinessName: ").Append(LegalBusinessName).Append("\n"); - sb.Append(" ListedUltimateParentCompany: ").Append(ListedUltimateParentCompany).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" Shareholders: ").Append(Shareholders).Append("\n"); - sb.Append(" Signatories: ").Append(Signatories).Append("\n"); - sb.Append(" StockExchange: ").Append(StockExchange).Append("\n"); - sb.Append(" StockNumber: ").Append(StockNumber).Append("\n"); - sb.Append(" StockTicker: ").Append(StockTicker).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BusinessDetails); - } - - /// - /// Returns true if BusinessDetails instances are equal - /// - /// Instance of BusinessDetails to be compared - /// Boolean - public bool Equals(BusinessDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.DoingBusinessAs == input.DoingBusinessAs || - (this.DoingBusinessAs != null && - this.DoingBusinessAs.Equals(input.DoingBusinessAs)) - ) && - ( - this.LegalBusinessName == input.LegalBusinessName || - (this.LegalBusinessName != null && - this.LegalBusinessName.Equals(input.LegalBusinessName)) - ) && - ( - this.ListedUltimateParentCompany == input.ListedUltimateParentCompany || - this.ListedUltimateParentCompany != null && - input.ListedUltimateParentCompany != null && - this.ListedUltimateParentCompany.SequenceEqual(input.ListedUltimateParentCompany) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.Shareholders == input.Shareholders || - this.Shareholders != null && - input.Shareholders != null && - this.Shareholders.SequenceEqual(input.Shareholders) - ) && - ( - this.Signatories == input.Signatories || - this.Signatories != null && - input.Signatories != null && - this.Signatories.SequenceEqual(input.Signatories) - ) && - ( - this.StockExchange == input.StockExchange || - (this.StockExchange != null && - this.StockExchange.Equals(input.StockExchange)) - ) && - ( - this.StockNumber == input.StockNumber || - (this.StockNumber != null && - this.StockNumber.Equals(input.StockNumber)) - ) && - ( - this.StockTicker == input.StockTicker || - (this.StockTicker != null && - this.StockTicker.Equals(input.StockTicker)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DoingBusinessAs != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAs.GetHashCode(); - } - if (this.LegalBusinessName != null) - { - hashCode = (hashCode * 59) + this.LegalBusinessName.GetHashCode(); - } - if (this.ListedUltimateParentCompany != null) - { - hashCode = (hashCode * 59) + this.ListedUltimateParentCompany.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.Shareholders != null) - { - hashCode = (hashCode * 59) + this.Shareholders.GetHashCode(); - } - if (this.Signatories != null) - { - hashCode = (hashCode * 59) + this.Signatories.GetHashCode(); - } - if (this.StockExchange != null) - { - hashCode = (hashCode * 59) + this.StockExchange.GetHashCode(); - } - if (this.StockNumber != null) - { - hashCode = (hashCode * 59) + this.StockNumber.GetHashCode(); - } - if (this.StockTicker != null) - { - hashCode = (hashCode * 59) + this.StockTicker.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CloseAccountHolderRequest.cs b/Adyen/Model/PlatformsAccount/CloseAccountHolderRequest.cs deleted file mode 100644 index 8e5bdce45..000000000 --- a/Adyen/Model/PlatformsAccount/CloseAccountHolderRequest.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CloseAccountHolderRequest - /// - [DataContract(Name = "CloseAccountHolderRequest")] - public partial class CloseAccountHolderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CloseAccountHolderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account Holder to be closed. (required). - public CloseAccountHolderRequest(string accountHolderCode = default(string)) - { - this.AccountHolderCode = accountHolderCode; - } - - /// - /// The code of the Account Holder to be closed. - /// - /// The code of the Account Holder to be closed. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CloseAccountHolderRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CloseAccountHolderRequest); - } - - /// - /// Returns true if CloseAccountHolderRequest instances are equal - /// - /// Instance of CloseAccountHolderRequest to be compared - /// Boolean - public bool Equals(CloseAccountHolderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CloseAccountHolderResponse.cs b/Adyen/Model/PlatformsAccount/CloseAccountHolderResponse.cs deleted file mode 100644 index 08f9f3034..000000000 --- a/Adyen/Model/PlatformsAccount/CloseAccountHolderResponse.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CloseAccountHolderResponse - /// - [DataContract(Name = "CloseAccountHolderResponse")] - public partial class CloseAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountHolderStatus. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public CloseAccountHolderResponse(AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.AccountHolderStatus = accountHolderStatus; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CloseAccountHolderResponse {\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CloseAccountHolderResponse); - } - - /// - /// Returns true if CloseAccountHolderResponse instances are equal - /// - /// Instance of CloseAccountHolderResponse to be compared - /// Boolean - public bool Equals(CloseAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CloseAccountRequest.cs b/Adyen/Model/PlatformsAccount/CloseAccountRequest.cs deleted file mode 100644 index 57e3b7e7b..000000000 --- a/Adyen/Model/PlatformsAccount/CloseAccountRequest.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CloseAccountRequest - /// - [DataContract(Name = "CloseAccountRequest")] - public partial class CloseAccountRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CloseAccountRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of account to be closed. (required). - public CloseAccountRequest(string accountCode = default(string)) - { - this.AccountCode = accountCode; - } - - /// - /// The code of account to be closed. - /// - /// The code of account to be closed. - [DataMember(Name = "accountCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CloseAccountRequest {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CloseAccountRequest); - } - - /// - /// Returns true if CloseAccountRequest instances are equal - /// - /// Instance of CloseAccountRequest to be compared - /// Boolean - public bool Equals(CloseAccountRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CloseAccountResponse.cs b/Adyen/Model/PlatformsAccount/CloseAccountResponse.cs deleted file mode 100644 index eba71d3a3..000000000 --- a/Adyen/Model/PlatformsAccount/CloseAccountResponse.cs +++ /dev/null @@ -1,235 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CloseAccountResponse - /// - [DataContract(Name = "CloseAccountResponse")] - public partial class CloseAccountResponse : IEquatable, IValidatableObject - { - /// - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: Suspended - /// - [EnumMember(Value = "Suspended")] - Suspended = 4 - - } - - - /// - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The account code of the account that is closed.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`.. - public CloseAccountResponse(string accountCode = default(string), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.AccountCode = accountCode; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.Status = status; - } - - /// - /// The account code of the account that is closed. - /// - /// The account code of the account that is closed. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CloseAccountResponse {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CloseAccountResponse); - } - - /// - /// Returns true if CloseAccountResponse instances are equal - /// - /// Instance of CloseAccountResponse to be compared - /// Boolean - public bool Equals(CloseAccountResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CloseStoresRequest.cs b/Adyen/Model/PlatformsAccount/CloseStoresRequest.cs deleted file mode 100644 index 6949c4ab1..000000000 --- a/Adyen/Model/PlatformsAccount/CloseStoresRequest.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CloseStoresRequest - /// - [DataContract(Name = "CloseStoresRequest")] - public partial class CloseStoresRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CloseStoresRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder. (required). - /// List of stores to be closed. (required). - public CloseStoresRequest(string accountHolderCode = default(string), List stores = default(List)) - { - this.AccountHolderCode = accountHolderCode; - this.Stores = stores; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// List of stores to be closed. - /// - /// List of stores to be closed. - [DataMember(Name = "stores", IsRequired = false, EmitDefaultValue = false)] - public List Stores { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CloseStoresRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" Stores: ").Append(Stores).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CloseStoresRequest); - } - - /// - /// Returns true if CloseStoresRequest instances are equal - /// - /// Instance of CloseStoresRequest to be compared - /// Boolean - public bool Equals(CloseStoresRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.Stores == input.Stores || - this.Stores != null && - input.Stores != null && - this.Stores.SequenceEqual(input.Stores) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.Stores != null) - { - hashCode = (hashCode * 59) + this.Stores.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CreateAccountHolderRequest.cs b/Adyen/Model/PlatformsAccount/CreateAccountHolderRequest.cs deleted file mode 100644 index 278c12f2b..000000000 --- a/Adyen/Model/PlatformsAccount/CreateAccountHolderRequest.cs +++ /dev/null @@ -1,294 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CreateAccountHolderRequest - /// - [DataContract(Name = "CreateAccountHolderRequest")] - public partial class CreateAccountHolderRequest : IEquatable, IValidatableObject - { - /// - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. - /// - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. - /// - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. - [DataMember(Name = "legalEntity", IsRequired = false, EmitDefaultValue = false)] - public LegalEntityEnum LegalEntity { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateAccountHolderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Your unique identifier for the prospective account holder. The length must be between three (3) and fifty (50) characters long. Only letters, digits, and hyphens (-) are allowed. (required). - /// accountHolderDetails (required). - /// If set to **true**, an account with the default options is automatically created for the account holder. By default, this field is set to **true**.. - /// A description of the prospective account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.. - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. (required). - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.. - /// The starting [processing tier](https://docs.adyen.com/marketplaces-and-platforms/classic/onboarding-and-verification/precheck-kyc-information) for the prospective account holder.. - /// The identifier of the profile that applies to this entity.. - public CreateAccountHolderRequest(string accountHolderCode = default(string), AccountHolderDetails accountHolderDetails = default(AccountHolderDetails), bool? createDefaultAccount = default(bool?), string description = default(string), LegalEntityEnum legalEntity = default(LegalEntityEnum), string primaryCurrency = default(string), int? processingTier = default(int?), string verificationProfile = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.AccountHolderDetails = accountHolderDetails; - this.LegalEntity = legalEntity; - this.CreateDefaultAccount = createDefaultAccount; - this.Description = description; - this.PrimaryCurrency = primaryCurrency; - this.ProcessingTier = processingTier; - this.VerificationProfile = verificationProfile; - } - - /// - /// Your unique identifier for the prospective account holder. The length must be between three (3) and fifty (50) characters long. Only letters, digits, and hyphens (-) are allowed. - /// - /// Your unique identifier for the prospective account holder. The length must be between three (3) and fifty (50) characters long. Only letters, digits, and hyphens (-) are allowed. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets AccountHolderDetails - /// - [DataMember(Name = "accountHolderDetails", IsRequired = false, EmitDefaultValue = false)] - public AccountHolderDetails AccountHolderDetails { get; set; } - - /// - /// If set to **true**, an account with the default options is automatically created for the account holder. By default, this field is set to **true**. - /// - /// If set to **true**, an account with the default options is automatically created for the account holder. By default, this field is set to **true**. - [DataMember(Name = "createDefaultAccount", EmitDefaultValue = false)] - public bool? CreateDefaultAccount { get; set; } - - /// - /// A description of the prospective account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. - /// - /// A description of the prospective account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - [DataMember(Name = "primaryCurrency", EmitDefaultValue = false)] - [Obsolete] - public string PrimaryCurrency { get; set; } - - /// - /// The starting [processing tier](https://docs.adyen.com/marketplaces-and-platforms/classic/onboarding-and-verification/precheck-kyc-information) for the prospective account holder. - /// - /// The starting [processing tier](https://docs.adyen.com/marketplaces-and-platforms/classic/onboarding-and-verification/precheck-kyc-information) for the prospective account holder. - [DataMember(Name = "processingTier", EmitDefaultValue = false)] - public int? ProcessingTier { get; set; } - - /// - /// The identifier of the profile that applies to this entity. - /// - /// The identifier of the profile that applies to this entity. - [DataMember(Name = "verificationProfile", EmitDefaultValue = false)] - public string VerificationProfile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateAccountHolderRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountHolderDetails: ").Append(AccountHolderDetails).Append("\n"); - sb.Append(" CreateDefaultAccount: ").Append(CreateDefaultAccount).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" LegalEntity: ").Append(LegalEntity).Append("\n"); - sb.Append(" PrimaryCurrency: ").Append(PrimaryCurrency).Append("\n"); - sb.Append(" ProcessingTier: ").Append(ProcessingTier).Append("\n"); - sb.Append(" VerificationProfile: ").Append(VerificationProfile).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateAccountHolderRequest); - } - - /// - /// Returns true if CreateAccountHolderRequest instances are equal - /// - /// Instance of CreateAccountHolderRequest to be compared - /// Boolean - public bool Equals(CreateAccountHolderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountHolderDetails == input.AccountHolderDetails || - (this.AccountHolderDetails != null && - this.AccountHolderDetails.Equals(input.AccountHolderDetails)) - ) && - ( - this.CreateDefaultAccount == input.CreateDefaultAccount || - this.CreateDefaultAccount.Equals(input.CreateDefaultAccount) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.LegalEntity == input.LegalEntity || - this.LegalEntity.Equals(input.LegalEntity) - ) && - ( - this.PrimaryCurrency == input.PrimaryCurrency || - (this.PrimaryCurrency != null && - this.PrimaryCurrency.Equals(input.PrimaryCurrency)) - ) && - ( - this.ProcessingTier == input.ProcessingTier || - this.ProcessingTier.Equals(input.ProcessingTier) - ) && - ( - this.VerificationProfile == input.VerificationProfile || - (this.VerificationProfile != null && - this.VerificationProfile.Equals(input.VerificationProfile)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.AccountHolderDetails != null) - { - hashCode = (hashCode * 59) + this.AccountHolderDetails.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreateDefaultAccount.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntity.GetHashCode(); - if (this.PrimaryCurrency != null) - { - hashCode = (hashCode * 59) + this.PrimaryCurrency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ProcessingTier.GetHashCode(); - if (this.VerificationProfile != null) - { - hashCode = (hashCode * 59) + this.VerificationProfile.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CreateAccountHolderResponse.cs b/Adyen/Model/PlatformsAccount/CreateAccountHolderResponse.cs deleted file mode 100644 index 9bdf0f7ac..000000000 --- a/Adyen/Model/PlatformsAccount/CreateAccountHolderResponse.cs +++ /dev/null @@ -1,372 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CreateAccountHolderResponse - /// - [DataContract(Name = "CreateAccountHolderResponse")] - public partial class CreateAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// The type of legal entity of the new account holder. - /// - /// The type of legal entity of the new account holder. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The type of legal entity of the new account holder. - /// - /// The type of legal entity of the new account holder. - [DataMember(Name = "legalEntity", EmitDefaultValue = false)] - public LegalEntityEnum? LegalEntity { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of a new account created for the account holder.. - /// The code of the new account holder.. - /// accountHolderDetails. - /// accountHolderStatus. - /// The description of the new account holder.. - /// A list of fields that caused the `/createAccountHolder` request to fail.. - /// The type of legal entity of the new account holder.. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// verification. - /// The identifier of the profile that applies to this entity.. - public CreateAccountHolderResponse(string accountCode = default(string), string accountHolderCode = default(string), AccountHolderDetails accountHolderDetails = default(AccountHolderDetails), AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), string description = default(string), List invalidFields = default(List), LegalEntityEnum? legalEntity = default(LegalEntityEnum?), string primaryCurrency = default(string), string pspReference = default(string), string resultCode = default(string), KYCVerificationResult verification = default(KYCVerificationResult), string verificationProfile = default(string)) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - this.AccountHolderDetails = accountHolderDetails; - this.AccountHolderStatus = accountHolderStatus; - this.Description = description; - this.InvalidFields = invalidFields; - this.LegalEntity = legalEntity; - this.PrimaryCurrency = primaryCurrency; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.Verification = verification; - this.VerificationProfile = verificationProfile; - } - - /// - /// The code of a new account created for the account holder. - /// - /// The code of a new account created for the account holder. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the new account holder. - /// - /// The code of the new account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets AccountHolderDetails - /// - [DataMember(Name = "accountHolderDetails", EmitDefaultValue = false)] - public AccountHolderDetails AccountHolderDetails { get; set; } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// The description of the new account holder. - /// - /// The description of the new account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of fields that caused the `/createAccountHolder` request to fail. - /// - /// A list of fields that caused the `/createAccountHolder` request to fail. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - [DataMember(Name = "primaryCurrency", EmitDefaultValue = false)] - [Obsolete] - public string PrimaryCurrency { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Gets or Sets Verification - /// - [DataMember(Name = "verification", EmitDefaultValue = false)] - public KYCVerificationResult Verification { get; set; } - - /// - /// The identifier of the profile that applies to this entity. - /// - /// The identifier of the profile that applies to this entity. - [DataMember(Name = "verificationProfile", EmitDefaultValue = false)] - public string VerificationProfile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateAccountHolderResponse {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountHolderDetails: ").Append(AccountHolderDetails).Append("\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" LegalEntity: ").Append(LegalEntity).Append("\n"); - sb.Append(" PrimaryCurrency: ").Append(PrimaryCurrency).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" Verification: ").Append(Verification).Append("\n"); - sb.Append(" VerificationProfile: ").Append(VerificationProfile).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateAccountHolderResponse); - } - - /// - /// Returns true if CreateAccountHolderResponse instances are equal - /// - /// Instance of CreateAccountHolderResponse to be compared - /// Boolean - public bool Equals(CreateAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountHolderDetails == input.AccountHolderDetails || - (this.AccountHolderDetails != null && - this.AccountHolderDetails.Equals(input.AccountHolderDetails)) - ) && - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.LegalEntity == input.LegalEntity || - this.LegalEntity.Equals(input.LegalEntity) - ) && - ( - this.PrimaryCurrency == input.PrimaryCurrency || - (this.PrimaryCurrency != null && - this.PrimaryCurrency.Equals(input.PrimaryCurrency)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.Verification == input.Verification || - (this.Verification != null && - this.Verification.Equals(input.Verification)) - ) && - ( - this.VerificationProfile == input.VerificationProfile || - (this.VerificationProfile != null && - this.VerificationProfile.Equals(input.VerificationProfile)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.AccountHolderDetails != null) - { - hashCode = (hashCode * 59) + this.AccountHolderDetails.GetHashCode(); - } - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntity.GetHashCode(); - if (this.PrimaryCurrency != null) - { - hashCode = (hashCode * 59) + this.PrimaryCurrency.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - if (this.Verification != null) - { - hashCode = (hashCode * 59) + this.Verification.GetHashCode(); - } - if (this.VerificationProfile != null) - { - hashCode = (hashCode * 59) + this.VerificationProfile.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CreateAccountRequest.cs b/Adyen/Model/PlatformsAccount/CreateAccountRequest.cs deleted file mode 100644 index 0483cfba1..000000000 --- a/Adyen/Model/PlatformsAccount/CreateAccountRequest.cs +++ /dev/null @@ -1,386 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CreateAccountRequest - /// - [DataContract(Name = "CreateAccountRequest")] - public partial class CreateAccountRequest : IEquatable, IValidatableObject - { - /// - /// The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`. - /// - /// The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutScheduleEnum - { - /// - /// Enum BIWEEKLYON1STAND15THATMIDNIGHT for value: BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT - /// - [EnumMember(Value = "BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT")] - BIWEEKLYON1STAND15THATMIDNIGHT = 1, - - /// - /// Enum DAILY for value: DAILY - /// - [EnumMember(Value = "DAILY")] - DAILY = 2, - - /// - /// Enum DAILYAU for value: DAILY_AU - /// - [EnumMember(Value = "DAILY_AU")] - DAILYAU = 3, - - /// - /// Enum DAILYEU for value: DAILY_EU - /// - [EnumMember(Value = "DAILY_EU")] - DAILYEU = 4, - - /// - /// Enum DAILYSG for value: DAILY_SG - /// - [EnumMember(Value = "DAILY_SG")] - DAILYSG = 5, - - /// - /// Enum DAILYUS for value: DAILY_US - /// - [EnumMember(Value = "DAILY_US")] - DAILYUS = 6, - - /// - /// Enum HOLD for value: HOLD - /// - [EnumMember(Value = "HOLD")] - HOLD = 7, - - /// - /// Enum MONTHLY for value: MONTHLY - /// - [EnumMember(Value = "MONTHLY")] - MONTHLY = 8, - - /// - /// Enum WEEKLY for value: WEEKLY - /// - [EnumMember(Value = "WEEKLY")] - WEEKLY = 9, - - /// - /// Enum WEEKLYMONTOFRIAU for value: WEEKLY_MON_TO_FRI_AU - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_AU")] - WEEKLYMONTOFRIAU = 10, - - /// - /// Enum WEEKLYMONTOFRIEU for value: WEEKLY_MON_TO_FRI_EU - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_EU")] - WEEKLYMONTOFRIEU = 11, - - /// - /// Enum WEEKLYMONTOFRIUS for value: WEEKLY_MON_TO_FRI_US - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_US")] - WEEKLYMONTOFRIUS = 12, - - /// - /// Enum WEEKLYONTUEFRIMIDNIGHT for value: WEEKLY_ON_TUE_FRI_MIDNIGHT - /// - [EnumMember(Value = "WEEKLY_ON_TUE_FRI_MIDNIGHT")] - WEEKLYONTUEFRIMIDNIGHT = 13, - - /// - /// Enum WEEKLYSUNTOTHUAU for value: WEEKLY_SUN_TO_THU_AU - /// - [EnumMember(Value = "WEEKLY_SUN_TO_THU_AU")] - WEEKLYSUNTOTHUAU = 14, - - /// - /// Enum WEEKLYSUNTOTHUUS for value: WEEKLY_SUN_TO_THU_US - /// - [EnumMember(Value = "WEEKLY_SUN_TO_THU_US")] - WEEKLYSUNTOTHUUS = 15 - - } - - - /// - /// The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`. - /// - /// The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`. - [DataMember(Name = "payoutSchedule", EmitDefaultValue = false)] - public PayoutScheduleEnum? PayoutSchedule { get; set; } - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateAccountRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of Account Holder under which to create the account. (required). - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.. - /// A description of the account, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.. - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.. - /// The payout schedule of the prospective account. >Permitted values: `DEFAULT`, `HOLD`, `DAILY`, `WEEKLY`, `MONTHLY`.. - /// The reason for the payout schedule choice. >Required if the payoutSchedule is `HOLD`.. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. (default to PayoutSpeedEnum.STANDARD). - public CreateAccountRequest(string accountHolderCode = default(string), string bankAccountUUID = default(string), string description = default(string), Dictionary metadata = default(Dictionary), string payoutMethodCode = default(string), PayoutScheduleEnum? payoutSchedule = default(PayoutScheduleEnum?), string payoutScheduleReason = default(string), PayoutSpeedEnum? payoutSpeed = PayoutSpeedEnum.STANDARD) - { - this.AccountHolderCode = accountHolderCode; - this.BankAccountUUID = bankAccountUUID; - this.Description = description; - this.Metadata = metadata; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutSchedule = payoutSchedule; - this.PayoutScheduleReason = payoutScheduleReason; - this.PayoutSpeed = payoutSpeed; - } - - /// - /// The code of Account Holder under which to create the account. - /// - /// The code of Account Holder under which to create the account. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// A description of the account, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. - /// - /// A description of the account, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// The reason for the payout schedule choice. >Required if the payoutSchedule is `HOLD`. - /// - /// The reason for the payout schedule choice. >Required if the payoutSchedule is `HOLD`. - [DataMember(Name = "payoutScheduleReason", EmitDefaultValue = false)] - public string PayoutScheduleReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateAccountRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutSchedule: ").Append(PayoutSchedule).Append("\n"); - sb.Append(" PayoutScheduleReason: ").Append(PayoutScheduleReason).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateAccountRequest); - } - - /// - /// Returns true if CreateAccountRequest instances are equal - /// - /// Instance of CreateAccountRequest to be compared - /// Boolean - public bool Equals(CreateAccountRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutSchedule == input.PayoutSchedule || - this.PayoutSchedule.Equals(input.PayoutSchedule) - ) && - ( - this.PayoutScheduleReason == input.PayoutScheduleReason || - (this.PayoutScheduleReason != null && - this.PayoutScheduleReason.Equals(input.PayoutScheduleReason)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSchedule.GetHashCode(); - if (this.PayoutScheduleReason != null) - { - hashCode = (hashCode * 59) + this.PayoutScheduleReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/CreateAccountResponse.cs b/Adyen/Model/PlatformsAccount/CreateAccountResponse.cs deleted file mode 100644 index c1c65d48b..000000000 --- a/Adyen/Model/PlatformsAccount/CreateAccountResponse.cs +++ /dev/null @@ -1,391 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// CreateAccountResponse - /// - [DataContract(Name = "CreateAccountResponse")] - public partial class CreateAccountResponse : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// The status of the account. >Permitted values: `Active`. - /// - /// The status of the account. >Permitted values: `Active`. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: Suspended - /// - [EnumMember(Value = "Suspended")] - Suspended = 4 - - } - - - /// - /// The status of the account. >Permitted values: `Active`. - /// - /// The status of the account. >Permitted values: `Active`. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of the new account.. - /// The code of the account holder.. - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.. - /// The description of the account.. - /// A list of fields that caused the `/createAccount` request to fail.. - /// A set of key and value pairs containing metadata.. - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.. - /// payoutSchedule. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// The status of the account. >Permitted values: `Active`.. - public CreateAccountResponse(string accountCode = default(string), string accountHolderCode = default(string), string bankAccountUUID = default(string), string description = default(string), List invalidFields = default(List), Dictionary metadata = default(Dictionary), string payoutMethodCode = default(string), PayoutScheduleResponse payoutSchedule = default(PayoutScheduleResponse), PayoutSpeedEnum? payoutSpeed = default(PayoutSpeedEnum?), string pspReference = default(string), string resultCode = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - this.BankAccountUUID = bankAccountUUID; - this.Description = description; - this.InvalidFields = invalidFields; - this.Metadata = metadata; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutSchedule = payoutSchedule; - this.PayoutSpeed = payoutSpeed; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.Status = status; - } - - /// - /// The code of the new account. - /// - /// The code of the new account. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The description of the account. - /// - /// The description of the account. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of fields that caused the `/createAccount` request to fail. - /// - /// A list of fields that caused the `/createAccount` request to fail. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A set of key and value pairs containing metadata. - /// - /// A set of key and value pairs containing metadata. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Gets or Sets PayoutSchedule - /// - [DataMember(Name = "payoutSchedule", EmitDefaultValue = false)] - public PayoutScheduleResponse PayoutSchedule { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateAccountResponse {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutSchedule: ").Append(PayoutSchedule).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateAccountResponse); - } - - /// - /// Returns true if CreateAccountResponse instances are equal - /// - /// Instance of CreateAccountResponse to be compared - /// Boolean - public bool Equals(CreateAccountResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutSchedule == input.PayoutSchedule || - (this.PayoutSchedule != null && - this.PayoutSchedule.Equals(input.PayoutSchedule)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.PayoutSchedule != null) - { - hashCode = (hashCode * 59) + this.PayoutSchedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/DeleteBankAccountRequest.cs b/Adyen/Model/PlatformsAccount/DeleteBankAccountRequest.cs deleted file mode 100644 index f41502a1e..000000000 --- a/Adyen/Model/PlatformsAccount/DeleteBankAccountRequest.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// DeleteBankAccountRequest - /// - [DataContract(Name = "DeleteBankAccountRequest")] - public partial class DeleteBankAccountRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeleteBankAccountRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account Holder from which to delete the Bank Account(s). (required). - /// The code(s) of the Bank Accounts to be deleted. (required). - public DeleteBankAccountRequest(string accountHolderCode = default(string), List bankAccountUUIDs = default(List)) - { - this.AccountHolderCode = accountHolderCode; - this.BankAccountUUIDs = bankAccountUUIDs; - } - - /// - /// The code of the Account Holder from which to delete the Bank Account(s). - /// - /// The code of the Account Holder from which to delete the Bank Account(s). - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The code(s) of the Bank Accounts to be deleted. - /// - /// The code(s) of the Bank Accounts to be deleted. - [DataMember(Name = "bankAccountUUIDs", IsRequired = false, EmitDefaultValue = false)] - public List BankAccountUUIDs { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeleteBankAccountRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" BankAccountUUIDs: ").Append(BankAccountUUIDs).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteBankAccountRequest); - } - - /// - /// Returns true if DeleteBankAccountRequest instances are equal - /// - /// Instance of DeleteBankAccountRequest to be compared - /// Boolean - public bool Equals(DeleteBankAccountRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.BankAccountUUIDs == input.BankAccountUUIDs || - this.BankAccountUUIDs != null && - input.BankAccountUUIDs != null && - this.BankAccountUUIDs.SequenceEqual(input.BankAccountUUIDs) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.BankAccountUUIDs != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUIDs.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/DeleteLegalArrangementRequest.cs b/Adyen/Model/PlatformsAccount/DeleteLegalArrangementRequest.cs deleted file mode 100644 index 37a49d3b8..000000000 --- a/Adyen/Model/PlatformsAccount/DeleteLegalArrangementRequest.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// DeleteLegalArrangementRequest - /// - [DataContract(Name = "DeleteLegalArrangementRequest")] - public partial class DeleteLegalArrangementRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeleteLegalArrangementRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder. (required). - /// List of legal arrangements. (required). - public DeleteLegalArrangementRequest(string accountHolderCode = default(string), List legalArrangements = default(List)) - { - this.AccountHolderCode = accountHolderCode; - this.LegalArrangements = legalArrangements; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// List of legal arrangements. - /// - /// List of legal arrangements. - [DataMember(Name = "legalArrangements", IsRequired = false, EmitDefaultValue = false)] - public List LegalArrangements { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeleteLegalArrangementRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" LegalArrangements: ").Append(LegalArrangements).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteLegalArrangementRequest); - } - - /// - /// Returns true if DeleteLegalArrangementRequest instances are equal - /// - /// Instance of DeleteLegalArrangementRequest to be compared - /// Boolean - public bool Equals(DeleteLegalArrangementRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.LegalArrangements == input.LegalArrangements || - this.LegalArrangements != null && - input.LegalArrangements != null && - this.LegalArrangements.SequenceEqual(input.LegalArrangements) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.LegalArrangements != null) - { - hashCode = (hashCode * 59) + this.LegalArrangements.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/DeletePayoutMethodRequest.cs b/Adyen/Model/PlatformsAccount/DeletePayoutMethodRequest.cs deleted file mode 100644 index a07da34f2..000000000 --- a/Adyen/Model/PlatformsAccount/DeletePayoutMethodRequest.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// DeletePayoutMethodRequest - /// - [DataContract(Name = "DeletePayoutMethodRequest")] - public partial class DeletePayoutMethodRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeletePayoutMethodRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder, from which to delete the payout methods. (required). - /// The codes of the payout methods to be deleted. (required). - public DeletePayoutMethodRequest(string accountHolderCode = default(string), List payoutMethodCodes = default(List)) - { - this.AccountHolderCode = accountHolderCode; - this.PayoutMethodCodes = payoutMethodCodes; - } - - /// - /// The code of the account holder, from which to delete the payout methods. - /// - /// The code of the account holder, from which to delete the payout methods. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The codes of the payout methods to be deleted. - /// - /// The codes of the payout methods to be deleted. - [DataMember(Name = "payoutMethodCodes", IsRequired = false, EmitDefaultValue = false)] - public List PayoutMethodCodes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeletePayoutMethodRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" PayoutMethodCodes: ").Append(PayoutMethodCodes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeletePayoutMethodRequest); - } - - /// - /// Returns true if DeletePayoutMethodRequest instances are equal - /// - /// Instance of DeletePayoutMethodRequest to be compared - /// Boolean - public bool Equals(DeletePayoutMethodRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.PayoutMethodCodes == input.PayoutMethodCodes || - this.PayoutMethodCodes != null && - input.PayoutMethodCodes != null && - this.PayoutMethodCodes.SequenceEqual(input.PayoutMethodCodes) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.PayoutMethodCodes != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCodes.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/DeleteShareholderRequest.cs b/Adyen/Model/PlatformsAccount/DeleteShareholderRequest.cs deleted file mode 100644 index be1dee22c..000000000 --- a/Adyen/Model/PlatformsAccount/DeleteShareholderRequest.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// DeleteShareholderRequest - /// - [DataContract(Name = "DeleteShareholderRequest")] - public partial class DeleteShareholderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeleteShareholderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account Holder from which to delete the Shareholders. (required). - /// The code(s) of the Shareholders to be deleted. (required). - public DeleteShareholderRequest(string accountHolderCode = default(string), List shareholderCodes = default(List)) - { - this.AccountHolderCode = accountHolderCode; - this.ShareholderCodes = shareholderCodes; - } - - /// - /// The code of the Account Holder from which to delete the Shareholders. - /// - /// The code of the Account Holder from which to delete the Shareholders. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The code(s) of the Shareholders to be deleted. - /// - /// The code(s) of the Shareholders to be deleted. - [DataMember(Name = "shareholderCodes", IsRequired = false, EmitDefaultValue = false)] - public List ShareholderCodes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeleteShareholderRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" ShareholderCodes: ").Append(ShareholderCodes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteShareholderRequest); - } - - /// - /// Returns true if DeleteShareholderRequest instances are equal - /// - /// Instance of DeleteShareholderRequest to be compared - /// Boolean - public bool Equals(DeleteShareholderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.ShareholderCodes == input.ShareholderCodes || - this.ShareholderCodes != null && - input.ShareholderCodes != null && - this.ShareholderCodes.SequenceEqual(input.ShareholderCodes) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.ShareholderCodes != null) - { - hashCode = (hashCode * 59) + this.ShareholderCodes.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/DeleteSignatoriesRequest.cs b/Adyen/Model/PlatformsAccount/DeleteSignatoriesRequest.cs deleted file mode 100644 index e6c152a9e..000000000 --- a/Adyen/Model/PlatformsAccount/DeleteSignatoriesRequest.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// DeleteSignatoriesRequest - /// - [DataContract(Name = "DeleteSignatoriesRequest")] - public partial class DeleteSignatoriesRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeleteSignatoriesRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder from which to delete the signatories. (required). - /// Array of codes of the signatories to be deleted. (required). - public DeleteSignatoriesRequest(string accountHolderCode = default(string), List signatoryCodes = default(List)) - { - this.AccountHolderCode = accountHolderCode; - this.SignatoryCodes = signatoryCodes; - } - - /// - /// The code of the account holder from which to delete the signatories. - /// - /// The code of the account holder from which to delete the signatories. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Array of codes of the signatories to be deleted. - /// - /// Array of codes of the signatories to be deleted. - [DataMember(Name = "signatoryCodes", IsRequired = false, EmitDefaultValue = false)] - public List SignatoryCodes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeleteSignatoriesRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" SignatoryCodes: ").Append(SignatoryCodes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteSignatoriesRequest); - } - - /// - /// Returns true if DeleteSignatoriesRequest instances are equal - /// - /// Instance of DeleteSignatoriesRequest to be compared - /// Boolean - public bool Equals(DeleteSignatoriesRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.SignatoryCodes == input.SignatoryCodes || - this.SignatoryCodes != null && - input.SignatoryCodes != null && - this.SignatoryCodes.SequenceEqual(input.SignatoryCodes) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.SignatoryCodes != null) - { - hashCode = (hashCode * 59) + this.SignatoryCodes.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/DocumentDetail.cs b/Adyen/Model/PlatformsAccount/DocumentDetail.cs deleted file mode 100644 index efb8d8c80..000000000 --- a/Adyen/Model/PlatformsAccount/DocumentDetail.cs +++ /dev/null @@ -1,375 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// DocumentDetail - /// - [DataContract(Name = "DocumentDetail")] - public partial class DocumentDetail : IEquatable, IValidatableObject - { - /// - /// The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. - /// - /// The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. - [JsonConverter(typeof(StringEnumConverter))] - public enum DocumentTypeEnum - { - /// - /// Enum BANKSTATEMENT for value: BANK_STATEMENT - /// - [EnumMember(Value = "BANK_STATEMENT")] - BANKSTATEMENT = 1, - - /// - /// Enum BSN for value: BSN - /// - [EnumMember(Value = "BSN")] - BSN = 2, - - /// - /// Enum COMPANYREGISTRATIONSCREENING for value: COMPANY_REGISTRATION_SCREENING - /// - [EnumMember(Value = "COMPANY_REGISTRATION_SCREENING")] - COMPANYREGISTRATIONSCREENING = 3, - - /// - /// Enum CONSTITUTIONALDOCUMENT for value: CONSTITUTIONAL_DOCUMENT - /// - [EnumMember(Value = "CONSTITUTIONAL_DOCUMENT")] - CONSTITUTIONALDOCUMENT = 4, - - /// - /// Enum DRIVINGLICENCE for value: DRIVING_LICENCE - /// - [EnumMember(Value = "DRIVING_LICENCE")] - DRIVINGLICENCE = 5, - - /// - /// Enum DRIVINGLICENCEBACK for value: DRIVING_LICENCE_BACK - /// - [EnumMember(Value = "DRIVING_LICENCE_BACK")] - DRIVINGLICENCEBACK = 6, - - /// - /// Enum DRIVINGLICENCEFRONT for value: DRIVING_LICENCE_FRONT - /// - [EnumMember(Value = "DRIVING_LICENCE_FRONT")] - DRIVINGLICENCEFRONT = 7, - - /// - /// Enum IDCARD for value: ID_CARD - /// - [EnumMember(Value = "ID_CARD")] - IDCARD = 8, - - /// - /// Enum IDCARDBACK for value: ID_CARD_BACK - /// - [EnumMember(Value = "ID_CARD_BACK")] - IDCARDBACK = 9, - - /// - /// Enum IDCARDFRONT for value: ID_CARD_FRONT - /// - [EnumMember(Value = "ID_CARD_FRONT")] - IDCARDFRONT = 10, - - /// - /// Enum PASSPORT for value: PASSPORT - /// - [EnumMember(Value = "PASSPORT")] - PASSPORT = 11, - - /// - /// Enum PROOFOFRESIDENCY for value: PROOF_OF_RESIDENCY - /// - [EnumMember(Value = "PROOF_OF_RESIDENCY")] - PROOFOFRESIDENCY = 12, - - /// - /// Enum SSN for value: SSN - /// - [EnumMember(Value = "SSN")] - SSN = 13, - - /// - /// Enum SUPPORTINGDOCUMENTS for value: SUPPORTING_DOCUMENTS - /// - [EnumMember(Value = "SUPPORTING_DOCUMENTS")] - SUPPORTINGDOCUMENTS = 14 - - } - - - /// - /// The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. - /// - /// The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. - [DataMember(Name = "documentType", IsRequired = false, EmitDefaultValue = false)] - public DocumentTypeEnum DocumentType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DocumentDetail() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of account holder, to which the document applies.. - /// The Adyen-generated [`bankAccountUUID`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-bankAccountDetails-bankAccountUUID) to which the document must be linked. Refer to [Bank account check](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check#uploading-a-bank-statement) for details on when a document should be submitted. >Required if the `documentType` is **BANK_STATEMENT**, where a document is being submitted in order to verify a bank account. . - /// Description of the document.. - /// The type of the document. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when each document type should be submitted and for the accepted file formats. Permitted values: * **BANK_STATEMENT**: A file containing a bank statement or other document proving ownership of a specific bank account. * **COMPANY_REGISTRATION_SCREENING** (Supported from v5 and later): A file containing a company registration document. * **CONSTITUTIONAL_DOCUMENT**: A file containing information about the account holder's legal arrangement. * **PASSPORT**: A file containing the identity page(s) of a passport. * **ID_CARD_FRONT**: A file containing only the front of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **ID_CARD_BACK**: A file containing only the back of the ID card. In order for a document to be usable, both the **ID_CARD_FRONT** and **ID_CARD_BACK** must be submitted. * **DRIVING_LICENCE_FRONT**: A file containing only the front of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_BACK** must be submitted. * **DRIVING_LICENCE_BACK**: A file containing only the back of the driving licence. In order for a document to be usable, both the **DRIVING_LICENCE_FRONT** and **DRIVING_LICENCE_FRONT** must be submitted. (required). - /// Filename of the document.. - /// The Adyen-generated [`legalArrangementCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementCode) to which the document must be linked.. - /// The Adyen-generated [`legalArrangementEntityCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementEntities-legalArrangementEntityCode) to which the document must be linked.. - /// The Adyen-generated [`shareholderCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-shareholders-shareholderCode) to which the document must be linked. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when a document should be submitted. >Required if the account holder has a `legalEntity` of type **Business** and the `documentType` is either **PASSPORT**, **ID_CARD_FRONT**, **ID_CARD_BACK**, **DRIVING_LICENCE_FRONT**, or **DRIVING_LICENCE_BACK**. . - /// The Adyen-generated [`signatoryCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-signatories-signatoryCode) to which the document must be linked.. - public DocumentDetail(string accountHolderCode = default(string), string bankAccountUUID = default(string), string description = default(string), DocumentTypeEnum documentType = default(DocumentTypeEnum), string filename = default(string), string legalArrangementCode = default(string), string legalArrangementEntityCode = default(string), string shareholderCode = default(string), string signatoryCode = default(string)) - { - this.DocumentType = documentType; - this.AccountHolderCode = accountHolderCode; - this.BankAccountUUID = bankAccountUUID; - this.Description = description; - this.Filename = filename; - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntityCode = legalArrangementEntityCode; - this.ShareholderCode = shareholderCode; - this.SignatoryCode = signatoryCode; - } - - /// - /// The code of account holder, to which the document applies. - /// - /// The code of account holder, to which the document applies. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The Adyen-generated [`bankAccountUUID`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-bankAccountDetails-bankAccountUUID) to which the document must be linked. Refer to [Bank account check](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check#uploading-a-bank-statement) for details on when a document should be submitted. >Required if the `documentType` is **BANK_STATEMENT**, where a document is being submitted in order to verify a bank account. - /// - /// The Adyen-generated [`bankAccountUUID`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-bankAccountDetails-bankAccountUUID) to which the document must be linked. Refer to [Bank account check](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check#uploading-a-bank-statement) for details on when a document should be submitted. >Required if the `documentType` is **BANK_STATEMENT**, where a document is being submitted in order to verify a bank account. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// Description of the document. - /// - /// Description of the document. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Filename of the document. - /// - /// Filename of the document. - [DataMember(Name = "filename", EmitDefaultValue = false)] - public string Filename { get; set; } - - /// - /// The Adyen-generated [`legalArrangementCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementCode) to which the document must be linked. - /// - /// The Adyen-generated [`legalArrangementCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementCode) to which the document must be linked. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// The Adyen-generated [`legalArrangementEntityCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementEntities-legalArrangementEntityCode) to which the document must be linked. - /// - /// The Adyen-generated [`legalArrangementEntityCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-legalArrangements-legalArrangementEntities-legalArrangementEntityCode) to which the document must be linked. - [DataMember(Name = "legalArrangementEntityCode", EmitDefaultValue = false)] - public string LegalArrangementEntityCode { get; set; } - - /// - /// The Adyen-generated [`shareholderCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-shareholders-shareholderCode) to which the document must be linked. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when a document should be submitted. >Required if the account holder has a `legalEntity` of type **Business** and the `documentType` is either **PASSPORT**, **ID_CARD_FRONT**, **ID_CARD_BACK**, **DRIVING_LICENCE_FRONT**, or **DRIVING_LICENCE_BACK**. - /// - /// The Adyen-generated [`shareholderCode`](https://docs.adyen.com/api-explorer/#/Account/latest/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-shareholders-shareholderCode) to which the document must be linked. Refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks) for details on when a document should be submitted. >Required if the account holder has a `legalEntity` of type **Business** and the `documentType` is either **PASSPORT**, **ID_CARD_FRONT**, **ID_CARD_BACK**, **DRIVING_LICENCE_FRONT**, or **DRIVING_LICENCE_BACK**. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// The Adyen-generated [`signatoryCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-signatories-signatoryCode) to which the document must be linked. - /// - /// The Adyen-generated [`signatoryCode`](https://docs.adyen.com/api-explorer/#/Account/v6/post/createAccountHolder__resParam_accountHolderDetails-businessDetails-signatories-signatoryCode) to which the document must be linked. - [DataMember(Name = "signatoryCode", EmitDefaultValue = false)] - public string SignatoryCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DocumentDetail {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DocumentType: ").Append(DocumentType).Append("\n"); - sb.Append(" Filename: ").Append(Filename).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntityCode: ").Append(LegalArrangementEntityCode).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append(" SignatoryCode: ").Append(SignatoryCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DocumentDetail); - } - - /// - /// Returns true if DocumentDetail instances are equal - /// - /// Instance of DocumentDetail to be compared - /// Boolean - public bool Equals(DocumentDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DocumentType == input.DocumentType || - this.DocumentType.Equals(input.DocumentType) - ) && - ( - this.Filename == input.Filename || - (this.Filename != null && - this.Filename.Equals(input.Filename)) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntityCode == input.LegalArrangementEntityCode || - (this.LegalArrangementEntityCode != null && - this.LegalArrangementEntityCode.Equals(input.LegalArrangementEntityCode)) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ) && - ( - this.SignatoryCode == input.SignatoryCode || - (this.SignatoryCode != null && - this.SignatoryCode.Equals(input.SignatoryCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DocumentType.GetHashCode(); - if (this.Filename != null) - { - hashCode = (hashCode * 59) + this.Filename.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCode.GetHashCode(); - } - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - if (this.SignatoryCode != null) - { - hashCode = (hashCode * 59) + this.SignatoryCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/ErrorFieldType.cs b/Adyen/Model/PlatformsAccount/ErrorFieldType.cs deleted file mode 100644 index 1438004b9..000000000 --- a/Adyen/Model/PlatformsAccount/ErrorFieldType.cs +++ /dev/null @@ -1,162 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// ErrorFieldType - /// - [DataContract(Name = "ErrorFieldType")] - public partial class ErrorFieldType : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The validation error code.. - /// A description of the validation error.. - /// fieldType. - public ErrorFieldType(int? errorCode = default(int?), string errorDescription = default(string), FieldType fieldType = default(FieldType)) - { - this.ErrorCode = errorCode; - this.ErrorDescription = errorDescription; - this.FieldType = fieldType; - } - - /// - /// The validation error code. - /// - /// The validation error code. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public int? ErrorCode { get; set; } - - /// - /// A description of the validation error. - /// - /// A description of the validation error. - [DataMember(Name = "errorDescription", EmitDefaultValue = false)] - public string ErrorDescription { get; set; } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name = "fieldType", EmitDefaultValue = false)] - public FieldType FieldType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ErrorFieldType {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); - sb.Append(" FieldType: ").Append(FieldType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ErrorFieldType); - } - - /// - /// Returns true if ErrorFieldType instances are equal - /// - /// Instance of ErrorFieldType to be compared - /// Boolean - public bool Equals(ErrorFieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - this.ErrorCode.Equals(input.ErrorCode) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.FieldType != null) - { - hashCode = (hashCode * 59) + this.FieldType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/FieldType.cs b/Adyen/Model/PlatformsAccount/FieldType.cs deleted file mode 100644 index 748464dc7..000000000 --- a/Adyen/Model/PlatformsAccount/FieldType.cs +++ /dev/null @@ -1,1144 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// FieldType - /// - [DataContract(Name = "FieldType")] - public partial class FieldType : IEquatable, IValidatableObject - { - /// - /// The type of the field. - /// - /// The type of the field. - [JsonConverter(typeof(StringEnumConverter))] - public enum FieldNameEnum - { - /// - /// Enum AccountCode for value: accountCode - /// - [EnumMember(Value = "accountCode")] - AccountCode = 1, - - /// - /// Enum AccountHolderCode for value: accountHolderCode - /// - [EnumMember(Value = "accountHolderCode")] - AccountHolderCode = 2, - - /// - /// Enum AccountHolderDetails for value: accountHolderDetails - /// - [EnumMember(Value = "accountHolderDetails")] - AccountHolderDetails = 3, - - /// - /// Enum AccountNumber for value: accountNumber - /// - [EnumMember(Value = "accountNumber")] - AccountNumber = 4, - - /// - /// Enum AccountStateType for value: accountStateType - /// - [EnumMember(Value = "accountStateType")] - AccountStateType = 5, - - /// - /// Enum AccountStatus for value: accountStatus - /// - [EnumMember(Value = "accountStatus")] - AccountStatus = 6, - - /// - /// Enum AccountType for value: accountType - /// - [EnumMember(Value = "accountType")] - AccountType = 7, - - /// - /// Enum Address for value: address - /// - [EnumMember(Value = "address")] - Address = 8, - - /// - /// Enum BalanceAccount for value: balanceAccount - /// - [EnumMember(Value = "balanceAccount")] - BalanceAccount = 9, - - /// - /// Enum BalanceAccountActive for value: balanceAccountActive - /// - [EnumMember(Value = "balanceAccountActive")] - BalanceAccountActive = 10, - - /// - /// Enum BalanceAccountCode for value: balanceAccountCode - /// - [EnumMember(Value = "balanceAccountCode")] - BalanceAccountCode = 11, - - /// - /// Enum BalanceAccountId for value: balanceAccountId - /// - [EnumMember(Value = "balanceAccountId")] - BalanceAccountId = 12, - - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 13, - - /// - /// Enum BankAccountCode for value: bankAccountCode - /// - [EnumMember(Value = "bankAccountCode")] - BankAccountCode = 14, - - /// - /// Enum BankAccountName for value: bankAccountName - /// - [EnumMember(Value = "bankAccountName")] - BankAccountName = 15, - - /// - /// Enum BankAccountUUID for value: bankAccountUUID - /// - [EnumMember(Value = "bankAccountUUID")] - BankAccountUUID = 16, - - /// - /// Enum BankBicSwift for value: bankBicSwift - /// - [EnumMember(Value = "bankBicSwift")] - BankBicSwift = 17, - - /// - /// Enum BankCity for value: bankCity - /// - [EnumMember(Value = "bankCity")] - BankCity = 18, - - /// - /// Enum BankCode for value: bankCode - /// - [EnumMember(Value = "bankCode")] - BankCode = 19, - - /// - /// Enum BankName for value: bankName - /// - [EnumMember(Value = "bankName")] - BankName = 20, - - /// - /// Enum BankStatement for value: bankStatement - /// - [EnumMember(Value = "bankStatement")] - BankStatement = 21, - - /// - /// Enum BranchCode for value: branchCode - /// - [EnumMember(Value = "branchCode")] - BranchCode = 22, - - /// - /// Enum BusinessContact for value: businessContact - /// - [EnumMember(Value = "businessContact")] - BusinessContact = 23, - - /// - /// Enum CardToken for value: cardToken - /// - [EnumMember(Value = "cardToken")] - CardToken = 24, - - /// - /// Enum CheckCode for value: checkCode - /// - [EnumMember(Value = "checkCode")] - CheckCode = 25, - - /// - /// Enum City for value: city - /// - [EnumMember(Value = "city")] - City = 26, - - /// - /// Enum CompanyRegistration for value: companyRegistration - /// - [EnumMember(Value = "companyRegistration")] - CompanyRegistration = 27, - - /// - /// Enum ConstitutionalDocument for value: constitutionalDocument - /// - [EnumMember(Value = "constitutionalDocument")] - ConstitutionalDocument = 28, - - /// - /// Enum Controller for value: controller - /// - [EnumMember(Value = "controller")] - Controller = 29, - - /// - /// Enum Country for value: country - /// - [EnumMember(Value = "country")] - Country = 30, - - /// - /// Enum CountryCode for value: countryCode - /// - [EnumMember(Value = "countryCode")] - CountryCode = 31, - - /// - /// Enum Currency for value: currency - /// - [EnumMember(Value = "currency")] - Currency = 32, - - /// - /// Enum CurrencyCode for value: currencyCode - /// - [EnumMember(Value = "currencyCode")] - CurrencyCode = 33, - - /// - /// Enum DateOfBirth for value: dateOfBirth - /// - [EnumMember(Value = "dateOfBirth")] - DateOfBirth = 34, - - /// - /// Enum Description for value: description - /// - [EnumMember(Value = "description")] - Description = 35, - - /// - /// Enum DestinationAccountCode for value: destinationAccountCode - /// - [EnumMember(Value = "destinationAccountCode")] - DestinationAccountCode = 36, - - /// - /// Enum Document for value: document - /// - [EnumMember(Value = "document")] - Document = 37, - - /// - /// Enum DocumentContent for value: documentContent - /// - [EnumMember(Value = "documentContent")] - DocumentContent = 38, - - /// - /// Enum DocumentExpirationDate for value: documentExpirationDate - /// - [EnumMember(Value = "documentExpirationDate")] - DocumentExpirationDate = 39, - - /// - /// Enum DocumentIssuerCountry for value: documentIssuerCountry - /// - [EnumMember(Value = "documentIssuerCountry")] - DocumentIssuerCountry = 40, - - /// - /// Enum DocumentIssuerState for value: documentIssuerState - /// - [EnumMember(Value = "documentIssuerState")] - DocumentIssuerState = 41, - - /// - /// Enum DocumentName for value: documentName - /// - [EnumMember(Value = "documentName")] - DocumentName = 42, - - /// - /// Enum DocumentNumber for value: documentNumber - /// - [EnumMember(Value = "documentNumber")] - DocumentNumber = 43, - - /// - /// Enum DocumentType for value: documentType - /// - [EnumMember(Value = "documentType")] - DocumentType = 44, - - /// - /// Enum DoingBusinessAs for value: doingBusinessAs - /// - [EnumMember(Value = "doingBusinessAs")] - DoingBusinessAs = 45, - - /// - /// Enum DrivingLicence for value: drivingLicence - /// - [EnumMember(Value = "drivingLicence")] - DrivingLicence = 46, - - /// - /// Enum DrivingLicenceBack for value: drivingLicenceBack - /// - [EnumMember(Value = "drivingLicenceBack")] - DrivingLicenceBack = 47, - - /// - /// Enum DrivingLicenceFront for value: drivingLicenceFront - /// - [EnumMember(Value = "drivingLicenceFront")] - DrivingLicenceFront = 48, - - /// - /// Enum DrivingLicense for value: drivingLicense - /// - [EnumMember(Value = "drivingLicense")] - DrivingLicense = 49, - - /// - /// Enum Email for value: email - /// - [EnumMember(Value = "email")] - Email = 50, - - /// - /// Enum FirstName for value: firstName - /// - [EnumMember(Value = "firstName")] - FirstName = 51, - - /// - /// Enum FormType for value: formType - /// - [EnumMember(Value = "formType")] - FormType = 52, - - /// - /// Enum FullPhoneNumber for value: fullPhoneNumber - /// - [EnumMember(Value = "fullPhoneNumber")] - FullPhoneNumber = 53, - - /// - /// Enum Gender for value: gender - /// - [EnumMember(Value = "gender")] - Gender = 54, - - /// - /// Enum HopWebserviceUser for value: hopWebserviceUser - /// - [EnumMember(Value = "hopWebserviceUser")] - HopWebserviceUser = 55, - - /// - /// Enum HouseNumberOrName for value: houseNumberOrName - /// - [EnumMember(Value = "houseNumberOrName")] - HouseNumberOrName = 56, - - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 57, - - /// - /// Enum IdCard for value: idCard - /// - [EnumMember(Value = "idCard")] - IdCard = 58, - - /// - /// Enum IdCardBack for value: idCardBack - /// - [EnumMember(Value = "idCardBack")] - IdCardBack = 59, - - /// - /// Enum IdCardFront for value: idCardFront - /// - [EnumMember(Value = "idCardFront")] - IdCardFront = 60, - - /// - /// Enum IdNumber for value: idNumber - /// - [EnumMember(Value = "idNumber")] - IdNumber = 61, - - /// - /// Enum IdentityDocument for value: identityDocument - /// - [EnumMember(Value = "identityDocument")] - IdentityDocument = 62, - - /// - /// Enum IndividualDetails for value: individualDetails - /// - [EnumMember(Value = "individualDetails")] - IndividualDetails = 63, - - /// - /// Enum Infix for value: infix - /// - [EnumMember(Value = "infix")] - Infix = 64, - - /// - /// Enum JobTitle for value: jobTitle - /// - [EnumMember(Value = "jobTitle")] - JobTitle = 65, - - /// - /// Enum LastName for value: lastName - /// - [EnumMember(Value = "lastName")] - LastName = 66, - - /// - /// Enum LastReviewDate for value: lastReviewDate - /// - [EnumMember(Value = "lastReviewDate")] - LastReviewDate = 67, - - /// - /// Enum LegalArrangement for value: legalArrangement - /// - [EnumMember(Value = "legalArrangement")] - LegalArrangement = 68, - - /// - /// Enum LegalArrangementCode for value: legalArrangementCode - /// - [EnumMember(Value = "legalArrangementCode")] - LegalArrangementCode = 69, - - /// - /// Enum LegalArrangementEntity for value: legalArrangementEntity - /// - [EnumMember(Value = "legalArrangementEntity")] - LegalArrangementEntity = 70, - - /// - /// Enum LegalArrangementEntityCode for value: legalArrangementEntityCode - /// - [EnumMember(Value = "legalArrangementEntityCode")] - LegalArrangementEntityCode = 71, - - /// - /// Enum LegalArrangementLegalForm for value: legalArrangementLegalForm - /// - [EnumMember(Value = "legalArrangementLegalForm")] - LegalArrangementLegalForm = 72, - - /// - /// Enum LegalArrangementMember for value: legalArrangementMember - /// - [EnumMember(Value = "legalArrangementMember")] - LegalArrangementMember = 73, - - /// - /// Enum LegalArrangementMembers for value: legalArrangementMembers - /// - [EnumMember(Value = "legalArrangementMembers")] - LegalArrangementMembers = 74, - - /// - /// Enum LegalArrangementName for value: legalArrangementName - /// - [EnumMember(Value = "legalArrangementName")] - LegalArrangementName = 75, - - /// - /// Enum LegalArrangementReference for value: legalArrangementReference - /// - [EnumMember(Value = "legalArrangementReference")] - LegalArrangementReference = 76, - - /// - /// Enum LegalArrangementRegistrationNumber for value: legalArrangementRegistrationNumber - /// - [EnumMember(Value = "legalArrangementRegistrationNumber")] - LegalArrangementRegistrationNumber = 77, - - /// - /// Enum LegalArrangementTaxNumber for value: legalArrangementTaxNumber - /// - [EnumMember(Value = "legalArrangementTaxNumber")] - LegalArrangementTaxNumber = 78, - - /// - /// Enum LegalArrangementType for value: legalArrangementType - /// - [EnumMember(Value = "legalArrangementType")] - LegalArrangementType = 79, - - /// - /// Enum LegalBusinessName for value: legalBusinessName - /// - [EnumMember(Value = "legalBusinessName")] - LegalBusinessName = 80, - - /// - /// Enum LegalEntity for value: legalEntity - /// - [EnumMember(Value = "legalEntity")] - LegalEntity = 81, - - /// - /// Enum LegalEntityType for value: legalEntityType - /// - [EnumMember(Value = "legalEntityType")] - LegalEntityType = 82, - - /// - /// Enum Logo for value: logo - /// - [EnumMember(Value = "logo")] - Logo = 83, - - /// - /// Enum MerchantAccount for value: merchantAccount - /// - [EnumMember(Value = "merchantAccount")] - MerchantAccount = 84, - - /// - /// Enum MerchantCategoryCode for value: merchantCategoryCode - /// - [EnumMember(Value = "merchantCategoryCode")] - MerchantCategoryCode = 85, - - /// - /// Enum MerchantHouseNumber for value: merchantHouseNumber - /// - [EnumMember(Value = "merchantHouseNumber")] - MerchantHouseNumber = 86, - - /// - /// Enum MerchantReference for value: merchantReference - /// - [EnumMember(Value = "merchantReference")] - MerchantReference = 87, - - /// - /// Enum MicroDeposit for value: microDeposit - /// - [EnumMember(Value = "microDeposit")] - MicroDeposit = 88, - - /// - /// Enum Name for value: name - /// - [EnumMember(Value = "name")] - Name = 89, - - /// - /// Enum Nationality for value: nationality - /// - [EnumMember(Value = "nationality")] - Nationality = 90, - - /// - /// Enum OriginalReference for value: originalReference - /// - [EnumMember(Value = "originalReference")] - OriginalReference = 91, - - /// - /// Enum OwnerCity for value: ownerCity - /// - [EnumMember(Value = "ownerCity")] - OwnerCity = 92, - - /// - /// Enum OwnerCountryCode for value: ownerCountryCode - /// - [EnumMember(Value = "ownerCountryCode")] - OwnerCountryCode = 93, - - /// - /// Enum OwnerDateOfBirth for value: ownerDateOfBirth - /// - [EnumMember(Value = "ownerDateOfBirth")] - OwnerDateOfBirth = 94, - - /// - /// Enum OwnerHouseNumberOrName for value: ownerHouseNumberOrName - /// - [EnumMember(Value = "ownerHouseNumberOrName")] - OwnerHouseNumberOrName = 95, - - /// - /// Enum OwnerName for value: ownerName - /// - [EnumMember(Value = "ownerName")] - OwnerName = 96, - - /// - /// Enum OwnerPostalCode for value: ownerPostalCode - /// - [EnumMember(Value = "ownerPostalCode")] - OwnerPostalCode = 97, - - /// - /// Enum OwnerState for value: ownerState - /// - [EnumMember(Value = "ownerState")] - OwnerState = 98, - - /// - /// Enum OwnerStreet for value: ownerStreet - /// - [EnumMember(Value = "ownerStreet")] - OwnerStreet = 99, - - /// - /// Enum Passport for value: passport - /// - [EnumMember(Value = "passport")] - Passport = 100, - - /// - /// Enum PassportNumber for value: passportNumber - /// - [EnumMember(Value = "passportNumber")] - PassportNumber = 101, - - /// - /// Enum PayoutMethod for value: payoutMethod - /// - [EnumMember(Value = "payoutMethod")] - PayoutMethod = 102, - - /// - /// Enum PayoutMethodCode for value: payoutMethodCode - /// - [EnumMember(Value = "payoutMethodCode")] - PayoutMethodCode = 103, - - /// - /// Enum PayoutSchedule for value: payoutSchedule - /// - [EnumMember(Value = "payoutSchedule")] - PayoutSchedule = 104, - - /// - /// Enum PciSelfAssessment for value: pciSelfAssessment - /// - [EnumMember(Value = "pciSelfAssessment")] - PciSelfAssessment = 105, - - /// - /// Enum PersonalData for value: personalData - /// - [EnumMember(Value = "personalData")] - PersonalData = 106, - - /// - /// Enum PhoneCountryCode for value: phoneCountryCode - /// - [EnumMember(Value = "phoneCountryCode")] - PhoneCountryCode = 107, - - /// - /// Enum PhoneNumber for value: phoneNumber - /// - [EnumMember(Value = "phoneNumber")] - PhoneNumber = 108, - - /// - /// Enum PostalCode for value: postalCode - /// - [EnumMember(Value = "postalCode")] - PostalCode = 109, - - /// - /// Enum PrimaryCurrency for value: primaryCurrency - /// - [EnumMember(Value = "primaryCurrency")] - PrimaryCurrency = 110, - - /// - /// Enum Reason for value: reason - /// - [EnumMember(Value = "reason")] - Reason = 111, - - /// - /// Enum RegistrationNumber for value: registrationNumber - /// - [EnumMember(Value = "registrationNumber")] - RegistrationNumber = 112, - - /// - /// Enum ReturnUrl for value: returnUrl - /// - [EnumMember(Value = "returnUrl")] - ReturnUrl = 113, - - /// - /// Enum Schedule for value: schedule - /// - [EnumMember(Value = "schedule")] - Schedule = 114, - - /// - /// Enum Shareholder for value: shareholder - /// - [EnumMember(Value = "shareholder")] - Shareholder = 115, - - /// - /// Enum ShareholderCode for value: shareholderCode - /// - [EnumMember(Value = "shareholderCode")] - ShareholderCode = 116, - - /// - /// Enum ShareholderCodeAndSignatoryCode for value: shareholderCodeAndSignatoryCode - /// - [EnumMember(Value = "shareholderCodeAndSignatoryCode")] - ShareholderCodeAndSignatoryCode = 117, - - /// - /// Enum ShareholderCodeOrSignatoryCode for value: shareholderCodeOrSignatoryCode - /// - [EnumMember(Value = "shareholderCodeOrSignatoryCode")] - ShareholderCodeOrSignatoryCode = 118, - - /// - /// Enum ShareholderType for value: shareholderType - /// - [EnumMember(Value = "shareholderType")] - ShareholderType = 119, - - /// - /// Enum ShareholderTypes for value: shareholderTypes - /// - [EnumMember(Value = "shareholderTypes")] - ShareholderTypes = 120, - - /// - /// Enum ShopperInteraction for value: shopperInteraction - /// - [EnumMember(Value = "shopperInteraction")] - ShopperInteraction = 121, - - /// - /// Enum Signatory for value: signatory - /// - [EnumMember(Value = "signatory")] - Signatory = 122, - - /// - /// Enum SignatoryCode for value: signatoryCode - /// - [EnumMember(Value = "signatoryCode")] - SignatoryCode = 123, - - /// - /// Enum SocialSecurityNumber for value: socialSecurityNumber - /// - [EnumMember(Value = "socialSecurityNumber")] - SocialSecurityNumber = 124, - - /// - /// Enum SourceAccountCode for value: sourceAccountCode - /// - [EnumMember(Value = "sourceAccountCode")] - SourceAccountCode = 125, - - /// - /// Enum SplitAccount for value: splitAccount - /// - [EnumMember(Value = "splitAccount")] - SplitAccount = 126, - - /// - /// Enum SplitConfigurationUUID for value: splitConfigurationUUID - /// - [EnumMember(Value = "splitConfigurationUUID")] - SplitConfigurationUUID = 127, - - /// - /// Enum SplitCurrency for value: splitCurrency - /// - [EnumMember(Value = "splitCurrency")] - SplitCurrency = 128, - - /// - /// Enum SplitValue for value: splitValue - /// - [EnumMember(Value = "splitValue")] - SplitValue = 129, - - /// - /// Enum Splits for value: splits - /// - [EnumMember(Value = "splits")] - Splits = 130, - - /// - /// Enum StateOrProvince for value: stateOrProvince - /// - [EnumMember(Value = "stateOrProvince")] - StateOrProvince = 131, - - /// - /// Enum Status for value: status - /// - [EnumMember(Value = "status")] - Status = 132, - - /// - /// Enum StockExchange for value: stockExchange - /// - [EnumMember(Value = "stockExchange")] - StockExchange = 133, - - /// - /// Enum StockNumber for value: stockNumber - /// - [EnumMember(Value = "stockNumber")] - StockNumber = 134, - - /// - /// Enum StockTicker for value: stockTicker - /// - [EnumMember(Value = "stockTicker")] - StockTicker = 135, - - /// - /// Enum Store for value: store - /// - [EnumMember(Value = "store")] - Store = 136, - - /// - /// Enum StoreDetail for value: storeDetail - /// - [EnumMember(Value = "storeDetail")] - StoreDetail = 137, - - /// - /// Enum StoreName for value: storeName - /// - [EnumMember(Value = "storeName")] - StoreName = 138, - - /// - /// Enum StoreReference for value: storeReference - /// - [EnumMember(Value = "storeReference")] - StoreReference = 139, - - /// - /// Enum Street for value: street - /// - [EnumMember(Value = "street")] - Street = 140, - - /// - /// Enum TaxId for value: taxId - /// - [EnumMember(Value = "taxId")] - TaxId = 141, - - /// - /// Enum Tier for value: tier - /// - [EnumMember(Value = "tier")] - Tier = 142, - - /// - /// Enum TierNumber for value: tierNumber - /// - [EnumMember(Value = "tierNumber")] - TierNumber = 143, - - /// - /// Enum TransferCode for value: transferCode - /// - [EnumMember(Value = "transferCode")] - TransferCode = 144, - - /// - /// Enum UltimateParentCompany for value: ultimateParentCompany - /// - [EnumMember(Value = "ultimateParentCompany")] - UltimateParentCompany = 145, - - /// - /// Enum UltimateParentCompanyAddressDetails for value: ultimateParentCompanyAddressDetails - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetails")] - UltimateParentCompanyAddressDetails = 146, - - /// - /// Enum UltimateParentCompanyAddressDetailsCountry for value: ultimateParentCompanyAddressDetailsCountry - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetailsCountry")] - UltimateParentCompanyAddressDetailsCountry = 147, - - /// - /// Enum UltimateParentCompanyBusinessDetails for value: ultimateParentCompanyBusinessDetails - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetails")] - UltimateParentCompanyBusinessDetails = 148, - - /// - /// Enum UltimateParentCompanyBusinessDetailsLegalBusinessName for value: ultimateParentCompanyBusinessDetailsLegalBusinessName - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsLegalBusinessName")] - UltimateParentCompanyBusinessDetailsLegalBusinessName = 149, - - /// - /// Enum UltimateParentCompanyBusinessDetailsRegistrationNumber for value: ultimateParentCompanyBusinessDetailsRegistrationNumber - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsRegistrationNumber")] - UltimateParentCompanyBusinessDetailsRegistrationNumber = 150, - - /// - /// Enum UltimateParentCompanyCode for value: ultimateParentCompanyCode - /// - [EnumMember(Value = "ultimateParentCompanyCode")] - UltimateParentCompanyCode = 151, - - /// - /// Enum UltimateParentCompanyStockExchange for value: ultimateParentCompanyStockExchange - /// - [EnumMember(Value = "ultimateParentCompanyStockExchange")] - UltimateParentCompanyStockExchange = 152, - - /// - /// Enum UltimateParentCompanyStockNumber for value: ultimateParentCompanyStockNumber - /// - [EnumMember(Value = "ultimateParentCompanyStockNumber")] - UltimateParentCompanyStockNumber = 153, - - /// - /// Enum UltimateParentCompanyStockNumberOrStockTicker for value: ultimateParentCompanyStockNumberOrStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockNumberOrStockTicker")] - UltimateParentCompanyStockNumberOrStockTicker = 154, - - /// - /// Enum UltimateParentCompanyStockTicker for value: ultimateParentCompanyStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockTicker")] - UltimateParentCompanyStockTicker = 155, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 156, - - /// - /// Enum Value for value: value - /// - [EnumMember(Value = "value")] - Value = 157, - - /// - /// Enum VerificationType for value: verificationType - /// - [EnumMember(Value = "verificationType")] - VerificationType = 158, - - /// - /// Enum VirtualAccount for value: virtualAccount - /// - [EnumMember(Value = "virtualAccount")] - VirtualAccount = 159, - - /// - /// Enum VisaNumber for value: visaNumber - /// - [EnumMember(Value = "visaNumber")] - VisaNumber = 160, - - /// - /// Enum WebAddress for value: webAddress - /// - [EnumMember(Value = "webAddress")] - WebAddress = 161, - - /// - /// Enum Year for value: year - /// - [EnumMember(Value = "year")] - Year = 162 - - } - - - /// - /// The type of the field. - /// - /// The type of the field. - [DataMember(Name = "fieldName", EmitDefaultValue = false)] - public FieldNameEnum? FieldName { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The full name of the property.. - /// The type of the field.. - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.. - public FieldType(string field = default(string), FieldNameEnum? fieldName = default(FieldNameEnum?), string shareholderCode = default(string)) - { - this.Field = field; - this.FieldName = fieldName; - this.ShareholderCode = shareholderCode; - } - - /// - /// The full name of the property. - /// - /// The full name of the property. - [DataMember(Name = "field", EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FieldType {\n"); - sb.Append(" Field: ").Append(Field).Append("\n"); - sb.Append(" FieldName: ").Append(FieldName).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FieldType); - } - - /// - /// Returns true if FieldType instances are equal - /// - /// Instance of FieldType to be compared - /// Boolean - public bool Equals(FieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.FieldName == input.FieldName || - this.FieldName.Equals(input.FieldName) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FieldName.GetHashCode(); - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/GenericResponse.cs b/Adyen/Model/PlatformsAccount/GenericResponse.cs deleted file mode 100644 index 70aa719d2..000000000 --- a/Adyen/Model/PlatformsAccount/GenericResponse.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// GenericResponse - /// - [DataContract(Name = "GenericResponse")] - public partial class GenericResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public GenericResponse(List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GenericResponse {\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GenericResponse); - } - - /// - /// Returns true if GenericResponse instances are equal - /// - /// Instance of GenericResponse to be compared - /// Boolean - public bool Equals(GenericResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/GetAccountHolderRequest.cs b/Adyen/Model/PlatformsAccount/GetAccountHolderRequest.cs deleted file mode 100644 index 7b07bb74f..000000000 --- a/Adyen/Model/PlatformsAccount/GetAccountHolderRequest.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// GetAccountHolderRequest - /// - [DataContract(Name = "GetAccountHolderRequest")] - public partial class GetAccountHolderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the account of which to retrieve the details. > Required if no `accountHolderCode` is provided.. - /// The code of the account holder of which to retrieve the details. > Required if no `accountCode` is provided.. - /// True if the request should return the account holder details. - public GetAccountHolderRequest(string accountCode = default(string), string accountHolderCode = default(string), bool? showDetails = default(bool?)) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - this.ShowDetails = showDetails; - } - - /// - /// The code of the account of which to retrieve the details. > Required if no `accountHolderCode` is provided. - /// - /// The code of the account of which to retrieve the details. > Required if no `accountHolderCode` is provided. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the account holder of which to retrieve the details. > Required if no `accountCode` is provided. - /// - /// The code of the account holder of which to retrieve the details. > Required if no `accountCode` is provided. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// True if the request should return the account holder details - /// - /// True if the request should return the account holder details - [DataMember(Name = "showDetails", EmitDefaultValue = false)] - public bool? ShowDetails { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetAccountHolderRequest {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" ShowDetails: ").Append(ShowDetails).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetAccountHolderRequest); - } - - /// - /// Returns true if GetAccountHolderRequest instances are equal - /// - /// Instance of GetAccountHolderRequest to be compared - /// Boolean - public bool Equals(GetAccountHolderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.ShowDetails == input.ShowDetails || - this.ShowDetails.Equals(input.ShowDetails) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShowDetails.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/GetAccountHolderResponse.cs b/Adyen/Model/PlatformsAccount/GetAccountHolderResponse.cs deleted file mode 100644 index fe3e5c429..000000000 --- a/Adyen/Model/PlatformsAccount/GetAccountHolderResponse.cs +++ /dev/null @@ -1,409 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// GetAccountHolderResponse - /// - [DataContract(Name = "GetAccountHolderResponse")] - public partial class GetAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// The legal entity of the account holder. - /// - /// The legal entity of the account holder. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The legal entity of the account holder. - /// - /// The legal entity of the account holder. - [DataMember(Name = "legalEntity", EmitDefaultValue = false)] - public LegalEntityEnum? LegalEntity { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder.. - /// accountHolderDetails. - /// accountHolderStatus. - /// A list of the accounts under the account holder.. - /// The description of the account holder.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The legal entity of the account holder.. - /// migrationData. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// The time that shows how up to date is the information in the response.. - /// verification. - /// The identifier of the profile that applies to this entity.. - public GetAccountHolderResponse(string accountHolderCode = default(string), AccountHolderDetails accountHolderDetails = default(AccountHolderDetails), AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), List accounts = default(List), string description = default(string), List invalidFields = default(List), LegalEntityEnum? legalEntity = default(LegalEntityEnum?), MigrationData migrationData = default(MigrationData), string primaryCurrency = default(string), string pspReference = default(string), string resultCode = default(string), DateTime systemUpToDateTime = default(DateTime), KYCVerificationResult verification = default(KYCVerificationResult), string verificationProfile = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.AccountHolderDetails = accountHolderDetails; - this.AccountHolderStatus = accountHolderStatus; - this.Accounts = accounts; - this.Description = description; - this.InvalidFields = invalidFields; - this.LegalEntity = legalEntity; - this.MigrationData = migrationData; - this.PrimaryCurrency = primaryCurrency; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.SystemUpToDateTime = systemUpToDateTime; - this.Verification = verification; - this.VerificationProfile = verificationProfile; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets AccountHolderDetails - /// - [DataMember(Name = "accountHolderDetails", EmitDefaultValue = false)] - public AccountHolderDetails AccountHolderDetails { get; set; } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// A list of the accounts under the account holder. - /// - /// A list of the accounts under the account holder. - [DataMember(Name = "accounts", EmitDefaultValue = false)] - public List Accounts { get; set; } - - /// - /// The description of the account holder. - /// - /// The description of the account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// Gets or Sets MigrationData - /// - [DataMember(Name = "migrationData", EmitDefaultValue = false)] - public MigrationData MigrationData { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - [DataMember(Name = "primaryCurrency", EmitDefaultValue = false)] - public string PrimaryCurrency { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// The time that shows how up to date is the information in the response. - /// - /// The time that shows how up to date is the information in the response. - [DataMember(Name = "systemUpToDateTime", EmitDefaultValue = false)] - public DateTime SystemUpToDateTime { get; set; } - - /// - /// Gets or Sets Verification - /// - [DataMember(Name = "verification", EmitDefaultValue = false)] - public KYCVerificationResult Verification { get; set; } - - /// - /// The identifier of the profile that applies to this entity. - /// - /// The identifier of the profile that applies to this entity. - [DataMember(Name = "verificationProfile", EmitDefaultValue = false)] - public string VerificationProfile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetAccountHolderResponse {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountHolderDetails: ").Append(AccountHolderDetails).Append("\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" Accounts: ").Append(Accounts).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" LegalEntity: ").Append(LegalEntity).Append("\n"); - sb.Append(" MigrationData: ").Append(MigrationData).Append("\n"); - sb.Append(" PrimaryCurrency: ").Append(PrimaryCurrency).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" SystemUpToDateTime: ").Append(SystemUpToDateTime).Append("\n"); - sb.Append(" Verification: ").Append(Verification).Append("\n"); - sb.Append(" VerificationProfile: ").Append(VerificationProfile).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetAccountHolderResponse); - } - - /// - /// Returns true if GetAccountHolderResponse instances are equal - /// - /// Instance of GetAccountHolderResponse to be compared - /// Boolean - public bool Equals(GetAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountHolderDetails == input.AccountHolderDetails || - (this.AccountHolderDetails != null && - this.AccountHolderDetails.Equals(input.AccountHolderDetails)) - ) && - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.Accounts == input.Accounts || - this.Accounts != null && - input.Accounts != null && - this.Accounts.SequenceEqual(input.Accounts) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.LegalEntity == input.LegalEntity || - this.LegalEntity.Equals(input.LegalEntity) - ) && - ( - this.MigrationData == input.MigrationData || - (this.MigrationData != null && - this.MigrationData.Equals(input.MigrationData)) - ) && - ( - this.PrimaryCurrency == input.PrimaryCurrency || - (this.PrimaryCurrency != null && - this.PrimaryCurrency.Equals(input.PrimaryCurrency)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.SystemUpToDateTime == input.SystemUpToDateTime || - (this.SystemUpToDateTime != null && - this.SystemUpToDateTime.Equals(input.SystemUpToDateTime)) - ) && - ( - this.Verification == input.Verification || - (this.Verification != null && - this.Verification.Equals(input.Verification)) - ) && - ( - this.VerificationProfile == input.VerificationProfile || - (this.VerificationProfile != null && - this.VerificationProfile.Equals(input.VerificationProfile)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.AccountHolderDetails != null) - { - hashCode = (hashCode * 59) + this.AccountHolderDetails.GetHashCode(); - } - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.Accounts != null) - { - hashCode = (hashCode * 59) + this.Accounts.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntity.GetHashCode(); - if (this.MigrationData != null) - { - hashCode = (hashCode * 59) + this.MigrationData.GetHashCode(); - } - if (this.PrimaryCurrency != null) - { - hashCode = (hashCode * 59) + this.PrimaryCurrency.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - if (this.SystemUpToDateTime != null) - { - hashCode = (hashCode * 59) + this.SystemUpToDateTime.GetHashCode(); - } - if (this.Verification != null) - { - hashCode = (hashCode * 59) + this.Verification.GetHashCode(); - } - if (this.VerificationProfile != null) - { - hashCode = (hashCode * 59) + this.VerificationProfile.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/GetAccountHolderStatusResponse.cs b/Adyen/Model/PlatformsAccount/GetAccountHolderStatusResponse.cs deleted file mode 100644 index 2796a8227..000000000 --- a/Adyen/Model/PlatformsAccount/GetAccountHolderStatusResponse.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// GetAccountHolderStatusResponse - /// - [DataContract(Name = "GetAccountHolderStatusResponse")] - public partial class GetAccountHolderStatusResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account Holder.. - /// accountHolderStatus. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public GetAccountHolderStatusResponse(string accountHolderCode = default(string), AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.AccountHolderStatus = accountHolderStatus; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// The code of the Account Holder. - /// - /// The code of the Account Holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetAccountHolderStatusResponse {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetAccountHolderStatusResponse); - } - - /// - /// Returns true if GetAccountHolderStatusResponse instances are equal - /// - /// Instance of GetAccountHolderStatusResponse to be compared - /// Boolean - public bool Equals(GetAccountHolderStatusResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/GetTaxFormRequest.cs b/Adyen/Model/PlatformsAccount/GetTaxFormRequest.cs deleted file mode 100644 index a596dc08b..000000000 --- a/Adyen/Model/PlatformsAccount/GetTaxFormRequest.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// GetTaxFormRequest - /// - [DataContract(Name = "GetTaxFormRequest")] - public partial class GetTaxFormRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetTaxFormRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The account holder code you provided when you created the account holder. (required). - /// Type of the requested tax form. For example, 1099-K. (required). - /// Applicable tax year in the YYYY format. (required). - public GetTaxFormRequest(string accountHolderCode = default(string), string formType = default(string), int? year = default(int?)) - { - this.AccountHolderCode = accountHolderCode; - this.FormType = formType; - this.Year = year; - } - - /// - /// The account holder code you provided when you created the account holder. - /// - /// The account holder code you provided when you created the account holder. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Type of the requested tax form. For example, 1099-K. - /// - /// Type of the requested tax form. For example, 1099-K. - [DataMember(Name = "formType", IsRequired = false, EmitDefaultValue = false)] - public string FormType { get; set; } - - /// - /// Applicable tax year in the YYYY format. - /// - /// Applicable tax year in the YYYY format. - [DataMember(Name = "year", IsRequired = false, EmitDefaultValue = false)] - public int? Year { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTaxFormRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" FormType: ").Append(FormType).Append("\n"); - sb.Append(" Year: ").Append(Year).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTaxFormRequest); - } - - /// - /// Returns true if GetTaxFormRequest instances are equal - /// - /// Instance of GetTaxFormRequest to be compared - /// Boolean - public bool Equals(GetTaxFormRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.FormType == input.FormType || - (this.FormType != null && - this.FormType.Equals(input.FormType)) - ) && - ( - this.Year == input.Year || - this.Year.Equals(input.Year) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.FormType != null) - { - hashCode = (hashCode * 59) + this.FormType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Year.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/GetTaxFormResponse.cs b/Adyen/Model/PlatformsAccount/GetTaxFormResponse.cs deleted file mode 100644 index 29b3bde23..000000000 --- a/Adyen/Model/PlatformsAccount/GetTaxFormResponse.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// GetTaxFormResponse - /// - [DataContract(Name = "GetTaxFormResponse")] - public partial class GetTaxFormResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The content of the tax form in the Base64 binary format.. - /// The content type of the tax form.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public GetTaxFormResponse(byte[] content = default(byte[]), string contentType = default(string), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.Content = content; - this.ContentType = contentType; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// The content of the tax form in the Base64 binary format. - /// - /// The content of the tax form in the Base64 binary format. - [DataMember(Name = "content", EmitDefaultValue = false)] - public byte[] Content { get; set; } - - /// - /// The content type of the tax form. - /// - /// The content type of the tax form. - [DataMember(Name = "contentType", EmitDefaultValue = false)] - public string ContentType { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTaxFormResponse {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" ContentType: ").Append(ContentType).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTaxFormResponse); - } - - /// - /// Returns true if GetTaxFormResponse instances are equal - /// - /// Instance of GetTaxFormResponse to be compared - /// Boolean - public bool Equals(GetTaxFormResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.ContentType == input.ContentType || - (this.ContentType != null && - this.ContentType.Equals(input.ContentType)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.ContentType != null) - { - hashCode = (hashCode * 59) + this.ContentType.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/GetUploadedDocumentsRequest.cs b/Adyen/Model/PlatformsAccount/GetUploadedDocumentsRequest.cs deleted file mode 100644 index 2814450a2..000000000 --- a/Adyen/Model/PlatformsAccount/GetUploadedDocumentsRequest.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// GetUploadedDocumentsRequest - /// - [DataContract(Name = "GetUploadedDocumentsRequest")] - public partial class GetUploadedDocumentsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetUploadedDocumentsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account Holder for which to retrieve the documents. (required). - /// The code of the Bank Account for which to retrieve the documents.. - /// The code of the Shareholder for which to retrieve the documents.. - public GetUploadedDocumentsRequest(string accountHolderCode = default(string), string bankAccountUUID = default(string), string shareholderCode = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.BankAccountUUID = bankAccountUUID; - this.ShareholderCode = shareholderCode; - } - - /// - /// The code of the Account Holder for which to retrieve the documents. - /// - /// The code of the Account Holder for which to retrieve the documents. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The code of the Bank Account for which to retrieve the documents. - /// - /// The code of the Bank Account for which to retrieve the documents. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The code of the Shareholder for which to retrieve the documents. - /// - /// The code of the Shareholder for which to retrieve the documents. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetUploadedDocumentsRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetUploadedDocumentsRequest); - } - - /// - /// Returns true if GetUploadedDocumentsRequest instances are equal - /// - /// Instance of GetUploadedDocumentsRequest to be compared - /// Boolean - public bool Equals(GetUploadedDocumentsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/GetUploadedDocumentsResponse.cs b/Adyen/Model/PlatformsAccount/GetUploadedDocumentsResponse.cs deleted file mode 100644 index c1bcbfd5e..000000000 --- a/Adyen/Model/PlatformsAccount/GetUploadedDocumentsResponse.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// GetUploadedDocumentsResponse - /// - [DataContract(Name = "GetUploadedDocumentsResponse")] - public partial class GetUploadedDocumentsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the documents and their details.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public GetUploadedDocumentsResponse(List documentDetails = default(List), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.DocumentDetails = documentDetails; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// A list of the documents and their details. - /// - /// A list of the documents and their details. - [DataMember(Name = "documentDetails", EmitDefaultValue = false)] - public List DocumentDetails { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetUploadedDocumentsResponse {\n"); - sb.Append(" DocumentDetails: ").Append(DocumentDetails).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetUploadedDocumentsResponse); - } - - /// - /// Returns true if GetUploadedDocumentsResponse instances are equal - /// - /// Instance of GetUploadedDocumentsResponse to be compared - /// Boolean - public bool Equals(GetUploadedDocumentsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.DocumentDetails == input.DocumentDetails || - this.DocumentDetails != null && - input.DocumentDetails != null && - this.DocumentDetails.SequenceEqual(input.DocumentDetails) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DocumentDetails != null) - { - hashCode = (hashCode * 59) + this.DocumentDetails.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/IndividualDetails.cs b/Adyen/Model/PlatformsAccount/IndividualDetails.cs deleted file mode 100644 index 53502d87b..000000000 --- a/Adyen/Model/PlatformsAccount/IndividualDetails.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// IndividualDetails - /// - [DataContract(Name = "IndividualDetails")] - public partial class IndividualDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// personalData. - public IndividualDetails(ViasName name = default(ViasName), ViasPersonalData personalData = default(ViasPersonalData)) - { - this.Name = name; - this.PersonalData = personalData; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public ViasName Name { get; set; } - - /// - /// Gets or Sets PersonalData - /// - [DataMember(Name = "personalData", EmitDefaultValue = false)] - public ViasPersonalData PersonalData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IndividualDetails {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PersonalData: ").Append(PersonalData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IndividualDetails); - } - - /// - /// Returns true if IndividualDetails instances are equal - /// - /// Instance of IndividualDetails to be compared - /// Boolean - public bool Equals(IndividualDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PersonalData == input.PersonalData || - (this.PersonalData != null && - this.PersonalData.Equals(input.PersonalData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PersonalData != null) - { - hashCode = (hashCode * 59) + this.PersonalData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCCheckResult.cs b/Adyen/Model/PlatformsAccount/KYCCheckResult.cs deleted file mode 100644 index a5b28309c..000000000 --- a/Adyen/Model/PlatformsAccount/KYCCheckResult.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCCheckResult - /// - [DataContract(Name = "KYCCheckResult")] - public partial class KYCCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - public KYCCheckResult(List checks = default(List)) - { - this.Checks = checks; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCCheckResult); - } - - /// - /// Returns true if KYCCheckResult instances are equal - /// - /// Instance of KYCCheckResult to be compared - /// Boolean - public bool Equals(KYCCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCCheckStatusData.cs b/Adyen/Model/PlatformsAccount/KYCCheckStatusData.cs deleted file mode 100644 index a1c91d232..000000000 --- a/Adyen/Model/PlatformsAccount/KYCCheckStatusData.cs +++ /dev/null @@ -1,309 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCCheckStatusData - /// - [DataContract(Name = "KYCCheckStatusData")] - public partial class KYCCheckStatusData : IEquatable, IValidatableObject - { - /// - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. - /// - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum AWAITINGDATA for value: AWAITING_DATA - /// - [EnumMember(Value = "AWAITING_DATA")] - AWAITINGDATA = 1, - - /// - /// Enum DATAPROVIDED for value: DATA_PROVIDED - /// - [EnumMember(Value = "DATA_PROVIDED")] - DATAPROVIDED = 2, - - /// - /// Enum FAILED for value: FAILED - /// - [EnumMember(Value = "FAILED")] - FAILED = 3, - - /// - /// Enum INVALIDDATA for value: INVALID_DATA - /// - [EnumMember(Value = "INVALID_DATA")] - INVALIDDATA = 4, - - /// - /// Enum PASSED for value: PASSED - /// - [EnumMember(Value = "PASSED")] - PASSED = 5, - - /// - /// Enum PENDING for value: PENDING - /// - [EnumMember(Value = "PENDING")] - PENDING = 6, - - /// - /// Enum PENDINGREVIEW for value: PENDING_REVIEW - /// - [EnumMember(Value = "PENDING_REVIEW")] - PENDINGREVIEW = 7, - - /// - /// Enum RETRYLIMITREACHED for value: RETRY_LIMIT_REACHED - /// - [EnumMember(Value = "RETRY_LIMIT_REACHED")] - RETRYLIMITREACHED = 8, - - /// - /// Enum UNCHECKED for value: UNCHECKED - /// - [EnumMember(Value = "UNCHECKED")] - UNCHECKED = 9 - - } - - - /// - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. - /// - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** - /// - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BANKACCOUNTVERIFICATION for value: BANK_ACCOUNT_VERIFICATION - /// - [EnumMember(Value = "BANK_ACCOUNT_VERIFICATION")] - BANKACCOUNTVERIFICATION = 1, - - /// - /// Enum CARDVERIFICATION for value: CARD_VERIFICATION - /// - [EnumMember(Value = "CARD_VERIFICATION")] - CARDVERIFICATION = 2, - - /// - /// Enum COMPANYVERIFICATION for value: COMPANY_VERIFICATION - /// - [EnumMember(Value = "COMPANY_VERIFICATION")] - COMPANYVERIFICATION = 3, - - /// - /// Enum IDENTITYVERIFICATION for value: IDENTITY_VERIFICATION - /// - [EnumMember(Value = "IDENTITY_VERIFICATION")] - IDENTITYVERIFICATION = 4, - - /// - /// Enum LEGALARRANGEMENTVERIFICATION for value: LEGAL_ARRANGEMENT_VERIFICATION - /// - [EnumMember(Value = "LEGAL_ARRANGEMENT_VERIFICATION")] - LEGALARRANGEMENTVERIFICATION = 5, - - /// - /// Enum NONPROFITVERIFICATION for value: NONPROFIT_VERIFICATION - /// - [EnumMember(Value = "NONPROFIT_VERIFICATION")] - NONPROFITVERIFICATION = 6, - - /// - /// Enum PASSPORTVERIFICATION for value: PASSPORT_VERIFICATION - /// - [EnumMember(Value = "PASSPORT_VERIFICATION")] - PASSPORTVERIFICATION = 7, - - /// - /// Enum PAYOUTMETHODVERIFICATION for value: PAYOUT_METHOD_VERIFICATION - /// - [EnumMember(Value = "PAYOUT_METHOD_VERIFICATION")] - PAYOUTMETHODVERIFICATION = 8, - - /// - /// Enum PCIVERIFICATION for value: PCI_VERIFICATION - /// - [EnumMember(Value = "PCI_VERIFICATION")] - PCIVERIFICATION = 9 - - } - - - /// - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** - /// - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected KYCCheckStatusData() { } - /// - /// Initializes a new instance of the class. - /// - /// A list of the fields required for execution of the check.. - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. (required). - /// summary. - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** (required). - public KYCCheckStatusData(List requiredFields = default(List), StatusEnum status = default(StatusEnum), KYCCheckSummary summary = default(KYCCheckSummary), TypeEnum type = default(TypeEnum)) - { - this.Status = status; - this.Type = type; - this.RequiredFields = requiredFields; - this.Summary = summary; - } - - /// - /// A list of the fields required for execution of the check. - /// - /// A list of the fields required for execution of the check. - [DataMember(Name = "requiredFields", EmitDefaultValue = false)] - public List RequiredFields { get; set; } - - /// - /// Gets or Sets Summary - /// - [DataMember(Name = "summary", EmitDefaultValue = false)] - public KYCCheckSummary Summary { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCCheckStatusData {\n"); - sb.Append(" RequiredFields: ").Append(RequiredFields).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Summary: ").Append(Summary).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCCheckStatusData); - } - - /// - /// Returns true if KYCCheckStatusData instances are equal - /// - /// Instance of KYCCheckStatusData to be compared - /// Boolean - public bool Equals(KYCCheckStatusData input) - { - if (input == null) - { - return false; - } - return - ( - this.RequiredFields == input.RequiredFields || - this.RequiredFields != null && - input.RequiredFields != null && - this.RequiredFields.SequenceEqual(input.RequiredFields) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Summary == input.Summary || - (this.Summary != null && - this.Summary.Equals(input.Summary)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RequiredFields != null) - { - hashCode = (hashCode * 59) + this.RequiredFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Summary != null) - { - hashCode = (hashCode * 59) + this.Summary.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCCheckSummary.cs b/Adyen/Model/PlatformsAccount/KYCCheckSummary.cs deleted file mode 100644 index e6b25504a..000000000 --- a/Adyen/Model/PlatformsAccount/KYCCheckSummary.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCCheckSummary - /// - [DataContract(Name = "KYCCheckSummary")] - public partial class KYCCheckSummary : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes).. - /// A description of the check.. - public KYCCheckSummary(int? kycCheckCode = default(int?), string kycCheckDescription = default(string)) - { - this.KycCheckCode = kycCheckCode; - this.KycCheckDescription = kycCheckDescription; - } - - /// - /// The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes). - /// - /// The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes). - [DataMember(Name = "kycCheckCode", EmitDefaultValue = false)] - public int? KycCheckCode { get; set; } - - /// - /// A description of the check. - /// - /// A description of the check. - [DataMember(Name = "kycCheckDescription", EmitDefaultValue = false)] - public string KycCheckDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCCheckSummary {\n"); - sb.Append(" KycCheckCode: ").Append(KycCheckCode).Append("\n"); - sb.Append(" KycCheckDescription: ").Append(KycCheckDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCCheckSummary); - } - - /// - /// Returns true if KYCCheckSummary instances are equal - /// - /// Instance of KYCCheckSummary to be compared - /// Boolean - public bool Equals(KYCCheckSummary input) - { - if (input == null) - { - return false; - } - return - ( - this.KycCheckCode == input.KycCheckCode || - this.KycCheckCode.Equals(input.KycCheckCode) - ) && - ( - this.KycCheckDescription == input.KycCheckDescription || - (this.KycCheckDescription != null && - this.KycCheckDescription.Equals(input.KycCheckDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.KycCheckCode.GetHashCode(); - if (this.KycCheckDescription != null) - { - hashCode = (hashCode * 59) + this.KycCheckDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCLegalArrangementCheckResult.cs b/Adyen/Model/PlatformsAccount/KYCLegalArrangementCheckResult.cs deleted file mode 100644 index f712d4e9b..000000000 --- a/Adyen/Model/PlatformsAccount/KYCLegalArrangementCheckResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCLegalArrangementCheckResult - /// - [DataContract(Name = "KYCLegalArrangementCheckResult")] - public partial class KYCLegalArrangementCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The unique ID of the legal arrangement to which the check applies.. - public KYCLegalArrangementCheckResult(List checks = default(List), string legalArrangementCode = default(string)) - { - this.Checks = checks; - this.LegalArrangementCode = legalArrangementCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The unique ID of the legal arrangement to which the check applies. - /// - /// The unique ID of the legal arrangement to which the check applies. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCLegalArrangementCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCLegalArrangementCheckResult); - } - - /// - /// Returns true if KYCLegalArrangementCheckResult instances are equal - /// - /// Instance of KYCLegalArrangementCheckResult to be compared - /// Boolean - public bool Equals(KYCLegalArrangementCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCLegalArrangementEntityCheckResult.cs b/Adyen/Model/PlatformsAccount/KYCLegalArrangementEntityCheckResult.cs deleted file mode 100644 index 6b4568136..000000000 --- a/Adyen/Model/PlatformsAccount/KYCLegalArrangementEntityCheckResult.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCLegalArrangementEntityCheckResult - /// - [DataContract(Name = "KYCLegalArrangementEntityCheckResult")] - public partial class KYCLegalArrangementEntityCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The unique ID of the legal arrangement to which the entity belongs.. - /// The unique ID of the legal arrangement entity to which the check applies.. - public KYCLegalArrangementEntityCheckResult(List checks = default(List), string legalArrangementCode = default(string), string legalArrangementEntityCode = default(string)) - { - this.Checks = checks; - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntityCode = legalArrangementEntityCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The unique ID of the legal arrangement to which the entity belongs. - /// - /// The unique ID of the legal arrangement to which the entity belongs. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// The unique ID of the legal arrangement entity to which the check applies. - /// - /// The unique ID of the legal arrangement entity to which the check applies. - [DataMember(Name = "legalArrangementEntityCode", EmitDefaultValue = false)] - public string LegalArrangementEntityCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCLegalArrangementEntityCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntityCode: ").Append(LegalArrangementEntityCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCLegalArrangementEntityCheckResult); - } - - /// - /// Returns true if KYCLegalArrangementEntityCheckResult instances are equal - /// - /// Instance of KYCLegalArrangementEntityCheckResult to be compared - /// Boolean - public bool Equals(KYCLegalArrangementEntityCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntityCode == input.LegalArrangementEntityCode || - (this.LegalArrangementEntityCode != null && - this.LegalArrangementEntityCode.Equals(input.LegalArrangementEntityCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCPayoutMethodCheckResult.cs b/Adyen/Model/PlatformsAccount/KYCPayoutMethodCheckResult.cs deleted file mode 100644 index e5bb31c55..000000000 --- a/Adyen/Model/PlatformsAccount/KYCPayoutMethodCheckResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCPayoutMethodCheckResult - /// - [DataContract(Name = "KYCPayoutMethodCheckResult")] - public partial class KYCPayoutMethodCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The unique ID of the payoput method to which the check applies.. - public KYCPayoutMethodCheckResult(List checks = default(List), string payoutMethodCode = default(string)) - { - this.Checks = checks; - this.PayoutMethodCode = payoutMethodCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The unique ID of the payoput method to which the check applies. - /// - /// The unique ID of the payoput method to which the check applies. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCPayoutMethodCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCPayoutMethodCheckResult); - } - - /// - /// Returns true if KYCPayoutMethodCheckResult instances are equal - /// - /// Instance of KYCPayoutMethodCheckResult to be compared - /// Boolean - public bool Equals(KYCPayoutMethodCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCShareholderCheckResult.cs b/Adyen/Model/PlatformsAccount/KYCShareholderCheckResult.cs deleted file mode 100644 index a5a4ec9c9..000000000 --- a/Adyen/Model/PlatformsAccount/KYCShareholderCheckResult.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCShareholderCheckResult - /// - [DataContract(Name = "KYCShareholderCheckResult")] - public partial class KYCShareholderCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The unique ID of the legal arrangement to which the shareholder belongs, if applicable.. - /// The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable.. - /// The code of the shareholder to which the check applies.. - public KYCShareholderCheckResult(List checks = default(List), string legalArrangementCode = default(string), string legalArrangementEntityCode = default(string), string shareholderCode = default(string)) - { - this.Checks = checks; - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntityCode = legalArrangementEntityCode; - this.ShareholderCode = shareholderCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The unique ID of the legal arrangement to which the shareholder belongs, if applicable. - /// - /// The unique ID of the legal arrangement to which the shareholder belongs, if applicable. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable. - /// - /// The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable. - [DataMember(Name = "legalArrangementEntityCode", EmitDefaultValue = false)] - public string LegalArrangementEntityCode { get; set; } - - /// - /// The code of the shareholder to which the check applies. - /// - /// The code of the shareholder to which the check applies. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCShareholderCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntityCode: ").Append(LegalArrangementEntityCode).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCShareholderCheckResult); - } - - /// - /// Returns true if KYCShareholderCheckResult instances are equal - /// - /// Instance of KYCShareholderCheckResult to be compared - /// Boolean - public bool Equals(KYCShareholderCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntityCode == input.LegalArrangementEntityCode || - (this.LegalArrangementEntityCode != null && - this.LegalArrangementEntityCode.Equals(input.LegalArrangementEntityCode)) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCode.GetHashCode(); - } - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCSignatoryCheckResult.cs b/Adyen/Model/PlatformsAccount/KYCSignatoryCheckResult.cs deleted file mode 100644 index 59acc5359..000000000 --- a/Adyen/Model/PlatformsAccount/KYCSignatoryCheckResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCSignatoryCheckResult - /// - [DataContract(Name = "KYCSignatoryCheckResult")] - public partial class KYCSignatoryCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The code of the signatory to which the check applies.. - public KYCSignatoryCheckResult(List checks = default(List), string signatoryCode = default(string)) - { - this.Checks = checks; - this.SignatoryCode = signatoryCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The code of the signatory to which the check applies. - /// - /// The code of the signatory to which the check applies. - [DataMember(Name = "signatoryCode", EmitDefaultValue = false)] - public string SignatoryCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCSignatoryCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" SignatoryCode: ").Append(SignatoryCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCSignatoryCheckResult); - } - - /// - /// Returns true if KYCSignatoryCheckResult instances are equal - /// - /// Instance of KYCSignatoryCheckResult to be compared - /// Boolean - public bool Equals(KYCSignatoryCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.SignatoryCode == input.SignatoryCode || - (this.SignatoryCode != null && - this.SignatoryCode.Equals(input.SignatoryCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.SignatoryCode != null) - { - hashCode = (hashCode * 59) + this.SignatoryCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCUltimateParentCompanyCheckResult.cs b/Adyen/Model/PlatformsAccount/KYCUltimateParentCompanyCheckResult.cs deleted file mode 100644 index e3931fe26..000000000 --- a/Adyen/Model/PlatformsAccount/KYCUltimateParentCompanyCheckResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCUltimateParentCompanyCheckResult - /// - [DataContract(Name = "KYCUltimateParentCompanyCheckResult")] - public partial class KYCUltimateParentCompanyCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The code of the Ultimate Parent Company to which the check applies.. - public KYCUltimateParentCompanyCheckResult(List checks = default(List), string ultimateParentCompanyCode = default(string)) - { - this.Checks = checks; - this.UltimateParentCompanyCode = ultimateParentCompanyCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The code of the Ultimate Parent Company to which the check applies. - /// - /// The code of the Ultimate Parent Company to which the check applies. - [DataMember(Name = "ultimateParentCompanyCode", EmitDefaultValue = false)] - public string UltimateParentCompanyCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCUltimateParentCompanyCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" UltimateParentCompanyCode: ").Append(UltimateParentCompanyCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCUltimateParentCompanyCheckResult); - } - - /// - /// Returns true if KYCUltimateParentCompanyCheckResult instances are equal - /// - /// Instance of KYCUltimateParentCompanyCheckResult to be compared - /// Boolean - public bool Equals(KYCUltimateParentCompanyCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.UltimateParentCompanyCode == input.UltimateParentCompanyCode || - (this.UltimateParentCompanyCode != null && - this.UltimateParentCompanyCode.Equals(input.UltimateParentCompanyCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.UltimateParentCompanyCode != null) - { - hashCode = (hashCode * 59) + this.UltimateParentCompanyCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/KYCVerificationResult.cs b/Adyen/Model/PlatformsAccount/KYCVerificationResult.cs deleted file mode 100644 index e5de09e9c..000000000 --- a/Adyen/Model/PlatformsAccount/KYCVerificationResult.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// KYCVerificationResult - /// - [DataContract(Name = "KYCVerificationResult")] - public partial class KYCVerificationResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountHolder. - /// The results of the checks on the legal arrangements.. - /// The results of the checks on the legal arrangement entities.. - /// The results of the checks on the payout methods.. - /// The results of the checks on the shareholders.. - /// The results of the checks on the signatories.. - /// The result of the check on the Ultimate Parent Company.. - public KYCVerificationResult(KYCCheckResult accountHolder = default(KYCCheckResult), List legalArrangements = default(List), List legalArrangementsEntities = default(List), List payoutMethods = default(List), List shareholders = default(List), List signatories = default(List), List ultimateParentCompany = default(List)) - { - this.AccountHolder = accountHolder; - this.LegalArrangements = legalArrangements; - this.LegalArrangementsEntities = legalArrangementsEntities; - this.PayoutMethods = payoutMethods; - this.Shareholders = shareholders; - this.Signatories = signatories; - this.UltimateParentCompany = ultimateParentCompany; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", EmitDefaultValue = false)] - public KYCCheckResult AccountHolder { get; set; } - - /// - /// The results of the checks on the legal arrangements. - /// - /// The results of the checks on the legal arrangements. - [DataMember(Name = "legalArrangements", EmitDefaultValue = false)] - public List LegalArrangements { get; set; } - - /// - /// The results of the checks on the legal arrangement entities. - /// - /// The results of the checks on the legal arrangement entities. - [DataMember(Name = "legalArrangementsEntities", EmitDefaultValue = false)] - public List LegalArrangementsEntities { get; set; } - - /// - /// The results of the checks on the payout methods. - /// - /// The results of the checks on the payout methods. - [DataMember(Name = "payoutMethods", EmitDefaultValue = false)] - public List PayoutMethods { get; set; } - - /// - /// The results of the checks on the shareholders. - /// - /// The results of the checks on the shareholders. - [DataMember(Name = "shareholders", EmitDefaultValue = false)] - public List Shareholders { get; set; } - - /// - /// The results of the checks on the signatories. - /// - /// The results of the checks on the signatories. - [DataMember(Name = "signatories", EmitDefaultValue = false)] - public List Signatories { get; set; } - - /// - /// The result of the check on the Ultimate Parent Company. - /// - /// The result of the check on the Ultimate Parent Company. - [DataMember(Name = "ultimateParentCompany", EmitDefaultValue = false)] - public List UltimateParentCompany { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCVerificationResult {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" LegalArrangements: ").Append(LegalArrangements).Append("\n"); - sb.Append(" LegalArrangementsEntities: ").Append(LegalArrangementsEntities).Append("\n"); - sb.Append(" PayoutMethods: ").Append(PayoutMethods).Append("\n"); - sb.Append(" Shareholders: ").Append(Shareholders).Append("\n"); - sb.Append(" Signatories: ").Append(Signatories).Append("\n"); - sb.Append(" UltimateParentCompany: ").Append(UltimateParentCompany).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCVerificationResult); - } - - /// - /// Returns true if KYCVerificationResult instances are equal - /// - /// Instance of KYCVerificationResult to be compared - /// Boolean - public bool Equals(KYCVerificationResult input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.LegalArrangements == input.LegalArrangements || - this.LegalArrangements != null && - input.LegalArrangements != null && - this.LegalArrangements.SequenceEqual(input.LegalArrangements) - ) && - ( - this.LegalArrangementsEntities == input.LegalArrangementsEntities || - this.LegalArrangementsEntities != null && - input.LegalArrangementsEntities != null && - this.LegalArrangementsEntities.SequenceEqual(input.LegalArrangementsEntities) - ) && - ( - this.PayoutMethods == input.PayoutMethods || - this.PayoutMethods != null && - input.PayoutMethods != null && - this.PayoutMethods.SequenceEqual(input.PayoutMethods) - ) && - ( - this.Shareholders == input.Shareholders || - this.Shareholders != null && - input.Shareholders != null && - this.Shareholders.SequenceEqual(input.Shareholders) - ) && - ( - this.Signatories == input.Signatories || - this.Signatories != null && - input.Signatories != null && - this.Signatories.SequenceEqual(input.Signatories) - ) && - ( - this.UltimateParentCompany == input.UltimateParentCompany || - this.UltimateParentCompany != null && - input.UltimateParentCompany != null && - this.UltimateParentCompany.SequenceEqual(input.UltimateParentCompany) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.LegalArrangements != null) - { - hashCode = (hashCode * 59) + this.LegalArrangements.GetHashCode(); - } - if (this.LegalArrangementsEntities != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementsEntities.GetHashCode(); - } - if (this.PayoutMethods != null) - { - hashCode = (hashCode * 59) + this.PayoutMethods.GetHashCode(); - } - if (this.Shareholders != null) - { - hashCode = (hashCode * 59) + this.Shareholders.GetHashCode(); - } - if (this.Signatories != null) - { - hashCode = (hashCode * 59) + this.Signatories.GetHashCode(); - } - if (this.UltimateParentCompany != null) - { - hashCode = (hashCode * 59) + this.UltimateParentCompany.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/LegalArrangementDetail.cs b/Adyen/Model/PlatformsAccount/LegalArrangementDetail.cs deleted file mode 100644 index b7b8797b2..000000000 --- a/Adyen/Model/PlatformsAccount/LegalArrangementDetail.cs +++ /dev/null @@ -1,428 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// LegalArrangementDetail - /// - [DataContract(Name = "LegalArrangementDetail")] - public partial class LegalArrangementDetail : IEquatable, IValidatableObject - { - /// - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** - /// - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalFormEnum - { - /// - /// Enum CashManagementTrust for value: CashManagementTrust - /// - [EnumMember(Value = "CashManagementTrust")] - CashManagementTrust = 1, - - /// - /// Enum CorporateUnitTrust for value: CorporateUnitTrust - /// - [EnumMember(Value = "CorporateUnitTrust")] - CorporateUnitTrust = 2, - - /// - /// Enum DeceasedEstate for value: DeceasedEstate - /// - [EnumMember(Value = "DeceasedEstate")] - DeceasedEstate = 3, - - /// - /// Enum DiscretionaryInvestmentTrust for value: DiscretionaryInvestmentTrust - /// - [EnumMember(Value = "DiscretionaryInvestmentTrust")] - DiscretionaryInvestmentTrust = 4, - - /// - /// Enum DiscretionaryServicesManagementTrust for value: DiscretionaryServicesManagementTrust - /// - [EnumMember(Value = "DiscretionaryServicesManagementTrust")] - DiscretionaryServicesManagementTrust = 5, - - /// - /// Enum DiscretionaryTradingTrust for value: DiscretionaryTradingTrust - /// - [EnumMember(Value = "DiscretionaryTradingTrust")] - DiscretionaryTradingTrust = 6, - - /// - /// Enum FirstHomeSaverAccountsTrust for value: FirstHomeSaverAccountsTrust - /// - [EnumMember(Value = "FirstHomeSaverAccountsTrust")] - FirstHomeSaverAccountsTrust = 7, - - /// - /// Enum FixedTrust for value: FixedTrust - /// - [EnumMember(Value = "FixedTrust")] - FixedTrust = 8, - - /// - /// Enum FixedUnitTrust for value: FixedUnitTrust - /// - [EnumMember(Value = "FixedUnitTrust")] - FixedUnitTrust = 9, - - /// - /// Enum HybridTrust for value: HybridTrust - /// - [EnumMember(Value = "HybridTrust")] - HybridTrust = 10, - - /// - /// Enum ListedPublicUnitTrust for value: ListedPublicUnitTrust - /// - [EnumMember(Value = "ListedPublicUnitTrust")] - ListedPublicUnitTrust = 11, - - /// - /// Enum OtherTrust for value: OtherTrust - /// - [EnumMember(Value = "OtherTrust")] - OtherTrust = 12, - - /// - /// Enum PooledSuperannuationTrust for value: PooledSuperannuationTrust - /// - [EnumMember(Value = "PooledSuperannuationTrust")] - PooledSuperannuationTrust = 13, - - /// - /// Enum PublicTradingTrust for value: PublicTradingTrust - /// - [EnumMember(Value = "PublicTradingTrust")] - PublicTradingTrust = 14, - - /// - /// Enum UnlistedPublicUnitTrust for value: UnlistedPublicUnitTrust - /// - [EnumMember(Value = "UnlistedPublicUnitTrust")] - UnlistedPublicUnitTrust = 15, - - /// - /// Enum LimitedPartnership for value: LimitedPartnership - /// - [EnumMember(Value = "LimitedPartnership")] - LimitedPartnership = 16, - - /// - /// Enum FamilyPartnership for value: FamilyPartnership - /// - [EnumMember(Value = "FamilyPartnership")] - FamilyPartnership = 17, - - /// - /// Enum OtherPartnership for value: OtherPartnership - /// - [EnumMember(Value = "OtherPartnership")] - OtherPartnership = 18 - - } - - - /// - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** - /// - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** - [DataMember(Name = "legalForm", EmitDefaultValue = false)] - public LegalFormEnum? LegalForm { get; set; } - /// - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** - /// - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Association for value: Association - /// - [EnumMember(Value = "Association")] - Association = 1, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 2, - - /// - /// Enum SoleProprietorship for value: SoleProprietorship - /// - [EnumMember(Value = "SoleProprietorship")] - SoleProprietorship = 3, - - /// - /// Enum Trust for value: Trust - /// - [EnumMember(Value = "Trust")] - Trust = 4 - - } - - - /// - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** - /// - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected LegalArrangementDetail() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail.. - /// An array containing information about other entities that are part of the legal arrangement.. - /// Your reference for the legal arrangement. Must be between 3 to 128 characters.. - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership**. - /// The legal name of the legal arrangement. Minimum length: 3 characters. (required). - /// The registration number of the legal arrangement.. - /// The tax identification number of the legal arrangement.. - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** (required). - public LegalArrangementDetail(ViasAddress address = default(ViasAddress), string legalArrangementCode = default(string), List legalArrangementEntities = default(List), string legalArrangementReference = default(string), LegalFormEnum? legalForm = default(LegalFormEnum?), string name = default(string), string registrationNumber = default(string), string taxNumber = default(string), TypeEnum type = default(TypeEnum)) - { - this.Address = address; - this.Name = name; - this.Type = type; - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntities = legalArrangementEntities; - this.LegalArrangementReference = legalArrangementReference; - this.LegalForm = legalForm; - this.RegistrationNumber = registrationNumber; - this.TaxNumber = taxNumber; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// An array containing information about other entities that are part of the legal arrangement. - /// - /// An array containing information about other entities that are part of the legal arrangement. - [DataMember(Name = "legalArrangementEntities", EmitDefaultValue = false)] - public List LegalArrangementEntities { get; set; } - - /// - /// Your reference for the legal arrangement. Must be between 3 to 128 characters. - /// - /// Your reference for the legal arrangement. Must be between 3 to 128 characters. - [DataMember(Name = "legalArrangementReference", EmitDefaultValue = false)] - public string LegalArrangementReference { get; set; } - - /// - /// The legal name of the legal arrangement. Minimum length: 3 characters. - /// - /// The legal name of the legal arrangement. Minimum length: 3 characters. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The registration number of the legal arrangement. - /// - /// The registration number of the legal arrangement. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// The tax identification number of the legal arrangement. - /// - /// The tax identification number of the legal arrangement. - [DataMember(Name = "taxNumber", EmitDefaultValue = false)] - public string TaxNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalArrangementDetail {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntities: ").Append(LegalArrangementEntities).Append("\n"); - sb.Append(" LegalArrangementReference: ").Append(LegalArrangementReference).Append("\n"); - sb.Append(" LegalForm: ").Append(LegalForm).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" TaxNumber: ").Append(TaxNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalArrangementDetail); - } - - /// - /// Returns true if LegalArrangementDetail instances are equal - /// - /// Instance of LegalArrangementDetail to be compared - /// Boolean - public bool Equals(LegalArrangementDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntities == input.LegalArrangementEntities || - this.LegalArrangementEntities != null && - input.LegalArrangementEntities != null && - this.LegalArrangementEntities.SequenceEqual(input.LegalArrangementEntities) - ) && - ( - this.LegalArrangementReference == input.LegalArrangementReference || - (this.LegalArrangementReference != null && - this.LegalArrangementReference.Equals(input.LegalArrangementReference)) - ) && - ( - this.LegalForm == input.LegalForm || - this.LegalForm.Equals(input.LegalForm) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.TaxNumber == input.TaxNumber || - (this.TaxNumber != null && - this.TaxNumber.Equals(input.TaxNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntities != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntities.GetHashCode(); - } - if (this.LegalArrangementReference != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalForm.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.TaxNumber != null) - { - hashCode = (hashCode * 59) + this.TaxNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/LegalArrangementEntityDetail.cs b/Adyen/Model/PlatformsAccount/LegalArrangementEntityDetail.cs deleted file mode 100644 index 5637220d9..000000000 --- a/Adyen/Model/PlatformsAccount/LegalArrangementEntityDetail.cs +++ /dev/null @@ -1,401 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// LegalArrangementEntityDetail - /// - [DataContract(Name = "LegalArrangementEntityDetail")] - public partial class LegalArrangementEntityDetail : IEquatable, IValidatableObject - { - /// - /// Defines LegalArrangementMembers - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalArrangementMembersEnum - { - /// - /// Enum Beneficiary for value: Beneficiary - /// - [EnumMember(Value = "Beneficiary")] - Beneficiary = 1, - - /// - /// Enum ControllingPerson for value: ControllingPerson - /// - [EnumMember(Value = "ControllingPerson")] - ControllingPerson = 2, - - /// - /// Enum Partner for value: Partner - /// - [EnumMember(Value = "Partner")] - Partner = 3, - - /// - /// Enum Protector for value: Protector - /// - [EnumMember(Value = "Protector")] - Protector = 4, - - /// - /// Enum Settlor for value: Settlor - /// - [EnumMember(Value = "Settlor")] - Settlor = 5, - - /// - /// Enum Shareholder for value: Shareholder - /// - [EnumMember(Value = "Shareholder")] - Shareholder = 6, - - /// - /// Enum Trustee for value: Trustee - /// - [EnumMember(Value = "Trustee")] - Trustee = 7 - - } - - /// - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. - /// - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityTypeEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. - /// - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. - [DataMember(Name = "legalEntityType", EmitDefaultValue = false)] - public LegalEntityTypeEnum? LegalEntityType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// businessDetails. - /// The e-mail address of the entity.. - /// The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// individualDetails. - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail.. - /// Your reference for the legal arrangement entity.. - /// An array containing the roles of the entity in the legal arrangement. The possible values depend on the legal arrangement `type`. - For `type` **Association**: **ControllingPerson** and **Shareholder**. - For `type` **Partnership**: **Partner** and **Shareholder**. - For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**. . - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. . - /// phoneNumber. - /// The URL of the website of the contact.. - public LegalArrangementEntityDetail(ViasAddress address = default(ViasAddress), BusinessDetails businessDetails = default(BusinessDetails), string email = default(string), string fullPhoneNumber = default(string), IndividualDetails individualDetails = default(IndividualDetails), string legalArrangementEntityCode = default(string), string legalArrangementEntityReference = default(string), List legalArrangementMembers = default(List), LegalEntityTypeEnum? legalEntityType = default(LegalEntityTypeEnum?), ViasPhoneNumber phoneNumber = default(ViasPhoneNumber), string webAddress = default(string)) - { - this.Address = address; - this.BusinessDetails = businessDetails; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.IndividualDetails = individualDetails; - this.LegalArrangementEntityCode = legalArrangementEntityCode; - this.LegalArrangementEntityReference = legalArrangementEntityReference; - this.LegalArrangementMembers = legalArrangementMembers; - this.LegalEntityType = legalEntityType; - this.PhoneNumber = phoneNumber; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// Gets or Sets BusinessDetails - /// - [DataMember(Name = "businessDetails", EmitDefaultValue = false)] - public BusinessDetails BusinessDetails { get; set; } - - /// - /// The e-mail address of the entity. - /// - /// The e-mail address of the entity. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Gets or Sets IndividualDetails - /// - [DataMember(Name = "individualDetails", EmitDefaultValue = false)] - public IndividualDetails IndividualDetails { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. - [DataMember(Name = "legalArrangementEntityCode", EmitDefaultValue = false)] - public string LegalArrangementEntityCode { get; set; } - - /// - /// Your reference for the legal arrangement entity. - /// - /// Your reference for the legal arrangement entity. - [DataMember(Name = "legalArrangementEntityReference", EmitDefaultValue = false)] - public string LegalArrangementEntityReference { get; set; } - - /// - /// An array containing the roles of the entity in the legal arrangement. The possible values depend on the legal arrangement `type`. - For `type` **Association**: **ControllingPerson** and **Shareholder**. - For `type` **Partnership**: **Partner** and **Shareholder**. - For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**. - /// - /// An array containing the roles of the entity in the legal arrangement. The possible values depend on the legal arrangement `type`. - For `type` **Association**: **ControllingPerson** and **Shareholder**. - For `type` **Partnership**: **Partner** and **Shareholder**. - For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**. - [DataMember(Name = "legalArrangementMembers", EmitDefaultValue = false)] - public List LegalArrangementMembers { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public ViasPhoneNumber PhoneNumber { get; set; } - - /// - /// The URL of the website of the contact. - /// - /// The URL of the website of the contact. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalArrangementEntityDetail {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BusinessDetails: ").Append(BusinessDetails).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" IndividualDetails: ").Append(IndividualDetails).Append("\n"); - sb.Append(" LegalArrangementEntityCode: ").Append(LegalArrangementEntityCode).Append("\n"); - sb.Append(" LegalArrangementEntityReference: ").Append(LegalArrangementEntityReference).Append("\n"); - sb.Append(" LegalArrangementMembers: ").Append(LegalArrangementMembers).Append("\n"); - sb.Append(" LegalEntityType: ").Append(LegalEntityType).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalArrangementEntityDetail); - } - - /// - /// Returns true if LegalArrangementEntityDetail instances are equal - /// - /// Instance of LegalArrangementEntityDetail to be compared - /// Boolean - public bool Equals(LegalArrangementEntityDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BusinessDetails == input.BusinessDetails || - (this.BusinessDetails != null && - this.BusinessDetails.Equals(input.BusinessDetails)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.IndividualDetails == input.IndividualDetails || - (this.IndividualDetails != null && - this.IndividualDetails.Equals(input.IndividualDetails)) - ) && - ( - this.LegalArrangementEntityCode == input.LegalArrangementEntityCode || - (this.LegalArrangementEntityCode != null && - this.LegalArrangementEntityCode.Equals(input.LegalArrangementEntityCode)) - ) && - ( - this.LegalArrangementEntityReference == input.LegalArrangementEntityReference || - (this.LegalArrangementEntityReference != null && - this.LegalArrangementEntityReference.Equals(input.LegalArrangementEntityReference)) - ) && - ( - this.LegalArrangementMembers == input.LegalArrangementMembers || - this.LegalArrangementMembers != null && - input.LegalArrangementMembers != null && - this.LegalArrangementMembers.SequenceEqual(input.LegalArrangementMembers) - ) && - ( - this.LegalEntityType == input.LegalEntityType || - this.LegalEntityType.Equals(input.LegalEntityType) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BusinessDetails != null) - { - hashCode = (hashCode * 59) + this.BusinessDetails.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.IndividualDetails != null) - { - hashCode = (hashCode * 59) + this.IndividualDetails.GetHashCode(); - } - if (this.LegalArrangementEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCode.GetHashCode(); - } - if (this.LegalArrangementEntityReference != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityReference.GetHashCode(); - } - if (this.LegalArrangementMembers != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementMembers.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntityType.GetHashCode(); - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/LegalArrangementRequest.cs b/Adyen/Model/PlatformsAccount/LegalArrangementRequest.cs deleted file mode 100644 index 9cb3b7fda..000000000 --- a/Adyen/Model/PlatformsAccount/LegalArrangementRequest.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// LegalArrangementRequest - /// - [DataContract(Name = "LegalArrangementRequest")] - public partial class LegalArrangementRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected LegalArrangementRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the legal arrangement to be deleted. If you also send `legalArrangementEntityCodes`, only the entities listed will be deleted. (required). - /// List of legal arrangement entities to be deleted.. - public LegalArrangementRequest(string legalArrangementCode = default(string), List legalArrangementEntityCodes = default(List)) - { - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntityCodes = legalArrangementEntityCodes; - } - - /// - /// The code of the legal arrangement to be deleted. If you also send `legalArrangementEntityCodes`, only the entities listed will be deleted. - /// - /// The code of the legal arrangement to be deleted. If you also send `legalArrangementEntityCodes`, only the entities listed will be deleted. - [DataMember(Name = "legalArrangementCode", IsRequired = false, EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// List of legal arrangement entities to be deleted. - /// - /// List of legal arrangement entities to be deleted. - [DataMember(Name = "legalArrangementEntityCodes", EmitDefaultValue = false)] - public List LegalArrangementEntityCodes { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalArrangementRequest {\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntityCodes: ").Append(LegalArrangementEntityCodes).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalArrangementRequest); - } - - /// - /// Returns true if LegalArrangementRequest instances are equal - /// - /// Instance of LegalArrangementRequest to be compared - /// Boolean - public bool Equals(LegalArrangementRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntityCodes == input.LegalArrangementEntityCodes || - this.LegalArrangementEntityCodes != null && - input.LegalArrangementEntityCodes != null && - this.LegalArrangementEntityCodes.SequenceEqual(input.LegalArrangementEntityCodes) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntityCodes != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCodes.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/MigratedAccounts.cs b/Adyen/Model/PlatformsAccount/MigratedAccounts.cs deleted file mode 100644 index c44861736..000000000 --- a/Adyen/Model/PlatformsAccount/MigratedAccounts.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// MigratedAccounts - /// - [DataContract(Name = "MigratedAccounts")] - public partial class MigratedAccounts : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the account of the migrated account holder in the balance platform.. - /// The unique identifier of the account of the migrated account holder in the classic integration.. - public MigratedAccounts(string balanceAccountId = default(string), string virtualAccountCode = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.VirtualAccountCode = virtualAccountCode; - } - - /// - /// The unique identifier of the account of the migrated account holder in the balance platform. - /// - /// The unique identifier of the account of the migrated account holder in the balance platform. - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - /// - /// The unique identifier of the account of the migrated account holder in the classic integration. - [DataMember(Name = "virtualAccountCode", EmitDefaultValue = false)] - public string VirtualAccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MigratedAccounts {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" VirtualAccountCode: ").Append(VirtualAccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MigratedAccounts); - } - - /// - /// Returns true if MigratedAccounts instances are equal - /// - /// Instance of MigratedAccounts to be compared - /// Boolean - public bool Equals(MigratedAccounts input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.VirtualAccountCode == input.VirtualAccountCode || - (this.VirtualAccountCode != null && - this.VirtualAccountCode.Equals(input.VirtualAccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.VirtualAccountCode != null) - { - hashCode = (hashCode * 59) + this.VirtualAccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/MigratedShareholders.cs b/Adyen/Model/PlatformsAccount/MigratedShareholders.cs deleted file mode 100644 index 30e8376ae..000000000 --- a/Adyen/Model/PlatformsAccount/MigratedShareholders.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// MigratedShareholders - /// - [DataContract(Name = "MigratedShareholders")] - public partial class MigratedShareholders : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the legal entity of that shareholder in the balance platform.. - /// The unique identifier of the account of the migrated shareholder in the classic integration.. - public MigratedShareholders(string legalEntityCode = default(string), string shareholderCode = default(string)) - { - this.LegalEntityCode = legalEntityCode; - this.ShareholderCode = shareholderCode; - } - - /// - /// The unique identifier of the legal entity of that shareholder in the balance platform. - /// - /// The unique identifier of the legal entity of that shareholder in the balance platform. - [DataMember(Name = "legalEntityCode", EmitDefaultValue = false)] - public string LegalEntityCode { get; set; } - - /// - /// The unique identifier of the account of the migrated shareholder in the classic integration. - /// - /// The unique identifier of the account of the migrated shareholder in the classic integration. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MigratedShareholders {\n"); - sb.Append(" LegalEntityCode: ").Append(LegalEntityCode).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MigratedShareholders); - } - - /// - /// Returns true if MigratedShareholders instances are equal - /// - /// Instance of MigratedShareholders to be compared - /// Boolean - public bool Equals(MigratedShareholders input) - { - if (input == null) - { - return false; - } - return - ( - this.LegalEntityCode == input.LegalEntityCode || - (this.LegalEntityCode != null && - this.LegalEntityCode.Equals(input.LegalEntityCode)) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LegalEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalEntityCode.GetHashCode(); - } - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/MigratedStores.cs b/Adyen/Model/PlatformsAccount/MigratedStores.cs deleted file mode 100644 index 668301659..000000000 --- a/Adyen/Model/PlatformsAccount/MigratedStores.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// MigratedStores - /// - [DataContract(Name = "MigratedStores")] - public partial class MigratedStores : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the business line associated with the migrated account holder in the balance platform.. - /// The unique identifier of the store associated with the migrated account holder in the classic integration.. - /// The unique identifier of the store associated with the migrated account holder in the balance platform.. - /// Your reference for the store in the classic integration. The [Customer Area](https://ca-test.adyen.com/) uses this value for the store description.. - public MigratedStores(string businessLineId = default(string), string storeCode = default(string), string storeId = default(string), string storeReference = default(string)) - { - this.BusinessLineId = businessLineId; - this.StoreCode = storeCode; - this.StoreId = storeId; - this.StoreReference = storeReference; - } - - /// - /// The unique identifier of the business line associated with the migrated account holder in the balance platform. - /// - /// The unique identifier of the business line associated with the migrated account holder in the balance platform. - [DataMember(Name = "businessLineId", EmitDefaultValue = false)] - public string BusinessLineId { get; set; } - - /// - /// The unique identifier of the store associated with the migrated account holder in the classic integration. - /// - /// The unique identifier of the store associated with the migrated account holder in the classic integration. - [DataMember(Name = "storeCode", EmitDefaultValue = false)] - public string StoreCode { get; set; } - - /// - /// The unique identifier of the store associated with the migrated account holder in the balance platform. - /// - /// The unique identifier of the store associated with the migrated account holder in the balance platform. - [DataMember(Name = "storeId", EmitDefaultValue = false)] - public string StoreId { get; set; } - - /// - /// Your reference for the store in the classic integration. The [Customer Area](https://ca-test.adyen.com/) uses this value for the store description. - /// - /// Your reference for the store in the classic integration. The [Customer Area](https://ca-test.adyen.com/) uses this value for the store description. - [DataMember(Name = "storeReference", EmitDefaultValue = false)] - public string StoreReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MigratedStores {\n"); - sb.Append(" BusinessLineId: ").Append(BusinessLineId).Append("\n"); - sb.Append(" StoreCode: ").Append(StoreCode).Append("\n"); - sb.Append(" StoreId: ").Append(StoreId).Append("\n"); - sb.Append(" StoreReference: ").Append(StoreReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MigratedStores); - } - - /// - /// Returns true if MigratedStores instances are equal - /// - /// Instance of MigratedStores to be compared - /// Boolean - public bool Equals(MigratedStores input) - { - if (input == null) - { - return false; - } - return - ( - this.BusinessLineId == input.BusinessLineId || - (this.BusinessLineId != null && - this.BusinessLineId.Equals(input.BusinessLineId)) - ) && - ( - this.StoreCode == input.StoreCode || - (this.StoreCode != null && - this.StoreCode.Equals(input.StoreCode)) - ) && - ( - this.StoreId == input.StoreId || - (this.StoreId != null && - this.StoreId.Equals(input.StoreId)) - ) && - ( - this.StoreReference == input.StoreReference || - (this.StoreReference != null && - this.StoreReference.Equals(input.StoreReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BusinessLineId != null) - { - hashCode = (hashCode * 59) + this.BusinessLineId.GetHashCode(); - } - if (this.StoreCode != null) - { - hashCode = (hashCode * 59) + this.StoreCode.GetHashCode(); - } - if (this.StoreId != null) - { - hashCode = (hashCode * 59) + this.StoreId.GetHashCode(); - } - if (this.StoreReference != null) - { - hashCode = (hashCode * 59) + this.StoreReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/MigrationData.cs b/Adyen/Model/PlatformsAccount/MigrationData.cs deleted file mode 100644 index a1290f152..000000000 --- a/Adyen/Model/PlatformsAccount/MigrationData.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// MigrationData - /// - [DataContract(Name = "MigrationData")] - public partial class MigrationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the account holder in the balance platform.. - /// The unique identifier of the balance platfrom to which the account holder was migrated.. - /// Set to **true** if the account holder has been migrated.. - /// Contains the mapping of virtual account codes (classic integration) to the balance account codes (balance platform) associated with the migrated account holder.. - /// Contains the mapping of shareholders associated with the migrated legal entities.. - /// Contains the mapping of business lines and stores associated with the migrated account holder.. - /// The date when account holder was migrated.. - public MigrationData(string accountHolderId = default(string), string balancePlatform = default(string), bool? migrated = default(bool?), List migratedAccounts = default(List), List migratedShareholders = default(List), List migratedStores = default(List), DateTime migrationDate = default(DateTime)) - { - this.AccountHolderId = accountHolderId; - this.BalancePlatform = balancePlatform; - this.Migrated = migrated; - this.MigratedAccounts = migratedAccounts; - this.MigratedShareholders = migratedShareholders; - this.MigratedStores = migratedStores; - this.MigrationDate = migrationDate; - } - - /// - /// The unique identifier of the account holder in the balance platform. - /// - /// The unique identifier of the account holder in the balance platform. - [DataMember(Name = "accountHolderId", EmitDefaultValue = false)] - public string AccountHolderId { get; set; } - - /// - /// The unique identifier of the balance platfrom to which the account holder was migrated. - /// - /// The unique identifier of the balance platfrom to which the account holder was migrated. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// Set to **true** if the account holder has been migrated. - /// - /// Set to **true** if the account holder has been migrated. - [DataMember(Name = "migrated", EmitDefaultValue = false)] - public bool? Migrated { get; set; } - - /// - /// Contains the mapping of virtual account codes (classic integration) to the balance account codes (balance platform) associated with the migrated account holder. - /// - /// Contains the mapping of virtual account codes (classic integration) to the balance account codes (balance platform) associated with the migrated account holder. - [DataMember(Name = "migratedAccounts", EmitDefaultValue = false)] - public List MigratedAccounts { get; set; } - - /// - /// Contains the mapping of shareholders associated with the migrated legal entities. - /// - /// Contains the mapping of shareholders associated with the migrated legal entities. - [DataMember(Name = "migratedShareholders", EmitDefaultValue = false)] - public List MigratedShareholders { get; set; } - - /// - /// Contains the mapping of business lines and stores associated with the migrated account holder. - /// - /// Contains the mapping of business lines and stores associated with the migrated account holder. - [DataMember(Name = "migratedStores", EmitDefaultValue = false)] - public List MigratedStores { get; set; } - - /// - /// The date when account holder was migrated. - /// - /// The date when account holder was migrated. - [DataMember(Name = "migrationDate", EmitDefaultValue = false)] - public DateTime MigrationDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MigrationData {\n"); - sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Migrated: ").Append(Migrated).Append("\n"); - sb.Append(" MigratedAccounts: ").Append(MigratedAccounts).Append("\n"); - sb.Append(" MigratedShareholders: ").Append(MigratedShareholders).Append("\n"); - sb.Append(" MigratedStores: ").Append(MigratedStores).Append("\n"); - sb.Append(" MigrationDate: ").Append(MigrationDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MigrationData); - } - - /// - /// Returns true if MigrationData instances are equal - /// - /// Instance of MigrationData to be compared - /// Boolean - public bool Equals(MigrationData input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderId == input.AccountHolderId || - (this.AccountHolderId != null && - this.AccountHolderId.Equals(input.AccountHolderId)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Migrated == input.Migrated || - this.Migrated.Equals(input.Migrated) - ) && - ( - this.MigratedAccounts == input.MigratedAccounts || - this.MigratedAccounts != null && - input.MigratedAccounts != null && - this.MigratedAccounts.SequenceEqual(input.MigratedAccounts) - ) && - ( - this.MigratedShareholders == input.MigratedShareholders || - this.MigratedShareholders != null && - input.MigratedShareholders != null && - this.MigratedShareholders.SequenceEqual(input.MigratedShareholders) - ) && - ( - this.MigratedStores == input.MigratedStores || - this.MigratedStores != null && - input.MigratedStores != null && - this.MigratedStores.SequenceEqual(input.MigratedStores) - ) && - ( - this.MigrationDate == input.MigrationDate || - (this.MigrationDate != null && - this.MigrationDate.Equals(input.MigrationDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderId != null) - { - hashCode = (hashCode * 59) + this.AccountHolderId.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Migrated.GetHashCode(); - if (this.MigratedAccounts != null) - { - hashCode = (hashCode * 59) + this.MigratedAccounts.GetHashCode(); - } - if (this.MigratedShareholders != null) - { - hashCode = (hashCode * 59) + this.MigratedShareholders.GetHashCode(); - } - if (this.MigratedStores != null) - { - hashCode = (hashCode * 59) + this.MigratedStores.GetHashCode(); - } - if (this.MigrationDate != null) - { - hashCode = (hashCode * 59) + this.MigrationDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/PayoutMethod.cs b/Adyen/Model/PlatformsAccount/PayoutMethod.cs deleted file mode 100644 index c825a1130..000000000 --- a/Adyen/Model/PlatformsAccount/PayoutMethod.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// PayoutMethod - /// - [DataContract(Name = "PayoutMethod")] - public partial class PayoutMethod : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayoutMethod() { } - /// - /// Initializes a new instance of the class. - /// - /// The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). (required). - /// Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request.. - /// Your reference for the payout method.. - /// The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). (required). - /// The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). (required). - public PayoutMethod(string merchantAccount = default(string), string payoutMethodCode = default(string), string payoutMethodReference = default(string), string recurringDetailReference = default(string), string shopperReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperReference = shopperReference; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutMethodReference = payoutMethodReference; - } - - /// - /// The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - /// - /// The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Your reference for the payout method. - /// - /// Your reference for the payout method. - [DataMember(Name = "payoutMethodReference", EmitDefaultValue = false)] - public string PayoutMethodReference { get; set; } - - /// - /// The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - /// - /// The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - [DataMember(Name = "recurringDetailReference", IsRequired = false, EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - /// - /// The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutMethod {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutMethodReference: ").Append(PayoutMethodReference).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutMethod); - } - - /// - /// Returns true if PayoutMethod instances are equal - /// - /// Instance of PayoutMethod to be compared - /// Boolean - public bool Equals(PayoutMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutMethodReference == input.PayoutMethodReference || - (this.PayoutMethodReference != null && - this.PayoutMethodReference.Equals(input.PayoutMethodReference)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.PayoutMethodReference != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodReference.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/PayoutScheduleResponse.cs b/Adyen/Model/PlatformsAccount/PayoutScheduleResponse.cs deleted file mode 100644 index 6efe66a17..000000000 --- a/Adyen/Model/PlatformsAccount/PayoutScheduleResponse.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// PayoutScheduleResponse - /// - [DataContract(Name = "PayoutScheduleResponse")] - public partial class PayoutScheduleResponse : IEquatable, IValidatableObject - { - /// - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. - /// - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. - [JsonConverter(typeof(StringEnumConverter))] - public enum ScheduleEnum - { - /// - /// Enum DEFAULT for value: DEFAULT - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT = 1, - /// - /// Enum BIWEEKLYON1STAND15THATMIDNIGHT for value: BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT - /// - [EnumMember(Value = "BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT")] - BIWEEKLYON1STAND15THATMIDNIGHT = 2, - - /// - /// Enum DAILY for value: DAILY - /// - [EnumMember(Value = "DAILY")] - DAILY = 3, - - /// - /// Enum DAILYAU for value: DAILY_AU - /// - [EnumMember(Value = "DAILY_AU")] - DAILYAU = 4, - - /// - /// Enum DAILYEU for value: DAILY_EU - /// - [EnumMember(Value = "DAILY_EU")] - DAILYEU = 5, - - /// - /// Enum DAILYSG for value: DAILY_SG - /// - [EnumMember(Value = "DAILY_SG")] - DAILYSG = 6, - - /// - /// Enum DAILYUS for value: DAILY_US - /// - [EnumMember(Value = "DAILY_US")] - DAILYUS = 7, - - /// - /// Enum HOLD for value: HOLD - /// - [EnumMember(Value = "HOLD")] - HOLD = 8, - - /// - /// Enum MONTHLY for value: MONTHLY - /// - [EnumMember(Value = "MONTHLY")] - MONTHLY = 9, - - /// - /// Enum WEEKLY for value: WEEKLY - /// - [EnumMember(Value = "WEEKLY")] - WEEKLY = 10, - - /// - /// Enum WEEKLYMONTOFRIAU for value: WEEKLY_MON_TO_FRI_AU - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_AU")] - WEEKLYMONTOFRIAU = 11, - - /// - /// Enum WEEKLYMONTOFRIEU for value: WEEKLY_MON_TO_FRI_EU - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_EU")] - WEEKLYMONTOFRIEU = 12, - - /// - /// Enum WEEKLYMONTOFRIUS for value: WEEKLY_MON_TO_FRI_US - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_US")] - WEEKLYMONTOFRIUS = 13, - - /// - /// Enum WEEKLYONTUEFRIMIDNIGHT for value: WEEKLY_ON_TUE_FRI_MIDNIGHT - /// - [EnumMember(Value = "WEEKLY_ON_TUE_FRI_MIDNIGHT")] - WEEKLYONTUEFRIMIDNIGHT = 14, - - /// - /// Enum WEEKLYSUNTOTHUAU for value: WEEKLY_SUN_TO_THU_AU - /// - [EnumMember(Value = "WEEKLY_SUN_TO_THU_AU")] - WEEKLYSUNTOTHUAU = 15, - - /// - /// Enum WEEKLYSUNTOTHUUS for value: WEEKLY_SUN_TO_THU_US - /// - [EnumMember(Value = "WEEKLY_SUN_TO_THU_US")] - WEEKLYSUNTOTHUUS = 16 - - } - - - /// - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. - /// - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. - [DataMember(Name = "schedule", EmitDefaultValue = false)] - public ScheduleEnum? Schedule { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The date of the next scheduled payout.. - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`.. - public PayoutScheduleResponse(DateTime nextScheduledPayout = default(DateTime), ScheduleEnum? schedule = default(ScheduleEnum?)) - { - this.NextScheduledPayout = nextScheduledPayout; - this.Schedule = schedule; - } - - /// - /// The date of the next scheduled payout. - /// - /// The date of the next scheduled payout. - [DataMember(Name = "nextScheduledPayout", EmitDefaultValue = false)] - public DateTime NextScheduledPayout { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutScheduleResponse {\n"); - sb.Append(" NextScheduledPayout: ").Append(NextScheduledPayout).Append("\n"); - sb.Append(" Schedule: ").Append(Schedule).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutScheduleResponse); - } - - /// - /// Returns true if PayoutScheduleResponse instances are equal - /// - /// Instance of PayoutScheduleResponse to be compared - /// Boolean - public bool Equals(PayoutScheduleResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NextScheduledPayout == input.NextScheduledPayout || - (this.NextScheduledPayout != null && - this.NextScheduledPayout.Equals(input.NextScheduledPayout)) - ) && - ( - this.Schedule == input.Schedule || - this.Schedule.Equals(input.Schedule) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NextScheduledPayout != null) - { - hashCode = (hashCode * 59) + this.NextScheduledPayout.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Schedule.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/PerformVerificationRequest.cs b/Adyen/Model/PlatformsAccount/PerformVerificationRequest.cs deleted file mode 100644 index 74227362d..000000000 --- a/Adyen/Model/PlatformsAccount/PerformVerificationRequest.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// PerformVerificationRequest - /// - [DataContract(Name = "PerformVerificationRequest")] - public partial class PerformVerificationRequest : IEquatable, IValidatableObject - { - /// - /// The state required for the account holder. > Permitted values: `Processing`, `Payout`. - /// - /// The state required for the account holder. > Permitted values: `Processing`, `Payout`. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountStateTypeEnum - { - /// - /// Enum LimitedPayout for value: LimitedPayout - /// - [EnumMember(Value = "LimitedPayout")] - LimitedPayout = 1, - - /// - /// Enum LimitedProcessing for value: LimitedProcessing - /// - [EnumMember(Value = "LimitedProcessing")] - LimitedProcessing = 2, - - /// - /// Enum LimitlessPayout for value: LimitlessPayout - /// - [EnumMember(Value = "LimitlessPayout")] - LimitlessPayout = 3, - - /// - /// Enum LimitlessProcessing for value: LimitlessProcessing - /// - [EnumMember(Value = "LimitlessProcessing")] - LimitlessProcessing = 4, - - /// - /// Enum Payout for value: Payout - /// - [EnumMember(Value = "Payout")] - Payout = 5, - - /// - /// Enum Processing for value: Processing - /// - [EnumMember(Value = "Processing")] - Processing = 6 - - } - - - /// - /// The state required for the account holder. > Permitted values: `Processing`, `Payout`. - /// - /// The state required for the account holder. > Permitted values: `Processing`, `Payout`. - [DataMember(Name = "accountStateType", IsRequired = false, EmitDefaultValue = false)] - public AccountStateTypeEnum AccountStateType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PerformVerificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder to verify. (required). - /// The state required for the account holder. > Permitted values: `Processing`, `Payout`. (required). - /// The tier required for the account holder. (required). - public PerformVerificationRequest(string accountHolderCode = default(string), AccountStateTypeEnum accountStateType = default(AccountStateTypeEnum), int? tier = default(int?)) - { - this.AccountHolderCode = accountHolderCode; - this.AccountStateType = accountStateType; - this.Tier = tier; - } - - /// - /// The code of the account holder to verify. - /// - /// The code of the account holder to verify. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The tier required for the account holder. - /// - /// The tier required for the account holder. - [DataMember(Name = "tier", IsRequired = false, EmitDefaultValue = false)] - public int? Tier { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PerformVerificationRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountStateType: ").Append(AccountStateType).Append("\n"); - sb.Append(" Tier: ").Append(Tier).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PerformVerificationRequest); - } - - /// - /// Returns true if PerformVerificationRequest instances are equal - /// - /// Instance of PerformVerificationRequest to be compared - /// Boolean - public bool Equals(PerformVerificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountStateType == input.AccountStateType || - this.AccountStateType.Equals(input.AccountStateType) - ) && - ( - this.Tier == input.Tier || - this.Tier.Equals(input.Tier) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountStateType.GetHashCode(); - hashCode = (hashCode * 59) + this.Tier.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/PersonalDocumentData.cs b/Adyen/Model/PlatformsAccount/PersonalDocumentData.cs deleted file mode 100644 index b50a294ee..000000000 --- a/Adyen/Model/PlatformsAccount/PersonalDocumentData.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// PersonalDocumentData - /// - [DataContract(Name = "PersonalDocumentData")] - public partial class PersonalDocumentData : IEquatable, IValidatableObject - { - /// - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. - /// - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DRIVINGLICENSE for value: DRIVINGLICENSE - /// - [EnumMember(Value = "DRIVINGLICENSE")] - DRIVINGLICENSE = 1, - - /// - /// Enum ID for value: ID - /// - [EnumMember(Value = "ID")] - ID = 2, - - /// - /// Enum PASSPORT for value: PASSPORT - /// - [EnumMember(Value = "PASSPORT")] - PASSPORT = 3, - - /// - /// Enum SOCIALSECURITY for value: SOCIALSECURITY - /// - [EnumMember(Value = "SOCIALSECURITY")] - SOCIALSECURITY = 4, - - /// - /// Enum VISA for value: VISA - /// - [EnumMember(Value = "VISA")] - VISA = 5 - - } - - - /// - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. - /// - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PersonalDocumentData() { } - /// - /// Initializes a new instance of the class. - /// - /// The expiry date of the document, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.. - /// The country where the document was issued, in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**.. - /// The state where the document was issued (if applicable).. - /// The number in the document.. - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. (required). - public PersonalDocumentData(string expirationDate = default(string), string issuerCountry = default(string), string issuerState = default(string), string number = default(string), TypeEnum type = default(TypeEnum)) - { - this.Type = type; - this.ExpirationDate = expirationDate; - this.IssuerCountry = issuerCountry; - this.IssuerState = issuerState; - this.Number = number; - } - - /// - /// The expiry date of the document, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. - /// - /// The expiry date of the document, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. - [DataMember(Name = "expirationDate", EmitDefaultValue = false)] - public string ExpirationDate { get; set; } - - /// - /// The country where the document was issued, in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. - /// - /// The country where the document was issued, in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. - [DataMember(Name = "issuerCountry", EmitDefaultValue = false)] - public string IssuerCountry { get; set; } - - /// - /// The state where the document was issued (if applicable). - /// - /// The state where the document was issued (if applicable). - [DataMember(Name = "issuerState", EmitDefaultValue = false)] - public string IssuerState { get; set; } - - /// - /// The number in the document. - /// - /// The number in the document. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PersonalDocumentData {\n"); - sb.Append(" ExpirationDate: ").Append(ExpirationDate).Append("\n"); - sb.Append(" IssuerCountry: ").Append(IssuerCountry).Append("\n"); - sb.Append(" IssuerState: ").Append(IssuerState).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PersonalDocumentData); - } - - /// - /// Returns true if PersonalDocumentData instances are equal - /// - /// Instance of PersonalDocumentData to be compared - /// Boolean - public bool Equals(PersonalDocumentData input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpirationDate == input.ExpirationDate || - (this.ExpirationDate != null && - this.ExpirationDate.Equals(input.ExpirationDate)) - ) && - ( - this.IssuerCountry == input.IssuerCountry || - (this.IssuerCountry != null && - this.IssuerCountry.Equals(input.IssuerCountry)) - ) && - ( - this.IssuerState == input.IssuerState || - (this.IssuerState != null && - this.IssuerState.Equals(input.IssuerState)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpirationDate != null) - { - hashCode = (hashCode * 59) + this.ExpirationDate.GetHashCode(); - } - if (this.IssuerCountry != null) - { - hashCode = (hashCode * 59) + this.IssuerCountry.GetHashCode(); - } - if (this.IssuerState != null) - { - hashCode = (hashCode * 59) + this.IssuerState.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // IssuerCountry (string) maxLength - if (this.IssuerCountry != null && this.IssuerCountry.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssuerCountry, length must be less than 2.", new [] { "IssuerCountry" }); - } - - // IssuerCountry (string) minLength - if (this.IssuerCountry != null && this.IssuerCountry.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssuerCountry, length must be greater than 2.", new [] { "IssuerCountry" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/ServiceError.cs b/Adyen/Model/PlatformsAccount/ServiceError.cs deleted file mode 100644 index 12c5a528e..000000000 --- a/Adyen/Model/PlatformsAccount/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/ShareholderContact.cs b/Adyen/Model/PlatformsAccount/ShareholderContact.cs deleted file mode 100644 index 5824d4d3d..000000000 --- a/Adyen/Model/PlatformsAccount/ShareholderContact.cs +++ /dev/null @@ -1,338 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// ShareholderContact - /// - [DataContract(Name = "ShareholderContact")] - public partial class ShareholderContact : IEquatable, IValidatableObject - { - /// - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. - /// - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShareholderTypeEnum - { - /// - /// Enum Controller for value: Controller - /// - [EnumMember(Value = "Controller")] - Controller = 1, - - /// - /// Enum Owner for value: Owner - /// - [EnumMember(Value = "Owner")] - Owner = 2, - - /// - /// Enum Signatory for value: Signatory - /// - [EnumMember(Value = "Signatory")] - Signatory = 3 - - } - - - /// - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. - /// - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. - [DataMember(Name = "shareholderType", EmitDefaultValue = false)] - public ShareholderTypeEnum? ShareholderType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The e-mail address of the person.. - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// Job title of the person. Required when the `shareholderType` is **Controller**. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.. - /// name. - /// personalData. - /// phoneNumber. - /// The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** . - /// Your reference for the shareholder entry.. - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization.. - /// The URL of the person's website.. - public ShareholderContact(ViasAddress address = default(ViasAddress), string email = default(string), string fullPhoneNumber = default(string), string jobTitle = default(string), ViasName name = default(ViasName), ViasPersonalData personalData = default(ViasPersonalData), ViasPhoneNumber phoneNumber = default(ViasPhoneNumber), string shareholderCode = default(string), string shareholderReference = default(string), ShareholderTypeEnum? shareholderType = default(ShareholderTypeEnum?), string webAddress = default(string)) - { - this.Address = address; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.JobTitle = jobTitle; - this.Name = name; - this.PersonalData = personalData; - this.PhoneNumber = phoneNumber; - this.ShareholderCode = shareholderCode; - this.ShareholderReference = shareholderReference; - this.ShareholderType = shareholderType; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// The e-mail address of the person. - /// - /// The e-mail address of the person. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Job title of the person. Required when the `shareholderType` is **Controller**. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. - /// - /// Job title of the person. Required when the `shareholderType` is **Controller**. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. - [DataMember(Name = "jobTitle", EmitDefaultValue = false)] - public string JobTitle { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public ViasName Name { get; set; } - - /// - /// Gets or Sets PersonalData - /// - [DataMember(Name = "personalData", EmitDefaultValue = false)] - public ViasPersonalData PersonalData { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public ViasPhoneNumber PhoneNumber { get; set; } - - /// - /// The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** - /// - /// The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Your reference for the shareholder entry. - /// - /// Your reference for the shareholder entry. - [DataMember(Name = "shareholderReference", EmitDefaultValue = false)] - public string ShareholderReference { get; set; } - - /// - /// The URL of the person's website. - /// - /// The URL of the person's website. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ShareholderContact {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" JobTitle: ").Append(JobTitle).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PersonalData: ").Append(PersonalData).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append(" ShareholderReference: ").Append(ShareholderReference).Append("\n"); - sb.Append(" ShareholderType: ").Append(ShareholderType).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ShareholderContact); - } - - /// - /// Returns true if ShareholderContact instances are equal - /// - /// Instance of ShareholderContact to be compared - /// Boolean - public bool Equals(ShareholderContact input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.JobTitle == input.JobTitle || - (this.JobTitle != null && - this.JobTitle.Equals(input.JobTitle)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PersonalData == input.PersonalData || - (this.PersonalData != null && - this.PersonalData.Equals(input.PersonalData)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ) && - ( - this.ShareholderReference == input.ShareholderReference || - (this.ShareholderReference != null && - this.ShareholderReference.Equals(input.ShareholderReference)) - ) && - ( - this.ShareholderType == input.ShareholderType || - this.ShareholderType.Equals(input.ShareholderType) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.JobTitle != null) - { - hashCode = (hashCode * 59) + this.JobTitle.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PersonalData != null) - { - hashCode = (hashCode * 59) + this.PersonalData.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - if (this.ShareholderReference != null) - { - hashCode = (hashCode * 59) + this.ShareholderReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShareholderType.GetHashCode(); - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/SignatoryContact.cs b/Adyen/Model/PlatformsAccount/SignatoryContact.cs deleted file mode 100644 index 92417d245..000000000 --- a/Adyen/Model/PlatformsAccount/SignatoryContact.cs +++ /dev/null @@ -1,296 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// SignatoryContact - /// - [DataContract(Name = "SignatoryContact")] - public partial class SignatoryContact : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The e-mail address of the person.. - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// Job title of the signatory. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.. - /// name. - /// personalData. - /// phoneNumber. - /// The unique identifier (UUID) of the signatory. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Signatory is provided, the update of the Signatory will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Signatory is provided, the existing Signatory will be updated.** . - /// Your reference for the signatory.. - /// The URL of the person's website.. - public SignatoryContact(ViasAddress address = default(ViasAddress), string email = default(string), string fullPhoneNumber = default(string), string jobTitle = default(string), ViasName name = default(ViasName), ViasPersonalData personalData = default(ViasPersonalData), ViasPhoneNumber phoneNumber = default(ViasPhoneNumber), string signatoryCode = default(string), string signatoryReference = default(string), string webAddress = default(string)) - { - this.Address = address; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.JobTitle = jobTitle; - this.Name = name; - this.PersonalData = personalData; - this.PhoneNumber = phoneNumber; - this.SignatoryCode = signatoryCode; - this.SignatoryReference = signatoryReference; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// The e-mail address of the person. - /// - /// The e-mail address of the person. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Job title of the signatory. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. - /// - /// Job title of the signatory. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. - [DataMember(Name = "jobTitle", EmitDefaultValue = false)] - public string JobTitle { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public ViasName Name { get; set; } - - /// - /// Gets or Sets PersonalData - /// - [DataMember(Name = "personalData", EmitDefaultValue = false)] - public ViasPersonalData PersonalData { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public ViasPhoneNumber PhoneNumber { get; set; } - - /// - /// The unique identifier (UUID) of the signatory. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Signatory is provided, the update of the Signatory will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Signatory is provided, the existing Signatory will be updated.** - /// - /// The unique identifier (UUID) of the signatory. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Signatory is provided, the update of the Signatory will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Signatory is provided, the existing Signatory will be updated.** - [DataMember(Name = "signatoryCode", EmitDefaultValue = false)] - public string SignatoryCode { get; set; } - - /// - /// Your reference for the signatory. - /// - /// Your reference for the signatory. - [DataMember(Name = "signatoryReference", EmitDefaultValue = false)] - public string SignatoryReference { get; set; } - - /// - /// The URL of the person's website. - /// - /// The URL of the person's website. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SignatoryContact {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" JobTitle: ").Append(JobTitle).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PersonalData: ").Append(PersonalData).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" SignatoryCode: ").Append(SignatoryCode).Append("\n"); - sb.Append(" SignatoryReference: ").Append(SignatoryReference).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SignatoryContact); - } - - /// - /// Returns true if SignatoryContact instances are equal - /// - /// Instance of SignatoryContact to be compared - /// Boolean - public bool Equals(SignatoryContact input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.JobTitle == input.JobTitle || - (this.JobTitle != null && - this.JobTitle.Equals(input.JobTitle)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PersonalData == input.PersonalData || - (this.PersonalData != null && - this.PersonalData.Equals(input.PersonalData)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.SignatoryCode == input.SignatoryCode || - (this.SignatoryCode != null && - this.SignatoryCode.Equals(input.SignatoryCode)) - ) && - ( - this.SignatoryReference == input.SignatoryReference || - (this.SignatoryReference != null && - this.SignatoryReference.Equals(input.SignatoryReference)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.JobTitle != null) - { - hashCode = (hashCode * 59) + this.JobTitle.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PersonalData != null) - { - hashCode = (hashCode * 59) + this.PersonalData.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.SignatoryCode != null) - { - hashCode = (hashCode * 59) + this.SignatoryCode.GetHashCode(); - } - if (this.SignatoryReference != null) - { - hashCode = (hashCode * 59) + this.SignatoryReference.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/StoreDetail.cs b/Adyen/Model/PlatformsAccount/StoreDetail.cs deleted file mode 100644 index fe018b242..000000000 --- a/Adyen/Model/PlatformsAccount/StoreDetail.cs +++ /dev/null @@ -1,450 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// StoreDetail - /// - [DataContract(Name = "StoreDetail")] - public partial class StoreDetail : IEquatable, IValidatableObject - { - /// - /// The sales channel. Possible values: **Ecommerce**, **POS**. - /// - /// The sales channel. Possible values: **Ecommerce**, **POS**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 2 - - } - - - /// - /// The sales channel. Possible values: **Ecommerce**, **POS**. - /// - /// The sales channel. Possible values: **Ecommerce**, **POS**. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. - /// - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum InactiveWithModifications for value: InactiveWithModifications - /// - [EnumMember(Value = "InactiveWithModifications")] - InactiveWithModifications = 4, - - /// - /// Enum Pending for value: Pending - /// - [EnumMember(Value = "Pending")] - Pending = 5 - - } - - - /// - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. - /// - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreDetail() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// The phone number of the store provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// Store logo for payment method setup.. - /// The merchant account to which the store belongs. (required). - /// The merchant category code (MCC) that classifies the business of the account holder. (required). - /// Merchant house number for payment method setup.. - /// phoneNumber. - /// The sales channel. Possible values: **Ecommerce**, **POS**.. - /// The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform.. - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**.. - /// Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request.. - /// The name of the account holder's store. This value is shown in shopper statements. * Length: Between 3 to 22 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\**. - /// Your unique identifier for the store. The Customer Area also uses this value for the store description. * Length: Between 3 to 128 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\**. - /// The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`.. - /// URL of the ecommerce store.. - public StoreDetail(ViasAddress address = default(ViasAddress), string fullPhoneNumber = default(string), string logo = default(string), string merchantAccount = default(string), string merchantCategoryCode = default(string), string merchantHouseNumber = default(string), ViasPhoneNumber phoneNumber = default(ViasPhoneNumber), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string splitConfigurationUUID = default(string), StatusEnum? status = default(StatusEnum?), string store = default(string), string storeName = default(string), string storeReference = default(string), string virtualAccount = default(string), string webAddress = default(string)) - { - this.Address = address; - this.MerchantAccount = merchantAccount; - this.MerchantCategoryCode = merchantCategoryCode; - this.FullPhoneNumber = fullPhoneNumber; - this.Logo = logo; - this.MerchantHouseNumber = merchantHouseNumber; - this.PhoneNumber = phoneNumber; - this.ShopperInteraction = shopperInteraction; - this.SplitConfigurationUUID = splitConfigurationUUID; - this.Status = status; - this.Store = store; - this.StoreName = storeName; - this.StoreReference = storeReference; - this.VirtualAccount = virtualAccount; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// The phone number of the store provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the store provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Store logo for payment method setup. - /// - /// Store logo for payment method setup. - [DataMember(Name = "logo", EmitDefaultValue = false)] - public string Logo { get; set; } - - /// - /// The merchant account to which the store belongs. - /// - /// The merchant account to which the store belongs. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The merchant category code (MCC) that classifies the business of the account holder. - /// - /// The merchant category code (MCC) that classifies the business of the account holder. - [DataMember(Name = "merchantCategoryCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantCategoryCode { get; set; } - - /// - /// Merchant house number for payment method setup. - /// - /// Merchant house number for payment method setup. - [DataMember(Name = "merchantHouseNumber", EmitDefaultValue = false)] - public string MerchantHouseNumber { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public ViasPhoneNumber PhoneNumber { get; set; } - - /// - /// The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform. - /// - /// The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform. - [DataMember(Name = "splitConfigurationUUID", EmitDefaultValue = false)] - public string SplitConfigurationUUID { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// The name of the account holder's store. This value is shown in shopper statements. * Length: Between 3 to 22 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** - /// - /// The name of the account holder's store. This value is shown in shopper statements. * Length: Between 3 to 22 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** - [DataMember(Name = "storeName", EmitDefaultValue = false)] - public string StoreName { get; set; } - - /// - /// Your unique identifier for the store. The Customer Area also uses this value for the store description. * Length: Between 3 to 128 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** - /// - /// Your unique identifier for the store. The Customer Area also uses this value for the store description. * Length: Between 3 to 128 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** - [DataMember(Name = "storeReference", EmitDefaultValue = false)] - public string StoreReference { get; set; } - - /// - /// The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`. - /// - /// The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`. - [DataMember(Name = "virtualAccount", EmitDefaultValue = false)] - public string VirtualAccount { get; set; } - - /// - /// URL of the ecommerce store. - /// - /// URL of the ecommerce store. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreDetail {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" Logo: ").Append(Logo).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantCategoryCode: ").Append(MerchantCategoryCode).Append("\n"); - sb.Append(" MerchantHouseNumber: ").Append(MerchantHouseNumber).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" SplitConfigurationUUID: ").Append(SplitConfigurationUUID).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StoreName: ").Append(StoreName).Append("\n"); - sb.Append(" StoreReference: ").Append(StoreReference).Append("\n"); - sb.Append(" VirtualAccount: ").Append(VirtualAccount).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreDetail); - } - - /// - /// Returns true if StoreDetail instances are equal - /// - /// Instance of StoreDetail to be compared - /// Boolean - public bool Equals(StoreDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.Logo == input.Logo || - (this.Logo != null && - this.Logo.Equals(input.Logo)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantCategoryCode == input.MerchantCategoryCode || - (this.MerchantCategoryCode != null && - this.MerchantCategoryCode.Equals(input.MerchantCategoryCode)) - ) && - ( - this.MerchantHouseNumber == input.MerchantHouseNumber || - (this.MerchantHouseNumber != null && - this.MerchantHouseNumber.Equals(input.MerchantHouseNumber)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.SplitConfigurationUUID == input.SplitConfigurationUUID || - (this.SplitConfigurationUUID != null && - this.SplitConfigurationUUID.Equals(input.SplitConfigurationUUID)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreName == input.StoreName || - (this.StoreName != null && - this.StoreName.Equals(input.StoreName)) - ) && - ( - this.StoreReference == input.StoreReference || - (this.StoreReference != null && - this.StoreReference.Equals(input.StoreReference)) - ) && - ( - this.VirtualAccount == input.VirtualAccount || - (this.VirtualAccount != null && - this.VirtualAccount.Equals(input.VirtualAccount)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.Logo != null) - { - hashCode = (hashCode * 59) + this.Logo.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantCategoryCode != null) - { - hashCode = (hashCode * 59) + this.MerchantCategoryCode.GetHashCode(); - } - if (this.MerchantHouseNumber != null) - { - hashCode = (hashCode * 59) + this.MerchantHouseNumber.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.SplitConfigurationUUID != null) - { - hashCode = (hashCode * 59) + this.SplitConfigurationUUID.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.StoreName != null) - { - hashCode = (hashCode * 59) + this.StoreName.GetHashCode(); - } - if (this.StoreReference != null) - { - hashCode = (hashCode * 59) + this.StoreReference.GetHashCode(); - } - if (this.VirtualAccount != null) - { - hashCode = (hashCode * 59) + this.VirtualAccount.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/SuspendAccountHolderRequest.cs b/Adyen/Model/PlatformsAccount/SuspendAccountHolderRequest.cs deleted file mode 100644 index 02f33b881..000000000 --- a/Adyen/Model/PlatformsAccount/SuspendAccountHolderRequest.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// SuspendAccountHolderRequest - /// - [DataContract(Name = "SuspendAccountHolderRequest")] - public partial class SuspendAccountHolderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SuspendAccountHolderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder to be suspended. (required). - public SuspendAccountHolderRequest(string accountHolderCode = default(string)) - { - this.AccountHolderCode = accountHolderCode; - } - - /// - /// The code of the account holder to be suspended. - /// - /// The code of the account holder to be suspended. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SuspendAccountHolderRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SuspendAccountHolderRequest); - } - - /// - /// Returns true if SuspendAccountHolderRequest instances are equal - /// - /// Instance of SuspendAccountHolderRequest to be compared - /// Boolean - public bool Equals(SuspendAccountHolderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/SuspendAccountHolderResponse.cs b/Adyen/Model/PlatformsAccount/SuspendAccountHolderResponse.cs deleted file mode 100644 index ac213a5cf..000000000 --- a/Adyen/Model/PlatformsAccount/SuspendAccountHolderResponse.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// SuspendAccountHolderResponse - /// - [DataContract(Name = "SuspendAccountHolderResponse")] - public partial class SuspendAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountHolderStatus. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public SuspendAccountHolderResponse(AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.AccountHolderStatus = accountHolderStatus; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SuspendAccountHolderResponse {\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SuspendAccountHolderResponse); - } - - /// - /// Returns true if SuspendAccountHolderResponse instances are equal - /// - /// Instance of SuspendAccountHolderResponse to be compared - /// Boolean - public bool Equals(SuspendAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UltimateParentCompany.cs b/Adyen/Model/PlatformsAccount/UltimateParentCompany.cs deleted file mode 100644 index 1f3cf5339..000000000 --- a/Adyen/Model/PlatformsAccount/UltimateParentCompany.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UltimateParentCompany - /// - [DataContract(Name = "UltimateParentCompany")] - public partial class UltimateParentCompany : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// address. - /// businessDetails. - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request.. - public UltimateParentCompany(ViasAddress address = default(ViasAddress), UltimateParentCompanyBusinessDetails businessDetails = default(UltimateParentCompanyBusinessDetails), string ultimateParentCompanyCode = default(string)) - { - this.Address = address; - this.BusinessDetails = businessDetails; - this.UltimateParentCompanyCode = ultimateParentCompanyCode; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// Gets or Sets BusinessDetails - /// - [DataMember(Name = "businessDetails", EmitDefaultValue = false)] - public UltimateParentCompanyBusinessDetails BusinessDetails { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request. - [DataMember(Name = "ultimateParentCompanyCode", EmitDefaultValue = false)] - public string UltimateParentCompanyCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UltimateParentCompany {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BusinessDetails: ").Append(BusinessDetails).Append("\n"); - sb.Append(" UltimateParentCompanyCode: ").Append(UltimateParentCompanyCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UltimateParentCompany); - } - - /// - /// Returns true if UltimateParentCompany instances are equal - /// - /// Instance of UltimateParentCompany to be compared - /// Boolean - public bool Equals(UltimateParentCompany input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BusinessDetails == input.BusinessDetails || - (this.BusinessDetails != null && - this.BusinessDetails.Equals(input.BusinessDetails)) - ) && - ( - this.UltimateParentCompanyCode == input.UltimateParentCompanyCode || - (this.UltimateParentCompanyCode != null && - this.UltimateParentCompanyCode.Equals(input.UltimateParentCompanyCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BusinessDetails != null) - { - hashCode = (hashCode * 59) + this.BusinessDetails.GetHashCode(); - } - if (this.UltimateParentCompanyCode != null) - { - hashCode = (hashCode * 59) + this.UltimateParentCompanyCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UltimateParentCompanyBusinessDetails.cs b/Adyen/Model/PlatformsAccount/UltimateParentCompanyBusinessDetails.cs deleted file mode 100644 index dbc8d6048..000000000 --- a/Adyen/Model/PlatformsAccount/UltimateParentCompanyBusinessDetails.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UltimateParentCompanyBusinessDetails - /// - [DataContract(Name = "UltimateParentCompanyBusinessDetails")] - public partial class UltimateParentCompanyBusinessDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The legal name of the company.. - /// The registration number of the company.. - /// Market Identifier Code (MIC).. - /// International Securities Identification Number (ISIN).. - /// Stock Ticker symbol.. - public UltimateParentCompanyBusinessDetails(string legalBusinessName = default(string), string registrationNumber = default(string), string stockExchange = default(string), string stockNumber = default(string), string stockTicker = default(string)) - { - this.LegalBusinessName = legalBusinessName; - this.RegistrationNumber = registrationNumber; - this.StockExchange = stockExchange; - this.StockNumber = stockNumber; - this.StockTicker = stockTicker; - } - - /// - /// The legal name of the company. - /// - /// The legal name of the company. - [DataMember(Name = "legalBusinessName", EmitDefaultValue = false)] - public string LegalBusinessName { get; set; } - - /// - /// The registration number of the company. - /// - /// The registration number of the company. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// Market Identifier Code (MIC). - /// - /// Market Identifier Code (MIC). - [DataMember(Name = "stockExchange", EmitDefaultValue = false)] - public string StockExchange { get; set; } - - /// - /// International Securities Identification Number (ISIN). - /// - /// International Securities Identification Number (ISIN). - [DataMember(Name = "stockNumber", EmitDefaultValue = false)] - public string StockNumber { get; set; } - - /// - /// Stock Ticker symbol. - /// - /// Stock Ticker symbol. - [DataMember(Name = "stockTicker", EmitDefaultValue = false)] - public string StockTicker { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UltimateParentCompanyBusinessDetails {\n"); - sb.Append(" LegalBusinessName: ").Append(LegalBusinessName).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" StockExchange: ").Append(StockExchange).Append("\n"); - sb.Append(" StockNumber: ").Append(StockNumber).Append("\n"); - sb.Append(" StockTicker: ").Append(StockTicker).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UltimateParentCompanyBusinessDetails); - } - - /// - /// Returns true if UltimateParentCompanyBusinessDetails instances are equal - /// - /// Instance of UltimateParentCompanyBusinessDetails to be compared - /// Boolean - public bool Equals(UltimateParentCompanyBusinessDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.LegalBusinessName == input.LegalBusinessName || - (this.LegalBusinessName != null && - this.LegalBusinessName.Equals(input.LegalBusinessName)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.StockExchange == input.StockExchange || - (this.StockExchange != null && - this.StockExchange.Equals(input.StockExchange)) - ) && - ( - this.StockNumber == input.StockNumber || - (this.StockNumber != null && - this.StockNumber.Equals(input.StockNumber)) - ) && - ( - this.StockTicker == input.StockTicker || - (this.StockTicker != null && - this.StockTicker.Equals(input.StockTicker)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LegalBusinessName != null) - { - hashCode = (hashCode * 59) + this.LegalBusinessName.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.StockExchange != null) - { - hashCode = (hashCode * 59) + this.StockExchange.GetHashCode(); - } - if (this.StockNumber != null) - { - hashCode = (hashCode * 59) + this.StockNumber.GetHashCode(); - } - if (this.StockTicker != null) - { - hashCode = (hashCode * 59) + this.StockTicker.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UnSuspendAccountHolderRequest.cs b/Adyen/Model/PlatformsAccount/UnSuspendAccountHolderRequest.cs deleted file mode 100644 index 70a368194..000000000 --- a/Adyen/Model/PlatformsAccount/UnSuspendAccountHolderRequest.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UnSuspendAccountHolderRequest - /// - [DataContract(Name = "UnSuspendAccountHolderRequest")] - public partial class UnSuspendAccountHolderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UnSuspendAccountHolderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder to be reinstated. (required). - public UnSuspendAccountHolderRequest(string accountHolderCode = default(string)) - { - this.AccountHolderCode = accountHolderCode; - } - - /// - /// The code of the account holder to be reinstated. - /// - /// The code of the account holder to be reinstated. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UnSuspendAccountHolderRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UnSuspendAccountHolderRequest); - } - - /// - /// Returns true if UnSuspendAccountHolderRequest instances are equal - /// - /// Instance of UnSuspendAccountHolderRequest to be compared - /// Boolean - public bool Equals(UnSuspendAccountHolderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UnSuspendAccountHolderResponse.cs b/Adyen/Model/PlatformsAccount/UnSuspendAccountHolderResponse.cs deleted file mode 100644 index a25e20644..000000000 --- a/Adyen/Model/PlatformsAccount/UnSuspendAccountHolderResponse.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UnSuspendAccountHolderResponse - /// - [DataContract(Name = "UnSuspendAccountHolderResponse")] - public partial class UnSuspendAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountHolderStatus. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public UnSuspendAccountHolderResponse(AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.AccountHolderStatus = accountHolderStatus; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UnSuspendAccountHolderResponse {\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UnSuspendAccountHolderResponse); - } - - /// - /// Returns true if UnSuspendAccountHolderResponse instances are equal - /// - /// Instance of UnSuspendAccountHolderResponse to be compared - /// Boolean - public bool Equals(UnSuspendAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UpdateAccountHolderRequest.cs b/Adyen/Model/PlatformsAccount/UpdateAccountHolderRequest.cs deleted file mode 100644 index 14bfa7c0d..000000000 --- a/Adyen/Model/PlatformsAccount/UpdateAccountHolderRequest.cs +++ /dev/null @@ -1,279 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UpdateAccountHolderRequest - /// - [DataContract(Name = "UpdateAccountHolderRequest")] - public partial class UpdateAccountHolderRequest : IEquatable, IValidatableObject - { - /// - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. - /// - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. - /// - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided. - [DataMember(Name = "legalEntity", EmitDefaultValue = false)] - public LegalEntityEnum? LegalEntity { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateAccountHolderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account Holder to be updated. (required). - /// accountHolderDetails. - /// A description of the account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.. - /// The legal entity type of the account holder. This determines the information that should be provided in the request. Possible values: **Business**, **Individual**, or **NonProfit**. * If set to **Business** or **NonProfit**, then `accountHolderDetails.businessDetails` must be provided, with at least one entry in the `accountHolderDetails.businessDetails.shareholders` list. * If set to **Individual**, then `accountHolderDetails.individualDetails` must be provided.. - /// The primary three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), to which the account holder should be updated.. - /// The processing tier to which the Account Holder should be updated. >The processing tier can not be lowered through this request. >Required if accountHolderDetails are not provided.. - /// The identifier of the profile that applies to this entity.. - public UpdateAccountHolderRequest(string accountHolderCode = default(string), AccountHolderDetails accountHolderDetails = default(AccountHolderDetails), string description = default(string), LegalEntityEnum? legalEntity = default(LegalEntityEnum?), string primaryCurrency = default(string), int? processingTier = default(int?), string verificationProfile = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.AccountHolderDetails = accountHolderDetails; - this.Description = description; - this.LegalEntity = legalEntity; - this.PrimaryCurrency = primaryCurrency; - this.ProcessingTier = processingTier; - this.VerificationProfile = verificationProfile; - } - - /// - /// The code of the Account Holder to be updated. - /// - /// The code of the Account Holder to be updated. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets AccountHolderDetails - /// - [DataMember(Name = "accountHolderDetails", EmitDefaultValue = false)] - public AccountHolderDetails AccountHolderDetails { get; set; } - - /// - /// A description of the account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. - /// - /// A description of the account holder, maximum 256 characters. You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The primary three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), to which the account holder should be updated. - /// - /// The primary three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), to which the account holder should be updated. - [DataMember(Name = "primaryCurrency", EmitDefaultValue = false)] - [Obsolete] - public string PrimaryCurrency { get; set; } - - /// - /// The processing tier to which the Account Holder should be updated. >The processing tier can not be lowered through this request. >Required if accountHolderDetails are not provided. - /// - /// The processing tier to which the Account Holder should be updated. >The processing tier can not be lowered through this request. >Required if accountHolderDetails are not provided. - [DataMember(Name = "processingTier", EmitDefaultValue = false)] - public int? ProcessingTier { get; set; } - - /// - /// The identifier of the profile that applies to this entity. - /// - /// The identifier of the profile that applies to this entity. - [DataMember(Name = "verificationProfile", EmitDefaultValue = false)] - public string VerificationProfile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateAccountHolderRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountHolderDetails: ").Append(AccountHolderDetails).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" LegalEntity: ").Append(LegalEntity).Append("\n"); - sb.Append(" PrimaryCurrency: ").Append(PrimaryCurrency).Append("\n"); - sb.Append(" ProcessingTier: ").Append(ProcessingTier).Append("\n"); - sb.Append(" VerificationProfile: ").Append(VerificationProfile).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateAccountHolderRequest); - } - - /// - /// Returns true if UpdateAccountHolderRequest instances are equal - /// - /// Instance of UpdateAccountHolderRequest to be compared - /// Boolean - public bool Equals(UpdateAccountHolderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountHolderDetails == input.AccountHolderDetails || - (this.AccountHolderDetails != null && - this.AccountHolderDetails.Equals(input.AccountHolderDetails)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.LegalEntity == input.LegalEntity || - this.LegalEntity.Equals(input.LegalEntity) - ) && - ( - this.PrimaryCurrency == input.PrimaryCurrency || - (this.PrimaryCurrency != null && - this.PrimaryCurrency.Equals(input.PrimaryCurrency)) - ) && - ( - this.ProcessingTier == input.ProcessingTier || - this.ProcessingTier.Equals(input.ProcessingTier) - ) && - ( - this.VerificationProfile == input.VerificationProfile || - (this.VerificationProfile != null && - this.VerificationProfile.Equals(input.VerificationProfile)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.AccountHolderDetails != null) - { - hashCode = (hashCode * 59) + this.AccountHolderDetails.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntity.GetHashCode(); - if (this.PrimaryCurrency != null) - { - hashCode = (hashCode * 59) + this.PrimaryCurrency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ProcessingTier.GetHashCode(); - if (this.VerificationProfile != null) - { - hashCode = (hashCode * 59) + this.VerificationProfile.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UpdateAccountHolderResponse.cs b/Adyen/Model/PlatformsAccount/UpdateAccountHolderResponse.cs deleted file mode 100644 index e40b49396..000000000 --- a/Adyen/Model/PlatformsAccount/UpdateAccountHolderResponse.cs +++ /dev/null @@ -1,353 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UpdateAccountHolderResponse - /// - [DataContract(Name = "UpdateAccountHolderResponse")] - public partial class UpdateAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// The legal entity of the account holder. - /// - /// The legal entity of the account holder. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The legal entity of the account holder. - /// - /// The legal entity of the account holder. - [DataMember(Name = "legalEntity", EmitDefaultValue = false)] - public LegalEntityEnum? LegalEntity { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder.. - /// accountHolderDetails. - /// accountHolderStatus. - /// The description of the account holder.. - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation.. - /// The legal entity of the account holder.. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// verification. - /// The identifier of the profile that applies to this entity.. - public UpdateAccountHolderResponse(string accountHolderCode = default(string), AccountHolderDetails accountHolderDetails = default(AccountHolderDetails), AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), string description = default(string), List invalidFields = default(List), LegalEntityEnum? legalEntity = default(LegalEntityEnum?), string primaryCurrency = default(string), string pspReference = default(string), string resultCode = default(string), KYCVerificationResult verification = default(KYCVerificationResult), string verificationProfile = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.AccountHolderDetails = accountHolderDetails; - this.AccountHolderStatus = accountHolderStatus; - this.Description = description; - this.InvalidFields = invalidFields; - this.LegalEntity = legalEntity; - this.PrimaryCurrency = primaryCurrency; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.Verification = verification; - this.VerificationProfile = verificationProfile; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets AccountHolderDetails - /// - [DataMember(Name = "accountHolderDetails", EmitDefaultValue = false)] - public AccountHolderDetails AccountHolderDetails { get; set; } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// The description of the account holder. - /// - /// The description of the account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation. - /// - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - [DataMember(Name = "primaryCurrency", EmitDefaultValue = false)] - [Obsolete] - public string PrimaryCurrency { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Gets or Sets Verification - /// - [DataMember(Name = "verification", EmitDefaultValue = false)] - public KYCVerificationResult Verification { get; set; } - - /// - /// The identifier of the profile that applies to this entity. - /// - /// The identifier of the profile that applies to this entity. - [DataMember(Name = "verificationProfile", EmitDefaultValue = false)] - public string VerificationProfile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateAccountHolderResponse {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountHolderDetails: ").Append(AccountHolderDetails).Append("\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" LegalEntity: ").Append(LegalEntity).Append("\n"); - sb.Append(" PrimaryCurrency: ").Append(PrimaryCurrency).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" Verification: ").Append(Verification).Append("\n"); - sb.Append(" VerificationProfile: ").Append(VerificationProfile).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateAccountHolderResponse); - } - - /// - /// Returns true if UpdateAccountHolderResponse instances are equal - /// - /// Instance of UpdateAccountHolderResponse to be compared - /// Boolean - public bool Equals(UpdateAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountHolderDetails == input.AccountHolderDetails || - (this.AccountHolderDetails != null && - this.AccountHolderDetails.Equals(input.AccountHolderDetails)) - ) && - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.LegalEntity == input.LegalEntity || - this.LegalEntity.Equals(input.LegalEntity) - ) && - ( - this.PrimaryCurrency == input.PrimaryCurrency || - (this.PrimaryCurrency != null && - this.PrimaryCurrency.Equals(input.PrimaryCurrency)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.Verification == input.Verification || - (this.Verification != null && - this.Verification.Equals(input.Verification)) - ) && - ( - this.VerificationProfile == input.VerificationProfile || - (this.VerificationProfile != null && - this.VerificationProfile.Equals(input.VerificationProfile)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.AccountHolderDetails != null) - { - hashCode = (hashCode * 59) + this.AccountHolderDetails.GetHashCode(); - } - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntity.GetHashCode(); - if (this.PrimaryCurrency != null) - { - hashCode = (hashCode * 59) + this.PrimaryCurrency.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - if (this.Verification != null) - { - hashCode = (hashCode * 59) + this.Verification.GetHashCode(); - } - if (this.VerificationProfile != null) - { - hashCode = (hashCode * 59) + this.VerificationProfile.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UpdateAccountHolderStateRequest.cs b/Adyen/Model/PlatformsAccount/UpdateAccountHolderStateRequest.cs deleted file mode 100644 index 6edd961e5..000000000 --- a/Adyen/Model/PlatformsAccount/UpdateAccountHolderStateRequest.cs +++ /dev/null @@ -1,228 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UpdateAccountHolderStateRequest - /// - [DataContract(Name = "UpdateAccountHolderStateRequest")] - public partial class UpdateAccountHolderStateRequest : IEquatable, IValidatableObject - { - /// - /// The state to be updated. >Permitted values are: `Processing`, `Payout` - /// - /// The state to be updated. >Permitted values are: `Processing`, `Payout` - [JsonConverter(typeof(StringEnumConverter))] - public enum StateTypeEnum - { - /// - /// Enum LimitedPayout for value: LimitedPayout - /// - [EnumMember(Value = "LimitedPayout")] - LimitedPayout = 1, - - /// - /// Enum LimitedProcessing for value: LimitedProcessing - /// - [EnumMember(Value = "LimitedProcessing")] - LimitedProcessing = 2, - - /// - /// Enum LimitlessPayout for value: LimitlessPayout - /// - [EnumMember(Value = "LimitlessPayout")] - LimitlessPayout = 3, - - /// - /// Enum LimitlessProcessing for value: LimitlessProcessing - /// - [EnumMember(Value = "LimitlessProcessing")] - LimitlessProcessing = 4, - - /// - /// Enum Payout for value: Payout - /// - [EnumMember(Value = "Payout")] - Payout = 5, - - /// - /// Enum Processing for value: Processing - /// - [EnumMember(Value = "Processing")] - Processing = 6 - - } - - - /// - /// The state to be updated. >Permitted values are: `Processing`, `Payout` - /// - /// The state to be updated. >Permitted values are: `Processing`, `Payout` - [DataMember(Name = "stateType", IsRequired = false, EmitDefaultValue = false)] - public StateTypeEnum StateType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateAccountHolderStateRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account Holder on which to update the state. (required). - /// If true, disable the requested state. If false, enable the requested state. (required). - /// The reason that the state is being updated. >Required if the state is being disabled.. - /// The state to be updated. >Permitted values are: `Processing`, `Payout` (required). - public UpdateAccountHolderStateRequest(string accountHolderCode = default(string), bool? disable = default(bool?), string reason = default(string), StateTypeEnum stateType = default(StateTypeEnum)) - { - this.AccountHolderCode = accountHolderCode; - this.Disable = disable; - this.StateType = stateType; - this.Reason = reason; - } - - /// - /// The code of the Account Holder on which to update the state. - /// - /// The code of the Account Holder on which to update the state. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// If true, disable the requested state. If false, enable the requested state. - /// - /// If true, disable the requested state. If false, enable the requested state. - [DataMember(Name = "disable", IsRequired = false, EmitDefaultValue = false)] - public bool? Disable { get; set; } - - /// - /// The reason that the state is being updated. >Required if the state is being disabled. - /// - /// The reason that the state is being updated. >Required if the state is being disabled. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateAccountHolderStateRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" Disable: ").Append(Disable).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" StateType: ").Append(StateType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateAccountHolderStateRequest); - } - - /// - /// Returns true if UpdateAccountHolderStateRequest instances are equal - /// - /// Instance of UpdateAccountHolderStateRequest to be compared - /// Boolean - public bool Equals(UpdateAccountHolderStateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.Disable == input.Disable || - this.Disable.Equals(input.Disable) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ) && - ( - this.StateType == input.StateType || - this.StateType.Equals(input.StateType) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Disable.GetHashCode(); - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StateType.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UpdateAccountRequest.cs b/Adyen/Model/PlatformsAccount/UpdateAccountRequest.cs deleted file mode 100644 index 90d2ae314..000000000 --- a/Adyen/Model/PlatformsAccount/UpdateAccountRequest.cs +++ /dev/null @@ -1,271 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UpdateAccountRequest - /// - [DataContract(Name = "UpdateAccountRequest")] - public partial class UpdateAccountRequest : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateAccountRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account to update. (required). - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.. - /// A description of the account, maximum 256 characters.You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`.. - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.. - /// payoutSchedule. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.. - public UpdateAccountRequest(string accountCode = default(string), string bankAccountUUID = default(string), string description = default(string), Dictionary metadata = default(Dictionary), string payoutMethodCode = default(string), UpdatePayoutScheduleRequest payoutSchedule = default(UpdatePayoutScheduleRequest), PayoutSpeedEnum? payoutSpeed = default(PayoutSpeedEnum?)) - { - this.AccountCode = accountCode; - this.BankAccountUUID = bankAccountUUID; - this.Description = description; - this.Metadata = metadata; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutSchedule = payoutSchedule; - this.PayoutSpeed = payoutSpeed; - } - - /// - /// The code of the account to update. - /// - /// The code of the account to update. - [DataMember(Name = "accountCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// A description of the account, maximum 256 characters.You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. - /// - /// A description of the account, maximum 256 characters.You can use alphanumeric characters (A-Z, a-z, 0-9), white spaces, and underscores `_`. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use by the merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Gets or Sets PayoutSchedule - /// - [DataMember(Name = "payoutSchedule", EmitDefaultValue = false)] - public UpdatePayoutScheduleRequest PayoutSchedule { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateAccountRequest {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutSchedule: ").Append(PayoutSchedule).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateAccountRequest); - } - - /// - /// Returns true if UpdateAccountRequest instances are equal - /// - /// Instance of UpdateAccountRequest to be compared - /// Boolean - public bool Equals(UpdateAccountRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutSchedule == input.PayoutSchedule || - (this.PayoutSchedule != null && - this.PayoutSchedule.Equals(input.PayoutSchedule)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.PayoutSchedule != null) - { - hashCode = (hashCode * 59) + this.PayoutSchedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UpdateAccountResponse.cs b/Adyen/Model/PlatformsAccount/UpdateAccountResponse.cs deleted file mode 100644 index 69b73c9ee..000000000 --- a/Adyen/Model/PlatformsAccount/UpdateAccountResponse.cs +++ /dev/null @@ -1,329 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UpdateAccountResponse - /// - [DataContract(Name = "UpdateAccountResponse")] - public partial class UpdateAccountResponse : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateAccountResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account. (required). - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.. - /// The description of the account.. - /// A list of fields that caused the `/updateAccount` request to fail.. - /// A set of key and value pairs containing metadata.. - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.. - /// payoutSchedule. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public UpdateAccountResponse(string accountCode = default(string), string bankAccountUUID = default(string), string description = default(string), List invalidFields = default(List), Dictionary metadata = default(Dictionary), string payoutMethodCode = default(string), PayoutScheduleResponse payoutSchedule = default(PayoutScheduleResponse), PayoutSpeedEnum? payoutSpeed = default(PayoutSpeedEnum?), string pspReference = default(string), string resultCode = default(string)) - { - this.AccountCode = accountCode; - this.BankAccountUUID = bankAccountUUID; - this.Description = description; - this.InvalidFields = invalidFields; - this.Metadata = metadata; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutSchedule = payoutSchedule; - this.PayoutSpeed = payoutSpeed; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// The code of the account. - /// - /// The code of the account. - [DataMember(Name = "accountCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The description of the account. - /// - /// The description of the account. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of fields that caused the `/updateAccount` request to fail. - /// - /// A list of fields that caused the `/updateAccount` request to fail. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A set of key and value pairs containing metadata. - /// - /// A set of key and value pairs containing metadata. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Gets or Sets PayoutSchedule - /// - [DataMember(Name = "payoutSchedule", EmitDefaultValue = false)] - public PayoutScheduleResponse PayoutSchedule { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateAccountResponse {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutSchedule: ").Append(PayoutSchedule).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateAccountResponse); - } - - /// - /// Returns true if UpdateAccountResponse instances are equal - /// - /// Instance of UpdateAccountResponse to be compared - /// Boolean - public bool Equals(UpdateAccountResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutSchedule == input.PayoutSchedule || - (this.PayoutSchedule != null && - this.PayoutSchedule.Equals(input.PayoutSchedule)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.PayoutSchedule != null) - { - hashCode = (hashCode * 59) + this.PayoutSchedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UpdatePayoutScheduleRequest.cs b/Adyen/Model/PlatformsAccount/UpdatePayoutScheduleRequest.cs deleted file mode 100644 index bfab57b75..000000000 --- a/Adyen/Model/PlatformsAccount/UpdatePayoutScheduleRequest.cs +++ /dev/null @@ -1,290 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UpdatePayoutScheduleRequest - /// - [DataContract(Name = "UpdatePayoutScheduleRequest")] - public partial class UpdatePayoutScheduleRequest : IEquatable, IValidatableObject - { - /// - /// Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed. - /// - /// Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed. - [JsonConverter(typeof(StringEnumConverter))] - public enum ActionEnum - { - /// - /// Enum CLOSE for value: CLOSE - /// - [EnumMember(Value = "CLOSE")] - CLOSE = 1, - - /// - /// Enum NOTHING for value: NOTHING - /// - [EnumMember(Value = "NOTHING")] - NOTHING = 2, - - /// - /// Enum UPDATE for value: UPDATE - /// - [EnumMember(Value = "UPDATE")] - UPDATE = 3 - - } - - - /// - /// Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed. - /// - /// Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed. - [DataMember(Name = "action", EmitDefaultValue = false)] - public ActionEnum? Action { get; set; } - /// - /// The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur. - /// - /// The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur. - [JsonConverter(typeof(StringEnumConverter))] - public enum ScheduleEnum - { - /// - /// Enum BIWEEKLYON1STAND15THATMIDNIGHT for value: BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT - /// - [EnumMember(Value = "BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT")] - BIWEEKLYON1STAND15THATMIDNIGHT = 1, - - /// - /// Enum DAILY for value: DAILY - /// - [EnumMember(Value = "DAILY")] - DAILY = 2, - - /// - /// Enum DAILYAU for value: DAILY_AU - /// - [EnumMember(Value = "DAILY_AU")] - DAILYAU = 3, - - /// - /// Enum DAILYEU for value: DAILY_EU - /// - [EnumMember(Value = "DAILY_EU")] - DAILYEU = 4, - - /// - /// Enum DAILYSG for value: DAILY_SG - /// - [EnumMember(Value = "DAILY_SG")] - DAILYSG = 5, - - /// - /// Enum DAILYUS for value: DAILY_US - /// - [EnumMember(Value = "DAILY_US")] - DAILYUS = 6, - - /// - /// Enum HOLD for value: HOLD - /// - [EnumMember(Value = "HOLD")] - HOLD = 7, - - /// - /// Enum MONTHLY for value: MONTHLY - /// - [EnumMember(Value = "MONTHLY")] - MONTHLY = 8, - - /// - /// Enum WEEKLY for value: WEEKLY - /// - [EnumMember(Value = "WEEKLY")] - WEEKLY = 9, - - /// - /// Enum WEEKLYMONTOFRIAU for value: WEEKLY_MON_TO_FRI_AU - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_AU")] - WEEKLYMONTOFRIAU = 10, - - /// - /// Enum WEEKLYMONTOFRIEU for value: WEEKLY_MON_TO_FRI_EU - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_EU")] - WEEKLYMONTOFRIEU = 11, - - /// - /// Enum WEEKLYMONTOFRIUS for value: WEEKLY_MON_TO_FRI_US - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_US")] - WEEKLYMONTOFRIUS = 12, - - /// - /// Enum WEEKLYONTUEFRIMIDNIGHT for value: WEEKLY_ON_TUE_FRI_MIDNIGHT - /// - [EnumMember(Value = "WEEKLY_ON_TUE_FRI_MIDNIGHT")] - WEEKLYONTUEFRIMIDNIGHT = 13, - - /// - /// Enum WEEKLYSUNTOTHUAU for value: WEEKLY_SUN_TO_THU_AU - /// - [EnumMember(Value = "WEEKLY_SUN_TO_THU_AU")] - WEEKLYSUNTOTHUAU = 14, - - /// - /// Enum WEEKLYSUNTOTHUUS for value: WEEKLY_SUN_TO_THU_US - /// - [EnumMember(Value = "WEEKLY_SUN_TO_THU_US")] - WEEKLYSUNTOTHUUS = 15 - - } - - - /// - /// The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur. - /// - /// The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur. - [DataMember(Name = "schedule", IsRequired = false, EmitDefaultValue = false)] - public ScheduleEnum Schedule { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdatePayoutScheduleRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Direction on how to handle any payouts that have already been scheduled. Permitted values: * `CLOSE` will close the existing batch of payouts. * `UPDATE` will reschedule the existing batch to the new schedule. * `NOTHING` (**default**) will allow the payout to proceed.. - /// The reason for the payout schedule update. > This field is required when the `schedule` parameter is set to `HOLD`.. - /// The payout schedule to which the account is to be updated. Permitted values: `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. `HOLD` will prevent scheduled payouts from happening but will still allow manual payouts to occur. (required). - public UpdatePayoutScheduleRequest(ActionEnum? action = default(ActionEnum?), string reason = default(string), ScheduleEnum schedule = default(ScheduleEnum)) - { - this.Schedule = schedule; - this.Action = action; - this.Reason = reason; - } - - /// - /// The reason for the payout schedule update. > This field is required when the `schedule` parameter is set to `HOLD`. - /// - /// The reason for the payout schedule update. > This field is required when the `schedule` parameter is set to `HOLD`. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdatePayoutScheduleRequest {\n"); - sb.Append(" Action: ").Append(Action).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Schedule: ").Append(Schedule).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdatePayoutScheduleRequest); - } - - /// - /// Returns true if UpdatePayoutScheduleRequest instances are equal - /// - /// Instance of UpdatePayoutScheduleRequest to be compared - /// Boolean - public bool Equals(UpdatePayoutScheduleRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Action == input.Action || - this.Action.Equals(input.Action) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ) && - ( - this.Schedule == input.Schedule || - this.Schedule.Equals(input.Schedule) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Action.GetHashCode(); - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Schedule.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/UploadDocumentRequest.cs b/Adyen/Model/PlatformsAccount/UploadDocumentRequest.cs deleted file mode 100644 index cb4c7c743..000000000 --- a/Adyen/Model/PlatformsAccount/UploadDocumentRequest.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// UploadDocumentRequest - /// - [DataContract(Name = "UploadDocumentRequest")] - public partial class UploadDocumentRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UploadDocumentRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The content of the document, in Base64-encoded string format. To learn about document requirements, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks). (required). - /// documentDetail (required). - public UploadDocumentRequest(byte[] documentContent = default(byte[]), DocumentDetail documentDetail = default(DocumentDetail)) - { - this.DocumentContent = documentContent; - this.DocumentDetail = documentDetail; - } - - /// - /// The content of the document, in Base64-encoded string format. To learn about document requirements, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks). - /// - /// The content of the document, in Base64-encoded string format. To learn about document requirements, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks). - [DataMember(Name = "documentContent", IsRequired = false, EmitDefaultValue = false)] - public byte[] DocumentContent { get; set; } - - /// - /// Gets or Sets DocumentDetail - /// - [DataMember(Name = "documentDetail", IsRequired = false, EmitDefaultValue = false)] - public DocumentDetail DocumentDetail { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UploadDocumentRequest {\n"); - sb.Append(" DocumentContent: ").Append(DocumentContent).Append("\n"); - sb.Append(" DocumentDetail: ").Append(DocumentDetail).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UploadDocumentRequest); - } - - /// - /// Returns true if UploadDocumentRequest instances are equal - /// - /// Instance of UploadDocumentRequest to be compared - /// Boolean - public bool Equals(UploadDocumentRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.DocumentContent == input.DocumentContent || - (this.DocumentContent != null && - this.DocumentContent.Equals(input.DocumentContent)) - ) && - ( - this.DocumentDetail == input.DocumentDetail || - (this.DocumentDetail != null && - this.DocumentDetail.Equals(input.DocumentDetail)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DocumentContent != null) - { - hashCode = (hashCode * 59) + this.DocumentContent.GetHashCode(); - } - if (this.DocumentDetail != null) - { - hashCode = (hashCode * 59) + this.DocumentDetail.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/ViasAddress.cs b/Adyen/Model/PlatformsAccount/ViasAddress.cs deleted file mode 100644 index d1cb03e62..000000000 --- a/Adyen/Model/PlatformsAccount/ViasAddress.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// ViasAddress - /// - [DataContract(Name = "ViasAddress")] - public partial class ViasAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ViasAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided.. - /// The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**. (required). - /// The number or name of the house.. - /// The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries.. - /// The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. Maximum length: * 2 characters for addresses in the US or Canada. * 3 characters for all other countries. . - /// The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided.. - public ViasAddress(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.Country = country; - this.City = city; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - this.Street = street; - } - - /// - /// The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided. - /// - /// The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**. - /// - /// The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The number or name of the house. - /// - /// The number or name of the house. - [DataMember(Name = "houseNumberOrName", EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. - /// - /// The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. Maximum length: * 2 characters for addresses in the US or Canada. * 3 characters for all other countries. - /// - /// The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. Maximum length: * 2 characters for addresses in the US or Canada. * 3 characters for all other countries. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided. - /// - /// The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided. - [DataMember(Name = "street", EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ViasAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ViasAddress); - } - - /// - /// Returns true if ViasAddress instances are equal - /// - /// Instance of ViasAddress to be compared - /// Boolean - public bool Equals(ViasAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/ViasName.cs b/Adyen/Model/PlatformsAccount/ViasName.cs deleted file mode 100644 index 23b42dcb4..000000000 --- a/Adyen/Model/PlatformsAccount/ViasName.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// ViasName - /// - [DataContract(Name = "ViasName")] - public partial class ViasName : IEquatable, IValidatableObject - { - /// - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - /// - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - [JsonConverter(typeof(StringEnumConverter))] - public enum GenderEnum - { - /// - /// Enum MALE for value: MALE - /// - [EnumMember(Value = "MALE")] - MALE = 1, - - /// - /// Enum FEMALE for value: FEMALE - /// - [EnumMember(Value = "FEMALE")] - FEMALE = 2, - - /// - /// Enum UNKNOWN for value: UNKNOWN - /// - [EnumMember(Value = "UNKNOWN")] - UNKNOWN = 3 - - } - - - /// - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - /// - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - [DataMember(Name = "gender", EmitDefaultValue = false)] - public GenderEnum? Gender { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The first name.. - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`.. - /// The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed.. - /// The last name.. - public ViasName(string firstName = default(string), GenderEnum? gender = default(GenderEnum?), string infix = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.Gender = gender; - this.Infix = infix; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed. - /// - /// The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed. - [DataMember(Name = "infix", EmitDefaultValue = false)] - public string Infix { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ViasName {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" Gender: ").Append(Gender).Append("\n"); - sb.Append(" Infix: ").Append(Infix).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ViasName); - } - - /// - /// Returns true if ViasName instances are equal - /// - /// Instance of ViasName to be compared - /// Boolean - public bool Equals(ViasName input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.Gender == input.Gender || - this.Gender.Equals(input.Gender) - ) && - ( - this.Infix == input.Infix || - (this.Infix != null && - this.Infix.Equals(input.Infix)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Gender.GetHashCode(); - if (this.Infix != null) - { - hashCode = (hashCode * 59) + this.Infix.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // Infix (string) maxLength - if (this.Infix != null && this.Infix.Length > 20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Infix, length must be less than 20.", new [] { "Infix" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/ViasPersonalData.cs b/Adyen/Model/PlatformsAccount/ViasPersonalData.cs deleted file mode 100644 index 717b5b9d5..000000000 --- a/Adyen/Model/PlatformsAccount/ViasPersonalData.cs +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// ViasPersonalData - /// - [DataContract(Name = "ViasPersonalData")] - public partial class ViasPersonalData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.. - /// Array that contains information about the person's identification document. You can submit only one entry per document type.. - /// The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. . - public ViasPersonalData(string dateOfBirth = default(string), List documentData = default(List), string nationality = default(string)) - { - this.DateOfBirth = dateOfBirth; - this.DocumentData = documentData; - this.Nationality = nationality; - } - - /// - /// The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. - /// - /// The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - public string DateOfBirth { get; set; } - - /// - /// Array that contains information about the person's identification document. You can submit only one entry per document type. - /// - /// Array that contains information about the person's identification document. You can submit only one entry per document type. - [DataMember(Name = "documentData", EmitDefaultValue = false)] - public List DocumentData { get; set; } - - /// - /// The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. - /// - /// The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. - [DataMember(Name = "nationality", EmitDefaultValue = false)] - public string Nationality { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ViasPersonalData {\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DocumentData: ").Append(DocumentData).Append("\n"); - sb.Append(" Nationality: ").Append(Nationality).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ViasPersonalData); - } - - /// - /// Returns true if ViasPersonalData instances are equal - /// - /// Instance of ViasPersonalData to be compared - /// Boolean - public bool Equals(ViasPersonalData input) - { - if (input == null) - { - return false; - } - return - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DocumentData == input.DocumentData || - this.DocumentData != null && - input.DocumentData != null && - this.DocumentData.SequenceEqual(input.DocumentData) - ) && - ( - this.Nationality == input.Nationality || - (this.Nationality != null && - this.Nationality.Equals(input.Nationality)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DocumentData != null) - { - hashCode = (hashCode * 59) + this.DocumentData.GetHashCode(); - } - if (this.Nationality != null) - { - hashCode = (hashCode * 59) + this.Nationality.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Nationality (string) maxLength - if (this.Nationality != null && this.Nationality.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Nationality, length must be less than 2.", new [] { "Nationality" }); - } - - // Nationality (string) minLength - if (this.Nationality != null && this.Nationality.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Nationality, length must be greater than 2.", new [] { "Nationality" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsAccount/ViasPhoneNumber.cs b/Adyen/Model/PlatformsAccount/ViasPhoneNumber.cs deleted file mode 100644 index 72f4f3a86..000000000 --- a/Adyen/Model/PlatformsAccount/ViasPhoneNumber.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsAccount -{ - /// - /// ViasPhoneNumber - /// - [DataContract(Name = "ViasPhoneNumber")] - public partial class ViasPhoneNumber : IEquatable, IValidatableObject - { - /// - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. - /// - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PhoneTypeEnum - { - /// - /// Enum Fax for value: Fax - /// - [EnumMember(Value = "Fax")] - Fax = 1, - - /// - /// Enum Landline for value: Landline - /// - [EnumMember(Value = "Landline")] - Landline = 2, - - /// - /// Enum Mobile for value: Mobile - /// - [EnumMember(Value = "Mobile")] - Mobile = 3, - - /// - /// Enum SIP for value: SIP - /// - [EnumMember(Value = "SIP")] - SIP = 4 - - } - - - /// - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. - /// - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. - [DataMember(Name = "phoneType", EmitDefaultValue = false)] - public PhoneTypeEnum? PhoneType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').. - /// The phone number. >The inclusion of the phone number country code is not necessary.. - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`.. - public ViasPhoneNumber(string phoneCountryCode = default(string), string phoneNumber = default(string), PhoneTypeEnum? phoneType = default(PhoneTypeEnum?)) - { - this.PhoneCountryCode = phoneCountryCode; - this.PhoneNumber = phoneNumber; - this.PhoneType = phoneType; - } - - /// - /// The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). - /// - /// The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). - [DataMember(Name = "phoneCountryCode", EmitDefaultValue = false)] - public string PhoneCountryCode { get; set; } - - /// - /// The phone number. >The inclusion of the phone number country code is not necessary. - /// - /// The phone number. >The inclusion of the phone number country code is not necessary. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ViasPhoneNumber {\n"); - sb.Append(" PhoneCountryCode: ").Append(PhoneCountryCode).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" PhoneType: ").Append(PhoneType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ViasPhoneNumber); - } - - /// - /// Returns true if ViasPhoneNumber instances are equal - /// - /// Instance of ViasPhoneNumber to be compared - /// Boolean - public bool Equals(ViasPhoneNumber input) - { - if (input == null) - { - return false; - } - return - ( - this.PhoneCountryCode == input.PhoneCountryCode || - (this.PhoneCountryCode != null && - this.PhoneCountryCode.Equals(input.PhoneCountryCode)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.PhoneType == input.PhoneType || - this.PhoneType.Equals(input.PhoneType) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PhoneCountryCode != null) - { - hashCode = (hashCode * 59) + this.PhoneCountryCode.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PhoneType.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/AbstractOpenAPISchema.cs b/Adyen/Model/PlatformsFund/AbstractOpenAPISchema.cs deleted file mode 100644 index 70bcee092..000000000 --- a/Adyen/Model/PlatformsFund/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/PlatformsFund/AccountDetailBalance.cs b/Adyen/Model/PlatformsFund/AccountDetailBalance.cs deleted file mode 100644 index c8b8b8859..000000000 --- a/Adyen/Model/PlatformsFund/AccountDetailBalance.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// AccountDetailBalance - /// - [DataContract(Name = "AccountDetailBalance")] - public partial class AccountDetailBalance : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the account that holds the balance.. - /// detailBalance. - public AccountDetailBalance(string accountCode = default(string), DetailBalance detailBalance = default(DetailBalance)) - { - this.AccountCode = accountCode; - this.DetailBalance = detailBalance; - } - - /// - /// The code of the account that holds the balance. - /// - /// The code of the account that holds the balance. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// Gets or Sets DetailBalance - /// - [DataMember(Name = "detailBalance", EmitDefaultValue = false)] - public DetailBalance DetailBalance { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountDetailBalance {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" DetailBalance: ").Append(DetailBalance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountDetailBalance); - } - - /// - /// Returns true if AccountDetailBalance instances are equal - /// - /// Instance of AccountDetailBalance to be compared - /// Boolean - public bool Equals(AccountDetailBalance input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.DetailBalance == input.DetailBalance || - (this.DetailBalance != null && - this.DetailBalance.Equals(input.DetailBalance)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.DetailBalance != null) - { - hashCode = (hashCode * 59) + this.DetailBalance.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/AccountHolderBalanceRequest.cs b/Adyen/Model/PlatformsFund/AccountHolderBalanceRequest.cs deleted file mode 100644 index 516d2cab9..000000000 --- a/Adyen/Model/PlatformsFund/AccountHolderBalanceRequest.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// AccountHolderBalanceRequest - /// - [DataContract(Name = "AccountHolderBalanceRequest")] - public partial class AccountHolderBalanceRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderBalanceRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account Holder of which to retrieve the balance. (required). - public AccountHolderBalanceRequest(string accountHolderCode = default(string)) - { - this.AccountHolderCode = accountHolderCode; - } - - /// - /// The code of the Account Holder of which to retrieve the balance. - /// - /// The code of the Account Holder of which to retrieve the balance. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderBalanceRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderBalanceRequest); - } - - /// - /// Returns true if AccountHolderBalanceRequest instances are equal - /// - /// Instance of AccountHolderBalanceRequest to be compared - /// Boolean - public bool Equals(AccountHolderBalanceRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/AccountHolderBalanceResponse.cs b/Adyen/Model/PlatformsFund/AccountHolderBalanceResponse.cs deleted file mode 100644 index d16905118..000000000 --- a/Adyen/Model/PlatformsFund/AccountHolderBalanceResponse.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// AccountHolderBalanceResponse - /// - [DataContract(Name = "AccountHolderBalanceResponse")] - public partial class AccountHolderBalanceResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of each account and their balances.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// totalBalance. - public AccountHolderBalanceResponse(List balancePerAccount = default(List), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string), DetailBalance totalBalance = default(DetailBalance)) - { - this.BalancePerAccount = balancePerAccount; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.TotalBalance = totalBalance; - } - - /// - /// A list of each account and their balances. - /// - /// A list of each account and their balances. - [DataMember(Name = "balancePerAccount", EmitDefaultValue = false)] - public List BalancePerAccount { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Gets or Sets TotalBalance - /// - [DataMember(Name = "totalBalance", EmitDefaultValue = false)] - public DetailBalance TotalBalance { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderBalanceResponse {\n"); - sb.Append(" BalancePerAccount: ").Append(BalancePerAccount).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" TotalBalance: ").Append(TotalBalance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderBalanceResponse); - } - - /// - /// Returns true if AccountHolderBalanceResponse instances are equal - /// - /// Instance of AccountHolderBalanceResponse to be compared - /// Boolean - public bool Equals(AccountHolderBalanceResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePerAccount == input.BalancePerAccount || - this.BalancePerAccount != null && - input.BalancePerAccount != null && - this.BalancePerAccount.SequenceEqual(input.BalancePerAccount) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.TotalBalance == input.TotalBalance || - (this.TotalBalance != null && - this.TotalBalance.Equals(input.TotalBalance)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePerAccount != null) - { - hashCode = (hashCode * 59) + this.BalancePerAccount.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - if (this.TotalBalance != null) - { - hashCode = (hashCode * 59) + this.TotalBalance.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/AccountHolderTransactionListRequest.cs b/Adyen/Model/PlatformsFund/AccountHolderTransactionListRequest.cs deleted file mode 100644 index cec2574c3..000000000 --- a/Adyen/Model/PlatformsFund/AccountHolderTransactionListRequest.cs +++ /dev/null @@ -1,452 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// AccountHolderTransactionListRequest - /// - [DataContract(Name = "AccountHolderTransactionListRequest")] - public partial class AccountHolderTransactionListRequest : IEquatable, IValidatableObject - { - /// - /// Defines TransactionStatuses - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TransactionStatusesEnum - { - /// - /// Enum BalanceNotPaidOutTransfer for value: BalanceNotPaidOutTransfer - /// - [EnumMember(Value = "BalanceNotPaidOutTransfer")] - BalanceNotPaidOutTransfer = 1, - - /// - /// Enum BalancePlatformSweep for value: BalancePlatformSweep - /// - [EnumMember(Value = "BalancePlatformSweep")] - BalancePlatformSweep = 2, - - /// - /// Enum BalancePlatformSweepReturned for value: BalancePlatformSweepReturned - /// - [EnumMember(Value = "BalancePlatformSweepReturned")] - BalancePlatformSweepReturned = 3, - - /// - /// Enum Chargeback for value: Chargeback - /// - [EnumMember(Value = "Chargeback")] - Chargeback = 4, - - /// - /// Enum ChargebackCorrection for value: ChargebackCorrection - /// - [EnumMember(Value = "ChargebackCorrection")] - ChargebackCorrection = 5, - - /// - /// Enum ChargebackCorrectionReceived for value: ChargebackCorrectionReceived - /// - [EnumMember(Value = "ChargebackCorrectionReceived")] - ChargebackCorrectionReceived = 6, - - /// - /// Enum ChargebackReceived for value: ChargebackReceived - /// - [EnumMember(Value = "ChargebackReceived")] - ChargebackReceived = 7, - - /// - /// Enum ChargebackReversed for value: ChargebackReversed - /// - [EnumMember(Value = "ChargebackReversed")] - ChargebackReversed = 8, - - /// - /// Enum ChargebackReversedCorrection for value: ChargebackReversedCorrection - /// - [EnumMember(Value = "ChargebackReversedCorrection")] - ChargebackReversedCorrection = 9, - - /// - /// Enum ChargebackReversedCorrectionReceived for value: ChargebackReversedCorrectionReceived - /// - [EnumMember(Value = "ChargebackReversedCorrectionReceived")] - ChargebackReversedCorrectionReceived = 10, - - /// - /// Enum ChargebackReversedReceived for value: ChargebackReversedReceived - /// - [EnumMember(Value = "ChargebackReversedReceived")] - ChargebackReversedReceived = 11, - - /// - /// Enum Converted for value: Converted - /// - [EnumMember(Value = "Converted")] - Converted = 12, - - /// - /// Enum CreditClosed for value: CreditClosed - /// - [EnumMember(Value = "CreditClosed")] - CreditClosed = 13, - - /// - /// Enum CreditFailed for value: CreditFailed - /// - [EnumMember(Value = "CreditFailed")] - CreditFailed = 14, - - /// - /// Enum CreditReversed for value: CreditReversed - /// - [EnumMember(Value = "CreditReversed")] - CreditReversed = 15, - - /// - /// Enum CreditReversedReceived for value: CreditReversedReceived - /// - [EnumMember(Value = "CreditReversedReceived")] - CreditReversedReceived = 16, - - /// - /// Enum CreditSuspended for value: CreditSuspended - /// - [EnumMember(Value = "CreditSuspended")] - CreditSuspended = 17, - - /// - /// Enum Credited for value: Credited - /// - [EnumMember(Value = "Credited")] - Credited = 18, - - /// - /// Enum DebitFailed for value: DebitFailed - /// - [EnumMember(Value = "DebitFailed")] - DebitFailed = 19, - - /// - /// Enum DebitReversedReceived for value: DebitReversedReceived - /// - [EnumMember(Value = "DebitReversedReceived")] - DebitReversedReceived = 20, - - /// - /// Enum Debited for value: Debited - /// - [EnumMember(Value = "Debited")] - Debited = 21, - - /// - /// Enum DebitedReversed for value: DebitedReversed - /// - [EnumMember(Value = "DebitedReversed")] - DebitedReversed = 22, - - /// - /// Enum DepositCorrectionCredited for value: DepositCorrectionCredited - /// - [EnumMember(Value = "DepositCorrectionCredited")] - DepositCorrectionCredited = 23, - - /// - /// Enum DepositCorrectionDebited for value: DepositCorrectionDebited - /// - [EnumMember(Value = "DepositCorrectionDebited")] - DepositCorrectionDebited = 24, - - /// - /// Enum Fee for value: Fee - /// - [EnumMember(Value = "Fee")] - Fee = 25, - - /// - /// Enum FundTransfer for value: FundTransfer - /// - [EnumMember(Value = "FundTransfer")] - FundTransfer = 26, - - /// - /// Enum FundTransferReversed for value: FundTransferReversed - /// - [EnumMember(Value = "FundTransferReversed")] - FundTransferReversed = 27, - - /// - /// Enum InvoiceDeductionCredited for value: InvoiceDeductionCredited - /// - [EnumMember(Value = "InvoiceDeductionCredited")] - InvoiceDeductionCredited = 28, - - /// - /// Enum InvoiceDeductionDebited for value: InvoiceDeductionDebited - /// - [EnumMember(Value = "InvoiceDeductionDebited")] - InvoiceDeductionDebited = 29, - - /// - /// Enum ManualCorrected for value: ManualCorrected - /// - [EnumMember(Value = "ManualCorrected")] - ManualCorrected = 30, - - /// - /// Enum ManualCorrectionCredited for value: ManualCorrectionCredited - /// - [EnumMember(Value = "ManualCorrectionCredited")] - ManualCorrectionCredited = 31, - - /// - /// Enum ManualCorrectionDebited for value: ManualCorrectionDebited - /// - [EnumMember(Value = "ManualCorrectionDebited")] - ManualCorrectionDebited = 32, - - /// - /// Enum MerchantPayin for value: MerchantPayin - /// - [EnumMember(Value = "MerchantPayin")] - MerchantPayin = 33, - - /// - /// Enum MerchantPayinReversed for value: MerchantPayinReversed - /// - [EnumMember(Value = "MerchantPayinReversed")] - MerchantPayinReversed = 34, - - /// - /// Enum Payout for value: Payout - /// - [EnumMember(Value = "Payout")] - Payout = 35, - - /// - /// Enum PayoutReversed for value: PayoutReversed - /// - [EnumMember(Value = "PayoutReversed")] - PayoutReversed = 36, - - /// - /// Enum PendingCredit for value: PendingCredit - /// - [EnumMember(Value = "PendingCredit")] - PendingCredit = 37, - - /// - /// Enum PendingDebit for value: PendingDebit - /// - [EnumMember(Value = "PendingDebit")] - PendingDebit = 38, - - /// - /// Enum PendingFundTransfer for value: PendingFundTransfer - /// - [EnumMember(Value = "PendingFundTransfer")] - PendingFundTransfer = 39, - - /// - /// Enum ReCredited for value: ReCredited - /// - [EnumMember(Value = "ReCredited")] - ReCredited = 40, - - /// - /// Enum ReCreditedReceived for value: ReCreditedReceived - /// - [EnumMember(Value = "ReCreditedReceived")] - ReCreditedReceived = 41, - - /// - /// Enum SecondChargeback for value: SecondChargeback - /// - [EnumMember(Value = "SecondChargeback")] - SecondChargeback = 42, - - /// - /// Enum SecondChargebackCorrection for value: SecondChargebackCorrection - /// - [EnumMember(Value = "SecondChargebackCorrection")] - SecondChargebackCorrection = 43, - - /// - /// Enum SecondChargebackCorrectionReceived for value: SecondChargebackCorrectionReceived - /// - [EnumMember(Value = "SecondChargebackCorrectionReceived")] - SecondChargebackCorrectionReceived = 44, - - /// - /// Enum SecondChargebackReceived for value: SecondChargebackReceived - /// - [EnumMember(Value = "SecondChargebackReceived")] - SecondChargebackReceived = 45 - - } - - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderTransactionListRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder that owns the account(s) of which retrieve the transaction list. (required). - /// A list of accounts to include in the transaction list. If left blank, the last fifty (50) transactions for all accounts of the account holder will be included.. - /// A list of statuses to include in the transaction list. If left blank, all transactions will be included. >Permitted values: >* `PendingCredit` - a pending balance credit. >* `CreditFailed` - a pending credit failure; the balance will not be credited. >* `Credited` - a credited balance. >* `PendingDebit` - a pending balance debit (e.g., a refund). >* `CreditClosed` - a pending credit closed; the balance will not be credited. >* `CreditSuspended` - a pending credit closed; the balance will not be credited. >* `DebitFailed` - a pending debit failure; the balance will not be debited. >* `Debited` - a debited balance (e.g., a refund). >* `DebitReversedReceived` - a pending refund reversal. >* `DebitedReversed` - a reversed refund. >* `ChargebackReceived` - a received chargeback request. >* `Chargeback` - a processed chargeback. >* `ChargebackReversedReceived` - a pending chargeback reversal. >* `ChargebackReversed` - a reversed chargeback. >* `Converted` - converted. >* `ManualCorrected` - manual booking/adjustment by Adyen. >* `Payout` - a payout. >* `PayoutReversed` - a reversed payout. >* `PendingFundTransfer` - a pending transfer of funds from one account to another. >* `FundTransfer` - a transfer of funds from one account to another.. - public AccountHolderTransactionListRequest(string accountHolderCode = default(string), List transactionListsPerAccount = default(List), List transactionStatuses = default(List)) - { - this.AccountHolderCode = accountHolderCode; - this.TransactionListsPerAccount = transactionListsPerAccount; - this.TransactionStatuses = transactionStatuses; - } - - /// - /// The code of the account holder that owns the account(s) of which retrieve the transaction list. - /// - /// The code of the account holder that owns the account(s) of which retrieve the transaction list. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// A list of accounts to include in the transaction list. If left blank, the last fifty (50) transactions for all accounts of the account holder will be included. - /// - /// A list of accounts to include in the transaction list. If left blank, the last fifty (50) transactions for all accounts of the account holder will be included. - [DataMember(Name = "transactionListsPerAccount", EmitDefaultValue = false)] - public List TransactionListsPerAccount { get; set; } - - /// - /// A list of statuses to include in the transaction list. If left blank, all transactions will be included. >Permitted values: >* `PendingCredit` - a pending balance credit. >* `CreditFailed` - a pending credit failure; the balance will not be credited. >* `Credited` - a credited balance. >* `PendingDebit` - a pending balance debit (e.g., a refund). >* `CreditClosed` - a pending credit closed; the balance will not be credited. >* `CreditSuspended` - a pending credit closed; the balance will not be credited. >* `DebitFailed` - a pending debit failure; the balance will not be debited. >* `Debited` - a debited balance (e.g., a refund). >* `DebitReversedReceived` - a pending refund reversal. >* `DebitedReversed` - a reversed refund. >* `ChargebackReceived` - a received chargeback request. >* `Chargeback` - a processed chargeback. >* `ChargebackReversedReceived` - a pending chargeback reversal. >* `ChargebackReversed` - a reversed chargeback. >* `Converted` - converted. >* `ManualCorrected` - manual booking/adjustment by Adyen. >* `Payout` - a payout. >* `PayoutReversed` - a reversed payout. >* `PendingFundTransfer` - a pending transfer of funds from one account to another. >* `FundTransfer` - a transfer of funds from one account to another. - /// - /// A list of statuses to include in the transaction list. If left blank, all transactions will be included. >Permitted values: >* `PendingCredit` - a pending balance credit. >* `CreditFailed` - a pending credit failure; the balance will not be credited. >* `Credited` - a credited balance. >* `PendingDebit` - a pending balance debit (e.g., a refund). >* `CreditClosed` - a pending credit closed; the balance will not be credited. >* `CreditSuspended` - a pending credit closed; the balance will not be credited. >* `DebitFailed` - a pending debit failure; the balance will not be debited. >* `Debited` - a debited balance (e.g., a refund). >* `DebitReversedReceived` - a pending refund reversal. >* `DebitedReversed` - a reversed refund. >* `ChargebackReceived` - a received chargeback request. >* `Chargeback` - a processed chargeback. >* `ChargebackReversedReceived` - a pending chargeback reversal. >* `ChargebackReversed` - a reversed chargeback. >* `Converted` - converted. >* `ManualCorrected` - manual booking/adjustment by Adyen. >* `Payout` - a payout. >* `PayoutReversed` - a reversed payout. >* `PendingFundTransfer` - a pending transfer of funds from one account to another. >* `FundTransfer` - a transfer of funds from one account to another. - [DataMember(Name = "transactionStatuses", EmitDefaultValue = false)] - public List TransactionStatuses { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderTransactionListRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" TransactionListsPerAccount: ").Append(TransactionListsPerAccount).Append("\n"); - sb.Append(" TransactionStatuses: ").Append(TransactionStatuses).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderTransactionListRequest); - } - - /// - /// Returns true if AccountHolderTransactionListRequest instances are equal - /// - /// Instance of AccountHolderTransactionListRequest to be compared - /// Boolean - public bool Equals(AccountHolderTransactionListRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.TransactionListsPerAccount == input.TransactionListsPerAccount || - this.TransactionListsPerAccount != null && - input.TransactionListsPerAccount != null && - this.TransactionListsPerAccount.SequenceEqual(input.TransactionListsPerAccount) - ) && - ( - this.TransactionStatuses == input.TransactionStatuses || - this.TransactionStatuses != null && - input.TransactionStatuses != null && - this.TransactionStatuses.SequenceEqual(input.TransactionStatuses) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.TransactionListsPerAccount != null) - { - hashCode = (hashCode * 59) + this.TransactionListsPerAccount.GetHashCode(); - } - if (this.TransactionStatuses != null) - { - hashCode = (hashCode * 59) + this.TransactionStatuses.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/AccountHolderTransactionListResponse.cs b/Adyen/Model/PlatformsFund/AccountHolderTransactionListResponse.cs deleted file mode 100644 index 4aa03ef98..000000000 --- a/Adyen/Model/PlatformsFund/AccountHolderTransactionListResponse.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// AccountHolderTransactionListResponse - /// - [DataContract(Name = "AccountHolderTransactionListResponse")] - public partial class AccountHolderTransactionListResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the transactions.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public AccountHolderTransactionListResponse(List accountTransactionLists = default(List), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.AccountTransactionLists = accountTransactionLists; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// A list of the transactions. - /// - /// A list of the transactions. - [DataMember(Name = "accountTransactionLists", EmitDefaultValue = false)] - public List AccountTransactionLists { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderTransactionListResponse {\n"); - sb.Append(" AccountTransactionLists: ").Append(AccountTransactionLists).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderTransactionListResponse); - } - - /// - /// Returns true if AccountHolderTransactionListResponse instances are equal - /// - /// Instance of AccountHolderTransactionListResponse to be compared - /// Boolean - public bool Equals(AccountHolderTransactionListResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountTransactionLists == input.AccountTransactionLists || - this.AccountTransactionLists != null && - input.AccountTransactionLists != null && - this.AccountTransactionLists.SequenceEqual(input.AccountTransactionLists) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountTransactionLists != null) - { - hashCode = (hashCode * 59) + this.AccountTransactionLists.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/AccountTransactionList.cs b/Adyen/Model/PlatformsFund/AccountTransactionList.cs deleted file mode 100644 index 63699a1bd..000000000 --- a/Adyen/Model/PlatformsFund/AccountTransactionList.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// AccountTransactionList - /// - [DataContract(Name = "AccountTransactionList")] - public partial class AccountTransactionList : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the account.. - /// Indicates whether there is a next page of transactions available.. - /// The list of transactions.. - public AccountTransactionList(string accountCode = default(string), bool? hasNextPage = default(bool?), List transactions = default(List)) - { - this.AccountCode = accountCode; - this.HasNextPage = hasNextPage; - this.Transactions = transactions; - } - - /// - /// The code of the account. - /// - /// The code of the account. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// Indicates whether there is a next page of transactions available. - /// - /// Indicates whether there is a next page of transactions available. - [DataMember(Name = "hasNextPage", EmitDefaultValue = false)] - public bool? HasNextPage { get; set; } - - /// - /// The list of transactions. - /// - /// The list of transactions. - [DataMember(Name = "transactions", EmitDefaultValue = false)] - public List Transactions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountTransactionList {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" HasNextPage: ").Append(HasNextPage).Append("\n"); - sb.Append(" Transactions: ").Append(Transactions).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountTransactionList); - } - - /// - /// Returns true if AccountTransactionList instances are equal - /// - /// Instance of AccountTransactionList to be compared - /// Boolean - public bool Equals(AccountTransactionList input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.HasNextPage == input.HasNextPage || - this.HasNextPage.Equals(input.HasNextPage) - ) && - ( - this.Transactions == input.Transactions || - this.Transactions != null && - input.Transactions != null && - this.Transactions.SequenceEqual(input.Transactions) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasNextPage.GetHashCode(); - if (this.Transactions != null) - { - hashCode = (hashCode * 59) + this.Transactions.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/Amount.cs b/Adyen/Model/PlatformsFund/Amount.cs deleted file mode 100644 index 606de2fb4..000000000 --- a/Adyen/Model/PlatformsFund/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/BankAccountDetail.cs b/Adyen/Model/PlatformsFund/BankAccountDetail.cs deleted file mode 100644 index 6adfc189a..000000000 --- a/Adyen/Model/PlatformsFund/BankAccountDetail.cs +++ /dev/null @@ -1,601 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// BankAccountDetail - /// - [DataContract(Name = "BankAccountDetail")] - public partial class BankAccountDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the bank account.. - /// Merchant reference to the bank account.. - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. . - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). . - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31).. - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// If set to true, the bank account is a primary account.. - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - public BankAccountDetail(string accountNumber = default(string), string accountType = default(string), string bankAccountName = default(string), string bankAccountReference = default(string), string bankAccountUUID = default(string), string bankBicSwift = default(string), string bankCity = default(string), string bankCode = default(string), string bankName = default(string), string branchCode = default(string), string checkCode = default(string), string countryCode = default(string), string currencyCode = default(string), string iban = default(string), string ownerCity = default(string), string ownerCountryCode = default(string), string ownerDateOfBirth = default(string), string ownerHouseNumberOrName = default(string), string ownerName = default(string), string ownerNationality = default(string), string ownerPostalCode = default(string), string ownerState = default(string), string ownerStreet = default(string), bool? primaryAccount = default(bool?), string taxId = default(string), string urlForVerification = default(string)) - { - this.AccountNumber = accountNumber; - this.AccountType = accountType; - this.BankAccountName = bankAccountName; - this.BankAccountReference = bankAccountReference; - this.BankAccountUUID = bankAccountUUID; - this.BankBicSwift = bankBicSwift; - this.BankCity = bankCity; - this.BankCode = bankCode; - this.BankName = bankName; - this.BranchCode = branchCode; - this.CheckCode = checkCode; - this.CountryCode = countryCode; - this.CurrencyCode = currencyCode; - this.Iban = iban; - this.OwnerCity = ownerCity; - this.OwnerCountryCode = ownerCountryCode; - this.OwnerDateOfBirth = ownerDateOfBirth; - this.OwnerHouseNumberOrName = ownerHouseNumberOrName; - this.OwnerName = ownerName; - this.OwnerNationality = ownerNationality; - this.OwnerPostalCode = ownerPostalCode; - this.OwnerState = ownerState; - this.OwnerStreet = ownerStreet; - this.PrimaryAccount = primaryAccount; - this.TaxId = taxId; - this.UrlForVerification = urlForVerification; - } - - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "accountNumber", EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public string AccountType { get; set; } - - /// - /// The name of the bank account. - /// - /// The name of the bank account. - [DataMember(Name = "bankAccountName", EmitDefaultValue = false)] - public string BankAccountName { get; set; } - - /// - /// Merchant reference to the bank account. - /// - /// Merchant reference to the bank account. - [DataMember(Name = "bankAccountReference", EmitDefaultValue = false)] - public string BankAccountReference { get; set; } - - /// - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. - /// - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankBicSwift", EmitDefaultValue = false)] - public string BankBicSwift { get; set; } - - /// - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankCity", EmitDefaultValue = false)] - public string BankCity { get; set; } - - /// - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankCode", EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankName", EmitDefaultValue = false)] - public string BankName { get; set; } - - /// - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "branchCode", EmitDefaultValue = false)] - public string BranchCode { get; set; } - - /// - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "checkCode", EmitDefaultValue = false)] - public string CheckCode { get; set; } - - /// - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). - /// - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). - [DataMember(Name = "currencyCode", EmitDefaultValue = false)] - public string CurrencyCode { get; set; } - - /// - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerCity", EmitDefaultValue = false)] - public string OwnerCity { get; set; } - - /// - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerCountryCode", EmitDefaultValue = false)] - public string OwnerCountryCode { get; set; } - - /// - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). - /// - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). - [DataMember(Name = "ownerDateOfBirth", EmitDefaultValue = false)] - [Obsolete] - public string OwnerDateOfBirth { get; set; } - - /// - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerHouseNumberOrName", EmitDefaultValue = false)] - public string OwnerHouseNumberOrName { get; set; } - - /// - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerNationality", EmitDefaultValue = false)] - public string OwnerNationality { get; set; } - - /// - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerPostalCode", EmitDefaultValue = false)] - public string OwnerPostalCode { get; set; } - - /// - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerState", EmitDefaultValue = false)] - public string OwnerState { get; set; } - - /// - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerStreet", EmitDefaultValue = false)] - public string OwnerStreet { get; set; } - - /// - /// If set to true, the bank account is a primary account. - /// - /// If set to true, the bank account is a primary account. - [DataMember(Name = "primaryAccount", EmitDefaultValue = false)] - public bool? PrimaryAccount { get; set; } - - /// - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "urlForVerification", EmitDefaultValue = false)] - public string UrlForVerification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountDetail {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" BankAccountName: ").Append(BankAccountName).Append("\n"); - sb.Append(" BankAccountReference: ").Append(BankAccountReference).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" BankBicSwift: ").Append(BankBicSwift).Append("\n"); - sb.Append(" BankCity: ").Append(BankCity).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" BankName: ").Append(BankName).Append("\n"); - sb.Append(" BranchCode: ").Append(BranchCode).Append("\n"); - sb.Append(" CheckCode: ").Append(CheckCode).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" OwnerCity: ").Append(OwnerCity).Append("\n"); - sb.Append(" OwnerCountryCode: ").Append(OwnerCountryCode).Append("\n"); - sb.Append(" OwnerDateOfBirth: ").Append(OwnerDateOfBirth).Append("\n"); - sb.Append(" OwnerHouseNumberOrName: ").Append(OwnerHouseNumberOrName).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" OwnerNationality: ").Append(OwnerNationality).Append("\n"); - sb.Append(" OwnerPostalCode: ").Append(OwnerPostalCode).Append("\n"); - sb.Append(" OwnerState: ").Append(OwnerState).Append("\n"); - sb.Append(" OwnerStreet: ").Append(OwnerStreet).Append("\n"); - sb.Append(" PrimaryAccount: ").Append(PrimaryAccount).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append(" UrlForVerification: ").Append(UrlForVerification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountDetail); - } - - /// - /// Returns true if BankAccountDetail instances are equal - /// - /// Instance of BankAccountDetail to be compared - /// Boolean - public bool Equals(BankAccountDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.BankAccountName == input.BankAccountName || - (this.BankAccountName != null && - this.BankAccountName.Equals(input.BankAccountName)) - ) && - ( - this.BankAccountReference == input.BankAccountReference || - (this.BankAccountReference != null && - this.BankAccountReference.Equals(input.BankAccountReference)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.BankBicSwift == input.BankBicSwift || - (this.BankBicSwift != null && - this.BankBicSwift.Equals(input.BankBicSwift)) - ) && - ( - this.BankCity == input.BankCity || - (this.BankCity != null && - this.BankCity.Equals(input.BankCity)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.BankName == input.BankName || - (this.BankName != null && - this.BankName.Equals(input.BankName)) - ) && - ( - this.BranchCode == input.BranchCode || - (this.BranchCode != null && - this.BranchCode.Equals(input.BranchCode)) - ) && - ( - this.CheckCode == input.CheckCode || - (this.CheckCode != null && - this.CheckCode.Equals(input.CheckCode)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.OwnerCity == input.OwnerCity || - (this.OwnerCity != null && - this.OwnerCity.Equals(input.OwnerCity)) - ) && - ( - this.OwnerCountryCode == input.OwnerCountryCode || - (this.OwnerCountryCode != null && - this.OwnerCountryCode.Equals(input.OwnerCountryCode)) - ) && - ( - this.OwnerDateOfBirth == input.OwnerDateOfBirth || - (this.OwnerDateOfBirth != null && - this.OwnerDateOfBirth.Equals(input.OwnerDateOfBirth)) - ) && - ( - this.OwnerHouseNumberOrName == input.OwnerHouseNumberOrName || - (this.OwnerHouseNumberOrName != null && - this.OwnerHouseNumberOrName.Equals(input.OwnerHouseNumberOrName)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.OwnerNationality == input.OwnerNationality || - (this.OwnerNationality != null && - this.OwnerNationality.Equals(input.OwnerNationality)) - ) && - ( - this.OwnerPostalCode == input.OwnerPostalCode || - (this.OwnerPostalCode != null && - this.OwnerPostalCode.Equals(input.OwnerPostalCode)) - ) && - ( - this.OwnerState == input.OwnerState || - (this.OwnerState != null && - this.OwnerState.Equals(input.OwnerState)) - ) && - ( - this.OwnerStreet == input.OwnerStreet || - (this.OwnerStreet != null && - this.OwnerStreet.Equals(input.OwnerStreet)) - ) && - ( - this.PrimaryAccount == input.PrimaryAccount || - this.PrimaryAccount.Equals(input.PrimaryAccount) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.UrlForVerification == input.UrlForVerification || - (this.UrlForVerification != null && - this.UrlForVerification.Equals(input.UrlForVerification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.BankAccountName != null) - { - hashCode = (hashCode * 59) + this.BankAccountName.GetHashCode(); - } - if (this.BankAccountReference != null) - { - hashCode = (hashCode * 59) + this.BankAccountReference.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.BankBicSwift != null) - { - hashCode = (hashCode * 59) + this.BankBicSwift.GetHashCode(); - } - if (this.BankCity != null) - { - hashCode = (hashCode * 59) + this.BankCity.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - if (this.BankName != null) - { - hashCode = (hashCode * 59) + this.BankName.GetHashCode(); - } - if (this.BranchCode != null) - { - hashCode = (hashCode * 59) + this.BranchCode.GetHashCode(); - } - if (this.CheckCode != null) - { - hashCode = (hashCode * 59) + this.CheckCode.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.CurrencyCode != null) - { - hashCode = (hashCode * 59) + this.CurrencyCode.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.OwnerCity != null) - { - hashCode = (hashCode * 59) + this.OwnerCity.GetHashCode(); - } - if (this.OwnerCountryCode != null) - { - hashCode = (hashCode * 59) + this.OwnerCountryCode.GetHashCode(); - } - if (this.OwnerDateOfBirth != null) - { - hashCode = (hashCode * 59) + this.OwnerDateOfBirth.GetHashCode(); - } - if (this.OwnerHouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.OwnerHouseNumberOrName.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.OwnerNationality != null) - { - hashCode = (hashCode * 59) + this.OwnerNationality.GetHashCode(); - } - if (this.OwnerPostalCode != null) - { - hashCode = (hashCode * 59) + this.OwnerPostalCode.GetHashCode(); - } - if (this.OwnerState != null) - { - hashCode = (hashCode * 59) + this.OwnerState.GetHashCode(); - } - if (this.OwnerStreet != null) - { - hashCode = (hashCode * 59) + this.OwnerStreet.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrimaryAccount.GetHashCode(); - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.UrlForVerification != null) - { - hashCode = (hashCode * 59) + this.UrlForVerification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/DebitAccountHolderRequest.cs b/Adyen/Model/PlatformsFund/DebitAccountHolderRequest.cs deleted file mode 100644 index 79d8da4ff..000000000 --- a/Adyen/Model/PlatformsFund/DebitAccountHolderRequest.cs +++ /dev/null @@ -1,235 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// DebitAccountHolderRequest - /// - [DataContract(Name = "DebitAccountHolderRequest")] - public partial class DebitAccountHolderRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DebitAccountHolderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder. (required). - /// amount (required). - /// The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account. (required). - /// A description of the direct debit. Maximum length: 35 characters. Allowed characters: **a-z**, **A-Z**, **0-9**, and special characters **_/?:().,'+ \";**.. - /// Your merchant account. (required). - /// Contains instructions on how to split the funds between the accounts in your platform. The request must have at least one split item. (required). - public DebitAccountHolderRequest(string accountHolderCode = default(string), Amount amount = default(Amount), string bankAccountUUID = default(string), string description = default(string), string merchantAccount = default(string), List splits = default(List)) - { - this.AccountHolderCode = accountHolderCode; - this.Amount = amount; - this.BankAccountUUID = bankAccountUUID; - this.MerchantAccount = merchantAccount; - this.Splits = splits; - this.Description = description; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account. - /// - /// The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account. - [DataMember(Name = "bankAccountUUID", IsRequired = false, EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// A description of the direct debit. Maximum length: 35 characters. Allowed characters: **a-z**, **A-Z**, **0-9**, and special characters **_/?:().,'+ \";**. - /// - /// A description of the direct debit. Maximum length: 35 characters. Allowed characters: **a-z**, **A-Z**, **0-9**, and special characters **_/?:().,'+ \";**. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Your merchant account. - /// - /// Your merchant account. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Contains instructions on how to split the funds between the accounts in your platform. The request must have at least one split item. - /// - /// Contains instructions on how to split the funds between the accounts in your platform. The request must have at least one split item. - [DataMember(Name = "splits", IsRequired = false, EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DebitAccountHolderRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DebitAccountHolderRequest); - } - - /// - /// Returns true if DebitAccountHolderRequest instances are equal - /// - /// Instance of DebitAccountHolderRequest to be compared - /// Boolean - public bool Equals(DebitAccountHolderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 35) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 35.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/DebitAccountHolderResponse.cs b/Adyen/Model/PlatformsFund/DebitAccountHolderResponse.cs deleted file mode 100644 index f3cc00c91..000000000 --- a/Adyen/Model/PlatformsFund/DebitAccountHolderResponse.cs +++ /dev/null @@ -1,226 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// DebitAccountHolderResponse - /// - [DataContract(Name = "DebitAccountHolderResponse")] - public partial class DebitAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder.. - /// The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account.. - /// Contains field validation errors that would prevent requests from being processed.. - /// List of the `reference` values from the `split` array in the request.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public DebitAccountHolderResponse(string accountHolderCode = default(string), string bankAccountUUID = default(string), List invalidFields = default(List), List merchantReferences = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.BankAccountUUID = bankAccountUUID; - this.InvalidFields = invalidFields; - this.MerchantReferences = merchantReferences; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account. - /// - /// The Adyen-generated unique alphanumeric identifier (UUID) of the account holder's bank account. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// List of the `reference` values from the `split` array in the request. - /// - /// List of the `reference` values from the `split` array in the request. - [DataMember(Name = "merchantReferences", EmitDefaultValue = false)] - public List MerchantReferences { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DebitAccountHolderResponse {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantReferences: ").Append(MerchantReferences).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DebitAccountHolderResponse); - } - - /// - /// Returns true if DebitAccountHolderResponse instances are equal - /// - /// Instance of DebitAccountHolderResponse to be compared - /// Boolean - public bool Equals(DebitAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantReferences == input.MerchantReferences || - this.MerchantReferences != null && - input.MerchantReferences != null && - this.MerchantReferences.SequenceEqual(input.MerchantReferences) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantReferences != null) - { - hashCode = (hashCode * 59) + this.MerchantReferences.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/DetailBalance.cs b/Adyen/Model/PlatformsFund/DetailBalance.cs deleted file mode 100644 index 776094781..000000000 --- a/Adyen/Model/PlatformsFund/DetailBalance.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// DetailBalance - /// - [DataContract(Name = "DetailBalance")] - public partial class DetailBalance : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The list of balances held by the account.. - /// The list of on hold balances held by the account.. - /// The list of pending balances held by the account.. - public DetailBalance(List balance = default(List), List onHoldBalance = default(List), List pendingBalance = default(List)) - { - this.Balance = balance; - this.OnHoldBalance = onHoldBalance; - this.PendingBalance = pendingBalance; - } - - /// - /// The list of balances held by the account. - /// - /// The list of balances held by the account. - [DataMember(Name = "balance", EmitDefaultValue = false)] - public List Balance { get; set; } - - /// - /// The list of on hold balances held by the account. - /// - /// The list of on hold balances held by the account. - [DataMember(Name = "onHoldBalance", EmitDefaultValue = false)] - public List OnHoldBalance { get; set; } - - /// - /// The list of pending balances held by the account. - /// - /// The list of pending balances held by the account. - [DataMember(Name = "pendingBalance", EmitDefaultValue = false)] - public List PendingBalance { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DetailBalance {\n"); - sb.Append(" Balance: ").Append(Balance).Append("\n"); - sb.Append(" OnHoldBalance: ").Append(OnHoldBalance).Append("\n"); - sb.Append(" PendingBalance: ").Append(PendingBalance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DetailBalance); - } - - /// - /// Returns true if DetailBalance instances are equal - /// - /// Instance of DetailBalance to be compared - /// Boolean - public bool Equals(DetailBalance input) - { - if (input == null) - { - return false; - } - return - ( - this.Balance == input.Balance || - this.Balance != null && - input.Balance != null && - this.Balance.SequenceEqual(input.Balance) - ) && - ( - this.OnHoldBalance == input.OnHoldBalance || - this.OnHoldBalance != null && - input.OnHoldBalance != null && - this.OnHoldBalance.SequenceEqual(input.OnHoldBalance) - ) && - ( - this.PendingBalance == input.PendingBalance || - this.PendingBalance != null && - input.PendingBalance != null && - this.PendingBalance.SequenceEqual(input.PendingBalance) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Balance != null) - { - hashCode = (hashCode * 59) + this.Balance.GetHashCode(); - } - if (this.OnHoldBalance != null) - { - hashCode = (hashCode * 59) + this.OnHoldBalance.GetHashCode(); - } - if (this.PendingBalance != null) - { - hashCode = (hashCode * 59) + this.PendingBalance.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/ErrorFieldType.cs b/Adyen/Model/PlatformsFund/ErrorFieldType.cs deleted file mode 100644 index b78781289..000000000 --- a/Adyen/Model/PlatformsFund/ErrorFieldType.cs +++ /dev/null @@ -1,162 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// ErrorFieldType - /// - [DataContract(Name = "ErrorFieldType")] - public partial class ErrorFieldType : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The validation error code.. - /// A description of the validation error.. - /// fieldType. - public ErrorFieldType(int? errorCode = default(int?), string errorDescription = default(string), FieldType fieldType = default(FieldType)) - { - this.ErrorCode = errorCode; - this.ErrorDescription = errorDescription; - this.FieldType = fieldType; - } - - /// - /// The validation error code. - /// - /// The validation error code. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public int? ErrorCode { get; set; } - - /// - /// A description of the validation error. - /// - /// A description of the validation error. - [DataMember(Name = "errorDescription", EmitDefaultValue = false)] - public string ErrorDescription { get; set; } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name = "fieldType", EmitDefaultValue = false)] - public FieldType FieldType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ErrorFieldType {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); - sb.Append(" FieldType: ").Append(FieldType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ErrorFieldType); - } - - /// - /// Returns true if ErrorFieldType instances are equal - /// - /// Instance of ErrorFieldType to be compared - /// Boolean - public bool Equals(ErrorFieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - this.ErrorCode.Equals(input.ErrorCode) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.FieldType != null) - { - hashCode = (hashCode * 59) + this.FieldType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/FieldType.cs b/Adyen/Model/PlatformsFund/FieldType.cs deleted file mode 100644 index 46c929248..000000000 --- a/Adyen/Model/PlatformsFund/FieldType.cs +++ /dev/null @@ -1,1144 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// FieldType - /// - [DataContract(Name = "FieldType")] - public partial class FieldType : IEquatable, IValidatableObject - { - /// - /// The type of the field. - /// - /// The type of the field. - [JsonConverter(typeof(StringEnumConverter))] - public enum FieldNameEnum - { - /// - /// Enum AccountCode for value: accountCode - /// - [EnumMember(Value = "accountCode")] - AccountCode = 1, - - /// - /// Enum AccountHolderCode for value: accountHolderCode - /// - [EnumMember(Value = "accountHolderCode")] - AccountHolderCode = 2, - - /// - /// Enum AccountHolderDetails for value: accountHolderDetails - /// - [EnumMember(Value = "accountHolderDetails")] - AccountHolderDetails = 3, - - /// - /// Enum AccountNumber for value: accountNumber - /// - [EnumMember(Value = "accountNumber")] - AccountNumber = 4, - - /// - /// Enum AccountStateType for value: accountStateType - /// - [EnumMember(Value = "accountStateType")] - AccountStateType = 5, - - /// - /// Enum AccountStatus for value: accountStatus - /// - [EnumMember(Value = "accountStatus")] - AccountStatus = 6, - - /// - /// Enum AccountType for value: accountType - /// - [EnumMember(Value = "accountType")] - AccountType = 7, - - /// - /// Enum Address for value: address - /// - [EnumMember(Value = "address")] - Address = 8, - - /// - /// Enum BalanceAccount for value: balanceAccount - /// - [EnumMember(Value = "balanceAccount")] - BalanceAccount = 9, - - /// - /// Enum BalanceAccountActive for value: balanceAccountActive - /// - [EnumMember(Value = "balanceAccountActive")] - BalanceAccountActive = 10, - - /// - /// Enum BalanceAccountCode for value: balanceAccountCode - /// - [EnumMember(Value = "balanceAccountCode")] - BalanceAccountCode = 11, - - /// - /// Enum BalanceAccountId for value: balanceAccountId - /// - [EnumMember(Value = "balanceAccountId")] - BalanceAccountId = 12, - - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 13, - - /// - /// Enum BankAccountCode for value: bankAccountCode - /// - [EnumMember(Value = "bankAccountCode")] - BankAccountCode = 14, - - /// - /// Enum BankAccountName for value: bankAccountName - /// - [EnumMember(Value = "bankAccountName")] - BankAccountName = 15, - - /// - /// Enum BankAccountUUID for value: bankAccountUUID - /// - [EnumMember(Value = "bankAccountUUID")] - BankAccountUUID = 16, - - /// - /// Enum BankBicSwift for value: bankBicSwift - /// - [EnumMember(Value = "bankBicSwift")] - BankBicSwift = 17, - - /// - /// Enum BankCity for value: bankCity - /// - [EnumMember(Value = "bankCity")] - BankCity = 18, - - /// - /// Enum BankCode for value: bankCode - /// - [EnumMember(Value = "bankCode")] - BankCode = 19, - - /// - /// Enum BankName for value: bankName - /// - [EnumMember(Value = "bankName")] - BankName = 20, - - /// - /// Enum BankStatement for value: bankStatement - /// - [EnumMember(Value = "bankStatement")] - BankStatement = 21, - - /// - /// Enum BranchCode for value: branchCode - /// - [EnumMember(Value = "branchCode")] - BranchCode = 22, - - /// - /// Enum BusinessContact for value: businessContact - /// - [EnumMember(Value = "businessContact")] - BusinessContact = 23, - - /// - /// Enum CardToken for value: cardToken - /// - [EnumMember(Value = "cardToken")] - CardToken = 24, - - /// - /// Enum CheckCode for value: checkCode - /// - [EnumMember(Value = "checkCode")] - CheckCode = 25, - - /// - /// Enum City for value: city - /// - [EnumMember(Value = "city")] - City = 26, - - /// - /// Enum CompanyRegistration for value: companyRegistration - /// - [EnumMember(Value = "companyRegistration")] - CompanyRegistration = 27, - - /// - /// Enum ConstitutionalDocument for value: constitutionalDocument - /// - [EnumMember(Value = "constitutionalDocument")] - ConstitutionalDocument = 28, - - /// - /// Enum Controller for value: controller - /// - [EnumMember(Value = "controller")] - Controller = 29, - - /// - /// Enum Country for value: country - /// - [EnumMember(Value = "country")] - Country = 30, - - /// - /// Enum CountryCode for value: countryCode - /// - [EnumMember(Value = "countryCode")] - CountryCode = 31, - - /// - /// Enum Currency for value: currency - /// - [EnumMember(Value = "currency")] - Currency = 32, - - /// - /// Enum CurrencyCode for value: currencyCode - /// - [EnumMember(Value = "currencyCode")] - CurrencyCode = 33, - - /// - /// Enum DateOfBirth for value: dateOfBirth - /// - [EnumMember(Value = "dateOfBirth")] - DateOfBirth = 34, - - /// - /// Enum Description for value: description - /// - [EnumMember(Value = "description")] - Description = 35, - - /// - /// Enum DestinationAccountCode for value: destinationAccountCode - /// - [EnumMember(Value = "destinationAccountCode")] - DestinationAccountCode = 36, - - /// - /// Enum Document for value: document - /// - [EnumMember(Value = "document")] - Document = 37, - - /// - /// Enum DocumentContent for value: documentContent - /// - [EnumMember(Value = "documentContent")] - DocumentContent = 38, - - /// - /// Enum DocumentExpirationDate for value: documentExpirationDate - /// - [EnumMember(Value = "documentExpirationDate")] - DocumentExpirationDate = 39, - - /// - /// Enum DocumentIssuerCountry for value: documentIssuerCountry - /// - [EnumMember(Value = "documentIssuerCountry")] - DocumentIssuerCountry = 40, - - /// - /// Enum DocumentIssuerState for value: documentIssuerState - /// - [EnumMember(Value = "documentIssuerState")] - DocumentIssuerState = 41, - - /// - /// Enum DocumentName for value: documentName - /// - [EnumMember(Value = "documentName")] - DocumentName = 42, - - /// - /// Enum DocumentNumber for value: documentNumber - /// - [EnumMember(Value = "documentNumber")] - DocumentNumber = 43, - - /// - /// Enum DocumentType for value: documentType - /// - [EnumMember(Value = "documentType")] - DocumentType = 44, - - /// - /// Enum DoingBusinessAs for value: doingBusinessAs - /// - [EnumMember(Value = "doingBusinessAs")] - DoingBusinessAs = 45, - - /// - /// Enum DrivingLicence for value: drivingLicence - /// - [EnumMember(Value = "drivingLicence")] - DrivingLicence = 46, - - /// - /// Enum DrivingLicenceBack for value: drivingLicenceBack - /// - [EnumMember(Value = "drivingLicenceBack")] - DrivingLicenceBack = 47, - - /// - /// Enum DrivingLicenceFront for value: drivingLicenceFront - /// - [EnumMember(Value = "drivingLicenceFront")] - DrivingLicenceFront = 48, - - /// - /// Enum DrivingLicense for value: drivingLicense - /// - [EnumMember(Value = "drivingLicense")] - DrivingLicense = 49, - - /// - /// Enum Email for value: email - /// - [EnumMember(Value = "email")] - Email = 50, - - /// - /// Enum FirstName for value: firstName - /// - [EnumMember(Value = "firstName")] - FirstName = 51, - - /// - /// Enum FormType for value: formType - /// - [EnumMember(Value = "formType")] - FormType = 52, - - /// - /// Enum FullPhoneNumber for value: fullPhoneNumber - /// - [EnumMember(Value = "fullPhoneNumber")] - FullPhoneNumber = 53, - - /// - /// Enum Gender for value: gender - /// - [EnumMember(Value = "gender")] - Gender = 54, - - /// - /// Enum HopWebserviceUser for value: hopWebserviceUser - /// - [EnumMember(Value = "hopWebserviceUser")] - HopWebserviceUser = 55, - - /// - /// Enum HouseNumberOrName for value: houseNumberOrName - /// - [EnumMember(Value = "houseNumberOrName")] - HouseNumberOrName = 56, - - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 57, - - /// - /// Enum IdCard for value: idCard - /// - [EnumMember(Value = "idCard")] - IdCard = 58, - - /// - /// Enum IdCardBack for value: idCardBack - /// - [EnumMember(Value = "idCardBack")] - IdCardBack = 59, - - /// - /// Enum IdCardFront for value: idCardFront - /// - [EnumMember(Value = "idCardFront")] - IdCardFront = 60, - - /// - /// Enum IdNumber for value: idNumber - /// - [EnumMember(Value = "idNumber")] - IdNumber = 61, - - /// - /// Enum IdentityDocument for value: identityDocument - /// - [EnumMember(Value = "identityDocument")] - IdentityDocument = 62, - - /// - /// Enum IndividualDetails for value: individualDetails - /// - [EnumMember(Value = "individualDetails")] - IndividualDetails = 63, - - /// - /// Enum Infix for value: infix - /// - [EnumMember(Value = "infix")] - Infix = 64, - - /// - /// Enum JobTitle for value: jobTitle - /// - [EnumMember(Value = "jobTitle")] - JobTitle = 65, - - /// - /// Enum LastName for value: lastName - /// - [EnumMember(Value = "lastName")] - LastName = 66, - - /// - /// Enum LastReviewDate for value: lastReviewDate - /// - [EnumMember(Value = "lastReviewDate")] - LastReviewDate = 67, - - /// - /// Enum LegalArrangement for value: legalArrangement - /// - [EnumMember(Value = "legalArrangement")] - LegalArrangement = 68, - - /// - /// Enum LegalArrangementCode for value: legalArrangementCode - /// - [EnumMember(Value = "legalArrangementCode")] - LegalArrangementCode = 69, - - /// - /// Enum LegalArrangementEntity for value: legalArrangementEntity - /// - [EnumMember(Value = "legalArrangementEntity")] - LegalArrangementEntity = 70, - - /// - /// Enum LegalArrangementEntityCode for value: legalArrangementEntityCode - /// - [EnumMember(Value = "legalArrangementEntityCode")] - LegalArrangementEntityCode = 71, - - /// - /// Enum LegalArrangementLegalForm for value: legalArrangementLegalForm - /// - [EnumMember(Value = "legalArrangementLegalForm")] - LegalArrangementLegalForm = 72, - - /// - /// Enum LegalArrangementMember for value: legalArrangementMember - /// - [EnumMember(Value = "legalArrangementMember")] - LegalArrangementMember = 73, - - /// - /// Enum LegalArrangementMembers for value: legalArrangementMembers - /// - [EnumMember(Value = "legalArrangementMembers")] - LegalArrangementMembers = 74, - - /// - /// Enum LegalArrangementName for value: legalArrangementName - /// - [EnumMember(Value = "legalArrangementName")] - LegalArrangementName = 75, - - /// - /// Enum LegalArrangementReference for value: legalArrangementReference - /// - [EnumMember(Value = "legalArrangementReference")] - LegalArrangementReference = 76, - - /// - /// Enum LegalArrangementRegistrationNumber for value: legalArrangementRegistrationNumber - /// - [EnumMember(Value = "legalArrangementRegistrationNumber")] - LegalArrangementRegistrationNumber = 77, - - /// - /// Enum LegalArrangementTaxNumber for value: legalArrangementTaxNumber - /// - [EnumMember(Value = "legalArrangementTaxNumber")] - LegalArrangementTaxNumber = 78, - - /// - /// Enum LegalArrangementType for value: legalArrangementType - /// - [EnumMember(Value = "legalArrangementType")] - LegalArrangementType = 79, - - /// - /// Enum LegalBusinessName for value: legalBusinessName - /// - [EnumMember(Value = "legalBusinessName")] - LegalBusinessName = 80, - - /// - /// Enum LegalEntity for value: legalEntity - /// - [EnumMember(Value = "legalEntity")] - LegalEntity = 81, - - /// - /// Enum LegalEntityType for value: legalEntityType - /// - [EnumMember(Value = "legalEntityType")] - LegalEntityType = 82, - - /// - /// Enum Logo for value: logo - /// - [EnumMember(Value = "logo")] - Logo = 83, - - /// - /// Enum MerchantAccount for value: merchantAccount - /// - [EnumMember(Value = "merchantAccount")] - MerchantAccount = 84, - - /// - /// Enum MerchantCategoryCode for value: merchantCategoryCode - /// - [EnumMember(Value = "merchantCategoryCode")] - MerchantCategoryCode = 85, - - /// - /// Enum MerchantHouseNumber for value: merchantHouseNumber - /// - [EnumMember(Value = "merchantHouseNumber")] - MerchantHouseNumber = 86, - - /// - /// Enum MerchantReference for value: merchantReference - /// - [EnumMember(Value = "merchantReference")] - MerchantReference = 87, - - /// - /// Enum MicroDeposit for value: microDeposit - /// - [EnumMember(Value = "microDeposit")] - MicroDeposit = 88, - - /// - /// Enum Name for value: name - /// - [EnumMember(Value = "name")] - Name = 89, - - /// - /// Enum Nationality for value: nationality - /// - [EnumMember(Value = "nationality")] - Nationality = 90, - - /// - /// Enum OriginalReference for value: originalReference - /// - [EnumMember(Value = "originalReference")] - OriginalReference = 91, - - /// - /// Enum OwnerCity for value: ownerCity - /// - [EnumMember(Value = "ownerCity")] - OwnerCity = 92, - - /// - /// Enum OwnerCountryCode for value: ownerCountryCode - /// - [EnumMember(Value = "ownerCountryCode")] - OwnerCountryCode = 93, - - /// - /// Enum OwnerDateOfBirth for value: ownerDateOfBirth - /// - [EnumMember(Value = "ownerDateOfBirth")] - OwnerDateOfBirth = 94, - - /// - /// Enum OwnerHouseNumberOrName for value: ownerHouseNumberOrName - /// - [EnumMember(Value = "ownerHouseNumberOrName")] - OwnerHouseNumberOrName = 95, - - /// - /// Enum OwnerName for value: ownerName - /// - [EnumMember(Value = "ownerName")] - OwnerName = 96, - - /// - /// Enum OwnerPostalCode for value: ownerPostalCode - /// - [EnumMember(Value = "ownerPostalCode")] - OwnerPostalCode = 97, - - /// - /// Enum OwnerState for value: ownerState - /// - [EnumMember(Value = "ownerState")] - OwnerState = 98, - - /// - /// Enum OwnerStreet for value: ownerStreet - /// - [EnumMember(Value = "ownerStreet")] - OwnerStreet = 99, - - /// - /// Enum Passport for value: passport - /// - [EnumMember(Value = "passport")] - Passport = 100, - - /// - /// Enum PassportNumber for value: passportNumber - /// - [EnumMember(Value = "passportNumber")] - PassportNumber = 101, - - /// - /// Enum PayoutMethod for value: payoutMethod - /// - [EnumMember(Value = "payoutMethod")] - PayoutMethod = 102, - - /// - /// Enum PayoutMethodCode for value: payoutMethodCode - /// - [EnumMember(Value = "payoutMethodCode")] - PayoutMethodCode = 103, - - /// - /// Enum PayoutSchedule for value: payoutSchedule - /// - [EnumMember(Value = "payoutSchedule")] - PayoutSchedule = 104, - - /// - /// Enum PciSelfAssessment for value: pciSelfAssessment - /// - [EnumMember(Value = "pciSelfAssessment")] - PciSelfAssessment = 105, - - /// - /// Enum PersonalData for value: personalData - /// - [EnumMember(Value = "personalData")] - PersonalData = 106, - - /// - /// Enum PhoneCountryCode for value: phoneCountryCode - /// - [EnumMember(Value = "phoneCountryCode")] - PhoneCountryCode = 107, - - /// - /// Enum PhoneNumber for value: phoneNumber - /// - [EnumMember(Value = "phoneNumber")] - PhoneNumber = 108, - - /// - /// Enum PostalCode for value: postalCode - /// - [EnumMember(Value = "postalCode")] - PostalCode = 109, - - /// - /// Enum PrimaryCurrency for value: primaryCurrency - /// - [EnumMember(Value = "primaryCurrency")] - PrimaryCurrency = 110, - - /// - /// Enum Reason for value: reason - /// - [EnumMember(Value = "reason")] - Reason = 111, - - /// - /// Enum RegistrationNumber for value: registrationNumber - /// - [EnumMember(Value = "registrationNumber")] - RegistrationNumber = 112, - - /// - /// Enum ReturnUrl for value: returnUrl - /// - [EnumMember(Value = "returnUrl")] - ReturnUrl = 113, - - /// - /// Enum Schedule for value: schedule - /// - [EnumMember(Value = "schedule")] - Schedule = 114, - - /// - /// Enum Shareholder for value: shareholder - /// - [EnumMember(Value = "shareholder")] - Shareholder = 115, - - /// - /// Enum ShareholderCode for value: shareholderCode - /// - [EnumMember(Value = "shareholderCode")] - ShareholderCode = 116, - - /// - /// Enum ShareholderCodeAndSignatoryCode for value: shareholderCodeAndSignatoryCode - /// - [EnumMember(Value = "shareholderCodeAndSignatoryCode")] - ShareholderCodeAndSignatoryCode = 117, - - /// - /// Enum ShareholderCodeOrSignatoryCode for value: shareholderCodeOrSignatoryCode - /// - [EnumMember(Value = "shareholderCodeOrSignatoryCode")] - ShareholderCodeOrSignatoryCode = 118, - - /// - /// Enum ShareholderType for value: shareholderType - /// - [EnumMember(Value = "shareholderType")] - ShareholderType = 119, - - /// - /// Enum ShareholderTypes for value: shareholderTypes - /// - [EnumMember(Value = "shareholderTypes")] - ShareholderTypes = 120, - - /// - /// Enum ShopperInteraction for value: shopperInteraction - /// - [EnumMember(Value = "shopperInteraction")] - ShopperInteraction = 121, - - /// - /// Enum Signatory for value: signatory - /// - [EnumMember(Value = "signatory")] - Signatory = 122, - - /// - /// Enum SignatoryCode for value: signatoryCode - /// - [EnumMember(Value = "signatoryCode")] - SignatoryCode = 123, - - /// - /// Enum SocialSecurityNumber for value: socialSecurityNumber - /// - [EnumMember(Value = "socialSecurityNumber")] - SocialSecurityNumber = 124, - - /// - /// Enum SourceAccountCode for value: sourceAccountCode - /// - [EnumMember(Value = "sourceAccountCode")] - SourceAccountCode = 125, - - /// - /// Enum SplitAccount for value: splitAccount - /// - [EnumMember(Value = "splitAccount")] - SplitAccount = 126, - - /// - /// Enum SplitConfigurationUUID for value: splitConfigurationUUID - /// - [EnumMember(Value = "splitConfigurationUUID")] - SplitConfigurationUUID = 127, - - /// - /// Enum SplitCurrency for value: splitCurrency - /// - [EnumMember(Value = "splitCurrency")] - SplitCurrency = 128, - - /// - /// Enum SplitValue for value: splitValue - /// - [EnumMember(Value = "splitValue")] - SplitValue = 129, - - /// - /// Enum Splits for value: splits - /// - [EnumMember(Value = "splits")] - Splits = 130, - - /// - /// Enum StateOrProvince for value: stateOrProvince - /// - [EnumMember(Value = "stateOrProvince")] - StateOrProvince = 131, - - /// - /// Enum Status for value: status - /// - [EnumMember(Value = "status")] - Status = 132, - - /// - /// Enum StockExchange for value: stockExchange - /// - [EnumMember(Value = "stockExchange")] - StockExchange = 133, - - /// - /// Enum StockNumber for value: stockNumber - /// - [EnumMember(Value = "stockNumber")] - StockNumber = 134, - - /// - /// Enum StockTicker for value: stockTicker - /// - [EnumMember(Value = "stockTicker")] - StockTicker = 135, - - /// - /// Enum Store for value: store - /// - [EnumMember(Value = "store")] - Store = 136, - - /// - /// Enum StoreDetail for value: storeDetail - /// - [EnumMember(Value = "storeDetail")] - StoreDetail = 137, - - /// - /// Enum StoreName for value: storeName - /// - [EnumMember(Value = "storeName")] - StoreName = 138, - - /// - /// Enum StoreReference for value: storeReference - /// - [EnumMember(Value = "storeReference")] - StoreReference = 139, - - /// - /// Enum Street for value: street - /// - [EnumMember(Value = "street")] - Street = 140, - - /// - /// Enum TaxId for value: taxId - /// - [EnumMember(Value = "taxId")] - TaxId = 141, - - /// - /// Enum Tier for value: tier - /// - [EnumMember(Value = "tier")] - Tier = 142, - - /// - /// Enum TierNumber for value: tierNumber - /// - [EnumMember(Value = "tierNumber")] - TierNumber = 143, - - /// - /// Enum TransferCode for value: transferCode - /// - [EnumMember(Value = "transferCode")] - TransferCode = 144, - - /// - /// Enum UltimateParentCompany for value: ultimateParentCompany - /// - [EnumMember(Value = "ultimateParentCompany")] - UltimateParentCompany = 145, - - /// - /// Enum UltimateParentCompanyAddressDetails for value: ultimateParentCompanyAddressDetails - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetails")] - UltimateParentCompanyAddressDetails = 146, - - /// - /// Enum UltimateParentCompanyAddressDetailsCountry for value: ultimateParentCompanyAddressDetailsCountry - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetailsCountry")] - UltimateParentCompanyAddressDetailsCountry = 147, - - /// - /// Enum UltimateParentCompanyBusinessDetails for value: ultimateParentCompanyBusinessDetails - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetails")] - UltimateParentCompanyBusinessDetails = 148, - - /// - /// Enum UltimateParentCompanyBusinessDetailsLegalBusinessName for value: ultimateParentCompanyBusinessDetailsLegalBusinessName - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsLegalBusinessName")] - UltimateParentCompanyBusinessDetailsLegalBusinessName = 149, - - /// - /// Enum UltimateParentCompanyBusinessDetailsRegistrationNumber for value: ultimateParentCompanyBusinessDetailsRegistrationNumber - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsRegistrationNumber")] - UltimateParentCompanyBusinessDetailsRegistrationNumber = 150, - - /// - /// Enum UltimateParentCompanyCode for value: ultimateParentCompanyCode - /// - [EnumMember(Value = "ultimateParentCompanyCode")] - UltimateParentCompanyCode = 151, - - /// - /// Enum UltimateParentCompanyStockExchange for value: ultimateParentCompanyStockExchange - /// - [EnumMember(Value = "ultimateParentCompanyStockExchange")] - UltimateParentCompanyStockExchange = 152, - - /// - /// Enum UltimateParentCompanyStockNumber for value: ultimateParentCompanyStockNumber - /// - [EnumMember(Value = "ultimateParentCompanyStockNumber")] - UltimateParentCompanyStockNumber = 153, - - /// - /// Enum UltimateParentCompanyStockNumberOrStockTicker for value: ultimateParentCompanyStockNumberOrStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockNumberOrStockTicker")] - UltimateParentCompanyStockNumberOrStockTicker = 154, - - /// - /// Enum UltimateParentCompanyStockTicker for value: ultimateParentCompanyStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockTicker")] - UltimateParentCompanyStockTicker = 155, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 156, - - /// - /// Enum Value for value: value - /// - [EnumMember(Value = "value")] - Value = 157, - - /// - /// Enum VerificationType for value: verificationType - /// - [EnumMember(Value = "verificationType")] - VerificationType = 158, - - /// - /// Enum VirtualAccount for value: virtualAccount - /// - [EnumMember(Value = "virtualAccount")] - VirtualAccount = 159, - - /// - /// Enum VisaNumber for value: visaNumber - /// - [EnumMember(Value = "visaNumber")] - VisaNumber = 160, - - /// - /// Enum WebAddress for value: webAddress - /// - [EnumMember(Value = "webAddress")] - WebAddress = 161, - - /// - /// Enum Year for value: year - /// - [EnumMember(Value = "year")] - Year = 162 - - } - - - /// - /// The type of the field. - /// - /// The type of the field. - [DataMember(Name = "fieldName", EmitDefaultValue = false)] - public FieldNameEnum? FieldName { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The full name of the property.. - /// The type of the field.. - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.. - public FieldType(string field = default(string), FieldNameEnum? fieldName = default(FieldNameEnum?), string shareholderCode = default(string)) - { - this.Field = field; - this.FieldName = fieldName; - this.ShareholderCode = shareholderCode; - } - - /// - /// The full name of the property. - /// - /// The full name of the property. - [DataMember(Name = "field", EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FieldType {\n"); - sb.Append(" Field: ").Append(Field).Append("\n"); - sb.Append(" FieldName: ").Append(FieldName).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FieldType); - } - - /// - /// Returns true if FieldType instances are equal - /// - /// Instance of FieldType to be compared - /// Boolean - public bool Equals(FieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.FieldName == input.FieldName || - this.FieldName.Equals(input.FieldName) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FieldName.GetHashCode(); - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/PayoutAccountHolderRequest.cs b/Adyen/Model/PlatformsFund/PayoutAccountHolderRequest.cs deleted file mode 100644 index 4b1952f91..000000000 --- a/Adyen/Model/PlatformsFund/PayoutAccountHolderRequest.cs +++ /dev/null @@ -1,295 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// PayoutAccountHolderRequest - /// - [DataContract(Name = "PayoutAccountHolderRequest")] - public partial class PayoutAccountHolderRequest : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayoutAccountHolderRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account from which the payout is to be made. (required). - /// The code of the Account Holder who owns the account from which the payout is to be made. The Account Holder is the party to which the payout will be made. (required). - /// amount. - /// The unique ID of the Bank Account held by the Account Holder to which the payout is to be made. If left blank, a bank account is automatically selected.. - /// A description of the payout. Maximum 200 characters. Allowed: **abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/?:().,'+ \";**. - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.. - /// The unique ID of the payout method held by the Account Holder to which the payout is to be made. If left blank, a payout instrument is automatically selected.. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. (default to PayoutSpeedEnum.STANDARD). - public PayoutAccountHolderRequest(string accountCode = default(string), string accountHolderCode = default(string), Amount amount = default(Amount), string bankAccountUUID = default(string), string description = default(string), string merchantReference = default(string), string payoutMethodCode = default(string), PayoutSpeedEnum? payoutSpeed = PayoutSpeedEnum.STANDARD) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - this.Amount = amount; - this.BankAccountUUID = bankAccountUUID; - this.Description = description; - this.MerchantReference = merchantReference; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutSpeed = payoutSpeed; - } - - /// - /// The code of the account from which the payout is to be made. - /// - /// The code of the account from which the payout is to be made. - [DataMember(Name = "accountCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the Account Holder who owns the account from which the payout is to be made. The Account Holder is the party to which the payout will be made. - /// - /// The code of the Account Holder who owns the account from which the payout is to be made. The Account Holder is the party to which the payout will be made. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The unique ID of the Bank Account held by the Account Holder to which the payout is to be made. If left blank, a bank account is automatically selected. - /// - /// The unique ID of the Bank Account held by the Account Holder to which the payout is to be made. If left blank, a bank account is automatically selected. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// A description of the payout. Maximum 200 characters. Allowed: **abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/?:().,'+ \";** - /// - /// A description of the payout. Maximum 200 characters. Allowed: **abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/?:().,'+ \";** - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. - /// - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The unique ID of the payout method held by the Account Holder to which the payout is to be made. If left blank, a payout instrument is automatically selected. - /// - /// The unique ID of the payout method held by the Account Holder to which the payout is to be made. If left blank, a payout instrument is automatically selected. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutAccountHolderRequest {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutAccountHolderRequest); - } - - /// - /// Returns true if PayoutAccountHolderRequest instances are equal - /// - /// Instance of PayoutAccountHolderRequest to be compared - /// Boolean - public bool Equals(PayoutAccountHolderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 200) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 200.", new [] { "Description" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/PayoutAccountHolderResponse.cs b/Adyen/Model/PlatformsFund/PayoutAccountHolderResponse.cs deleted file mode 100644 index 365ec07b3..000000000 --- a/Adyen/Model/PlatformsFund/PayoutAccountHolderResponse.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// PayoutAccountHolderResponse - /// - [DataContract(Name = "PayoutAccountHolderResponse")] - public partial class PayoutAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique ID of the Bank Account to which the payout was made.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions.. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. (default to PayoutSpeedEnum.STANDARD). - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public PayoutAccountHolderResponse(string bankAccountUUID = default(string), List invalidFields = default(List), string merchantReference = default(string), PayoutSpeedEnum? payoutSpeed = PayoutSpeedEnum.STANDARD, string pspReference = default(string), string resultCode = default(string)) - { - this.BankAccountUUID = bankAccountUUID; - this.InvalidFields = invalidFields; - this.MerchantReference = merchantReference; - this.PayoutSpeed = payoutSpeed; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// The unique ID of the Bank Account to which the payout was made. - /// - /// The unique ID of the Bank Account to which the payout was made. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions. - /// - /// The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutAccountHolderResponse {\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutAccountHolderResponse); - } - - /// - /// Returns true if PayoutAccountHolderResponse instances are equal - /// - /// Instance of PayoutAccountHolderResponse to be compared - /// Boolean - public bool Equals(PayoutAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/RefundFundsTransferRequest.cs b/Adyen/Model/PlatformsFund/RefundFundsTransferRequest.cs deleted file mode 100644 index 8df5d5d77..000000000 --- a/Adyen/Model/PlatformsFund/RefundFundsTransferRequest.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// RefundFundsTransferRequest - /// - [DataContract(Name = "RefundFundsTransferRequest")] - public partial class RefundFundsTransferRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RefundFundsTransferRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.. - /// A PSP reference of the original fund transfer. (required). - public RefundFundsTransferRequest(Amount amount = default(Amount), string merchantReference = default(string), string originalReference = default(string)) - { - this.Amount = amount; - this.OriginalReference = originalReference; - this.MerchantReference = merchantReference; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. - /// - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// A PSP reference of the original fund transfer. - /// - /// A PSP reference of the original fund transfer. - [DataMember(Name = "originalReference", IsRequired = false, EmitDefaultValue = false)] - public string OriginalReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RefundFundsTransferRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" OriginalReference: ").Append(OriginalReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RefundFundsTransferRequest); - } - - /// - /// Returns true if RefundFundsTransferRequest instances are equal - /// - /// Instance of RefundFundsTransferRequest to be compared - /// Boolean - public bool Equals(RefundFundsTransferRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.OriginalReference == input.OriginalReference || - (this.OriginalReference != null && - this.OriginalReference.Equals(input.OriginalReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.OriginalReference != null) - { - hashCode = (hashCode * 59) + this.OriginalReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/RefundFundsTransferResponse.cs b/Adyen/Model/PlatformsFund/RefundFundsTransferResponse.cs deleted file mode 100644 index 673dfe42c..000000000 --- a/Adyen/Model/PlatformsFund/RefundFundsTransferResponse.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// RefundFundsTransferResponse - /// - [DataContract(Name = "RefundFundsTransferResponse")] - public partial class RefundFundsTransferResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains field validation errors that would prevent requests from being processed.. - /// The value supplied by the executing user when initiating the transfer refund; may be used to link multiple transactions.. - /// The message of the response.. - /// A PSP reference of the original fund transfer.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public RefundFundsTransferResponse(List invalidFields = default(List), string merchantReference = default(string), string message = default(string), string originalReference = default(string), string pspReference = default(string), string resultCode = default(string)) - { - this.InvalidFields = invalidFields; - this.MerchantReference = merchantReference; - this.Message = message; - this.OriginalReference = originalReference; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The value supplied by the executing user when initiating the transfer refund; may be used to link multiple transactions. - /// - /// The value supplied by the executing user when initiating the transfer refund; may be used to link multiple transactions. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The message of the response. - /// - /// The message of the response. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// A PSP reference of the original fund transfer. - /// - /// A PSP reference of the original fund transfer. - [DataMember(Name = "originalReference", EmitDefaultValue = false)] - public string OriginalReference { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RefundFundsTransferResponse {\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" OriginalReference: ").Append(OriginalReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RefundFundsTransferResponse); - } - - /// - /// Returns true if RefundFundsTransferResponse instances are equal - /// - /// Instance of RefundFundsTransferResponse to be compared - /// Boolean - public bool Equals(RefundFundsTransferResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.OriginalReference == input.OriginalReference || - (this.OriginalReference != null && - this.OriginalReference.Equals(input.OriginalReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.OriginalReference != null) - { - hashCode = (hashCode * 59) + this.OriginalReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/RefundNotPaidOutTransfersRequest.cs b/Adyen/Model/PlatformsFund/RefundNotPaidOutTransfersRequest.cs deleted file mode 100644 index 9bc48c565..000000000 --- a/Adyen/Model/PlatformsFund/RefundNotPaidOutTransfersRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// RefundNotPaidOutTransfersRequest - /// - [DataContract(Name = "RefundNotPaidOutTransfersRequest")] - public partial class RefundNotPaidOutTransfersRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RefundNotPaidOutTransfersRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account from which to perform the refund(s). (required). - /// The code of the Account Holder which owns the account from which to perform the refund(s). (required). - public RefundNotPaidOutTransfersRequest(string accountCode = default(string), string accountHolderCode = default(string)) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - } - - /// - /// The code of the account from which to perform the refund(s). - /// - /// The code of the account from which to perform the refund(s). - [DataMember(Name = "accountCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the Account Holder which owns the account from which to perform the refund(s). - /// - /// The code of the Account Holder which owns the account from which to perform the refund(s). - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RefundNotPaidOutTransfersRequest {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RefundNotPaidOutTransfersRequest); - } - - /// - /// Returns true if RefundNotPaidOutTransfersRequest instances are equal - /// - /// Instance of RefundNotPaidOutTransfersRequest to be compared - /// Boolean - public bool Equals(RefundNotPaidOutTransfersRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/RefundNotPaidOutTransfersResponse.cs b/Adyen/Model/PlatformsFund/RefundNotPaidOutTransfersResponse.cs deleted file mode 100644 index d292554dd..000000000 --- a/Adyen/Model/PlatformsFund/RefundNotPaidOutTransfersResponse.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// RefundNotPaidOutTransfersResponse - /// - [DataContract(Name = "RefundNotPaidOutTransfersResponse")] - public partial class RefundNotPaidOutTransfersResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public RefundNotPaidOutTransfersResponse(List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RefundNotPaidOutTransfersResponse {\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RefundNotPaidOutTransfersResponse); - } - - /// - /// Returns true if RefundNotPaidOutTransfersResponse instances are equal - /// - /// Instance of RefundNotPaidOutTransfersResponse to be compared - /// Boolean - public bool Equals(RefundNotPaidOutTransfersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/ServiceError.cs b/Adyen/Model/PlatformsFund/ServiceError.cs deleted file mode 100644 index 77db89db0..000000000 --- a/Adyen/Model/PlatformsFund/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/SetupBeneficiaryRequest.cs b/Adyen/Model/PlatformsFund/SetupBeneficiaryRequest.cs deleted file mode 100644 index 6a313ca77..000000000 --- a/Adyen/Model/PlatformsFund/SetupBeneficiaryRequest.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// SetupBeneficiaryRequest - /// - [DataContract(Name = "SetupBeneficiaryRequest")] - public partial class SetupBeneficiaryRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SetupBeneficiaryRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The destination account code. (required). - /// A value that can be supplied at the discretion of the executing user.. - /// The benefactor account. (required). - public SetupBeneficiaryRequest(string destinationAccountCode = default(string), string merchantReference = default(string), string sourceAccountCode = default(string)) - { - this.DestinationAccountCode = destinationAccountCode; - this.SourceAccountCode = sourceAccountCode; - this.MerchantReference = merchantReference; - } - - /// - /// The destination account code. - /// - /// The destination account code. - [DataMember(Name = "destinationAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string DestinationAccountCode { get; set; } - - /// - /// A value that can be supplied at the discretion of the executing user. - /// - /// A value that can be supplied at the discretion of the executing user. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The benefactor account. - /// - /// The benefactor account. - [DataMember(Name = "sourceAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string SourceAccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetupBeneficiaryRequest {\n"); - sb.Append(" DestinationAccountCode: ").Append(DestinationAccountCode).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" SourceAccountCode: ").Append(SourceAccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetupBeneficiaryRequest); - } - - /// - /// Returns true if SetupBeneficiaryRequest instances are equal - /// - /// Instance of SetupBeneficiaryRequest to be compared - /// Boolean - public bool Equals(SetupBeneficiaryRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.DestinationAccountCode == input.DestinationAccountCode || - (this.DestinationAccountCode != null && - this.DestinationAccountCode.Equals(input.DestinationAccountCode)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.SourceAccountCode == input.SourceAccountCode || - (this.SourceAccountCode != null && - this.SourceAccountCode.Equals(input.SourceAccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DestinationAccountCode != null) - { - hashCode = (hashCode * 59) + this.DestinationAccountCode.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.SourceAccountCode != null) - { - hashCode = (hashCode * 59) + this.SourceAccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/SetupBeneficiaryResponse.cs b/Adyen/Model/PlatformsFund/SetupBeneficiaryResponse.cs deleted file mode 100644 index 3f77a7b70..000000000 --- a/Adyen/Model/PlatformsFund/SetupBeneficiaryResponse.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// SetupBeneficiaryResponse - /// - [DataContract(Name = "SetupBeneficiaryResponse")] - public partial class SetupBeneficiaryResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public SetupBeneficiaryResponse(List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SetupBeneficiaryResponse {\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SetupBeneficiaryResponse); - } - - /// - /// Returns true if SetupBeneficiaryResponse instances are equal - /// - /// Instance of SetupBeneficiaryResponse to be compared - /// Boolean - public bool Equals(SetupBeneficiaryResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/Split.cs b/Adyen/Model/PlatformsFund/Split.cs deleted file mode 100644 index 6d0c8013e..000000000 --- a/Adyen/Model/PlatformsFund/Split.cs +++ /dev/null @@ -1,310 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// Split - /// - [DataContract(Name = "Split")] - public partial class Split : IEquatable, IValidatableObject - { - /// - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - /// - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BalanceAccount for value: BalanceAccount - /// - [EnumMember(Value = "BalanceAccount")] - BalanceAccount = 1, - - /// - /// Enum Commission for value: Commission - /// - [EnumMember(Value = "Commission")] - Commission = 2, - - /// - /// Enum Default for value: Default - /// - [EnumMember(Value = "Default")] - Default = 3, - - /// - /// Enum MarketPlace for value: MarketPlace - /// - [EnumMember(Value = "MarketPlace")] - MarketPlace = 4, - - /// - /// Enum PaymentFee for value: PaymentFee - /// - [EnumMember(Value = "PaymentFee")] - PaymentFee = 5, - - /// - /// Enum PaymentFeeAcquiring for value: PaymentFeeAcquiring - /// - [EnumMember(Value = "PaymentFeeAcquiring")] - PaymentFeeAcquiring = 6, - - /// - /// Enum PaymentFeeAdyen for value: PaymentFeeAdyen - /// - [EnumMember(Value = "PaymentFeeAdyen")] - PaymentFeeAdyen = 7, - - /// - /// Enum PaymentFeeAdyenCommission for value: PaymentFeeAdyenCommission - /// - [EnumMember(Value = "PaymentFeeAdyenCommission")] - PaymentFeeAdyenCommission = 8, - - /// - /// Enum PaymentFeeAdyenMarkup for value: PaymentFeeAdyenMarkup - /// - [EnumMember(Value = "PaymentFeeAdyenMarkup")] - PaymentFeeAdyenMarkup = 9, - - /// - /// Enum PaymentFeeInterchange for value: PaymentFeeInterchange - /// - [EnumMember(Value = "PaymentFeeInterchange")] - PaymentFeeInterchange = 10, - - /// - /// Enum PaymentFeeSchemeFee for value: PaymentFeeSchemeFee - /// - [EnumMember(Value = "PaymentFeeSchemeFee")] - PaymentFeeSchemeFee = 11, - - /// - /// Enum Remainder for value: Remainder - /// - [EnumMember(Value = "Remainder")] - Remainder = 12, - - /// - /// Enum Surcharge for value: Surcharge - /// - [EnumMember(Value = "Surcharge")] - Surcharge = 13, - - /// - /// Enum Tip for value: Tip - /// - [EnumMember(Value = "Tip")] - Tip = 14, - - /// - /// Enum VAT for value: VAT - /// - [EnumMember(Value = "VAT")] - VAT = 15, - - /// - /// Enum Verification for value: Verification - /// - [EnumMember(Value = "Verification")] - Verification = 16 - - } - - - /// - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - /// - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Split() { } - /// - /// Initializes a new instance of the class. - /// - /// Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. . - /// amount (required). - /// A description of this split.. - /// Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms.. - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. (required). - public Split(string account = default(string), SplitAmount amount = default(SplitAmount), string description = default(string), string reference = default(string), TypeEnum type = default(TypeEnum)) - { - this.Amount = amount; - this.Type = type; - this.Account = account; - this.Description = description; - this.Reference = reference; - } - - /// - /// Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. - /// - /// Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. - [DataMember(Name = "account", EmitDefaultValue = false)] - public string Account { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public SplitAmount Amount { get; set; } - - /// - /// A description of this split. - /// - /// A description of this split. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. - /// - /// Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Split {\n"); - sb.Append(" Account: ").Append(Account).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Split); - } - - /// - /// Returns true if Split instances are equal - /// - /// Instance of Split to be compared - /// Boolean - public bool Equals(Split input) - { - if (input == null) - { - return false; - } - return - ( - this.Account == input.Account || - (this.Account != null && - this.Account.Equals(input.Account)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Account != null) - { - hashCode = (hashCode * 59) + this.Account.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/SplitAmount.cs b/Adyen/Model/PlatformsFund/SplitAmount.cs deleted file mode 100644 index d065e0095..000000000 --- a/Adyen/Model/PlatformsFund/SplitAmount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// SplitAmount - /// - [DataContract(Name = "SplitAmount")] - public partial class SplitAmount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SplitAmount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used.. - /// The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). (required). - public SplitAmount(string currency = default(string), long? value = default(long?)) - { - this.Value = value; - this.Currency = currency; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SplitAmount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SplitAmount); - } - - /// - /// Returns true if SplitAmount instances are equal - /// - /// Instance of SplitAmount to be compared - /// Boolean - public bool Equals(SplitAmount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/Transaction.cs b/Adyen/Model/PlatformsFund/Transaction.cs deleted file mode 100644 index c37764fb4..000000000 --- a/Adyen/Model/PlatformsFund/Transaction.cs +++ /dev/null @@ -1,687 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// Transaction - /// - [DataContract(Name = "Transaction")] - public partial class Transaction : IEquatable, IValidatableObject - { - /// - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. - /// - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. - [JsonConverter(typeof(StringEnumConverter))] - public enum TransactionStatusEnum - { - /// - /// Enum BalanceNotPaidOutTransfer for value: BalanceNotPaidOutTransfer - /// - [EnumMember(Value = "BalanceNotPaidOutTransfer")] - BalanceNotPaidOutTransfer = 1, - - /// - /// Enum BalancePlatformSweep for value: BalancePlatformSweep - /// - [EnumMember(Value = "BalancePlatformSweep")] - BalancePlatformSweep = 2, - - /// - /// Enum BalancePlatformSweepReturned for value: BalancePlatformSweepReturned - /// - [EnumMember(Value = "BalancePlatformSweepReturned")] - BalancePlatformSweepReturned = 3, - - /// - /// Enum Chargeback for value: Chargeback - /// - [EnumMember(Value = "Chargeback")] - Chargeback = 4, - - /// - /// Enum ChargebackCorrection for value: ChargebackCorrection - /// - [EnumMember(Value = "ChargebackCorrection")] - ChargebackCorrection = 5, - - /// - /// Enum ChargebackCorrectionReceived for value: ChargebackCorrectionReceived - /// - [EnumMember(Value = "ChargebackCorrectionReceived")] - ChargebackCorrectionReceived = 6, - - /// - /// Enum ChargebackReceived for value: ChargebackReceived - /// - [EnumMember(Value = "ChargebackReceived")] - ChargebackReceived = 7, - - /// - /// Enum ChargebackReversed for value: ChargebackReversed - /// - [EnumMember(Value = "ChargebackReversed")] - ChargebackReversed = 8, - - /// - /// Enum ChargebackReversedCorrection for value: ChargebackReversedCorrection - /// - [EnumMember(Value = "ChargebackReversedCorrection")] - ChargebackReversedCorrection = 9, - - /// - /// Enum ChargebackReversedCorrectionReceived for value: ChargebackReversedCorrectionReceived - /// - [EnumMember(Value = "ChargebackReversedCorrectionReceived")] - ChargebackReversedCorrectionReceived = 10, - - /// - /// Enum ChargebackReversedReceived for value: ChargebackReversedReceived - /// - [EnumMember(Value = "ChargebackReversedReceived")] - ChargebackReversedReceived = 11, - - /// - /// Enum Converted for value: Converted - /// - [EnumMember(Value = "Converted")] - Converted = 12, - - /// - /// Enum CreditClosed for value: CreditClosed - /// - [EnumMember(Value = "CreditClosed")] - CreditClosed = 13, - - /// - /// Enum CreditFailed for value: CreditFailed - /// - [EnumMember(Value = "CreditFailed")] - CreditFailed = 14, - - /// - /// Enum CreditReversed for value: CreditReversed - /// - [EnumMember(Value = "CreditReversed")] - CreditReversed = 15, - - /// - /// Enum CreditReversedReceived for value: CreditReversedReceived - /// - [EnumMember(Value = "CreditReversedReceived")] - CreditReversedReceived = 16, - - /// - /// Enum CreditSuspended for value: CreditSuspended - /// - [EnumMember(Value = "CreditSuspended")] - CreditSuspended = 17, - - /// - /// Enum Credited for value: Credited - /// - [EnumMember(Value = "Credited")] - Credited = 18, - - /// - /// Enum DebitFailed for value: DebitFailed - /// - [EnumMember(Value = "DebitFailed")] - DebitFailed = 19, - - /// - /// Enum DebitReversedReceived for value: DebitReversedReceived - /// - [EnumMember(Value = "DebitReversedReceived")] - DebitReversedReceived = 20, - - /// - /// Enum Debited for value: Debited - /// - [EnumMember(Value = "Debited")] - Debited = 21, - - /// - /// Enum DebitedReversed for value: DebitedReversed - /// - [EnumMember(Value = "DebitedReversed")] - DebitedReversed = 22, - - /// - /// Enum DepositCorrectionCredited for value: DepositCorrectionCredited - /// - [EnumMember(Value = "DepositCorrectionCredited")] - DepositCorrectionCredited = 23, - - /// - /// Enum DepositCorrectionDebited for value: DepositCorrectionDebited - /// - [EnumMember(Value = "DepositCorrectionDebited")] - DepositCorrectionDebited = 24, - - /// - /// Enum Fee for value: Fee - /// - [EnumMember(Value = "Fee")] - Fee = 25, - - /// - /// Enum FundTransfer for value: FundTransfer - /// - [EnumMember(Value = "FundTransfer")] - FundTransfer = 26, - - /// - /// Enum FundTransferReversed for value: FundTransferReversed - /// - [EnumMember(Value = "FundTransferReversed")] - FundTransferReversed = 27, - - /// - /// Enum InvoiceDeductionCredited for value: InvoiceDeductionCredited - /// - [EnumMember(Value = "InvoiceDeductionCredited")] - InvoiceDeductionCredited = 28, - - /// - /// Enum InvoiceDeductionDebited for value: InvoiceDeductionDebited - /// - [EnumMember(Value = "InvoiceDeductionDebited")] - InvoiceDeductionDebited = 29, - - /// - /// Enum ManualCorrected for value: ManualCorrected - /// - [EnumMember(Value = "ManualCorrected")] - ManualCorrected = 30, - - /// - /// Enum ManualCorrectionCredited for value: ManualCorrectionCredited - /// - [EnumMember(Value = "ManualCorrectionCredited")] - ManualCorrectionCredited = 31, - - /// - /// Enum ManualCorrectionDebited for value: ManualCorrectionDebited - /// - [EnumMember(Value = "ManualCorrectionDebited")] - ManualCorrectionDebited = 32, - - /// - /// Enum MerchantPayin for value: MerchantPayin - /// - [EnumMember(Value = "MerchantPayin")] - MerchantPayin = 33, - - /// - /// Enum MerchantPayinReversed for value: MerchantPayinReversed - /// - [EnumMember(Value = "MerchantPayinReversed")] - MerchantPayinReversed = 34, - - /// - /// Enum Payout for value: Payout - /// - [EnumMember(Value = "Payout")] - Payout = 35, - - /// - /// Enum PayoutReversed for value: PayoutReversed - /// - [EnumMember(Value = "PayoutReversed")] - PayoutReversed = 36, - - /// - /// Enum PendingCredit for value: PendingCredit - /// - [EnumMember(Value = "PendingCredit")] - PendingCredit = 37, - - /// - /// Enum PendingDebit for value: PendingDebit - /// - [EnumMember(Value = "PendingDebit")] - PendingDebit = 38, - - /// - /// Enum PendingFundTransfer for value: PendingFundTransfer - /// - [EnumMember(Value = "PendingFundTransfer")] - PendingFundTransfer = 39, - - /// - /// Enum ReCredited for value: ReCredited - /// - [EnumMember(Value = "ReCredited")] - ReCredited = 40, - - /// - /// Enum ReCreditedReceived for value: ReCreditedReceived - /// - [EnumMember(Value = "ReCreditedReceived")] - ReCreditedReceived = 41, - - /// - /// Enum SecondChargeback for value: SecondChargeback - /// - [EnumMember(Value = "SecondChargeback")] - SecondChargeback = 42, - - /// - /// Enum SecondChargebackCorrection for value: SecondChargebackCorrection - /// - [EnumMember(Value = "SecondChargebackCorrection")] - SecondChargebackCorrection = 43, - - /// - /// Enum SecondChargebackCorrectionReceived for value: SecondChargebackCorrectionReceived - /// - [EnumMember(Value = "SecondChargebackCorrectionReceived")] - SecondChargebackCorrectionReceived = 44, - - /// - /// Enum SecondChargebackReceived for value: SecondChargebackReceived - /// - [EnumMember(Value = "SecondChargebackReceived")] - SecondChargebackReceived = 45 - - } - - - /// - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. - /// - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. - [DataMember(Name = "transactionStatus", EmitDefaultValue = false)] - public TransactionStatusEnum? TransactionStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// bankAccountDetail. - /// The merchant reference of a related capture.. - /// The psp reference of a related capture.. - /// The date on which the transaction was performed.. - /// A description of the transaction.. - /// The code of the account to which funds were credited during an outgoing fund transfer.. - /// The psp reference of the related dispute.. - /// The reason code of a dispute.. - /// The merchant reference of a transaction.. - /// The psp reference of the related authorisation or transfer.. - /// The psp reference of the related payout.. - /// The psp reference of a transaction.. - /// The code of the account from which funds were debited during an incoming fund transfer.. - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`.. - /// The transfer code of the transaction.. - public Transaction(Amount amount = default(Amount), BankAccountDetail bankAccountDetail = default(BankAccountDetail), string captureMerchantReference = default(string), string capturePspReference = default(string), DateTime creationDate = default(DateTime), string description = default(string), string destinationAccountCode = default(string), string disputePspReference = default(string), string disputeReasonCode = default(string), string merchantReference = default(string), string paymentPspReference = default(string), string payoutPspReference = default(string), string pspReference = default(string), string sourceAccountCode = default(string), TransactionStatusEnum? transactionStatus = default(TransactionStatusEnum?), string transferCode = default(string)) - { - this.Amount = amount; - this.BankAccountDetail = bankAccountDetail; - this.CaptureMerchantReference = captureMerchantReference; - this.CapturePspReference = capturePspReference; - this.CreationDate = creationDate; - this.Description = description; - this.DestinationAccountCode = destinationAccountCode; - this.DisputePspReference = disputePspReference; - this.DisputeReasonCode = disputeReasonCode; - this.MerchantReference = merchantReference; - this.PaymentPspReference = paymentPspReference; - this.PayoutPspReference = payoutPspReference; - this.PspReference = pspReference; - this.SourceAccountCode = sourceAccountCode; - this.TransactionStatus = transactionStatus; - this.TransferCode = transferCode; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets BankAccountDetail - /// - [DataMember(Name = "bankAccountDetail", EmitDefaultValue = false)] - public BankAccountDetail BankAccountDetail { get; set; } - - /// - /// The merchant reference of a related capture. - /// - /// The merchant reference of a related capture. - [DataMember(Name = "captureMerchantReference", EmitDefaultValue = false)] - public string CaptureMerchantReference { get; set; } - - /// - /// The psp reference of a related capture. - /// - /// The psp reference of a related capture. - [DataMember(Name = "capturePspReference", EmitDefaultValue = false)] - public string CapturePspReference { get; set; } - - /// - /// The date on which the transaction was performed. - /// - /// The date on which the transaction was performed. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// A description of the transaction. - /// - /// A description of the transaction. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The code of the account to which funds were credited during an outgoing fund transfer. - /// - /// The code of the account to which funds were credited during an outgoing fund transfer. - [DataMember(Name = "destinationAccountCode", EmitDefaultValue = false)] - public string DestinationAccountCode { get; set; } - - /// - /// The psp reference of the related dispute. - /// - /// The psp reference of the related dispute. - [DataMember(Name = "disputePspReference", EmitDefaultValue = false)] - public string DisputePspReference { get; set; } - - /// - /// The reason code of a dispute. - /// - /// The reason code of a dispute. - [DataMember(Name = "disputeReasonCode", EmitDefaultValue = false)] - public string DisputeReasonCode { get; set; } - - /// - /// The merchant reference of a transaction. - /// - /// The merchant reference of a transaction. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The psp reference of the related authorisation or transfer. - /// - /// The psp reference of the related authorisation or transfer. - [DataMember(Name = "paymentPspReference", EmitDefaultValue = false)] - public string PaymentPspReference { get; set; } - - /// - /// The psp reference of the related payout. - /// - /// The psp reference of the related payout. - [DataMember(Name = "payoutPspReference", EmitDefaultValue = false)] - public string PayoutPspReference { get; set; } - - /// - /// The psp reference of a transaction. - /// - /// The psp reference of a transaction. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The code of the account from which funds were debited during an incoming fund transfer. - /// - /// The code of the account from which funds were debited during an incoming fund transfer. - [DataMember(Name = "sourceAccountCode", EmitDefaultValue = false)] - public string SourceAccountCode { get; set; } - - /// - /// The transfer code of the transaction. - /// - /// The transfer code of the transaction. - [DataMember(Name = "transferCode", EmitDefaultValue = false)] - public string TransferCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Transaction {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BankAccountDetail: ").Append(BankAccountDetail).Append("\n"); - sb.Append(" CaptureMerchantReference: ").Append(CaptureMerchantReference).Append("\n"); - sb.Append(" CapturePspReference: ").Append(CapturePspReference).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DestinationAccountCode: ").Append(DestinationAccountCode).Append("\n"); - sb.Append(" DisputePspReference: ").Append(DisputePspReference).Append("\n"); - sb.Append(" DisputeReasonCode: ").Append(DisputeReasonCode).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" PaymentPspReference: ").Append(PaymentPspReference).Append("\n"); - sb.Append(" PayoutPspReference: ").Append(PayoutPspReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" SourceAccountCode: ").Append(SourceAccountCode).Append("\n"); - sb.Append(" TransactionStatus: ").Append(TransactionStatus).Append("\n"); - sb.Append(" TransferCode: ").Append(TransferCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Transaction); - } - - /// - /// Returns true if Transaction instances are equal - /// - /// Instance of Transaction to be compared - /// Boolean - public bool Equals(Transaction input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BankAccountDetail == input.BankAccountDetail || - (this.BankAccountDetail != null && - this.BankAccountDetail.Equals(input.BankAccountDetail)) - ) && - ( - this.CaptureMerchantReference == input.CaptureMerchantReference || - (this.CaptureMerchantReference != null && - this.CaptureMerchantReference.Equals(input.CaptureMerchantReference)) - ) && - ( - this.CapturePspReference == input.CapturePspReference || - (this.CapturePspReference != null && - this.CapturePspReference.Equals(input.CapturePspReference)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DestinationAccountCode == input.DestinationAccountCode || - (this.DestinationAccountCode != null && - this.DestinationAccountCode.Equals(input.DestinationAccountCode)) - ) && - ( - this.DisputePspReference == input.DisputePspReference || - (this.DisputePspReference != null && - this.DisputePspReference.Equals(input.DisputePspReference)) - ) && - ( - this.DisputeReasonCode == input.DisputeReasonCode || - (this.DisputeReasonCode != null && - this.DisputeReasonCode.Equals(input.DisputeReasonCode)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.PaymentPspReference == input.PaymentPspReference || - (this.PaymentPspReference != null && - this.PaymentPspReference.Equals(input.PaymentPspReference)) - ) && - ( - this.PayoutPspReference == input.PayoutPspReference || - (this.PayoutPspReference != null && - this.PayoutPspReference.Equals(input.PayoutPspReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.SourceAccountCode == input.SourceAccountCode || - (this.SourceAccountCode != null && - this.SourceAccountCode.Equals(input.SourceAccountCode)) - ) && - ( - this.TransactionStatus == input.TransactionStatus || - this.TransactionStatus.Equals(input.TransactionStatus) - ) && - ( - this.TransferCode == input.TransferCode || - (this.TransferCode != null && - this.TransferCode.Equals(input.TransferCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BankAccountDetail != null) - { - hashCode = (hashCode * 59) + this.BankAccountDetail.GetHashCode(); - } - if (this.CaptureMerchantReference != null) - { - hashCode = (hashCode * 59) + this.CaptureMerchantReference.GetHashCode(); - } - if (this.CapturePspReference != null) - { - hashCode = (hashCode * 59) + this.CapturePspReference.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DestinationAccountCode != null) - { - hashCode = (hashCode * 59) + this.DestinationAccountCode.GetHashCode(); - } - if (this.DisputePspReference != null) - { - hashCode = (hashCode * 59) + this.DisputePspReference.GetHashCode(); - } - if (this.DisputeReasonCode != null) - { - hashCode = (hashCode * 59) + this.DisputeReasonCode.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.PaymentPspReference != null) - { - hashCode = (hashCode * 59) + this.PaymentPspReference.GetHashCode(); - } - if (this.PayoutPspReference != null) - { - hashCode = (hashCode * 59) + this.PayoutPspReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.SourceAccountCode != null) - { - hashCode = (hashCode * 59) + this.SourceAccountCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TransactionStatus.GetHashCode(); - if (this.TransferCode != null) - { - hashCode = (hashCode * 59) + this.TransferCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/TransactionListForAccount.cs b/Adyen/Model/PlatformsFund/TransactionListForAccount.cs deleted file mode 100644 index bb9a81691..000000000 --- a/Adyen/Model/PlatformsFund/TransactionListForAccount.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// TransactionListForAccount - /// - [DataContract(Name = "TransactionListForAccount")] - public partial class TransactionListForAccount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransactionListForAccount() { } - /// - /// Initializes a new instance of the class. - /// - /// The account for which to retrieve the transactions. (required). - /// The page of transactions to retrieve. Each page lists fifty (50) transactions. The most recent transactions are included on page 1. (required). - public TransactionListForAccount(string accountCode = default(string), int? page = default(int?)) - { - this.AccountCode = accountCode; - this.Page = page; - } - - /// - /// The account for which to retrieve the transactions. - /// - /// The account for which to retrieve the transactions. - [DataMember(Name = "accountCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The page of transactions to retrieve. Each page lists fifty (50) transactions. The most recent transactions are included on page 1. - /// - /// The page of transactions to retrieve. Each page lists fifty (50) transactions. The most recent transactions are included on page 1. - [DataMember(Name = "page", IsRequired = false, EmitDefaultValue = false)] - public int? Page { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionListForAccount {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" Page: ").Append(Page).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionListForAccount); - } - - /// - /// Returns true if TransactionListForAccount instances are equal - /// - /// Instance of TransactionListForAccount to be compared - /// Boolean - public bool Equals(TransactionListForAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.Page == input.Page || - this.Page.Equals(input.Page) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Page.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/TransferFundsRequest.cs b/Adyen/Model/PlatformsFund/TransferFundsRequest.cs deleted file mode 100644 index 9f14f70f8..000000000 --- a/Adyen/Model/PlatformsFund/TransferFundsRequest.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// TransferFundsRequest - /// - [DataContract(Name = "TransferFundsRequest")] - public partial class TransferFundsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferFundsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// The code of the account to which the funds are to be credited. >The state of the Account Holder of this account must be Active. (required). - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.. - /// The code of the account from which the funds are to be debited. >The state of the Account Holder of this account must be Active and allow payouts. (required). - /// The code related to the type of transfer being performed. >The permitted codes differ for each platform account and are defined in their service level agreement. (required). - public TransferFundsRequest(Amount amount = default(Amount), string destinationAccountCode = default(string), string merchantReference = default(string), string sourceAccountCode = default(string), string transferCode = default(string)) - { - this.Amount = amount; - this.DestinationAccountCode = destinationAccountCode; - this.SourceAccountCode = sourceAccountCode; - this.TransferCode = transferCode; - this.MerchantReference = merchantReference; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The code of the account to which the funds are to be credited. >The state of the Account Holder of this account must be Active. - /// - /// The code of the account to which the funds are to be credited. >The state of the Account Holder of this account must be Active. - [DataMember(Name = "destinationAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string DestinationAccountCode { get; set; } - - /// - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. - /// - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The code of the account from which the funds are to be debited. >The state of the Account Holder of this account must be Active and allow payouts. - /// - /// The code of the account from which the funds are to be debited. >The state of the Account Holder of this account must be Active and allow payouts. - [DataMember(Name = "sourceAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string SourceAccountCode { get; set; } - - /// - /// The code related to the type of transfer being performed. >The permitted codes differ for each platform account and are defined in their service level agreement. - /// - /// The code related to the type of transfer being performed. >The permitted codes differ for each platform account and are defined in their service level agreement. - [DataMember(Name = "transferCode", IsRequired = false, EmitDefaultValue = false)] - public string TransferCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferFundsRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" DestinationAccountCode: ").Append(DestinationAccountCode).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" SourceAccountCode: ").Append(SourceAccountCode).Append("\n"); - sb.Append(" TransferCode: ").Append(TransferCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferFundsRequest); - } - - /// - /// Returns true if TransferFundsRequest instances are equal - /// - /// Instance of TransferFundsRequest to be compared - /// Boolean - public bool Equals(TransferFundsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.DestinationAccountCode == input.DestinationAccountCode || - (this.DestinationAccountCode != null && - this.DestinationAccountCode.Equals(input.DestinationAccountCode)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.SourceAccountCode == input.SourceAccountCode || - (this.SourceAccountCode != null && - this.SourceAccountCode.Equals(input.SourceAccountCode)) - ) && - ( - this.TransferCode == input.TransferCode || - (this.TransferCode != null && - this.TransferCode.Equals(input.TransferCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.DestinationAccountCode != null) - { - hashCode = (hashCode * 59) + this.DestinationAccountCode.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.SourceAccountCode != null) - { - hashCode = (hashCode * 59) + this.SourceAccountCode.GetHashCode(); - } - if (this.TransferCode != null) - { - hashCode = (hashCode * 59) + this.TransferCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsFund/TransferFundsResponse.cs b/Adyen/Model/PlatformsFund/TransferFundsResponse.cs deleted file mode 100644 index cf846d18b..000000000 --- a/Adyen/Model/PlatformsFund/TransferFundsResponse.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsFund -{ - /// - /// TransferFundsResponse - /// - [DataContract(Name = "TransferFundsResponse")] - public partial class TransferFundsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains field validation errors that would prevent requests from being processed.. - /// The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public TransferFundsResponse(List invalidFields = default(List), string merchantReference = default(string), string pspReference = default(string), string resultCode = default(string)) - { - this.InvalidFields = invalidFields; - this.MerchantReference = merchantReference; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions. - /// - /// The value supplied by the executing user when initiating the transfer; may be used to link multiple transactions. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferFundsResponse {\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferFundsResponse); - } - - /// - /// Returns true if TransferFundsResponse instances are equal - /// - /// Instance of TransferFundsResponse to be compared - /// Boolean - public bool Equals(TransferFundsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/AbstractOpenAPISchema.cs b/Adyen/Model/PlatformsHostedOnboardingPage/AbstractOpenAPISchema.cs deleted file mode 100644 index f4825a9bc..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/CollectInformation.cs b/Adyen/Model/PlatformsHostedOnboardingPage/CollectInformation.cs deleted file mode 100644 index 8894a00d0..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/CollectInformation.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// CollectInformation - /// - [DataContract(Name = "CollectInformation")] - public partial class CollectInformation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether [bank account details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check) must be collected. Default is **true**.. - /// Indicates whether [business details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/company-check) must be collected. Default is **true**.. - /// Indicates whether [individual details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Default is **true**.. - /// Indicates whether [legal arrangement details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/legal-arrangements) must be collected. Default is **true**.. - /// Indicates whether answers to a [PCI questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#onboard-partner-platform) must be collected. Applies only to partner platforms. Default is **true**.. - /// Indicates whether [shareholder details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Defaults to **true**.. - public CollectInformation(bool? bankDetails = default(bool?), bool? businessDetails = default(bool?), bool? individualDetails = default(bool?), bool? legalArrangementDetails = default(bool?), bool? pciQuestionnaire = default(bool?), bool? shareholderDetails = default(bool?)) - { - this.BankDetails = bankDetails; - this.BusinessDetails = businessDetails; - this.IndividualDetails = individualDetails; - this.LegalArrangementDetails = legalArrangementDetails; - this.PciQuestionnaire = pciQuestionnaire; - this.ShareholderDetails = shareholderDetails; - } - - /// - /// Indicates whether [bank account details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check) must be collected. Default is **true**. - /// - /// Indicates whether [bank account details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/bank-account-check) must be collected. Default is **true**. - [DataMember(Name = "bankDetails", EmitDefaultValue = false)] - public bool? BankDetails { get; set; } - - /// - /// Indicates whether [business details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/company-check) must be collected. Default is **true**. - /// - /// Indicates whether [business details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/company-check) must be collected. Default is **true**. - [DataMember(Name = "businessDetails", EmitDefaultValue = false)] - public bool? BusinessDetails { get; set; } - - /// - /// Indicates whether [individual details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Default is **true**. - /// - /// Indicates whether [individual details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Default is **true**. - [DataMember(Name = "individualDetails", EmitDefaultValue = false)] - public bool? IndividualDetails { get; set; } - - /// - /// Indicates whether [legal arrangement details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/legal-arrangements) must be collected. Default is **true**. - /// - /// Indicates whether [legal arrangement details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/legal-arrangements) must be collected. Default is **true**. - [DataMember(Name = "legalArrangementDetails", EmitDefaultValue = false)] - public bool? LegalArrangementDetails { get; set; } - - /// - /// Indicates whether answers to a [PCI questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#onboard-partner-platform) must be collected. Applies only to partner platforms. Default is **true**. - /// - /// Indicates whether answers to a [PCI questionnaire](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-partners#onboard-partner-platform) must be collected. Applies only to partner platforms. Default is **true**. - [DataMember(Name = "pciQuestionnaire", EmitDefaultValue = false)] - public bool? PciQuestionnaire { get; set; } - - /// - /// Indicates whether [shareholder details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Defaults to **true**. - /// - /// Indicates whether [shareholder details](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-checks/identity-check) must be collected. Defaults to **true**. - [DataMember(Name = "shareholderDetails", EmitDefaultValue = false)] - public bool? ShareholderDetails { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CollectInformation {\n"); - sb.Append(" BankDetails: ").Append(BankDetails).Append("\n"); - sb.Append(" BusinessDetails: ").Append(BusinessDetails).Append("\n"); - sb.Append(" IndividualDetails: ").Append(IndividualDetails).Append("\n"); - sb.Append(" LegalArrangementDetails: ").Append(LegalArrangementDetails).Append("\n"); - sb.Append(" PciQuestionnaire: ").Append(PciQuestionnaire).Append("\n"); - sb.Append(" ShareholderDetails: ").Append(ShareholderDetails).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CollectInformation); - } - - /// - /// Returns true if CollectInformation instances are equal - /// - /// Instance of CollectInformation to be compared - /// Boolean - public bool Equals(CollectInformation input) - { - if (input == null) - { - return false; - } - return - ( - this.BankDetails == input.BankDetails || - this.BankDetails.Equals(input.BankDetails) - ) && - ( - this.BusinessDetails == input.BusinessDetails || - this.BusinessDetails.Equals(input.BusinessDetails) - ) && - ( - this.IndividualDetails == input.IndividualDetails || - this.IndividualDetails.Equals(input.IndividualDetails) - ) && - ( - this.LegalArrangementDetails == input.LegalArrangementDetails || - this.LegalArrangementDetails.Equals(input.LegalArrangementDetails) - ) && - ( - this.PciQuestionnaire == input.PciQuestionnaire || - this.PciQuestionnaire.Equals(input.PciQuestionnaire) - ) && - ( - this.ShareholderDetails == input.ShareholderDetails || - this.ShareholderDetails.Equals(input.ShareholderDetails) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.BankDetails.GetHashCode(); - hashCode = (hashCode * 59) + this.BusinessDetails.GetHashCode(); - hashCode = (hashCode * 59) + this.IndividualDetails.GetHashCode(); - hashCode = (hashCode * 59) + this.LegalArrangementDetails.GetHashCode(); - hashCode = (hashCode * 59) + this.PciQuestionnaire.GetHashCode(); - hashCode = (hashCode * 59) + this.ShareholderDetails.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/ErrorFieldType.cs b/Adyen/Model/PlatformsHostedOnboardingPage/ErrorFieldType.cs deleted file mode 100644 index 04f067bb1..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/ErrorFieldType.cs +++ /dev/null @@ -1,162 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// ErrorFieldType - /// - [DataContract(Name = "ErrorFieldType")] - public partial class ErrorFieldType : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The validation error code.. - /// A description of the validation error.. - /// fieldType. - public ErrorFieldType(int? errorCode = default(int?), string errorDescription = default(string), FieldType fieldType = default(FieldType)) - { - this.ErrorCode = errorCode; - this.ErrorDescription = errorDescription; - this.FieldType = fieldType; - } - - /// - /// The validation error code. - /// - /// The validation error code. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public int? ErrorCode { get; set; } - - /// - /// A description of the validation error. - /// - /// A description of the validation error. - [DataMember(Name = "errorDescription", EmitDefaultValue = false)] - public string ErrorDescription { get; set; } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name = "fieldType", EmitDefaultValue = false)] - public FieldType FieldType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ErrorFieldType {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); - sb.Append(" FieldType: ").Append(FieldType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ErrorFieldType); - } - - /// - /// Returns true if ErrorFieldType instances are equal - /// - /// Instance of ErrorFieldType to be compared - /// Boolean - public bool Equals(ErrorFieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - this.ErrorCode.Equals(input.ErrorCode) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.FieldType != null) - { - hashCode = (hashCode * 59) + this.FieldType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/FieldType.cs b/Adyen/Model/PlatformsHostedOnboardingPage/FieldType.cs deleted file mode 100644 index 00d943c82..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/FieldType.cs +++ /dev/null @@ -1,1144 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// FieldType - /// - [DataContract(Name = "FieldType")] - public partial class FieldType : IEquatable, IValidatableObject - { - /// - /// The type of the field. - /// - /// The type of the field. - [JsonConverter(typeof(StringEnumConverter))] - public enum FieldNameEnum - { - /// - /// Enum AccountCode for value: accountCode - /// - [EnumMember(Value = "accountCode")] - AccountCode = 1, - - /// - /// Enum AccountHolderCode for value: accountHolderCode - /// - [EnumMember(Value = "accountHolderCode")] - AccountHolderCode = 2, - - /// - /// Enum AccountHolderDetails for value: accountHolderDetails - /// - [EnumMember(Value = "accountHolderDetails")] - AccountHolderDetails = 3, - - /// - /// Enum AccountNumber for value: accountNumber - /// - [EnumMember(Value = "accountNumber")] - AccountNumber = 4, - - /// - /// Enum AccountStateType for value: accountStateType - /// - [EnumMember(Value = "accountStateType")] - AccountStateType = 5, - - /// - /// Enum AccountStatus for value: accountStatus - /// - [EnumMember(Value = "accountStatus")] - AccountStatus = 6, - - /// - /// Enum AccountType for value: accountType - /// - [EnumMember(Value = "accountType")] - AccountType = 7, - - /// - /// Enum Address for value: address - /// - [EnumMember(Value = "address")] - Address = 8, - - /// - /// Enum BalanceAccount for value: balanceAccount - /// - [EnumMember(Value = "balanceAccount")] - BalanceAccount = 9, - - /// - /// Enum BalanceAccountActive for value: balanceAccountActive - /// - [EnumMember(Value = "balanceAccountActive")] - BalanceAccountActive = 10, - - /// - /// Enum BalanceAccountCode for value: balanceAccountCode - /// - [EnumMember(Value = "balanceAccountCode")] - BalanceAccountCode = 11, - - /// - /// Enum BalanceAccountId for value: balanceAccountId - /// - [EnumMember(Value = "balanceAccountId")] - BalanceAccountId = 12, - - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 13, - - /// - /// Enum BankAccountCode for value: bankAccountCode - /// - [EnumMember(Value = "bankAccountCode")] - BankAccountCode = 14, - - /// - /// Enum BankAccountName for value: bankAccountName - /// - [EnumMember(Value = "bankAccountName")] - BankAccountName = 15, - - /// - /// Enum BankAccountUUID for value: bankAccountUUID - /// - [EnumMember(Value = "bankAccountUUID")] - BankAccountUUID = 16, - - /// - /// Enum BankBicSwift for value: bankBicSwift - /// - [EnumMember(Value = "bankBicSwift")] - BankBicSwift = 17, - - /// - /// Enum BankCity for value: bankCity - /// - [EnumMember(Value = "bankCity")] - BankCity = 18, - - /// - /// Enum BankCode for value: bankCode - /// - [EnumMember(Value = "bankCode")] - BankCode = 19, - - /// - /// Enum BankName for value: bankName - /// - [EnumMember(Value = "bankName")] - BankName = 20, - - /// - /// Enum BankStatement for value: bankStatement - /// - [EnumMember(Value = "bankStatement")] - BankStatement = 21, - - /// - /// Enum BranchCode for value: branchCode - /// - [EnumMember(Value = "branchCode")] - BranchCode = 22, - - /// - /// Enum BusinessContact for value: businessContact - /// - [EnumMember(Value = "businessContact")] - BusinessContact = 23, - - /// - /// Enum CardToken for value: cardToken - /// - [EnumMember(Value = "cardToken")] - CardToken = 24, - - /// - /// Enum CheckCode for value: checkCode - /// - [EnumMember(Value = "checkCode")] - CheckCode = 25, - - /// - /// Enum City for value: city - /// - [EnumMember(Value = "city")] - City = 26, - - /// - /// Enum CompanyRegistration for value: companyRegistration - /// - [EnumMember(Value = "companyRegistration")] - CompanyRegistration = 27, - - /// - /// Enum ConstitutionalDocument for value: constitutionalDocument - /// - [EnumMember(Value = "constitutionalDocument")] - ConstitutionalDocument = 28, - - /// - /// Enum Controller for value: controller - /// - [EnumMember(Value = "controller")] - Controller = 29, - - /// - /// Enum Country for value: country - /// - [EnumMember(Value = "country")] - Country = 30, - - /// - /// Enum CountryCode for value: countryCode - /// - [EnumMember(Value = "countryCode")] - CountryCode = 31, - - /// - /// Enum Currency for value: currency - /// - [EnumMember(Value = "currency")] - Currency = 32, - - /// - /// Enum CurrencyCode for value: currencyCode - /// - [EnumMember(Value = "currencyCode")] - CurrencyCode = 33, - - /// - /// Enum DateOfBirth for value: dateOfBirth - /// - [EnumMember(Value = "dateOfBirth")] - DateOfBirth = 34, - - /// - /// Enum Description for value: description - /// - [EnumMember(Value = "description")] - Description = 35, - - /// - /// Enum DestinationAccountCode for value: destinationAccountCode - /// - [EnumMember(Value = "destinationAccountCode")] - DestinationAccountCode = 36, - - /// - /// Enum Document for value: document - /// - [EnumMember(Value = "document")] - Document = 37, - - /// - /// Enum DocumentContent for value: documentContent - /// - [EnumMember(Value = "documentContent")] - DocumentContent = 38, - - /// - /// Enum DocumentExpirationDate for value: documentExpirationDate - /// - [EnumMember(Value = "documentExpirationDate")] - DocumentExpirationDate = 39, - - /// - /// Enum DocumentIssuerCountry for value: documentIssuerCountry - /// - [EnumMember(Value = "documentIssuerCountry")] - DocumentIssuerCountry = 40, - - /// - /// Enum DocumentIssuerState for value: documentIssuerState - /// - [EnumMember(Value = "documentIssuerState")] - DocumentIssuerState = 41, - - /// - /// Enum DocumentName for value: documentName - /// - [EnumMember(Value = "documentName")] - DocumentName = 42, - - /// - /// Enum DocumentNumber for value: documentNumber - /// - [EnumMember(Value = "documentNumber")] - DocumentNumber = 43, - - /// - /// Enum DocumentType for value: documentType - /// - [EnumMember(Value = "documentType")] - DocumentType = 44, - - /// - /// Enum DoingBusinessAs for value: doingBusinessAs - /// - [EnumMember(Value = "doingBusinessAs")] - DoingBusinessAs = 45, - - /// - /// Enum DrivingLicence for value: drivingLicence - /// - [EnumMember(Value = "drivingLicence")] - DrivingLicence = 46, - - /// - /// Enum DrivingLicenceBack for value: drivingLicenceBack - /// - [EnumMember(Value = "drivingLicenceBack")] - DrivingLicenceBack = 47, - - /// - /// Enum DrivingLicenceFront for value: drivingLicenceFront - /// - [EnumMember(Value = "drivingLicenceFront")] - DrivingLicenceFront = 48, - - /// - /// Enum DrivingLicense for value: drivingLicense - /// - [EnumMember(Value = "drivingLicense")] - DrivingLicense = 49, - - /// - /// Enum Email for value: email - /// - [EnumMember(Value = "email")] - Email = 50, - - /// - /// Enum FirstName for value: firstName - /// - [EnumMember(Value = "firstName")] - FirstName = 51, - - /// - /// Enum FormType for value: formType - /// - [EnumMember(Value = "formType")] - FormType = 52, - - /// - /// Enum FullPhoneNumber for value: fullPhoneNumber - /// - [EnumMember(Value = "fullPhoneNumber")] - FullPhoneNumber = 53, - - /// - /// Enum Gender for value: gender - /// - [EnumMember(Value = "gender")] - Gender = 54, - - /// - /// Enum HopWebserviceUser for value: hopWebserviceUser - /// - [EnumMember(Value = "hopWebserviceUser")] - HopWebserviceUser = 55, - - /// - /// Enum HouseNumberOrName for value: houseNumberOrName - /// - [EnumMember(Value = "houseNumberOrName")] - HouseNumberOrName = 56, - - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 57, - - /// - /// Enum IdCard for value: idCard - /// - [EnumMember(Value = "idCard")] - IdCard = 58, - - /// - /// Enum IdCardBack for value: idCardBack - /// - [EnumMember(Value = "idCardBack")] - IdCardBack = 59, - - /// - /// Enum IdCardFront for value: idCardFront - /// - [EnumMember(Value = "idCardFront")] - IdCardFront = 60, - - /// - /// Enum IdNumber for value: idNumber - /// - [EnumMember(Value = "idNumber")] - IdNumber = 61, - - /// - /// Enum IdentityDocument for value: identityDocument - /// - [EnumMember(Value = "identityDocument")] - IdentityDocument = 62, - - /// - /// Enum IndividualDetails for value: individualDetails - /// - [EnumMember(Value = "individualDetails")] - IndividualDetails = 63, - - /// - /// Enum Infix for value: infix - /// - [EnumMember(Value = "infix")] - Infix = 64, - - /// - /// Enum JobTitle for value: jobTitle - /// - [EnumMember(Value = "jobTitle")] - JobTitle = 65, - - /// - /// Enum LastName for value: lastName - /// - [EnumMember(Value = "lastName")] - LastName = 66, - - /// - /// Enum LastReviewDate for value: lastReviewDate - /// - [EnumMember(Value = "lastReviewDate")] - LastReviewDate = 67, - - /// - /// Enum LegalArrangement for value: legalArrangement - /// - [EnumMember(Value = "legalArrangement")] - LegalArrangement = 68, - - /// - /// Enum LegalArrangementCode for value: legalArrangementCode - /// - [EnumMember(Value = "legalArrangementCode")] - LegalArrangementCode = 69, - - /// - /// Enum LegalArrangementEntity for value: legalArrangementEntity - /// - [EnumMember(Value = "legalArrangementEntity")] - LegalArrangementEntity = 70, - - /// - /// Enum LegalArrangementEntityCode for value: legalArrangementEntityCode - /// - [EnumMember(Value = "legalArrangementEntityCode")] - LegalArrangementEntityCode = 71, - - /// - /// Enum LegalArrangementLegalForm for value: legalArrangementLegalForm - /// - [EnumMember(Value = "legalArrangementLegalForm")] - LegalArrangementLegalForm = 72, - - /// - /// Enum LegalArrangementMember for value: legalArrangementMember - /// - [EnumMember(Value = "legalArrangementMember")] - LegalArrangementMember = 73, - - /// - /// Enum LegalArrangementMembers for value: legalArrangementMembers - /// - [EnumMember(Value = "legalArrangementMembers")] - LegalArrangementMembers = 74, - - /// - /// Enum LegalArrangementName for value: legalArrangementName - /// - [EnumMember(Value = "legalArrangementName")] - LegalArrangementName = 75, - - /// - /// Enum LegalArrangementReference for value: legalArrangementReference - /// - [EnumMember(Value = "legalArrangementReference")] - LegalArrangementReference = 76, - - /// - /// Enum LegalArrangementRegistrationNumber for value: legalArrangementRegistrationNumber - /// - [EnumMember(Value = "legalArrangementRegistrationNumber")] - LegalArrangementRegistrationNumber = 77, - - /// - /// Enum LegalArrangementTaxNumber for value: legalArrangementTaxNumber - /// - [EnumMember(Value = "legalArrangementTaxNumber")] - LegalArrangementTaxNumber = 78, - - /// - /// Enum LegalArrangementType for value: legalArrangementType - /// - [EnumMember(Value = "legalArrangementType")] - LegalArrangementType = 79, - - /// - /// Enum LegalBusinessName for value: legalBusinessName - /// - [EnumMember(Value = "legalBusinessName")] - LegalBusinessName = 80, - - /// - /// Enum LegalEntity for value: legalEntity - /// - [EnumMember(Value = "legalEntity")] - LegalEntity = 81, - - /// - /// Enum LegalEntityType for value: legalEntityType - /// - [EnumMember(Value = "legalEntityType")] - LegalEntityType = 82, - - /// - /// Enum Logo for value: logo - /// - [EnumMember(Value = "logo")] - Logo = 83, - - /// - /// Enum MerchantAccount for value: merchantAccount - /// - [EnumMember(Value = "merchantAccount")] - MerchantAccount = 84, - - /// - /// Enum MerchantCategoryCode for value: merchantCategoryCode - /// - [EnumMember(Value = "merchantCategoryCode")] - MerchantCategoryCode = 85, - - /// - /// Enum MerchantHouseNumber for value: merchantHouseNumber - /// - [EnumMember(Value = "merchantHouseNumber")] - MerchantHouseNumber = 86, - - /// - /// Enum MerchantReference for value: merchantReference - /// - [EnumMember(Value = "merchantReference")] - MerchantReference = 87, - - /// - /// Enum MicroDeposit for value: microDeposit - /// - [EnumMember(Value = "microDeposit")] - MicroDeposit = 88, - - /// - /// Enum Name for value: name - /// - [EnumMember(Value = "name")] - Name = 89, - - /// - /// Enum Nationality for value: nationality - /// - [EnumMember(Value = "nationality")] - Nationality = 90, - - /// - /// Enum OriginalReference for value: originalReference - /// - [EnumMember(Value = "originalReference")] - OriginalReference = 91, - - /// - /// Enum OwnerCity for value: ownerCity - /// - [EnumMember(Value = "ownerCity")] - OwnerCity = 92, - - /// - /// Enum OwnerCountryCode for value: ownerCountryCode - /// - [EnumMember(Value = "ownerCountryCode")] - OwnerCountryCode = 93, - - /// - /// Enum OwnerDateOfBirth for value: ownerDateOfBirth - /// - [EnumMember(Value = "ownerDateOfBirth")] - OwnerDateOfBirth = 94, - - /// - /// Enum OwnerHouseNumberOrName for value: ownerHouseNumberOrName - /// - [EnumMember(Value = "ownerHouseNumberOrName")] - OwnerHouseNumberOrName = 95, - - /// - /// Enum OwnerName for value: ownerName - /// - [EnumMember(Value = "ownerName")] - OwnerName = 96, - - /// - /// Enum OwnerPostalCode for value: ownerPostalCode - /// - [EnumMember(Value = "ownerPostalCode")] - OwnerPostalCode = 97, - - /// - /// Enum OwnerState for value: ownerState - /// - [EnumMember(Value = "ownerState")] - OwnerState = 98, - - /// - /// Enum OwnerStreet for value: ownerStreet - /// - [EnumMember(Value = "ownerStreet")] - OwnerStreet = 99, - - /// - /// Enum Passport for value: passport - /// - [EnumMember(Value = "passport")] - Passport = 100, - - /// - /// Enum PassportNumber for value: passportNumber - /// - [EnumMember(Value = "passportNumber")] - PassportNumber = 101, - - /// - /// Enum PayoutMethod for value: payoutMethod - /// - [EnumMember(Value = "payoutMethod")] - PayoutMethod = 102, - - /// - /// Enum PayoutMethodCode for value: payoutMethodCode - /// - [EnumMember(Value = "payoutMethodCode")] - PayoutMethodCode = 103, - - /// - /// Enum PayoutSchedule for value: payoutSchedule - /// - [EnumMember(Value = "payoutSchedule")] - PayoutSchedule = 104, - - /// - /// Enum PciSelfAssessment for value: pciSelfAssessment - /// - [EnumMember(Value = "pciSelfAssessment")] - PciSelfAssessment = 105, - - /// - /// Enum PersonalData for value: personalData - /// - [EnumMember(Value = "personalData")] - PersonalData = 106, - - /// - /// Enum PhoneCountryCode for value: phoneCountryCode - /// - [EnumMember(Value = "phoneCountryCode")] - PhoneCountryCode = 107, - - /// - /// Enum PhoneNumber for value: phoneNumber - /// - [EnumMember(Value = "phoneNumber")] - PhoneNumber = 108, - - /// - /// Enum PostalCode for value: postalCode - /// - [EnumMember(Value = "postalCode")] - PostalCode = 109, - - /// - /// Enum PrimaryCurrency for value: primaryCurrency - /// - [EnumMember(Value = "primaryCurrency")] - PrimaryCurrency = 110, - - /// - /// Enum Reason for value: reason - /// - [EnumMember(Value = "reason")] - Reason = 111, - - /// - /// Enum RegistrationNumber for value: registrationNumber - /// - [EnumMember(Value = "registrationNumber")] - RegistrationNumber = 112, - - /// - /// Enum ReturnUrl for value: returnUrl - /// - [EnumMember(Value = "returnUrl")] - ReturnUrl = 113, - - /// - /// Enum Schedule for value: schedule - /// - [EnumMember(Value = "schedule")] - Schedule = 114, - - /// - /// Enum Shareholder for value: shareholder - /// - [EnumMember(Value = "shareholder")] - Shareholder = 115, - - /// - /// Enum ShareholderCode for value: shareholderCode - /// - [EnumMember(Value = "shareholderCode")] - ShareholderCode = 116, - - /// - /// Enum ShareholderCodeAndSignatoryCode for value: shareholderCodeAndSignatoryCode - /// - [EnumMember(Value = "shareholderCodeAndSignatoryCode")] - ShareholderCodeAndSignatoryCode = 117, - - /// - /// Enum ShareholderCodeOrSignatoryCode for value: shareholderCodeOrSignatoryCode - /// - [EnumMember(Value = "shareholderCodeOrSignatoryCode")] - ShareholderCodeOrSignatoryCode = 118, - - /// - /// Enum ShareholderType for value: shareholderType - /// - [EnumMember(Value = "shareholderType")] - ShareholderType = 119, - - /// - /// Enum ShareholderTypes for value: shareholderTypes - /// - [EnumMember(Value = "shareholderTypes")] - ShareholderTypes = 120, - - /// - /// Enum ShopperInteraction for value: shopperInteraction - /// - [EnumMember(Value = "shopperInteraction")] - ShopperInteraction = 121, - - /// - /// Enum Signatory for value: signatory - /// - [EnumMember(Value = "signatory")] - Signatory = 122, - - /// - /// Enum SignatoryCode for value: signatoryCode - /// - [EnumMember(Value = "signatoryCode")] - SignatoryCode = 123, - - /// - /// Enum SocialSecurityNumber for value: socialSecurityNumber - /// - [EnumMember(Value = "socialSecurityNumber")] - SocialSecurityNumber = 124, - - /// - /// Enum SourceAccountCode for value: sourceAccountCode - /// - [EnumMember(Value = "sourceAccountCode")] - SourceAccountCode = 125, - - /// - /// Enum SplitAccount for value: splitAccount - /// - [EnumMember(Value = "splitAccount")] - SplitAccount = 126, - - /// - /// Enum SplitConfigurationUUID for value: splitConfigurationUUID - /// - [EnumMember(Value = "splitConfigurationUUID")] - SplitConfigurationUUID = 127, - - /// - /// Enum SplitCurrency for value: splitCurrency - /// - [EnumMember(Value = "splitCurrency")] - SplitCurrency = 128, - - /// - /// Enum SplitValue for value: splitValue - /// - [EnumMember(Value = "splitValue")] - SplitValue = 129, - - /// - /// Enum Splits for value: splits - /// - [EnumMember(Value = "splits")] - Splits = 130, - - /// - /// Enum StateOrProvince for value: stateOrProvince - /// - [EnumMember(Value = "stateOrProvince")] - StateOrProvince = 131, - - /// - /// Enum Status for value: status - /// - [EnumMember(Value = "status")] - Status = 132, - - /// - /// Enum StockExchange for value: stockExchange - /// - [EnumMember(Value = "stockExchange")] - StockExchange = 133, - - /// - /// Enum StockNumber for value: stockNumber - /// - [EnumMember(Value = "stockNumber")] - StockNumber = 134, - - /// - /// Enum StockTicker for value: stockTicker - /// - [EnumMember(Value = "stockTicker")] - StockTicker = 135, - - /// - /// Enum Store for value: store - /// - [EnumMember(Value = "store")] - Store = 136, - - /// - /// Enum StoreDetail for value: storeDetail - /// - [EnumMember(Value = "storeDetail")] - StoreDetail = 137, - - /// - /// Enum StoreName for value: storeName - /// - [EnumMember(Value = "storeName")] - StoreName = 138, - - /// - /// Enum StoreReference for value: storeReference - /// - [EnumMember(Value = "storeReference")] - StoreReference = 139, - - /// - /// Enum Street for value: street - /// - [EnumMember(Value = "street")] - Street = 140, - - /// - /// Enum TaxId for value: taxId - /// - [EnumMember(Value = "taxId")] - TaxId = 141, - - /// - /// Enum Tier for value: tier - /// - [EnumMember(Value = "tier")] - Tier = 142, - - /// - /// Enum TierNumber for value: tierNumber - /// - [EnumMember(Value = "tierNumber")] - TierNumber = 143, - - /// - /// Enum TransferCode for value: transferCode - /// - [EnumMember(Value = "transferCode")] - TransferCode = 144, - - /// - /// Enum UltimateParentCompany for value: ultimateParentCompany - /// - [EnumMember(Value = "ultimateParentCompany")] - UltimateParentCompany = 145, - - /// - /// Enum UltimateParentCompanyAddressDetails for value: ultimateParentCompanyAddressDetails - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetails")] - UltimateParentCompanyAddressDetails = 146, - - /// - /// Enum UltimateParentCompanyAddressDetailsCountry for value: ultimateParentCompanyAddressDetailsCountry - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetailsCountry")] - UltimateParentCompanyAddressDetailsCountry = 147, - - /// - /// Enum UltimateParentCompanyBusinessDetails for value: ultimateParentCompanyBusinessDetails - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetails")] - UltimateParentCompanyBusinessDetails = 148, - - /// - /// Enum UltimateParentCompanyBusinessDetailsLegalBusinessName for value: ultimateParentCompanyBusinessDetailsLegalBusinessName - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsLegalBusinessName")] - UltimateParentCompanyBusinessDetailsLegalBusinessName = 149, - - /// - /// Enum UltimateParentCompanyBusinessDetailsRegistrationNumber for value: ultimateParentCompanyBusinessDetailsRegistrationNumber - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsRegistrationNumber")] - UltimateParentCompanyBusinessDetailsRegistrationNumber = 150, - - /// - /// Enum UltimateParentCompanyCode for value: ultimateParentCompanyCode - /// - [EnumMember(Value = "ultimateParentCompanyCode")] - UltimateParentCompanyCode = 151, - - /// - /// Enum UltimateParentCompanyStockExchange for value: ultimateParentCompanyStockExchange - /// - [EnumMember(Value = "ultimateParentCompanyStockExchange")] - UltimateParentCompanyStockExchange = 152, - - /// - /// Enum UltimateParentCompanyStockNumber for value: ultimateParentCompanyStockNumber - /// - [EnumMember(Value = "ultimateParentCompanyStockNumber")] - UltimateParentCompanyStockNumber = 153, - - /// - /// Enum UltimateParentCompanyStockNumberOrStockTicker for value: ultimateParentCompanyStockNumberOrStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockNumberOrStockTicker")] - UltimateParentCompanyStockNumberOrStockTicker = 154, - - /// - /// Enum UltimateParentCompanyStockTicker for value: ultimateParentCompanyStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockTicker")] - UltimateParentCompanyStockTicker = 155, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 156, - - /// - /// Enum Value for value: value - /// - [EnumMember(Value = "value")] - Value = 157, - - /// - /// Enum VerificationType for value: verificationType - /// - [EnumMember(Value = "verificationType")] - VerificationType = 158, - - /// - /// Enum VirtualAccount for value: virtualAccount - /// - [EnumMember(Value = "virtualAccount")] - VirtualAccount = 159, - - /// - /// Enum VisaNumber for value: visaNumber - /// - [EnumMember(Value = "visaNumber")] - VisaNumber = 160, - - /// - /// Enum WebAddress for value: webAddress - /// - [EnumMember(Value = "webAddress")] - WebAddress = 161, - - /// - /// Enum Year for value: year - /// - [EnumMember(Value = "year")] - Year = 162 - - } - - - /// - /// The type of the field. - /// - /// The type of the field. - [DataMember(Name = "fieldName", EmitDefaultValue = false)] - public FieldNameEnum? FieldName { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The full name of the property.. - /// The type of the field.. - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.. - public FieldType(string field = default(string), FieldNameEnum? fieldName = default(FieldNameEnum?), string shareholderCode = default(string)) - { - this.Field = field; - this.FieldName = fieldName; - this.ShareholderCode = shareholderCode; - } - - /// - /// The full name of the property. - /// - /// The full name of the property. - [DataMember(Name = "field", EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FieldType {\n"); - sb.Append(" Field: ").Append(Field).Append("\n"); - sb.Append(" FieldName: ").Append(FieldName).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FieldType); - } - - /// - /// Returns true if FieldType instances are equal - /// - /// Instance of FieldType to be compared - /// Boolean - public bool Equals(FieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.FieldName == input.FieldName || - this.FieldName.Equals(input.FieldName) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FieldName.GetHashCode(); - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/GetOnboardingUrlRequest.cs b/Adyen/Model/PlatformsHostedOnboardingPage/GetOnboardingUrlRequest.cs deleted file mode 100644 index c4a7f53db..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/GetOnboardingUrlRequest.cs +++ /dev/null @@ -1,261 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// GetOnboardingUrlRequest - /// - [DataContract(Name = "GetOnboardingUrlRequest")] - public partial class GetOnboardingUrlRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetOnboardingUrlRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The account holder code you provided when you created the account holder. (required). - /// collectInformation. - /// Indicates if editing checks is allowed even if all the checks have passed.. - /// The URL to which the account holder is redirected after completing an OAuth authentication with a bank through Trustly/PayMyBank.. - /// The platform name which will show up in the welcome page.. - /// The URL where the account holder will be redirected back to after they complete the onboarding, or if their session times out. Maximum length of 500 characters. If you don't provide this, the account holder will be redirected back to the default return URL configured in your platform account.. - /// The language to be used in the page, specified by a combination of a language and country code. For example, **pt-BR**. If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default. For a list of supported languages, refer to [Change the page language](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page/customize-experience#change-page-language).. - /// showPages. - public GetOnboardingUrlRequest(string accountHolderCode = default(string), CollectInformation collectInformation = default(CollectInformation), bool? editMode = default(bool?), string mobileOAuthCallbackUrl = default(string), string platformName = default(string), string returnUrl = default(string), string shopperLocale = default(string), ShowPages showPages = default(ShowPages)) - { - this.AccountHolderCode = accountHolderCode; - this.CollectInformation = collectInformation; - this.EditMode = editMode; - this.MobileOAuthCallbackUrl = mobileOAuthCallbackUrl; - this.PlatformName = platformName; - this.ReturnUrl = returnUrl; - this.ShopperLocale = shopperLocale; - this.ShowPages = showPages; - } - - /// - /// The account holder code you provided when you created the account holder. - /// - /// The account holder code you provided when you created the account holder. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets CollectInformation - /// - [DataMember(Name = "collectInformation", EmitDefaultValue = false)] - public CollectInformation CollectInformation { get; set; } - - /// - /// Indicates if editing checks is allowed even if all the checks have passed. - /// - /// Indicates if editing checks is allowed even if all the checks have passed. - [DataMember(Name = "editMode", EmitDefaultValue = false)] - public bool? EditMode { get; set; } - - /// - /// The URL to which the account holder is redirected after completing an OAuth authentication with a bank through Trustly/PayMyBank. - /// - /// The URL to which the account holder is redirected after completing an OAuth authentication with a bank through Trustly/PayMyBank. - [DataMember(Name = "mobileOAuthCallbackUrl", EmitDefaultValue = false)] - public string MobileOAuthCallbackUrl { get; set; } - - /// - /// The platform name which will show up in the welcome page. - /// - /// The platform name which will show up in the welcome page. - [DataMember(Name = "platformName", EmitDefaultValue = false)] - public string PlatformName { get; set; } - - /// - /// The URL where the account holder will be redirected back to after they complete the onboarding, or if their session times out. Maximum length of 500 characters. If you don't provide this, the account holder will be redirected back to the default return URL configured in your platform account. - /// - /// The URL where the account holder will be redirected back to after they complete the onboarding, or if their session times out. Maximum length of 500 characters. If you don't provide this, the account holder will be redirected back to the default return URL configured in your platform account. - [DataMember(Name = "returnUrl", EmitDefaultValue = false)] - public string ReturnUrl { get; set; } - - /// - /// The language to be used in the page, specified by a combination of a language and country code. For example, **pt-BR**. If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default. For a list of supported languages, refer to [Change the page language](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page/customize-experience#change-page-language). - /// - /// The language to be used in the page, specified by a combination of a language and country code. For example, **pt-BR**. If not specified in the request or if the language is not supported, the page uses the browser language. If the browser language is not supported, the page uses **en-US** by default. For a list of supported languages, refer to [Change the page language](https://docs.adyen.com/marketplaces-and-platforms/classic/hosted-onboarding-page/customize-experience#change-page-language). - [DataMember(Name = "shopperLocale", EmitDefaultValue = false)] - public string ShopperLocale { get; set; } - - /// - /// Gets or Sets ShowPages - /// - [DataMember(Name = "showPages", EmitDefaultValue = false)] - public ShowPages ShowPages { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetOnboardingUrlRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" CollectInformation: ").Append(CollectInformation).Append("\n"); - sb.Append(" EditMode: ").Append(EditMode).Append("\n"); - sb.Append(" MobileOAuthCallbackUrl: ").Append(MobileOAuthCallbackUrl).Append("\n"); - sb.Append(" PlatformName: ").Append(PlatformName).Append("\n"); - sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); - sb.Append(" ShopperLocale: ").Append(ShopperLocale).Append("\n"); - sb.Append(" ShowPages: ").Append(ShowPages).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetOnboardingUrlRequest); - } - - /// - /// Returns true if GetOnboardingUrlRequest instances are equal - /// - /// Instance of GetOnboardingUrlRequest to be compared - /// Boolean - public bool Equals(GetOnboardingUrlRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.CollectInformation == input.CollectInformation || - (this.CollectInformation != null && - this.CollectInformation.Equals(input.CollectInformation)) - ) && - ( - this.EditMode == input.EditMode || - this.EditMode.Equals(input.EditMode) - ) && - ( - this.MobileOAuthCallbackUrl == input.MobileOAuthCallbackUrl || - (this.MobileOAuthCallbackUrl != null && - this.MobileOAuthCallbackUrl.Equals(input.MobileOAuthCallbackUrl)) - ) && - ( - this.PlatformName == input.PlatformName || - (this.PlatformName != null && - this.PlatformName.Equals(input.PlatformName)) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ) && - ( - this.ShopperLocale == input.ShopperLocale || - (this.ShopperLocale != null && - this.ShopperLocale.Equals(input.ShopperLocale)) - ) && - ( - this.ShowPages == input.ShowPages || - (this.ShowPages != null && - this.ShowPages.Equals(input.ShowPages)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.CollectInformation != null) - { - hashCode = (hashCode * 59) + this.CollectInformation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.EditMode.GetHashCode(); - if (this.MobileOAuthCallbackUrl != null) - { - hashCode = (hashCode * 59) + this.MobileOAuthCallbackUrl.GetHashCode(); - } - if (this.PlatformName != null) - { - hashCode = (hashCode * 59) + this.PlatformName.GetHashCode(); - } - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - if (this.ShopperLocale != null) - { - hashCode = (hashCode * 59) + this.ShopperLocale.GetHashCode(); - } - if (this.ShowPages != null) - { - hashCode = (hashCode * 59) + this.ShowPages.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/GetOnboardingUrlResponse.cs b/Adyen/Model/PlatformsHostedOnboardingPage/GetOnboardingUrlResponse.cs deleted file mode 100644 index 016de6f49..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/GetOnboardingUrlResponse.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// GetOnboardingUrlResponse - /// - [DataContract(Name = "GetOnboardingUrlResponse")] - public partial class GetOnboardingUrlResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Information about any invalid fields.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The URL to the Hosted Onboarding Page where you should redirect your sub-merchant. This URL must be used within 30 seconds and can only be used once.. - /// The result code.. - public GetOnboardingUrlResponse(List invalidFields = default(List), string pspReference = default(string), string redirectUrl = default(string), string resultCode = default(string)) - { - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.RedirectUrl = redirectUrl; - this.ResultCode = resultCode; - } - - /// - /// Information about any invalid fields. - /// - /// Information about any invalid fields. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The URL to the Hosted Onboarding Page where you should redirect your sub-merchant. This URL must be used within 30 seconds and can only be used once. - /// - /// The URL to the Hosted Onboarding Page where you should redirect your sub-merchant. This URL must be used within 30 seconds and can only be used once. - [DataMember(Name = "redirectUrl", EmitDefaultValue = false)] - public string RedirectUrl { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetOnboardingUrlResponse {\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RedirectUrl: ").Append(RedirectUrl).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetOnboardingUrlResponse); - } - - /// - /// Returns true if GetOnboardingUrlResponse instances are equal - /// - /// Instance of GetOnboardingUrlResponse to be compared - /// Boolean - public bool Equals(GetOnboardingUrlResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RedirectUrl == input.RedirectUrl || - (this.RedirectUrl != null && - this.RedirectUrl.Equals(input.RedirectUrl)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RedirectUrl != null) - { - hashCode = (hashCode * 59) + this.RedirectUrl.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/GetPciUrlRequest.cs b/Adyen/Model/PlatformsHostedOnboardingPage/GetPciUrlRequest.cs deleted file mode 100644 index fd2cb4b4d..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/GetPciUrlRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// GetPciUrlRequest - /// - [DataContract(Name = "GetPciUrlRequest")] - public partial class GetPciUrlRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetPciUrlRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The account holder code you provided when you created the account holder. (required). - /// The URL where the account holder will be redirected back to after they fill out the questionnaire, or if their session times out. Maximum length of 500 characters.. - public GetPciUrlRequest(string accountHolderCode = default(string), string returnUrl = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.ReturnUrl = returnUrl; - } - - /// - /// The account holder code you provided when you created the account holder. - /// - /// The account holder code you provided when you created the account holder. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The URL where the account holder will be redirected back to after they fill out the questionnaire, or if their session times out. Maximum length of 500 characters. - /// - /// The URL where the account holder will be redirected back to after they fill out the questionnaire, or if their session times out. Maximum length of 500 characters. - [DataMember(Name = "returnUrl", EmitDefaultValue = false)] - public string ReturnUrl { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetPciUrlRequest {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" ReturnUrl: ").Append(ReturnUrl).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetPciUrlRequest); - } - - /// - /// Returns true if GetPciUrlRequest instances are equal - /// - /// Instance of GetPciUrlRequest to be compared - /// Boolean - public bool Equals(GetPciUrlRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/GetPciUrlResponse.cs b/Adyen/Model/PlatformsHostedOnboardingPage/GetPciUrlResponse.cs deleted file mode 100644 index eb3fa592e..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/GetPciUrlResponse.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// GetPciUrlResponse - /// - [DataContract(Name = "GetPciUrlResponse")] - public partial class GetPciUrlResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Information about any invalid fields.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The URL to the PCI compliance questionnaire where you should redirect your account holder. This URL must be used within 30 seconds and can only be used once.. - /// The result code.. - public GetPciUrlResponse(List invalidFields = default(List), string pspReference = default(string), string redirectUrl = default(string), string resultCode = default(string)) - { - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.RedirectUrl = redirectUrl; - this.ResultCode = resultCode; - } - - /// - /// Information about any invalid fields. - /// - /// Information about any invalid fields. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The URL to the PCI compliance questionnaire where you should redirect your account holder. This URL must be used within 30 seconds and can only be used once. - /// - /// The URL to the PCI compliance questionnaire where you should redirect your account holder. This URL must be used within 30 seconds and can only be used once. - [DataMember(Name = "redirectUrl", EmitDefaultValue = false)] - public string RedirectUrl { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetPciUrlResponse {\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RedirectUrl: ").Append(RedirectUrl).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetPciUrlResponse); - } - - /// - /// Returns true if GetPciUrlResponse instances are equal - /// - /// Instance of GetPciUrlResponse to be compared - /// Boolean - public bool Equals(GetPciUrlResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RedirectUrl == input.RedirectUrl || - (this.RedirectUrl != null && - this.RedirectUrl.Equals(input.RedirectUrl)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RedirectUrl != null) - { - hashCode = (hashCode * 59) + this.RedirectUrl.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/ServiceError.cs b/Adyen/Model/PlatformsHostedOnboardingPage/ServiceError.cs deleted file mode 100644 index 953d39ca8..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsHostedOnboardingPage/ShowPages.cs b/Adyen/Model/PlatformsHostedOnboardingPage/ShowPages.cs deleted file mode 100644 index 9d1919f1b..000000000 --- a/Adyen/Model/PlatformsHostedOnboardingPage/ShowPages.cs +++ /dev/null @@ -1,245 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsHostedOnboardingPage -{ - /// - /// ShowPages - /// - [DataContract(Name = "ShowPages")] - public partial class ShowPages : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether the page with bank account details must be shown. Defaults to **true**.. - /// Indicates whether the bank check instant verification' details must be shown. Defaults to **true**.. - /// Indicates whether the page with the company's or organization's details must be shown. Defaults to **true**.. - /// Indicates whether the checks overview page must be shown. Defaults to **false**.. - /// Indicates whether the page with the individual's details must be shown. Defaults to **true**.. - /// Indicates whether the page with the legal arrangements' details must be shown. Defaults to **true**.. - /// Indicates whether the page to manually add bank account' details must be shown. Defaults to **true**.. - /// Indicates whether the page with the shareholders' details must be shown. Defaults to **true**.. - /// Indicates whether the welcome page must be shown. Defaults to **false**.. - public ShowPages(bool? bankDetailsSummaryPage = default(bool?), bool? bankVerificationPage = default(bool?), bool? businessDetailsSummaryPage = default(bool?), bool? checksOverviewPage = default(bool?), bool? individualDetailsSummaryPage = default(bool?), bool? legalArrangementsDetailsSummaryPage = default(bool?), bool? manualBankAccountPage = default(bool?), bool? shareholderDetailsSummaryPage = default(bool?), bool? welcomePage = default(bool?)) - { - this.BankDetailsSummaryPage = bankDetailsSummaryPage; - this.BankVerificationPage = bankVerificationPage; - this.BusinessDetailsSummaryPage = businessDetailsSummaryPage; - this.ChecksOverviewPage = checksOverviewPage; - this.IndividualDetailsSummaryPage = individualDetailsSummaryPage; - this.LegalArrangementsDetailsSummaryPage = legalArrangementsDetailsSummaryPage; - this.ManualBankAccountPage = manualBankAccountPage; - this.ShareholderDetailsSummaryPage = shareholderDetailsSummaryPage; - this.WelcomePage = welcomePage; - } - - /// - /// Indicates whether the page with bank account details must be shown. Defaults to **true**. - /// - /// Indicates whether the page with bank account details must be shown. Defaults to **true**. - [DataMember(Name = "bankDetailsSummaryPage", EmitDefaultValue = false)] - public bool? BankDetailsSummaryPage { get; set; } - - /// - /// Indicates whether the bank check instant verification' details must be shown. Defaults to **true**. - /// - /// Indicates whether the bank check instant verification' details must be shown. Defaults to **true**. - [DataMember(Name = "bankVerificationPage", EmitDefaultValue = false)] - public bool? BankVerificationPage { get; set; } - - /// - /// Indicates whether the page with the company's or organization's details must be shown. Defaults to **true**. - /// - /// Indicates whether the page with the company's or organization's details must be shown. Defaults to **true**. - [DataMember(Name = "businessDetailsSummaryPage", EmitDefaultValue = false)] - public bool? BusinessDetailsSummaryPage { get; set; } - - /// - /// Indicates whether the checks overview page must be shown. Defaults to **false**. - /// - /// Indicates whether the checks overview page must be shown. Defaults to **false**. - [DataMember(Name = "checksOverviewPage", EmitDefaultValue = false)] - public bool? ChecksOverviewPage { get; set; } - - /// - /// Indicates whether the page with the individual's details must be shown. Defaults to **true**. - /// - /// Indicates whether the page with the individual's details must be shown. Defaults to **true**. - [DataMember(Name = "individualDetailsSummaryPage", EmitDefaultValue = false)] - public bool? IndividualDetailsSummaryPage { get; set; } - - /// - /// Indicates whether the page with the legal arrangements' details must be shown. Defaults to **true**. - /// - /// Indicates whether the page with the legal arrangements' details must be shown. Defaults to **true**. - [DataMember(Name = "legalArrangementsDetailsSummaryPage", EmitDefaultValue = false)] - public bool? LegalArrangementsDetailsSummaryPage { get; set; } - - /// - /// Indicates whether the page to manually add bank account' details must be shown. Defaults to **true**. - /// - /// Indicates whether the page to manually add bank account' details must be shown. Defaults to **true**. - [DataMember(Name = "manualBankAccountPage", EmitDefaultValue = false)] - public bool? ManualBankAccountPage { get; set; } - - /// - /// Indicates whether the page with the shareholders' details must be shown. Defaults to **true**. - /// - /// Indicates whether the page with the shareholders' details must be shown. Defaults to **true**. - [DataMember(Name = "shareholderDetailsSummaryPage", EmitDefaultValue = false)] - public bool? ShareholderDetailsSummaryPage { get; set; } - - /// - /// Indicates whether the welcome page must be shown. Defaults to **false**. - /// - /// Indicates whether the welcome page must be shown. Defaults to **false**. - [DataMember(Name = "welcomePage", EmitDefaultValue = false)] - public bool? WelcomePage { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ShowPages {\n"); - sb.Append(" BankDetailsSummaryPage: ").Append(BankDetailsSummaryPage).Append("\n"); - sb.Append(" BankVerificationPage: ").Append(BankVerificationPage).Append("\n"); - sb.Append(" BusinessDetailsSummaryPage: ").Append(BusinessDetailsSummaryPage).Append("\n"); - sb.Append(" ChecksOverviewPage: ").Append(ChecksOverviewPage).Append("\n"); - sb.Append(" IndividualDetailsSummaryPage: ").Append(IndividualDetailsSummaryPage).Append("\n"); - sb.Append(" LegalArrangementsDetailsSummaryPage: ").Append(LegalArrangementsDetailsSummaryPage).Append("\n"); - sb.Append(" ManualBankAccountPage: ").Append(ManualBankAccountPage).Append("\n"); - sb.Append(" ShareholderDetailsSummaryPage: ").Append(ShareholderDetailsSummaryPage).Append("\n"); - sb.Append(" WelcomePage: ").Append(WelcomePage).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ShowPages); - } - - /// - /// Returns true if ShowPages instances are equal - /// - /// Instance of ShowPages to be compared - /// Boolean - public bool Equals(ShowPages input) - { - if (input == null) - { - return false; - } - return - ( - this.BankDetailsSummaryPage == input.BankDetailsSummaryPage || - this.BankDetailsSummaryPage.Equals(input.BankDetailsSummaryPage) - ) && - ( - this.BankVerificationPage == input.BankVerificationPage || - this.BankVerificationPage.Equals(input.BankVerificationPage) - ) && - ( - this.BusinessDetailsSummaryPage == input.BusinessDetailsSummaryPage || - this.BusinessDetailsSummaryPage.Equals(input.BusinessDetailsSummaryPage) - ) && - ( - this.ChecksOverviewPage == input.ChecksOverviewPage || - this.ChecksOverviewPage.Equals(input.ChecksOverviewPage) - ) && - ( - this.IndividualDetailsSummaryPage == input.IndividualDetailsSummaryPage || - this.IndividualDetailsSummaryPage.Equals(input.IndividualDetailsSummaryPage) - ) && - ( - this.LegalArrangementsDetailsSummaryPage == input.LegalArrangementsDetailsSummaryPage || - this.LegalArrangementsDetailsSummaryPage.Equals(input.LegalArrangementsDetailsSummaryPage) - ) && - ( - this.ManualBankAccountPage == input.ManualBankAccountPage || - this.ManualBankAccountPage.Equals(input.ManualBankAccountPage) - ) && - ( - this.ShareholderDetailsSummaryPage == input.ShareholderDetailsSummaryPage || - this.ShareholderDetailsSummaryPage.Equals(input.ShareholderDetailsSummaryPage) - ) && - ( - this.WelcomePage == input.WelcomePage || - this.WelcomePage.Equals(input.WelcomePage) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.BankDetailsSummaryPage.GetHashCode(); - hashCode = (hashCode * 59) + this.BankVerificationPage.GetHashCode(); - hashCode = (hashCode * 59) + this.BusinessDetailsSummaryPage.GetHashCode(); - hashCode = (hashCode * 59) + this.ChecksOverviewPage.GetHashCode(); - hashCode = (hashCode * 59) + this.IndividualDetailsSummaryPage.GetHashCode(); - hashCode = (hashCode * 59) + this.LegalArrangementsDetailsSummaryPage.GetHashCode(); - hashCode = (hashCode * 59) + this.ManualBankAccountPage.GetHashCode(); - hashCode = (hashCode * 59) + this.ShareholderDetailsSummaryPage.GetHashCode(); - hashCode = (hashCode * 59) + this.WelcomePage.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/AbstractOpenAPISchema.cs b/Adyen/Model/PlatformsNotificationConfiguration/AbstractOpenAPISchema.cs deleted file mode 100644 index 74b1c3f1c..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/CreateNotificationConfigurationRequest.cs b/Adyen/Model/PlatformsNotificationConfiguration/CreateNotificationConfigurationRequest.cs deleted file mode 100644 index 6b52611a6..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/CreateNotificationConfigurationRequest.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// CreateNotificationConfigurationRequest - /// - [DataContract(Name = "CreateNotificationConfigurationRequest")] - public partial class CreateNotificationConfigurationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateNotificationConfigurationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// configurationDetails (required). - public CreateNotificationConfigurationRequest(NotificationConfigurationDetails configurationDetails = default(NotificationConfigurationDetails)) - { - this.ConfigurationDetails = configurationDetails; - } - - /// - /// Gets or Sets ConfigurationDetails - /// - [DataMember(Name = "configurationDetails", IsRequired = false, EmitDefaultValue = false)] - public NotificationConfigurationDetails ConfigurationDetails { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateNotificationConfigurationRequest {\n"); - sb.Append(" ConfigurationDetails: ").Append(ConfigurationDetails).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateNotificationConfigurationRequest); - } - - /// - /// Returns true if CreateNotificationConfigurationRequest instances are equal - /// - /// Instance of CreateNotificationConfigurationRequest to be compared - /// Boolean - public bool Equals(CreateNotificationConfigurationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ConfigurationDetails == input.ConfigurationDetails || - (this.ConfigurationDetails != null && - this.ConfigurationDetails.Equals(input.ConfigurationDetails)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ConfigurationDetails != null) - { - hashCode = (hashCode * 59) + this.ConfigurationDetails.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/DeleteNotificationConfigurationRequest.cs b/Adyen/Model/PlatformsNotificationConfiguration/DeleteNotificationConfigurationRequest.cs deleted file mode 100644 index 07dfd6883..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/DeleteNotificationConfigurationRequest.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// DeleteNotificationConfigurationRequest - /// - [DataContract(Name = "DeleteNotificationConfigurationRequest")] - public partial class DeleteNotificationConfigurationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DeleteNotificationConfigurationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// A list of IDs of the notification subscription configurations to be deleted. (required). - public DeleteNotificationConfigurationRequest(List notificationIds = default(List)) - { - this.NotificationIds = notificationIds; - } - - /// - /// A list of IDs of the notification subscription configurations to be deleted. - /// - /// A list of IDs of the notification subscription configurations to be deleted. - [DataMember(Name = "notificationIds", IsRequired = false, EmitDefaultValue = false)] - public List NotificationIds { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeleteNotificationConfigurationRequest {\n"); - sb.Append(" NotificationIds: ").Append(NotificationIds).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteNotificationConfigurationRequest); - } - - /// - /// Returns true if DeleteNotificationConfigurationRequest instances are equal - /// - /// Instance of DeleteNotificationConfigurationRequest to be compared - /// Boolean - public bool Equals(DeleteNotificationConfigurationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationIds == input.NotificationIds || - this.NotificationIds != null && - input.NotificationIds != null && - this.NotificationIds.SequenceEqual(input.NotificationIds) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationIds != null) - { - hashCode = (hashCode * 59) + this.NotificationIds.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/ErrorFieldType.cs b/Adyen/Model/PlatformsNotificationConfiguration/ErrorFieldType.cs deleted file mode 100644 index b277a1ae4..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/ErrorFieldType.cs +++ /dev/null @@ -1,162 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// ErrorFieldType - /// - [DataContract(Name = "ErrorFieldType")] - public partial class ErrorFieldType : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The validation error code.. - /// A description of the validation error.. - /// fieldType. - public ErrorFieldType(int? errorCode = default(int?), string errorDescription = default(string), FieldType fieldType = default(FieldType)) - { - this.ErrorCode = errorCode; - this.ErrorDescription = errorDescription; - this.FieldType = fieldType; - } - - /// - /// The validation error code. - /// - /// The validation error code. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public int? ErrorCode { get; set; } - - /// - /// A description of the validation error. - /// - /// A description of the validation error. - [DataMember(Name = "errorDescription", EmitDefaultValue = false)] - public string ErrorDescription { get; set; } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name = "fieldType", EmitDefaultValue = false)] - public FieldType FieldType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ErrorFieldType {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); - sb.Append(" FieldType: ").Append(FieldType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ErrorFieldType); - } - - /// - /// Returns true if ErrorFieldType instances are equal - /// - /// Instance of ErrorFieldType to be compared - /// Boolean - public bool Equals(ErrorFieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - this.ErrorCode.Equals(input.ErrorCode) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.FieldType != null) - { - hashCode = (hashCode * 59) + this.FieldType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/ExchangeMessage.cs b/Adyen/Model/PlatformsNotificationConfiguration/ExchangeMessage.cs deleted file mode 100644 index 52fa6345e..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/ExchangeMessage.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// ExchangeMessage - /// - [DataContract(Name = "ExchangeMessage")] - public partial class ExchangeMessage : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// messageCode. - /// messageDescription. - public ExchangeMessage(string messageCode = default(string), string messageDescription = default(string)) - { - this.MessageCode = messageCode; - this.MessageDescription = messageDescription; - } - - /// - /// Gets or Sets MessageCode - /// - [DataMember(Name = "messageCode", EmitDefaultValue = false)] - public string MessageCode { get; set; } - - /// - /// Gets or Sets MessageDescription - /// - [DataMember(Name = "messageDescription", EmitDefaultValue = false)] - public string MessageDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ExchangeMessage {\n"); - sb.Append(" MessageCode: ").Append(MessageCode).Append("\n"); - sb.Append(" MessageDescription: ").Append(MessageDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ExchangeMessage); - } - - /// - /// Returns true if ExchangeMessage instances are equal - /// - /// Instance of ExchangeMessage to be compared - /// Boolean - public bool Equals(ExchangeMessage input) - { - if (input == null) - { - return false; - } - return - ( - this.MessageCode == input.MessageCode || - (this.MessageCode != null && - this.MessageCode.Equals(input.MessageCode)) - ) && - ( - this.MessageDescription == input.MessageDescription || - (this.MessageDescription != null && - this.MessageDescription.Equals(input.MessageDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MessageCode != null) - { - hashCode = (hashCode * 59) + this.MessageCode.GetHashCode(); - } - if (this.MessageDescription != null) - { - hashCode = (hashCode * 59) + this.MessageDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/FieldType.cs b/Adyen/Model/PlatformsNotificationConfiguration/FieldType.cs deleted file mode 100644 index a5fcd647a..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/FieldType.cs +++ /dev/null @@ -1,1144 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// FieldType - /// - [DataContract(Name = "FieldType")] - public partial class FieldType : IEquatable, IValidatableObject - { - /// - /// The type of the field. - /// - /// The type of the field. - [JsonConverter(typeof(StringEnumConverter))] - public enum FieldNameEnum - { - /// - /// Enum AccountCode for value: accountCode - /// - [EnumMember(Value = "accountCode")] - AccountCode = 1, - - /// - /// Enum AccountHolderCode for value: accountHolderCode - /// - [EnumMember(Value = "accountHolderCode")] - AccountHolderCode = 2, - - /// - /// Enum AccountHolderDetails for value: accountHolderDetails - /// - [EnumMember(Value = "accountHolderDetails")] - AccountHolderDetails = 3, - - /// - /// Enum AccountNumber for value: accountNumber - /// - [EnumMember(Value = "accountNumber")] - AccountNumber = 4, - - /// - /// Enum AccountStateType for value: accountStateType - /// - [EnumMember(Value = "accountStateType")] - AccountStateType = 5, - - /// - /// Enum AccountStatus for value: accountStatus - /// - [EnumMember(Value = "accountStatus")] - AccountStatus = 6, - - /// - /// Enum AccountType for value: accountType - /// - [EnumMember(Value = "accountType")] - AccountType = 7, - - /// - /// Enum Address for value: address - /// - [EnumMember(Value = "address")] - Address = 8, - - /// - /// Enum BalanceAccount for value: balanceAccount - /// - [EnumMember(Value = "balanceAccount")] - BalanceAccount = 9, - - /// - /// Enum BalanceAccountActive for value: balanceAccountActive - /// - [EnumMember(Value = "balanceAccountActive")] - BalanceAccountActive = 10, - - /// - /// Enum BalanceAccountCode for value: balanceAccountCode - /// - [EnumMember(Value = "balanceAccountCode")] - BalanceAccountCode = 11, - - /// - /// Enum BalanceAccountId for value: balanceAccountId - /// - [EnumMember(Value = "balanceAccountId")] - BalanceAccountId = 12, - - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 13, - - /// - /// Enum BankAccountCode for value: bankAccountCode - /// - [EnumMember(Value = "bankAccountCode")] - BankAccountCode = 14, - - /// - /// Enum BankAccountName for value: bankAccountName - /// - [EnumMember(Value = "bankAccountName")] - BankAccountName = 15, - - /// - /// Enum BankAccountUUID for value: bankAccountUUID - /// - [EnumMember(Value = "bankAccountUUID")] - BankAccountUUID = 16, - - /// - /// Enum BankBicSwift for value: bankBicSwift - /// - [EnumMember(Value = "bankBicSwift")] - BankBicSwift = 17, - - /// - /// Enum BankCity for value: bankCity - /// - [EnumMember(Value = "bankCity")] - BankCity = 18, - - /// - /// Enum BankCode for value: bankCode - /// - [EnumMember(Value = "bankCode")] - BankCode = 19, - - /// - /// Enum BankName for value: bankName - /// - [EnumMember(Value = "bankName")] - BankName = 20, - - /// - /// Enum BankStatement for value: bankStatement - /// - [EnumMember(Value = "bankStatement")] - BankStatement = 21, - - /// - /// Enum BranchCode for value: branchCode - /// - [EnumMember(Value = "branchCode")] - BranchCode = 22, - - /// - /// Enum BusinessContact for value: businessContact - /// - [EnumMember(Value = "businessContact")] - BusinessContact = 23, - - /// - /// Enum CardToken for value: cardToken - /// - [EnumMember(Value = "cardToken")] - CardToken = 24, - - /// - /// Enum CheckCode for value: checkCode - /// - [EnumMember(Value = "checkCode")] - CheckCode = 25, - - /// - /// Enum City for value: city - /// - [EnumMember(Value = "city")] - City = 26, - - /// - /// Enum CompanyRegistration for value: companyRegistration - /// - [EnumMember(Value = "companyRegistration")] - CompanyRegistration = 27, - - /// - /// Enum ConstitutionalDocument for value: constitutionalDocument - /// - [EnumMember(Value = "constitutionalDocument")] - ConstitutionalDocument = 28, - - /// - /// Enum Controller for value: controller - /// - [EnumMember(Value = "controller")] - Controller = 29, - - /// - /// Enum Country for value: country - /// - [EnumMember(Value = "country")] - Country = 30, - - /// - /// Enum CountryCode for value: countryCode - /// - [EnumMember(Value = "countryCode")] - CountryCode = 31, - - /// - /// Enum Currency for value: currency - /// - [EnumMember(Value = "currency")] - Currency = 32, - - /// - /// Enum CurrencyCode for value: currencyCode - /// - [EnumMember(Value = "currencyCode")] - CurrencyCode = 33, - - /// - /// Enum DateOfBirth for value: dateOfBirth - /// - [EnumMember(Value = "dateOfBirth")] - DateOfBirth = 34, - - /// - /// Enum Description for value: description - /// - [EnumMember(Value = "description")] - Description = 35, - - /// - /// Enum DestinationAccountCode for value: destinationAccountCode - /// - [EnumMember(Value = "destinationAccountCode")] - DestinationAccountCode = 36, - - /// - /// Enum Document for value: document - /// - [EnumMember(Value = "document")] - Document = 37, - - /// - /// Enum DocumentContent for value: documentContent - /// - [EnumMember(Value = "documentContent")] - DocumentContent = 38, - - /// - /// Enum DocumentExpirationDate for value: documentExpirationDate - /// - [EnumMember(Value = "documentExpirationDate")] - DocumentExpirationDate = 39, - - /// - /// Enum DocumentIssuerCountry for value: documentIssuerCountry - /// - [EnumMember(Value = "documentIssuerCountry")] - DocumentIssuerCountry = 40, - - /// - /// Enum DocumentIssuerState for value: documentIssuerState - /// - [EnumMember(Value = "documentIssuerState")] - DocumentIssuerState = 41, - - /// - /// Enum DocumentName for value: documentName - /// - [EnumMember(Value = "documentName")] - DocumentName = 42, - - /// - /// Enum DocumentNumber for value: documentNumber - /// - [EnumMember(Value = "documentNumber")] - DocumentNumber = 43, - - /// - /// Enum DocumentType for value: documentType - /// - [EnumMember(Value = "documentType")] - DocumentType = 44, - - /// - /// Enum DoingBusinessAs for value: doingBusinessAs - /// - [EnumMember(Value = "doingBusinessAs")] - DoingBusinessAs = 45, - - /// - /// Enum DrivingLicence for value: drivingLicence - /// - [EnumMember(Value = "drivingLicence")] - DrivingLicence = 46, - - /// - /// Enum DrivingLicenceBack for value: drivingLicenceBack - /// - [EnumMember(Value = "drivingLicenceBack")] - DrivingLicenceBack = 47, - - /// - /// Enum DrivingLicenceFront for value: drivingLicenceFront - /// - [EnumMember(Value = "drivingLicenceFront")] - DrivingLicenceFront = 48, - - /// - /// Enum DrivingLicense for value: drivingLicense - /// - [EnumMember(Value = "drivingLicense")] - DrivingLicense = 49, - - /// - /// Enum Email for value: email - /// - [EnumMember(Value = "email")] - Email = 50, - - /// - /// Enum FirstName for value: firstName - /// - [EnumMember(Value = "firstName")] - FirstName = 51, - - /// - /// Enum FormType for value: formType - /// - [EnumMember(Value = "formType")] - FormType = 52, - - /// - /// Enum FullPhoneNumber for value: fullPhoneNumber - /// - [EnumMember(Value = "fullPhoneNumber")] - FullPhoneNumber = 53, - - /// - /// Enum Gender for value: gender - /// - [EnumMember(Value = "gender")] - Gender = 54, - - /// - /// Enum HopWebserviceUser for value: hopWebserviceUser - /// - [EnumMember(Value = "hopWebserviceUser")] - HopWebserviceUser = 55, - - /// - /// Enum HouseNumberOrName for value: houseNumberOrName - /// - [EnumMember(Value = "houseNumberOrName")] - HouseNumberOrName = 56, - - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 57, - - /// - /// Enum IdCard for value: idCard - /// - [EnumMember(Value = "idCard")] - IdCard = 58, - - /// - /// Enum IdCardBack for value: idCardBack - /// - [EnumMember(Value = "idCardBack")] - IdCardBack = 59, - - /// - /// Enum IdCardFront for value: idCardFront - /// - [EnumMember(Value = "idCardFront")] - IdCardFront = 60, - - /// - /// Enum IdNumber for value: idNumber - /// - [EnumMember(Value = "idNumber")] - IdNumber = 61, - - /// - /// Enum IdentityDocument for value: identityDocument - /// - [EnumMember(Value = "identityDocument")] - IdentityDocument = 62, - - /// - /// Enum IndividualDetails for value: individualDetails - /// - [EnumMember(Value = "individualDetails")] - IndividualDetails = 63, - - /// - /// Enum Infix for value: infix - /// - [EnumMember(Value = "infix")] - Infix = 64, - - /// - /// Enum JobTitle for value: jobTitle - /// - [EnumMember(Value = "jobTitle")] - JobTitle = 65, - - /// - /// Enum LastName for value: lastName - /// - [EnumMember(Value = "lastName")] - LastName = 66, - - /// - /// Enum LastReviewDate for value: lastReviewDate - /// - [EnumMember(Value = "lastReviewDate")] - LastReviewDate = 67, - - /// - /// Enum LegalArrangement for value: legalArrangement - /// - [EnumMember(Value = "legalArrangement")] - LegalArrangement = 68, - - /// - /// Enum LegalArrangementCode for value: legalArrangementCode - /// - [EnumMember(Value = "legalArrangementCode")] - LegalArrangementCode = 69, - - /// - /// Enum LegalArrangementEntity for value: legalArrangementEntity - /// - [EnumMember(Value = "legalArrangementEntity")] - LegalArrangementEntity = 70, - - /// - /// Enum LegalArrangementEntityCode for value: legalArrangementEntityCode - /// - [EnumMember(Value = "legalArrangementEntityCode")] - LegalArrangementEntityCode = 71, - - /// - /// Enum LegalArrangementLegalForm for value: legalArrangementLegalForm - /// - [EnumMember(Value = "legalArrangementLegalForm")] - LegalArrangementLegalForm = 72, - - /// - /// Enum LegalArrangementMember for value: legalArrangementMember - /// - [EnumMember(Value = "legalArrangementMember")] - LegalArrangementMember = 73, - - /// - /// Enum LegalArrangementMembers for value: legalArrangementMembers - /// - [EnumMember(Value = "legalArrangementMembers")] - LegalArrangementMembers = 74, - - /// - /// Enum LegalArrangementName for value: legalArrangementName - /// - [EnumMember(Value = "legalArrangementName")] - LegalArrangementName = 75, - - /// - /// Enum LegalArrangementReference for value: legalArrangementReference - /// - [EnumMember(Value = "legalArrangementReference")] - LegalArrangementReference = 76, - - /// - /// Enum LegalArrangementRegistrationNumber for value: legalArrangementRegistrationNumber - /// - [EnumMember(Value = "legalArrangementRegistrationNumber")] - LegalArrangementRegistrationNumber = 77, - - /// - /// Enum LegalArrangementTaxNumber for value: legalArrangementTaxNumber - /// - [EnumMember(Value = "legalArrangementTaxNumber")] - LegalArrangementTaxNumber = 78, - - /// - /// Enum LegalArrangementType for value: legalArrangementType - /// - [EnumMember(Value = "legalArrangementType")] - LegalArrangementType = 79, - - /// - /// Enum LegalBusinessName for value: legalBusinessName - /// - [EnumMember(Value = "legalBusinessName")] - LegalBusinessName = 80, - - /// - /// Enum LegalEntity for value: legalEntity - /// - [EnumMember(Value = "legalEntity")] - LegalEntity = 81, - - /// - /// Enum LegalEntityType for value: legalEntityType - /// - [EnumMember(Value = "legalEntityType")] - LegalEntityType = 82, - - /// - /// Enum Logo for value: logo - /// - [EnumMember(Value = "logo")] - Logo = 83, - - /// - /// Enum MerchantAccount for value: merchantAccount - /// - [EnumMember(Value = "merchantAccount")] - MerchantAccount = 84, - - /// - /// Enum MerchantCategoryCode for value: merchantCategoryCode - /// - [EnumMember(Value = "merchantCategoryCode")] - MerchantCategoryCode = 85, - - /// - /// Enum MerchantHouseNumber for value: merchantHouseNumber - /// - [EnumMember(Value = "merchantHouseNumber")] - MerchantHouseNumber = 86, - - /// - /// Enum MerchantReference for value: merchantReference - /// - [EnumMember(Value = "merchantReference")] - MerchantReference = 87, - - /// - /// Enum MicroDeposit for value: microDeposit - /// - [EnumMember(Value = "microDeposit")] - MicroDeposit = 88, - - /// - /// Enum Name for value: name - /// - [EnumMember(Value = "name")] - Name = 89, - - /// - /// Enum Nationality for value: nationality - /// - [EnumMember(Value = "nationality")] - Nationality = 90, - - /// - /// Enum OriginalReference for value: originalReference - /// - [EnumMember(Value = "originalReference")] - OriginalReference = 91, - - /// - /// Enum OwnerCity for value: ownerCity - /// - [EnumMember(Value = "ownerCity")] - OwnerCity = 92, - - /// - /// Enum OwnerCountryCode for value: ownerCountryCode - /// - [EnumMember(Value = "ownerCountryCode")] - OwnerCountryCode = 93, - - /// - /// Enum OwnerDateOfBirth for value: ownerDateOfBirth - /// - [EnumMember(Value = "ownerDateOfBirth")] - OwnerDateOfBirth = 94, - - /// - /// Enum OwnerHouseNumberOrName for value: ownerHouseNumberOrName - /// - [EnumMember(Value = "ownerHouseNumberOrName")] - OwnerHouseNumberOrName = 95, - - /// - /// Enum OwnerName for value: ownerName - /// - [EnumMember(Value = "ownerName")] - OwnerName = 96, - - /// - /// Enum OwnerPostalCode for value: ownerPostalCode - /// - [EnumMember(Value = "ownerPostalCode")] - OwnerPostalCode = 97, - - /// - /// Enum OwnerState for value: ownerState - /// - [EnumMember(Value = "ownerState")] - OwnerState = 98, - - /// - /// Enum OwnerStreet for value: ownerStreet - /// - [EnumMember(Value = "ownerStreet")] - OwnerStreet = 99, - - /// - /// Enum Passport for value: passport - /// - [EnumMember(Value = "passport")] - Passport = 100, - - /// - /// Enum PassportNumber for value: passportNumber - /// - [EnumMember(Value = "passportNumber")] - PassportNumber = 101, - - /// - /// Enum PayoutMethod for value: payoutMethod - /// - [EnumMember(Value = "payoutMethod")] - PayoutMethod = 102, - - /// - /// Enum PayoutMethodCode for value: payoutMethodCode - /// - [EnumMember(Value = "payoutMethodCode")] - PayoutMethodCode = 103, - - /// - /// Enum PayoutSchedule for value: payoutSchedule - /// - [EnumMember(Value = "payoutSchedule")] - PayoutSchedule = 104, - - /// - /// Enum PciSelfAssessment for value: pciSelfAssessment - /// - [EnumMember(Value = "pciSelfAssessment")] - PciSelfAssessment = 105, - - /// - /// Enum PersonalData for value: personalData - /// - [EnumMember(Value = "personalData")] - PersonalData = 106, - - /// - /// Enum PhoneCountryCode for value: phoneCountryCode - /// - [EnumMember(Value = "phoneCountryCode")] - PhoneCountryCode = 107, - - /// - /// Enum PhoneNumber for value: phoneNumber - /// - [EnumMember(Value = "phoneNumber")] - PhoneNumber = 108, - - /// - /// Enum PostalCode for value: postalCode - /// - [EnumMember(Value = "postalCode")] - PostalCode = 109, - - /// - /// Enum PrimaryCurrency for value: primaryCurrency - /// - [EnumMember(Value = "primaryCurrency")] - PrimaryCurrency = 110, - - /// - /// Enum Reason for value: reason - /// - [EnumMember(Value = "reason")] - Reason = 111, - - /// - /// Enum RegistrationNumber for value: registrationNumber - /// - [EnumMember(Value = "registrationNumber")] - RegistrationNumber = 112, - - /// - /// Enum ReturnUrl for value: returnUrl - /// - [EnumMember(Value = "returnUrl")] - ReturnUrl = 113, - - /// - /// Enum Schedule for value: schedule - /// - [EnumMember(Value = "schedule")] - Schedule = 114, - - /// - /// Enum Shareholder for value: shareholder - /// - [EnumMember(Value = "shareholder")] - Shareholder = 115, - - /// - /// Enum ShareholderCode for value: shareholderCode - /// - [EnumMember(Value = "shareholderCode")] - ShareholderCode = 116, - - /// - /// Enum ShareholderCodeAndSignatoryCode for value: shareholderCodeAndSignatoryCode - /// - [EnumMember(Value = "shareholderCodeAndSignatoryCode")] - ShareholderCodeAndSignatoryCode = 117, - - /// - /// Enum ShareholderCodeOrSignatoryCode for value: shareholderCodeOrSignatoryCode - /// - [EnumMember(Value = "shareholderCodeOrSignatoryCode")] - ShareholderCodeOrSignatoryCode = 118, - - /// - /// Enum ShareholderType for value: shareholderType - /// - [EnumMember(Value = "shareholderType")] - ShareholderType = 119, - - /// - /// Enum ShareholderTypes for value: shareholderTypes - /// - [EnumMember(Value = "shareholderTypes")] - ShareholderTypes = 120, - - /// - /// Enum ShopperInteraction for value: shopperInteraction - /// - [EnumMember(Value = "shopperInteraction")] - ShopperInteraction = 121, - - /// - /// Enum Signatory for value: signatory - /// - [EnumMember(Value = "signatory")] - Signatory = 122, - - /// - /// Enum SignatoryCode for value: signatoryCode - /// - [EnumMember(Value = "signatoryCode")] - SignatoryCode = 123, - - /// - /// Enum SocialSecurityNumber for value: socialSecurityNumber - /// - [EnumMember(Value = "socialSecurityNumber")] - SocialSecurityNumber = 124, - - /// - /// Enum SourceAccountCode for value: sourceAccountCode - /// - [EnumMember(Value = "sourceAccountCode")] - SourceAccountCode = 125, - - /// - /// Enum SplitAccount for value: splitAccount - /// - [EnumMember(Value = "splitAccount")] - SplitAccount = 126, - - /// - /// Enum SplitConfigurationUUID for value: splitConfigurationUUID - /// - [EnumMember(Value = "splitConfigurationUUID")] - SplitConfigurationUUID = 127, - - /// - /// Enum SplitCurrency for value: splitCurrency - /// - [EnumMember(Value = "splitCurrency")] - SplitCurrency = 128, - - /// - /// Enum SplitValue for value: splitValue - /// - [EnumMember(Value = "splitValue")] - SplitValue = 129, - - /// - /// Enum Splits for value: splits - /// - [EnumMember(Value = "splits")] - Splits = 130, - - /// - /// Enum StateOrProvince for value: stateOrProvince - /// - [EnumMember(Value = "stateOrProvince")] - StateOrProvince = 131, - - /// - /// Enum Status for value: status - /// - [EnumMember(Value = "status")] - Status = 132, - - /// - /// Enum StockExchange for value: stockExchange - /// - [EnumMember(Value = "stockExchange")] - StockExchange = 133, - - /// - /// Enum StockNumber for value: stockNumber - /// - [EnumMember(Value = "stockNumber")] - StockNumber = 134, - - /// - /// Enum StockTicker for value: stockTicker - /// - [EnumMember(Value = "stockTicker")] - StockTicker = 135, - - /// - /// Enum Store for value: store - /// - [EnumMember(Value = "store")] - Store = 136, - - /// - /// Enum StoreDetail for value: storeDetail - /// - [EnumMember(Value = "storeDetail")] - StoreDetail = 137, - - /// - /// Enum StoreName for value: storeName - /// - [EnumMember(Value = "storeName")] - StoreName = 138, - - /// - /// Enum StoreReference for value: storeReference - /// - [EnumMember(Value = "storeReference")] - StoreReference = 139, - - /// - /// Enum Street for value: street - /// - [EnumMember(Value = "street")] - Street = 140, - - /// - /// Enum TaxId for value: taxId - /// - [EnumMember(Value = "taxId")] - TaxId = 141, - - /// - /// Enum Tier for value: tier - /// - [EnumMember(Value = "tier")] - Tier = 142, - - /// - /// Enum TierNumber for value: tierNumber - /// - [EnumMember(Value = "tierNumber")] - TierNumber = 143, - - /// - /// Enum TransferCode for value: transferCode - /// - [EnumMember(Value = "transferCode")] - TransferCode = 144, - - /// - /// Enum UltimateParentCompany for value: ultimateParentCompany - /// - [EnumMember(Value = "ultimateParentCompany")] - UltimateParentCompany = 145, - - /// - /// Enum UltimateParentCompanyAddressDetails for value: ultimateParentCompanyAddressDetails - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetails")] - UltimateParentCompanyAddressDetails = 146, - - /// - /// Enum UltimateParentCompanyAddressDetailsCountry for value: ultimateParentCompanyAddressDetailsCountry - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetailsCountry")] - UltimateParentCompanyAddressDetailsCountry = 147, - - /// - /// Enum UltimateParentCompanyBusinessDetails for value: ultimateParentCompanyBusinessDetails - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetails")] - UltimateParentCompanyBusinessDetails = 148, - - /// - /// Enum UltimateParentCompanyBusinessDetailsLegalBusinessName for value: ultimateParentCompanyBusinessDetailsLegalBusinessName - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsLegalBusinessName")] - UltimateParentCompanyBusinessDetailsLegalBusinessName = 149, - - /// - /// Enum UltimateParentCompanyBusinessDetailsRegistrationNumber for value: ultimateParentCompanyBusinessDetailsRegistrationNumber - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsRegistrationNumber")] - UltimateParentCompanyBusinessDetailsRegistrationNumber = 150, - - /// - /// Enum UltimateParentCompanyCode for value: ultimateParentCompanyCode - /// - [EnumMember(Value = "ultimateParentCompanyCode")] - UltimateParentCompanyCode = 151, - - /// - /// Enum UltimateParentCompanyStockExchange for value: ultimateParentCompanyStockExchange - /// - [EnumMember(Value = "ultimateParentCompanyStockExchange")] - UltimateParentCompanyStockExchange = 152, - - /// - /// Enum UltimateParentCompanyStockNumber for value: ultimateParentCompanyStockNumber - /// - [EnumMember(Value = "ultimateParentCompanyStockNumber")] - UltimateParentCompanyStockNumber = 153, - - /// - /// Enum UltimateParentCompanyStockNumberOrStockTicker for value: ultimateParentCompanyStockNumberOrStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockNumberOrStockTicker")] - UltimateParentCompanyStockNumberOrStockTicker = 154, - - /// - /// Enum UltimateParentCompanyStockTicker for value: ultimateParentCompanyStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockTicker")] - UltimateParentCompanyStockTicker = 155, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 156, - - /// - /// Enum Value for value: value - /// - [EnumMember(Value = "value")] - Value = 157, - - /// - /// Enum VerificationType for value: verificationType - /// - [EnumMember(Value = "verificationType")] - VerificationType = 158, - - /// - /// Enum VirtualAccount for value: virtualAccount - /// - [EnumMember(Value = "virtualAccount")] - VirtualAccount = 159, - - /// - /// Enum VisaNumber for value: visaNumber - /// - [EnumMember(Value = "visaNumber")] - VisaNumber = 160, - - /// - /// Enum WebAddress for value: webAddress - /// - [EnumMember(Value = "webAddress")] - WebAddress = 161, - - /// - /// Enum Year for value: year - /// - [EnumMember(Value = "year")] - Year = 162 - - } - - - /// - /// The type of the field. - /// - /// The type of the field. - [DataMember(Name = "fieldName", EmitDefaultValue = false)] - public FieldNameEnum? FieldName { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The full name of the property.. - /// The type of the field.. - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.. - public FieldType(string field = default(string), FieldNameEnum? fieldName = default(FieldNameEnum?), string shareholderCode = default(string)) - { - this.Field = field; - this.FieldName = fieldName; - this.ShareholderCode = shareholderCode; - } - - /// - /// The full name of the property. - /// - /// The full name of the property. - [DataMember(Name = "field", EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FieldType {\n"); - sb.Append(" Field: ").Append(Field).Append("\n"); - sb.Append(" FieldName: ").Append(FieldName).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FieldType); - } - - /// - /// Returns true if FieldType instances are equal - /// - /// Instance of FieldType to be compared - /// Boolean - public bool Equals(FieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.FieldName == input.FieldName || - this.FieldName.Equals(input.FieldName) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FieldName.GetHashCode(); - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/GenericResponse.cs b/Adyen/Model/PlatformsNotificationConfiguration/GenericResponse.cs deleted file mode 100644 index b15055183..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/GenericResponse.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// GenericResponse - /// - [DataContract(Name = "GenericResponse")] - public partial class GenericResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public GenericResponse(List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GenericResponse {\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GenericResponse); - } - - /// - /// Returns true if GenericResponse instances are equal - /// - /// Instance of GenericResponse to be compared - /// Boolean - public bool Equals(GenericResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationListResponse.cs b/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationListResponse.cs deleted file mode 100644 index e0339870f..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationListResponse.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// GetNotificationConfigurationListResponse - /// - [DataContract(Name = "GetNotificationConfigurationListResponse")] - public partial class GetNotificationConfigurationListResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Details of the notification subscription configurations.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public GetNotificationConfigurationListResponse(List configurations = default(List), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.Configurations = configurations; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Details of the notification subscription configurations. - /// - /// Details of the notification subscription configurations. - [DataMember(Name = "configurations", EmitDefaultValue = false)] - public List Configurations { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetNotificationConfigurationListResponse {\n"); - sb.Append(" Configurations: ").Append(Configurations).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetNotificationConfigurationListResponse); - } - - /// - /// Returns true if GetNotificationConfigurationListResponse instances are equal - /// - /// Instance of GetNotificationConfigurationListResponse to be compared - /// Boolean - public bool Equals(GetNotificationConfigurationListResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Configurations == input.Configurations || - this.Configurations != null && - input.Configurations != null && - this.Configurations.SequenceEqual(input.Configurations) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Configurations != null) - { - hashCode = (hashCode * 59) + this.Configurations.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationRequest.cs b/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationRequest.cs deleted file mode 100644 index 94575bcb4..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationRequest.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// GetNotificationConfigurationRequest - /// - [DataContract(Name = "GetNotificationConfigurationRequest")] - public partial class GetNotificationConfigurationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetNotificationConfigurationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The ID of the notification subscription configuration whose details are to be retrieved. (required). - public GetNotificationConfigurationRequest(long? notificationId = default(long?)) - { - this.NotificationId = notificationId; - } - - /// - /// The ID of the notification subscription configuration whose details are to be retrieved. - /// - /// The ID of the notification subscription configuration whose details are to be retrieved. - [DataMember(Name = "notificationId", IsRequired = false, EmitDefaultValue = false)] - public long? NotificationId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetNotificationConfigurationRequest {\n"); - sb.Append(" NotificationId: ").Append(NotificationId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetNotificationConfigurationRequest); - } - - /// - /// Returns true if GetNotificationConfigurationRequest instances are equal - /// - /// Instance of GetNotificationConfigurationRequest to be compared - /// Boolean - public bool Equals(GetNotificationConfigurationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationId == input.NotificationId || - this.NotificationId.Equals(input.NotificationId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.NotificationId.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationResponse.cs b/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationResponse.cs deleted file mode 100644 index e82b1efd3..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/GetNotificationConfigurationResponse.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// GetNotificationConfigurationResponse - /// - [DataContract(Name = "GetNotificationConfigurationResponse")] - public partial class GetNotificationConfigurationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetNotificationConfigurationResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// configurationDetails (required). - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public GetNotificationConfigurationResponse(NotificationConfigurationDetails configurationDetails = default(NotificationConfigurationDetails), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.ConfigurationDetails = configurationDetails; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Gets or Sets ConfigurationDetails - /// - [DataMember(Name = "configurationDetails", IsRequired = false, EmitDefaultValue = false)] - public NotificationConfigurationDetails ConfigurationDetails { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetNotificationConfigurationResponse {\n"); - sb.Append(" ConfigurationDetails: ").Append(ConfigurationDetails).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetNotificationConfigurationResponse); - } - - /// - /// Returns true if GetNotificationConfigurationResponse instances are equal - /// - /// Instance of GetNotificationConfigurationResponse to be compared - /// Boolean - public bool Equals(GetNotificationConfigurationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.ConfigurationDetails == input.ConfigurationDetails || - (this.ConfigurationDetails != null && - this.ConfigurationDetails.Equals(input.ConfigurationDetails)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ConfigurationDetails != null) - { - hashCode = (hashCode * 59) + this.ConfigurationDetails.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/NotificationConfigurationDetails.cs b/Adyen/Model/PlatformsNotificationConfiguration/NotificationConfigurationDetails.cs deleted file mode 100644 index 76ce88ec4..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/NotificationConfigurationDetails.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// NotificationConfigurationDetails - /// - [DataContract(Name = "NotificationConfigurationDetails")] - public partial class NotificationConfigurationDetails : IEquatable, IValidatableObject - { - /// - /// The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`. - /// - /// The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`. - [JsonConverter(typeof(StringEnumConverter))] - public enum SslProtocolEnum - { - /// - /// Enum TLSv12 for value: TLSv12 - /// - [EnumMember(Value = "TLSv12")] - TLSv12 = 1, - - /// - /// Enum TLSv13 for value: TLSv13 - /// - [EnumMember(Value = "TLSv13")] - TLSv13 = 2 - - } - - - /// - /// The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`. - /// - /// The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`. - [DataMember(Name = "sslProtocol", EmitDefaultValue = false)] - public SslProtocolEnum? SslProtocol { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether the notification subscription is active.. - /// The version of the notification to which you are subscribing. To make sure that your integration can properly process the notification, subscribe to the same version as the API that you're using.. - /// A description of the notification subscription configuration.. - /// Contains objects that define event types and their subscription settings.. - /// A string with which to salt the notification(s) before hashing. If this field is provided, a hash value will be included under the notification header `HmacSignature` and the hash protocol will be included under the notification header `Protocol`. A notification body along with its `hmacSignatureKey` and `Protocol` can be used to calculate a hash value; matching this hash value with the `HmacSignature` will ensure that the notification body has not been tampered with or corrupted. >Must be a 32-byte hex-encoded string (i.e. a string containing 64 hexadecimal characters; e.g. \"b0ea55c2fe60d4d1d605e9c385e0e7f7e6cafbb939ce07010f31a327a0871f27\"). The omission of this field will preclude the provision of the `HmacSignature` and `Protocol` headers in notification(s).. - /// Adyen-generated ID for the entry, returned in the response when you create a notification configuration. Required when updating an existing configuration using [`/updateNotificationConfiguration`](https://docs.adyen.com/api-explorer/#/NotificationConfigurationService/latest/post/updateNotificationConfiguration).. - /// The password to use when accessing the notifyURL with the specified username.. - /// The URL to which the notifications are to be sent.. - /// The username to use when accessing the notifyURL.. - /// The SSL protocol employed by the endpoint. >Permitted values: `TLSv12`, `TLSv13`.. - public NotificationConfigurationDetails(bool? active = default(bool?), int? apiVersion = default(int?), string description = default(string), List eventConfigs = default(List), string hmacSignatureKey = default(string), long? notificationId = default(long?), string notifyPassword = default(string), string notifyURL = default(string), string notifyUsername = default(string), SslProtocolEnum? sslProtocol = default(SslProtocolEnum?)) - { - this.Active = active; - this.ApiVersion = apiVersion; - this.Description = description; - this.EventConfigs = eventConfigs; - this.HmacSignatureKey = hmacSignatureKey; - this.NotificationId = notificationId; - this.NotifyPassword = notifyPassword; - this.NotifyURL = notifyURL; - this.NotifyUsername = notifyUsername; - this.SslProtocol = sslProtocol; - } - - /// - /// Indicates whether the notification subscription is active. - /// - /// Indicates whether the notification subscription is active. - [DataMember(Name = "active", EmitDefaultValue = false)] - public bool? Active { get; set; } - - /// - /// The version of the notification to which you are subscribing. To make sure that your integration can properly process the notification, subscribe to the same version as the API that you're using. - /// - /// The version of the notification to which you are subscribing. To make sure that your integration can properly process the notification, subscribe to the same version as the API that you're using. - [DataMember(Name = "apiVersion", EmitDefaultValue = false)] - public int? ApiVersion { get; set; } - - /// - /// A description of the notification subscription configuration. - /// - /// A description of the notification subscription configuration. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Contains objects that define event types and their subscription settings. - /// - /// Contains objects that define event types and their subscription settings. - [DataMember(Name = "eventConfigs", EmitDefaultValue = false)] - public List EventConfigs { get; set; } - - /// - /// A string with which to salt the notification(s) before hashing. If this field is provided, a hash value will be included under the notification header `HmacSignature` and the hash protocol will be included under the notification header `Protocol`. A notification body along with its `hmacSignatureKey` and `Protocol` can be used to calculate a hash value; matching this hash value with the `HmacSignature` will ensure that the notification body has not been tampered with or corrupted. >Must be a 32-byte hex-encoded string (i.e. a string containing 64 hexadecimal characters; e.g. \"b0ea55c2fe60d4d1d605e9c385e0e7f7e6cafbb939ce07010f31a327a0871f27\"). The omission of this field will preclude the provision of the `HmacSignature` and `Protocol` headers in notification(s). - /// - /// A string with which to salt the notification(s) before hashing. If this field is provided, a hash value will be included under the notification header `HmacSignature` and the hash protocol will be included under the notification header `Protocol`. A notification body along with its `hmacSignatureKey` and `Protocol` can be used to calculate a hash value; matching this hash value with the `HmacSignature` will ensure that the notification body has not been tampered with or corrupted. >Must be a 32-byte hex-encoded string (i.e. a string containing 64 hexadecimal characters; e.g. \"b0ea55c2fe60d4d1d605e9c385e0e7f7e6cafbb939ce07010f31a327a0871f27\"). The omission of this field will preclude the provision of the `HmacSignature` and `Protocol` headers in notification(s). - [DataMember(Name = "hmacSignatureKey", EmitDefaultValue = false)] - public string HmacSignatureKey { get; set; } - - /// - /// Adyen-generated ID for the entry, returned in the response when you create a notification configuration. Required when updating an existing configuration using [`/updateNotificationConfiguration`](https://docs.adyen.com/api-explorer/#/NotificationConfigurationService/latest/post/updateNotificationConfiguration). - /// - /// Adyen-generated ID for the entry, returned in the response when you create a notification configuration. Required when updating an existing configuration using [`/updateNotificationConfiguration`](https://docs.adyen.com/api-explorer/#/NotificationConfigurationService/latest/post/updateNotificationConfiguration). - [DataMember(Name = "notificationId", EmitDefaultValue = false)] - public long? NotificationId { get; set; } - - /// - /// The password to use when accessing the notifyURL with the specified username. - /// - /// The password to use when accessing the notifyURL with the specified username. - [DataMember(Name = "notifyPassword", EmitDefaultValue = false)] - public string NotifyPassword { get; set; } - - /// - /// The URL to which the notifications are to be sent. - /// - /// The URL to which the notifications are to be sent. - [DataMember(Name = "notifyURL", EmitDefaultValue = false)] - public string NotifyURL { get; set; } - - /// - /// The username to use when accessing the notifyURL. - /// - /// The username to use when accessing the notifyURL. - [DataMember(Name = "notifyUsername", EmitDefaultValue = false)] - public string NotifyUsername { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NotificationConfigurationDetails {\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" ApiVersion: ").Append(ApiVersion).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EventConfigs: ").Append(EventConfigs).Append("\n"); - sb.Append(" HmacSignatureKey: ").Append(HmacSignatureKey).Append("\n"); - sb.Append(" NotificationId: ").Append(NotificationId).Append("\n"); - sb.Append(" NotifyPassword: ").Append(NotifyPassword).Append("\n"); - sb.Append(" NotifyURL: ").Append(NotifyURL).Append("\n"); - sb.Append(" NotifyUsername: ").Append(NotifyUsername).Append("\n"); - sb.Append(" SslProtocol: ").Append(SslProtocol).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotificationConfigurationDetails); - } - - /// - /// Returns true if NotificationConfigurationDetails instances are equal - /// - /// Instance of NotificationConfigurationDetails to be compared - /// Boolean - public bool Equals(NotificationConfigurationDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.ApiVersion == input.ApiVersion || - this.ApiVersion.Equals(input.ApiVersion) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EventConfigs == input.EventConfigs || - this.EventConfigs != null && - input.EventConfigs != null && - this.EventConfigs.SequenceEqual(input.EventConfigs) - ) && - ( - this.HmacSignatureKey == input.HmacSignatureKey || - (this.HmacSignatureKey != null && - this.HmacSignatureKey.Equals(input.HmacSignatureKey)) - ) && - ( - this.NotificationId == input.NotificationId || - this.NotificationId.Equals(input.NotificationId) - ) && - ( - this.NotifyPassword == input.NotifyPassword || - (this.NotifyPassword != null && - this.NotifyPassword.Equals(input.NotifyPassword)) - ) && - ( - this.NotifyURL == input.NotifyURL || - (this.NotifyURL != null && - this.NotifyURL.Equals(input.NotifyURL)) - ) && - ( - this.NotifyUsername == input.NotifyUsername || - (this.NotifyUsername != null && - this.NotifyUsername.Equals(input.NotifyUsername)) - ) && - ( - this.SslProtocol == input.SslProtocol || - this.SslProtocol.Equals(input.SslProtocol) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.ApiVersion.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.EventConfigs != null) - { - hashCode = (hashCode * 59) + this.EventConfigs.GetHashCode(); - } - if (this.HmacSignatureKey != null) - { - hashCode = (hashCode * 59) + this.HmacSignatureKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NotificationId.GetHashCode(); - if (this.NotifyPassword != null) - { - hashCode = (hashCode * 59) + this.NotifyPassword.GetHashCode(); - } - if (this.NotifyURL != null) - { - hashCode = (hashCode * 59) + this.NotifyURL.GetHashCode(); - } - if (this.NotifyUsername != null) - { - hashCode = (hashCode * 59) + this.NotifyUsername.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SslProtocol.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/NotificationEventConfiguration.cs b/Adyen/Model/PlatformsNotificationConfiguration/NotificationEventConfiguration.cs deleted file mode 100644 index 288b2d5e7..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/NotificationEventConfiguration.cs +++ /dev/null @@ -1,325 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// NotificationEventConfiguration - /// - [DataContract(Name = "NotificationEventConfiguration")] - public partial class NotificationEventConfiguration : IEquatable, IValidatableObject - { - /// - /// The type of event. Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**. - /// - /// The type of event. Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**. - [JsonConverter(typeof(StringEnumConverter))] - public enum EventTypeEnum - { - /// - /// Enum ACCOUNTCLOSED for value: ACCOUNT_CLOSED - /// - [EnumMember(Value = "ACCOUNT_CLOSED")] - ACCOUNTCLOSED = 1, - - /// - /// Enum ACCOUNTCREATED for value: ACCOUNT_CREATED - /// - [EnumMember(Value = "ACCOUNT_CREATED")] - ACCOUNTCREATED = 2, - - /// - /// Enum ACCOUNTFUNDSBELOWTHRESHOLD for value: ACCOUNT_FUNDS_BELOW_THRESHOLD - /// - [EnumMember(Value = "ACCOUNT_FUNDS_BELOW_THRESHOLD")] - ACCOUNTFUNDSBELOWTHRESHOLD = 3, - - /// - /// Enum ACCOUNTHOLDERCREATED for value: ACCOUNT_HOLDER_CREATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_CREATED")] - ACCOUNTHOLDERCREATED = 4, - - /// - /// Enum ACCOUNTHOLDERLIMITREACHED for value: ACCOUNT_HOLDER_LIMIT_REACHED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_LIMIT_REACHED")] - ACCOUNTHOLDERLIMITREACHED = 5, - - /// - /// Enum ACCOUNTHOLDERMIGRATED for value: ACCOUNT_HOLDER_MIGRATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_MIGRATED")] - ACCOUNTHOLDERMIGRATED = 6, - - /// - /// Enum ACCOUNTHOLDERPAYOUT for value: ACCOUNT_HOLDER_PAYOUT - /// - [EnumMember(Value = "ACCOUNT_HOLDER_PAYOUT")] - ACCOUNTHOLDERPAYOUT = 7, - - /// - /// Enum ACCOUNTHOLDERSTATUSCHANGE for value: ACCOUNT_HOLDER_STATUS_CHANGE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_STATUS_CHANGE")] - ACCOUNTHOLDERSTATUSCHANGE = 8, - - /// - /// Enum ACCOUNTHOLDERSTORESTATUSCHANGE for value: ACCOUNT_HOLDER_STORE_STATUS_CHANGE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_STORE_STATUS_CHANGE")] - ACCOUNTHOLDERSTORESTATUSCHANGE = 9, - - /// - /// Enum ACCOUNTHOLDERUPCOMINGDEADLINE for value: ACCOUNT_HOLDER_UPCOMING_DEADLINE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_UPCOMING_DEADLINE")] - ACCOUNTHOLDERUPCOMINGDEADLINE = 10, - - /// - /// Enum ACCOUNTHOLDERUPDATED for value: ACCOUNT_HOLDER_UPDATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_UPDATED")] - ACCOUNTHOLDERUPDATED = 11, - - /// - /// Enum ACCOUNTHOLDERVERIFICATION for value: ACCOUNT_HOLDER_VERIFICATION - /// - [EnumMember(Value = "ACCOUNT_HOLDER_VERIFICATION")] - ACCOUNTHOLDERVERIFICATION = 12, - - /// - /// Enum ACCOUNTUPDATED for value: ACCOUNT_UPDATED - /// - [EnumMember(Value = "ACCOUNT_UPDATED")] - ACCOUNTUPDATED = 13, - - /// - /// Enum BENEFICIARYSETUP for value: BENEFICIARY_SETUP - /// - [EnumMember(Value = "BENEFICIARY_SETUP")] - BENEFICIARYSETUP = 14, - - /// - /// Enum COMPENSATENEGATIVEBALANCE for value: COMPENSATE_NEGATIVE_BALANCE - /// - [EnumMember(Value = "COMPENSATE_NEGATIVE_BALANCE")] - COMPENSATENEGATIVEBALANCE = 15, - - /// - /// Enum DIRECTDEBITINITIATED for value: DIRECT_DEBIT_INITIATED - /// - [EnumMember(Value = "DIRECT_DEBIT_INITIATED")] - DIRECTDEBITINITIATED = 16, - - /// - /// Enum FUNDSMIGRATED for value: FUNDS_MIGRATED - /// - [EnumMember(Value = "FUNDS_MIGRATED")] - FUNDSMIGRATED = 17, - - /// - /// Enum PAYMENTFAILURE for value: PAYMENT_FAILURE - /// - [EnumMember(Value = "PAYMENT_FAILURE")] - PAYMENTFAILURE = 18, - - /// - /// Enum PENDINGCREDIT for value: PENDING_CREDIT - /// - [EnumMember(Value = "PENDING_CREDIT")] - PENDINGCREDIT = 19, - - /// - /// Enum REFUNDFUNDSTRANSFER for value: REFUND_FUNDS_TRANSFER - /// - [EnumMember(Value = "REFUND_FUNDS_TRANSFER")] - REFUNDFUNDSTRANSFER = 20, - - /// - /// Enum REPORTAVAILABLE for value: REPORT_AVAILABLE - /// - [EnumMember(Value = "REPORT_AVAILABLE")] - REPORTAVAILABLE = 21, - - /// - /// Enum SCHEDULEDREFUNDS for value: SCHEDULED_REFUNDS - /// - [EnumMember(Value = "SCHEDULED_REFUNDS")] - SCHEDULEDREFUNDS = 22, - - /// - /// Enum SCORESIGNALTRIGGERED for value: SCORE_SIGNAL_TRIGGERED - /// - [EnumMember(Value = "SCORE_SIGNAL_TRIGGERED")] - SCORESIGNALTRIGGERED = 23, - - /// - /// Enum TRANSFERFUNDS for value: TRANSFER_FUNDS - /// - [EnumMember(Value = "TRANSFER_FUNDS")] - TRANSFERFUNDS = 24, - - /// - /// Enum TRANSFERNOTPAIDOUTTRANSFERS for value: TRANSFER_NOT_PAIDOUT_TRANSFERS - /// - [EnumMember(Value = "TRANSFER_NOT_PAIDOUT_TRANSFERS")] - TRANSFERNOTPAIDOUTTRANSFERS = 25 - - } - - - /// - /// The type of event. Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**. - /// - /// The type of event. Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public EventTypeEnum EventType { get; set; } - /// - /// Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**. - /// - /// Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**. - [JsonConverter(typeof(StringEnumConverter))] - public enum IncludeModeEnum - { - /// - /// Enum EXCLUDE for value: EXCLUDE - /// - [EnumMember(Value = "EXCLUDE")] - EXCLUDE = 1, - - /// - /// Enum INCLUDE for value: INCLUDE - /// - [EnumMember(Value = "INCLUDE")] - INCLUDE = 2 - - } - - - /// - /// Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**. - /// - /// Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**. - [DataMember(Name = "includeMode", IsRequired = false, EmitDefaultValue = false)] - public IncludeModeEnum IncludeMode { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NotificationEventConfiguration() { } - /// - /// Initializes a new instance of the class. - /// - /// The type of event. Possible values: **ACCOUNT_CLOSED**, **ACCOUNT_CREATED**, **ACCOUNT_FUNDS_BELOW_THRESHOLD**, **ACCOUNT_HOLDER_CREATED**, **ACCOUNT_HOLDER_LIMIT_REACHED**, **ACCOUNT_HOLDER_PAYOUT**, **ACCOUNT_HOLDER_STATUS_CHANGE**, **ACCOUNT_HOLDER_STORE_STATUS_CHANGE**, **ACCOUNT_HOLDER_UPCOMING_DEADLINE**, **ACCOUNT_HOLDER_UPDATED**, **ACCOUNT_HOLDER_VERIFICATION**, **ACCOUNT_UPDATED**, **BENEFICIARY_SETUP**, **COMPENSATE_NEGATIVE_BALANCE**, **DIRECT_DEBIT_INITIATED**, **PAYMENT_FAILURE**, **REFUND_FUNDS_TRANSFER**, **REPORT_AVAILABLE**, **SCHEDULED_REFUNDS**, **TRANSFER_FUNDS**. (required). - /// Indicates whether the specified `eventType` is sent to your webhook endpoint. Possible values: * **INCLUDE**: Send the specified `eventType`. * **EXCLUDE**: Send all event types except the specified `eventType` and other event types with the `includeMode` set to **EXCLUDE**. (required). - public NotificationEventConfiguration(EventTypeEnum eventType = default(EventTypeEnum), IncludeModeEnum includeMode = default(IncludeModeEnum)) - { - this.EventType = eventType; - this.IncludeMode = includeMode; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NotificationEventConfiguration {\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" IncludeMode: ").Append(IncludeMode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotificationEventConfiguration); - } - - /// - /// Returns true if NotificationEventConfiguration instances are equal - /// - /// Instance of NotificationEventConfiguration to be compared - /// Boolean - public bool Equals(NotificationEventConfiguration input) - { - if (input == null) - { - return false; - } - return - ( - this.EventType == input.EventType || - this.EventType.Equals(input.EventType) - ) && - ( - this.IncludeMode == input.IncludeMode || - this.IncludeMode.Equals(input.IncludeMode) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - hashCode = (hashCode * 59) + this.IncludeMode.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/ServiceError.cs b/Adyen/Model/PlatformsNotificationConfiguration/ServiceError.cs deleted file mode 100644 index f4b10a9bf..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/TestNotificationConfigurationRequest.cs b/Adyen/Model/PlatformsNotificationConfiguration/TestNotificationConfigurationRequest.cs deleted file mode 100644 index d135ea81d..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/TestNotificationConfigurationRequest.cs +++ /dev/null @@ -1,308 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// TestNotificationConfigurationRequest - /// - [DataContract(Name = "TestNotificationConfigurationRequest")] - public partial class TestNotificationConfigurationRequest : IEquatable, IValidatableObject - { - /// - /// Defines EventTypes - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EventTypesEnum - { - /// - /// Enum ACCOUNTCLOSED for value: ACCOUNT_CLOSED - /// - [EnumMember(Value = "ACCOUNT_CLOSED")] - ACCOUNTCLOSED = 1, - - /// - /// Enum ACCOUNTCREATED for value: ACCOUNT_CREATED - /// - [EnumMember(Value = "ACCOUNT_CREATED")] - ACCOUNTCREATED = 2, - - /// - /// Enum ACCOUNTFUNDSBELOWTHRESHOLD for value: ACCOUNT_FUNDS_BELOW_THRESHOLD - /// - [EnumMember(Value = "ACCOUNT_FUNDS_BELOW_THRESHOLD")] - ACCOUNTFUNDSBELOWTHRESHOLD = 3, - - /// - /// Enum ACCOUNTHOLDERCREATED for value: ACCOUNT_HOLDER_CREATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_CREATED")] - ACCOUNTHOLDERCREATED = 4, - - /// - /// Enum ACCOUNTHOLDERLIMITREACHED for value: ACCOUNT_HOLDER_LIMIT_REACHED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_LIMIT_REACHED")] - ACCOUNTHOLDERLIMITREACHED = 5, - - /// - /// Enum ACCOUNTHOLDERMIGRATED for value: ACCOUNT_HOLDER_MIGRATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_MIGRATED")] - ACCOUNTHOLDERMIGRATED = 6, - - /// - /// Enum ACCOUNTHOLDERPAYOUT for value: ACCOUNT_HOLDER_PAYOUT - /// - [EnumMember(Value = "ACCOUNT_HOLDER_PAYOUT")] - ACCOUNTHOLDERPAYOUT = 7, - - /// - /// Enum ACCOUNTHOLDERSTATUSCHANGE for value: ACCOUNT_HOLDER_STATUS_CHANGE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_STATUS_CHANGE")] - ACCOUNTHOLDERSTATUSCHANGE = 8, - - /// - /// Enum ACCOUNTHOLDERSTORESTATUSCHANGE for value: ACCOUNT_HOLDER_STORE_STATUS_CHANGE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_STORE_STATUS_CHANGE")] - ACCOUNTHOLDERSTORESTATUSCHANGE = 9, - - /// - /// Enum ACCOUNTHOLDERUPCOMINGDEADLINE for value: ACCOUNT_HOLDER_UPCOMING_DEADLINE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_UPCOMING_DEADLINE")] - ACCOUNTHOLDERUPCOMINGDEADLINE = 10, - - /// - /// Enum ACCOUNTHOLDERUPDATED for value: ACCOUNT_HOLDER_UPDATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_UPDATED")] - ACCOUNTHOLDERUPDATED = 11, - - /// - /// Enum ACCOUNTHOLDERVERIFICATION for value: ACCOUNT_HOLDER_VERIFICATION - /// - [EnumMember(Value = "ACCOUNT_HOLDER_VERIFICATION")] - ACCOUNTHOLDERVERIFICATION = 12, - - /// - /// Enum ACCOUNTUPDATED for value: ACCOUNT_UPDATED - /// - [EnumMember(Value = "ACCOUNT_UPDATED")] - ACCOUNTUPDATED = 13, - - /// - /// Enum BENEFICIARYSETUP for value: BENEFICIARY_SETUP - /// - [EnumMember(Value = "BENEFICIARY_SETUP")] - BENEFICIARYSETUP = 14, - - /// - /// Enum COMPENSATENEGATIVEBALANCE for value: COMPENSATE_NEGATIVE_BALANCE - /// - [EnumMember(Value = "COMPENSATE_NEGATIVE_BALANCE")] - COMPENSATENEGATIVEBALANCE = 15, - - /// - /// Enum DIRECTDEBITINITIATED for value: DIRECT_DEBIT_INITIATED - /// - [EnumMember(Value = "DIRECT_DEBIT_INITIATED")] - DIRECTDEBITINITIATED = 16, - - /// - /// Enum FUNDSMIGRATED for value: FUNDS_MIGRATED - /// - [EnumMember(Value = "FUNDS_MIGRATED")] - FUNDSMIGRATED = 17, - - /// - /// Enum PAYMENTFAILURE for value: PAYMENT_FAILURE - /// - [EnumMember(Value = "PAYMENT_FAILURE")] - PAYMENTFAILURE = 18, - - /// - /// Enum PENDINGCREDIT for value: PENDING_CREDIT - /// - [EnumMember(Value = "PENDING_CREDIT")] - PENDINGCREDIT = 19, - - /// - /// Enum REFUNDFUNDSTRANSFER for value: REFUND_FUNDS_TRANSFER - /// - [EnumMember(Value = "REFUND_FUNDS_TRANSFER")] - REFUNDFUNDSTRANSFER = 20, - - /// - /// Enum REPORTAVAILABLE for value: REPORT_AVAILABLE - /// - [EnumMember(Value = "REPORT_AVAILABLE")] - REPORTAVAILABLE = 21, - - /// - /// Enum SCHEDULEDREFUNDS for value: SCHEDULED_REFUNDS - /// - [EnumMember(Value = "SCHEDULED_REFUNDS")] - SCHEDULEDREFUNDS = 22, - - /// - /// Enum SCORESIGNALTRIGGERED for value: SCORE_SIGNAL_TRIGGERED - /// - [EnumMember(Value = "SCORE_SIGNAL_TRIGGERED")] - SCORESIGNALTRIGGERED = 23, - - /// - /// Enum TRANSFERFUNDS for value: TRANSFER_FUNDS - /// - [EnumMember(Value = "TRANSFER_FUNDS")] - TRANSFERFUNDS = 24, - - /// - /// Enum TRANSFERNOTPAIDOUTTRANSFERS for value: TRANSFER_NOT_PAIDOUT_TRANSFERS - /// - [EnumMember(Value = "TRANSFER_NOT_PAIDOUT_TRANSFERS")] - TRANSFERNOTPAIDOUTTRANSFERS = 25 - - } - - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TestNotificationConfigurationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The event types to test. If left blank, then all of the configured event types will be tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`.. - /// The ID of the notification subscription configuration to be tested. (required). - public TestNotificationConfigurationRequest(List eventTypes = default(List), long? notificationId = default(long?)) - { - this.NotificationId = notificationId; - this.EventTypes = eventTypes; - } - - /// - /// The event types to test. If left blank, then all of the configured event types will be tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`. - /// - /// The event types to test. If left blank, then all of the configured event types will be tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`. - [DataMember(Name = "eventTypes", EmitDefaultValue = false)] - public List EventTypes { get; set; } - - /// - /// The ID of the notification subscription configuration to be tested. - /// - /// The ID of the notification subscription configuration to be tested. - [DataMember(Name = "notificationId", IsRequired = false, EmitDefaultValue = false)] - public long? NotificationId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TestNotificationConfigurationRequest {\n"); - sb.Append(" EventTypes: ").Append(EventTypes).Append("\n"); - sb.Append(" NotificationId: ").Append(NotificationId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TestNotificationConfigurationRequest); - } - - /// - /// Returns true if TestNotificationConfigurationRequest instances are equal - /// - /// Instance of TestNotificationConfigurationRequest to be compared - /// Boolean - public bool Equals(TestNotificationConfigurationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.EventTypes == input.EventTypes || - this.EventTypes != null && - input.EventTypes != null && - this.EventTypes.SequenceEqual(input.EventTypes) - ) && - ( - this.NotificationId == input.NotificationId || - this.NotificationId.Equals(input.NotificationId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EventTypes != null) - { - hashCode = (hashCode * 59) + this.EventTypes.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NotificationId.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/TestNotificationConfigurationResponse.cs b/Adyen/Model/PlatformsNotificationConfiguration/TestNotificationConfigurationResponse.cs deleted file mode 100644 index ce5b974a7..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/TestNotificationConfigurationResponse.cs +++ /dev/null @@ -1,426 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// TestNotificationConfigurationResponse - /// - [DataContract(Name = "TestNotificationConfigurationResponse")] - public partial class TestNotificationConfigurationResponse : IEquatable, IValidatableObject - { - /// - /// Defines EventTypes - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EventTypesEnum - { - /// - /// Enum ACCOUNTCLOSED for value: ACCOUNT_CLOSED - /// - [EnumMember(Value = "ACCOUNT_CLOSED")] - ACCOUNTCLOSED = 1, - - /// - /// Enum ACCOUNTCREATED for value: ACCOUNT_CREATED - /// - [EnumMember(Value = "ACCOUNT_CREATED")] - ACCOUNTCREATED = 2, - - /// - /// Enum ACCOUNTFUNDSBELOWTHRESHOLD for value: ACCOUNT_FUNDS_BELOW_THRESHOLD - /// - [EnumMember(Value = "ACCOUNT_FUNDS_BELOW_THRESHOLD")] - ACCOUNTFUNDSBELOWTHRESHOLD = 3, - - /// - /// Enum ACCOUNTHOLDERCREATED for value: ACCOUNT_HOLDER_CREATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_CREATED")] - ACCOUNTHOLDERCREATED = 4, - - /// - /// Enum ACCOUNTHOLDERLIMITREACHED for value: ACCOUNT_HOLDER_LIMIT_REACHED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_LIMIT_REACHED")] - ACCOUNTHOLDERLIMITREACHED = 5, - - /// - /// Enum ACCOUNTHOLDERMIGRATED for value: ACCOUNT_HOLDER_MIGRATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_MIGRATED")] - ACCOUNTHOLDERMIGRATED = 6, - - /// - /// Enum ACCOUNTHOLDERPAYOUT for value: ACCOUNT_HOLDER_PAYOUT - /// - [EnumMember(Value = "ACCOUNT_HOLDER_PAYOUT")] - ACCOUNTHOLDERPAYOUT = 7, - - /// - /// Enum ACCOUNTHOLDERSTATUSCHANGE for value: ACCOUNT_HOLDER_STATUS_CHANGE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_STATUS_CHANGE")] - ACCOUNTHOLDERSTATUSCHANGE = 8, - - /// - /// Enum ACCOUNTHOLDERSTORESTATUSCHANGE for value: ACCOUNT_HOLDER_STORE_STATUS_CHANGE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_STORE_STATUS_CHANGE")] - ACCOUNTHOLDERSTORESTATUSCHANGE = 9, - - /// - /// Enum ACCOUNTHOLDERUPCOMINGDEADLINE for value: ACCOUNT_HOLDER_UPCOMING_DEADLINE - /// - [EnumMember(Value = "ACCOUNT_HOLDER_UPCOMING_DEADLINE")] - ACCOUNTHOLDERUPCOMINGDEADLINE = 10, - - /// - /// Enum ACCOUNTHOLDERUPDATED for value: ACCOUNT_HOLDER_UPDATED - /// - [EnumMember(Value = "ACCOUNT_HOLDER_UPDATED")] - ACCOUNTHOLDERUPDATED = 11, - - /// - /// Enum ACCOUNTHOLDERVERIFICATION for value: ACCOUNT_HOLDER_VERIFICATION - /// - [EnumMember(Value = "ACCOUNT_HOLDER_VERIFICATION")] - ACCOUNTHOLDERVERIFICATION = 12, - - /// - /// Enum ACCOUNTUPDATED for value: ACCOUNT_UPDATED - /// - [EnumMember(Value = "ACCOUNT_UPDATED")] - ACCOUNTUPDATED = 13, - - /// - /// Enum BENEFICIARYSETUP for value: BENEFICIARY_SETUP - /// - [EnumMember(Value = "BENEFICIARY_SETUP")] - BENEFICIARYSETUP = 14, - - /// - /// Enum COMPENSATENEGATIVEBALANCE for value: COMPENSATE_NEGATIVE_BALANCE - /// - [EnumMember(Value = "COMPENSATE_NEGATIVE_BALANCE")] - COMPENSATENEGATIVEBALANCE = 15, - - /// - /// Enum DIRECTDEBITINITIATED for value: DIRECT_DEBIT_INITIATED - /// - [EnumMember(Value = "DIRECT_DEBIT_INITIATED")] - DIRECTDEBITINITIATED = 16, - - /// - /// Enum FUNDSMIGRATED for value: FUNDS_MIGRATED - /// - [EnumMember(Value = "FUNDS_MIGRATED")] - FUNDSMIGRATED = 17, - - /// - /// Enum PAYMENTFAILURE for value: PAYMENT_FAILURE - /// - [EnumMember(Value = "PAYMENT_FAILURE")] - PAYMENTFAILURE = 18, - - /// - /// Enum PENDINGCREDIT for value: PENDING_CREDIT - /// - [EnumMember(Value = "PENDING_CREDIT")] - PENDINGCREDIT = 19, - - /// - /// Enum REFUNDFUNDSTRANSFER for value: REFUND_FUNDS_TRANSFER - /// - [EnumMember(Value = "REFUND_FUNDS_TRANSFER")] - REFUNDFUNDSTRANSFER = 20, - - /// - /// Enum REPORTAVAILABLE for value: REPORT_AVAILABLE - /// - [EnumMember(Value = "REPORT_AVAILABLE")] - REPORTAVAILABLE = 21, - - /// - /// Enum SCHEDULEDREFUNDS for value: SCHEDULED_REFUNDS - /// - [EnumMember(Value = "SCHEDULED_REFUNDS")] - SCHEDULEDREFUNDS = 22, - - /// - /// Enum SCORESIGNALTRIGGERED for value: SCORE_SIGNAL_TRIGGERED - /// - [EnumMember(Value = "SCORE_SIGNAL_TRIGGERED")] - SCORESIGNALTRIGGERED = 23, - - /// - /// Enum TRANSFERFUNDS for value: TRANSFER_FUNDS - /// - [EnumMember(Value = "TRANSFER_FUNDS")] - TRANSFERFUNDS = 24, - - /// - /// Enum TRANSFERNOTPAIDOUTTRANSFERS for value: TRANSFER_NOT_PAIDOUT_TRANSFERS - /// - [EnumMember(Value = "TRANSFER_NOT_PAIDOUT_TRANSFERS")] - TRANSFERNOTPAIDOUTTRANSFERS = 25 - - } - - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TestNotificationConfigurationResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Any error messages encountered.. - /// The event types that were tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`.. - /// The notification message and related response messages.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The ID of the notification subscription configuration. (required). - /// A list of messages describing the testing steps.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public TestNotificationConfigurationResponse(List errorMessages = default(List), List eventTypes = default(List), List exchangeMessages = default(List), List invalidFields = default(List), long? notificationId = default(long?), List okMessages = default(List), string pspReference = default(string), string resultCode = default(string)) - { - this.NotificationId = notificationId; - this.ErrorMessages = errorMessages; - this.EventTypes = eventTypes; - this.ExchangeMessages = exchangeMessages; - this.InvalidFields = invalidFields; - this.OkMessages = okMessages; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// Any error messages encountered. - /// - /// Any error messages encountered. - [DataMember(Name = "errorMessages", EmitDefaultValue = false)] - public List ErrorMessages { get; set; } - - /// - /// The event types that were tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`. - /// - /// The event types that were tested. >Permitted values: `ACCOUNT_HOLDER_CREATED`, `ACCOUNT_CREATED`, `ACCOUNT_UPDATED`, `ACCOUNT_HOLDER_UPDATED`, `ACCOUNT_HOLDER_STATUS_CHANGE`, `ACCOUNT_HOLDER_STORE_STATUS_CHANGE` `ACCOUNT_HOLDER_VERIFICATION`, `ACCOUNT_HOLDER_LIMIT_REACHED`, `ACCOUNT_HOLDER_PAYOUT`, `PAYMENT_FAILURE`, `SCHEDULED_REFUNDS`, `REPORT_AVAILABLE`, `TRANSFER_FUNDS`, `BENEFICIARY_SETUP`, `COMPENSATE_NEGATIVE_BALANCE`. - [DataMember(Name = "eventTypes", EmitDefaultValue = false)] - public List EventTypes { get; set; } - - /// - /// The notification message and related response messages. - /// - /// The notification message and related response messages. - [DataMember(Name = "exchangeMessages", EmitDefaultValue = false)] - public List ExchangeMessages { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The ID of the notification subscription configuration. - /// - /// The ID of the notification subscription configuration. - [DataMember(Name = "notificationId", IsRequired = false, EmitDefaultValue = false)] - public long? NotificationId { get; set; } - - /// - /// A list of messages describing the testing steps. - /// - /// A list of messages describing the testing steps. - [DataMember(Name = "okMessages", EmitDefaultValue = false)] - public List OkMessages { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TestNotificationConfigurationResponse {\n"); - sb.Append(" ErrorMessages: ").Append(ErrorMessages).Append("\n"); - sb.Append(" EventTypes: ").Append(EventTypes).Append("\n"); - sb.Append(" ExchangeMessages: ").Append(ExchangeMessages).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" NotificationId: ").Append(NotificationId).Append("\n"); - sb.Append(" OkMessages: ").Append(OkMessages).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TestNotificationConfigurationResponse); - } - - /// - /// Returns true if TestNotificationConfigurationResponse instances are equal - /// - /// Instance of TestNotificationConfigurationResponse to be compared - /// Boolean - public bool Equals(TestNotificationConfigurationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorMessages == input.ErrorMessages || - this.ErrorMessages != null && - input.ErrorMessages != null && - this.ErrorMessages.SequenceEqual(input.ErrorMessages) - ) && - ( - this.EventTypes == input.EventTypes || - this.EventTypes != null && - input.EventTypes != null && - this.EventTypes.SequenceEqual(input.EventTypes) - ) && - ( - this.ExchangeMessages == input.ExchangeMessages || - this.ExchangeMessages != null && - input.ExchangeMessages != null && - this.ExchangeMessages.SequenceEqual(input.ExchangeMessages) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.NotificationId == input.NotificationId || - this.NotificationId.Equals(input.NotificationId) - ) && - ( - this.OkMessages == input.OkMessages || - this.OkMessages != null && - input.OkMessages != null && - this.OkMessages.SequenceEqual(input.OkMessages) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorMessages != null) - { - hashCode = (hashCode * 59) + this.ErrorMessages.GetHashCode(); - } - if (this.EventTypes != null) - { - hashCode = (hashCode * 59) + this.EventTypes.GetHashCode(); - } - if (this.ExchangeMessages != null) - { - hashCode = (hashCode * 59) + this.ExchangeMessages.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NotificationId.GetHashCode(); - if (this.OkMessages != null) - { - hashCode = (hashCode * 59) + this.OkMessages.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsNotificationConfiguration/UpdateNotificationConfigurationRequest.cs b/Adyen/Model/PlatformsNotificationConfiguration/UpdateNotificationConfigurationRequest.cs deleted file mode 100644 index 94f0ee357..000000000 --- a/Adyen/Model/PlatformsNotificationConfiguration/UpdateNotificationConfigurationRequest.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsNotificationConfiguration -{ - /// - /// UpdateNotificationConfigurationRequest - /// - [DataContract(Name = "UpdateNotificationConfigurationRequest")] - public partial class UpdateNotificationConfigurationRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateNotificationConfigurationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// configurationDetails (required). - public UpdateNotificationConfigurationRequest(NotificationConfigurationDetails configurationDetails = default(NotificationConfigurationDetails)) - { - this.ConfigurationDetails = configurationDetails; - } - - /// - /// Gets or Sets ConfigurationDetails - /// - [DataMember(Name = "configurationDetails", IsRequired = false, EmitDefaultValue = false)] - public NotificationConfigurationDetails ConfigurationDetails { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateNotificationConfigurationRequest {\n"); - sb.Append(" ConfigurationDetails: ").Append(ConfigurationDetails).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateNotificationConfigurationRequest); - } - - /// - /// Returns true if UpdateNotificationConfigurationRequest instances are equal - /// - /// Instance of UpdateNotificationConfigurationRequest to be compared - /// Boolean - public bool Equals(UpdateNotificationConfigurationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ConfigurationDetails == input.ConfigurationDetails || - (this.ConfigurationDetails != null && - this.ConfigurationDetails.Equals(input.ConfigurationDetails)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ConfigurationDetails != null) - { - hashCode = (hashCode * 59) + this.ConfigurationDetails.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/PlatformsWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index f83ca2aed..000000000 --- a/Adyen/Model/PlatformsWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountCloseNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountCloseNotification.cs deleted file mode 100644 index 88dc03ad9..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountCloseNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountCloseNotification - /// - [DataContract(Name = "AccountCloseNotification")] - public partial class AccountCloseNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountCloseNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountCloseNotification(CloseAccountResponse content = default(CloseAccountResponse), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public CloseAccountResponse Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountCloseNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountCloseNotification); - } - - /// - /// Returns true if AccountCloseNotification instances are equal - /// - /// Instance of AccountCloseNotification to be compared - /// Boolean - public bool Equals(AccountCloseNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountCreateNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountCreateNotification.cs deleted file mode 100644 index a5505a3fa..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountCreateNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountCreateNotification - /// - [DataContract(Name = "AccountCreateNotification")] - public partial class AccountCreateNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountCreateNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountCreateNotification(CreateAccountResponse content = default(CreateAccountResponse), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public CreateAccountResponse Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountCreateNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountCreateNotification); - } - - /// - /// Returns true if AccountCreateNotification instances are equal - /// - /// Instance of AccountCreateNotification to be compared - /// Boolean - public bool Equals(AccountCreateNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountEvent.cs b/Adyen/Model/PlatformsWebhooks/AccountEvent.cs deleted file mode 100644 index f5dac56a9..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountEvent.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountEvent - /// - [DataContract(Name = "AccountEvent")] - public partial class AccountEvent : IEquatable, IValidatableObject - { - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). - [JsonConverter(typeof(StringEnumConverter))] - public enum EventEnum - { - /// - /// Enum InactivateAccount for value: InactivateAccount - /// - [EnumMember(Value = "InactivateAccount")] - InactivateAccount = 1, - - /// - /// Enum RefundNotPaidOutTransfers for value: RefundNotPaidOutTransfers - /// - [EnumMember(Value = "RefundNotPaidOutTransfers")] - RefundNotPaidOutTransfers = 2 - - } - - - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process). - [DataMember(Name = "event", EmitDefaultValue = false)] - public EventEnum? Event { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The event. >Permitted values: `InactivateAccount`, `RefundNotPaidOutTransfers`. For more information, refer to [Verification checks](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process).. - /// The date on which the event will take place.. - /// The reason why this event has been created.. - public AccountEvent(EventEnum? _event = default(EventEnum?), DateTime executionDate = default(DateTime), string reason = default(string)) - { - this.Event = _event; - this.ExecutionDate = executionDate; - this.Reason = reason; - } - - /// - /// The date on which the event will take place. - /// - /// The date on which the event will take place. - [DataMember(Name = "executionDate", EmitDefaultValue = false)] - public DateTime ExecutionDate { get; set; } - - /// - /// The reason why this event has been created. - /// - /// The reason why this event has been created. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountEvent {\n"); - sb.Append(" Event: ").Append(Event).Append("\n"); - sb.Append(" ExecutionDate: ").Append(ExecutionDate).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountEvent); - } - - /// - /// Returns true if AccountEvent instances are equal - /// - /// Instance of AccountEvent to be compared - /// Boolean - public bool Equals(AccountEvent input) - { - if (input == null) - { - return false; - } - return - ( - this.Event == input.Event || - this.Event.Equals(input.Event) - ) && - ( - this.ExecutionDate == input.ExecutionDate || - (this.ExecutionDate != null && - this.ExecutionDate.Equals(input.ExecutionDate)) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Event.GetHashCode(); - if (this.ExecutionDate != null) - { - hashCode = (hashCode * 59) + this.ExecutionDate.GetHashCode(); - } - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountFundsBelowThresholdNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountFundsBelowThresholdNotification.cs deleted file mode 100644 index 3ef6dae7a..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountFundsBelowThresholdNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountFundsBelowThresholdNotification - /// - [DataContract(Name = "AccountFundsBelowThresholdNotification")] - public partial class AccountFundsBelowThresholdNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountFundsBelowThresholdNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountFundsBelowThresholdNotification(AccountFundsBelowThresholdNotificationContent content = default(AccountFundsBelowThresholdNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public AccountFundsBelowThresholdNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountFundsBelowThresholdNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountFundsBelowThresholdNotification); - } - - /// - /// Returns true if AccountFundsBelowThresholdNotification instances are equal - /// - /// Instance of AccountFundsBelowThresholdNotification to be compared - /// Boolean - public bool Equals(AccountFundsBelowThresholdNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountFundsBelowThresholdNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/AccountFundsBelowThresholdNotificationContent.cs deleted file mode 100644 index b3aafcc79..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountFundsBelowThresholdNotificationContent.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountFundsBelowThresholdNotificationContent - /// - [DataContract(Name = "AccountFundsBelowThresholdNotificationContent")] - public partial class AccountFundsBelowThresholdNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountFundsBelowThresholdNotificationContent() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account with funds under threshold. - /// balanceDate. - /// currentFunds. - /// fundThreshold (required). - /// The code of the merchant account. (required). - public AccountFundsBelowThresholdNotificationContent(string accountCode = default(string), LocalDate balanceDate = default(LocalDate), Amount currentFunds = default(Amount), Amount fundThreshold = default(Amount), string merchantAccountCode = default(string)) - { - this.FundThreshold = fundThreshold; - this.MerchantAccountCode = merchantAccountCode; - this.AccountCode = accountCode; - this.BalanceDate = balanceDate; - this.CurrentFunds = currentFunds; - } - - /// - /// The code of the account with funds under threshold - /// - /// The code of the account with funds under threshold - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// Gets or Sets BalanceDate - /// - [DataMember(Name = "balanceDate", EmitDefaultValue = false)] - public LocalDate BalanceDate { get; set; } - - /// - /// Gets or Sets CurrentFunds - /// - [DataMember(Name = "currentFunds", EmitDefaultValue = false)] - public Amount CurrentFunds { get; set; } - - /// - /// Gets or Sets FundThreshold - /// - [DataMember(Name = "fundThreshold", IsRequired = false, EmitDefaultValue = false)] - public Amount FundThreshold { get; set; } - - /// - /// The code of the merchant account. - /// - /// The code of the merchant account. - [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountFundsBelowThresholdNotificationContent {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" BalanceDate: ").Append(BalanceDate).Append("\n"); - sb.Append(" CurrentFunds: ").Append(CurrentFunds).Append("\n"); - sb.Append(" FundThreshold: ").Append(FundThreshold).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountFundsBelowThresholdNotificationContent); - } - - /// - /// Returns true if AccountFundsBelowThresholdNotificationContent instances are equal - /// - /// Instance of AccountFundsBelowThresholdNotificationContent to be compared - /// Boolean - public bool Equals(AccountFundsBelowThresholdNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.BalanceDate == input.BalanceDate || - (this.BalanceDate != null && - this.BalanceDate.Equals(input.BalanceDate)) - ) && - ( - this.CurrentFunds == input.CurrentFunds || - (this.CurrentFunds != null && - this.CurrentFunds.Equals(input.CurrentFunds)) - ) && - ( - this.FundThreshold == input.FundThreshold || - (this.FundThreshold != null && - this.FundThreshold.Equals(input.FundThreshold)) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.BalanceDate != null) - { - hashCode = (hashCode * 59) + this.BalanceDate.GetHashCode(); - } - if (this.CurrentFunds != null) - { - hashCode = (hashCode * 59) + this.CurrentFunds.GetHashCode(); - } - if (this.FundThreshold != null) - { - hashCode = (hashCode * 59) + this.FundThreshold.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderCreateNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderCreateNotification.cs deleted file mode 100644 index 7e200eb07..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderCreateNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderCreateNotification - /// - [DataContract(Name = "AccountHolderCreateNotification")] - public partial class AccountHolderCreateNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderCreateNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountHolderCreateNotification(CreateAccountHolderResponse content = default(CreateAccountHolderResponse), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public CreateAccountHolderResponse Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderCreateNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderCreateNotification); - } - - /// - /// Returns true if AccountHolderCreateNotification instances are equal - /// - /// Instance of AccountHolderCreateNotification to be compared - /// Boolean - public bool Equals(AccountHolderCreateNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderDetails.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderDetails.cs deleted file mode 100644 index 7e27b008b..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderDetails.cs +++ /dev/null @@ -1,401 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderDetails - /// - [DataContract(Name = "AccountHolderDetails")] - public partial class AccountHolderDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderDetails() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information).. - /// The opaque reference value returned by the Adyen API during bank account login.. - /// businessDetails. - /// The email address of the account holder.. - /// The phone number of the account holder provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// individualDetails. - /// Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**.. - /// An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements).. - /// The Merchant Category Code of the account holder. > If not specified in the request, this will be derived from the platform account (which is configured by Adyen).. - /// A set of key and value pairs for general use by the account holder or merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs.. - /// Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards).. - /// principalBusinessAddress. - /// Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos).. - /// The URL of the website of the account holder.. - public AccountHolderDetails(ViasAddress address = default(ViasAddress), List bankAccountDetails = default(List), string bankAggregatorDataReference = default(string), BusinessDetails businessDetails = default(BusinessDetails), string email = default(string), string fullPhoneNumber = default(string), IndividualDetails individualDetails = default(IndividualDetails), string lastReviewDate = default(string), List legalArrangements = default(List), string merchantCategoryCode = default(string), Dictionary metadata = default(Dictionary), List payoutMethods = default(List), ViasAddress principalBusinessAddress = default(ViasAddress), List storeDetails = default(List), string webAddress = default(string)) - { - this.Address = address; - this.BankAccountDetails = bankAccountDetails; - this.BankAggregatorDataReference = bankAggregatorDataReference; - this.BusinessDetails = businessDetails; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.IndividualDetails = individualDetails; - this.LastReviewDate = lastReviewDate; - this.LegalArrangements = legalArrangements; - this.MerchantCategoryCode = merchantCategoryCode; - this.Metadata = metadata; - this.PayoutMethods = payoutMethods; - this.PrincipalBusinessAddress = principalBusinessAddress; - this.StoreDetails = storeDetails; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information). - /// - /// Array of bank accounts associated with the account holder. For details about the required `bankAccountDetail` fields, see [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information). - [DataMember(Name = "bankAccountDetails", EmitDefaultValue = false)] - public List BankAccountDetails { get; set; } - - /// - /// The opaque reference value returned by the Adyen API during bank account login. - /// - /// The opaque reference value returned by the Adyen API during bank account login. - [DataMember(Name = "bankAggregatorDataReference", EmitDefaultValue = false)] - public string BankAggregatorDataReference { get; set; } - - /// - /// Gets or Sets BusinessDetails - /// - [DataMember(Name = "businessDetails", EmitDefaultValue = false)] - public BusinessDetails BusinessDetails { get; set; } - - /// - /// The email address of the account holder. - /// - /// The email address of the account holder. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The phone number of the account holder provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the account holder provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Gets or Sets IndividualDetails - /// - [DataMember(Name = "individualDetails", EmitDefaultValue = false)] - public IndividualDetails IndividualDetails { get; set; } - - /// - /// Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**. - /// - /// Date when you last reviewed the account holder's information, in ISO-8601 YYYY-MM-DD format. For example, **2020-01-31**. - [DataMember(Name = "lastReviewDate", EmitDefaultValue = false)] - public string LastReviewDate { get; set; } - - /// - /// An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements). - /// - /// An array containing information about the account holder's [legal arrangements](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements). - [DataMember(Name = "legalArrangements", EmitDefaultValue = false)] - public List LegalArrangements { get; set; } - - /// - /// The Merchant Category Code of the account holder. > If not specified in the request, this will be derived from the platform account (which is configured by Adyen). - /// - /// The Merchant Category Code of the account holder. > If not specified in the request, this will be derived from the platform account (which is configured by Adyen). - [DataMember(Name = "merchantCategoryCode", EmitDefaultValue = false)] - public string MerchantCategoryCode { get; set; } - - /// - /// A set of key and value pairs for general use by the account holder or merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - /// - /// A set of key and value pairs for general use by the account holder or merchant. The keys do not have specific names and may be used for storing miscellaneous data as desired. > The values being stored have a maximum length of eighty (80) characters and will be truncated if necessary. > Note that during an update of metadata, the omission of existing key-value pairs will result in the deletion of those key-value pairs. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards). - /// - /// Array of tokenized card details associated with the account holder. For details about how you can use the tokens to pay out, refer to [Pay out to cards](https://docs.adyen.com/marketplaces-and-platforms/classic/payout-to-cards). - [DataMember(Name = "payoutMethods", EmitDefaultValue = false)] - public List PayoutMethods { get; set; } - - /// - /// Gets or Sets PrincipalBusinessAddress - /// - [DataMember(Name = "principalBusinessAddress", EmitDefaultValue = false)] - public ViasAddress PrincipalBusinessAddress { get; set; } - - /// - /// Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos). - /// - /// Array of stores associated with the account holder. Required when onboarding account holders that have an Adyen [point of sale](https://docs.adyen.com/marketplaces-and-platforms/classic/platforms-for-pos). - [DataMember(Name = "storeDetails", EmitDefaultValue = false)] - public List StoreDetails { get; set; } - - /// - /// The URL of the website of the account holder. - /// - /// The URL of the website of the account holder. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderDetails {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BankAccountDetails: ").Append(BankAccountDetails).Append("\n"); - sb.Append(" BankAggregatorDataReference: ").Append(BankAggregatorDataReference).Append("\n"); - sb.Append(" BusinessDetails: ").Append(BusinessDetails).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" IndividualDetails: ").Append(IndividualDetails).Append("\n"); - sb.Append(" LastReviewDate: ").Append(LastReviewDate).Append("\n"); - sb.Append(" LegalArrangements: ").Append(LegalArrangements).Append("\n"); - sb.Append(" MerchantCategoryCode: ").Append(MerchantCategoryCode).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethods: ").Append(PayoutMethods).Append("\n"); - sb.Append(" PrincipalBusinessAddress: ").Append(PrincipalBusinessAddress).Append("\n"); - sb.Append(" StoreDetails: ").Append(StoreDetails).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderDetails); - } - - /// - /// Returns true if AccountHolderDetails instances are equal - /// - /// Instance of AccountHolderDetails to be compared - /// Boolean - public bool Equals(AccountHolderDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BankAccountDetails == input.BankAccountDetails || - this.BankAccountDetails != null && - input.BankAccountDetails != null && - this.BankAccountDetails.SequenceEqual(input.BankAccountDetails) - ) && - ( - this.BankAggregatorDataReference == input.BankAggregatorDataReference || - (this.BankAggregatorDataReference != null && - this.BankAggregatorDataReference.Equals(input.BankAggregatorDataReference)) - ) && - ( - this.BusinessDetails == input.BusinessDetails || - (this.BusinessDetails != null && - this.BusinessDetails.Equals(input.BusinessDetails)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.IndividualDetails == input.IndividualDetails || - (this.IndividualDetails != null && - this.IndividualDetails.Equals(input.IndividualDetails)) - ) && - ( - this.LastReviewDate == input.LastReviewDate || - (this.LastReviewDate != null && - this.LastReviewDate.Equals(input.LastReviewDate)) - ) && - ( - this.LegalArrangements == input.LegalArrangements || - this.LegalArrangements != null && - input.LegalArrangements != null && - this.LegalArrangements.SequenceEqual(input.LegalArrangements) - ) && - ( - this.MerchantCategoryCode == input.MerchantCategoryCode || - (this.MerchantCategoryCode != null && - this.MerchantCategoryCode.Equals(input.MerchantCategoryCode)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethods == input.PayoutMethods || - this.PayoutMethods != null && - input.PayoutMethods != null && - this.PayoutMethods.SequenceEqual(input.PayoutMethods) - ) && - ( - this.PrincipalBusinessAddress == input.PrincipalBusinessAddress || - (this.PrincipalBusinessAddress != null && - this.PrincipalBusinessAddress.Equals(input.PrincipalBusinessAddress)) - ) && - ( - this.StoreDetails == input.StoreDetails || - this.StoreDetails != null && - input.StoreDetails != null && - this.StoreDetails.SequenceEqual(input.StoreDetails) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BankAccountDetails != null) - { - hashCode = (hashCode * 59) + this.BankAccountDetails.GetHashCode(); - } - if (this.BankAggregatorDataReference != null) - { - hashCode = (hashCode * 59) + this.BankAggregatorDataReference.GetHashCode(); - } - if (this.BusinessDetails != null) - { - hashCode = (hashCode * 59) + this.BusinessDetails.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.IndividualDetails != null) - { - hashCode = (hashCode * 59) + this.IndividualDetails.GetHashCode(); - } - if (this.LastReviewDate != null) - { - hashCode = (hashCode * 59) + this.LastReviewDate.GetHashCode(); - } - if (this.LegalArrangements != null) - { - hashCode = (hashCode * 59) + this.LegalArrangements.GetHashCode(); - } - if (this.MerchantCategoryCode != null) - { - hashCode = (hashCode * 59) + this.MerchantCategoryCode.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethods != null) - { - hashCode = (hashCode * 59) + this.PayoutMethods.GetHashCode(); - } - if (this.PrincipalBusinessAddress != null) - { - hashCode = (hashCode * 59) + this.PrincipalBusinessAddress.GetHashCode(); - } - if (this.StoreDetails != null) - { - hashCode = (hashCode * 59) + this.StoreDetails.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderPayoutNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderPayoutNotification.cs deleted file mode 100644 index ca7897be6..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderPayoutNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderPayoutNotification - /// - [DataContract(Name = "AccountHolderPayoutNotification")] - public partial class AccountHolderPayoutNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderPayoutNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountHolderPayoutNotification(AccountHolderPayoutNotificationContent content = default(AccountHolderPayoutNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public AccountHolderPayoutNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderPayoutNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderPayoutNotification); - } - - /// - /// Returns true if AccountHolderPayoutNotification instances are equal - /// - /// Instance of AccountHolderPayoutNotification to be compared - /// Boolean - public bool Equals(AccountHolderPayoutNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderPayoutNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderPayoutNotificationContent.cs deleted file mode 100644 index d625b33da..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderPayoutNotificationContent.cs +++ /dev/null @@ -1,451 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderPayoutNotificationContent - /// - [DataContract(Name = "AccountHolderPayoutNotificationContent")] - public partial class AccountHolderPayoutNotificationContent : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account from which the payout was made.. - /// The code of the Account Holder to which the payout was made.. - /// The payout amounts (per currency).. - /// bankAccountDetail. - /// A description of the payout.. - /// estimatedArrivalDate. - /// Invalid fields list.. - /// The merchant reference.. - /// The PSP reference of the original payout.. - /// The country code of the bank from which the payout was initiated.. - /// The account number of the bank from which the payout was initiated.. - /// The balance account id to which payment was made. - /// The name of the bank the payout from which the payout was initiated.. - /// The branch code of the bank from which the payout was initiated.. - /// The unique payout identifier.. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.. - /// status. - public AccountHolderPayoutNotificationContent(string accountCode = default(string), string accountHolderCode = default(string), List amounts = default(List), BankAccountDetail bankAccountDetail = default(BankAccountDetail), string description = default(string), LocalDate estimatedArrivalDate = default(LocalDate), List invalidFields = default(List), string merchantReference = default(string), string originalPspReference = default(string), string payoutAccountCountry = default(string), string payoutAccountNumber = default(string), string payoutBalanceAccountId = default(string), string payoutBankName = default(string), string payoutBranchCode = default(string), long? payoutReference = default(long?), PayoutSpeedEnum? payoutSpeed = default(PayoutSpeedEnum?), OperationStatus status = default(OperationStatus)) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - this.Amounts = amounts; - this.BankAccountDetail = bankAccountDetail; - this.Description = description; - this.EstimatedArrivalDate = estimatedArrivalDate; - this.InvalidFields = invalidFields; - this.MerchantReference = merchantReference; - this.OriginalPspReference = originalPspReference; - this.PayoutAccountCountry = payoutAccountCountry; - this.PayoutAccountNumber = payoutAccountNumber; - this.PayoutBalanceAccountId = payoutBalanceAccountId; - this.PayoutBankName = payoutBankName; - this.PayoutBranchCode = payoutBranchCode; - this.PayoutReference = payoutReference; - this.PayoutSpeed = payoutSpeed; - this.Status = status; - } - - /// - /// The code of the account from which the payout was made. - /// - /// The code of the account from which the payout was made. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the Account Holder to which the payout was made. - /// - /// The code of the Account Holder to which the payout was made. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The payout amounts (per currency). - /// - /// The payout amounts (per currency). - [DataMember(Name = "amounts", EmitDefaultValue = false)] - public List Amounts { get; set; } - - /// - /// Gets or Sets BankAccountDetail - /// - [DataMember(Name = "bankAccountDetail", EmitDefaultValue = false)] - public BankAccountDetail BankAccountDetail { get; set; } - - /// - /// A description of the payout. - /// - /// A description of the payout. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Gets or Sets EstimatedArrivalDate - /// - [DataMember(Name = "estimatedArrivalDate", EmitDefaultValue = false)] - public LocalDate EstimatedArrivalDate { get; set; } - - /// - /// Invalid fields list. - /// - /// Invalid fields list. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The merchant reference. - /// - /// The merchant reference. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The PSP reference of the original payout. - /// - /// The PSP reference of the original payout. - [DataMember(Name = "originalPspReference", EmitDefaultValue = false)] - public string OriginalPspReference { get; set; } - - /// - /// The country code of the bank from which the payout was initiated. - /// - /// The country code of the bank from which the payout was initiated. - [DataMember(Name = "payoutAccountCountry", EmitDefaultValue = false)] - public string PayoutAccountCountry { get; set; } - - /// - /// The account number of the bank from which the payout was initiated. - /// - /// The account number of the bank from which the payout was initiated. - [DataMember(Name = "payoutAccountNumber", EmitDefaultValue = false)] - public string PayoutAccountNumber { get; set; } - - /// - /// The balance account id to which payment was made - /// - /// The balance account id to which payment was made - [DataMember(Name = "payoutBalanceAccountId", EmitDefaultValue = false)] - public string PayoutBalanceAccountId { get; set; } - - /// - /// The name of the bank the payout from which the payout was initiated. - /// - /// The name of the bank the payout from which the payout was initiated. - [DataMember(Name = "payoutBankName", EmitDefaultValue = false)] - public string PayoutBankName { get; set; } - - /// - /// The branch code of the bank from which the payout was initiated. - /// - /// The branch code of the bank from which the payout was initiated. - [DataMember(Name = "payoutBranchCode", EmitDefaultValue = false)] - public string PayoutBranchCode { get; set; } - - /// - /// The unique payout identifier. - /// - /// The unique payout identifier. - [DataMember(Name = "payoutReference", EmitDefaultValue = false)] - public long? PayoutReference { get; set; } - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = false)] - public OperationStatus Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderPayoutNotificationContent {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" Amounts: ").Append(Amounts).Append("\n"); - sb.Append(" BankAccountDetail: ").Append(BankAccountDetail).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" EstimatedArrivalDate: ").Append(EstimatedArrivalDate).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" OriginalPspReference: ").Append(OriginalPspReference).Append("\n"); - sb.Append(" PayoutAccountCountry: ").Append(PayoutAccountCountry).Append("\n"); - sb.Append(" PayoutAccountNumber: ").Append(PayoutAccountNumber).Append("\n"); - sb.Append(" PayoutBalanceAccountId: ").Append(PayoutBalanceAccountId).Append("\n"); - sb.Append(" PayoutBankName: ").Append(PayoutBankName).Append("\n"); - sb.Append(" PayoutBranchCode: ").Append(PayoutBranchCode).Append("\n"); - sb.Append(" PayoutReference: ").Append(PayoutReference).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderPayoutNotificationContent); - } - - /// - /// Returns true if AccountHolderPayoutNotificationContent instances are equal - /// - /// Instance of AccountHolderPayoutNotificationContent to be compared - /// Boolean - public bool Equals(AccountHolderPayoutNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.Amounts == input.Amounts || - this.Amounts != null && - input.Amounts != null && - this.Amounts.SequenceEqual(input.Amounts) - ) && - ( - this.BankAccountDetail == input.BankAccountDetail || - (this.BankAccountDetail != null && - this.BankAccountDetail.Equals(input.BankAccountDetail)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.EstimatedArrivalDate == input.EstimatedArrivalDate || - (this.EstimatedArrivalDate != null && - this.EstimatedArrivalDate.Equals(input.EstimatedArrivalDate)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.OriginalPspReference == input.OriginalPspReference || - (this.OriginalPspReference != null && - this.OriginalPspReference.Equals(input.OriginalPspReference)) - ) && - ( - this.PayoutAccountCountry == input.PayoutAccountCountry || - (this.PayoutAccountCountry != null && - this.PayoutAccountCountry.Equals(input.PayoutAccountCountry)) - ) && - ( - this.PayoutAccountNumber == input.PayoutAccountNumber || - (this.PayoutAccountNumber != null && - this.PayoutAccountNumber.Equals(input.PayoutAccountNumber)) - ) && - ( - this.PayoutBalanceAccountId == input.PayoutBalanceAccountId || - (this.PayoutBalanceAccountId != null && - this.PayoutBalanceAccountId.Equals(input.PayoutBalanceAccountId)) - ) && - ( - this.PayoutBankName == input.PayoutBankName || - (this.PayoutBankName != null && - this.PayoutBankName.Equals(input.PayoutBankName)) - ) && - ( - this.PayoutBranchCode == input.PayoutBranchCode || - (this.PayoutBranchCode != null && - this.PayoutBranchCode.Equals(input.PayoutBranchCode)) - ) && - ( - this.PayoutReference == input.PayoutReference || - this.PayoutReference.Equals(input.PayoutReference) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.Amounts != null) - { - hashCode = (hashCode * 59) + this.Amounts.GetHashCode(); - } - if (this.BankAccountDetail != null) - { - hashCode = (hashCode * 59) + this.BankAccountDetail.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.EstimatedArrivalDate != null) - { - hashCode = (hashCode * 59) + this.EstimatedArrivalDate.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.OriginalPspReference != null) - { - hashCode = (hashCode * 59) + this.OriginalPspReference.GetHashCode(); - } - if (this.PayoutAccountCountry != null) - { - hashCode = (hashCode * 59) + this.PayoutAccountCountry.GetHashCode(); - } - if (this.PayoutAccountNumber != null) - { - hashCode = (hashCode * 59) + this.PayoutAccountNumber.GetHashCode(); - } - if (this.PayoutBalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.PayoutBalanceAccountId.GetHashCode(); - } - if (this.PayoutBankName != null) - { - hashCode = (hashCode * 59) + this.PayoutBankName.GetHashCode(); - } - if (this.PayoutBranchCode != null) - { - hashCode = (hashCode * 59) + this.PayoutBranchCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutReference.GetHashCode(); - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderStatus.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderStatus.cs deleted file mode 100644 index 3a712b24c..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderStatus.cs +++ /dev/null @@ -1,238 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderStatus - /// - [DataContract(Name = "AccountHolderStatus")] - public partial class AccountHolderStatus : IEquatable, IValidatableObject - { - /// - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: Suspended - /// - [EnumMember(Value = "Suspended")] - Suspended = 4 - - } - - - /// - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderStatus() { } - /// - /// Initializes a new instance of the class. - /// - /// A list of events scheduled for the account holder.. - /// payoutState. - /// processingState. - /// The status of the account holder. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. (required). - /// The reason why the status was assigned to the account holder.. - public AccountHolderStatus(List events = default(List), AccountPayoutState payoutState = default(AccountPayoutState), AccountProcessingState processingState = default(AccountProcessingState), StatusEnum status = default(StatusEnum), string statusReason = default(string)) - { - this.Status = status; - this.Events = events; - this.PayoutState = payoutState; - this.ProcessingState = processingState; - this.StatusReason = statusReason; - } - - /// - /// A list of events scheduled for the account holder. - /// - /// A list of events scheduled for the account holder. - [DataMember(Name = "events", EmitDefaultValue = false)] - public List Events { get; set; } - - /// - /// Gets or Sets PayoutState - /// - [DataMember(Name = "payoutState", EmitDefaultValue = false)] - public AccountPayoutState PayoutState { get; set; } - - /// - /// Gets or Sets ProcessingState - /// - [DataMember(Name = "processingState", EmitDefaultValue = false)] - public AccountProcessingState ProcessingState { get; set; } - - /// - /// The reason why the status was assigned to the account holder. - /// - /// The reason why the status was assigned to the account holder. - [DataMember(Name = "statusReason", EmitDefaultValue = false)] - public string StatusReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderStatus {\n"); - sb.Append(" Events: ").Append(Events).Append("\n"); - sb.Append(" PayoutState: ").Append(PayoutState).Append("\n"); - sb.Append(" ProcessingState: ").Append(ProcessingState).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" StatusReason: ").Append(StatusReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderStatus); - } - - /// - /// Returns true if AccountHolderStatus instances are equal - /// - /// Instance of AccountHolderStatus to be compared - /// Boolean - public bool Equals(AccountHolderStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Events == input.Events || - this.Events != null && - input.Events != null && - this.Events.SequenceEqual(input.Events) - ) && - ( - this.PayoutState == input.PayoutState || - (this.PayoutState != null && - this.PayoutState.Equals(input.PayoutState)) - ) && - ( - this.ProcessingState == input.ProcessingState || - (this.ProcessingState != null && - this.ProcessingState.Equals(input.ProcessingState)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.StatusReason == input.StatusReason || - (this.StatusReason != null && - this.StatusReason.Equals(input.StatusReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Events != null) - { - hashCode = (hashCode * 59) + this.Events.GetHashCode(); - } - if (this.PayoutState != null) - { - hashCode = (hashCode * 59) + this.PayoutState.GetHashCode(); - } - if (this.ProcessingState != null) - { - hashCode = (hashCode * 59) + this.ProcessingState.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.StatusReason != null) - { - hashCode = (hashCode * 59) + this.StatusReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderStatusChangeNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderStatusChangeNotification.cs deleted file mode 100644 index 31305372a..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderStatusChangeNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderStatusChangeNotification - /// - [DataContract(Name = "AccountHolderStatusChangeNotification")] - public partial class AccountHolderStatusChangeNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderStatusChangeNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountHolderStatusChangeNotification(AccountHolderStatusChangeNotificationContent content = default(AccountHolderStatusChangeNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public AccountHolderStatusChangeNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderStatusChangeNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderStatusChangeNotification); - } - - /// - /// Returns true if AccountHolderStatusChangeNotification instances are equal - /// - /// Instance of AccountHolderStatusChangeNotification to be compared - /// Boolean - public bool Equals(AccountHolderStatusChangeNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderStatusChangeNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderStatusChangeNotificationContent.cs deleted file mode 100644 index f00705975..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderStatusChangeNotificationContent.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderStatusChangeNotificationContent - /// - [DataContract(Name = "AccountHolderStatusChangeNotificationContent")] - public partial class AccountHolderStatusChangeNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderStatusChangeNotificationContent() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder. (required). - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation.. - /// newStatus. - /// oldStatus. - /// The reason for the status change.. - public AccountHolderStatusChangeNotificationContent(string accountHolderCode = default(string), List invalidFields = default(List), AccountHolderStatus newStatus = default(AccountHolderStatus), AccountHolderStatus oldStatus = default(AccountHolderStatus), string reason = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.InvalidFields = invalidFields; - this.NewStatus = newStatus; - this.OldStatus = oldStatus; - this.Reason = reason; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation. - /// - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// Gets or Sets NewStatus - /// - [DataMember(Name = "newStatus", EmitDefaultValue = false)] - public AccountHolderStatus NewStatus { get; set; } - - /// - /// Gets or Sets OldStatus - /// - [DataMember(Name = "oldStatus", EmitDefaultValue = false)] - public AccountHolderStatus OldStatus { get; set; } - - /// - /// The reason for the status change. - /// - /// The reason for the status change. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderStatusChangeNotificationContent {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" NewStatus: ").Append(NewStatus).Append("\n"); - sb.Append(" OldStatus: ").Append(OldStatus).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderStatusChangeNotificationContent); - } - - /// - /// Returns true if AccountHolderStatusChangeNotificationContent instances are equal - /// - /// Instance of AccountHolderStatusChangeNotificationContent to be compared - /// Boolean - public bool Equals(AccountHolderStatusChangeNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.NewStatus == input.NewStatus || - (this.NewStatus != null && - this.NewStatus.Equals(input.NewStatus)) - ) && - ( - this.OldStatus == input.OldStatus || - (this.OldStatus != null && - this.OldStatus.Equals(input.OldStatus)) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.NewStatus != null) - { - hashCode = (hashCode * 59) + this.NewStatus.GetHashCode(); - } - if (this.OldStatus != null) - { - hashCode = (hashCode * 59) + this.OldStatus.GetHashCode(); - } - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderStoreStatusChangeNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderStoreStatusChangeNotification.cs deleted file mode 100644 index 143d5153f..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderStoreStatusChangeNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderStoreStatusChangeNotification - /// - [DataContract(Name = "AccountHolderStoreStatusChangeNotification")] - public partial class AccountHolderStoreStatusChangeNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderStoreStatusChangeNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountHolderStoreStatusChangeNotification(AccountHolderStoreStatusChangeNotificationContent content = default(AccountHolderStoreStatusChangeNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public AccountHolderStoreStatusChangeNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderStoreStatusChangeNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderStoreStatusChangeNotification); - } - - /// - /// Returns true if AccountHolderStoreStatusChangeNotification instances are equal - /// - /// Instance of AccountHolderStoreStatusChangeNotification to be compared - /// Boolean - public bool Equals(AccountHolderStoreStatusChangeNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderStoreStatusChangeNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderStoreStatusChangeNotificationContent.cs deleted file mode 100644 index 45a728342..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderStoreStatusChangeNotificationContent.cs +++ /dev/null @@ -1,319 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderStoreStatusChangeNotificationContent - /// - [DataContract(Name = "AccountHolderStoreStatusChangeNotificationContent")] - public partial class AccountHolderStoreStatusChangeNotificationContent : IEquatable, IValidatableObject - { - /// - /// The new status of the account holder. - /// - /// The new status of the account holder. - [JsonConverter(typeof(StringEnumConverter))] - public enum NewStatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum InactiveWithModifications for value: InactiveWithModifications - /// - [EnumMember(Value = "InactiveWithModifications")] - InactiveWithModifications = 4, - - /// - /// Enum Pending for value: Pending - /// - [EnumMember(Value = "Pending")] - Pending = 5 - - } - - - /// - /// The new status of the account holder. - /// - /// The new status of the account holder. - [DataMember(Name = "newStatus", IsRequired = false, EmitDefaultValue = false)] - public NewStatusEnum NewStatus { get; set; } - /// - /// The former status of the account holder. - /// - /// The former status of the account holder. - [JsonConverter(typeof(StringEnumConverter))] - public enum OldStatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum InactiveWithModifications for value: InactiveWithModifications - /// - [EnumMember(Value = "InactiveWithModifications")] - InactiveWithModifications = 4, - - /// - /// Enum Pending for value: Pending - /// - [EnumMember(Value = "Pending")] - Pending = 5 - - } - - - /// - /// The former status of the account holder. - /// - /// The former status of the account holder. - [DataMember(Name = "oldStatus", IsRequired = false, EmitDefaultValue = false)] - public OldStatusEnum OldStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderStoreStatusChangeNotificationContent() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder. (required). - /// In case the store status has not been updated, contains fields that did not pass the validation.. - /// The new status of the account holder. (required). - /// The former status of the account holder. (required). - /// The reason for the status change.. - /// Alphanumeric identifier of the store. (required). - /// Store store reference. (required). - public AccountHolderStoreStatusChangeNotificationContent(string accountHolderCode = default(string), List invalidFields = default(List), NewStatusEnum newStatus = default(NewStatusEnum), OldStatusEnum oldStatus = default(OldStatusEnum), string reason = default(string), string store = default(string), string storeReference = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.NewStatus = newStatus; - this.OldStatus = oldStatus; - this.Store = store; - this.StoreReference = storeReference; - this.InvalidFields = invalidFields; - this.Reason = reason; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// In case the store status has not been updated, contains fields that did not pass the validation. - /// - /// In case the store status has not been updated, contains fields that did not pass the validation. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reason for the status change. - /// - /// The reason for the status change. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Alphanumeric identifier of the store. - /// - /// Alphanumeric identifier of the store. - [DataMember(Name = "store", IsRequired = false, EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Store store reference. - /// - /// Store store reference. - [DataMember(Name = "storeReference", IsRequired = false, EmitDefaultValue = false)] - public string StoreReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderStoreStatusChangeNotificationContent {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" NewStatus: ").Append(NewStatus).Append("\n"); - sb.Append(" OldStatus: ").Append(OldStatus).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StoreReference: ").Append(StoreReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderStoreStatusChangeNotificationContent); - } - - /// - /// Returns true if AccountHolderStoreStatusChangeNotificationContent instances are equal - /// - /// Instance of AccountHolderStoreStatusChangeNotificationContent to be compared - /// Boolean - public bool Equals(AccountHolderStoreStatusChangeNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.NewStatus == input.NewStatus || - this.NewStatus.Equals(input.NewStatus) - ) && - ( - this.OldStatus == input.OldStatus || - this.OldStatus.Equals(input.OldStatus) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreReference == input.StoreReference || - (this.StoreReference != null && - this.StoreReference.Equals(input.StoreReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NewStatus.GetHashCode(); - hashCode = (hashCode * 59) + this.OldStatus.GetHashCode(); - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.StoreReference != null) - { - hashCode = (hashCode * 59) + this.StoreReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderUpcomingDeadlineNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderUpcomingDeadlineNotification.cs deleted file mode 100644 index e585137e9..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderUpcomingDeadlineNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderUpcomingDeadlineNotification - /// - [DataContract(Name = "AccountHolderUpcomingDeadlineNotification")] - public partial class AccountHolderUpcomingDeadlineNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderUpcomingDeadlineNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountHolderUpcomingDeadlineNotification(AccountHolderUpcomingDeadlineNotificationContent content = default(AccountHolderUpcomingDeadlineNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public AccountHolderUpcomingDeadlineNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderUpcomingDeadlineNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderUpcomingDeadlineNotification); - } - - /// - /// Returns true if AccountHolderUpcomingDeadlineNotification instances are equal - /// - /// Instance of AccountHolderUpcomingDeadlineNotification to be compared - /// Boolean - public bool Equals(AccountHolderUpcomingDeadlineNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderUpcomingDeadlineNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderUpcomingDeadlineNotificationContent.cs deleted file mode 100644 index 2116cac50..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderUpcomingDeadlineNotificationContent.cs +++ /dev/null @@ -1,335 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderUpcomingDeadlineNotificationContent - /// - [DataContract(Name = "AccountHolderUpcomingDeadlineNotificationContent")] - public partial class AccountHolderUpcomingDeadlineNotificationContent : IEquatable, IValidatableObject - { - /// - /// The event name that will be trigger if no action is taken. - /// - /// The event name that will be trigger if no action is taken. - [JsonConverter(typeof(StringEnumConverter))] - public enum EventEnum - { - /// - /// Enum AccessPii for value: AccessPii - /// - [EnumMember(Value = "AccessPii")] - AccessPii = 1, - - /// - /// Enum ApiTierUpdate for value: ApiTierUpdate - /// - [EnumMember(Value = "ApiTierUpdate")] - ApiTierUpdate = 2, - - /// - /// Enum CloseAccount for value: CloseAccount - /// - [EnumMember(Value = "CloseAccount")] - CloseAccount = 3, - - /// - /// Enum CloseStores for value: CloseStores - /// - [EnumMember(Value = "CloseStores")] - CloseStores = 4, - - /// - /// Enum DeleteBalanceAccounts for value: DeleteBalanceAccounts - /// - [EnumMember(Value = "DeleteBalanceAccounts")] - DeleteBalanceAccounts = 5, - - /// - /// Enum DeleteBankAccounts for value: DeleteBankAccounts - /// - [EnumMember(Value = "DeleteBankAccounts")] - DeleteBankAccounts = 6, - - /// - /// Enum DeleteLegalArrangements for value: DeleteLegalArrangements - /// - [EnumMember(Value = "DeleteLegalArrangements")] - DeleteLegalArrangements = 7, - - /// - /// Enum DeleteLiableBankAccount for value: DeleteLiableBankAccount - /// - [EnumMember(Value = "DeleteLiableBankAccount")] - DeleteLiableBankAccount = 8, - - /// - /// Enum DeletePayoutMethods for value: DeletePayoutMethods - /// - [EnumMember(Value = "DeletePayoutMethods")] - DeletePayoutMethods = 9, - - /// - /// Enum DeleteShareholders for value: DeleteShareholders - /// - [EnumMember(Value = "DeleteShareholders")] - DeleteShareholders = 10, - - /// - /// Enum DeleteSignatories for value: DeleteSignatories - /// - [EnumMember(Value = "DeleteSignatories")] - DeleteSignatories = 11, - - /// - /// Enum InactivateAccount for value: InactivateAccount - /// - [EnumMember(Value = "InactivateAccount")] - InactivateAccount = 12, - - /// - /// Enum KYCDeadlineExtension for value: KYCDeadlineExtension - /// - [EnumMember(Value = "KYCDeadlineExtension")] - KYCDeadlineExtension = 13, - - /// - /// Enum MigrateAccountToBP for value: MigrateAccountToBP - /// - [EnumMember(Value = "MigrateAccountToBP")] - MigrateAccountToBP = 14, - - /// - /// Enum RecalculateAccountStatusAndProcessingTier for value: RecalculateAccountStatusAndProcessingTier - /// - [EnumMember(Value = "RecalculateAccountStatusAndProcessingTier")] - RecalculateAccountStatusAndProcessingTier = 15, - - /// - /// Enum RefundNotPaidOutTransfers for value: RefundNotPaidOutTransfers - /// - [EnumMember(Value = "RefundNotPaidOutTransfers")] - RefundNotPaidOutTransfers = 16, - - /// - /// Enum ResolveEvents for value: ResolveEvents - /// - [EnumMember(Value = "ResolveEvents")] - ResolveEvents = 17, - - /// - /// Enum SaveAccountHolder for value: SaveAccountHolder - /// - [EnumMember(Value = "SaveAccountHolder")] - SaveAccountHolder = 18, - - /// - /// Enum SaveKYCCheckStatus for value: SaveKYCCheckStatus - /// - [EnumMember(Value = "SaveKYCCheckStatus")] - SaveKYCCheckStatus = 19, - - /// - /// Enum SavePEPChecks for value: SavePEPChecks - /// - [EnumMember(Value = "SavePEPChecks")] - SavePEPChecks = 20, - - /// - /// Enum SuspendAccount for value: SuspendAccount - /// - [EnumMember(Value = "SuspendAccount")] - SuspendAccount = 21, - - /// - /// Enum UnSuspendAccount for value: UnSuspendAccount - /// - [EnumMember(Value = "UnSuspendAccount")] - UnSuspendAccount = 22, - - /// - /// Enum UpdateAccountHolderState for value: UpdateAccountHolderState - /// - [EnumMember(Value = "UpdateAccountHolderState")] - UpdateAccountHolderState = 23, - - /// - /// Enum Verification for value: Verification - /// - [EnumMember(Value = "Verification")] - Verification = 24 - - } - - - /// - /// The event name that will be trigger if no action is taken. - /// - /// The event name that will be trigger if no action is taken. - [DataMember(Name = "event", EmitDefaultValue = false)] - public EventEnum? Event { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder whom the event refers to.. - /// The event name that will be trigger if no action is taken.. - /// The execution date scheduled for the event.. - /// The reason that leads to scheduling of the event.. - public AccountHolderUpcomingDeadlineNotificationContent(string accountHolderCode = default(string), EventEnum? _event = default(EventEnum?), DateTime executionDate = default(DateTime), string reason = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.Event = _event; - this.ExecutionDate = executionDate; - this.Reason = reason; - } - - /// - /// The code of the account holder whom the event refers to. - /// - /// The code of the account holder whom the event refers to. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The execution date scheduled for the event. - /// - /// The execution date scheduled for the event. - [DataMember(Name = "executionDate", EmitDefaultValue = false)] - public DateTime ExecutionDate { get; set; } - - /// - /// The reason that leads to scheduling of the event. - /// - /// The reason that leads to scheduling of the event. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderUpcomingDeadlineNotificationContent {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" Event: ").Append(Event).Append("\n"); - sb.Append(" ExecutionDate: ").Append(ExecutionDate).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderUpcomingDeadlineNotificationContent); - } - - /// - /// Returns true if AccountHolderUpcomingDeadlineNotificationContent instances are equal - /// - /// Instance of AccountHolderUpcomingDeadlineNotificationContent to be compared - /// Boolean - public bool Equals(AccountHolderUpcomingDeadlineNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.Event == input.Event || - this.Event.Equals(input.Event) - ) && - ( - this.ExecutionDate == input.ExecutionDate || - (this.ExecutionDate != null && - this.ExecutionDate.Equals(input.ExecutionDate)) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Event.GetHashCode(); - if (this.ExecutionDate != null) - { - hashCode = (hashCode * 59) + this.ExecutionDate.GetHashCode(); - } - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderUpdateNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderUpdateNotification.cs deleted file mode 100644 index 586431923..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderUpdateNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderUpdateNotification - /// - [DataContract(Name = "AccountHolderUpdateNotification")] - public partial class AccountHolderUpdateNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderUpdateNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountHolderUpdateNotification(UpdateAccountHolderResponse content = default(UpdateAccountHolderResponse), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public UpdateAccountHolderResponse Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderUpdateNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderUpdateNotification); - } - - /// - /// Returns true if AccountHolderUpdateNotification instances are equal - /// - /// Instance of AccountHolderUpdateNotification to be compared - /// Boolean - public bool Equals(AccountHolderUpdateNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderVerificationNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderVerificationNotification.cs deleted file mode 100644 index 444654b29..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderVerificationNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderVerificationNotification - /// - [DataContract(Name = "AccountHolderVerificationNotification")] - public partial class AccountHolderVerificationNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountHolderVerificationNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountHolderVerificationNotification(AccountHolderVerificationNotificationContent content = default(AccountHolderVerificationNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public AccountHolderVerificationNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderVerificationNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderVerificationNotification); - } - - /// - /// Returns true if AccountHolderVerificationNotification instances are equal - /// - /// Instance of AccountHolderVerificationNotification to be compared - /// Boolean - public bool Equals(AccountHolderVerificationNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountHolderVerificationNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/AccountHolderVerificationNotificationContent.cs deleted file mode 100644 index b33ae9809..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountHolderVerificationNotificationContent.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountHolderVerificationNotificationContent - /// - [DataContract(Name = "AccountHolderVerificationNotificationContent")] - public partial class AccountHolderVerificationNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder.. - /// kycCheckStatusData. - /// The unique ID of the legal arrangement that has been verified.. - /// The unique ID of the legal arrangement entity that has been verified.. - /// The unique code of the payout method that has been verified.. - /// The code of the shareholder that has been verified.. - /// The code of the signatory that has been verified.. - public AccountHolderVerificationNotificationContent(string accountHolderCode = default(string), KYCCheckStatusData kycCheckStatusData = default(KYCCheckStatusData), string legalArrangementCode = default(string), string legalArrangementEntityCode = default(string), string payoutMethodCode = default(string), string shareholderCode = default(string), string signatoryCode = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.KycCheckStatusData = kycCheckStatusData; - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntityCode = legalArrangementEntityCode; - this.PayoutMethodCode = payoutMethodCode; - this.ShareholderCode = shareholderCode; - this.SignatoryCode = signatoryCode; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets KycCheckStatusData - /// - [DataMember(Name = "kycCheckStatusData", EmitDefaultValue = false)] - public KYCCheckStatusData KycCheckStatusData { get; set; } - - /// - /// The unique ID of the legal arrangement that has been verified. - /// - /// The unique ID of the legal arrangement that has been verified. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// The unique ID of the legal arrangement entity that has been verified. - /// - /// The unique ID of the legal arrangement entity that has been verified. - [DataMember(Name = "legalArrangementEntityCode", EmitDefaultValue = false)] - public string LegalArrangementEntityCode { get; set; } - - /// - /// The unique code of the payout method that has been verified. - /// - /// The unique code of the payout method that has been verified. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// The code of the shareholder that has been verified. - /// - /// The code of the shareholder that has been verified. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// The code of the signatory that has been verified. - /// - /// The code of the signatory that has been verified. - [DataMember(Name = "signatoryCode", EmitDefaultValue = false)] - public string SignatoryCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountHolderVerificationNotificationContent {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" KycCheckStatusData: ").Append(KycCheckStatusData).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntityCode: ").Append(LegalArrangementEntityCode).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append(" SignatoryCode: ").Append(SignatoryCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountHolderVerificationNotificationContent); - } - - /// - /// Returns true if AccountHolderVerificationNotificationContent instances are equal - /// - /// Instance of AccountHolderVerificationNotificationContent to be compared - /// Boolean - public bool Equals(AccountHolderVerificationNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.KycCheckStatusData == input.KycCheckStatusData || - (this.KycCheckStatusData != null && - this.KycCheckStatusData.Equals(input.KycCheckStatusData)) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntityCode == input.LegalArrangementEntityCode || - (this.LegalArrangementEntityCode != null && - this.LegalArrangementEntityCode.Equals(input.LegalArrangementEntityCode)) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ) && - ( - this.SignatoryCode == input.SignatoryCode || - (this.SignatoryCode != null && - this.SignatoryCode.Equals(input.SignatoryCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.KycCheckStatusData != null) - { - hashCode = (hashCode * 59) + this.KycCheckStatusData.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCode.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - if (this.SignatoryCode != null) - { - hashCode = (hashCode * 59) + this.SignatoryCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountPayoutState.cs b/Adyen/Model/PlatformsWebhooks/AccountPayoutState.cs deleted file mode 100644 index 7134d41b0..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountPayoutState.cs +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountPayoutState - /// - [DataContract(Name = "AccountPayoutState")] - public partial class AccountPayoutState : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts.. - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why.. - /// Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors.. - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen.. - /// payoutLimit. - /// The payout tier that the account holder occupies.. - public AccountPayoutState(bool? allowPayout = default(bool?), string disableReason = default(string), bool? disabled = default(bool?), string notAllowedReason = default(string), Amount payoutLimit = default(Amount), int? tierNumber = default(int?)) - { - this.AllowPayout = allowPayout; - this.DisableReason = disableReason; - this.Disabled = disabled; - this.NotAllowedReason = notAllowedReason; - this.PayoutLimit = payoutLimit; - this.TierNumber = tierNumber; - } - - /// - /// Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts. - /// - /// Indicates whether payouts are allowed. This field is the overarching payout status, and is the aggregate of multiple conditions (e.g., KYC status, disabled flag, etc). If this field is false, no payouts will be permitted for any of the account holder's accounts. If this field is true, payouts will be permitted for any of the account holder's accounts. - [DataMember(Name = "allowPayout", EmitDefaultValue = false)] - public bool? AllowPayout { get; set; } - - /// - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why. - /// - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by the platform). If the `disabled` field is true, this field can be used to explain why. - [DataMember(Name = "disableReason", EmitDefaultValue = false)] - public string DisableReason { get; set; } - - /// - /// Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors. - /// - /// Indicates whether payouts have been disabled (by the platform) for all of the account holder's accounts. A platform may enable and disable this field at their discretion. If this field is true, `allowPayout` will be false and no payouts will be permitted for any of the account holder's accounts. If this field is false, `allowPayout` may or may not be enabled, depending on other factors. - [DataMember(Name = "disabled", EmitDefaultValue = false)] - public bool? Disabled { get; set; } - - /// - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen. - /// - /// The reason why payouts (to all of the account holder's accounts) have been disabled (by Adyen). If payouts have been disabled by Adyen, this field will explain why. If this field is blank, payouts have not been disabled by Adyen. - [DataMember(Name = "notAllowedReason", EmitDefaultValue = false)] - public string NotAllowedReason { get; set; } - - /// - /// Gets or Sets PayoutLimit - /// - [DataMember(Name = "payoutLimit", EmitDefaultValue = false)] - public Amount PayoutLimit { get; set; } - - /// - /// The payout tier that the account holder occupies. - /// - /// The payout tier that the account holder occupies. - [DataMember(Name = "tierNumber", EmitDefaultValue = false)] - public int? TierNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountPayoutState {\n"); - sb.Append(" AllowPayout: ").Append(AllowPayout).Append("\n"); - sb.Append(" DisableReason: ").Append(DisableReason).Append("\n"); - sb.Append(" Disabled: ").Append(Disabled).Append("\n"); - sb.Append(" NotAllowedReason: ").Append(NotAllowedReason).Append("\n"); - sb.Append(" PayoutLimit: ").Append(PayoutLimit).Append("\n"); - sb.Append(" TierNumber: ").Append(TierNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountPayoutState); - } - - /// - /// Returns true if AccountPayoutState instances are equal - /// - /// Instance of AccountPayoutState to be compared - /// Boolean - public bool Equals(AccountPayoutState input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowPayout == input.AllowPayout || - this.AllowPayout.Equals(input.AllowPayout) - ) && - ( - this.DisableReason == input.DisableReason || - (this.DisableReason != null && - this.DisableReason.Equals(input.DisableReason)) - ) && - ( - this.Disabled == input.Disabled || - this.Disabled.Equals(input.Disabled) - ) && - ( - this.NotAllowedReason == input.NotAllowedReason || - (this.NotAllowedReason != null && - this.NotAllowedReason.Equals(input.NotAllowedReason)) - ) && - ( - this.PayoutLimit == input.PayoutLimit || - (this.PayoutLimit != null && - this.PayoutLimit.Equals(input.PayoutLimit)) - ) && - ( - this.TierNumber == input.TierNumber || - this.TierNumber.Equals(input.TierNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AllowPayout.GetHashCode(); - if (this.DisableReason != null) - { - hashCode = (hashCode * 59) + this.DisableReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Disabled.GetHashCode(); - if (this.NotAllowedReason != null) - { - hashCode = (hashCode * 59) + this.NotAllowedReason.GetHashCode(); - } - if (this.PayoutLimit != null) - { - hashCode = (hashCode * 59) + this.PayoutLimit.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TierNumber.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountProcessingState.cs b/Adyen/Model/PlatformsWebhooks/AccountProcessingState.cs deleted file mode 100644 index cfd888848..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountProcessingState.cs +++ /dev/null @@ -1,195 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountProcessingState - /// - [DataContract(Name = "AccountProcessingState")] - public partial class AccountProcessingState : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The reason why processing has been disabled.. - /// Indicates whether the processing of payments is allowed.. - /// processedFrom. - /// processedTo. - /// The processing tier that the account holder occupies.. - public AccountProcessingState(string disableReason = default(string), bool? disabled = default(bool?), Amount processedFrom = default(Amount), Amount processedTo = default(Amount), int? tierNumber = default(int?)) - { - this.DisableReason = disableReason; - this.Disabled = disabled; - this.ProcessedFrom = processedFrom; - this.ProcessedTo = processedTo; - this.TierNumber = tierNumber; - } - - /// - /// The reason why processing has been disabled. - /// - /// The reason why processing has been disabled. - [DataMember(Name = "disableReason", EmitDefaultValue = false)] - public string DisableReason { get; set; } - - /// - /// Indicates whether the processing of payments is allowed. - /// - /// Indicates whether the processing of payments is allowed. - [DataMember(Name = "disabled", EmitDefaultValue = false)] - public bool? Disabled { get; set; } - - /// - /// Gets or Sets ProcessedFrom - /// - [DataMember(Name = "processedFrom", EmitDefaultValue = false)] - public Amount ProcessedFrom { get; set; } - - /// - /// Gets or Sets ProcessedTo - /// - [DataMember(Name = "processedTo", EmitDefaultValue = false)] - public Amount ProcessedTo { get; set; } - - /// - /// The processing tier that the account holder occupies. - /// - /// The processing tier that the account holder occupies. - [DataMember(Name = "tierNumber", EmitDefaultValue = false)] - public int? TierNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountProcessingState {\n"); - sb.Append(" DisableReason: ").Append(DisableReason).Append("\n"); - sb.Append(" Disabled: ").Append(Disabled).Append("\n"); - sb.Append(" ProcessedFrom: ").Append(ProcessedFrom).Append("\n"); - sb.Append(" ProcessedTo: ").Append(ProcessedTo).Append("\n"); - sb.Append(" TierNumber: ").Append(TierNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountProcessingState); - } - - /// - /// Returns true if AccountProcessingState instances are equal - /// - /// Instance of AccountProcessingState to be compared - /// Boolean - public bool Equals(AccountProcessingState input) - { - if (input == null) - { - return false; - } - return - ( - this.DisableReason == input.DisableReason || - (this.DisableReason != null && - this.DisableReason.Equals(input.DisableReason)) - ) && - ( - this.Disabled == input.Disabled || - this.Disabled.Equals(input.Disabled) - ) && - ( - this.ProcessedFrom == input.ProcessedFrom || - (this.ProcessedFrom != null && - this.ProcessedFrom.Equals(input.ProcessedFrom)) - ) && - ( - this.ProcessedTo == input.ProcessedTo || - (this.ProcessedTo != null && - this.ProcessedTo.Equals(input.ProcessedTo)) - ) && - ( - this.TierNumber == input.TierNumber || - this.TierNumber.Equals(input.TierNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisableReason != null) - { - hashCode = (hashCode * 59) + this.DisableReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Disabled.GetHashCode(); - if (this.ProcessedFrom != null) - { - hashCode = (hashCode * 59) + this.ProcessedFrom.GetHashCode(); - } - if (this.ProcessedTo != null) - { - hashCode = (hashCode * 59) + this.ProcessedTo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TierNumber.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/AccountUpdateNotification.cs b/Adyen/Model/PlatformsWebhooks/AccountUpdateNotification.cs deleted file mode 100644 index 1692a8ea6..000000000 --- a/Adyen/Model/PlatformsWebhooks/AccountUpdateNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// AccountUpdateNotification - /// - [DataContract(Name = "AccountUpdateNotification")] - public partial class AccountUpdateNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AccountUpdateNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public AccountUpdateNotification(UpdateAccountResponse content = default(UpdateAccountResponse), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public UpdateAccountResponse Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AccountUpdateNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AccountUpdateNotification); - } - - /// - /// Returns true if AccountUpdateNotification instances are equal - /// - /// Instance of AccountUpdateNotification to be compared - /// Boolean - public bool Equals(AccountUpdateNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/Amount.cs b/Adyen/Model/PlatformsWebhooks/Amount.cs deleted file mode 100644 index 1943eb7ad..000000000 --- a/Adyen/Model/PlatformsWebhooks/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/BankAccountDetail.cs b/Adyen/Model/PlatformsWebhooks/BankAccountDetail.cs deleted file mode 100644 index bf4725bfa..000000000 --- a/Adyen/Model/PlatformsWebhooks/BankAccountDetail.cs +++ /dev/null @@ -1,601 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// BankAccountDetail - /// - [DataContract(Name = "BankAccountDetail")] - public partial class BankAccountDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the bank account.. - /// Merchant reference to the bank account.. - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. . - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). . - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31).. - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// If set to true, the bank account is a primary account.. - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements.. - public BankAccountDetail(string accountNumber = default(string), string accountType = default(string), string bankAccountName = default(string), string bankAccountReference = default(string), string bankAccountUUID = default(string), string bankBicSwift = default(string), string bankCity = default(string), string bankCode = default(string), string bankName = default(string), string branchCode = default(string), string checkCode = default(string), string countryCode = default(string), string currencyCode = default(string), string iban = default(string), string ownerCity = default(string), string ownerCountryCode = default(string), string ownerDateOfBirth = default(string), string ownerHouseNumberOrName = default(string), string ownerName = default(string), string ownerNationality = default(string), string ownerPostalCode = default(string), string ownerState = default(string), string ownerStreet = default(string), bool? primaryAccount = default(bool?), string taxId = default(string), string urlForVerification = default(string)) - { - this.AccountNumber = accountNumber; - this.AccountType = accountType; - this.BankAccountName = bankAccountName; - this.BankAccountReference = bankAccountReference; - this.BankAccountUUID = bankAccountUUID; - this.BankBicSwift = bankBicSwift; - this.BankCity = bankCity; - this.BankCode = bankCode; - this.BankName = bankName; - this.BranchCode = branchCode; - this.CheckCode = checkCode; - this.CountryCode = countryCode; - this.CurrencyCode = currencyCode; - this.Iban = iban; - this.OwnerCity = ownerCity; - this.OwnerCountryCode = ownerCountryCode; - this.OwnerDateOfBirth = ownerDateOfBirth; - this.OwnerHouseNumberOrName = ownerHouseNumberOrName; - this.OwnerName = ownerName; - this.OwnerNationality = ownerNationality; - this.OwnerPostalCode = ownerPostalCode; - this.OwnerState = ownerState; - this.OwnerStreet = ownerStreet; - this.PrimaryAccount = primaryAccount; - this.TaxId = taxId; - this.UrlForVerification = urlForVerification; - } - - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank account number (without separators). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "accountNumber", EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The type of bank account. Only applicable to bank accounts held in the USA. The permitted values are: `checking`, `savings`. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public string AccountType { get; set; } - - /// - /// The name of the bank account. - /// - /// The name of the bank account. - [DataMember(Name = "bankAccountName", EmitDefaultValue = false)] - public string BankAccountName { get; set; } - - /// - /// Merchant reference to the bank account. - /// - /// Merchant reference to the bank account. - [DataMember(Name = "bankAccountReference", EmitDefaultValue = false)] - public string BankAccountReference { get; set; } - - /// - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. - /// - /// The unique identifier (UUID) of the Bank Account. >If, during an account holder create or update request, this field is left blank (but other fields provided), a new Bank Account will be created with a procedurally-generated UUID. >If, during an account holder create request, a UUID is provided, the creation of the Bank Account will fail while the creation of the account holder will continue. >If, during an account holder update request, a UUID that is not correlated with an existing Bank Account is provided, the update of the account holder will fail. >If, during an account holder update request, a UUID that is correlated with an existing Bank Account is provided, the existing Bank Account will be updated. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank identifier code. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankBicSwift", EmitDefaultValue = false)] - public string BankBicSwift { get; set; } - - /// - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The city in which the bank branch is located. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankCity", EmitDefaultValue = false)] - public string BankCity { get; set; } - - /// - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The bank code of the banking institution with which the bank account is registered. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankCode", EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The name of the banking institution with which the bank account is held. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "bankName", EmitDefaultValue = false)] - public string BankName { get; set; } - - /// - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The branch code of the branch under which the bank account is registered. The value to be specified in this parameter depends on the country of the bank account: * United States - Routing number * United Kingdom - Sort code * Germany - Bankleitzahl >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "branchCode", EmitDefaultValue = false)] - public string BranchCode { get; set; } - - /// - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The check code of the bank account. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "checkCode", EmitDefaultValue = false)] - public string CheckCode { get; set; } - - /// - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The two-letter country code in which the bank account is registered. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). - /// - /// The currency in which the bank account deals. >The permitted currency codes are defined in ISO-4217 (e.g. 'EUR'). - [DataMember(Name = "currencyCode", EmitDefaultValue = false)] - public string CurrencyCode { get; set; } - - /// - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The international bank account number. >The IBAN standard is defined in ISO-13616. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The city of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerCity", EmitDefaultValue = false)] - public string OwnerCity { get; set; } - - /// - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The country code of the country of residence of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerCountryCode", EmitDefaultValue = false)] - public string OwnerCountryCode { get; set; } - - /// - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). - /// - /// The date of birth of the bank account owner. The date should be in ISO-8601 format yyyy-mm-dd (e.g. 2000-01-31). - [DataMember(Name = "ownerDateOfBirth", EmitDefaultValue = false)] - [Obsolete] - public string OwnerDateOfBirth { get; set; } - - /// - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The house name or number of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerHouseNumberOrName", EmitDefaultValue = false)] - public string OwnerHouseNumberOrName { get; set; } - - /// - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The name of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The country code of the country of nationality of the bank account owner. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerNationality", EmitDefaultValue = false)] - public string OwnerNationality { get; set; } - - /// - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The postal code of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerPostalCode", EmitDefaultValue = false)] - public string OwnerPostalCode { get; set; } - - /// - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The state of residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerState", EmitDefaultValue = false)] - public string OwnerState { get; set; } - - /// - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The street name of the residence of the bank account owner. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "ownerStreet", EmitDefaultValue = false)] - public string OwnerStreet { get; set; } - - /// - /// If set to true, the bank account is a primary account. - /// - /// If set to true, the bank account is a primary account. - [DataMember(Name = "primaryAccount", EmitDefaultValue = false)] - public bool? PrimaryAccount { get; set; } - - /// - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The tax ID number. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - /// - /// The URL to be used for bank account verification. This may be generated on bank account creation. >Refer to [Required information](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/required-information) for details on field requirements. - [DataMember(Name = "urlForVerification", EmitDefaultValue = false)] - public string UrlForVerification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountDetail {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" BankAccountName: ").Append(BankAccountName).Append("\n"); - sb.Append(" BankAccountReference: ").Append(BankAccountReference).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" BankBicSwift: ").Append(BankBicSwift).Append("\n"); - sb.Append(" BankCity: ").Append(BankCity).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" BankName: ").Append(BankName).Append("\n"); - sb.Append(" BranchCode: ").Append(BranchCode).Append("\n"); - sb.Append(" CheckCode: ").Append(CheckCode).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" CurrencyCode: ").Append(CurrencyCode).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" OwnerCity: ").Append(OwnerCity).Append("\n"); - sb.Append(" OwnerCountryCode: ").Append(OwnerCountryCode).Append("\n"); - sb.Append(" OwnerDateOfBirth: ").Append(OwnerDateOfBirth).Append("\n"); - sb.Append(" OwnerHouseNumberOrName: ").Append(OwnerHouseNumberOrName).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" OwnerNationality: ").Append(OwnerNationality).Append("\n"); - sb.Append(" OwnerPostalCode: ").Append(OwnerPostalCode).Append("\n"); - sb.Append(" OwnerState: ").Append(OwnerState).Append("\n"); - sb.Append(" OwnerStreet: ").Append(OwnerStreet).Append("\n"); - sb.Append(" PrimaryAccount: ").Append(PrimaryAccount).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append(" UrlForVerification: ").Append(UrlForVerification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountDetail); - } - - /// - /// Returns true if BankAccountDetail instances are equal - /// - /// Instance of BankAccountDetail to be compared - /// Boolean - public bool Equals(BankAccountDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.BankAccountName == input.BankAccountName || - (this.BankAccountName != null && - this.BankAccountName.Equals(input.BankAccountName)) - ) && - ( - this.BankAccountReference == input.BankAccountReference || - (this.BankAccountReference != null && - this.BankAccountReference.Equals(input.BankAccountReference)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.BankBicSwift == input.BankBicSwift || - (this.BankBicSwift != null && - this.BankBicSwift.Equals(input.BankBicSwift)) - ) && - ( - this.BankCity == input.BankCity || - (this.BankCity != null && - this.BankCity.Equals(input.BankCity)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.BankName == input.BankName || - (this.BankName != null && - this.BankName.Equals(input.BankName)) - ) && - ( - this.BranchCode == input.BranchCode || - (this.BranchCode != null && - this.BranchCode.Equals(input.BranchCode)) - ) && - ( - this.CheckCode == input.CheckCode || - (this.CheckCode != null && - this.CheckCode.Equals(input.CheckCode)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.CurrencyCode == input.CurrencyCode || - (this.CurrencyCode != null && - this.CurrencyCode.Equals(input.CurrencyCode)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.OwnerCity == input.OwnerCity || - (this.OwnerCity != null && - this.OwnerCity.Equals(input.OwnerCity)) - ) && - ( - this.OwnerCountryCode == input.OwnerCountryCode || - (this.OwnerCountryCode != null && - this.OwnerCountryCode.Equals(input.OwnerCountryCode)) - ) && - ( - this.OwnerDateOfBirth == input.OwnerDateOfBirth || - (this.OwnerDateOfBirth != null && - this.OwnerDateOfBirth.Equals(input.OwnerDateOfBirth)) - ) && - ( - this.OwnerHouseNumberOrName == input.OwnerHouseNumberOrName || - (this.OwnerHouseNumberOrName != null && - this.OwnerHouseNumberOrName.Equals(input.OwnerHouseNumberOrName)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.OwnerNationality == input.OwnerNationality || - (this.OwnerNationality != null && - this.OwnerNationality.Equals(input.OwnerNationality)) - ) && - ( - this.OwnerPostalCode == input.OwnerPostalCode || - (this.OwnerPostalCode != null && - this.OwnerPostalCode.Equals(input.OwnerPostalCode)) - ) && - ( - this.OwnerState == input.OwnerState || - (this.OwnerState != null && - this.OwnerState.Equals(input.OwnerState)) - ) && - ( - this.OwnerStreet == input.OwnerStreet || - (this.OwnerStreet != null && - this.OwnerStreet.Equals(input.OwnerStreet)) - ) && - ( - this.PrimaryAccount == input.PrimaryAccount || - this.PrimaryAccount.Equals(input.PrimaryAccount) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.UrlForVerification == input.UrlForVerification || - (this.UrlForVerification != null && - this.UrlForVerification.Equals(input.UrlForVerification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.BankAccountName != null) - { - hashCode = (hashCode * 59) + this.BankAccountName.GetHashCode(); - } - if (this.BankAccountReference != null) - { - hashCode = (hashCode * 59) + this.BankAccountReference.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.BankBicSwift != null) - { - hashCode = (hashCode * 59) + this.BankBicSwift.GetHashCode(); - } - if (this.BankCity != null) - { - hashCode = (hashCode * 59) + this.BankCity.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - if (this.BankName != null) - { - hashCode = (hashCode * 59) + this.BankName.GetHashCode(); - } - if (this.BranchCode != null) - { - hashCode = (hashCode * 59) + this.BranchCode.GetHashCode(); - } - if (this.CheckCode != null) - { - hashCode = (hashCode * 59) + this.CheckCode.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.CurrencyCode != null) - { - hashCode = (hashCode * 59) + this.CurrencyCode.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.OwnerCity != null) - { - hashCode = (hashCode * 59) + this.OwnerCity.GetHashCode(); - } - if (this.OwnerCountryCode != null) - { - hashCode = (hashCode * 59) + this.OwnerCountryCode.GetHashCode(); - } - if (this.OwnerDateOfBirth != null) - { - hashCode = (hashCode * 59) + this.OwnerDateOfBirth.GetHashCode(); - } - if (this.OwnerHouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.OwnerHouseNumberOrName.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.OwnerNationality != null) - { - hashCode = (hashCode * 59) + this.OwnerNationality.GetHashCode(); - } - if (this.OwnerPostalCode != null) - { - hashCode = (hashCode * 59) + this.OwnerPostalCode.GetHashCode(); - } - if (this.OwnerState != null) - { - hashCode = (hashCode * 59) + this.OwnerState.GetHashCode(); - } - if (this.OwnerStreet != null) - { - hashCode = (hashCode * 59) + this.OwnerStreet.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PrimaryAccount.GetHashCode(); - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.UrlForVerification != null) - { - hashCode = (hashCode * 59) + this.UrlForVerification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/BeneficiarySetupNotification.cs b/Adyen/Model/PlatformsWebhooks/BeneficiarySetupNotification.cs deleted file mode 100644 index 26382517f..000000000 --- a/Adyen/Model/PlatformsWebhooks/BeneficiarySetupNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// BeneficiarySetupNotification - /// - [DataContract(Name = "BeneficiarySetupNotification")] - public partial class BeneficiarySetupNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BeneficiarySetupNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public BeneficiarySetupNotification(BeneficiarySetupNotificationContent content = default(BeneficiarySetupNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public BeneficiarySetupNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BeneficiarySetupNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BeneficiarySetupNotification); - } - - /// - /// Returns true if BeneficiarySetupNotification instances are equal - /// - /// Instance of BeneficiarySetupNotification to be compared - /// Boolean - public bool Equals(BeneficiarySetupNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/BeneficiarySetupNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/BeneficiarySetupNotificationContent.cs deleted file mode 100644 index 6380d2d30..000000000 --- a/Adyen/Model/PlatformsWebhooks/BeneficiarySetupNotificationContent.cs +++ /dev/null @@ -1,244 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// BeneficiarySetupNotificationContent - /// - [DataContract(Name = "BeneficiarySetupNotificationContent")] - public partial class BeneficiarySetupNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the beneficiary account.. - /// The code of the beneficiary Account Holder.. - /// A listing of the invalid fields which have caused the Setup Beneficiary request to fail. If this is empty, the Setup Beneficiary request has succeeded.. - /// The reference provided by the merchant.. - /// The code of the benefactor account.. - /// The code of the benefactor Account Holder.. - /// The date on which the beneficiary was set up and funds transferred from benefactor to beneficiary.. - public BeneficiarySetupNotificationContent(string destinationAccountCode = default(string), string destinationAccountHolderCode = default(string), List invalidFields = default(List), string merchantReference = default(string), string sourceAccountCode = default(string), string sourceAccountHolderCode = default(string), DateTime transferDate = default(DateTime)) - { - this.DestinationAccountCode = destinationAccountCode; - this.DestinationAccountHolderCode = destinationAccountHolderCode; - this.InvalidFields = invalidFields; - this.MerchantReference = merchantReference; - this.SourceAccountCode = sourceAccountCode; - this.SourceAccountHolderCode = sourceAccountHolderCode; - this.TransferDate = transferDate; - } - - /// - /// The code of the beneficiary account. - /// - /// The code of the beneficiary account. - [DataMember(Name = "destinationAccountCode", EmitDefaultValue = false)] - public string DestinationAccountCode { get; set; } - - /// - /// The code of the beneficiary Account Holder. - /// - /// The code of the beneficiary Account Holder. - [DataMember(Name = "destinationAccountHolderCode", EmitDefaultValue = false)] - public string DestinationAccountHolderCode { get; set; } - - /// - /// A listing of the invalid fields which have caused the Setup Beneficiary request to fail. If this is empty, the Setup Beneficiary request has succeeded. - /// - /// A listing of the invalid fields which have caused the Setup Beneficiary request to fail. If this is empty, the Setup Beneficiary request has succeeded. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference provided by the merchant. - /// - /// The reference provided by the merchant. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The code of the benefactor account. - /// - /// The code of the benefactor account. - [DataMember(Name = "sourceAccountCode", EmitDefaultValue = false)] - public string SourceAccountCode { get; set; } - - /// - /// The code of the benefactor Account Holder. - /// - /// The code of the benefactor Account Holder. - [DataMember(Name = "sourceAccountHolderCode", EmitDefaultValue = false)] - public string SourceAccountHolderCode { get; set; } - - /// - /// The date on which the beneficiary was set up and funds transferred from benefactor to beneficiary. - /// - /// The date on which the beneficiary was set up and funds transferred from benefactor to beneficiary. - [DataMember(Name = "transferDate", EmitDefaultValue = false)] - public DateTime TransferDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BeneficiarySetupNotificationContent {\n"); - sb.Append(" DestinationAccountCode: ").Append(DestinationAccountCode).Append("\n"); - sb.Append(" DestinationAccountHolderCode: ").Append(DestinationAccountHolderCode).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" SourceAccountCode: ").Append(SourceAccountCode).Append("\n"); - sb.Append(" SourceAccountHolderCode: ").Append(SourceAccountHolderCode).Append("\n"); - sb.Append(" TransferDate: ").Append(TransferDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BeneficiarySetupNotificationContent); - } - - /// - /// Returns true if BeneficiarySetupNotificationContent instances are equal - /// - /// Instance of BeneficiarySetupNotificationContent to be compared - /// Boolean - public bool Equals(BeneficiarySetupNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.DestinationAccountCode == input.DestinationAccountCode || - (this.DestinationAccountCode != null && - this.DestinationAccountCode.Equals(input.DestinationAccountCode)) - ) && - ( - this.DestinationAccountHolderCode == input.DestinationAccountHolderCode || - (this.DestinationAccountHolderCode != null && - this.DestinationAccountHolderCode.Equals(input.DestinationAccountHolderCode)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.SourceAccountCode == input.SourceAccountCode || - (this.SourceAccountCode != null && - this.SourceAccountCode.Equals(input.SourceAccountCode)) - ) && - ( - this.SourceAccountHolderCode == input.SourceAccountHolderCode || - (this.SourceAccountHolderCode != null && - this.SourceAccountHolderCode.Equals(input.SourceAccountHolderCode)) - ) && - ( - this.TransferDate == input.TransferDate || - (this.TransferDate != null && - this.TransferDate.Equals(input.TransferDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DestinationAccountCode != null) - { - hashCode = (hashCode * 59) + this.DestinationAccountCode.GetHashCode(); - } - if (this.DestinationAccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.DestinationAccountHolderCode.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.SourceAccountCode != null) - { - hashCode = (hashCode * 59) + this.SourceAccountCode.GetHashCode(); - } - if (this.SourceAccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.SourceAccountHolderCode.GetHashCode(); - } - if (this.TransferDate != null) - { - hashCode = (hashCode * 59) + this.TransferDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/BusinessDetails.cs b/Adyen/Model/PlatformsWebhooks/BusinessDetails.cs deleted file mode 100644 index 493f605d9..000000000 --- a/Adyen/Model/PlatformsWebhooks/BusinessDetails.cs +++ /dev/null @@ -1,303 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// BusinessDetails - /// - [DataContract(Name = "BusinessDetails")] - public partial class BusinessDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The registered name of the company (if it differs from the legal name of the company).. - /// The legal name of the company.. - /// Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company.. - /// The registration number of the company.. - /// Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos).. - /// Signatories associated with the company. Each array entry should represent one signatory.. - /// Market Identifier Code (MIC).. - /// International Securities Identification Number (ISIN).. - /// Stock Ticker symbol.. - /// The tax ID of the company.. - public BusinessDetails(string doingBusinessAs = default(string), string legalBusinessName = default(string), List listedUltimateParentCompany = default(List), string registrationNumber = default(string), List shareholders = default(List), List signatories = default(List), string stockExchange = default(string), string stockNumber = default(string), string stockTicker = default(string), string taxId = default(string)) - { - this.DoingBusinessAs = doingBusinessAs; - this.LegalBusinessName = legalBusinessName; - this.ListedUltimateParentCompany = listedUltimateParentCompany; - this.RegistrationNumber = registrationNumber; - this.Shareholders = shareholders; - this.Signatories = signatories; - this.StockExchange = stockExchange; - this.StockNumber = stockNumber; - this.StockTicker = stockTicker; - this.TaxId = taxId; - } - - /// - /// The registered name of the company (if it differs from the legal name of the company). - /// - /// The registered name of the company (if it differs from the legal name of the company). - [DataMember(Name = "doingBusinessAs", EmitDefaultValue = false)] - public string DoingBusinessAs { get; set; } - - /// - /// The legal name of the company. - /// - /// The legal name of the company. - [DataMember(Name = "legalBusinessName", EmitDefaultValue = false)] - public string LegalBusinessName { get; set; } - - /// - /// Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company. - /// - /// Information about the parent public company. Required if the account holder is 100% owned by a publicly listed company. - [DataMember(Name = "listedUltimateParentCompany", EmitDefaultValue = false)] - public List ListedUltimateParentCompany { get; set; } - - /// - /// The registration number of the company. - /// - /// The registration number of the company. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos). - /// - /// Array containing information about individuals associated with the account holder either through ownership or control. For details about how you can identify them, refer to [our verification guide](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process#identify-ubos). - [DataMember(Name = "shareholders", EmitDefaultValue = false)] - public List Shareholders { get; set; } - - /// - /// Signatories associated with the company. Each array entry should represent one signatory. - /// - /// Signatories associated with the company. Each array entry should represent one signatory. - [DataMember(Name = "signatories", EmitDefaultValue = false)] - public List Signatories { get; set; } - - /// - /// Market Identifier Code (MIC). - /// - /// Market Identifier Code (MIC). - [DataMember(Name = "stockExchange", EmitDefaultValue = false)] - public string StockExchange { get; set; } - - /// - /// International Securities Identification Number (ISIN). - /// - /// International Securities Identification Number (ISIN). - [DataMember(Name = "stockNumber", EmitDefaultValue = false)] - public string StockNumber { get; set; } - - /// - /// Stock Ticker symbol. - /// - /// Stock Ticker symbol. - [DataMember(Name = "stockTicker", EmitDefaultValue = false)] - public string StockTicker { get; set; } - - /// - /// The tax ID of the company. - /// - /// The tax ID of the company. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BusinessDetails {\n"); - sb.Append(" DoingBusinessAs: ").Append(DoingBusinessAs).Append("\n"); - sb.Append(" LegalBusinessName: ").Append(LegalBusinessName).Append("\n"); - sb.Append(" ListedUltimateParentCompany: ").Append(ListedUltimateParentCompany).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" Shareholders: ").Append(Shareholders).Append("\n"); - sb.Append(" Signatories: ").Append(Signatories).Append("\n"); - sb.Append(" StockExchange: ").Append(StockExchange).Append("\n"); - sb.Append(" StockNumber: ").Append(StockNumber).Append("\n"); - sb.Append(" StockTicker: ").Append(StockTicker).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BusinessDetails); - } - - /// - /// Returns true if BusinessDetails instances are equal - /// - /// Instance of BusinessDetails to be compared - /// Boolean - public bool Equals(BusinessDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.DoingBusinessAs == input.DoingBusinessAs || - (this.DoingBusinessAs != null && - this.DoingBusinessAs.Equals(input.DoingBusinessAs)) - ) && - ( - this.LegalBusinessName == input.LegalBusinessName || - (this.LegalBusinessName != null && - this.LegalBusinessName.Equals(input.LegalBusinessName)) - ) && - ( - this.ListedUltimateParentCompany == input.ListedUltimateParentCompany || - this.ListedUltimateParentCompany != null && - input.ListedUltimateParentCompany != null && - this.ListedUltimateParentCompany.SequenceEqual(input.ListedUltimateParentCompany) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.Shareholders == input.Shareholders || - this.Shareholders != null && - input.Shareholders != null && - this.Shareholders.SequenceEqual(input.Shareholders) - ) && - ( - this.Signatories == input.Signatories || - this.Signatories != null && - input.Signatories != null && - this.Signatories.SequenceEqual(input.Signatories) - ) && - ( - this.StockExchange == input.StockExchange || - (this.StockExchange != null && - this.StockExchange.Equals(input.StockExchange)) - ) && - ( - this.StockNumber == input.StockNumber || - (this.StockNumber != null && - this.StockNumber.Equals(input.StockNumber)) - ) && - ( - this.StockTicker == input.StockTicker || - (this.StockTicker != null && - this.StockTicker.Equals(input.StockTicker)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DoingBusinessAs != null) - { - hashCode = (hashCode * 59) + this.DoingBusinessAs.GetHashCode(); - } - if (this.LegalBusinessName != null) - { - hashCode = (hashCode * 59) + this.LegalBusinessName.GetHashCode(); - } - if (this.ListedUltimateParentCompany != null) - { - hashCode = (hashCode * 59) + this.ListedUltimateParentCompany.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.Shareholders != null) - { - hashCode = (hashCode * 59) + this.Shareholders.GetHashCode(); - } - if (this.Signatories != null) - { - hashCode = (hashCode * 59) + this.Signatories.GetHashCode(); - } - if (this.StockExchange != null) - { - hashCode = (hashCode * 59) + this.StockExchange.GetHashCode(); - } - if (this.StockNumber != null) - { - hashCode = (hashCode * 59) + this.StockNumber.GetHashCode(); - } - if (this.StockTicker != null) - { - hashCode = (hashCode * 59) + this.StockTicker.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/CloseAccountResponse.cs b/Adyen/Model/PlatformsWebhooks/CloseAccountResponse.cs deleted file mode 100644 index b90c8ec8e..000000000 --- a/Adyen/Model/PlatformsWebhooks/CloseAccountResponse.cs +++ /dev/null @@ -1,235 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// CloseAccountResponse - /// - [DataContract(Name = "CloseAccountResponse")] - public partial class CloseAccountResponse : IEquatable, IValidatableObject - { - /// - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: Suspended - /// - [EnumMember(Value = "Suspended")] - Suspended = 4 - - } - - - /// - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - /// - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The account code of the account that is closed.. - /// Contains field validation errors that would prevent requests from being processed.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// The new status of the account. >Permitted values: `Active`, `Inactive`, `Suspended`, `Closed`.. - public CloseAccountResponse(string accountCode = default(string), List invalidFields = default(List), string pspReference = default(string), string resultCode = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.AccountCode = accountCode; - this.InvalidFields = invalidFields; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.Status = status; - } - - /// - /// The account code of the account that is closed. - /// - /// The account code of the account that is closed. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// Contains field validation errors that would prevent requests from being processed. - /// - /// Contains field validation errors that would prevent requests from being processed. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CloseAccountResponse {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CloseAccountResponse); - } - - /// - /// Returns true if CloseAccountResponse instances are equal - /// - /// Instance of CloseAccountResponse to be compared - /// Boolean - public bool Equals(CloseAccountResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotification.cs b/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotification.cs deleted file mode 100644 index bf668a54f..000000000 --- a/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// CompensateNegativeBalanceNotification - /// - [DataContract(Name = "CompensateNegativeBalanceNotification")] - public partial class CompensateNegativeBalanceNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CompensateNegativeBalanceNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public CompensateNegativeBalanceNotification(CompensateNegativeBalanceNotificationContent content = default(CompensateNegativeBalanceNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public CompensateNegativeBalanceNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CompensateNegativeBalanceNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompensateNegativeBalanceNotification); - } - - /// - /// Returns true if CompensateNegativeBalanceNotification instances are equal - /// - /// Instance of CompensateNegativeBalanceNotification to be compared - /// Boolean - public bool Equals(CompensateNegativeBalanceNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotificationContent.cs deleted file mode 100644 index a9eab7dfa..000000000 --- a/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotificationContent.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// CompensateNegativeBalanceNotificationContent - /// - [DataContract(Name = "CompensateNegativeBalanceNotificationContent")] - public partial class CompensateNegativeBalanceNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the negative balances compensated.. - public CompensateNegativeBalanceNotificationContent(List records = default(List)) - { - this.Records = records; - } - - /// - /// A list of the negative balances compensated. - /// - /// A list of the negative balances compensated. - [DataMember(Name = "records", EmitDefaultValue = false)] - public List Records { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CompensateNegativeBalanceNotificationContent {\n"); - sb.Append(" Records: ").Append(Records).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompensateNegativeBalanceNotificationContent); - } - - /// - /// Returns true if CompensateNegativeBalanceNotificationContent instances are equal - /// - /// Instance of CompensateNegativeBalanceNotificationContent to be compared - /// Boolean - public bool Equals(CompensateNegativeBalanceNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.Records == input.Records || - this.Records != null && - input.Records != null && - this.Records.SequenceEqual(input.Records) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Records != null) - { - hashCode = (hashCode * 59) + this.Records.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotificationRecord.cs b/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotificationRecord.cs deleted file mode 100644 index 88a1fefba..000000000 --- a/Adyen/Model/PlatformsWebhooks/CompensateNegativeBalanceNotificationRecord.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// CompensateNegativeBalanceNotificationRecord - /// - [DataContract(Name = "CompensateNegativeBalanceNotificationRecord")] - public partial class CompensateNegativeBalanceNotificationRecord : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the account whose negative balance has been compensated.. - /// amount. - /// The date on which the compensation took place.. - public CompensateNegativeBalanceNotificationRecord(string accountCode = default(string), Amount amount = default(Amount), DateTime transferDate = default(DateTime)) - { - this.AccountCode = accountCode; - this.Amount = amount; - this.TransferDate = transferDate; - } - - /// - /// The code of the account whose negative balance has been compensated. - /// - /// The code of the account whose negative balance has been compensated. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The date on which the compensation took place. - /// - /// The date on which the compensation took place. - [DataMember(Name = "transferDate", EmitDefaultValue = false)] - public DateTime TransferDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CompensateNegativeBalanceNotificationRecord {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" TransferDate: ").Append(TransferDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompensateNegativeBalanceNotificationRecord); - } - - /// - /// Returns true if CompensateNegativeBalanceNotificationRecord instances are equal - /// - /// Instance of CompensateNegativeBalanceNotificationRecord to be compared - /// Boolean - public bool Equals(CompensateNegativeBalanceNotificationRecord input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.TransferDate == input.TransferDate || - (this.TransferDate != null && - this.TransferDate.Equals(input.TransferDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.TransferDate != null) - { - hashCode = (hashCode * 59) + this.TransferDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/CreateAccountHolderResponse.cs b/Adyen/Model/PlatformsWebhooks/CreateAccountHolderResponse.cs deleted file mode 100644 index 53d53a9b2..000000000 --- a/Adyen/Model/PlatformsWebhooks/CreateAccountHolderResponse.cs +++ /dev/null @@ -1,372 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// CreateAccountHolderResponse - /// - [DataContract(Name = "CreateAccountHolderResponse")] - public partial class CreateAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// The type of legal entity of the new account holder. - /// - /// The type of legal entity of the new account holder. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The type of legal entity of the new account holder. - /// - /// The type of legal entity of the new account holder. - [DataMember(Name = "legalEntity", EmitDefaultValue = false)] - public LegalEntityEnum? LegalEntity { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of a new account created for the account holder.. - /// The code of the new account holder.. - /// accountHolderDetails. - /// accountHolderStatus. - /// The description of the new account holder.. - /// A list of fields that caused the `/createAccountHolder` request to fail.. - /// The type of legal entity of the new account holder.. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// verification. - /// The identifier of the profile that applies to this entity.. - public CreateAccountHolderResponse(string accountCode = default(string), string accountHolderCode = default(string), AccountHolderDetails accountHolderDetails = default(AccountHolderDetails), AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), string description = default(string), List invalidFields = default(List), LegalEntityEnum? legalEntity = default(LegalEntityEnum?), string primaryCurrency = default(string), string pspReference = default(string), string resultCode = default(string), KYCVerificationResult verification = default(KYCVerificationResult), string verificationProfile = default(string)) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - this.AccountHolderDetails = accountHolderDetails; - this.AccountHolderStatus = accountHolderStatus; - this.Description = description; - this.InvalidFields = invalidFields; - this.LegalEntity = legalEntity; - this.PrimaryCurrency = primaryCurrency; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.Verification = verification; - this.VerificationProfile = verificationProfile; - } - - /// - /// The code of a new account created for the account holder. - /// - /// The code of a new account created for the account holder. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the new account holder. - /// - /// The code of the new account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets AccountHolderDetails - /// - [DataMember(Name = "accountHolderDetails", EmitDefaultValue = false)] - public AccountHolderDetails AccountHolderDetails { get; set; } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// The description of the new account holder. - /// - /// The description of the new account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of fields that caused the `/createAccountHolder` request to fail. - /// - /// A list of fields that caused the `/createAccountHolder` request to fail. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - [DataMember(Name = "primaryCurrency", EmitDefaultValue = false)] - [Obsolete] - public string PrimaryCurrency { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Gets or Sets Verification - /// - [DataMember(Name = "verification", EmitDefaultValue = false)] - public KYCVerificationResult Verification { get; set; } - - /// - /// The identifier of the profile that applies to this entity. - /// - /// The identifier of the profile that applies to this entity. - [DataMember(Name = "verificationProfile", EmitDefaultValue = false)] - public string VerificationProfile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateAccountHolderResponse {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountHolderDetails: ").Append(AccountHolderDetails).Append("\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" LegalEntity: ").Append(LegalEntity).Append("\n"); - sb.Append(" PrimaryCurrency: ").Append(PrimaryCurrency).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" Verification: ").Append(Verification).Append("\n"); - sb.Append(" VerificationProfile: ").Append(VerificationProfile).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateAccountHolderResponse); - } - - /// - /// Returns true if CreateAccountHolderResponse instances are equal - /// - /// Instance of CreateAccountHolderResponse to be compared - /// Boolean - public bool Equals(CreateAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountHolderDetails == input.AccountHolderDetails || - (this.AccountHolderDetails != null && - this.AccountHolderDetails.Equals(input.AccountHolderDetails)) - ) && - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.LegalEntity == input.LegalEntity || - this.LegalEntity.Equals(input.LegalEntity) - ) && - ( - this.PrimaryCurrency == input.PrimaryCurrency || - (this.PrimaryCurrency != null && - this.PrimaryCurrency.Equals(input.PrimaryCurrency)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.Verification == input.Verification || - (this.Verification != null && - this.Verification.Equals(input.Verification)) - ) && - ( - this.VerificationProfile == input.VerificationProfile || - (this.VerificationProfile != null && - this.VerificationProfile.Equals(input.VerificationProfile)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.AccountHolderDetails != null) - { - hashCode = (hashCode * 59) + this.AccountHolderDetails.GetHashCode(); - } - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntity.GetHashCode(); - if (this.PrimaryCurrency != null) - { - hashCode = (hashCode * 59) + this.PrimaryCurrency.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - if (this.Verification != null) - { - hashCode = (hashCode * 59) + this.Verification.GetHashCode(); - } - if (this.VerificationProfile != null) - { - hashCode = (hashCode * 59) + this.VerificationProfile.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/CreateAccountResponse.cs b/Adyen/Model/PlatformsWebhooks/CreateAccountResponse.cs deleted file mode 100644 index e1bf8e5f8..000000000 --- a/Adyen/Model/PlatformsWebhooks/CreateAccountResponse.cs +++ /dev/null @@ -1,391 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// CreateAccountResponse - /// - [DataContract(Name = "CreateAccountResponse")] - public partial class CreateAccountResponse : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// The status of the account. >Permitted values: `Active`. - /// - /// The status of the account. >Permitted values: `Active`. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum Suspended for value: Suspended - /// - [EnumMember(Value = "Suspended")] - Suspended = 4 - - } - - - /// - /// The status of the account. >Permitted values: `Active`. - /// - /// The status of the account. >Permitted values: `Active`. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of the new account.. - /// The code of the account holder.. - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.. - /// The description of the account.. - /// A list of fields that caused the `/createAccount` request to fail.. - /// A set of key and value pairs containing metadata.. - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.. - /// payoutSchedule. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// The status of the account. >Permitted values: `Active`.. - public CreateAccountResponse(string accountCode = default(string), string accountHolderCode = default(string), string bankAccountUUID = default(string), string description = default(string), List invalidFields = default(List), Dictionary metadata = default(Dictionary), string payoutMethodCode = default(string), PayoutScheduleResponse payoutSchedule = default(PayoutScheduleResponse), PayoutSpeedEnum? payoutSpeed = default(PayoutSpeedEnum?), string pspReference = default(string), string resultCode = default(string), StatusEnum? status = default(StatusEnum?)) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - this.BankAccountUUID = bankAccountUUID; - this.Description = description; - this.InvalidFields = invalidFields; - this.Metadata = metadata; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutSchedule = payoutSchedule; - this.PayoutSpeed = payoutSpeed; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.Status = status; - } - - /// - /// The code of the new account. - /// - /// The code of the new account. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The description of the account. - /// - /// The description of the account. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of fields that caused the `/createAccount` request to fail. - /// - /// A list of fields that caused the `/createAccount` request to fail. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A set of key and value pairs containing metadata. - /// - /// A set of key and value pairs containing metadata. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Gets or Sets PayoutSchedule - /// - [DataMember(Name = "payoutSchedule", EmitDefaultValue = false)] - public PayoutScheduleResponse PayoutSchedule { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateAccountResponse {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutSchedule: ").Append(PayoutSchedule).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateAccountResponse); - } - - /// - /// Returns true if CreateAccountResponse instances are equal - /// - /// Instance of CreateAccountResponse to be compared - /// Boolean - public bool Equals(CreateAccountResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutSchedule == input.PayoutSchedule || - (this.PayoutSchedule != null && - this.PayoutSchedule.Equals(input.PayoutSchedule)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.PayoutSchedule != null) - { - hashCode = (hashCode * 59) + this.PayoutSchedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/DirectDebitInitiatedNotification.cs b/Adyen/Model/PlatformsWebhooks/DirectDebitInitiatedNotification.cs deleted file mode 100644 index 726cac4e5..000000000 --- a/Adyen/Model/PlatformsWebhooks/DirectDebitInitiatedNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// DirectDebitInitiatedNotification - /// - [DataContract(Name = "DirectDebitInitiatedNotification")] - public partial class DirectDebitInitiatedNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DirectDebitInitiatedNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public DirectDebitInitiatedNotification(DirectDebitInitiatedNotificationContent content = default(DirectDebitInitiatedNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public DirectDebitInitiatedNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DirectDebitInitiatedNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DirectDebitInitiatedNotification); - } - - /// - /// Returns true if DirectDebitInitiatedNotification instances are equal - /// - /// Instance of DirectDebitInitiatedNotification to be compared - /// Boolean - public bool Equals(DirectDebitInitiatedNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/DirectDebitInitiatedNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/DirectDebitInitiatedNotificationContent.cs deleted file mode 100644 index 0048e1603..000000000 --- a/Adyen/Model/PlatformsWebhooks/DirectDebitInitiatedNotificationContent.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// DirectDebitInitiatedNotificationContent - /// - [DataContract(Name = "DirectDebitInitiatedNotificationContent")] - public partial class DirectDebitInitiatedNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DirectDebitInitiatedNotificationContent() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account. (required). - /// amount (required). - /// debitInitiationDate. - /// Invalid fields list.. - /// The code of the merchant account. (required). - /// The split data for the debit request.. - /// status. - public DirectDebitInitiatedNotificationContent(string accountCode = default(string), Amount amount = default(Amount), LocalDate debitInitiationDate = default(LocalDate), List invalidFields = default(List), string merchantAccountCode = default(string), List splits = default(List), OperationStatus status = default(OperationStatus)) - { - this.AccountCode = accountCode; - this.Amount = amount; - this.MerchantAccountCode = merchantAccountCode; - this.DebitInitiationDate = debitInitiationDate; - this.InvalidFields = invalidFields; - this.Splits = splits; - this.Status = status; - } - - /// - /// The code of the account. - /// - /// The code of the account. - [DataMember(Name = "accountCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets DebitInitiationDate - /// - [DataMember(Name = "debitInitiationDate", EmitDefaultValue = false)] - public LocalDate DebitInitiationDate { get; set; } - - /// - /// Invalid fields list. - /// - /// Invalid fields list. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The code of the merchant account. - /// - /// The code of the merchant account. - [DataMember(Name = "merchantAccountCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// The split data for the debit request. - /// - /// The split data for the debit request. - [DataMember(Name = "splits", EmitDefaultValue = false)] - public List Splits { get; set; } - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = false)] - public OperationStatus Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DirectDebitInitiatedNotificationContent {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" DebitInitiationDate: ").Append(DebitInitiationDate).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append(" Splits: ").Append(Splits).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DirectDebitInitiatedNotificationContent); - } - - /// - /// Returns true if DirectDebitInitiatedNotificationContent instances are equal - /// - /// Instance of DirectDebitInitiatedNotificationContent to be compared - /// Boolean - public bool Equals(DirectDebitInitiatedNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.DebitInitiationDate == input.DebitInitiationDate || - (this.DebitInitiationDate != null && - this.DebitInitiationDate.Equals(input.DebitInitiationDate)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ) && - ( - this.Splits == input.Splits || - this.Splits != null && - input.Splits != null && - this.Splits.SequenceEqual(input.Splits) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.DebitInitiationDate != null) - { - hashCode = (hashCode * 59) + this.DebitInitiationDate.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - if (this.Splits != null) - { - hashCode = (hashCode * 59) + this.Splits.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ErrorFieldType.cs b/Adyen/Model/PlatformsWebhooks/ErrorFieldType.cs deleted file mode 100644 index faca1ed6c..000000000 --- a/Adyen/Model/PlatformsWebhooks/ErrorFieldType.cs +++ /dev/null @@ -1,162 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ErrorFieldType - /// - [DataContract(Name = "ErrorFieldType")] - public partial class ErrorFieldType : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The validation error code.. - /// A description of the validation error.. - /// fieldType. - public ErrorFieldType(int? errorCode = default(int?), string errorDescription = default(string), FieldType fieldType = default(FieldType)) - { - this.ErrorCode = errorCode; - this.ErrorDescription = errorDescription; - this.FieldType = fieldType; - } - - /// - /// The validation error code. - /// - /// The validation error code. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public int? ErrorCode { get; set; } - - /// - /// A description of the validation error. - /// - /// A description of the validation error. - [DataMember(Name = "errorDescription", EmitDefaultValue = false)] - public string ErrorDescription { get; set; } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name = "fieldType", EmitDefaultValue = false)] - public FieldType FieldType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ErrorFieldType {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorDescription: ").Append(ErrorDescription).Append("\n"); - sb.Append(" FieldType: ").Append(FieldType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ErrorFieldType); - } - - /// - /// Returns true if ErrorFieldType instances are equal - /// - /// Instance of ErrorFieldType to be compared - /// Boolean - public bool Equals(ErrorFieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - this.ErrorCode.Equals(input.ErrorCode) - ) && - ( - this.ErrorDescription == input.ErrorDescription || - (this.ErrorDescription != null && - this.ErrorDescription.Equals(input.ErrorDescription)) - ) && - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - if (this.ErrorDescription != null) - { - hashCode = (hashCode * 59) + this.ErrorDescription.GetHashCode(); - } - if (this.FieldType != null) - { - hashCode = (hashCode * 59) + this.FieldType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/FieldType.cs b/Adyen/Model/PlatformsWebhooks/FieldType.cs deleted file mode 100644 index 6a29668f7..000000000 --- a/Adyen/Model/PlatformsWebhooks/FieldType.cs +++ /dev/null @@ -1,1144 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// FieldType - /// - [DataContract(Name = "FieldType")] - public partial class FieldType : IEquatable, IValidatableObject - { - /// - /// The type of the field. - /// - /// The type of the field. - [JsonConverter(typeof(StringEnumConverter))] - public enum FieldNameEnum - { - /// - /// Enum AccountCode for value: accountCode - /// - [EnumMember(Value = "accountCode")] - AccountCode = 1, - - /// - /// Enum AccountHolderCode for value: accountHolderCode - /// - [EnumMember(Value = "accountHolderCode")] - AccountHolderCode = 2, - - /// - /// Enum AccountHolderDetails for value: accountHolderDetails - /// - [EnumMember(Value = "accountHolderDetails")] - AccountHolderDetails = 3, - - /// - /// Enum AccountNumber for value: accountNumber - /// - [EnumMember(Value = "accountNumber")] - AccountNumber = 4, - - /// - /// Enum AccountStateType for value: accountStateType - /// - [EnumMember(Value = "accountStateType")] - AccountStateType = 5, - - /// - /// Enum AccountStatus for value: accountStatus - /// - [EnumMember(Value = "accountStatus")] - AccountStatus = 6, - - /// - /// Enum AccountType for value: accountType - /// - [EnumMember(Value = "accountType")] - AccountType = 7, - - /// - /// Enum Address for value: address - /// - [EnumMember(Value = "address")] - Address = 8, - - /// - /// Enum BalanceAccount for value: balanceAccount - /// - [EnumMember(Value = "balanceAccount")] - BalanceAccount = 9, - - /// - /// Enum BalanceAccountActive for value: balanceAccountActive - /// - [EnumMember(Value = "balanceAccountActive")] - BalanceAccountActive = 10, - - /// - /// Enum BalanceAccountCode for value: balanceAccountCode - /// - [EnumMember(Value = "balanceAccountCode")] - BalanceAccountCode = 11, - - /// - /// Enum BalanceAccountId for value: balanceAccountId - /// - [EnumMember(Value = "balanceAccountId")] - BalanceAccountId = 12, - - /// - /// Enum BankAccount for value: bankAccount - /// - [EnumMember(Value = "bankAccount")] - BankAccount = 13, - - /// - /// Enum BankAccountCode for value: bankAccountCode - /// - [EnumMember(Value = "bankAccountCode")] - BankAccountCode = 14, - - /// - /// Enum BankAccountName for value: bankAccountName - /// - [EnumMember(Value = "bankAccountName")] - BankAccountName = 15, - - /// - /// Enum BankAccountUUID for value: bankAccountUUID - /// - [EnumMember(Value = "bankAccountUUID")] - BankAccountUUID = 16, - - /// - /// Enum BankBicSwift for value: bankBicSwift - /// - [EnumMember(Value = "bankBicSwift")] - BankBicSwift = 17, - - /// - /// Enum BankCity for value: bankCity - /// - [EnumMember(Value = "bankCity")] - BankCity = 18, - - /// - /// Enum BankCode for value: bankCode - /// - [EnumMember(Value = "bankCode")] - BankCode = 19, - - /// - /// Enum BankName for value: bankName - /// - [EnumMember(Value = "bankName")] - BankName = 20, - - /// - /// Enum BankStatement for value: bankStatement - /// - [EnumMember(Value = "bankStatement")] - BankStatement = 21, - - /// - /// Enum BranchCode for value: branchCode - /// - [EnumMember(Value = "branchCode")] - BranchCode = 22, - - /// - /// Enum BusinessContact for value: businessContact - /// - [EnumMember(Value = "businessContact")] - BusinessContact = 23, - - /// - /// Enum CardToken for value: cardToken - /// - [EnumMember(Value = "cardToken")] - CardToken = 24, - - /// - /// Enum CheckCode for value: checkCode - /// - [EnumMember(Value = "checkCode")] - CheckCode = 25, - - /// - /// Enum City for value: city - /// - [EnumMember(Value = "city")] - City = 26, - - /// - /// Enum CompanyRegistration for value: companyRegistration - /// - [EnumMember(Value = "companyRegistration")] - CompanyRegistration = 27, - - /// - /// Enum ConstitutionalDocument for value: constitutionalDocument - /// - [EnumMember(Value = "constitutionalDocument")] - ConstitutionalDocument = 28, - - /// - /// Enum Controller for value: controller - /// - [EnumMember(Value = "controller")] - Controller = 29, - - /// - /// Enum Country for value: country - /// - [EnumMember(Value = "country")] - Country = 30, - - /// - /// Enum CountryCode for value: countryCode - /// - [EnumMember(Value = "countryCode")] - CountryCode = 31, - - /// - /// Enum Currency for value: currency - /// - [EnumMember(Value = "currency")] - Currency = 32, - - /// - /// Enum CurrencyCode for value: currencyCode - /// - [EnumMember(Value = "currencyCode")] - CurrencyCode = 33, - - /// - /// Enum DateOfBirth for value: dateOfBirth - /// - [EnumMember(Value = "dateOfBirth")] - DateOfBirth = 34, - - /// - /// Enum Description for value: description - /// - [EnumMember(Value = "description")] - Description = 35, - - /// - /// Enum DestinationAccountCode for value: destinationAccountCode - /// - [EnumMember(Value = "destinationAccountCode")] - DestinationAccountCode = 36, - - /// - /// Enum Document for value: document - /// - [EnumMember(Value = "document")] - Document = 37, - - /// - /// Enum DocumentContent for value: documentContent - /// - [EnumMember(Value = "documentContent")] - DocumentContent = 38, - - /// - /// Enum DocumentExpirationDate for value: documentExpirationDate - /// - [EnumMember(Value = "documentExpirationDate")] - DocumentExpirationDate = 39, - - /// - /// Enum DocumentIssuerCountry for value: documentIssuerCountry - /// - [EnumMember(Value = "documentIssuerCountry")] - DocumentIssuerCountry = 40, - - /// - /// Enum DocumentIssuerState for value: documentIssuerState - /// - [EnumMember(Value = "documentIssuerState")] - DocumentIssuerState = 41, - - /// - /// Enum DocumentName for value: documentName - /// - [EnumMember(Value = "documentName")] - DocumentName = 42, - - /// - /// Enum DocumentNumber for value: documentNumber - /// - [EnumMember(Value = "documentNumber")] - DocumentNumber = 43, - - /// - /// Enum DocumentType for value: documentType - /// - [EnumMember(Value = "documentType")] - DocumentType = 44, - - /// - /// Enum DoingBusinessAs for value: doingBusinessAs - /// - [EnumMember(Value = "doingBusinessAs")] - DoingBusinessAs = 45, - - /// - /// Enum DrivingLicence for value: drivingLicence - /// - [EnumMember(Value = "drivingLicence")] - DrivingLicence = 46, - - /// - /// Enum DrivingLicenceBack for value: drivingLicenceBack - /// - [EnumMember(Value = "drivingLicenceBack")] - DrivingLicenceBack = 47, - - /// - /// Enum DrivingLicenceFront for value: drivingLicenceFront - /// - [EnumMember(Value = "drivingLicenceFront")] - DrivingLicenceFront = 48, - - /// - /// Enum DrivingLicense for value: drivingLicense - /// - [EnumMember(Value = "drivingLicense")] - DrivingLicense = 49, - - /// - /// Enum Email for value: email - /// - [EnumMember(Value = "email")] - Email = 50, - - /// - /// Enum FirstName for value: firstName - /// - [EnumMember(Value = "firstName")] - FirstName = 51, - - /// - /// Enum FormType for value: formType - /// - [EnumMember(Value = "formType")] - FormType = 52, - - /// - /// Enum FullPhoneNumber for value: fullPhoneNumber - /// - [EnumMember(Value = "fullPhoneNumber")] - FullPhoneNumber = 53, - - /// - /// Enum Gender for value: gender - /// - [EnumMember(Value = "gender")] - Gender = 54, - - /// - /// Enum HopWebserviceUser for value: hopWebserviceUser - /// - [EnumMember(Value = "hopWebserviceUser")] - HopWebserviceUser = 55, - - /// - /// Enum HouseNumberOrName for value: houseNumberOrName - /// - [EnumMember(Value = "houseNumberOrName")] - HouseNumberOrName = 56, - - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 57, - - /// - /// Enum IdCard for value: idCard - /// - [EnumMember(Value = "idCard")] - IdCard = 58, - - /// - /// Enum IdCardBack for value: idCardBack - /// - [EnumMember(Value = "idCardBack")] - IdCardBack = 59, - - /// - /// Enum IdCardFront for value: idCardFront - /// - [EnumMember(Value = "idCardFront")] - IdCardFront = 60, - - /// - /// Enum IdNumber for value: idNumber - /// - [EnumMember(Value = "idNumber")] - IdNumber = 61, - - /// - /// Enum IdentityDocument for value: identityDocument - /// - [EnumMember(Value = "identityDocument")] - IdentityDocument = 62, - - /// - /// Enum IndividualDetails for value: individualDetails - /// - [EnumMember(Value = "individualDetails")] - IndividualDetails = 63, - - /// - /// Enum Infix for value: infix - /// - [EnumMember(Value = "infix")] - Infix = 64, - - /// - /// Enum JobTitle for value: jobTitle - /// - [EnumMember(Value = "jobTitle")] - JobTitle = 65, - - /// - /// Enum LastName for value: lastName - /// - [EnumMember(Value = "lastName")] - LastName = 66, - - /// - /// Enum LastReviewDate for value: lastReviewDate - /// - [EnumMember(Value = "lastReviewDate")] - LastReviewDate = 67, - - /// - /// Enum LegalArrangement for value: legalArrangement - /// - [EnumMember(Value = "legalArrangement")] - LegalArrangement = 68, - - /// - /// Enum LegalArrangementCode for value: legalArrangementCode - /// - [EnumMember(Value = "legalArrangementCode")] - LegalArrangementCode = 69, - - /// - /// Enum LegalArrangementEntity for value: legalArrangementEntity - /// - [EnumMember(Value = "legalArrangementEntity")] - LegalArrangementEntity = 70, - - /// - /// Enum LegalArrangementEntityCode for value: legalArrangementEntityCode - /// - [EnumMember(Value = "legalArrangementEntityCode")] - LegalArrangementEntityCode = 71, - - /// - /// Enum LegalArrangementLegalForm for value: legalArrangementLegalForm - /// - [EnumMember(Value = "legalArrangementLegalForm")] - LegalArrangementLegalForm = 72, - - /// - /// Enum LegalArrangementMember for value: legalArrangementMember - /// - [EnumMember(Value = "legalArrangementMember")] - LegalArrangementMember = 73, - - /// - /// Enum LegalArrangementMembers for value: legalArrangementMembers - /// - [EnumMember(Value = "legalArrangementMembers")] - LegalArrangementMembers = 74, - - /// - /// Enum LegalArrangementName for value: legalArrangementName - /// - [EnumMember(Value = "legalArrangementName")] - LegalArrangementName = 75, - - /// - /// Enum LegalArrangementReference for value: legalArrangementReference - /// - [EnumMember(Value = "legalArrangementReference")] - LegalArrangementReference = 76, - - /// - /// Enum LegalArrangementRegistrationNumber for value: legalArrangementRegistrationNumber - /// - [EnumMember(Value = "legalArrangementRegistrationNumber")] - LegalArrangementRegistrationNumber = 77, - - /// - /// Enum LegalArrangementTaxNumber for value: legalArrangementTaxNumber - /// - [EnumMember(Value = "legalArrangementTaxNumber")] - LegalArrangementTaxNumber = 78, - - /// - /// Enum LegalArrangementType for value: legalArrangementType - /// - [EnumMember(Value = "legalArrangementType")] - LegalArrangementType = 79, - - /// - /// Enum LegalBusinessName for value: legalBusinessName - /// - [EnumMember(Value = "legalBusinessName")] - LegalBusinessName = 80, - - /// - /// Enum LegalEntity for value: legalEntity - /// - [EnumMember(Value = "legalEntity")] - LegalEntity = 81, - - /// - /// Enum LegalEntityType for value: legalEntityType - /// - [EnumMember(Value = "legalEntityType")] - LegalEntityType = 82, - - /// - /// Enum Logo for value: logo - /// - [EnumMember(Value = "logo")] - Logo = 83, - - /// - /// Enum MerchantAccount for value: merchantAccount - /// - [EnumMember(Value = "merchantAccount")] - MerchantAccount = 84, - - /// - /// Enum MerchantCategoryCode for value: merchantCategoryCode - /// - [EnumMember(Value = "merchantCategoryCode")] - MerchantCategoryCode = 85, - - /// - /// Enum MerchantHouseNumber for value: merchantHouseNumber - /// - [EnumMember(Value = "merchantHouseNumber")] - MerchantHouseNumber = 86, - - /// - /// Enum MerchantReference for value: merchantReference - /// - [EnumMember(Value = "merchantReference")] - MerchantReference = 87, - - /// - /// Enum MicroDeposit for value: microDeposit - /// - [EnumMember(Value = "microDeposit")] - MicroDeposit = 88, - - /// - /// Enum Name for value: name - /// - [EnumMember(Value = "name")] - Name = 89, - - /// - /// Enum Nationality for value: nationality - /// - [EnumMember(Value = "nationality")] - Nationality = 90, - - /// - /// Enum OriginalReference for value: originalReference - /// - [EnumMember(Value = "originalReference")] - OriginalReference = 91, - - /// - /// Enum OwnerCity for value: ownerCity - /// - [EnumMember(Value = "ownerCity")] - OwnerCity = 92, - - /// - /// Enum OwnerCountryCode for value: ownerCountryCode - /// - [EnumMember(Value = "ownerCountryCode")] - OwnerCountryCode = 93, - - /// - /// Enum OwnerDateOfBirth for value: ownerDateOfBirth - /// - [EnumMember(Value = "ownerDateOfBirth")] - OwnerDateOfBirth = 94, - - /// - /// Enum OwnerHouseNumberOrName for value: ownerHouseNumberOrName - /// - [EnumMember(Value = "ownerHouseNumberOrName")] - OwnerHouseNumberOrName = 95, - - /// - /// Enum OwnerName for value: ownerName - /// - [EnumMember(Value = "ownerName")] - OwnerName = 96, - - /// - /// Enum OwnerPostalCode for value: ownerPostalCode - /// - [EnumMember(Value = "ownerPostalCode")] - OwnerPostalCode = 97, - - /// - /// Enum OwnerState for value: ownerState - /// - [EnumMember(Value = "ownerState")] - OwnerState = 98, - - /// - /// Enum OwnerStreet for value: ownerStreet - /// - [EnumMember(Value = "ownerStreet")] - OwnerStreet = 99, - - /// - /// Enum Passport for value: passport - /// - [EnumMember(Value = "passport")] - Passport = 100, - - /// - /// Enum PassportNumber for value: passportNumber - /// - [EnumMember(Value = "passportNumber")] - PassportNumber = 101, - - /// - /// Enum PayoutMethod for value: payoutMethod - /// - [EnumMember(Value = "payoutMethod")] - PayoutMethod = 102, - - /// - /// Enum PayoutMethodCode for value: payoutMethodCode - /// - [EnumMember(Value = "payoutMethodCode")] - PayoutMethodCode = 103, - - /// - /// Enum PayoutSchedule for value: payoutSchedule - /// - [EnumMember(Value = "payoutSchedule")] - PayoutSchedule = 104, - - /// - /// Enum PciSelfAssessment for value: pciSelfAssessment - /// - [EnumMember(Value = "pciSelfAssessment")] - PciSelfAssessment = 105, - - /// - /// Enum PersonalData for value: personalData - /// - [EnumMember(Value = "personalData")] - PersonalData = 106, - - /// - /// Enum PhoneCountryCode for value: phoneCountryCode - /// - [EnumMember(Value = "phoneCountryCode")] - PhoneCountryCode = 107, - - /// - /// Enum PhoneNumber for value: phoneNumber - /// - [EnumMember(Value = "phoneNumber")] - PhoneNumber = 108, - - /// - /// Enum PostalCode for value: postalCode - /// - [EnumMember(Value = "postalCode")] - PostalCode = 109, - - /// - /// Enum PrimaryCurrency for value: primaryCurrency - /// - [EnumMember(Value = "primaryCurrency")] - PrimaryCurrency = 110, - - /// - /// Enum Reason for value: reason - /// - [EnumMember(Value = "reason")] - Reason = 111, - - /// - /// Enum RegistrationNumber for value: registrationNumber - /// - [EnumMember(Value = "registrationNumber")] - RegistrationNumber = 112, - - /// - /// Enum ReturnUrl for value: returnUrl - /// - [EnumMember(Value = "returnUrl")] - ReturnUrl = 113, - - /// - /// Enum Schedule for value: schedule - /// - [EnumMember(Value = "schedule")] - Schedule = 114, - - /// - /// Enum Shareholder for value: shareholder - /// - [EnumMember(Value = "shareholder")] - Shareholder = 115, - - /// - /// Enum ShareholderCode for value: shareholderCode - /// - [EnumMember(Value = "shareholderCode")] - ShareholderCode = 116, - - /// - /// Enum ShareholderCodeAndSignatoryCode for value: shareholderCodeAndSignatoryCode - /// - [EnumMember(Value = "shareholderCodeAndSignatoryCode")] - ShareholderCodeAndSignatoryCode = 117, - - /// - /// Enum ShareholderCodeOrSignatoryCode for value: shareholderCodeOrSignatoryCode - /// - [EnumMember(Value = "shareholderCodeOrSignatoryCode")] - ShareholderCodeOrSignatoryCode = 118, - - /// - /// Enum ShareholderType for value: shareholderType - /// - [EnumMember(Value = "shareholderType")] - ShareholderType = 119, - - /// - /// Enum ShareholderTypes for value: shareholderTypes - /// - [EnumMember(Value = "shareholderTypes")] - ShareholderTypes = 120, - - /// - /// Enum ShopperInteraction for value: shopperInteraction - /// - [EnumMember(Value = "shopperInteraction")] - ShopperInteraction = 121, - - /// - /// Enum Signatory for value: signatory - /// - [EnumMember(Value = "signatory")] - Signatory = 122, - - /// - /// Enum SignatoryCode for value: signatoryCode - /// - [EnumMember(Value = "signatoryCode")] - SignatoryCode = 123, - - /// - /// Enum SocialSecurityNumber for value: socialSecurityNumber - /// - [EnumMember(Value = "socialSecurityNumber")] - SocialSecurityNumber = 124, - - /// - /// Enum SourceAccountCode for value: sourceAccountCode - /// - [EnumMember(Value = "sourceAccountCode")] - SourceAccountCode = 125, - - /// - /// Enum SplitAccount for value: splitAccount - /// - [EnumMember(Value = "splitAccount")] - SplitAccount = 126, - - /// - /// Enum SplitConfigurationUUID for value: splitConfigurationUUID - /// - [EnumMember(Value = "splitConfigurationUUID")] - SplitConfigurationUUID = 127, - - /// - /// Enum SplitCurrency for value: splitCurrency - /// - [EnumMember(Value = "splitCurrency")] - SplitCurrency = 128, - - /// - /// Enum SplitValue for value: splitValue - /// - [EnumMember(Value = "splitValue")] - SplitValue = 129, - - /// - /// Enum Splits for value: splits - /// - [EnumMember(Value = "splits")] - Splits = 130, - - /// - /// Enum StateOrProvince for value: stateOrProvince - /// - [EnumMember(Value = "stateOrProvince")] - StateOrProvince = 131, - - /// - /// Enum Status for value: status - /// - [EnumMember(Value = "status")] - Status = 132, - - /// - /// Enum StockExchange for value: stockExchange - /// - [EnumMember(Value = "stockExchange")] - StockExchange = 133, - - /// - /// Enum StockNumber for value: stockNumber - /// - [EnumMember(Value = "stockNumber")] - StockNumber = 134, - - /// - /// Enum StockTicker for value: stockTicker - /// - [EnumMember(Value = "stockTicker")] - StockTicker = 135, - - /// - /// Enum Store for value: store - /// - [EnumMember(Value = "store")] - Store = 136, - - /// - /// Enum StoreDetail for value: storeDetail - /// - [EnumMember(Value = "storeDetail")] - StoreDetail = 137, - - /// - /// Enum StoreName for value: storeName - /// - [EnumMember(Value = "storeName")] - StoreName = 138, - - /// - /// Enum StoreReference for value: storeReference - /// - [EnumMember(Value = "storeReference")] - StoreReference = 139, - - /// - /// Enum Street for value: street - /// - [EnumMember(Value = "street")] - Street = 140, - - /// - /// Enum TaxId for value: taxId - /// - [EnumMember(Value = "taxId")] - TaxId = 141, - - /// - /// Enum Tier for value: tier - /// - [EnumMember(Value = "tier")] - Tier = 142, - - /// - /// Enum TierNumber for value: tierNumber - /// - [EnumMember(Value = "tierNumber")] - TierNumber = 143, - - /// - /// Enum TransferCode for value: transferCode - /// - [EnumMember(Value = "transferCode")] - TransferCode = 144, - - /// - /// Enum UltimateParentCompany for value: ultimateParentCompany - /// - [EnumMember(Value = "ultimateParentCompany")] - UltimateParentCompany = 145, - - /// - /// Enum UltimateParentCompanyAddressDetails for value: ultimateParentCompanyAddressDetails - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetails")] - UltimateParentCompanyAddressDetails = 146, - - /// - /// Enum UltimateParentCompanyAddressDetailsCountry for value: ultimateParentCompanyAddressDetailsCountry - /// - [EnumMember(Value = "ultimateParentCompanyAddressDetailsCountry")] - UltimateParentCompanyAddressDetailsCountry = 147, - - /// - /// Enum UltimateParentCompanyBusinessDetails for value: ultimateParentCompanyBusinessDetails - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetails")] - UltimateParentCompanyBusinessDetails = 148, - - /// - /// Enum UltimateParentCompanyBusinessDetailsLegalBusinessName for value: ultimateParentCompanyBusinessDetailsLegalBusinessName - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsLegalBusinessName")] - UltimateParentCompanyBusinessDetailsLegalBusinessName = 149, - - /// - /// Enum UltimateParentCompanyBusinessDetailsRegistrationNumber for value: ultimateParentCompanyBusinessDetailsRegistrationNumber - /// - [EnumMember(Value = "ultimateParentCompanyBusinessDetailsRegistrationNumber")] - UltimateParentCompanyBusinessDetailsRegistrationNumber = 150, - - /// - /// Enum UltimateParentCompanyCode for value: ultimateParentCompanyCode - /// - [EnumMember(Value = "ultimateParentCompanyCode")] - UltimateParentCompanyCode = 151, - - /// - /// Enum UltimateParentCompanyStockExchange for value: ultimateParentCompanyStockExchange - /// - [EnumMember(Value = "ultimateParentCompanyStockExchange")] - UltimateParentCompanyStockExchange = 152, - - /// - /// Enum UltimateParentCompanyStockNumber for value: ultimateParentCompanyStockNumber - /// - [EnumMember(Value = "ultimateParentCompanyStockNumber")] - UltimateParentCompanyStockNumber = 153, - - /// - /// Enum UltimateParentCompanyStockNumberOrStockTicker for value: ultimateParentCompanyStockNumberOrStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockNumberOrStockTicker")] - UltimateParentCompanyStockNumberOrStockTicker = 154, - - /// - /// Enum UltimateParentCompanyStockTicker for value: ultimateParentCompanyStockTicker - /// - [EnumMember(Value = "ultimateParentCompanyStockTicker")] - UltimateParentCompanyStockTicker = 155, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 156, - - /// - /// Enum Value for value: value - /// - [EnumMember(Value = "value")] - Value = 157, - - /// - /// Enum VerificationType for value: verificationType - /// - [EnumMember(Value = "verificationType")] - VerificationType = 158, - - /// - /// Enum VirtualAccount for value: virtualAccount - /// - [EnumMember(Value = "virtualAccount")] - VirtualAccount = 159, - - /// - /// Enum VisaNumber for value: visaNumber - /// - [EnumMember(Value = "visaNumber")] - VisaNumber = 160, - - /// - /// Enum WebAddress for value: webAddress - /// - [EnumMember(Value = "webAddress")] - WebAddress = 161, - - /// - /// Enum Year for value: year - /// - [EnumMember(Value = "year")] - Year = 162 - - } - - - /// - /// The type of the field. - /// - /// The type of the field. - [DataMember(Name = "fieldName", EmitDefaultValue = false)] - public FieldNameEnum? FieldName { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The full name of the property.. - /// The type of the field.. - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder.. - public FieldType(string field = default(string), FieldNameEnum? fieldName = default(FieldNameEnum?), string shareholderCode = default(string)) - { - this.Field = field; - this.FieldName = fieldName; - this.ShareholderCode = shareholderCode; - } - - /// - /// The full name of the property. - /// - /// The full name of the property. - [DataMember(Name = "field", EmitDefaultValue = false)] - public string Field { get; set; } - - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - /// - /// The code of the shareholder that the field belongs to. If empty, the field belongs to an account holder. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FieldType {\n"); - sb.Append(" Field: ").Append(Field).Append("\n"); - sb.Append(" FieldName: ").Append(FieldName).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FieldType); - } - - /// - /// Returns true if FieldType instances are equal - /// - /// Instance of FieldType to be compared - /// Boolean - public bool Equals(FieldType input) - { - if (input == null) - { - return false; - } - return - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.FieldName == input.FieldName || - this.FieldName.Equals(input.FieldName) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - hashCode = (hashCode * 59) + this.FieldName.GetHashCode(); - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/IndividualDetails.cs b/Adyen/Model/PlatformsWebhooks/IndividualDetails.cs deleted file mode 100644 index bb1daef6c..000000000 --- a/Adyen/Model/PlatformsWebhooks/IndividualDetails.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// IndividualDetails - /// - [DataContract(Name = "IndividualDetails")] - public partial class IndividualDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// personalData. - public IndividualDetails(ViasName name = default(ViasName), ViasPersonalData personalData = default(ViasPersonalData)) - { - this.Name = name; - this.PersonalData = personalData; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public ViasName Name { get; set; } - - /// - /// Gets or Sets PersonalData - /// - [DataMember(Name = "personalData", EmitDefaultValue = false)] - public ViasPersonalData PersonalData { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IndividualDetails {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PersonalData: ").Append(PersonalData).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IndividualDetails); - } - - /// - /// Returns true if IndividualDetails instances are equal - /// - /// Instance of IndividualDetails to be compared - /// Boolean - public bool Equals(IndividualDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PersonalData == input.PersonalData || - (this.PersonalData != null && - this.PersonalData.Equals(input.PersonalData)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PersonalData != null) - { - hashCode = (hashCode * 59) + this.PersonalData.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCCheckResult.cs b/Adyen/Model/PlatformsWebhooks/KYCCheckResult.cs deleted file mode 100644 index ab260a270..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCCheckResult.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCCheckResult - /// - [DataContract(Name = "KYCCheckResult")] - public partial class KYCCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - public KYCCheckResult(List checks = default(List)) - { - this.Checks = checks; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCCheckResult); - } - - /// - /// Returns true if KYCCheckResult instances are equal - /// - /// Instance of KYCCheckResult to be compared - /// Boolean - public bool Equals(KYCCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCCheckStatusData.cs b/Adyen/Model/PlatformsWebhooks/KYCCheckStatusData.cs deleted file mode 100644 index e0221c6f0..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCCheckStatusData.cs +++ /dev/null @@ -1,309 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCCheckStatusData - /// - [DataContract(Name = "KYCCheckStatusData")] - public partial class KYCCheckStatusData : IEquatable, IValidatableObject - { - /// - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. - /// - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum AWAITINGDATA for value: AWAITING_DATA - /// - [EnumMember(Value = "AWAITING_DATA")] - AWAITINGDATA = 1, - - /// - /// Enum DATAPROVIDED for value: DATA_PROVIDED - /// - [EnumMember(Value = "DATA_PROVIDED")] - DATAPROVIDED = 2, - - /// - /// Enum FAILED for value: FAILED - /// - [EnumMember(Value = "FAILED")] - FAILED = 3, - - /// - /// Enum INVALIDDATA for value: INVALID_DATA - /// - [EnumMember(Value = "INVALID_DATA")] - INVALIDDATA = 4, - - /// - /// Enum PASSED for value: PASSED - /// - [EnumMember(Value = "PASSED")] - PASSED = 5, - - /// - /// Enum PENDING for value: PENDING - /// - [EnumMember(Value = "PENDING")] - PENDING = 6, - - /// - /// Enum PENDINGREVIEW for value: PENDING_REVIEW - /// - [EnumMember(Value = "PENDING_REVIEW")] - PENDINGREVIEW = 7, - - /// - /// Enum RETRYLIMITREACHED for value: RETRY_LIMIT_REACHED - /// - [EnumMember(Value = "RETRY_LIMIT_REACHED")] - RETRYLIMITREACHED = 8, - - /// - /// Enum UNCHECKED for value: UNCHECKED - /// - [EnumMember(Value = "UNCHECKED")] - UNCHECKED = 9 - - } - - - /// - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. - /// - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** - /// - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BANKACCOUNTVERIFICATION for value: BANK_ACCOUNT_VERIFICATION - /// - [EnumMember(Value = "BANK_ACCOUNT_VERIFICATION")] - BANKACCOUNTVERIFICATION = 1, - - /// - /// Enum CARDVERIFICATION for value: CARD_VERIFICATION - /// - [EnumMember(Value = "CARD_VERIFICATION")] - CARDVERIFICATION = 2, - - /// - /// Enum COMPANYVERIFICATION for value: COMPANY_VERIFICATION - /// - [EnumMember(Value = "COMPANY_VERIFICATION")] - COMPANYVERIFICATION = 3, - - /// - /// Enum IDENTITYVERIFICATION for value: IDENTITY_VERIFICATION - /// - [EnumMember(Value = "IDENTITY_VERIFICATION")] - IDENTITYVERIFICATION = 4, - - /// - /// Enum LEGALARRANGEMENTVERIFICATION for value: LEGAL_ARRANGEMENT_VERIFICATION - /// - [EnumMember(Value = "LEGAL_ARRANGEMENT_VERIFICATION")] - LEGALARRANGEMENTVERIFICATION = 5, - - /// - /// Enum NONPROFITVERIFICATION for value: NONPROFIT_VERIFICATION - /// - [EnumMember(Value = "NONPROFIT_VERIFICATION")] - NONPROFITVERIFICATION = 6, - - /// - /// Enum PASSPORTVERIFICATION for value: PASSPORT_VERIFICATION - /// - [EnumMember(Value = "PASSPORT_VERIFICATION")] - PASSPORTVERIFICATION = 7, - - /// - /// Enum PAYOUTMETHODVERIFICATION for value: PAYOUT_METHOD_VERIFICATION - /// - [EnumMember(Value = "PAYOUT_METHOD_VERIFICATION")] - PAYOUTMETHODVERIFICATION = 8, - - /// - /// Enum PCIVERIFICATION for value: PCI_VERIFICATION - /// - [EnumMember(Value = "PCI_VERIFICATION")] - PCIVERIFICATION = 9 - - } - - - /// - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** - /// - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected KYCCheckStatusData() { } - /// - /// Initializes a new instance of the class. - /// - /// A list of the fields required for execution of the check.. - /// The status of the check. Possible values: **AWAITING_DATA** , **DATA_PROVIDED**, **FAILED**, **INVALID_DATA**, **PASSED**, **PENDING**, **RETRY_LIMIT_REACHED**. (required). - /// summary. - /// The type of check. Possible values: * **BANK_ACCOUNT_VERIFICATION**: Used in v5 and earlier. Replaced by **PAYOUT_METHOD_VERIFICATION** in v6 and later. * **COMPANY_VERIFICATION** * **CARD_VERIFICATION** * **IDENTITY_VERIFICATION** * **LEGAL_ARRANGEMENT_VERIFICATION** * **NONPROFIT_VERIFICATION** * **PASSPORT_VERIFICATION** * **PAYOUT_METHOD_VERIFICATION**: Used in v6 and later. * **PCI_VERIFICATION** (required). - public KYCCheckStatusData(List requiredFields = default(List), StatusEnum status = default(StatusEnum), KYCCheckSummary summary = default(KYCCheckSummary), TypeEnum type = default(TypeEnum)) - { - this.Status = status; - this.Type = type; - this.RequiredFields = requiredFields; - this.Summary = summary; - } - - /// - /// A list of the fields required for execution of the check. - /// - /// A list of the fields required for execution of the check. - [DataMember(Name = "requiredFields", EmitDefaultValue = false)] - public List RequiredFields { get; set; } - - /// - /// Gets or Sets Summary - /// - [DataMember(Name = "summary", EmitDefaultValue = false)] - public KYCCheckSummary Summary { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCCheckStatusData {\n"); - sb.Append(" RequiredFields: ").Append(RequiredFields).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Summary: ").Append(Summary).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCCheckStatusData); - } - - /// - /// Returns true if KYCCheckStatusData instances are equal - /// - /// Instance of KYCCheckStatusData to be compared - /// Boolean - public bool Equals(KYCCheckStatusData input) - { - if (input == null) - { - return false; - } - return - ( - this.RequiredFields == input.RequiredFields || - this.RequiredFields != null && - input.RequiredFields != null && - this.RequiredFields.SequenceEqual(input.RequiredFields) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Summary == input.Summary || - (this.Summary != null && - this.Summary.Equals(input.Summary)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RequiredFields != null) - { - hashCode = (hashCode * 59) + this.RequiredFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Summary != null) - { - hashCode = (hashCode * 59) + this.Summary.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCCheckSummary.cs b/Adyen/Model/PlatformsWebhooks/KYCCheckSummary.cs deleted file mode 100644 index 90ea22e61..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCCheckSummary.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCCheckSummary - /// - [DataContract(Name = "KYCCheckSummary")] - public partial class KYCCheckSummary : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes).. - /// A description of the check.. - public KYCCheckSummary(int? kycCheckCode = default(int?), string kycCheckDescription = default(string)) - { - this.KycCheckCode = kycCheckCode; - this.KycCheckDescription = kycCheckDescription; - } - - /// - /// The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes). - /// - /// The code of the check. For possible values, refer to [Verification codes](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/verification-codes). - [DataMember(Name = "kycCheckCode", EmitDefaultValue = false)] - public int? KycCheckCode { get; set; } - - /// - /// A description of the check. - /// - /// A description of the check. - [DataMember(Name = "kycCheckDescription", EmitDefaultValue = false)] - public string KycCheckDescription { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCCheckSummary {\n"); - sb.Append(" KycCheckCode: ").Append(KycCheckCode).Append("\n"); - sb.Append(" KycCheckDescription: ").Append(KycCheckDescription).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCCheckSummary); - } - - /// - /// Returns true if KYCCheckSummary instances are equal - /// - /// Instance of KYCCheckSummary to be compared - /// Boolean - public bool Equals(KYCCheckSummary input) - { - if (input == null) - { - return false; - } - return - ( - this.KycCheckCode == input.KycCheckCode || - this.KycCheckCode.Equals(input.KycCheckCode) - ) && - ( - this.KycCheckDescription == input.KycCheckDescription || - (this.KycCheckDescription != null && - this.KycCheckDescription.Equals(input.KycCheckDescription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.KycCheckCode.GetHashCode(); - if (this.KycCheckDescription != null) - { - hashCode = (hashCode * 59) + this.KycCheckDescription.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCLegalArrangementCheckResult.cs b/Adyen/Model/PlatformsWebhooks/KYCLegalArrangementCheckResult.cs deleted file mode 100644 index 18c74eef6..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCLegalArrangementCheckResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCLegalArrangementCheckResult - /// - [DataContract(Name = "KYCLegalArrangementCheckResult")] - public partial class KYCLegalArrangementCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The unique ID of the legal arrangement to which the check applies.. - public KYCLegalArrangementCheckResult(List checks = default(List), string legalArrangementCode = default(string)) - { - this.Checks = checks; - this.LegalArrangementCode = legalArrangementCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The unique ID of the legal arrangement to which the check applies. - /// - /// The unique ID of the legal arrangement to which the check applies. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCLegalArrangementCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCLegalArrangementCheckResult); - } - - /// - /// Returns true if KYCLegalArrangementCheckResult instances are equal - /// - /// Instance of KYCLegalArrangementCheckResult to be compared - /// Boolean - public bool Equals(KYCLegalArrangementCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCLegalArrangementEntityCheckResult.cs b/Adyen/Model/PlatformsWebhooks/KYCLegalArrangementEntityCheckResult.cs deleted file mode 100644 index 1ae3ea36a..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCLegalArrangementEntityCheckResult.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCLegalArrangementEntityCheckResult - /// - [DataContract(Name = "KYCLegalArrangementEntityCheckResult")] - public partial class KYCLegalArrangementEntityCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The unique ID of the legal arrangement to which the entity belongs.. - /// The unique ID of the legal arrangement entity to which the check applies.. - public KYCLegalArrangementEntityCheckResult(List checks = default(List), string legalArrangementCode = default(string), string legalArrangementEntityCode = default(string)) - { - this.Checks = checks; - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntityCode = legalArrangementEntityCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The unique ID of the legal arrangement to which the entity belongs. - /// - /// The unique ID of the legal arrangement to which the entity belongs. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// The unique ID of the legal arrangement entity to which the check applies. - /// - /// The unique ID of the legal arrangement entity to which the check applies. - [DataMember(Name = "legalArrangementEntityCode", EmitDefaultValue = false)] - public string LegalArrangementEntityCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCLegalArrangementEntityCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntityCode: ").Append(LegalArrangementEntityCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCLegalArrangementEntityCheckResult); - } - - /// - /// Returns true if KYCLegalArrangementEntityCheckResult instances are equal - /// - /// Instance of KYCLegalArrangementEntityCheckResult to be compared - /// Boolean - public bool Equals(KYCLegalArrangementEntityCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntityCode == input.LegalArrangementEntityCode || - (this.LegalArrangementEntityCode != null && - this.LegalArrangementEntityCode.Equals(input.LegalArrangementEntityCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCPayoutMethodCheckResult.cs b/Adyen/Model/PlatformsWebhooks/KYCPayoutMethodCheckResult.cs deleted file mode 100644 index 36e7813f1..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCPayoutMethodCheckResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCPayoutMethodCheckResult - /// - [DataContract(Name = "KYCPayoutMethodCheckResult")] - public partial class KYCPayoutMethodCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The unique ID of the payoput method to which the check applies.. - public KYCPayoutMethodCheckResult(List checks = default(List), string payoutMethodCode = default(string)) - { - this.Checks = checks; - this.PayoutMethodCode = payoutMethodCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The unique ID of the payoput method to which the check applies. - /// - /// The unique ID of the payoput method to which the check applies. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCPayoutMethodCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCPayoutMethodCheckResult); - } - - /// - /// Returns true if KYCPayoutMethodCheckResult instances are equal - /// - /// Instance of KYCPayoutMethodCheckResult to be compared - /// Boolean - public bool Equals(KYCPayoutMethodCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCShareholderCheckResult.cs b/Adyen/Model/PlatformsWebhooks/KYCShareholderCheckResult.cs deleted file mode 100644 index 122e50fcf..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCShareholderCheckResult.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCShareholderCheckResult - /// - [DataContract(Name = "KYCShareholderCheckResult")] - public partial class KYCShareholderCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The unique ID of the legal arrangement to which the shareholder belongs, if applicable.. - /// The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable.. - /// The code of the shareholder to which the check applies.. - public KYCShareholderCheckResult(List checks = default(List), string legalArrangementCode = default(string), string legalArrangementEntityCode = default(string), string shareholderCode = default(string)) - { - this.Checks = checks; - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntityCode = legalArrangementEntityCode; - this.ShareholderCode = shareholderCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The unique ID of the legal arrangement to which the shareholder belongs, if applicable. - /// - /// The unique ID of the legal arrangement to which the shareholder belongs, if applicable. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable. - /// - /// The unique ID of the legal arrangement entity to which the shareholder belongs, if applicable. - [DataMember(Name = "legalArrangementEntityCode", EmitDefaultValue = false)] - public string LegalArrangementEntityCode { get; set; } - - /// - /// The code of the shareholder to which the check applies. - /// - /// The code of the shareholder to which the check applies. - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCShareholderCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntityCode: ").Append(LegalArrangementEntityCode).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCShareholderCheckResult); - } - - /// - /// Returns true if KYCShareholderCheckResult instances are equal - /// - /// Instance of KYCShareholderCheckResult to be compared - /// Boolean - public bool Equals(KYCShareholderCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntityCode == input.LegalArrangementEntityCode || - (this.LegalArrangementEntityCode != null && - this.LegalArrangementEntityCode.Equals(input.LegalArrangementEntityCode)) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCode.GetHashCode(); - } - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCSignatoryCheckResult.cs b/Adyen/Model/PlatformsWebhooks/KYCSignatoryCheckResult.cs deleted file mode 100644 index bd55b3859..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCSignatoryCheckResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCSignatoryCheckResult - /// - [DataContract(Name = "KYCSignatoryCheckResult")] - public partial class KYCSignatoryCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The code of the signatory to which the check applies.. - public KYCSignatoryCheckResult(List checks = default(List), string signatoryCode = default(string)) - { - this.Checks = checks; - this.SignatoryCode = signatoryCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The code of the signatory to which the check applies. - /// - /// The code of the signatory to which the check applies. - [DataMember(Name = "signatoryCode", EmitDefaultValue = false)] - public string SignatoryCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCSignatoryCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" SignatoryCode: ").Append(SignatoryCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCSignatoryCheckResult); - } - - /// - /// Returns true if KYCSignatoryCheckResult instances are equal - /// - /// Instance of KYCSignatoryCheckResult to be compared - /// Boolean - public bool Equals(KYCSignatoryCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.SignatoryCode == input.SignatoryCode || - (this.SignatoryCode != null && - this.SignatoryCode.Equals(input.SignatoryCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.SignatoryCode != null) - { - hashCode = (hashCode * 59) + this.SignatoryCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCUltimateParentCompanyCheckResult.cs b/Adyen/Model/PlatformsWebhooks/KYCUltimateParentCompanyCheckResult.cs deleted file mode 100644 index eb8a20c08..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCUltimateParentCompanyCheckResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCUltimateParentCompanyCheckResult - /// - [DataContract(Name = "KYCUltimateParentCompanyCheckResult")] - public partial class KYCUltimateParentCompanyCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A list of the checks and their statuses.. - /// The code of the Ultimate Parent Company to which the check applies.. - public KYCUltimateParentCompanyCheckResult(List checks = default(List), string ultimateParentCompanyCode = default(string)) - { - this.Checks = checks; - this.UltimateParentCompanyCode = ultimateParentCompanyCode; - } - - /// - /// A list of the checks and their statuses. - /// - /// A list of the checks and their statuses. - [DataMember(Name = "checks", EmitDefaultValue = false)] - public List Checks { get; set; } - - /// - /// The code of the Ultimate Parent Company to which the check applies. - /// - /// The code of the Ultimate Parent Company to which the check applies. - [DataMember(Name = "ultimateParentCompanyCode", EmitDefaultValue = false)] - public string UltimateParentCompanyCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCUltimateParentCompanyCheckResult {\n"); - sb.Append(" Checks: ").Append(Checks).Append("\n"); - sb.Append(" UltimateParentCompanyCode: ").Append(UltimateParentCompanyCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCUltimateParentCompanyCheckResult); - } - - /// - /// Returns true if KYCUltimateParentCompanyCheckResult instances are equal - /// - /// Instance of KYCUltimateParentCompanyCheckResult to be compared - /// Boolean - public bool Equals(KYCUltimateParentCompanyCheckResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Checks == input.Checks || - this.Checks != null && - input.Checks != null && - this.Checks.SequenceEqual(input.Checks) - ) && - ( - this.UltimateParentCompanyCode == input.UltimateParentCompanyCode || - (this.UltimateParentCompanyCode != null && - this.UltimateParentCompanyCode.Equals(input.UltimateParentCompanyCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checks != null) - { - hashCode = (hashCode * 59) + this.Checks.GetHashCode(); - } - if (this.UltimateParentCompanyCode != null) - { - hashCode = (hashCode * 59) + this.UltimateParentCompanyCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/KYCVerificationResult.cs b/Adyen/Model/PlatformsWebhooks/KYCVerificationResult.cs deleted file mode 100644 index 9fbda8b85..000000000 --- a/Adyen/Model/PlatformsWebhooks/KYCVerificationResult.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// KYCVerificationResult - /// - [DataContract(Name = "KYCVerificationResult")] - public partial class KYCVerificationResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountHolder. - /// The results of the checks on the legal arrangements.. - /// The results of the checks on the legal arrangement entities.. - /// The results of the checks on the payout methods.. - /// The results of the checks on the shareholders.. - /// The results of the checks on the signatories.. - /// The result of the check on the Ultimate Parent Company.. - public KYCVerificationResult(KYCCheckResult accountHolder = default(KYCCheckResult), List legalArrangements = default(List), List legalArrangementsEntities = default(List), List payoutMethods = default(List), List shareholders = default(List), List signatories = default(List), List ultimateParentCompany = default(List)) - { - this.AccountHolder = accountHolder; - this.LegalArrangements = legalArrangements; - this.LegalArrangementsEntities = legalArrangementsEntities; - this.PayoutMethods = payoutMethods; - this.Shareholders = shareholders; - this.Signatories = signatories; - this.UltimateParentCompany = ultimateParentCompany; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", EmitDefaultValue = false)] - public KYCCheckResult AccountHolder { get; set; } - - /// - /// The results of the checks on the legal arrangements. - /// - /// The results of the checks on the legal arrangements. - [DataMember(Name = "legalArrangements", EmitDefaultValue = false)] - public List LegalArrangements { get; set; } - - /// - /// The results of the checks on the legal arrangement entities. - /// - /// The results of the checks on the legal arrangement entities. - [DataMember(Name = "legalArrangementsEntities", EmitDefaultValue = false)] - public List LegalArrangementsEntities { get; set; } - - /// - /// The results of the checks on the payout methods. - /// - /// The results of the checks on the payout methods. - [DataMember(Name = "payoutMethods", EmitDefaultValue = false)] - public List PayoutMethods { get; set; } - - /// - /// The results of the checks on the shareholders. - /// - /// The results of the checks on the shareholders. - [DataMember(Name = "shareholders", EmitDefaultValue = false)] - public List Shareholders { get; set; } - - /// - /// The results of the checks on the signatories. - /// - /// The results of the checks on the signatories. - [DataMember(Name = "signatories", EmitDefaultValue = false)] - public List Signatories { get; set; } - - /// - /// The result of the check on the Ultimate Parent Company. - /// - /// The result of the check on the Ultimate Parent Company. - [DataMember(Name = "ultimateParentCompany", EmitDefaultValue = false)] - public List UltimateParentCompany { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class KYCVerificationResult {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" LegalArrangements: ").Append(LegalArrangements).Append("\n"); - sb.Append(" LegalArrangementsEntities: ").Append(LegalArrangementsEntities).Append("\n"); - sb.Append(" PayoutMethods: ").Append(PayoutMethods).Append("\n"); - sb.Append(" Shareholders: ").Append(Shareholders).Append("\n"); - sb.Append(" Signatories: ").Append(Signatories).Append("\n"); - sb.Append(" UltimateParentCompany: ").Append(UltimateParentCompany).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as KYCVerificationResult); - } - - /// - /// Returns true if KYCVerificationResult instances are equal - /// - /// Instance of KYCVerificationResult to be compared - /// Boolean - public bool Equals(KYCVerificationResult input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.LegalArrangements == input.LegalArrangements || - this.LegalArrangements != null && - input.LegalArrangements != null && - this.LegalArrangements.SequenceEqual(input.LegalArrangements) - ) && - ( - this.LegalArrangementsEntities == input.LegalArrangementsEntities || - this.LegalArrangementsEntities != null && - input.LegalArrangementsEntities != null && - this.LegalArrangementsEntities.SequenceEqual(input.LegalArrangementsEntities) - ) && - ( - this.PayoutMethods == input.PayoutMethods || - this.PayoutMethods != null && - input.PayoutMethods != null && - this.PayoutMethods.SequenceEqual(input.PayoutMethods) - ) && - ( - this.Shareholders == input.Shareholders || - this.Shareholders != null && - input.Shareholders != null && - this.Shareholders.SequenceEqual(input.Shareholders) - ) && - ( - this.Signatories == input.Signatories || - this.Signatories != null && - input.Signatories != null && - this.Signatories.SequenceEqual(input.Signatories) - ) && - ( - this.UltimateParentCompany == input.UltimateParentCompany || - this.UltimateParentCompany != null && - input.UltimateParentCompany != null && - this.UltimateParentCompany.SequenceEqual(input.UltimateParentCompany) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.LegalArrangements != null) - { - hashCode = (hashCode * 59) + this.LegalArrangements.GetHashCode(); - } - if (this.LegalArrangementsEntities != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementsEntities.GetHashCode(); - } - if (this.PayoutMethods != null) - { - hashCode = (hashCode * 59) + this.PayoutMethods.GetHashCode(); - } - if (this.Shareholders != null) - { - hashCode = (hashCode * 59) + this.Shareholders.GetHashCode(); - } - if (this.Signatories != null) - { - hashCode = (hashCode * 59) + this.Signatories.GetHashCode(); - } - if (this.UltimateParentCompany != null) - { - hashCode = (hashCode * 59) + this.UltimateParentCompany.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/LegalArrangementDetail.cs b/Adyen/Model/PlatformsWebhooks/LegalArrangementDetail.cs deleted file mode 100644 index 85d39bb62..000000000 --- a/Adyen/Model/PlatformsWebhooks/LegalArrangementDetail.cs +++ /dev/null @@ -1,428 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// LegalArrangementDetail - /// - [DataContract(Name = "LegalArrangementDetail")] - public partial class LegalArrangementDetail : IEquatable, IValidatableObject - { - /// - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** - /// - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalFormEnum - { - /// - /// Enum CashManagementTrust for value: CashManagementTrust - /// - [EnumMember(Value = "CashManagementTrust")] - CashManagementTrust = 1, - - /// - /// Enum CorporateUnitTrust for value: CorporateUnitTrust - /// - [EnumMember(Value = "CorporateUnitTrust")] - CorporateUnitTrust = 2, - - /// - /// Enum DeceasedEstate for value: DeceasedEstate - /// - [EnumMember(Value = "DeceasedEstate")] - DeceasedEstate = 3, - - /// - /// Enum DiscretionaryInvestmentTrust for value: DiscretionaryInvestmentTrust - /// - [EnumMember(Value = "DiscretionaryInvestmentTrust")] - DiscretionaryInvestmentTrust = 4, - - /// - /// Enum DiscretionaryServicesManagementTrust for value: DiscretionaryServicesManagementTrust - /// - [EnumMember(Value = "DiscretionaryServicesManagementTrust")] - DiscretionaryServicesManagementTrust = 5, - - /// - /// Enum DiscretionaryTradingTrust for value: DiscretionaryTradingTrust - /// - [EnumMember(Value = "DiscretionaryTradingTrust")] - DiscretionaryTradingTrust = 6, - - /// - /// Enum FirstHomeSaverAccountsTrust for value: FirstHomeSaverAccountsTrust - /// - [EnumMember(Value = "FirstHomeSaverAccountsTrust")] - FirstHomeSaverAccountsTrust = 7, - - /// - /// Enum FixedTrust for value: FixedTrust - /// - [EnumMember(Value = "FixedTrust")] - FixedTrust = 8, - - /// - /// Enum FixedUnitTrust for value: FixedUnitTrust - /// - [EnumMember(Value = "FixedUnitTrust")] - FixedUnitTrust = 9, - - /// - /// Enum HybridTrust for value: HybridTrust - /// - [EnumMember(Value = "HybridTrust")] - HybridTrust = 10, - - /// - /// Enum ListedPublicUnitTrust for value: ListedPublicUnitTrust - /// - [EnumMember(Value = "ListedPublicUnitTrust")] - ListedPublicUnitTrust = 11, - - /// - /// Enum OtherTrust for value: OtherTrust - /// - [EnumMember(Value = "OtherTrust")] - OtherTrust = 12, - - /// - /// Enum PooledSuperannuationTrust for value: PooledSuperannuationTrust - /// - [EnumMember(Value = "PooledSuperannuationTrust")] - PooledSuperannuationTrust = 13, - - /// - /// Enum PublicTradingTrust for value: PublicTradingTrust - /// - [EnumMember(Value = "PublicTradingTrust")] - PublicTradingTrust = 14, - - /// - /// Enum UnlistedPublicUnitTrust for value: UnlistedPublicUnitTrust - /// - [EnumMember(Value = "UnlistedPublicUnitTrust")] - UnlistedPublicUnitTrust = 15, - - /// - /// Enum LimitedPartnership for value: LimitedPartnership - /// - [EnumMember(Value = "LimitedPartnership")] - LimitedPartnership = 16, - - /// - /// Enum FamilyPartnership for value: FamilyPartnership - /// - [EnumMember(Value = "FamilyPartnership")] - FamilyPartnership = 17, - - /// - /// Enum OtherPartnership for value: OtherPartnership - /// - [EnumMember(Value = "OtherPartnership")] - OtherPartnership = 18 - - } - - - /// - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** - /// - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership** - [DataMember(Name = "legalForm", EmitDefaultValue = false)] - public LegalFormEnum? LegalForm { get; set; } - /// - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** - /// - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Association for value: Association - /// - [EnumMember(Value = "Association")] - Association = 1, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 2, - - /// - /// Enum SoleProprietorship for value: SoleProprietorship - /// - [EnumMember(Value = "SoleProprietorship")] - SoleProprietorship = 3, - - /// - /// Enum Trust for value: Trust - /// - [EnumMember(Value = "Trust")] - Trust = 4 - - } - - - /// - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** - /// - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected LegalArrangementDetail() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail.. - /// An array containing information about other entities that are part of the legal arrangement.. - /// Your reference for the legal arrangement. Must be between 3 to 128 characters.. - /// The form of legal arrangement. Required if `type` is **Trust** or **Partnership**. The possible values depend on the `type`. - For `type` **Trust**: **CashManagementTrust**, **CorporateUnitTrust**, **DeceasedEstate**, **DiscretionaryInvestmentTrust**, **DiscretionaryServicesManagementTrust**, **DiscretionaryTradingTrust**, **FirstHomeSaverAccountsTrust**, **FixedTrust**, **FixedUnitTrust**, **HybridTrust**, **ListedPublicUnitTrust**, **OtherTrust**, **PooledSuperannuationTrust**, **PublicTradingTrust**, or **UnlistedPublicUnitTrust**. - For `type` **Partnership**: **LimitedPartnership**, **FamilyPartnership**, or **OtherPartnership**. - /// The legal name of the legal arrangement. Minimum length: 3 characters. (required). - /// The registration number of the legal arrangement.. - /// The tax identification number of the legal arrangement.. - /// The [type of legal arrangement](https://docs.adyen.com/marketplaces-and-platforms/classic/verification-process/legal-arrangements#types-of-legal-arrangements). Possible values: - **Association** - **Partnership** - **SoleProprietorship** - **Trust** (required). - public LegalArrangementDetail(ViasAddress address = default(ViasAddress), string legalArrangementCode = default(string), List legalArrangementEntities = default(List), string legalArrangementReference = default(string), LegalFormEnum? legalForm = default(LegalFormEnum?), string name = default(string), string registrationNumber = default(string), string taxNumber = default(string), TypeEnum type = default(TypeEnum)) - { - this.Address = address; - this.Name = name; - this.Type = type; - this.LegalArrangementCode = legalArrangementCode; - this.LegalArrangementEntities = legalArrangementEntities; - this.LegalArrangementReference = legalArrangementReference; - this.LegalForm = legalForm; - this.RegistrationNumber = registrationNumber; - this.TaxNumber = taxNumber; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. - [DataMember(Name = "legalArrangementCode", EmitDefaultValue = false)] - public string LegalArrangementCode { get; set; } - - /// - /// An array containing information about other entities that are part of the legal arrangement. - /// - /// An array containing information about other entities that are part of the legal arrangement. - [DataMember(Name = "legalArrangementEntities", EmitDefaultValue = false)] - public List LegalArrangementEntities { get; set; } - - /// - /// Your reference for the legal arrangement. Must be between 3 to 128 characters. - /// - /// Your reference for the legal arrangement. Must be between 3 to 128 characters. - [DataMember(Name = "legalArrangementReference", EmitDefaultValue = false)] - public string LegalArrangementReference { get; set; } - - /// - /// The legal name of the legal arrangement. Minimum length: 3 characters. - /// - /// The legal name of the legal arrangement. Minimum length: 3 characters. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The registration number of the legal arrangement. - /// - /// The registration number of the legal arrangement. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// The tax identification number of the legal arrangement. - /// - /// The tax identification number of the legal arrangement. - [DataMember(Name = "taxNumber", EmitDefaultValue = false)] - public string TaxNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalArrangementDetail {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" LegalArrangementCode: ").Append(LegalArrangementCode).Append("\n"); - sb.Append(" LegalArrangementEntities: ").Append(LegalArrangementEntities).Append("\n"); - sb.Append(" LegalArrangementReference: ").Append(LegalArrangementReference).Append("\n"); - sb.Append(" LegalForm: ").Append(LegalForm).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" TaxNumber: ").Append(TaxNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalArrangementDetail); - } - - /// - /// Returns true if LegalArrangementDetail instances are equal - /// - /// Instance of LegalArrangementDetail to be compared - /// Boolean - public bool Equals(LegalArrangementDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.LegalArrangementCode == input.LegalArrangementCode || - (this.LegalArrangementCode != null && - this.LegalArrangementCode.Equals(input.LegalArrangementCode)) - ) && - ( - this.LegalArrangementEntities == input.LegalArrangementEntities || - this.LegalArrangementEntities != null && - input.LegalArrangementEntities != null && - this.LegalArrangementEntities.SequenceEqual(input.LegalArrangementEntities) - ) && - ( - this.LegalArrangementReference == input.LegalArrangementReference || - (this.LegalArrangementReference != null && - this.LegalArrangementReference.Equals(input.LegalArrangementReference)) - ) && - ( - this.LegalForm == input.LegalForm || - this.LegalForm.Equals(input.LegalForm) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.TaxNumber == input.TaxNumber || - (this.TaxNumber != null && - this.TaxNumber.Equals(input.TaxNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.LegalArrangementCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementCode.GetHashCode(); - } - if (this.LegalArrangementEntities != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntities.GetHashCode(); - } - if (this.LegalArrangementReference != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalForm.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.TaxNumber != null) - { - hashCode = (hashCode * 59) + this.TaxNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/LegalArrangementEntityDetail.cs b/Adyen/Model/PlatformsWebhooks/LegalArrangementEntityDetail.cs deleted file mode 100644 index 536461d94..000000000 --- a/Adyen/Model/PlatformsWebhooks/LegalArrangementEntityDetail.cs +++ /dev/null @@ -1,401 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// LegalArrangementEntityDetail - /// - [DataContract(Name = "LegalArrangementEntityDetail")] - public partial class LegalArrangementEntityDetail : IEquatable, IValidatableObject - { - /// - /// Defines LegalArrangementMembers - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalArrangementMembersEnum - { - /// - /// Enum Beneficiary for value: Beneficiary - /// - [EnumMember(Value = "Beneficiary")] - Beneficiary = 1, - - /// - /// Enum ControllingPerson for value: ControllingPerson - /// - [EnumMember(Value = "ControllingPerson")] - ControllingPerson = 2, - - /// - /// Enum Partner for value: Partner - /// - [EnumMember(Value = "Partner")] - Partner = 3, - - /// - /// Enum Protector for value: Protector - /// - [EnumMember(Value = "Protector")] - Protector = 4, - - /// - /// Enum Settlor for value: Settlor - /// - [EnumMember(Value = "Settlor")] - Settlor = 5, - - /// - /// Enum Shareholder for value: Shareholder - /// - [EnumMember(Value = "Shareholder")] - Shareholder = 6, - - /// - /// Enum Trustee for value: Trustee - /// - [EnumMember(Value = "Trustee")] - Trustee = 7 - - } - - /// - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. - /// - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityTypeEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. - /// - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. - [DataMember(Name = "legalEntityType", EmitDefaultValue = false)] - public LegalEntityTypeEnum? LegalEntityType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// businessDetails. - /// The e-mail address of the entity.. - /// The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// individualDetails. - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail.. - /// Your reference for the legal arrangement entity.. - /// An array containing the roles of the entity in the legal arrangement. The possible values depend on the legal arrangement `type`. - For `type` **Association**: **ControllingPerson** and **Shareholder**. - For `type` **Partnership**: **Partner** and **Shareholder**. - For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**. . - /// The legal entity type. Possible values: **Business**, **Individual**, **NonProfit**, **PublicCompany**, or **Partnership**. . - /// phoneNumber. - /// The URL of the website of the contact.. - public LegalArrangementEntityDetail(ViasAddress address = default(ViasAddress), BusinessDetails businessDetails = default(BusinessDetails), string email = default(string), string fullPhoneNumber = default(string), IndividualDetails individualDetails = default(IndividualDetails), string legalArrangementEntityCode = default(string), string legalArrangementEntityReference = default(string), List legalArrangementMembers = default(List), LegalEntityTypeEnum? legalEntityType = default(LegalEntityTypeEnum?), ViasPhoneNumber phoneNumber = default(ViasPhoneNumber), string webAddress = default(string)) - { - this.Address = address; - this.BusinessDetails = businessDetails; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.IndividualDetails = individualDetails; - this.LegalArrangementEntityCode = legalArrangementEntityCode; - this.LegalArrangementEntityReference = legalArrangementEntityReference; - this.LegalArrangementMembers = legalArrangementMembers; - this.LegalEntityType = legalEntityType; - this.PhoneNumber = phoneNumber; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// Gets or Sets BusinessDetails - /// - [DataMember(Name = "businessDetails", EmitDefaultValue = false)] - public BusinessDetails BusinessDetails { get; set; } - - /// - /// The e-mail address of the entity. - /// - /// The e-mail address of the entity. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the contact provided as a single string. It will be handled as a landline phone. **Examples:** \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Gets or Sets IndividualDetails - /// - [DataMember(Name = "individualDetails", EmitDefaultValue = false)] - public IndividualDetails IndividualDetails { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create a legal arrangement entity. Use only when updating an account holder. If you include this field when creating an account holder, the request will fail. - [DataMember(Name = "legalArrangementEntityCode", EmitDefaultValue = false)] - public string LegalArrangementEntityCode { get; set; } - - /// - /// Your reference for the legal arrangement entity. - /// - /// Your reference for the legal arrangement entity. - [DataMember(Name = "legalArrangementEntityReference", EmitDefaultValue = false)] - public string LegalArrangementEntityReference { get; set; } - - /// - /// An array containing the roles of the entity in the legal arrangement. The possible values depend on the legal arrangement `type`. - For `type` **Association**: **ControllingPerson** and **Shareholder**. - For `type` **Partnership**: **Partner** and **Shareholder**. - For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**. - /// - /// An array containing the roles of the entity in the legal arrangement. The possible values depend on the legal arrangement `type`. - For `type` **Association**: **ControllingPerson** and **Shareholder**. - For `type` **Partnership**: **Partner** and **Shareholder**. - For `type` **Trust**: **Trustee**, **Settlor**, **Protector**, **Beneficiary**, and **Shareholder**. - [DataMember(Name = "legalArrangementMembers", EmitDefaultValue = false)] - public List LegalArrangementMembers { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public ViasPhoneNumber PhoneNumber { get; set; } - - /// - /// The URL of the website of the contact. - /// - /// The URL of the website of the contact. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LegalArrangementEntityDetail {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BusinessDetails: ").Append(BusinessDetails).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" IndividualDetails: ").Append(IndividualDetails).Append("\n"); - sb.Append(" LegalArrangementEntityCode: ").Append(LegalArrangementEntityCode).Append("\n"); - sb.Append(" LegalArrangementEntityReference: ").Append(LegalArrangementEntityReference).Append("\n"); - sb.Append(" LegalArrangementMembers: ").Append(LegalArrangementMembers).Append("\n"); - sb.Append(" LegalEntityType: ").Append(LegalEntityType).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LegalArrangementEntityDetail); - } - - /// - /// Returns true if LegalArrangementEntityDetail instances are equal - /// - /// Instance of LegalArrangementEntityDetail to be compared - /// Boolean - public bool Equals(LegalArrangementEntityDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BusinessDetails == input.BusinessDetails || - (this.BusinessDetails != null && - this.BusinessDetails.Equals(input.BusinessDetails)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.IndividualDetails == input.IndividualDetails || - (this.IndividualDetails != null && - this.IndividualDetails.Equals(input.IndividualDetails)) - ) && - ( - this.LegalArrangementEntityCode == input.LegalArrangementEntityCode || - (this.LegalArrangementEntityCode != null && - this.LegalArrangementEntityCode.Equals(input.LegalArrangementEntityCode)) - ) && - ( - this.LegalArrangementEntityReference == input.LegalArrangementEntityReference || - (this.LegalArrangementEntityReference != null && - this.LegalArrangementEntityReference.Equals(input.LegalArrangementEntityReference)) - ) && - ( - this.LegalArrangementMembers == input.LegalArrangementMembers || - this.LegalArrangementMembers != null && - input.LegalArrangementMembers != null && - this.LegalArrangementMembers.SequenceEqual(input.LegalArrangementMembers) - ) && - ( - this.LegalEntityType == input.LegalEntityType || - this.LegalEntityType.Equals(input.LegalEntityType) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BusinessDetails != null) - { - hashCode = (hashCode * 59) + this.BusinessDetails.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.IndividualDetails != null) - { - hashCode = (hashCode * 59) + this.IndividualDetails.GetHashCode(); - } - if (this.LegalArrangementEntityCode != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityCode.GetHashCode(); - } - if (this.LegalArrangementEntityReference != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementEntityReference.GetHashCode(); - } - if (this.LegalArrangementMembers != null) - { - hashCode = (hashCode * 59) + this.LegalArrangementMembers.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntityType.GetHashCode(); - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/LocalDate.cs b/Adyen/Model/PlatformsWebhooks/LocalDate.cs deleted file mode 100644 index e36d5f22a..000000000 --- a/Adyen/Model/PlatformsWebhooks/LocalDate.cs +++ /dev/null @@ -1,138 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// LocalDate - /// - [DataContract(Name = "LocalDate")] - public partial class LocalDate : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// month. - /// year. - public LocalDate(int? month = default(int?), int? year = default(int?)) - { - this.Month = month; - this.Year = year; - } - - /// - /// Gets or Sets Month - /// - [DataMember(Name = "month", EmitDefaultValue = false)] - public int? Month { get; set; } - - /// - /// Gets or Sets Year - /// - [DataMember(Name = "year", EmitDefaultValue = false)] - public int? Year { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LocalDate {\n"); - sb.Append(" Month: ").Append(Month).Append("\n"); - sb.Append(" Year: ").Append(Year).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LocalDate); - } - - /// - /// Returns true if LocalDate instances are equal - /// - /// Instance of LocalDate to be compared - /// Boolean - public bool Equals(LocalDate input) - { - if (input == null) - { - return false; - } - return - ( - this.Month == input.Month || - this.Month.Equals(input.Month) - ) && - ( - this.Year == input.Year || - this.Year.Equals(input.Year) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Month.GetHashCode(); - hashCode = (hashCode * 59) + this.Year.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/Message.cs b/Adyen/Model/PlatformsWebhooks/Message.cs deleted file mode 100644 index 8c7a1a22b..000000000 --- a/Adyen/Model/PlatformsWebhooks/Message.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// Message - /// - [DataContract(Name = "Message")] - public partial class Message : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The message code.. - /// The message text.. - public Message(string code = default(string), string text = default(string)) - { - this.Code = code; - this.Text = text; - } - - /// - /// The message code. - /// - /// The message code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The message text. - /// - /// The message text. - [DataMember(Name = "text", EmitDefaultValue = false)] - public string Text { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Message {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Message); - } - - /// - /// Returns true if Message instances are equal - /// - /// Instance of Message to be compared - /// Boolean - public bool Equals(Message input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Text != null) - { - hashCode = (hashCode * 59) + this.Text.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/NotificationErrorContainer.cs b/Adyen/Model/PlatformsWebhooks/NotificationErrorContainer.cs deleted file mode 100644 index 10ba31b3a..000000000 --- a/Adyen/Model/PlatformsWebhooks/NotificationErrorContainer.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// NotificationErrorContainer - /// - [DataContract(Name = "NotificationErrorContainer")] - public partial class NotificationErrorContainer : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The Adyen code that is mapped to the error message.. - /// A short explanation of the issue.. - public NotificationErrorContainer(string errorCode = default(string), string message = default(string)) - { - this.ErrorCode = errorCode; - this.Message = message; - } - - /// - /// The Adyen code that is mapped to the error message. - /// - /// The Adyen code that is mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NotificationErrorContainer {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotificationErrorContainer); - } - - /// - /// Returns true if NotificationErrorContainer instances are equal - /// - /// Instance of NotificationErrorContainer to be compared - /// Boolean - public bool Equals(NotificationErrorContainer input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/NotificationResponse.cs b/Adyen/Model/PlatformsWebhooks/NotificationResponse.cs deleted file mode 100644 index 3636c5a65..000000000 --- a/Adyen/Model/PlatformsWebhooks/NotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// NotificationResponse - /// - [DataContract(Name = "NotificationResponse")] - public partial class NotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Set this parameter to **[accepted]** to acknowledge that you received a notification from Adyen.. - public NotificationResponse(string notificationResponse = default(string)) - { - this._NotificationResponse = notificationResponse; - } - - /// - /// Set this parameter to **[accepted]** to acknowledge that you received a notification from Adyen. - /// - /// Set this parameter to **[accepted]** to acknowledge that you received a notification from Adyen. - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string _NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NotificationResponse {\n"); - sb.Append(" _NotificationResponse: ").Append(_NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotificationResponse); - } - - /// - /// Returns true if NotificationResponse instances are equal - /// - /// Instance of NotificationResponse to be compared - /// Boolean - public bool Equals(NotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this._NotificationResponse == input._NotificationResponse || - (this._NotificationResponse != null && - this._NotificationResponse.Equals(input._NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._NotificationResponse != null) - { - hashCode = (hashCode * 59) + this._NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/OperationStatus.cs b/Adyen/Model/PlatformsWebhooks/OperationStatus.cs deleted file mode 100644 index 3e14b9e0d..000000000 --- a/Adyen/Model/PlatformsWebhooks/OperationStatus.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// OperationStatus - /// - [DataContract(Name = "OperationStatus")] - public partial class OperationStatus : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// message. - /// The status code.. - public OperationStatus(Message message = default(Message), string statusCode = default(string)) - { - this.Message = message; - this.StatusCode = statusCode; - } - - /// - /// Gets or Sets Message - /// - [DataMember(Name = "message", EmitDefaultValue = false)] - public Message Message { get; set; } - - /// - /// The status code. - /// - /// The status code. - [DataMember(Name = "statusCode", EmitDefaultValue = false)] - public string StatusCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OperationStatus {\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" StatusCode: ").Append(StatusCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OperationStatus); - } - - /// - /// Returns true if OperationStatus instances are equal - /// - /// Instance of OperationStatus to be compared - /// Boolean - public bool Equals(OperationStatus input) - { - if (input == null) - { - return false; - } - return - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.StatusCode == input.StatusCode || - (this.StatusCode != null && - this.StatusCode.Equals(input.StatusCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.StatusCode != null) - { - hashCode = (hashCode * 59) + this.StatusCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/PaymentFailureNotification.cs b/Adyen/Model/PlatformsWebhooks/PaymentFailureNotification.cs deleted file mode 100644 index 39a6ee379..000000000 --- a/Adyen/Model/PlatformsWebhooks/PaymentFailureNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// PaymentFailureNotification - /// - [DataContract(Name = "PaymentFailureNotification")] - public partial class PaymentFailureNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PaymentFailureNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public PaymentFailureNotification(PaymentFailureNotificationContent content = default(PaymentFailureNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public PaymentFailureNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentFailureNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentFailureNotification); - } - - /// - /// Returns true if PaymentFailureNotification instances are equal - /// - /// Instance of PaymentFailureNotification to be compared - /// Boolean - public bool Equals(PaymentFailureNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/PaymentFailureNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/PaymentFailureNotificationContent.cs deleted file mode 100644 index 34ae919a2..000000000 --- a/Adyen/Model/PlatformsWebhooks/PaymentFailureNotificationContent.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// PaymentFailureNotificationContent - /// - [DataContract(Name = "PaymentFailureNotificationContent")] - public partial class PaymentFailureNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Missing or invalid fields that caused the payment error.. - /// errorMessage. - /// The `reference` of the capture or refund.. - /// The `pspReference` of the capture or refund.. - /// The `reference` of the payment.. - /// The `pspReference` of the payment.. - public PaymentFailureNotificationContent(List errorFields = default(List), Message errorMessage = default(Message), string modificationMerchantReference = default(string), string modificationPspReference = default(string), string paymentMerchantReference = default(string), string paymentPspReference = default(string)) - { - this.ErrorFields = errorFields; - this.ErrorMessage = errorMessage; - this.ModificationMerchantReference = modificationMerchantReference; - this.ModificationPspReference = modificationPspReference; - this.PaymentMerchantReference = paymentMerchantReference; - this.PaymentPspReference = paymentPspReference; - } - - /// - /// Missing or invalid fields that caused the payment error. - /// - /// Missing or invalid fields that caused the payment error. - [DataMember(Name = "errorFields", EmitDefaultValue = false)] - public List ErrorFields { get; set; } - - /// - /// Gets or Sets ErrorMessage - /// - [DataMember(Name = "errorMessage", EmitDefaultValue = false)] - public Message ErrorMessage { get; set; } - - /// - /// The `reference` of the capture or refund. - /// - /// The `reference` of the capture or refund. - [DataMember(Name = "modificationMerchantReference", EmitDefaultValue = false)] - public string ModificationMerchantReference { get; set; } - - /// - /// The `pspReference` of the capture or refund. - /// - /// The `pspReference` of the capture or refund. - [DataMember(Name = "modificationPspReference", EmitDefaultValue = false)] - public string ModificationPspReference { get; set; } - - /// - /// The `reference` of the payment. - /// - /// The `reference` of the payment. - [DataMember(Name = "paymentMerchantReference", EmitDefaultValue = false)] - public string PaymentMerchantReference { get; set; } - - /// - /// The `pspReference` of the payment. - /// - /// The `pspReference` of the payment. - [DataMember(Name = "paymentPspReference", EmitDefaultValue = false)] - public string PaymentPspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentFailureNotificationContent {\n"); - sb.Append(" ErrorFields: ").Append(ErrorFields).Append("\n"); - sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); - sb.Append(" ModificationMerchantReference: ").Append(ModificationMerchantReference).Append("\n"); - sb.Append(" ModificationPspReference: ").Append(ModificationPspReference).Append("\n"); - sb.Append(" PaymentMerchantReference: ").Append(PaymentMerchantReference).Append("\n"); - sb.Append(" PaymentPspReference: ").Append(PaymentPspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentFailureNotificationContent); - } - - /// - /// Returns true if PaymentFailureNotificationContent instances are equal - /// - /// Instance of PaymentFailureNotificationContent to be compared - /// Boolean - public bool Equals(PaymentFailureNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorFields == input.ErrorFields || - this.ErrorFields != null && - input.ErrorFields != null && - this.ErrorFields.SequenceEqual(input.ErrorFields) - ) && - ( - this.ErrorMessage == input.ErrorMessage || - (this.ErrorMessage != null && - this.ErrorMessage.Equals(input.ErrorMessage)) - ) && - ( - this.ModificationMerchantReference == input.ModificationMerchantReference || - (this.ModificationMerchantReference != null && - this.ModificationMerchantReference.Equals(input.ModificationMerchantReference)) - ) && - ( - this.ModificationPspReference == input.ModificationPspReference || - (this.ModificationPspReference != null && - this.ModificationPspReference.Equals(input.ModificationPspReference)) - ) && - ( - this.PaymentMerchantReference == input.PaymentMerchantReference || - (this.PaymentMerchantReference != null && - this.PaymentMerchantReference.Equals(input.PaymentMerchantReference)) - ) && - ( - this.PaymentPspReference == input.PaymentPspReference || - (this.PaymentPspReference != null && - this.PaymentPspReference.Equals(input.PaymentPspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorFields != null) - { - hashCode = (hashCode * 59) + this.ErrorFields.GetHashCode(); - } - if (this.ErrorMessage != null) - { - hashCode = (hashCode * 59) + this.ErrorMessage.GetHashCode(); - } - if (this.ModificationMerchantReference != null) - { - hashCode = (hashCode * 59) + this.ModificationMerchantReference.GetHashCode(); - } - if (this.ModificationPspReference != null) - { - hashCode = (hashCode * 59) + this.ModificationPspReference.GetHashCode(); - } - if (this.PaymentMerchantReference != null) - { - hashCode = (hashCode * 59) + this.PaymentMerchantReference.GetHashCode(); - } - if (this.PaymentPspReference != null) - { - hashCode = (hashCode * 59) + this.PaymentPspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/PayoutMethod.cs b/Adyen/Model/PlatformsWebhooks/PayoutMethod.cs deleted file mode 100644 index 14b0dbff6..000000000 --- a/Adyen/Model/PlatformsWebhooks/PayoutMethod.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// PayoutMethod - /// - [DataContract(Name = "PayoutMethod")] - public partial class PayoutMethod : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PayoutMethod() { } - /// - /// Initializes a new instance of the class. - /// - /// The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). (required). - /// Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request.. - /// Your reference for the payout method.. - /// The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). (required). - /// The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). (required). - public PayoutMethod(string merchantAccount = default(string), string payoutMethodCode = default(string), string payoutMethodReference = default(string), string recurringDetailReference = default(string), string shopperReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperReference = shopperReference; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutMethodReference = payoutMethodReference; - } - - /// - /// The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - /// - /// The [`merchantAccount`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_merchantAccount) you used in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the payout method, returned in the response when you create a payout method. Required when updating an existing payout method in an `/updateAccountHolder` request. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Your reference for the payout method. - /// - /// Your reference for the payout method. - [DataMember(Name = "payoutMethodReference", EmitDefaultValue = false)] - public string PayoutMethodReference { get; set; } - - /// - /// The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - /// - /// The [`recurringDetailReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_additionalData-ResponseAdditionalDataCommon-recurring-recurringDetailReference) returned in the `/payments` response when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - [DataMember(Name = "recurringDetailReference", IsRequired = false, EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - /// - /// The [`shopperReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__reqParam_shopperReference) you sent in the `/payments` request when you [saved the account holder's card details](https://docs.adyen.com/marketplaces-and-platforms/classic/payouts/manual-payout/payout-to-cards#check-and-store). - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutMethod {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutMethodReference: ").Append(PayoutMethodReference).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutMethod); - } - - /// - /// Returns true if PayoutMethod instances are equal - /// - /// Instance of PayoutMethod to be compared - /// Boolean - public bool Equals(PayoutMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutMethodReference == input.PayoutMethodReference || - (this.PayoutMethodReference != null && - this.PayoutMethodReference.Equals(input.PayoutMethodReference)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.PayoutMethodReference != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodReference.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/PayoutScheduleResponse.cs b/Adyen/Model/PlatformsWebhooks/PayoutScheduleResponse.cs deleted file mode 100644 index 450ba8d37..000000000 --- a/Adyen/Model/PlatformsWebhooks/PayoutScheduleResponse.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// PayoutScheduleResponse - /// - [DataContract(Name = "PayoutScheduleResponse")] - public partial class PayoutScheduleResponse : IEquatable, IValidatableObject - { - /// - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. - /// - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. - [JsonConverter(typeof(StringEnumConverter))] - public enum ScheduleEnum - { - /// - /// Enum BIWEEKLYON1STAND15THATMIDNIGHT for value: BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT - /// - [EnumMember(Value = "BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT")] - BIWEEKLYON1STAND15THATMIDNIGHT = 1, - - /// - /// Enum DAILY for value: DAILY - /// - [EnumMember(Value = "DAILY")] - DAILY = 2, - - /// - /// Enum DAILYAU for value: DAILY_AU - /// - [EnumMember(Value = "DAILY_AU")] - DAILYAU = 3, - - /// - /// Enum DAILYEU for value: DAILY_EU - /// - [EnumMember(Value = "DAILY_EU")] - DAILYEU = 4, - - /// - /// Enum DAILYSG for value: DAILY_SG - /// - [EnumMember(Value = "DAILY_SG")] - DAILYSG = 5, - - /// - /// Enum DAILYUS for value: DAILY_US - /// - [EnumMember(Value = "DAILY_US")] - DAILYUS = 6, - - /// - /// Enum HOLD for value: HOLD - /// - [EnumMember(Value = "HOLD")] - HOLD = 7, - - /// - /// Enum MONTHLY for value: MONTHLY - /// - [EnumMember(Value = "MONTHLY")] - MONTHLY = 8, - - /// - /// Enum WEEKLY for value: WEEKLY - /// - [EnumMember(Value = "WEEKLY")] - WEEKLY = 9, - - /// - /// Enum WEEKLYMONTOFRIAU for value: WEEKLY_MON_TO_FRI_AU - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_AU")] - WEEKLYMONTOFRIAU = 10, - - /// - /// Enum WEEKLYMONTOFRIEU for value: WEEKLY_MON_TO_FRI_EU - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_EU")] - WEEKLYMONTOFRIEU = 11, - - /// - /// Enum WEEKLYMONTOFRIUS for value: WEEKLY_MON_TO_FRI_US - /// - [EnumMember(Value = "WEEKLY_MON_TO_FRI_US")] - WEEKLYMONTOFRIUS = 12, - - /// - /// Enum WEEKLYONTUEFRIMIDNIGHT for value: WEEKLY_ON_TUE_FRI_MIDNIGHT - /// - [EnumMember(Value = "WEEKLY_ON_TUE_FRI_MIDNIGHT")] - WEEKLYONTUEFRIMIDNIGHT = 13, - - /// - /// Enum WEEKLYSUNTOTHUAU for value: WEEKLY_SUN_TO_THU_AU - /// - [EnumMember(Value = "WEEKLY_SUN_TO_THU_AU")] - WEEKLYSUNTOTHUAU = 14, - - /// - /// Enum WEEKLYSUNTOTHUUS for value: WEEKLY_SUN_TO_THU_US - /// - [EnumMember(Value = "WEEKLY_SUN_TO_THU_US")] - WEEKLYSUNTOTHUUS = 15 - - } - - - /// - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. - /// - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`. - [DataMember(Name = "schedule", EmitDefaultValue = false)] - public ScheduleEnum? Schedule { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The date of the next scheduled payout.. - /// The payout schedule of the account. Permitted values: `DEFAULT`, `DAILY`, `DAILY_US`, `DAILY_EU`, `DAILY_AU`, `DAILY_SG`, `WEEKLY`, `WEEKLY_ON_TUE_FRI_MIDNIGHT`, `BIWEEKLY_ON_1ST_AND_15TH_AT_MIDNIGHT`, `MONTHLY`, `HOLD`.. - public PayoutScheduleResponse(DateTime nextScheduledPayout = default(DateTime), ScheduleEnum? schedule = default(ScheduleEnum?)) - { - this.NextScheduledPayout = nextScheduledPayout; - this.Schedule = schedule; - } - - /// - /// The date of the next scheduled payout. - /// - /// The date of the next scheduled payout. - [DataMember(Name = "nextScheduledPayout", EmitDefaultValue = false)] - public DateTime NextScheduledPayout { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PayoutScheduleResponse {\n"); - sb.Append(" NextScheduledPayout: ").Append(NextScheduledPayout).Append("\n"); - sb.Append(" Schedule: ").Append(Schedule).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PayoutScheduleResponse); - } - - /// - /// Returns true if PayoutScheduleResponse instances are equal - /// - /// Instance of PayoutScheduleResponse to be compared - /// Boolean - public bool Equals(PayoutScheduleResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NextScheduledPayout == input.NextScheduledPayout || - (this.NextScheduledPayout != null && - this.NextScheduledPayout.Equals(input.NextScheduledPayout)) - ) && - ( - this.Schedule == input.Schedule || - this.Schedule.Equals(input.Schedule) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NextScheduledPayout != null) - { - hashCode = (hashCode * 59) + this.NextScheduledPayout.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Schedule.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/PersonalDocumentData.cs b/Adyen/Model/PlatformsWebhooks/PersonalDocumentData.cs deleted file mode 100644 index 1c3997458..000000000 --- a/Adyen/Model/PlatformsWebhooks/PersonalDocumentData.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// PersonalDocumentData - /// - [DataContract(Name = "PersonalDocumentData")] - public partial class PersonalDocumentData : IEquatable, IValidatableObject - { - /// - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. - /// - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DRIVINGLICENSE for value: DRIVINGLICENSE - /// - [EnumMember(Value = "DRIVINGLICENSE")] - DRIVINGLICENSE = 1, - - /// - /// Enum ID for value: ID - /// - [EnumMember(Value = "ID")] - ID = 2, - - /// - /// Enum PASSPORT for value: PASSPORT - /// - [EnumMember(Value = "PASSPORT")] - PASSPORT = 3, - - /// - /// Enum SOCIALSECURITY for value: SOCIALSECURITY - /// - [EnumMember(Value = "SOCIALSECURITY")] - SOCIALSECURITY = 4, - - /// - /// Enum VISA for value: VISA - /// - [EnumMember(Value = "VISA")] - VISA = 5 - - } - - - /// - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. - /// - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PersonalDocumentData() { } - /// - /// Initializes a new instance of the class. - /// - /// The expiry date of the document, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.. - /// The country where the document was issued, in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**.. - /// The state where the document was issued (if applicable).. - /// The number in the document.. - /// The type of the document. Possible values: **ID**, **DRIVINGLICENSE**, **PASSPORT**, **SOCIALSECURITY**, **VISA**. To delete an existing entry for a document `type`, send only the `type` field in your request. (required). - public PersonalDocumentData(string expirationDate = default(string), string issuerCountry = default(string), string issuerState = default(string), string number = default(string), TypeEnum type = default(TypeEnum)) - { - this.Type = type; - this.ExpirationDate = expirationDate; - this.IssuerCountry = issuerCountry; - this.IssuerState = issuerState; - this.Number = number; - } - - /// - /// The expiry date of the document, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. - /// - /// The expiry date of the document, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. - [DataMember(Name = "expirationDate", EmitDefaultValue = false)] - public string ExpirationDate { get; set; } - - /// - /// The country where the document was issued, in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. - /// - /// The country where the document was issued, in the two-character [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. - [DataMember(Name = "issuerCountry", EmitDefaultValue = false)] - public string IssuerCountry { get; set; } - - /// - /// The state where the document was issued (if applicable). - /// - /// The state where the document was issued (if applicable). - [DataMember(Name = "issuerState", EmitDefaultValue = false)] - public string IssuerState { get; set; } - - /// - /// The number in the document. - /// - /// The number in the document. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PersonalDocumentData {\n"); - sb.Append(" ExpirationDate: ").Append(ExpirationDate).Append("\n"); - sb.Append(" IssuerCountry: ").Append(IssuerCountry).Append("\n"); - sb.Append(" IssuerState: ").Append(IssuerState).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PersonalDocumentData); - } - - /// - /// Returns true if PersonalDocumentData instances are equal - /// - /// Instance of PersonalDocumentData to be compared - /// Boolean - public bool Equals(PersonalDocumentData input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpirationDate == input.ExpirationDate || - (this.ExpirationDate != null && - this.ExpirationDate.Equals(input.ExpirationDate)) - ) && - ( - this.IssuerCountry == input.IssuerCountry || - (this.IssuerCountry != null && - this.IssuerCountry.Equals(input.IssuerCountry)) - ) && - ( - this.IssuerState == input.IssuerState || - (this.IssuerState != null && - this.IssuerState.Equals(input.IssuerState)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpirationDate != null) - { - hashCode = (hashCode * 59) + this.ExpirationDate.GetHashCode(); - } - if (this.IssuerCountry != null) - { - hashCode = (hashCode * 59) + this.IssuerCountry.GetHashCode(); - } - if (this.IssuerState != null) - { - hashCode = (hashCode * 59) + this.IssuerState.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // IssuerCountry (string) maxLength - if (this.IssuerCountry != null && this.IssuerCountry.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssuerCountry, length must be less than 2.", new [] { "IssuerCountry" }); - } - - // IssuerCountry (string) minLength - if (this.IssuerCountry != null && this.IssuerCountry.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssuerCountry, length must be greater than 2.", new [] { "IssuerCountry" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/RefundFundsTransferNotification.cs b/Adyen/Model/PlatformsWebhooks/RefundFundsTransferNotification.cs deleted file mode 100644 index 5253ad8c7..000000000 --- a/Adyen/Model/PlatformsWebhooks/RefundFundsTransferNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// RefundFundsTransferNotification - /// - [DataContract(Name = "RefundFundsTransferNotification")] - public partial class RefundFundsTransferNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RefundFundsTransferNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public RefundFundsTransferNotification(RefundFundsTransferNotificationContent content = default(RefundFundsTransferNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public RefundFundsTransferNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RefundFundsTransferNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RefundFundsTransferNotification); - } - - /// - /// Returns true if RefundFundsTransferNotification instances are equal - /// - /// Instance of RefundFundsTransferNotification to be compared - /// Boolean - public bool Equals(RefundFundsTransferNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/RefundFundsTransferNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/RefundFundsTransferNotificationContent.cs deleted file mode 100644 index 178730659..000000000 --- a/Adyen/Model/PlatformsWebhooks/RefundFundsTransferNotificationContent.cs +++ /dev/null @@ -1,209 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// RefundFundsTransferNotificationContent - /// - [DataContract(Name = "RefundFundsTransferNotificationContent")] - public partial class RefundFundsTransferNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RefundFundsTransferNotificationContent() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// Invalid fields list.. - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another.. - /// A PSP reference of the original fund transfer. (required). - /// status. - public RefundFundsTransferNotificationContent(Amount amount = default(Amount), List invalidFields = default(List), string merchantReference = default(string), string originalReference = default(string), OperationStatus status = default(OperationStatus)) - { - this.Amount = amount; - this.OriginalReference = originalReference; - this.InvalidFields = invalidFields; - this.MerchantReference = merchantReference; - this.Status = status; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Invalid fields list. - /// - /// Invalid fields list. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. - /// - /// A value that can be supplied at the discretion of the executing user in order to link multiple transactions to one another. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// A PSP reference of the original fund transfer. - /// - /// A PSP reference of the original fund transfer. - [DataMember(Name = "originalReference", IsRequired = false, EmitDefaultValue = false)] - public string OriginalReference { get; set; } - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = false)] - public OperationStatus Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RefundFundsTransferNotificationContent {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" OriginalReference: ").Append(OriginalReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RefundFundsTransferNotificationContent); - } - - /// - /// Returns true if RefundFundsTransferNotificationContent instances are equal - /// - /// Instance of RefundFundsTransferNotificationContent to be compared - /// Boolean - public bool Equals(RefundFundsTransferNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.OriginalReference == input.OriginalReference || - (this.OriginalReference != null && - this.OriginalReference.Equals(input.OriginalReference)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.OriginalReference != null) - { - hashCode = (hashCode * 59) + this.OriginalReference.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/RefundResult.cs b/Adyen/Model/PlatformsWebhooks/RefundResult.cs deleted file mode 100644 index e4251e4f3..000000000 --- a/Adyen/Model/PlatformsWebhooks/RefundResult.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// RefundResult - /// - [DataContract(Name = "RefundResult")] - public partial class RefundResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// originalTransaction. - /// The reference of the refund.. - /// The response indicating if the refund has been received for processing.. - public RefundResult(Transaction originalTransaction = default(Transaction), string pspReference = default(string), string response = default(string)) - { - this.OriginalTransaction = originalTransaction; - this.PspReference = pspReference; - this.Response = response; - } - - /// - /// Gets or Sets OriginalTransaction - /// - [DataMember(Name = "originalTransaction", EmitDefaultValue = false)] - public Transaction OriginalTransaction { get; set; } - - /// - /// The reference of the refund. - /// - /// The reference of the refund. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The response indicating if the refund has been received for processing. - /// - /// The response indicating if the refund has been received for processing. - [DataMember(Name = "response", EmitDefaultValue = false)] - public string Response { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RefundResult {\n"); - sb.Append(" OriginalTransaction: ").Append(OriginalTransaction).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Response: ").Append(Response).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RefundResult); - } - - /// - /// Returns true if RefundResult instances are equal - /// - /// Instance of RefundResult to be compared - /// Boolean - public bool Equals(RefundResult input) - { - if (input == null) - { - return false; - } - return - ( - this.OriginalTransaction == input.OriginalTransaction || - (this.OriginalTransaction != null && - this.OriginalTransaction.Equals(input.OriginalTransaction)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Response == input.Response || - (this.Response != null && - this.Response.Equals(input.Response)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OriginalTransaction != null) - { - hashCode = (hashCode * 59) + this.OriginalTransaction.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Response != null) - { - hashCode = (hashCode * 59) + this.Response.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ReportAvailableNotification.cs b/Adyen/Model/PlatformsWebhooks/ReportAvailableNotification.cs deleted file mode 100644 index 5b5136d3f..000000000 --- a/Adyen/Model/PlatformsWebhooks/ReportAvailableNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ReportAvailableNotification - /// - [DataContract(Name = "ReportAvailableNotification")] - public partial class ReportAvailableNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ReportAvailableNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public ReportAvailableNotification(ReportAvailableNotificationContent content = default(ReportAvailableNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public ReportAvailableNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReportAvailableNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReportAvailableNotification); - } - - /// - /// Returns true if ReportAvailableNotification instances are equal - /// - /// Instance of ReportAvailableNotification to be compared - /// Boolean - public bool Equals(ReportAvailableNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ReportAvailableNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/ReportAvailableNotificationContent.cs deleted file mode 100644 index 327d8ee6c..000000000 --- a/Adyen/Model/PlatformsWebhooks/ReportAvailableNotificationContent.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ReportAvailableNotificationContent - /// - [DataContract(Name = "ReportAvailableNotificationContent")] - public partial class ReportAvailableNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the Account to which the report applies.. - /// The type of Account to which the report applies.. - /// The date of the event to which the report applies.. - /// The URL at which the report can be accessed.. - /// Indicates whether the event resulted in a success.. - public ReportAvailableNotificationContent(string accountCode = default(string), string accountType = default(string), DateTime eventDate = default(DateTime), string remoteAccessUrl = default(string), bool? success = default(bool?)) - { - this.AccountCode = accountCode; - this.AccountType = accountType; - this.EventDate = eventDate; - this.RemoteAccessUrl = remoteAccessUrl; - this.Success = success; - } - - /// - /// The code of the Account to which the report applies. - /// - /// The code of the Account to which the report applies. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The type of Account to which the report applies. - /// - /// The type of Account to which the report applies. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public string AccountType { get; set; } - - /// - /// The date of the event to which the report applies. - /// - /// The date of the event to which the report applies. - [DataMember(Name = "eventDate", EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The URL at which the report can be accessed. - /// - /// The URL at which the report can be accessed. - [DataMember(Name = "remoteAccessUrl", EmitDefaultValue = false)] - public string RemoteAccessUrl { get; set; } - - /// - /// Indicates whether the event resulted in a success. - /// - /// Indicates whether the event resulted in a success. - [DataMember(Name = "success", EmitDefaultValue = false)] - public bool? Success { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReportAvailableNotificationContent {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" RemoteAccessUrl: ").Append(RemoteAccessUrl).Append("\n"); - sb.Append(" Success: ").Append(Success).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReportAvailableNotificationContent); - } - - /// - /// Returns true if ReportAvailableNotificationContent instances are equal - /// - /// Instance of ReportAvailableNotificationContent to be compared - /// Boolean - public bool Equals(ReportAvailableNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.RemoteAccessUrl == input.RemoteAccessUrl || - (this.RemoteAccessUrl != null && - this.RemoteAccessUrl.Equals(input.RemoteAccessUrl)) - ) && - ( - this.Success == input.Success || - this.Success.Equals(input.Success) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.RemoteAccessUrl != null) - { - hashCode = (hashCode * 59) + this.RemoteAccessUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Success.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ScheduledRefundsNotification.cs b/Adyen/Model/PlatformsWebhooks/ScheduledRefundsNotification.cs deleted file mode 100644 index 1e35b479f..000000000 --- a/Adyen/Model/PlatformsWebhooks/ScheduledRefundsNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ScheduledRefundsNotification - /// - [DataContract(Name = "ScheduledRefundsNotification")] - public partial class ScheduledRefundsNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ScheduledRefundsNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public ScheduledRefundsNotification(ScheduledRefundsNotificationContent content = default(ScheduledRefundsNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public ScheduledRefundsNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ScheduledRefundsNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ScheduledRefundsNotification); - } - - /// - /// Returns true if ScheduledRefundsNotification instances are equal - /// - /// Instance of ScheduledRefundsNotification to be compared - /// Boolean - public bool Equals(ScheduledRefundsNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ScheduledRefundsNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/ScheduledRefundsNotificationContent.cs deleted file mode 100644 index 960076c38..000000000 --- a/Adyen/Model/PlatformsWebhooks/ScheduledRefundsNotificationContent.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ScheduledRefundsNotificationContent - /// - [DataContract(Name = "ScheduledRefundsNotificationContent")] - public partial class ScheduledRefundsNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The code of the account.. - /// The code of the Account Holder.. - /// Invalid fields list.. - /// lastPayout. - /// A list of the refunds that have been scheduled and their results.. - public ScheduledRefundsNotificationContent(string accountCode = default(string), string accountHolderCode = default(string), List invalidFields = default(List), Transaction lastPayout = default(Transaction), List refundResults = default(List)) - { - this.AccountCode = accountCode; - this.AccountHolderCode = accountHolderCode; - this.InvalidFields = invalidFields; - this.LastPayout = lastPayout; - this.RefundResults = refundResults; - } - - /// - /// The code of the account. - /// - /// The code of the account. - [DataMember(Name = "accountCode", EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The code of the Account Holder. - /// - /// The code of the Account Holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Invalid fields list. - /// - /// Invalid fields list. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// Gets or Sets LastPayout - /// - [DataMember(Name = "lastPayout", EmitDefaultValue = false)] - public Transaction LastPayout { get; set; } - - /// - /// A list of the refunds that have been scheduled and their results. - /// - /// A list of the refunds that have been scheduled and their results. - [DataMember(Name = "refundResults", EmitDefaultValue = false)] - public List RefundResults { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ScheduledRefundsNotificationContent {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" LastPayout: ").Append(LastPayout).Append("\n"); - sb.Append(" RefundResults: ").Append(RefundResults).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ScheduledRefundsNotificationContent); - } - - /// - /// Returns true if ScheduledRefundsNotificationContent instances are equal - /// - /// Instance of ScheduledRefundsNotificationContent to be compared - /// Boolean - public bool Equals(ScheduledRefundsNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.LastPayout == input.LastPayout || - (this.LastPayout != null && - this.LastPayout.Equals(input.LastPayout)) - ) && - ( - this.RefundResults == input.RefundResults || - this.RefundResults != null && - input.RefundResults != null && - this.RefundResults.SequenceEqual(input.RefundResults) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.LastPayout != null) - { - hashCode = (hashCode * 59) + this.LastPayout.GetHashCode(); - } - if (this.RefundResults != null) - { - hashCode = (hashCode * 59) + this.RefundResults.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ShareholderContact.cs b/Adyen/Model/PlatformsWebhooks/ShareholderContact.cs deleted file mode 100644 index 157eff0bf..000000000 --- a/Adyen/Model/PlatformsWebhooks/ShareholderContact.cs +++ /dev/null @@ -1,338 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ShareholderContact - /// - [DataContract(Name = "ShareholderContact")] - public partial class ShareholderContact : IEquatable, IValidatableObject - { - /// - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. - /// - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShareholderTypeEnum - { - /// - /// Enum Controller for value: Controller - /// - [EnumMember(Value = "Controller")] - Controller = 1, - - /// - /// Enum Owner for value: Owner - /// - [EnumMember(Value = "Owner")] - Owner = 2, - - /// - /// Enum Signatory for value: Signatory - /// - [EnumMember(Value = "Signatory")] - Signatory = 3 - - } - - - /// - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. - /// - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization. - [DataMember(Name = "shareholderType", EmitDefaultValue = false)] - public ShareholderTypeEnum? ShareholderType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The e-mail address of the person.. - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// Job title of the person. Required when the `shareholderType` is **Controller**. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.. - /// name. - /// personalData. - /// phoneNumber. - /// The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** . - /// Your reference for the shareholder entry.. - /// Specifies how the person is associated with the account holder. Possible values: * **Owner**: Individuals who directly or indirectly own 25% or more of a company. * **Controller**: Individuals who are members of senior management staff responsible for managing a company or organization.. - /// The URL of the person's website.. - public ShareholderContact(ViasAddress address = default(ViasAddress), string email = default(string), string fullPhoneNumber = default(string), string jobTitle = default(string), ViasName name = default(ViasName), ViasPersonalData personalData = default(ViasPersonalData), ViasPhoneNumber phoneNumber = default(ViasPhoneNumber), string shareholderCode = default(string), string shareholderReference = default(string), ShareholderTypeEnum? shareholderType = default(ShareholderTypeEnum?), string webAddress = default(string)) - { - this.Address = address; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.JobTitle = jobTitle; - this.Name = name; - this.PersonalData = personalData; - this.PhoneNumber = phoneNumber; - this.ShareholderCode = shareholderCode; - this.ShareholderReference = shareholderReference; - this.ShareholderType = shareholderType; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// The e-mail address of the person. - /// - /// The e-mail address of the person. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Job title of the person. Required when the `shareholderType` is **Controller**. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. - /// - /// Job title of the person. Required when the `shareholderType` is **Controller**. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. - [DataMember(Name = "jobTitle", EmitDefaultValue = false)] - public string JobTitle { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public ViasName Name { get; set; } - - /// - /// Gets or Sets PersonalData - /// - [DataMember(Name = "personalData", EmitDefaultValue = false)] - public ViasPersonalData PersonalData { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public ViasPhoneNumber PhoneNumber { get; set; } - - /// - /// The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** - /// - /// The unique identifier (UUID) of the shareholder entry. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Shareholder will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of Account Holder will fail with a validation Error..** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Shareholder is provided, the update of the Shareholder will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Shareholder is provided, the existing Shareholder will be updated.** - [DataMember(Name = "shareholderCode", EmitDefaultValue = false)] - public string ShareholderCode { get; set; } - - /// - /// Your reference for the shareholder entry. - /// - /// Your reference for the shareholder entry. - [DataMember(Name = "shareholderReference", EmitDefaultValue = false)] - public string ShareholderReference { get; set; } - - /// - /// The URL of the person's website. - /// - /// The URL of the person's website. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ShareholderContact {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" JobTitle: ").Append(JobTitle).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PersonalData: ").Append(PersonalData).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" ShareholderCode: ").Append(ShareholderCode).Append("\n"); - sb.Append(" ShareholderReference: ").Append(ShareholderReference).Append("\n"); - sb.Append(" ShareholderType: ").Append(ShareholderType).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ShareholderContact); - } - - /// - /// Returns true if ShareholderContact instances are equal - /// - /// Instance of ShareholderContact to be compared - /// Boolean - public bool Equals(ShareholderContact input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.JobTitle == input.JobTitle || - (this.JobTitle != null && - this.JobTitle.Equals(input.JobTitle)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PersonalData == input.PersonalData || - (this.PersonalData != null && - this.PersonalData.Equals(input.PersonalData)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.ShareholderCode == input.ShareholderCode || - (this.ShareholderCode != null && - this.ShareholderCode.Equals(input.ShareholderCode)) - ) && - ( - this.ShareholderReference == input.ShareholderReference || - (this.ShareholderReference != null && - this.ShareholderReference.Equals(input.ShareholderReference)) - ) && - ( - this.ShareholderType == input.ShareholderType || - this.ShareholderType.Equals(input.ShareholderType) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.JobTitle != null) - { - hashCode = (hashCode * 59) + this.JobTitle.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PersonalData != null) - { - hashCode = (hashCode * 59) + this.PersonalData.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.ShareholderCode != null) - { - hashCode = (hashCode * 59) + this.ShareholderCode.GetHashCode(); - } - if (this.ShareholderReference != null) - { - hashCode = (hashCode * 59) + this.ShareholderReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShareholderType.GetHashCode(); - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/SignatoryContact.cs b/Adyen/Model/PlatformsWebhooks/SignatoryContact.cs deleted file mode 100644 index 9d93979a2..000000000 --- a/Adyen/Model/PlatformsWebhooks/SignatoryContact.cs +++ /dev/null @@ -1,296 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// SignatoryContact - /// - [DataContract(Name = "SignatoryContact")] - public partial class SignatoryContact : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The e-mail address of the person.. - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// Job title of the signatory. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**.. - /// name. - /// personalData. - /// phoneNumber. - /// The unique identifier (UUID) of the signatory. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Signatory is provided, the update of the Signatory will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Signatory is provided, the existing Signatory will be updated.** . - /// Your reference for the signatory.. - /// The URL of the person's website.. - public SignatoryContact(ViasAddress address = default(ViasAddress), string email = default(string), string fullPhoneNumber = default(string), string jobTitle = default(string), ViasName name = default(ViasName), ViasPersonalData personalData = default(ViasPersonalData), ViasPhoneNumber phoneNumber = default(ViasPhoneNumber), string signatoryCode = default(string), string signatoryReference = default(string), string webAddress = default(string)) - { - this.Address = address; - this.Email = email; - this.FullPhoneNumber = fullPhoneNumber; - this.JobTitle = jobTitle; - this.Name = name; - this.PersonalData = personalData; - this.PhoneNumber = phoneNumber; - this.SignatoryCode = signatoryCode; - this.SignatoryReference = signatoryReference; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// The e-mail address of the person. - /// - /// The e-mail address of the person. - [DataMember(Name = "email", EmitDefaultValue = false)] - public string Email { get; set; } - - /// - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the person provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Job title of the signatory. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. - /// - /// Job title of the signatory. Example values: **Chief Executive Officer**, **Chief Financial Officer**, **Chief Operating Officer**, **President**, **Vice President**, **Executive President**, **Managing Member**, **Partner**, **Treasurer**, **Director**, or **Other**. - [DataMember(Name = "jobTitle", EmitDefaultValue = false)] - public string JobTitle { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = false)] - public ViasName Name { get; set; } - - /// - /// Gets or Sets PersonalData - /// - [DataMember(Name = "personalData", EmitDefaultValue = false)] - public ViasPersonalData PersonalData { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public ViasPhoneNumber PhoneNumber { get; set; } - - /// - /// The unique identifier (UUID) of the signatory. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Signatory is provided, the update of the Signatory will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Signatory is provided, the existing Signatory will be updated.** - /// - /// The unique identifier (UUID) of the signatory. >**If, during an Account Holder create or update request, this field is left blank (but other fields provided), a new Signatory will be created with a procedurally-generated UUID.** >**If, during an Account Holder create request, a UUID is provided, the creation of the Signatory will fail while the creation of the Account Holder will continue.** >**If, during an Account Holder update request, a UUID that is not correlated with an existing Signatory is provided, the update of the Signatory will fail.** >**If, during an Account Holder update request, a UUID that is correlated with an existing Signatory is provided, the existing Signatory will be updated.** - [DataMember(Name = "signatoryCode", EmitDefaultValue = false)] - public string SignatoryCode { get; set; } - - /// - /// Your reference for the signatory. - /// - /// Your reference for the signatory. - [DataMember(Name = "signatoryReference", EmitDefaultValue = false)] - public string SignatoryReference { get; set; } - - /// - /// The URL of the person's website. - /// - /// The URL of the person's website. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SignatoryContact {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" JobTitle: ").Append(JobTitle).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PersonalData: ").Append(PersonalData).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" SignatoryCode: ").Append(SignatoryCode).Append("\n"); - sb.Append(" SignatoryReference: ").Append(SignatoryReference).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SignatoryContact); - } - - /// - /// Returns true if SignatoryContact instances are equal - /// - /// Instance of SignatoryContact to be compared - /// Boolean - public bool Equals(SignatoryContact input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.JobTitle == input.JobTitle || - (this.JobTitle != null && - this.JobTitle.Equals(input.JobTitle)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PersonalData == input.PersonalData || - (this.PersonalData != null && - this.PersonalData.Equals(input.PersonalData)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.SignatoryCode == input.SignatoryCode || - (this.SignatoryCode != null && - this.SignatoryCode.Equals(input.SignatoryCode)) - ) && - ( - this.SignatoryReference == input.SignatoryReference || - (this.SignatoryReference != null && - this.SignatoryReference.Equals(input.SignatoryReference)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.JobTitle != null) - { - hashCode = (hashCode * 59) + this.JobTitle.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PersonalData != null) - { - hashCode = (hashCode * 59) + this.PersonalData.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - if (this.SignatoryCode != null) - { - hashCode = (hashCode * 59) + this.SignatoryCode.GetHashCode(); - } - if (this.SignatoryReference != null) - { - hashCode = (hashCode * 59) + this.SignatoryReference.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/Split.cs b/Adyen/Model/PlatformsWebhooks/Split.cs deleted file mode 100644 index 4668fab7a..000000000 --- a/Adyen/Model/PlatformsWebhooks/Split.cs +++ /dev/null @@ -1,310 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// Split - /// - [DataContract(Name = "Split")] - public partial class Split : IEquatable, IValidatableObject - { - /// - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - /// - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BalanceAccount for value: BalanceAccount - /// - [EnumMember(Value = "BalanceAccount")] - BalanceAccount = 1, - - /// - /// Enum Commission for value: Commission - /// - [EnumMember(Value = "Commission")] - Commission = 2, - - /// - /// Enum Default for value: Default - /// - [EnumMember(Value = "Default")] - Default = 3, - - /// - /// Enum MarketPlace for value: MarketPlace - /// - [EnumMember(Value = "MarketPlace")] - MarketPlace = 4, - - /// - /// Enum PaymentFee for value: PaymentFee - /// - [EnumMember(Value = "PaymentFee")] - PaymentFee = 5, - - /// - /// Enum PaymentFeeAcquiring for value: PaymentFeeAcquiring - /// - [EnumMember(Value = "PaymentFeeAcquiring")] - PaymentFeeAcquiring = 6, - - /// - /// Enum PaymentFeeAdyen for value: PaymentFeeAdyen - /// - [EnumMember(Value = "PaymentFeeAdyen")] - PaymentFeeAdyen = 7, - - /// - /// Enum PaymentFeeAdyenCommission for value: PaymentFeeAdyenCommission - /// - [EnumMember(Value = "PaymentFeeAdyenCommission")] - PaymentFeeAdyenCommission = 8, - - /// - /// Enum PaymentFeeAdyenMarkup for value: PaymentFeeAdyenMarkup - /// - [EnumMember(Value = "PaymentFeeAdyenMarkup")] - PaymentFeeAdyenMarkup = 9, - - /// - /// Enum PaymentFeeInterchange for value: PaymentFeeInterchange - /// - [EnumMember(Value = "PaymentFeeInterchange")] - PaymentFeeInterchange = 10, - - /// - /// Enum PaymentFeeSchemeFee for value: PaymentFeeSchemeFee - /// - [EnumMember(Value = "PaymentFeeSchemeFee")] - PaymentFeeSchemeFee = 11, - - /// - /// Enum Remainder for value: Remainder - /// - [EnumMember(Value = "Remainder")] - Remainder = 12, - - /// - /// Enum Surcharge for value: Surcharge - /// - [EnumMember(Value = "Surcharge")] - Surcharge = 13, - - /// - /// Enum Tip for value: Tip - /// - [EnumMember(Value = "Tip")] - Tip = 14, - - /// - /// Enum VAT for value: VAT - /// - [EnumMember(Value = "VAT")] - VAT = 15, - - /// - /// Enum Verification for value: Verification - /// - [EnumMember(Value = "Verification")] - Verification = 16 - - } - - - /// - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - /// - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Split() { } - /// - /// Initializes a new instance of the class. - /// - /// Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. . - /// amount (required). - /// A description of this split.. - /// Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms.. - /// The type of split. Possible values: **Default**, **PaymentFee**, **VAT**, **Commission**, **MarketPlace**, **BalanceAccount**, **Remainder**, **Surcharge**, **Tip**. (required). - public Split(string account = default(string), SplitAmount amount = default(SplitAmount), string description = default(string), string reference = default(string), TypeEnum type = default(TypeEnum)) - { - this.Amount = amount; - this.Type = type; - this.Account = account; - this.Description = description; - this.Reference = reference; - } - - /// - /// Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. - /// - /// Unique identifier of the account where the split amount should be sent. This is required if `type` is **MarketPlace** or **BalanceAccount**. - [DataMember(Name = "account", EmitDefaultValue = false)] - public string Account { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public SplitAmount Amount { get; set; } - - /// - /// A description of this split. - /// - /// A description of this split. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. - /// - /// Your reference for the split, which you can use to link the split to other operations such as captures and refunds. This is required if `type` is **MarketPlace** or **BalanceAccount**. For the other types, we also recommend sending a reference so you can reconcile the split and the associated payment in the transaction overview and in the reports. If the reference is not provided, the split is reported as part of the aggregated [TransferBalance record type](https://docs.adyen.com/reporting/marketpay-payments-accounting-report) in Adyen for Platforms. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Split {\n"); - sb.Append(" Account: ").Append(Account).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Split); - } - - /// - /// Returns true if Split instances are equal - /// - /// Instance of Split to be compared - /// Boolean - public bool Equals(Split input) - { - if (input == null) - { - return false; - } - return - ( - this.Account == input.Account || - (this.Account != null && - this.Account.Equals(input.Account)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Account != null) - { - hashCode = (hashCode * 59) + this.Account.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/SplitAmount.cs b/Adyen/Model/PlatformsWebhooks/SplitAmount.cs deleted file mode 100644 index 424e83f8a..000000000 --- a/Adyen/Model/PlatformsWebhooks/SplitAmount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// SplitAmount - /// - [DataContract(Name = "SplitAmount")] - public partial class SplitAmount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SplitAmount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used.. - /// The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). (required). - public SplitAmount(string currency = default(string), long? value = default(long?)) - { - this.Value = value; - this.Currency = currency; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). If this value is not provided, the currency in which the payment is made will be used. - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The amount in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SplitAmount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SplitAmount); - } - - /// - /// Returns true if SplitAmount instances are equal - /// - /// Instance of SplitAmount to be compared - /// Boolean - public bool Equals(SplitAmount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/StoreDetail.cs b/Adyen/Model/PlatformsWebhooks/StoreDetail.cs deleted file mode 100644 index 2030c5d56..000000000 --- a/Adyen/Model/PlatformsWebhooks/StoreDetail.cs +++ /dev/null @@ -1,450 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// StoreDetail - /// - [DataContract(Name = "StoreDetail")] - public partial class StoreDetail : IEquatable, IValidatableObject - { - /// - /// The sales channel. Possible values: **Ecommerce**, **POS**. - /// - /// The sales channel. Possible values: **Ecommerce**, **POS**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 2 - - } - - - /// - /// The sales channel. Possible values: **Ecommerce**, **POS**. - /// - /// The sales channel. Possible values: **Ecommerce**, **POS**. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. - /// - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 1, - - /// - /// Enum Closed for value: Closed - /// - [EnumMember(Value = "Closed")] - Closed = 2, - - /// - /// Enum Inactive for value: Inactive - /// - [EnumMember(Value = "Inactive")] - Inactive = 3, - - /// - /// Enum InactiveWithModifications for value: InactiveWithModifications - /// - [EnumMember(Value = "InactiveWithModifications")] - InactiveWithModifications = 4, - - /// - /// Enum Pending for value: Pending - /// - [EnumMember(Value = "Pending")] - Pending = 5 - - } - - - /// - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. - /// - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoreDetail() { } - /// - /// Initializes a new instance of the class. - /// - /// address (required). - /// The phone number of the store provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\". - /// Store logo for payment method setup.. - /// The merchant account to which the store belongs. (required). - /// The merchant category code (MCC) that classifies the business of the account holder. (required). - /// Merchant house number for payment method setup.. - /// phoneNumber. - /// The sales channel. Possible values: **Ecommerce**, **POS**.. - /// The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform.. - /// The status of the store. Possible values: **Pending**, **Active**, **Inactive**, **InactiveWithModifications**, **Closed**.. - /// Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request.. - /// The name of the account holder's store. This value is shown in shopper statements. * Length: Between 3 to 22 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\**. - /// Your unique identifier for the store. The Customer Area also uses this value for the store description. * Length: Between 3 to 128 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\**. - /// The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`.. - /// URL of the ecommerce store.. - public StoreDetail(ViasAddress address = default(ViasAddress), string fullPhoneNumber = default(string), string logo = default(string), string merchantAccount = default(string), string merchantCategoryCode = default(string), string merchantHouseNumber = default(string), ViasPhoneNumber phoneNumber = default(ViasPhoneNumber), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string splitConfigurationUUID = default(string), StatusEnum? status = default(StatusEnum?), string store = default(string), string storeName = default(string), string storeReference = default(string), string virtualAccount = default(string), string webAddress = default(string)) - { - this.Address = address; - this.MerchantAccount = merchantAccount; - this.MerchantCategoryCode = merchantCategoryCode; - this.FullPhoneNumber = fullPhoneNumber; - this.Logo = logo; - this.MerchantHouseNumber = merchantHouseNumber; - this.PhoneNumber = phoneNumber; - this.ShopperInteraction = shopperInteraction; - this.SplitConfigurationUUID = splitConfigurationUUID; - this.Status = status; - this.Store = store; - this.StoreName = storeName; - this.StoreReference = storeReference; - this.VirtualAccount = virtualAccount; - this.WebAddress = webAddress; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = false, EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// The phone number of the store provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - /// - /// The phone number of the store provided as a single string. It will be handled as a landline phone. Examples: \"0031 6 11 22 33 44\", \"+316/1122-3344\", \"(0031) 611223344\" - [DataMember(Name = "fullPhoneNumber", EmitDefaultValue = false)] - public string FullPhoneNumber { get; set; } - - /// - /// Store logo for payment method setup. - /// - /// Store logo for payment method setup. - [DataMember(Name = "logo", EmitDefaultValue = false)] - public string Logo { get; set; } - - /// - /// The merchant account to which the store belongs. - /// - /// The merchant account to which the store belongs. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The merchant category code (MCC) that classifies the business of the account holder. - /// - /// The merchant category code (MCC) that classifies the business of the account holder. - [DataMember(Name = "merchantCategoryCode", IsRequired = false, EmitDefaultValue = false)] - public string MerchantCategoryCode { get; set; } - - /// - /// Merchant house number for payment method setup. - /// - /// Merchant house number for payment method setup. - [DataMember(Name = "merchantHouseNumber", EmitDefaultValue = false)] - public string MerchantHouseNumber { get; set; } - - /// - /// Gets or Sets PhoneNumber - /// - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public ViasPhoneNumber PhoneNumber { get; set; } - - /// - /// The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform. - /// - /// The unique reference for the split configuration, returned when you configure splits in your Customer Area. When this is provided, the `virtualAccount` is also required. Adyen uses the configuration and the `virtualAccount` to split funds between accounts in your platform. - [DataMember(Name = "splitConfigurationUUID", EmitDefaultValue = false)] - public string SplitConfigurationUUID { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the store, returned in the response when you create a store. Required when updating an existing store in an `/updateAccountHolder` request. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// The name of the account holder's store. This value is shown in shopper statements. * Length: Between 3 to 22 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** - /// - /// The name of the account holder's store. This value is shown in shopper statements. * Length: Between 3 to 22 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** - [DataMember(Name = "storeName", EmitDefaultValue = false)] - public string StoreName { get; set; } - - /// - /// Your unique identifier for the store. The Customer Area also uses this value for the store description. * Length: Between 3 to 128 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** - /// - /// Your unique identifier for the store. The Customer Area also uses this value for the store description. * Length: Between 3 to 128 characters * The following characters are *not* supported: **:;}{$#@!|<>%^*+=\\\\** - [DataMember(Name = "storeReference", EmitDefaultValue = false)] - public string StoreReference { get; set; } - - /// - /// The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`. - /// - /// The account holder's `accountCode` where the split amount will be sent. Required when you provide the `splitConfigurationUUID`. - [DataMember(Name = "virtualAccount", EmitDefaultValue = false)] - public string VirtualAccount { get; set; } - - /// - /// URL of the ecommerce store. - /// - /// URL of the ecommerce store. - [DataMember(Name = "webAddress", EmitDefaultValue = false)] - public string WebAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoreDetail {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" FullPhoneNumber: ").Append(FullPhoneNumber).Append("\n"); - sb.Append(" Logo: ").Append(Logo).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantCategoryCode: ").Append(MerchantCategoryCode).Append("\n"); - sb.Append(" MerchantHouseNumber: ").Append(MerchantHouseNumber).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" SplitConfigurationUUID: ").Append(SplitConfigurationUUID).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StoreName: ").Append(StoreName).Append("\n"); - sb.Append(" StoreReference: ").Append(StoreReference).Append("\n"); - sb.Append(" VirtualAccount: ").Append(VirtualAccount).Append("\n"); - sb.Append(" WebAddress: ").Append(WebAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoreDetail); - } - - /// - /// Returns true if StoreDetail instances are equal - /// - /// Instance of StoreDetail to be compared - /// Boolean - public bool Equals(StoreDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.FullPhoneNumber == input.FullPhoneNumber || - (this.FullPhoneNumber != null && - this.FullPhoneNumber.Equals(input.FullPhoneNumber)) - ) && - ( - this.Logo == input.Logo || - (this.Logo != null && - this.Logo.Equals(input.Logo)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantCategoryCode == input.MerchantCategoryCode || - (this.MerchantCategoryCode != null && - this.MerchantCategoryCode.Equals(input.MerchantCategoryCode)) - ) && - ( - this.MerchantHouseNumber == input.MerchantHouseNumber || - (this.MerchantHouseNumber != null && - this.MerchantHouseNumber.Equals(input.MerchantHouseNumber)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.SplitConfigurationUUID == input.SplitConfigurationUUID || - (this.SplitConfigurationUUID != null && - this.SplitConfigurationUUID.Equals(input.SplitConfigurationUUID)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreName == input.StoreName || - (this.StoreName != null && - this.StoreName.Equals(input.StoreName)) - ) && - ( - this.StoreReference == input.StoreReference || - (this.StoreReference != null && - this.StoreReference.Equals(input.StoreReference)) - ) && - ( - this.VirtualAccount == input.VirtualAccount || - (this.VirtualAccount != null && - this.VirtualAccount.Equals(input.VirtualAccount)) - ) && - ( - this.WebAddress == input.WebAddress || - (this.WebAddress != null && - this.WebAddress.Equals(input.WebAddress)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.FullPhoneNumber != null) - { - hashCode = (hashCode * 59) + this.FullPhoneNumber.GetHashCode(); - } - if (this.Logo != null) - { - hashCode = (hashCode * 59) + this.Logo.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.MerchantCategoryCode != null) - { - hashCode = (hashCode * 59) + this.MerchantCategoryCode.GetHashCode(); - } - if (this.MerchantHouseNumber != null) - { - hashCode = (hashCode * 59) + this.MerchantHouseNumber.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.SplitConfigurationUUID != null) - { - hashCode = (hashCode * 59) + this.SplitConfigurationUUID.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.StoreName != null) - { - hashCode = (hashCode * 59) + this.StoreName.GetHashCode(); - } - if (this.StoreReference != null) - { - hashCode = (hashCode * 59) + this.StoreReference.GetHashCode(); - } - if (this.VirtualAccount != null) - { - hashCode = (hashCode * 59) + this.VirtualAccount.GetHashCode(); - } - if (this.WebAddress != null) - { - hashCode = (hashCode * 59) + this.WebAddress.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/Transaction.cs b/Adyen/Model/PlatformsWebhooks/Transaction.cs deleted file mode 100644 index 071737204..000000000 --- a/Adyen/Model/PlatformsWebhooks/Transaction.cs +++ /dev/null @@ -1,687 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// Transaction - /// - [DataContract(Name = "Transaction")] - public partial class Transaction : IEquatable, IValidatableObject - { - /// - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. - /// - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. - [JsonConverter(typeof(StringEnumConverter))] - public enum TransactionStatusEnum - { - /// - /// Enum BalanceNotPaidOutTransfer for value: BalanceNotPaidOutTransfer - /// - [EnumMember(Value = "BalanceNotPaidOutTransfer")] - BalanceNotPaidOutTransfer = 1, - - /// - /// Enum BalancePlatformSweep for value: BalancePlatformSweep - /// - [EnumMember(Value = "BalancePlatformSweep")] - BalancePlatformSweep = 2, - - /// - /// Enum BalancePlatformSweepReturned for value: BalancePlatformSweepReturned - /// - [EnumMember(Value = "BalancePlatformSweepReturned")] - BalancePlatformSweepReturned = 3, - - /// - /// Enum Chargeback for value: Chargeback - /// - [EnumMember(Value = "Chargeback")] - Chargeback = 4, - - /// - /// Enum ChargebackCorrection for value: ChargebackCorrection - /// - [EnumMember(Value = "ChargebackCorrection")] - ChargebackCorrection = 5, - - /// - /// Enum ChargebackCorrectionReceived for value: ChargebackCorrectionReceived - /// - [EnumMember(Value = "ChargebackCorrectionReceived")] - ChargebackCorrectionReceived = 6, - - /// - /// Enum ChargebackReceived for value: ChargebackReceived - /// - [EnumMember(Value = "ChargebackReceived")] - ChargebackReceived = 7, - - /// - /// Enum ChargebackReversed for value: ChargebackReversed - /// - [EnumMember(Value = "ChargebackReversed")] - ChargebackReversed = 8, - - /// - /// Enum ChargebackReversedCorrection for value: ChargebackReversedCorrection - /// - [EnumMember(Value = "ChargebackReversedCorrection")] - ChargebackReversedCorrection = 9, - - /// - /// Enum ChargebackReversedCorrectionReceived for value: ChargebackReversedCorrectionReceived - /// - [EnumMember(Value = "ChargebackReversedCorrectionReceived")] - ChargebackReversedCorrectionReceived = 10, - - /// - /// Enum ChargebackReversedReceived for value: ChargebackReversedReceived - /// - [EnumMember(Value = "ChargebackReversedReceived")] - ChargebackReversedReceived = 11, - - /// - /// Enum Converted for value: Converted - /// - [EnumMember(Value = "Converted")] - Converted = 12, - - /// - /// Enum CreditClosed for value: CreditClosed - /// - [EnumMember(Value = "CreditClosed")] - CreditClosed = 13, - - /// - /// Enum CreditFailed for value: CreditFailed - /// - [EnumMember(Value = "CreditFailed")] - CreditFailed = 14, - - /// - /// Enum CreditReversed for value: CreditReversed - /// - [EnumMember(Value = "CreditReversed")] - CreditReversed = 15, - - /// - /// Enum CreditReversedReceived for value: CreditReversedReceived - /// - [EnumMember(Value = "CreditReversedReceived")] - CreditReversedReceived = 16, - - /// - /// Enum CreditSuspended for value: CreditSuspended - /// - [EnumMember(Value = "CreditSuspended")] - CreditSuspended = 17, - - /// - /// Enum Credited for value: Credited - /// - [EnumMember(Value = "Credited")] - Credited = 18, - - /// - /// Enum DebitFailed for value: DebitFailed - /// - [EnumMember(Value = "DebitFailed")] - DebitFailed = 19, - - /// - /// Enum DebitReversedReceived for value: DebitReversedReceived - /// - [EnumMember(Value = "DebitReversedReceived")] - DebitReversedReceived = 20, - - /// - /// Enum Debited for value: Debited - /// - [EnumMember(Value = "Debited")] - Debited = 21, - - /// - /// Enum DebitedReversed for value: DebitedReversed - /// - [EnumMember(Value = "DebitedReversed")] - DebitedReversed = 22, - - /// - /// Enum DepositCorrectionCredited for value: DepositCorrectionCredited - /// - [EnumMember(Value = "DepositCorrectionCredited")] - DepositCorrectionCredited = 23, - - /// - /// Enum DepositCorrectionDebited for value: DepositCorrectionDebited - /// - [EnumMember(Value = "DepositCorrectionDebited")] - DepositCorrectionDebited = 24, - - /// - /// Enum Fee for value: Fee - /// - [EnumMember(Value = "Fee")] - Fee = 25, - - /// - /// Enum FundTransfer for value: FundTransfer - /// - [EnumMember(Value = "FundTransfer")] - FundTransfer = 26, - - /// - /// Enum FundTransferReversed for value: FundTransferReversed - /// - [EnumMember(Value = "FundTransferReversed")] - FundTransferReversed = 27, - - /// - /// Enum InvoiceDeductionCredited for value: InvoiceDeductionCredited - /// - [EnumMember(Value = "InvoiceDeductionCredited")] - InvoiceDeductionCredited = 28, - - /// - /// Enum InvoiceDeductionDebited for value: InvoiceDeductionDebited - /// - [EnumMember(Value = "InvoiceDeductionDebited")] - InvoiceDeductionDebited = 29, - - /// - /// Enum ManualCorrected for value: ManualCorrected - /// - [EnumMember(Value = "ManualCorrected")] - ManualCorrected = 30, - - /// - /// Enum ManualCorrectionCredited for value: ManualCorrectionCredited - /// - [EnumMember(Value = "ManualCorrectionCredited")] - ManualCorrectionCredited = 31, - - /// - /// Enum ManualCorrectionDebited for value: ManualCorrectionDebited - /// - [EnumMember(Value = "ManualCorrectionDebited")] - ManualCorrectionDebited = 32, - - /// - /// Enum MerchantPayin for value: MerchantPayin - /// - [EnumMember(Value = "MerchantPayin")] - MerchantPayin = 33, - - /// - /// Enum MerchantPayinReversed for value: MerchantPayinReversed - /// - [EnumMember(Value = "MerchantPayinReversed")] - MerchantPayinReversed = 34, - - /// - /// Enum Payout for value: Payout - /// - [EnumMember(Value = "Payout")] - Payout = 35, - - /// - /// Enum PayoutReversed for value: PayoutReversed - /// - [EnumMember(Value = "PayoutReversed")] - PayoutReversed = 36, - - /// - /// Enum PendingCredit for value: PendingCredit - /// - [EnumMember(Value = "PendingCredit")] - PendingCredit = 37, - - /// - /// Enum PendingDebit for value: PendingDebit - /// - [EnumMember(Value = "PendingDebit")] - PendingDebit = 38, - - /// - /// Enum PendingFundTransfer for value: PendingFundTransfer - /// - [EnumMember(Value = "PendingFundTransfer")] - PendingFundTransfer = 39, - - /// - /// Enum ReCredited for value: ReCredited - /// - [EnumMember(Value = "ReCredited")] - ReCredited = 40, - - /// - /// Enum ReCreditedReceived for value: ReCreditedReceived - /// - [EnumMember(Value = "ReCreditedReceived")] - ReCreditedReceived = 41, - - /// - /// Enum SecondChargeback for value: SecondChargeback - /// - [EnumMember(Value = "SecondChargeback")] - SecondChargeback = 42, - - /// - /// Enum SecondChargebackCorrection for value: SecondChargebackCorrection - /// - [EnumMember(Value = "SecondChargebackCorrection")] - SecondChargebackCorrection = 43, - - /// - /// Enum SecondChargebackCorrectionReceived for value: SecondChargebackCorrectionReceived - /// - [EnumMember(Value = "SecondChargebackCorrectionReceived")] - SecondChargebackCorrectionReceived = 44, - - /// - /// Enum SecondChargebackReceived for value: SecondChargebackReceived - /// - [EnumMember(Value = "SecondChargebackReceived")] - SecondChargebackReceived = 45 - - } - - - /// - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. - /// - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`. - [DataMember(Name = "transactionStatus", EmitDefaultValue = false)] - public TransactionStatusEnum? TransactionStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// bankAccountDetail. - /// The merchant reference of a related capture.. - /// The psp reference of a related capture.. - /// The date on which the transaction was performed.. - /// A description of the transaction.. - /// The code of the account to which funds were credited during an outgoing fund transfer.. - /// The psp reference of the related dispute.. - /// The reason code of a dispute.. - /// The merchant reference of a transaction.. - /// The psp reference of the related authorisation or transfer.. - /// The psp reference of the related payout.. - /// The psp reference of a transaction.. - /// The code of the account from which funds were debited during an incoming fund transfer.. - /// The status of the transaction. >Permitted values: `PendingCredit`, `CreditFailed`, `CreditClosed`, `CreditSuspended`, `Credited`, `Converted`, `PendingDebit`, `DebitFailed`, `Debited`, `DebitReversedReceived`, `DebitedReversed`, `ChargebackReceived`, `Chargeback`, `ChargebackReversedReceived`, `ChargebackReversed`, `Payout`, `PayoutReversed`, `FundTransfer`, `PendingFundTransfer`, `ManualCorrected`.. - /// The transfer code of the transaction.. - public Transaction(Amount amount = default(Amount), BankAccountDetail bankAccountDetail = default(BankAccountDetail), string captureMerchantReference = default(string), string capturePspReference = default(string), DateTime creationDate = default(DateTime), string description = default(string), string destinationAccountCode = default(string), string disputePspReference = default(string), string disputeReasonCode = default(string), string merchantReference = default(string), string paymentPspReference = default(string), string payoutPspReference = default(string), string pspReference = default(string), string sourceAccountCode = default(string), TransactionStatusEnum? transactionStatus = default(TransactionStatusEnum?), string transferCode = default(string)) - { - this.Amount = amount; - this.BankAccountDetail = bankAccountDetail; - this.CaptureMerchantReference = captureMerchantReference; - this.CapturePspReference = capturePspReference; - this.CreationDate = creationDate; - this.Description = description; - this.DestinationAccountCode = destinationAccountCode; - this.DisputePspReference = disputePspReference; - this.DisputeReasonCode = disputeReasonCode; - this.MerchantReference = merchantReference; - this.PaymentPspReference = paymentPspReference; - this.PayoutPspReference = payoutPspReference; - this.PspReference = pspReference; - this.SourceAccountCode = sourceAccountCode; - this.TransactionStatus = transactionStatus; - this.TransferCode = transferCode; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets BankAccountDetail - /// - [DataMember(Name = "bankAccountDetail", EmitDefaultValue = false)] - public BankAccountDetail BankAccountDetail { get; set; } - - /// - /// The merchant reference of a related capture. - /// - /// The merchant reference of a related capture. - [DataMember(Name = "captureMerchantReference", EmitDefaultValue = false)] - public string CaptureMerchantReference { get; set; } - - /// - /// The psp reference of a related capture. - /// - /// The psp reference of a related capture. - [DataMember(Name = "capturePspReference", EmitDefaultValue = false)] - public string CapturePspReference { get; set; } - - /// - /// The date on which the transaction was performed. - /// - /// The date on which the transaction was performed. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// A description of the transaction. - /// - /// A description of the transaction. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The code of the account to which funds were credited during an outgoing fund transfer. - /// - /// The code of the account to which funds were credited during an outgoing fund transfer. - [DataMember(Name = "destinationAccountCode", EmitDefaultValue = false)] - public string DestinationAccountCode { get; set; } - - /// - /// The psp reference of the related dispute. - /// - /// The psp reference of the related dispute. - [DataMember(Name = "disputePspReference", EmitDefaultValue = false)] - public string DisputePspReference { get; set; } - - /// - /// The reason code of a dispute. - /// - /// The reason code of a dispute. - [DataMember(Name = "disputeReasonCode", EmitDefaultValue = false)] - public string DisputeReasonCode { get; set; } - - /// - /// The merchant reference of a transaction. - /// - /// The merchant reference of a transaction. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The psp reference of the related authorisation or transfer. - /// - /// The psp reference of the related authorisation or transfer. - [DataMember(Name = "paymentPspReference", EmitDefaultValue = false)] - public string PaymentPspReference { get; set; } - - /// - /// The psp reference of the related payout. - /// - /// The psp reference of the related payout. - [DataMember(Name = "payoutPspReference", EmitDefaultValue = false)] - public string PayoutPspReference { get; set; } - - /// - /// The psp reference of a transaction. - /// - /// The psp reference of a transaction. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The code of the account from which funds were debited during an incoming fund transfer. - /// - /// The code of the account from which funds were debited during an incoming fund transfer. - [DataMember(Name = "sourceAccountCode", EmitDefaultValue = false)] - public string SourceAccountCode { get; set; } - - /// - /// The transfer code of the transaction. - /// - /// The transfer code of the transaction. - [DataMember(Name = "transferCode", EmitDefaultValue = false)] - public string TransferCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Transaction {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BankAccountDetail: ").Append(BankAccountDetail).Append("\n"); - sb.Append(" CaptureMerchantReference: ").Append(CaptureMerchantReference).Append("\n"); - sb.Append(" CapturePspReference: ").Append(CapturePspReference).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DestinationAccountCode: ").Append(DestinationAccountCode).Append("\n"); - sb.Append(" DisputePspReference: ").Append(DisputePspReference).Append("\n"); - sb.Append(" DisputeReasonCode: ").Append(DisputeReasonCode).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" PaymentPspReference: ").Append(PaymentPspReference).Append("\n"); - sb.Append(" PayoutPspReference: ").Append(PayoutPspReference).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" SourceAccountCode: ").Append(SourceAccountCode).Append("\n"); - sb.Append(" TransactionStatus: ").Append(TransactionStatus).Append("\n"); - sb.Append(" TransferCode: ").Append(TransferCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Transaction); - } - - /// - /// Returns true if Transaction instances are equal - /// - /// Instance of Transaction to be compared - /// Boolean - public bool Equals(Transaction input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BankAccountDetail == input.BankAccountDetail || - (this.BankAccountDetail != null && - this.BankAccountDetail.Equals(input.BankAccountDetail)) - ) && - ( - this.CaptureMerchantReference == input.CaptureMerchantReference || - (this.CaptureMerchantReference != null && - this.CaptureMerchantReference.Equals(input.CaptureMerchantReference)) - ) && - ( - this.CapturePspReference == input.CapturePspReference || - (this.CapturePspReference != null && - this.CapturePspReference.Equals(input.CapturePspReference)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DestinationAccountCode == input.DestinationAccountCode || - (this.DestinationAccountCode != null && - this.DestinationAccountCode.Equals(input.DestinationAccountCode)) - ) && - ( - this.DisputePspReference == input.DisputePspReference || - (this.DisputePspReference != null && - this.DisputePspReference.Equals(input.DisputePspReference)) - ) && - ( - this.DisputeReasonCode == input.DisputeReasonCode || - (this.DisputeReasonCode != null && - this.DisputeReasonCode.Equals(input.DisputeReasonCode)) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.PaymentPspReference == input.PaymentPspReference || - (this.PaymentPspReference != null && - this.PaymentPspReference.Equals(input.PaymentPspReference)) - ) && - ( - this.PayoutPspReference == input.PayoutPspReference || - (this.PayoutPspReference != null && - this.PayoutPspReference.Equals(input.PayoutPspReference)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.SourceAccountCode == input.SourceAccountCode || - (this.SourceAccountCode != null && - this.SourceAccountCode.Equals(input.SourceAccountCode)) - ) && - ( - this.TransactionStatus == input.TransactionStatus || - this.TransactionStatus.Equals(input.TransactionStatus) - ) && - ( - this.TransferCode == input.TransferCode || - (this.TransferCode != null && - this.TransferCode.Equals(input.TransferCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BankAccountDetail != null) - { - hashCode = (hashCode * 59) + this.BankAccountDetail.GetHashCode(); - } - if (this.CaptureMerchantReference != null) - { - hashCode = (hashCode * 59) + this.CaptureMerchantReference.GetHashCode(); - } - if (this.CapturePspReference != null) - { - hashCode = (hashCode * 59) + this.CapturePspReference.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DestinationAccountCode != null) - { - hashCode = (hashCode * 59) + this.DestinationAccountCode.GetHashCode(); - } - if (this.DisputePspReference != null) - { - hashCode = (hashCode * 59) + this.DisputePspReference.GetHashCode(); - } - if (this.DisputeReasonCode != null) - { - hashCode = (hashCode * 59) + this.DisputeReasonCode.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.PaymentPspReference != null) - { - hashCode = (hashCode * 59) + this.PaymentPspReference.GetHashCode(); - } - if (this.PayoutPspReference != null) - { - hashCode = (hashCode * 59) + this.PayoutPspReference.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.SourceAccountCode != null) - { - hashCode = (hashCode * 59) + this.SourceAccountCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TransactionStatus.GetHashCode(); - if (this.TransferCode != null) - { - hashCode = (hashCode * 59) + this.TransferCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/TransferFundsNotification.cs b/Adyen/Model/PlatformsWebhooks/TransferFundsNotification.cs deleted file mode 100644 index 9f28ba4b6..000000000 --- a/Adyen/Model/PlatformsWebhooks/TransferFundsNotification.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// TransferFundsNotification - /// - [DataContract(Name = "TransferFundsNotification")] - public partial class TransferFundsNotification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferFundsNotification() { } - /// - /// Initializes a new instance of the class. - /// - /// content. - /// error. - /// The date and time when an event has been completed. (required). - /// The event type of the notification. (required). - /// The user or process that has triggered the notification. (required). - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. (required). - /// The PSP reference of the request from which the notification originates. (required). - public TransferFundsNotification(TransferFundsNotificationContent content = default(TransferFundsNotificationContent), NotificationErrorContainer error = default(NotificationErrorContainer), DateTime eventDate = default(DateTime), string eventType = default(string), string executingUserKey = default(string), bool? live = default(bool?), string pspReference = default(string)) - { - this.EventDate = eventDate; - this.EventType = eventType; - this.ExecutingUserKey = executingUserKey; - this.Live = live; - this.PspReference = pspReference; - this.Content = content; - this.Error = error; - } - - /// - /// Gets or Sets Content - /// - [DataMember(Name = "content", EmitDefaultValue = false)] - public TransferFundsNotificationContent Content { get; set; } - - /// - /// Gets or Sets Error - /// - [DataMember(Name = "error", EmitDefaultValue = false)] - public NotificationErrorContainer Error { get; set; } - - /// - /// The date and time when an event has been completed. - /// - /// The date and time when an event has been completed. - [DataMember(Name = "eventDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime EventDate { get; set; } - - /// - /// The event type of the notification. - /// - /// The event type of the notification. - [DataMember(Name = "eventType", IsRequired = false, EmitDefaultValue = false)] - public string EventType { get; set; } - - /// - /// The user or process that has triggered the notification. - /// - /// The user or process that has triggered the notification. - [DataMember(Name = "executingUserKey", IsRequired = false, EmitDefaultValue = false)] - public string ExecutingUserKey { get; set; } - - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - /// - /// Indicates whether the notification originated from the live environment or the test environment. If true, the notification originated from the live environment. If false, the notification originated from the test environment. - [DataMember(Name = "live", IsRequired = false, EmitDefaultValue = false)] - public bool? Live { get; set; } - - /// - /// The PSP reference of the request from which the notification originates. - /// - /// The PSP reference of the request from which the notification originates. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferFundsNotification {\n"); - sb.Append(" Content: ").Append(Content).Append("\n"); - sb.Append(" Error: ").Append(Error).Append("\n"); - sb.Append(" EventDate: ").Append(EventDate).Append("\n"); - sb.Append(" EventType: ").Append(EventType).Append("\n"); - sb.Append(" ExecutingUserKey: ").Append(ExecutingUserKey).Append("\n"); - sb.Append(" Live: ").Append(Live).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferFundsNotification); - } - - /// - /// Returns true if TransferFundsNotification instances are equal - /// - /// Instance of TransferFundsNotification to be compared - /// Boolean - public bool Equals(TransferFundsNotification input) - { - if (input == null) - { - return false; - } - return - ( - this.Content == input.Content || - (this.Content != null && - this.Content.Equals(input.Content)) - ) && - ( - this.Error == input.Error || - (this.Error != null && - this.Error.Equals(input.Error)) - ) && - ( - this.EventDate == input.EventDate || - (this.EventDate != null && - this.EventDate.Equals(input.EventDate)) - ) && - ( - this.EventType == input.EventType || - (this.EventType != null && - this.EventType.Equals(input.EventType)) - ) && - ( - this.ExecutingUserKey == input.ExecutingUserKey || - (this.ExecutingUserKey != null && - this.ExecutingUserKey.Equals(input.ExecutingUserKey)) - ) && - ( - this.Live == input.Live || - this.Live.Equals(input.Live) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Content != null) - { - hashCode = (hashCode * 59) + this.Content.GetHashCode(); - } - if (this.Error != null) - { - hashCode = (hashCode * 59) + this.Error.GetHashCode(); - } - if (this.EventDate != null) - { - hashCode = (hashCode * 59) + this.EventDate.GetHashCode(); - } - if (this.EventType != null) - { - hashCode = (hashCode * 59) + this.EventType.GetHashCode(); - } - if (this.ExecutingUserKey != null) - { - hashCode = (hashCode * 59) + this.ExecutingUserKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Live.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/TransferFundsNotificationContent.cs b/Adyen/Model/PlatformsWebhooks/TransferFundsNotificationContent.cs deleted file mode 100644 index c6890d4a0..000000000 --- a/Adyen/Model/PlatformsWebhooks/TransferFundsNotificationContent.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// TransferFundsNotificationContent - /// - [DataContract(Name = "TransferFundsNotificationContent")] - public partial class TransferFundsNotificationContent : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The code of the Account to which funds were credited.. - /// Invalid fields list.. - /// The reference provided by the merchant.. - /// The code of the Account from which funds were debited.. - /// status. - /// The transfer code.. - public TransferFundsNotificationContent(Amount amount = default(Amount), string destinationAccountCode = default(string), List invalidFields = default(List), string merchantReference = default(string), string sourceAccountCode = default(string), OperationStatus status = default(OperationStatus), string transferCode = default(string)) - { - this.Amount = amount; - this.DestinationAccountCode = destinationAccountCode; - this.InvalidFields = invalidFields; - this.MerchantReference = merchantReference; - this.SourceAccountCode = sourceAccountCode; - this.Status = status; - this.TransferCode = transferCode; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The code of the Account to which funds were credited. - /// - /// The code of the Account to which funds were credited. - [DataMember(Name = "destinationAccountCode", EmitDefaultValue = false)] - public string DestinationAccountCode { get; set; } - - /// - /// Invalid fields list. - /// - /// Invalid fields list. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The reference provided by the merchant. - /// - /// The reference provided by the merchant. - [DataMember(Name = "merchantReference", EmitDefaultValue = false)] - public string MerchantReference { get; set; } - - /// - /// The code of the Account from which funds were debited. - /// - /// The code of the Account from which funds were debited. - [DataMember(Name = "sourceAccountCode", EmitDefaultValue = false)] - public string SourceAccountCode { get; set; } - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = false)] - public OperationStatus Status { get; set; } - - /// - /// The transfer code. - /// - /// The transfer code. - [DataMember(Name = "transferCode", EmitDefaultValue = false)] - public string TransferCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferFundsNotificationContent {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" DestinationAccountCode: ").Append(DestinationAccountCode).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" MerchantReference: ").Append(MerchantReference).Append("\n"); - sb.Append(" SourceAccountCode: ").Append(SourceAccountCode).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TransferCode: ").Append(TransferCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferFundsNotificationContent); - } - - /// - /// Returns true if TransferFundsNotificationContent instances are equal - /// - /// Instance of TransferFundsNotificationContent to be compared - /// Boolean - public bool Equals(TransferFundsNotificationContent input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.DestinationAccountCode == input.DestinationAccountCode || - (this.DestinationAccountCode != null && - this.DestinationAccountCode.Equals(input.DestinationAccountCode)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.MerchantReference == input.MerchantReference || - (this.MerchantReference != null && - this.MerchantReference.Equals(input.MerchantReference)) - ) && - ( - this.SourceAccountCode == input.SourceAccountCode || - (this.SourceAccountCode != null && - this.SourceAccountCode.Equals(input.SourceAccountCode)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.TransferCode == input.TransferCode || - (this.TransferCode != null && - this.TransferCode.Equals(input.TransferCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.DestinationAccountCode != null) - { - hashCode = (hashCode * 59) + this.DestinationAccountCode.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.MerchantReference != null) - { - hashCode = (hashCode * 59) + this.MerchantReference.GetHashCode(); - } - if (this.SourceAccountCode != null) - { - hashCode = (hashCode * 59) + this.SourceAccountCode.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.TransferCode != null) - { - hashCode = (hashCode * 59) + this.TransferCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/UltimateParentCompany.cs b/Adyen/Model/PlatformsWebhooks/UltimateParentCompany.cs deleted file mode 100644 index 30f1f53dd..000000000 --- a/Adyen/Model/PlatformsWebhooks/UltimateParentCompany.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// UltimateParentCompany - /// - [DataContract(Name = "UltimateParentCompany")] - public partial class UltimateParentCompany : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// address. - /// businessDetails. - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request.. - public UltimateParentCompany(ViasAddress address = default(ViasAddress), UltimateParentCompanyBusinessDetails businessDetails = default(UltimateParentCompanyBusinessDetails), string ultimateParentCompanyCode = default(string)) - { - this.Address = address; - this.BusinessDetails = businessDetails; - this.UltimateParentCompanyCode = ultimateParentCompanyCode; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public ViasAddress Address { get; set; } - - /// - /// Gets or Sets BusinessDetails - /// - [DataMember(Name = "businessDetails", EmitDefaultValue = false)] - public UltimateParentCompanyBusinessDetails BusinessDetails { get; set; } - - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request. - /// - /// Adyen-generated unique alphanumeric identifier (UUID) for the entry, returned in the response when you create an ultimate parent company. Required when updating an existing entry in an `/updateAccountHolder` request. - [DataMember(Name = "ultimateParentCompanyCode", EmitDefaultValue = false)] - public string UltimateParentCompanyCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UltimateParentCompany {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" BusinessDetails: ").Append(BusinessDetails).Append("\n"); - sb.Append(" UltimateParentCompanyCode: ").Append(UltimateParentCompanyCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UltimateParentCompany); - } - - /// - /// Returns true if UltimateParentCompany instances are equal - /// - /// Instance of UltimateParentCompany to be compared - /// Boolean - public bool Equals(UltimateParentCompany input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.BusinessDetails == input.BusinessDetails || - (this.BusinessDetails != null && - this.BusinessDetails.Equals(input.BusinessDetails)) - ) && - ( - this.UltimateParentCompanyCode == input.UltimateParentCompanyCode || - (this.UltimateParentCompanyCode != null && - this.UltimateParentCompanyCode.Equals(input.UltimateParentCompanyCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.BusinessDetails != null) - { - hashCode = (hashCode * 59) + this.BusinessDetails.GetHashCode(); - } - if (this.UltimateParentCompanyCode != null) - { - hashCode = (hashCode * 59) + this.UltimateParentCompanyCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/UltimateParentCompanyBusinessDetails.cs b/Adyen/Model/PlatformsWebhooks/UltimateParentCompanyBusinessDetails.cs deleted file mode 100644 index 9a615b3d6..000000000 --- a/Adyen/Model/PlatformsWebhooks/UltimateParentCompanyBusinessDetails.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// UltimateParentCompanyBusinessDetails - /// - [DataContract(Name = "UltimateParentCompanyBusinessDetails")] - public partial class UltimateParentCompanyBusinessDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The legal name of the company.. - /// The registration number of the company.. - /// Market Identifier Code (MIC).. - /// International Securities Identification Number (ISIN).. - /// Stock Ticker symbol.. - public UltimateParentCompanyBusinessDetails(string legalBusinessName = default(string), string registrationNumber = default(string), string stockExchange = default(string), string stockNumber = default(string), string stockTicker = default(string)) - { - this.LegalBusinessName = legalBusinessName; - this.RegistrationNumber = registrationNumber; - this.StockExchange = stockExchange; - this.StockNumber = stockNumber; - this.StockTicker = stockTicker; - } - - /// - /// The legal name of the company. - /// - /// The legal name of the company. - [DataMember(Name = "legalBusinessName", EmitDefaultValue = false)] - public string LegalBusinessName { get; set; } - - /// - /// The registration number of the company. - /// - /// The registration number of the company. - [DataMember(Name = "registrationNumber", EmitDefaultValue = false)] - public string RegistrationNumber { get; set; } - - /// - /// Market Identifier Code (MIC). - /// - /// Market Identifier Code (MIC). - [DataMember(Name = "stockExchange", EmitDefaultValue = false)] - public string StockExchange { get; set; } - - /// - /// International Securities Identification Number (ISIN). - /// - /// International Securities Identification Number (ISIN). - [DataMember(Name = "stockNumber", EmitDefaultValue = false)] - public string StockNumber { get; set; } - - /// - /// Stock Ticker symbol. - /// - /// Stock Ticker symbol. - [DataMember(Name = "stockTicker", EmitDefaultValue = false)] - public string StockTicker { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UltimateParentCompanyBusinessDetails {\n"); - sb.Append(" LegalBusinessName: ").Append(LegalBusinessName).Append("\n"); - sb.Append(" RegistrationNumber: ").Append(RegistrationNumber).Append("\n"); - sb.Append(" StockExchange: ").Append(StockExchange).Append("\n"); - sb.Append(" StockNumber: ").Append(StockNumber).Append("\n"); - sb.Append(" StockTicker: ").Append(StockTicker).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UltimateParentCompanyBusinessDetails); - } - - /// - /// Returns true if UltimateParentCompanyBusinessDetails instances are equal - /// - /// Instance of UltimateParentCompanyBusinessDetails to be compared - /// Boolean - public bool Equals(UltimateParentCompanyBusinessDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.LegalBusinessName == input.LegalBusinessName || - (this.LegalBusinessName != null && - this.LegalBusinessName.Equals(input.LegalBusinessName)) - ) && - ( - this.RegistrationNumber == input.RegistrationNumber || - (this.RegistrationNumber != null && - this.RegistrationNumber.Equals(input.RegistrationNumber)) - ) && - ( - this.StockExchange == input.StockExchange || - (this.StockExchange != null && - this.StockExchange.Equals(input.StockExchange)) - ) && - ( - this.StockNumber == input.StockNumber || - (this.StockNumber != null && - this.StockNumber.Equals(input.StockNumber)) - ) && - ( - this.StockTicker == input.StockTicker || - (this.StockTicker != null && - this.StockTicker.Equals(input.StockTicker)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LegalBusinessName != null) - { - hashCode = (hashCode * 59) + this.LegalBusinessName.GetHashCode(); - } - if (this.RegistrationNumber != null) - { - hashCode = (hashCode * 59) + this.RegistrationNumber.GetHashCode(); - } - if (this.StockExchange != null) - { - hashCode = (hashCode * 59) + this.StockExchange.GetHashCode(); - } - if (this.StockNumber != null) - { - hashCode = (hashCode * 59) + this.StockNumber.GetHashCode(); - } - if (this.StockTicker != null) - { - hashCode = (hashCode * 59) + this.StockTicker.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/UpdateAccountHolderResponse.cs b/Adyen/Model/PlatformsWebhooks/UpdateAccountHolderResponse.cs deleted file mode 100644 index 2d8da67ff..000000000 --- a/Adyen/Model/PlatformsWebhooks/UpdateAccountHolderResponse.cs +++ /dev/null @@ -1,353 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// UpdateAccountHolderResponse - /// - [DataContract(Name = "UpdateAccountHolderResponse")] - public partial class UpdateAccountHolderResponse : IEquatable, IValidatableObject - { - /// - /// The legal entity of the account holder. - /// - /// The legal entity of the account holder. - [JsonConverter(typeof(StringEnumConverter))] - public enum LegalEntityEnum - { - /// - /// Enum Business for value: Business - /// - [EnumMember(Value = "Business")] - Business = 1, - - /// - /// Enum Individual for value: Individual - /// - [EnumMember(Value = "Individual")] - Individual = 2, - - /// - /// Enum NonProfit for value: NonProfit - /// - [EnumMember(Value = "NonProfit")] - NonProfit = 3, - - /// - /// Enum Partnership for value: Partnership - /// - [EnumMember(Value = "Partnership")] - Partnership = 4, - - /// - /// Enum PublicCompany for value: PublicCompany - /// - [EnumMember(Value = "PublicCompany")] - PublicCompany = 5 - - } - - - /// - /// The legal entity of the account holder. - /// - /// The legal entity of the account holder. - [DataMember(Name = "legalEntity", EmitDefaultValue = false)] - public LegalEntityEnum? LegalEntity { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account holder.. - /// accountHolderDetails. - /// accountHolderStatus. - /// The description of the account holder.. - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation.. - /// The legal entity of the account holder.. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - /// verification. - /// The identifier of the profile that applies to this entity.. - public UpdateAccountHolderResponse(string accountHolderCode = default(string), AccountHolderDetails accountHolderDetails = default(AccountHolderDetails), AccountHolderStatus accountHolderStatus = default(AccountHolderStatus), string description = default(string), List invalidFields = default(List), LegalEntityEnum? legalEntity = default(LegalEntityEnum?), string primaryCurrency = default(string), string pspReference = default(string), string resultCode = default(string), KYCVerificationResult verification = default(KYCVerificationResult), string verificationProfile = default(string)) - { - this.AccountHolderCode = accountHolderCode; - this.AccountHolderDetails = accountHolderDetails; - this.AccountHolderStatus = accountHolderStatus; - this.Description = description; - this.InvalidFields = invalidFields; - this.LegalEntity = legalEntity; - this.PrimaryCurrency = primaryCurrency; - this.PspReference = pspReference; - this.ResultCode = resultCode; - this.Verification = verification; - this.VerificationProfile = verificationProfile; - } - - /// - /// The code of the account holder. - /// - /// The code of the account holder. - [DataMember(Name = "accountHolderCode", EmitDefaultValue = false)] - public string AccountHolderCode { get; set; } - - /// - /// Gets or Sets AccountHolderDetails - /// - [DataMember(Name = "accountHolderDetails", EmitDefaultValue = false)] - public AccountHolderDetails AccountHolderDetails { get; set; } - - /// - /// Gets or Sets AccountHolderStatus - /// - [DataMember(Name = "accountHolderStatus", EmitDefaultValue = false)] - public AccountHolderStatus AccountHolderStatus { get; set; } - - /// - /// The description of the account holder. - /// - /// The description of the account holder. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation. - /// - /// in case the account holder has not been updated, contains account holder fields, that did not pass the validation. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes), with which the prospective account holder primarily deals. - [DataMember(Name = "primaryCurrency", EmitDefaultValue = false)] - [Obsolete] - public string PrimaryCurrency { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Gets or Sets Verification - /// - [DataMember(Name = "verification", EmitDefaultValue = false)] - public KYCVerificationResult Verification { get; set; } - - /// - /// The identifier of the profile that applies to this entity. - /// - /// The identifier of the profile that applies to this entity. - [DataMember(Name = "verificationProfile", EmitDefaultValue = false)] - public string VerificationProfile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateAccountHolderResponse {\n"); - sb.Append(" AccountHolderCode: ").Append(AccountHolderCode).Append("\n"); - sb.Append(" AccountHolderDetails: ").Append(AccountHolderDetails).Append("\n"); - sb.Append(" AccountHolderStatus: ").Append(AccountHolderStatus).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" LegalEntity: ").Append(LegalEntity).Append("\n"); - sb.Append(" PrimaryCurrency: ").Append(PrimaryCurrency).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" Verification: ").Append(Verification).Append("\n"); - sb.Append(" VerificationProfile: ").Append(VerificationProfile).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateAccountHolderResponse); - } - - /// - /// Returns true if UpdateAccountHolderResponse instances are equal - /// - /// Instance of UpdateAccountHolderResponse to be compared - /// Boolean - public bool Equals(UpdateAccountHolderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderCode == input.AccountHolderCode || - (this.AccountHolderCode != null && - this.AccountHolderCode.Equals(input.AccountHolderCode)) - ) && - ( - this.AccountHolderDetails == input.AccountHolderDetails || - (this.AccountHolderDetails != null && - this.AccountHolderDetails.Equals(input.AccountHolderDetails)) - ) && - ( - this.AccountHolderStatus == input.AccountHolderStatus || - (this.AccountHolderStatus != null && - this.AccountHolderStatus.Equals(input.AccountHolderStatus)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.LegalEntity == input.LegalEntity || - this.LegalEntity.Equals(input.LegalEntity) - ) && - ( - this.PrimaryCurrency == input.PrimaryCurrency || - (this.PrimaryCurrency != null && - this.PrimaryCurrency.Equals(input.PrimaryCurrency)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.Verification == input.Verification || - (this.Verification != null && - this.Verification.Equals(input.Verification)) - ) && - ( - this.VerificationProfile == input.VerificationProfile || - (this.VerificationProfile != null && - this.VerificationProfile.Equals(input.VerificationProfile)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderCode != null) - { - hashCode = (hashCode * 59) + this.AccountHolderCode.GetHashCode(); - } - if (this.AccountHolderDetails != null) - { - hashCode = (hashCode * 59) + this.AccountHolderDetails.GetHashCode(); - } - if (this.AccountHolderStatus != null) - { - hashCode = (hashCode * 59) + this.AccountHolderStatus.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LegalEntity.GetHashCode(); - if (this.PrimaryCurrency != null) - { - hashCode = (hashCode * 59) + this.PrimaryCurrency.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - if (this.Verification != null) - { - hashCode = (hashCode * 59) + this.Verification.GetHashCode(); - } - if (this.VerificationProfile != null) - { - hashCode = (hashCode * 59) + this.VerificationProfile.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/UpdateAccountResponse.cs b/Adyen/Model/PlatformsWebhooks/UpdateAccountResponse.cs deleted file mode 100644 index 129eaeaeb..000000000 --- a/Adyen/Model/PlatformsWebhooks/UpdateAccountResponse.cs +++ /dev/null @@ -1,329 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// UpdateAccountResponse - /// - [DataContract(Name = "UpdateAccountResponse")] - public partial class UpdateAccountResponse : IEquatable, IValidatableObject - { - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PayoutSpeedEnum - { - /// - /// Enum INSTANT for value: INSTANT - /// - [EnumMember(Value = "INSTANT")] - INSTANT = 1, - - /// - /// Enum SAMEDAY for value: SAME_DAY - /// - [EnumMember(Value = "SAME_DAY")] - SAMEDAY = 2, - - /// - /// Enum STANDARD for value: STANDARD - /// - [EnumMember(Value = "STANDARD")] - STANDARD = 3 - - } - - - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - /// - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`. - [DataMember(Name = "payoutSpeed", EmitDefaultValue = false)] - public PayoutSpeedEnum? PayoutSpeed { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateAccountResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The code of the account. (required). - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder.. - /// The description of the account.. - /// A list of fields that caused the `/updateAccount` request to fail.. - /// A set of key and value pairs containing metadata.. - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code.. - /// payoutSchedule. - /// Speed with which payouts for this account are processed. Permitted values: `STANDARD`, `SAME_DAY`.. - /// The reference of a request. Can be used to uniquely identify the request.. - /// The result code.. - public UpdateAccountResponse(string accountCode = default(string), string bankAccountUUID = default(string), string description = default(string), List invalidFields = default(List), Dictionary metadata = default(Dictionary), string payoutMethodCode = default(string), PayoutScheduleResponse payoutSchedule = default(PayoutScheduleResponse), PayoutSpeedEnum? payoutSpeed = default(PayoutSpeedEnum?), string pspReference = default(string), string resultCode = default(string)) - { - this.AccountCode = accountCode; - this.BankAccountUUID = bankAccountUUID; - this.Description = description; - this.InvalidFields = invalidFields; - this.Metadata = metadata; - this.PayoutMethodCode = payoutMethodCode; - this.PayoutSchedule = payoutSchedule; - this.PayoutSpeed = payoutSpeed; - this.PspReference = pspReference; - this.ResultCode = resultCode; - } - - /// - /// The code of the account. - /// - /// The code of the account. - [DataMember(Name = "accountCode", IsRequired = false, EmitDefaultValue = false)] - public string AccountCode { get; set; } - - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - /// - /// The bankAccountUUID of the bank account held by the account holder to couple the account with. Scheduled payouts in currencies matching the currency of this bank account will be sent to this bank account. Payouts in different currencies will be sent to a matching bank account of the account holder. - [DataMember(Name = "bankAccountUUID", EmitDefaultValue = false)] - public string BankAccountUUID { get; set; } - - /// - /// The description of the account. - /// - /// The description of the account. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// A list of fields that caused the `/updateAccount` request to fail. - /// - /// A list of fields that caused the `/updateAccount` request to fail. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A set of key and value pairs containing metadata. - /// - /// A set of key and value pairs containing metadata. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - /// - /// The payout method code held by the account holder to couple the account with. Scheduled card payouts will be sent using this payout method code. - [DataMember(Name = "payoutMethodCode", EmitDefaultValue = false)] - public string PayoutMethodCode { get; set; } - - /// - /// Gets or Sets PayoutSchedule - /// - [DataMember(Name = "payoutSchedule", EmitDefaultValue = false)] - public PayoutScheduleResponse PayoutSchedule { get; set; } - - /// - /// The reference of a request. Can be used to uniquely identify the request. - /// - /// The reference of a request. Can be used to uniquely identify the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result code. - /// - /// The result code. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateAccountResponse {\n"); - sb.Append(" AccountCode: ").Append(AccountCode).Append("\n"); - sb.Append(" BankAccountUUID: ").Append(BankAccountUUID).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" PayoutMethodCode: ").Append(PayoutMethodCode).Append("\n"); - sb.Append(" PayoutSchedule: ").Append(PayoutSchedule).Append("\n"); - sb.Append(" PayoutSpeed: ").Append(PayoutSpeed).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateAccountResponse); - } - - /// - /// Returns true if UpdateAccountResponse instances are equal - /// - /// Instance of UpdateAccountResponse to be compared - /// Boolean - public bool Equals(UpdateAccountResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCode == input.AccountCode || - (this.AccountCode != null && - this.AccountCode.Equals(input.AccountCode)) - ) && - ( - this.BankAccountUUID == input.BankAccountUUID || - (this.BankAccountUUID != null && - this.BankAccountUUID.Equals(input.BankAccountUUID)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PayoutMethodCode == input.PayoutMethodCode || - (this.PayoutMethodCode != null && - this.PayoutMethodCode.Equals(input.PayoutMethodCode)) - ) && - ( - this.PayoutSchedule == input.PayoutSchedule || - (this.PayoutSchedule != null && - this.PayoutSchedule.Equals(input.PayoutSchedule)) - ) && - ( - this.PayoutSpeed == input.PayoutSpeed || - this.PayoutSpeed.Equals(input.PayoutSpeed) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountCode != null) - { - hashCode = (hashCode * 59) + this.AccountCode.GetHashCode(); - } - if (this.BankAccountUUID != null) - { - hashCode = (hashCode * 59) + this.BankAccountUUID.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PayoutMethodCode != null) - { - hashCode = (hashCode * 59) + this.PayoutMethodCode.GetHashCode(); - } - if (this.PayoutSchedule != null) - { - hashCode = (hashCode * 59) + this.PayoutSchedule.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PayoutSpeed.GetHashCode(); - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ViasAddress.cs b/Adyen/Model/PlatformsWebhooks/ViasAddress.cs deleted file mode 100644 index 36759a718..000000000 --- a/Adyen/Model/PlatformsWebhooks/ViasAddress.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ViasAddress - /// - [DataContract(Name = "ViasAddress")] - public partial class ViasAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ViasAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided.. - /// The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**. (required). - /// The number or name of the house.. - /// The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries.. - /// The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. Maximum length: * 2 characters for addresses in the US or Canada. * 3 characters for all other countries. . - /// The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided.. - public ViasAddress(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.Country = country; - this.City = city; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - this.Street = street; - } - - /// - /// The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided. - /// - /// The name of the city. Required if the `houseNumberOrName`, `street`, `postalCode`, or `stateOrProvince` are provided. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**. - /// - /// The two-character country code of the address in ISO-3166-1 alpha-2 format. For example, **NL**. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The number or name of the house. - /// - /// The number or name of the house. - [DataMember(Name = "houseNumberOrName", EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. - /// - /// The postal code. Required if the `houseNumberOrName`, `street`, `city`, or `stateOrProvince` are provided. Maximum length: * 5 digits for addresses in the US. * 10 characters for all other countries. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. Maximum length: * 2 characters for addresses in the US or Canada. * 3 characters for all other countries. - /// - /// The abbreviation of the state or province. Required if the `houseNumberOrName`, `street`, `city`, or `postalCode` are provided. Maximum length: * 2 characters for addresses in the US or Canada. * 3 characters for all other countries. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided. - /// - /// The name of the street. Required if the `houseNumberOrName`, `city`, `postalCode`, or `stateOrProvince` are provided. - [DataMember(Name = "street", EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ViasAddress {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ViasAddress); - } - - /// - /// Returns true if ViasAddress instances are equal - /// - /// Instance of ViasAddress to be compared - /// Boolean - public bool Equals(ViasAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ViasName.cs b/Adyen/Model/PlatformsWebhooks/ViasName.cs deleted file mode 100644 index 400508ce6..000000000 --- a/Adyen/Model/PlatformsWebhooks/ViasName.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ViasName - /// - [DataContract(Name = "ViasName")] - public partial class ViasName : IEquatable, IValidatableObject - { - /// - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - /// - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - [JsonConverter(typeof(StringEnumConverter))] - public enum GenderEnum - { - /// - /// Enum MALE for value: MALE - /// - [EnumMember(Value = "MALE")] - MALE = 1, - - /// - /// Enum FEMALE for value: FEMALE - /// - [EnumMember(Value = "FEMALE")] - FEMALE = 2, - - /// - /// Enum UNKNOWN for value: UNKNOWN - /// - [EnumMember(Value = "UNKNOWN")] - UNKNOWN = 3 - - } - - - /// - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - /// - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`. - [DataMember(Name = "gender", EmitDefaultValue = false)] - public GenderEnum? Gender { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The first name.. - /// The gender. >The following values are permitted: `MALE`, `FEMALE`, `UNKNOWN`.. - /// The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed.. - /// The last name.. - public ViasName(string firstName = default(string), GenderEnum? gender = default(GenderEnum?), string infix = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.Gender = gender; - this.Infix = infix; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed. - /// - /// The name's infix, if applicable. >A maximum length of twenty (20) characters is imposed. - [DataMember(Name = "infix", EmitDefaultValue = false)] - public string Infix { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ViasName {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" Gender: ").Append(Gender).Append("\n"); - sb.Append(" Infix: ").Append(Infix).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ViasName); - } - - /// - /// Returns true if ViasName instances are equal - /// - /// Instance of ViasName to be compared - /// Boolean - public bool Equals(ViasName input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.Gender == input.Gender || - this.Gender.Equals(input.Gender) - ) && - ( - this.Infix == input.Infix || - (this.Infix != null && - this.Infix.Equals(input.Infix)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Gender.GetHashCode(); - if (this.Infix != null) - { - hashCode = (hashCode * 59) + this.Infix.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // Infix (string) maxLength - if (this.Infix != null && this.Infix.Length > 20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Infix, length must be less than 20.", new [] { "Infix" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ViasPersonalData.cs b/Adyen/Model/PlatformsWebhooks/ViasPersonalData.cs deleted file mode 100644 index 95b3a74f0..000000000 --- a/Adyen/Model/PlatformsWebhooks/ViasPersonalData.cs +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ViasPersonalData - /// - [DataContract(Name = "ViasPersonalData")] - public partial class ViasPersonalData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**.. - /// Array that contains information about the person's identification document. You can submit only one entry per document type.. - /// The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. . - public ViasPersonalData(string dateOfBirth = default(string), List documentData = default(List), string nationality = default(string)) - { - this.DateOfBirth = dateOfBirth; - this.DocumentData = documentData; - this.Nationality = nationality; - } - - /// - /// The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. - /// - /// The person's date of birth, in ISO-8601 YYYY-MM-DD format. For example, **2000-01-31**. - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - public string DateOfBirth { get; set; } - - /// - /// Array that contains information about the person's identification document. You can submit only one entry per document type. - /// - /// Array that contains information about the person's identification document. You can submit only one entry per document type. - [DataMember(Name = "documentData", EmitDefaultValue = false)] - public List DocumentData { get; set; } - - /// - /// The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. - /// - /// The nationality of the person represented by a two-character country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **NL**. - [DataMember(Name = "nationality", EmitDefaultValue = false)] - public string Nationality { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ViasPersonalData {\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" DocumentData: ").Append(DocumentData).Append("\n"); - sb.Append(" Nationality: ").Append(Nationality).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ViasPersonalData); - } - - /// - /// Returns true if ViasPersonalData instances are equal - /// - /// Instance of ViasPersonalData to be compared - /// Boolean - public bool Equals(ViasPersonalData input) - { - if (input == null) - { - return false; - } - return - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.DocumentData == input.DocumentData || - this.DocumentData != null && - input.DocumentData != null && - this.DocumentData.SequenceEqual(input.DocumentData) - ) && - ( - this.Nationality == input.Nationality || - (this.Nationality != null && - this.Nationality.Equals(input.Nationality)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.DocumentData != null) - { - hashCode = (hashCode * 59) + this.DocumentData.GetHashCode(); - } - if (this.Nationality != null) - { - hashCode = (hashCode * 59) + this.Nationality.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Nationality (string) maxLength - if (this.Nationality != null && this.Nationality.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Nationality, length must be less than 2.", new [] { "Nationality" }); - } - - // Nationality (string) minLength - if (this.Nationality != null && this.Nationality.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Nationality, length must be greater than 2.", new [] { "Nationality" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PlatformsWebhooks/ViasPhoneNumber.cs b/Adyen/Model/PlatformsWebhooks/ViasPhoneNumber.cs deleted file mode 100644 index 81c5cfd65..000000000 --- a/Adyen/Model/PlatformsWebhooks/ViasPhoneNumber.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* -* Classic Platforms - Notifications -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PlatformsWebhooks -{ - /// - /// ViasPhoneNumber - /// - [DataContract(Name = "ViasPhoneNumber")] - public partial class ViasPhoneNumber : IEquatable, IValidatableObject - { - /// - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. - /// - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. - [JsonConverter(typeof(StringEnumConverter))] - public enum PhoneTypeEnum - { - /// - /// Enum Fax for value: Fax - /// - [EnumMember(Value = "Fax")] - Fax = 1, - - /// - /// Enum Landline for value: Landline - /// - [EnumMember(Value = "Landline")] - Landline = 2, - - /// - /// Enum Mobile for value: Mobile - /// - [EnumMember(Value = "Mobile")] - Mobile = 3, - - /// - /// Enum SIP for value: SIP - /// - [EnumMember(Value = "SIP")] - SIP = 4 - - } - - - /// - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. - /// - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`. - [DataMember(Name = "phoneType", EmitDefaultValue = false)] - public PhoneTypeEnum? PhoneType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL').. - /// The phone number. >The inclusion of the phone number country code is not necessary.. - /// The type of the phone number. >The following values are permitted: `Landline`, `Mobile`, `SIP`, `Fax`.. - public ViasPhoneNumber(string phoneCountryCode = default(string), string phoneNumber = default(string), PhoneTypeEnum? phoneType = default(PhoneTypeEnum?)) - { - this.PhoneCountryCode = phoneCountryCode; - this.PhoneNumber = phoneNumber; - this.PhoneType = phoneType; - } - - /// - /// The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). - /// - /// The two-character country code of the phone number. >The permitted country codes are defined in ISO-3166-1 alpha-2 (e.g. 'NL'). - [DataMember(Name = "phoneCountryCode", EmitDefaultValue = false)] - public string PhoneCountryCode { get; set; } - - /// - /// The phone number. >The inclusion of the phone number country code is not necessary. - /// - /// The phone number. >The inclusion of the phone number country code is not necessary. - [DataMember(Name = "phoneNumber", EmitDefaultValue = false)] - public string PhoneNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ViasPhoneNumber {\n"); - sb.Append(" PhoneCountryCode: ").Append(PhoneCountryCode).Append("\n"); - sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); - sb.Append(" PhoneType: ").Append(PhoneType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ViasPhoneNumber); - } - - /// - /// Returns true if ViasPhoneNumber instances are equal - /// - /// Instance of ViasPhoneNumber to be compared - /// Boolean - public bool Equals(ViasPhoneNumber input) - { - if (input == null) - { - return false; - } - return - ( - this.PhoneCountryCode == input.PhoneCountryCode || - (this.PhoneCountryCode != null && - this.PhoneCountryCode.Equals(input.PhoneCountryCode)) - ) && - ( - this.PhoneNumber == input.PhoneNumber || - (this.PhoneNumber != null && - this.PhoneNumber.Equals(input.PhoneNumber)) - ) && - ( - this.PhoneType == input.PhoneType || - this.PhoneType.Equals(input.PhoneType) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PhoneCountryCode != null) - { - hashCode = (hashCode * 59) + this.PhoneCountryCode.GetHashCode(); - } - if (this.PhoneNumber != null) - { - hashCode = (hashCode * 59) + this.PhoneNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PhoneType.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosMobile/AbstractOpenAPISchema.cs b/Adyen/Model/PosMobile/AbstractOpenAPISchema.cs deleted file mode 100644 index f21ef540d..000000000 --- a/Adyen/Model/PosMobile/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* POS Mobile API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.PosMobile -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/PosMobile/CreateSessionRequest.cs b/Adyen/Model/PosMobile/CreateSessionRequest.cs deleted file mode 100644 index 7865d3f11..000000000 --- a/Adyen/Model/PosMobile/CreateSessionRequest.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* POS Mobile API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosMobile -{ - /// - /// CreateSessionRequest - /// - [DataContract(Name = "CreateSessionRequest")] - public partial class CreateSessionRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateSessionRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of your merchant account. (required). - /// The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the `AuthenticationService.authenticate(setupToken)` callback of `AuthenticationService`. - When using the iOS POS Mobile SDK, obtain the token through the `PaymentServiceDelegate.register(with:)` callback of `PaymentServiceDelegate`. (required). - /// The unique identifier of the store that you want to process transactions for.. - public CreateSessionRequest(string merchantAccount = default(string), string setupToken = default(string), string store = default(string)) - { - this.MerchantAccount = merchantAccount; - this.SetupToken = setupToken; - this.Store = store; - } - - /// - /// The unique identifier of your merchant account. - /// - /// The unique identifier of your merchant account. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the `AuthenticationService.authenticate(setupToken)` callback of `AuthenticationService`. - When using the iOS POS Mobile SDK, obtain the token through the `PaymentServiceDelegate.register(with:)` callback of `PaymentServiceDelegate`. - /// - /// The setup token provided by the POS Mobile SDK. - When using the Android POS Mobile SDK, obtain the token through the `AuthenticationService.authenticate(setupToken)` callback of `AuthenticationService`. - When using the iOS POS Mobile SDK, obtain the token through the `PaymentServiceDelegate.register(with:)` callback of `PaymentServiceDelegate`. - [DataMember(Name = "setupToken", IsRequired = false, EmitDefaultValue = false)] - public string SetupToken { get; set; } - - /// - /// The unique identifier of the store that you want to process transactions for. - /// - /// The unique identifier of the store that you want to process transactions for. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateSessionRequest {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" SetupToken: ").Append(SetupToken).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateSessionRequest); - } - - /// - /// Returns true if CreateSessionRequest instances are equal - /// - /// Instance of CreateSessionRequest to be compared - /// Boolean - public bool Equals(CreateSessionRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.SetupToken == input.SetupToken || - (this.SetupToken != null && - this.SetupToken.Equals(input.SetupToken)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.SetupToken != null) - { - hashCode = (hashCode * 59) + this.SetupToken.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // SetupToken (string) maxLength - if (this.SetupToken != null && this.SetupToken.Length > 50000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SetupToken, length must be less than 50000.", new [] { "SetupToken" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/PosMobile/CreateSessionResponse.cs b/Adyen/Model/PosMobile/CreateSessionResponse.cs deleted file mode 100644 index cab8a9a13..000000000 --- a/Adyen/Model/PosMobile/CreateSessionResponse.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* -* POS Mobile API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosMobile -{ - /// - /// CreateSessionResponse - /// - [DataContract(Name = "CreateSessionResponse")] - public partial class CreateSessionResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the session.. - /// The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the `POIID` in the `MessageHeader` of the request.. - /// The unique identifier of your merchant account.. - /// The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app.. - /// The unique identifier of the store that you want to process transactions for.. - public CreateSessionResponse(string id = default(string), string installationId = default(string), string merchantAccount = default(string), string sdkData = default(string), string store = default(string)) - { - this.Id = id; - this.InstallationId = installationId; - this.MerchantAccount = merchantAccount; - this.SdkData = sdkData; - this.Store = store; - } - - /// - /// The unique identifier of the session. - /// - /// The unique identifier of the session. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the `POIID` in the `MessageHeader` of the request. - /// - /// The unique identifier of the SDK installation. If you create the [Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/) transaction request on your backend, use this as the `POIID` in the `MessageHeader` of the request. - [DataMember(Name = "installationId", EmitDefaultValue = false)] - public string InstallationId { get; set; } - - /// - /// The unique identifier of your merchant account. - /// - /// The unique identifier of your merchant account. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app. - /// - /// The data that the SDK uses to authenticate responses from the Adyen payments platform. Pass this value to your POS app. - [DataMember(Name = "sdkData", EmitDefaultValue = false)] - public string SdkData { get; set; } - - /// - /// The unique identifier of the store that you want to process transactions for. - /// - /// The unique identifier of the store that you want to process transactions for. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateSessionResponse {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" InstallationId: ").Append(InstallationId).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" SdkData: ").Append(SdkData).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateSessionResponse); - } - - /// - /// Returns true if CreateSessionResponse instances are equal - /// - /// Instance of CreateSessionResponse to be compared - /// Boolean - public bool Equals(CreateSessionResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.InstallationId == input.InstallationId || - (this.InstallationId != null && - this.InstallationId.Equals(input.InstallationId)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.SdkData == input.SdkData || - (this.SdkData != null && - this.SdkData.Equals(input.SdkData)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.InstallationId != null) - { - hashCode = (hashCode * 59) + this.InstallationId.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.SdkData != null) - { - hashCode = (hashCode * 59) + this.SdkData.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/AbstractOpenAPISchema.cs b/Adyen/Model/PosTerminalManagement/AbstractOpenAPISchema.cs deleted file mode 100644 index f0bd70001..000000000 --- a/Adyen/Model/PosTerminalManagement/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/PosTerminalManagement/Address.cs b/Adyen/Model/PosTerminalManagement/Address.cs deleted file mode 100644 index 53ff61eb9..000000000 --- a/Adyen/Model/PosTerminalManagement/Address.cs +++ /dev/null @@ -1,218 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// city. - /// countryCode. - /// postalCode. - /// stateOrProvince. - /// streetAddress. - /// streetAddress2. - public Address(string city = default(string), string countryCode = default(string), string postalCode = default(string), string stateOrProvince = default(string), string streetAddress = default(string), string streetAddress2 = default(string)) - { - this.City = city; - this.CountryCode = countryCode; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - this.StreetAddress = streetAddress; - this.StreetAddress2 = streetAddress2; - } - - /// - /// Gets or Sets City - /// - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// Gets or Sets CountryCode - /// - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// Gets or Sets PostalCode - /// - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// Gets or Sets StateOrProvince - /// - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// Gets or Sets StreetAddress - /// - [DataMember(Name = "streetAddress", EmitDefaultValue = false)] - public string StreetAddress { get; set; } - - /// - /// Gets or Sets StreetAddress2 - /// - [DataMember(Name = "streetAddress2", EmitDefaultValue = false)] - public string StreetAddress2 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" StreetAddress: ").Append(StreetAddress).Append("\n"); - sb.Append(" StreetAddress2: ").Append(StreetAddress2).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.StreetAddress == input.StreetAddress || - (this.StreetAddress != null && - this.StreetAddress.Equals(input.StreetAddress)) - ) && - ( - this.StreetAddress2 == input.StreetAddress2 || - (this.StreetAddress2 != null && - this.StreetAddress2.Equals(input.StreetAddress2)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.StreetAddress != null) - { - hashCode = (hashCode * 59) + this.StreetAddress.GetHashCode(); - } - if (this.StreetAddress2 != null) - { - hashCode = (hashCode * 59) + this.StreetAddress2.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/AssignTerminalsRequest.cs b/Adyen/Model/PosTerminalManagement/AssignTerminalsRequest.cs deleted file mode 100644 index fc30705ad..000000000 --- a/Adyen/Model/PosTerminalManagement/AssignTerminalsRequest.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// AssignTerminalsRequest - /// - [DataContract(Name = "AssignTerminalsRequest")] - public partial class AssignTerminalsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AssignTerminalsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Your company account. To return terminals to the company inventory, specify only this parameter and the `terminals`. (required). - /// Name of the merchant account. Specify this parameter to assign terminals to this merchant account or to a store under this merchant account.. - /// Boolean that indicates if you are assigning the terminals to the merchant inventory. Do not use when assigning terminals to a store. Required when assigning the terminal to a merchant account. - Set this to **true** to assign the terminals to the merchant inventory. This also means that the terminals cannot be boarded. - Set this to **false** to assign the terminals to the merchant account as in-store terminals. This makes the terminals ready to be boarded and to process payments through the specified merchant account.. - /// The store code of the store that you want to assign the terminals to.. - /// Array containing a list of terminal IDs that you want to assign or reassign to the merchant account or store, or that you want to return to the company inventory. For example, `[\"V400m-324689776\",\"P400Plus-329127412\"]`. (required). - public AssignTerminalsRequest(string companyAccount = default(string), string merchantAccount = default(string), bool? merchantInventory = default(bool?), string store = default(string), List terminals = default(List)) - { - this.CompanyAccount = companyAccount; - this.Terminals = terminals; - this.MerchantAccount = merchantAccount; - this.MerchantInventory = merchantInventory; - this.Store = store; - } - - /// - /// Your company account. To return terminals to the company inventory, specify only this parameter and the `terminals`. - /// - /// Your company account. To return terminals to the company inventory, specify only this parameter and the `terminals`. - [DataMember(Name = "companyAccount", IsRequired = false, EmitDefaultValue = false)] - public string CompanyAccount { get; set; } - - /// - /// Name of the merchant account. Specify this parameter to assign terminals to this merchant account or to a store under this merchant account. - /// - /// Name of the merchant account. Specify this parameter to assign terminals to this merchant account or to a store under this merchant account. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Boolean that indicates if you are assigning the terminals to the merchant inventory. Do not use when assigning terminals to a store. Required when assigning the terminal to a merchant account. - Set this to **true** to assign the terminals to the merchant inventory. This also means that the terminals cannot be boarded. - Set this to **false** to assign the terminals to the merchant account as in-store terminals. This makes the terminals ready to be boarded and to process payments through the specified merchant account. - /// - /// Boolean that indicates if you are assigning the terminals to the merchant inventory. Do not use when assigning terminals to a store. Required when assigning the terminal to a merchant account. - Set this to **true** to assign the terminals to the merchant inventory. This also means that the terminals cannot be boarded. - Set this to **false** to assign the terminals to the merchant account as in-store terminals. This makes the terminals ready to be boarded and to process payments through the specified merchant account. - [DataMember(Name = "merchantInventory", EmitDefaultValue = false)] - public bool? MerchantInventory { get; set; } - - /// - /// The store code of the store that you want to assign the terminals to. - /// - /// The store code of the store that you want to assign the terminals to. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Array containing a list of terminal IDs that you want to assign or reassign to the merchant account or store, or that you want to return to the company inventory. For example, `[\"V400m-324689776\",\"P400Plus-329127412\"]`. - /// - /// Array containing a list of terminal IDs that you want to assign or reassign to the merchant account or store, or that you want to return to the company inventory. For example, `[\"V400m-324689776\",\"P400Plus-329127412\"]`. - [DataMember(Name = "terminals", IsRequired = false, EmitDefaultValue = false)] - public List Terminals { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AssignTerminalsRequest {\n"); - sb.Append(" CompanyAccount: ").Append(CompanyAccount).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantInventory: ").Append(MerchantInventory).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" Terminals: ").Append(Terminals).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AssignTerminalsRequest); - } - - /// - /// Returns true if AssignTerminalsRequest instances are equal - /// - /// Instance of AssignTerminalsRequest to be compared - /// Boolean - public bool Equals(AssignTerminalsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyAccount == input.CompanyAccount || - (this.CompanyAccount != null && - this.CompanyAccount.Equals(input.CompanyAccount)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantInventory == input.MerchantInventory || - this.MerchantInventory.Equals(input.MerchantInventory) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.Terminals == input.Terminals || - this.Terminals != null && - input.Terminals != null && - this.Terminals.SequenceEqual(input.Terminals) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyAccount != null) - { - hashCode = (hashCode * 59) + this.CompanyAccount.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MerchantInventory.GetHashCode(); - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.Terminals != null) - { - hashCode = (hashCode * 59) + this.Terminals.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/AssignTerminalsResponse.cs b/Adyen/Model/PosTerminalManagement/AssignTerminalsResponse.cs deleted file mode 100644 index a731a64ba..000000000 --- a/Adyen/Model/PosTerminalManagement/AssignTerminalsResponse.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// AssignTerminalsResponse - /// - [DataContract(Name = "AssignTerminalsResponse")] - public partial class AssignTerminalsResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AssignTerminalsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Array that returns a list of the terminals, and for each terminal the result of assigning it to an account or store. The results can be: - `Done`: The terminal has been assigned. - `AssignmentScheduled`: The terminal will be assigned asynschronously. - `RemoveConfigScheduled`: The terminal was previously assigned and boarded. Wait for the terminal to synchronize with the Adyen platform. For more information, refer to [Reassigning boarded terminals](https://docs.adyen.com/point-of-sale/managing-terminals/assign-terminals#reassign-boarded-terminals). - `Error`: There was an error when assigning the terminal. (required). - public AssignTerminalsResponse(Dictionary results = default(Dictionary)) - { - this.Results = results; - } - - /// - /// Array that returns a list of the terminals, and for each terminal the result of assigning it to an account or store. The results can be: - `Done`: The terminal has been assigned. - `AssignmentScheduled`: The terminal will be assigned asynschronously. - `RemoveConfigScheduled`: The terminal was previously assigned and boarded. Wait for the terminal to synchronize with the Adyen platform. For more information, refer to [Reassigning boarded terminals](https://docs.adyen.com/point-of-sale/managing-terminals/assign-terminals#reassign-boarded-terminals). - `Error`: There was an error when assigning the terminal. - /// - /// Array that returns a list of the terminals, and for each terminal the result of assigning it to an account or store. The results can be: - `Done`: The terminal has been assigned. - `AssignmentScheduled`: The terminal will be assigned asynschronously. - `RemoveConfigScheduled`: The terminal was previously assigned and boarded. Wait for the terminal to synchronize with the Adyen platform. For more information, refer to [Reassigning boarded terminals](https://docs.adyen.com/point-of-sale/managing-terminals/assign-terminals#reassign-boarded-terminals). - `Error`: There was an error when assigning the terminal. - [DataMember(Name = "results", IsRequired = false, EmitDefaultValue = false)] - public Dictionary Results { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AssignTerminalsResponse {\n"); - sb.Append(" Results: ").Append(Results).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AssignTerminalsResponse); - } - - /// - /// Returns true if AssignTerminalsResponse instances are equal - /// - /// Instance of AssignTerminalsResponse to be compared - /// Boolean - public bool Equals(AssignTerminalsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Results == input.Results || - this.Results != null && - input.Results != null && - this.Results.SequenceEqual(input.Results) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Results != null) - { - hashCode = (hashCode * 59) + this.Results.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/FindTerminalRequest.cs b/Adyen/Model/PosTerminalManagement/FindTerminalRequest.cs deleted file mode 100644 index cfe5dc7b1..000000000 --- a/Adyen/Model/PosTerminalManagement/FindTerminalRequest.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// FindTerminalRequest - /// - [DataContract(Name = "FindTerminalRequest")] - public partial class FindTerminalRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FindTerminalRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique terminal ID in the format `[Device model]-[Serial number]`. For example, **V400m-324689776**. (required). - public FindTerminalRequest(string terminal = default(string)) - { - this.Terminal = terminal; - } - - /// - /// The unique terminal ID in the format `[Device model]-[Serial number]`. For example, **V400m-324689776**. - /// - /// The unique terminal ID in the format `[Device model]-[Serial number]`. For example, **V400m-324689776**. - [DataMember(Name = "terminal", IsRequired = false, EmitDefaultValue = false)] - public string Terminal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FindTerminalRequest {\n"); - sb.Append(" Terminal: ").Append(Terminal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FindTerminalRequest); - } - - /// - /// Returns true if FindTerminalRequest instances are equal - /// - /// Instance of FindTerminalRequest to be compared - /// Boolean - public bool Equals(FindTerminalRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Terminal == input.Terminal || - (this.Terminal != null && - this.Terminal.Equals(input.Terminal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Terminal != null) - { - hashCode = (hashCode * 59) + this.Terminal.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/FindTerminalResponse.cs b/Adyen/Model/PosTerminalManagement/FindTerminalResponse.cs deleted file mode 100644 index c60c5085e..000000000 --- a/Adyen/Model/PosTerminalManagement/FindTerminalResponse.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// FindTerminalResponse - /// - [DataContract(Name = "FindTerminalResponse")] - public partial class FindTerminalResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FindTerminalResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. (required). - /// The merchant account that the terminal is associated with. If the response doesn't contain a `store` the terminal is assigned to this merchant account.. - /// Boolean that indicates if the terminal is assigned to the merchant inventory. This is returned when the terminal is assigned to a merchant account. - If **true**, this indicates that the terminal is in the merchant inventory. This also means that the terminal cannot be boarded. - If **false**, this indicates that the terminal is assigned to the merchant account as an in-store terminal. This means that the terminal is ready to be boarded, or is already boarded.. - /// The store code of the store that the terminal is assigned to.. - /// The unique terminal ID. (required). - public FindTerminalResponse(string companyAccount = default(string), string merchantAccount = default(string), bool? merchantInventory = default(bool?), string store = default(string), string terminal = default(string)) - { - this.CompanyAccount = companyAccount; - this.Terminal = terminal; - this.MerchantAccount = merchantAccount; - this.MerchantInventory = merchantInventory; - this.Store = store; - } - - /// - /// The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. - /// - /// The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. - [DataMember(Name = "companyAccount", IsRequired = false, EmitDefaultValue = false)] - public string CompanyAccount { get; set; } - - /// - /// The merchant account that the terminal is associated with. If the response doesn't contain a `store` the terminal is assigned to this merchant account. - /// - /// The merchant account that the terminal is associated with. If the response doesn't contain a `store` the terminal is assigned to this merchant account. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Boolean that indicates if the terminal is assigned to the merchant inventory. This is returned when the terminal is assigned to a merchant account. - If **true**, this indicates that the terminal is in the merchant inventory. This also means that the terminal cannot be boarded. - If **false**, this indicates that the terminal is assigned to the merchant account as an in-store terminal. This means that the terminal is ready to be boarded, or is already boarded. - /// - /// Boolean that indicates if the terminal is assigned to the merchant inventory. This is returned when the terminal is assigned to a merchant account. - If **true**, this indicates that the terminal is in the merchant inventory. This also means that the terminal cannot be boarded. - If **false**, this indicates that the terminal is assigned to the merchant account as an in-store terminal. This means that the terminal is ready to be boarded, or is already boarded. - [DataMember(Name = "merchantInventory", EmitDefaultValue = false)] - public bool? MerchantInventory { get; set; } - - /// - /// The store code of the store that the terminal is assigned to. - /// - /// The store code of the store that the terminal is assigned to. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// The unique terminal ID. - /// - /// The unique terminal ID. - [DataMember(Name = "terminal", IsRequired = false, EmitDefaultValue = false)] - public string Terminal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FindTerminalResponse {\n"); - sb.Append(" CompanyAccount: ").Append(CompanyAccount).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantInventory: ").Append(MerchantInventory).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" Terminal: ").Append(Terminal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FindTerminalResponse); - } - - /// - /// Returns true if FindTerminalResponse instances are equal - /// - /// Instance of FindTerminalResponse to be compared - /// Boolean - public bool Equals(FindTerminalResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyAccount == input.CompanyAccount || - (this.CompanyAccount != null && - this.CompanyAccount.Equals(input.CompanyAccount)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantInventory == input.MerchantInventory || - this.MerchantInventory.Equals(input.MerchantInventory) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.Terminal == input.Terminal || - (this.Terminal != null && - this.Terminal.Equals(input.Terminal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyAccount != null) - { - hashCode = (hashCode * 59) + this.CompanyAccount.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MerchantInventory.GetHashCode(); - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.Terminal != null) - { - hashCode = (hashCode * 59) + this.Terminal.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/GetStoresUnderAccountRequest.cs b/Adyen/Model/PosTerminalManagement/GetStoresUnderAccountRequest.cs deleted file mode 100644 index b813bbaa3..000000000 --- a/Adyen/Model/PosTerminalManagement/GetStoresUnderAccountRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// GetStoresUnderAccountRequest - /// - [DataContract(Name = "GetStoresUnderAccountRequest")] - public partial class GetStoresUnderAccountRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetStoresUnderAccountRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The company account. If you only specify this parameter, the response includes the stores of all merchant accounts that are associated with the company account. (required). - /// The merchant account. With this parameter, the response only includes the stores of the specified merchant account.. - public GetStoresUnderAccountRequest(string companyAccount = default(string), string merchantAccount = default(string)) - { - this.CompanyAccount = companyAccount; - this.MerchantAccount = merchantAccount; - } - - /// - /// The company account. If you only specify this parameter, the response includes the stores of all merchant accounts that are associated with the company account. - /// - /// The company account. If you only specify this parameter, the response includes the stores of all merchant accounts that are associated with the company account. - [DataMember(Name = "companyAccount", IsRequired = false, EmitDefaultValue = false)] - public string CompanyAccount { get; set; } - - /// - /// The merchant account. With this parameter, the response only includes the stores of the specified merchant account. - /// - /// The merchant account. With this parameter, the response only includes the stores of the specified merchant account. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetStoresUnderAccountRequest {\n"); - sb.Append(" CompanyAccount: ").Append(CompanyAccount).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetStoresUnderAccountRequest); - } - - /// - /// Returns true if GetStoresUnderAccountRequest instances are equal - /// - /// Instance of GetStoresUnderAccountRequest to be compared - /// Boolean - public bool Equals(GetStoresUnderAccountRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyAccount == input.CompanyAccount || - (this.CompanyAccount != null && - this.CompanyAccount.Equals(input.CompanyAccount)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyAccount != null) - { - hashCode = (hashCode * 59) + this.CompanyAccount.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/GetStoresUnderAccountResponse.cs b/Adyen/Model/PosTerminalManagement/GetStoresUnderAccountResponse.cs deleted file mode 100644 index 85ad86693..000000000 --- a/Adyen/Model/PosTerminalManagement/GetStoresUnderAccountResponse.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// GetStoresUnderAccountResponse - /// - [DataContract(Name = "GetStoresUnderAccountResponse")] - public partial class GetStoresUnderAccountResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account.. - public GetStoresUnderAccountResponse(List stores = default(List)) - { - this.Stores = stores; - } - - /// - /// Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account. - /// - /// Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account. - [DataMember(Name = "stores", EmitDefaultValue = false)] - public List Stores { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetStoresUnderAccountResponse {\n"); - sb.Append(" Stores: ").Append(Stores).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetStoresUnderAccountResponse); - } - - /// - /// Returns true if GetStoresUnderAccountResponse instances are equal - /// - /// Instance of GetStoresUnderAccountResponse to be compared - /// Boolean - public bool Equals(GetStoresUnderAccountResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Stores == input.Stores || - this.Stores != null && - input.Stores != null && - this.Stores.SequenceEqual(input.Stores) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Stores != null) - { - hashCode = (hashCode * 59) + this.Stores.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/GetTerminalDetailsRequest.cs b/Adyen/Model/PosTerminalManagement/GetTerminalDetailsRequest.cs deleted file mode 100644 index ab373f59d..000000000 --- a/Adyen/Model/PosTerminalManagement/GetTerminalDetailsRequest.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// GetTerminalDetailsRequest - /// - [DataContract(Name = "GetTerminalDetailsRequest")] - public partial class GetTerminalDetailsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetTerminalDetailsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique terminal ID in the format `[Device model]-[Serial number]`. For example, **V400m-324689776**. (required). - public GetTerminalDetailsRequest(string terminal = default(string)) - { - this.Terminal = terminal; - } - - /// - /// The unique terminal ID in the format `[Device model]-[Serial number]`. For example, **V400m-324689776**. - /// - /// The unique terminal ID in the format `[Device model]-[Serial number]`. For example, **V400m-324689776**. - [DataMember(Name = "terminal", IsRequired = false, EmitDefaultValue = false)] - public string Terminal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTerminalDetailsRequest {\n"); - sb.Append(" Terminal: ").Append(Terminal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTerminalDetailsRequest); - } - - /// - /// Returns true if GetTerminalDetailsRequest instances are equal - /// - /// Instance of GetTerminalDetailsRequest to be compared - /// Boolean - public bool Equals(GetTerminalDetailsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Terminal == input.Terminal || - (this.Terminal != null && - this.Terminal.Equals(input.Terminal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Terminal != null) - { - hashCode = (hashCode * 59) + this.Terminal.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/GetTerminalDetailsResponse.cs b/Adyen/Model/PosTerminalManagement/GetTerminalDetailsResponse.cs deleted file mode 100644 index fd3234b5b..000000000 --- a/Adyen/Model/PosTerminalManagement/GetTerminalDetailsResponse.cs +++ /dev/null @@ -1,658 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// GetTerminalDetailsResponse - /// - [DataContract(Name = "GetTerminalDetailsResponse")] - public partial class GetTerminalDetailsResponse : IEquatable, IValidatableObject - { - /// - /// The status of the terminal: - `OnlineToday`, `OnlineLast1Day`, `OnlineLast2Days` etcetera to `OnlineLast7Days`: Indicates when in the past week the terminal was last online. - `SwitchedOff`: Indicates it was more than a week ago that the terminal was last online. - `ReAssignToInventoryPending`, `ReAssignToStorePending`, `ReAssignToMerchantInventoryPending`: Indicates the terminal is scheduled to be reassigned. - /// - /// The status of the terminal: - `OnlineToday`, `OnlineLast1Day`, `OnlineLast2Days` etcetera to `OnlineLast7Days`: Indicates when in the past week the terminal was last online. - `SwitchedOff`: Indicates it was more than a week ago that the terminal was last online. - `ReAssignToInventoryPending`, `ReAssignToStorePending`, `ReAssignToMerchantInventoryPending`: Indicates the terminal is scheduled to be reassigned. - [JsonConverter(typeof(StringEnumConverter))] - public enum TerminalStatusEnum - { - /// - /// Enum OnlineLast1Day for value: OnlineLast1Day - /// - [EnumMember(Value = "OnlineLast1Day")] - OnlineLast1Day = 1, - - /// - /// Enum OnlineLast2Days for value: OnlineLast2Days - /// - [EnumMember(Value = "OnlineLast2Days")] - OnlineLast2Days = 2, - - /// - /// Enum OnlineLast3Days for value: OnlineLast3Days - /// - [EnumMember(Value = "OnlineLast3Days")] - OnlineLast3Days = 3, - - /// - /// Enum OnlineLast4Days for value: OnlineLast4Days - /// - [EnumMember(Value = "OnlineLast4Days")] - OnlineLast4Days = 4, - - /// - /// Enum OnlineLast5Days for value: OnlineLast5Days - /// - [EnumMember(Value = "OnlineLast5Days")] - OnlineLast5Days = 5, - - /// - /// Enum OnlineLast6Days for value: OnlineLast6Days - /// - [EnumMember(Value = "OnlineLast6Days")] - OnlineLast6Days = 6, - - /// - /// Enum OnlineLast7Days for value: OnlineLast7Days - /// - [EnumMember(Value = "OnlineLast7Days")] - OnlineLast7Days = 7, - - /// - /// Enum OnlineToday for value: OnlineToday - /// - [EnumMember(Value = "OnlineToday")] - OnlineToday = 8, - - /// - /// Enum ReAssignToInventoryPending for value: ReAssignToInventoryPending - /// - [EnumMember(Value = "ReAssignToInventoryPending")] - ReAssignToInventoryPending = 9, - - /// - /// Enum ReAssignToMerchantInventoryPending for value: ReAssignToMerchantInventoryPending - /// - [EnumMember(Value = "ReAssignToMerchantInventoryPending")] - ReAssignToMerchantInventoryPending = 10, - - /// - /// Enum ReAssignToStorePending for value: ReAssignToStorePending - /// - [EnumMember(Value = "ReAssignToStorePending")] - ReAssignToStorePending = 11, - - /// - /// Enum SwitchedOff for value: SwitchedOff - /// - [EnumMember(Value = "SwitchedOff")] - SwitchedOff = 12 - - } - - - /// - /// The status of the terminal: - `OnlineToday`, `OnlineLast1Day`, `OnlineLast2Days` etcetera to `OnlineLast7Days`: Indicates when in the past week the terminal was last online. - `SwitchedOff`: Indicates it was more than a week ago that the terminal was last online. - `ReAssignToInventoryPending`, `ReAssignToStorePending`, `ReAssignToMerchantInventoryPending`: Indicates the terminal is scheduled to be reassigned. - /// - /// The status of the terminal: - `OnlineToday`, `OnlineLast1Day`, `OnlineLast2Days` etcetera to `OnlineLast7Days`: Indicates when in the past week the terminal was last online. - `SwitchedOff`: Indicates it was more than a week ago that the terminal was last online. - `ReAssignToInventoryPending`, `ReAssignToStorePending`, `ReAssignToMerchantInventoryPending`: Indicates the terminal is scheduled to be reassigned. - [DataMember(Name = "terminalStatus", EmitDefaultValue = false)] - public TerminalStatusEnum? TerminalStatus { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetTerminalDetailsResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The Bluetooth IP address of the terminal.. - /// The Bluetooth MAC address of the terminal.. - /// The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. (required). - /// The country where the terminal is used.. - /// The model name of the terminal.. - /// Indicates whether assigning IP addresses through a DHCP server is enabled on the terminal.. - /// The label shown on the status bar of the display. This label (if any) is specified in your Customer Area.. - /// The terminal's IP address in your Ethernet network.. - /// The terminal's MAC address in your Ethernet network.. - /// The software release currently in use on the terminal.. - /// The integrated circuit card identifier (ICCID) of the SIM card in the terminal.. - /// Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago.. - /// Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago.. - /// The Ethernet link negotiation that the terminal uses: - `auto`: Auto-negotiation - `100full`: 100 Mbps full duplex. - /// The merchant account that the terminal is associated with. If the response doesn't contain a `store` the terminal is assigned to this merchant account.. - /// Boolean that indicates if the terminal is assigned to the merchant inventory. This is returned when the terminal is assigned to a merchant account. - If **true**, this indicates that the terminal is in the merchant inventory. This also means that the terminal cannot be boarded. - If **false**, this indicates that the terminal is assigned to the merchant account as an in-store terminal. This means that the terminal is ready to be boarded, or is already boarded.. - /// The permanent terminal ID.. - /// The serial number of the terminal.. - /// On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal: ACTIVE or INVENTORY.. - /// The store code of the store that the terminal is assigned to.. - /// storeDetails. - /// The unique terminal ID. (required). - /// The status of the terminal: - `OnlineToday`, `OnlineLast1Day`, `OnlineLast2Days` etcetera to `OnlineLast7Days`: Indicates when in the past week the terminal was last online. - `SwitchedOff`: Indicates it was more than a week ago that the terminal was last online. - `ReAssignToInventoryPending`, `ReAssignToStorePending`, `ReAssignToMerchantInventoryPending`: Indicates the terminal is scheduled to be reassigned.. - /// The terminal's IP address in your Wi-Fi network.. - /// The terminal's MAC address in your Wi-Fi network.. - public GetTerminalDetailsResponse(string bluetoothIp = default(string), string bluetoothMac = default(string), string companyAccount = default(string), string country = default(string), string deviceModel = default(string), bool? dhcpEnabled = default(bool?), string displayLabel = default(string), string ethernetIp = default(string), string ethernetMac = default(string), string firmwareVersion = default(string), string iccid = default(string), DateTime lastActivityDateTime = default(DateTime), DateTime lastTransactionDateTime = default(DateTime), string linkNegotiation = default(string), string merchantAccount = default(string), bool? merchantInventory = default(bool?), string permanentTerminalId = default(string), string serialNumber = default(string), string simStatus = default(string), string store = default(string), Store storeDetails = default(Store), string terminal = default(string), TerminalStatusEnum? terminalStatus = default(TerminalStatusEnum?), string wifiIp = default(string), string wifiMac = default(string)) - { - this.CompanyAccount = companyAccount; - this.Terminal = terminal; - this.BluetoothIp = bluetoothIp; - this.BluetoothMac = bluetoothMac; - this.Country = country; - this.DeviceModel = deviceModel; - this.DhcpEnabled = dhcpEnabled; - this.DisplayLabel = displayLabel; - this.EthernetIp = ethernetIp; - this.EthernetMac = ethernetMac; - this.FirmwareVersion = firmwareVersion; - this.Iccid = iccid; - this.LastActivityDateTime = lastActivityDateTime; - this.LastTransactionDateTime = lastTransactionDateTime; - this.LinkNegotiation = linkNegotiation; - this.MerchantAccount = merchantAccount; - this.MerchantInventory = merchantInventory; - this.PermanentTerminalId = permanentTerminalId; - this.SerialNumber = serialNumber; - this.SimStatus = simStatus; - this.Store = store; - this.StoreDetails = storeDetails; - this.TerminalStatus = terminalStatus; - this.WifiIp = wifiIp; - this.WifiMac = wifiMac; - } - - /// - /// The Bluetooth IP address of the terminal. - /// - /// The Bluetooth IP address of the terminal. - [DataMember(Name = "bluetoothIp", EmitDefaultValue = false)] - public string BluetoothIp { get; set; } - - /// - /// The Bluetooth MAC address of the terminal. - /// - /// The Bluetooth MAC address of the terminal. - [DataMember(Name = "bluetoothMac", EmitDefaultValue = false)] - public string BluetoothMac { get; set; } - - /// - /// The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. - /// - /// The company account that the terminal is associated with. If this is the only account level shown in the response, the terminal is assigned to the inventory of the company account. - [DataMember(Name = "companyAccount", IsRequired = false, EmitDefaultValue = false)] - public string CompanyAccount { get; set; } - - /// - /// The country where the terminal is used. - /// - /// The country where the terminal is used. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The model name of the terminal. - /// - /// The model name of the terminal. - [DataMember(Name = "deviceModel", EmitDefaultValue = false)] - public string DeviceModel { get; set; } - - /// - /// Indicates whether assigning IP addresses through a DHCP server is enabled on the terminal. - /// - /// Indicates whether assigning IP addresses through a DHCP server is enabled on the terminal. - [DataMember(Name = "dhcpEnabled", EmitDefaultValue = false)] - public bool? DhcpEnabled { get; set; } - - /// - /// The label shown on the status bar of the display. This label (if any) is specified in your Customer Area. - /// - /// The label shown on the status bar of the display. This label (if any) is specified in your Customer Area. - [DataMember(Name = "displayLabel", EmitDefaultValue = false)] - public string DisplayLabel { get; set; } - - /// - /// The terminal's IP address in your Ethernet network. - /// - /// The terminal's IP address in your Ethernet network. - [DataMember(Name = "ethernetIp", EmitDefaultValue = false)] - public string EthernetIp { get; set; } - - /// - /// The terminal's MAC address in your Ethernet network. - /// - /// The terminal's MAC address in your Ethernet network. - [DataMember(Name = "ethernetMac", EmitDefaultValue = false)] - public string EthernetMac { get; set; } - - /// - /// The software release currently in use on the terminal. - /// - /// The software release currently in use on the terminal. - [DataMember(Name = "firmwareVersion", EmitDefaultValue = false)] - public string FirmwareVersion { get; set; } - - /// - /// The integrated circuit card identifier (ICCID) of the SIM card in the terminal. - /// - /// The integrated circuit card identifier (ICCID) of the SIM card in the terminal. - [DataMember(Name = "iccid", EmitDefaultValue = false)] - public string Iccid { get; set; } - - /// - /// Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago. - /// - /// Date and time of the last activity on the terminal. Not included when the last activity was more than 14 days ago. - [DataMember(Name = "lastActivityDateTime", EmitDefaultValue = false)] - public DateTime LastActivityDateTime { get; set; } - - /// - /// Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago. - /// - /// Date and time of the last transaction on the terminal. Not included when the last transaction was more than 14 days ago. - [DataMember(Name = "lastTransactionDateTime", EmitDefaultValue = false)] - public DateTime LastTransactionDateTime { get; set; } - - /// - /// The Ethernet link negotiation that the terminal uses: - `auto`: Auto-negotiation - `100full`: 100 Mbps full duplex - /// - /// The Ethernet link negotiation that the terminal uses: - `auto`: Auto-negotiation - `100full`: 100 Mbps full duplex - [DataMember(Name = "linkNegotiation", EmitDefaultValue = false)] - public string LinkNegotiation { get; set; } - - /// - /// The merchant account that the terminal is associated with. If the response doesn't contain a `store` the terminal is assigned to this merchant account. - /// - /// The merchant account that the terminal is associated with. If the response doesn't contain a `store` the terminal is assigned to this merchant account. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Boolean that indicates if the terminal is assigned to the merchant inventory. This is returned when the terminal is assigned to a merchant account. - If **true**, this indicates that the terminal is in the merchant inventory. This also means that the terminal cannot be boarded. - If **false**, this indicates that the terminal is assigned to the merchant account as an in-store terminal. This means that the terminal is ready to be boarded, or is already boarded. - /// - /// Boolean that indicates if the terminal is assigned to the merchant inventory. This is returned when the terminal is assigned to a merchant account. - If **true**, this indicates that the terminal is in the merchant inventory. This also means that the terminal cannot be boarded. - If **false**, this indicates that the terminal is assigned to the merchant account as an in-store terminal. This means that the terminal is ready to be boarded, or is already boarded. - [DataMember(Name = "merchantInventory", EmitDefaultValue = false)] - public bool? MerchantInventory { get; set; } - - /// - /// The permanent terminal ID. - /// - /// The permanent terminal ID. - [DataMember(Name = "permanentTerminalId", EmitDefaultValue = false)] - public string PermanentTerminalId { get; set; } - - /// - /// The serial number of the terminal. - /// - /// The serial number of the terminal. - [DataMember(Name = "serialNumber", EmitDefaultValue = false)] - public string SerialNumber { get; set; } - - /// - /// On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal: ACTIVE or INVENTORY. - /// - /// On a terminal that supports 3G or 4G connectivity, indicates the status of the SIM card in the terminal: ACTIVE or INVENTORY. - [DataMember(Name = "simStatus", EmitDefaultValue = false)] - public string SimStatus { get; set; } - - /// - /// The store code of the store that the terminal is assigned to. - /// - /// The store code of the store that the terminal is assigned to. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Gets or Sets StoreDetails - /// - [DataMember(Name = "storeDetails", EmitDefaultValue = false)] - public Store StoreDetails { get; set; } - - /// - /// The unique terminal ID. - /// - /// The unique terminal ID. - [DataMember(Name = "terminal", IsRequired = false, EmitDefaultValue = false)] - public string Terminal { get; set; } - - /// - /// The terminal's IP address in your Wi-Fi network. - /// - /// The terminal's IP address in your Wi-Fi network. - [DataMember(Name = "wifiIp", EmitDefaultValue = false)] - public string WifiIp { get; set; } - - /// - /// The terminal's MAC address in your Wi-Fi network. - /// - /// The terminal's MAC address in your Wi-Fi network. - [DataMember(Name = "wifiMac", EmitDefaultValue = false)] - public string WifiMac { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTerminalDetailsResponse {\n"); - sb.Append(" BluetoothIp: ").Append(BluetoothIp).Append("\n"); - sb.Append(" BluetoothMac: ").Append(BluetoothMac).Append("\n"); - sb.Append(" CompanyAccount: ").Append(CompanyAccount).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" DeviceModel: ").Append(DeviceModel).Append("\n"); - sb.Append(" DhcpEnabled: ").Append(DhcpEnabled).Append("\n"); - sb.Append(" DisplayLabel: ").Append(DisplayLabel).Append("\n"); - sb.Append(" EthernetIp: ").Append(EthernetIp).Append("\n"); - sb.Append(" EthernetMac: ").Append(EthernetMac).Append("\n"); - sb.Append(" FirmwareVersion: ").Append(FirmwareVersion).Append("\n"); - sb.Append(" Iccid: ").Append(Iccid).Append("\n"); - sb.Append(" LastActivityDateTime: ").Append(LastActivityDateTime).Append("\n"); - sb.Append(" LastTransactionDateTime: ").Append(LastTransactionDateTime).Append("\n"); - sb.Append(" LinkNegotiation: ").Append(LinkNegotiation).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" MerchantInventory: ").Append(MerchantInventory).Append("\n"); - sb.Append(" PermanentTerminalId: ").Append(PermanentTerminalId).Append("\n"); - sb.Append(" SerialNumber: ").Append(SerialNumber).Append("\n"); - sb.Append(" SimStatus: ").Append(SimStatus).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StoreDetails: ").Append(StoreDetails).Append("\n"); - sb.Append(" Terminal: ").Append(Terminal).Append("\n"); - sb.Append(" TerminalStatus: ").Append(TerminalStatus).Append("\n"); - sb.Append(" WifiIp: ").Append(WifiIp).Append("\n"); - sb.Append(" WifiMac: ").Append(WifiMac).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTerminalDetailsResponse); - } - - /// - /// Returns true if GetTerminalDetailsResponse instances are equal - /// - /// Instance of GetTerminalDetailsResponse to be compared - /// Boolean - public bool Equals(GetTerminalDetailsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.BluetoothIp == input.BluetoothIp || - (this.BluetoothIp != null && - this.BluetoothIp.Equals(input.BluetoothIp)) - ) && - ( - this.BluetoothMac == input.BluetoothMac || - (this.BluetoothMac != null && - this.BluetoothMac.Equals(input.BluetoothMac)) - ) && - ( - this.CompanyAccount == input.CompanyAccount || - (this.CompanyAccount != null && - this.CompanyAccount.Equals(input.CompanyAccount)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.DeviceModel == input.DeviceModel || - (this.DeviceModel != null && - this.DeviceModel.Equals(input.DeviceModel)) - ) && - ( - this.DhcpEnabled == input.DhcpEnabled || - this.DhcpEnabled.Equals(input.DhcpEnabled) - ) && - ( - this.DisplayLabel == input.DisplayLabel || - (this.DisplayLabel != null && - this.DisplayLabel.Equals(input.DisplayLabel)) - ) && - ( - this.EthernetIp == input.EthernetIp || - (this.EthernetIp != null && - this.EthernetIp.Equals(input.EthernetIp)) - ) && - ( - this.EthernetMac == input.EthernetMac || - (this.EthernetMac != null && - this.EthernetMac.Equals(input.EthernetMac)) - ) && - ( - this.FirmwareVersion == input.FirmwareVersion || - (this.FirmwareVersion != null && - this.FirmwareVersion.Equals(input.FirmwareVersion)) - ) && - ( - this.Iccid == input.Iccid || - (this.Iccid != null && - this.Iccid.Equals(input.Iccid)) - ) && - ( - this.LastActivityDateTime == input.LastActivityDateTime || - (this.LastActivityDateTime != null && - this.LastActivityDateTime.Equals(input.LastActivityDateTime)) - ) && - ( - this.LastTransactionDateTime == input.LastTransactionDateTime || - (this.LastTransactionDateTime != null && - this.LastTransactionDateTime.Equals(input.LastTransactionDateTime)) - ) && - ( - this.LinkNegotiation == input.LinkNegotiation || - (this.LinkNegotiation != null && - this.LinkNegotiation.Equals(input.LinkNegotiation)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.MerchantInventory == input.MerchantInventory || - this.MerchantInventory.Equals(input.MerchantInventory) - ) && - ( - this.PermanentTerminalId == input.PermanentTerminalId || - (this.PermanentTerminalId != null && - this.PermanentTerminalId.Equals(input.PermanentTerminalId)) - ) && - ( - this.SerialNumber == input.SerialNumber || - (this.SerialNumber != null && - this.SerialNumber.Equals(input.SerialNumber)) - ) && - ( - this.SimStatus == input.SimStatus || - (this.SimStatus != null && - this.SimStatus.Equals(input.SimStatus)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreDetails == input.StoreDetails || - (this.StoreDetails != null && - this.StoreDetails.Equals(input.StoreDetails)) - ) && - ( - this.Terminal == input.Terminal || - (this.Terminal != null && - this.Terminal.Equals(input.Terminal)) - ) && - ( - this.TerminalStatus == input.TerminalStatus || - this.TerminalStatus.Equals(input.TerminalStatus) - ) && - ( - this.WifiIp == input.WifiIp || - (this.WifiIp != null && - this.WifiIp.Equals(input.WifiIp)) - ) && - ( - this.WifiMac == input.WifiMac || - (this.WifiMac != null && - this.WifiMac.Equals(input.WifiMac)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BluetoothIp != null) - { - hashCode = (hashCode * 59) + this.BluetoothIp.GetHashCode(); - } - if (this.BluetoothMac != null) - { - hashCode = (hashCode * 59) + this.BluetoothMac.GetHashCode(); - } - if (this.CompanyAccount != null) - { - hashCode = (hashCode * 59) + this.CompanyAccount.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.DeviceModel != null) - { - hashCode = (hashCode * 59) + this.DeviceModel.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DhcpEnabled.GetHashCode(); - if (this.DisplayLabel != null) - { - hashCode = (hashCode * 59) + this.DisplayLabel.GetHashCode(); - } - if (this.EthernetIp != null) - { - hashCode = (hashCode * 59) + this.EthernetIp.GetHashCode(); - } - if (this.EthernetMac != null) - { - hashCode = (hashCode * 59) + this.EthernetMac.GetHashCode(); - } - if (this.FirmwareVersion != null) - { - hashCode = (hashCode * 59) + this.FirmwareVersion.GetHashCode(); - } - if (this.Iccid != null) - { - hashCode = (hashCode * 59) + this.Iccid.GetHashCode(); - } - if (this.LastActivityDateTime != null) - { - hashCode = (hashCode * 59) + this.LastActivityDateTime.GetHashCode(); - } - if (this.LastTransactionDateTime != null) - { - hashCode = (hashCode * 59) + this.LastTransactionDateTime.GetHashCode(); - } - if (this.LinkNegotiation != null) - { - hashCode = (hashCode * 59) + this.LinkNegotiation.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MerchantInventory.GetHashCode(); - if (this.PermanentTerminalId != null) - { - hashCode = (hashCode * 59) + this.PermanentTerminalId.GetHashCode(); - } - if (this.SerialNumber != null) - { - hashCode = (hashCode * 59) + this.SerialNumber.GetHashCode(); - } - if (this.SimStatus != null) - { - hashCode = (hashCode * 59) + this.SimStatus.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.StoreDetails != null) - { - hashCode = (hashCode * 59) + this.StoreDetails.GetHashCode(); - } - if (this.Terminal != null) - { - hashCode = (hashCode * 59) + this.Terminal.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TerminalStatus.GetHashCode(); - if (this.WifiIp != null) - { - hashCode = (hashCode * 59) + this.WifiIp.GetHashCode(); - } - if (this.WifiMac != null) - { - hashCode = (hashCode * 59) + this.WifiMac.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/GetTerminalsUnderAccountRequest.cs b/Adyen/Model/PosTerminalManagement/GetTerminalsUnderAccountRequest.cs deleted file mode 100644 index 9bf651a8e..000000000 --- a/Adyen/Model/PosTerminalManagement/GetTerminalsUnderAccountRequest.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// GetTerminalsUnderAccountRequest - /// - [DataContract(Name = "GetTerminalsUnderAccountRequest")] - public partial class GetTerminalsUnderAccountRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetTerminalsUnderAccountRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Your company account. If you only specify this parameter, the response includes all terminals at all account levels. (required). - /// The merchant account. This is required if you are retrieving the terminals assigned to a store.If you don't specify a `store` the response includes the terminals assigned to the specified merchant account and the terminals assigned to the stores under this merchant account.. - /// The store code of the store. With this parameter, the response only includes the terminals assigned to the specified store.. - public GetTerminalsUnderAccountRequest(string companyAccount = default(string), string merchantAccount = default(string), string store = default(string)) - { - this.CompanyAccount = companyAccount; - this.MerchantAccount = merchantAccount; - this.Store = store; - } - - /// - /// Your company account. If you only specify this parameter, the response includes all terminals at all account levels. - /// - /// Your company account. If you only specify this parameter, the response includes all terminals at all account levels. - [DataMember(Name = "companyAccount", IsRequired = false, EmitDefaultValue = false)] - public string CompanyAccount { get; set; } - - /// - /// The merchant account. This is required if you are retrieving the terminals assigned to a store.If you don't specify a `store` the response includes the terminals assigned to the specified merchant account and the terminals assigned to the stores under this merchant account. - /// - /// The merchant account. This is required if you are retrieving the terminals assigned to a store.If you don't specify a `store` the response includes the terminals assigned to the specified merchant account and the terminals assigned to the stores under this merchant account. - [DataMember(Name = "merchantAccount", EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The store code of the store. With this parameter, the response only includes the terminals assigned to the specified store. - /// - /// The store code of the store. With this parameter, the response only includes the terminals assigned to the specified store. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTerminalsUnderAccountRequest {\n"); - sb.Append(" CompanyAccount: ").Append(CompanyAccount).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTerminalsUnderAccountRequest); - } - - /// - /// Returns true if GetTerminalsUnderAccountRequest instances are equal - /// - /// Instance of GetTerminalsUnderAccountRequest to be compared - /// Boolean - public bool Equals(GetTerminalsUnderAccountRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyAccount == input.CompanyAccount || - (this.CompanyAccount != null && - this.CompanyAccount.Equals(input.CompanyAccount)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyAccount != null) - { - hashCode = (hashCode * 59) + this.CompanyAccount.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/GetTerminalsUnderAccountResponse.cs b/Adyen/Model/PosTerminalManagement/GetTerminalsUnderAccountResponse.cs deleted file mode 100644 index cf45d89ad..000000000 --- a/Adyen/Model/PosTerminalManagement/GetTerminalsUnderAccountResponse.cs +++ /dev/null @@ -1,174 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// GetTerminalsUnderAccountResponse - /// - [DataContract(Name = "GetTerminalsUnderAccountResponse")] - public partial class GetTerminalsUnderAccountResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GetTerminalsUnderAccountResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Your company account. (required). - /// Array that returns a list of all terminals that are in the inventory of the company account.. - /// Array that returns a list of all merchant accounts belonging to the company account.. - public GetTerminalsUnderAccountResponse(string companyAccount = default(string), List inventoryTerminals = default(List), List merchantAccounts = default(List)) - { - this.CompanyAccount = companyAccount; - this.InventoryTerminals = inventoryTerminals; - this.MerchantAccounts = merchantAccounts; - } - - /// - /// Your company account. - /// - /// Your company account. - [DataMember(Name = "companyAccount", IsRequired = false, EmitDefaultValue = false)] - public string CompanyAccount { get; set; } - - /// - /// Array that returns a list of all terminals that are in the inventory of the company account. - /// - /// Array that returns a list of all terminals that are in the inventory of the company account. - [DataMember(Name = "inventoryTerminals", EmitDefaultValue = false)] - public List InventoryTerminals { get; set; } - - /// - /// Array that returns a list of all merchant accounts belonging to the company account. - /// - /// Array that returns a list of all merchant accounts belonging to the company account. - [DataMember(Name = "merchantAccounts", EmitDefaultValue = false)] - public List MerchantAccounts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTerminalsUnderAccountResponse {\n"); - sb.Append(" CompanyAccount: ").Append(CompanyAccount).Append("\n"); - sb.Append(" InventoryTerminals: ").Append(InventoryTerminals).Append("\n"); - sb.Append(" MerchantAccounts: ").Append(MerchantAccounts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTerminalsUnderAccountResponse); - } - - /// - /// Returns true if GetTerminalsUnderAccountResponse instances are equal - /// - /// Instance of GetTerminalsUnderAccountResponse to be compared - /// Boolean - public bool Equals(GetTerminalsUnderAccountResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CompanyAccount == input.CompanyAccount || - (this.CompanyAccount != null && - this.CompanyAccount.Equals(input.CompanyAccount)) - ) && - ( - this.InventoryTerminals == input.InventoryTerminals || - this.InventoryTerminals != null && - input.InventoryTerminals != null && - this.InventoryTerminals.SequenceEqual(input.InventoryTerminals) - ) && - ( - this.MerchantAccounts == input.MerchantAccounts || - this.MerchantAccounts != null && - input.MerchantAccounts != null && - this.MerchantAccounts.SequenceEqual(input.MerchantAccounts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CompanyAccount != null) - { - hashCode = (hashCode * 59) + this.CompanyAccount.GetHashCode(); - } - if (this.InventoryTerminals != null) - { - hashCode = (hashCode * 59) + this.InventoryTerminals.GetHashCode(); - } - if (this.MerchantAccounts != null) - { - hashCode = (hashCode * 59) + this.MerchantAccounts.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/MerchantAccount.cs b/Adyen/Model/PosTerminalManagement/MerchantAccount.cs deleted file mode 100644 index 9a7a3bc94..000000000 --- a/Adyen/Model/PosTerminalManagement/MerchantAccount.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// MerchantAccount - /// - [DataContract(Name = "MerchantAccount")] - public partial class MerchantAccount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MerchantAccount() { } - /// - /// Initializes a new instance of the class. - /// - /// List of terminals assigned to this merchant account as in-store terminals. This means that the terminal is ready to be boarded, or is already boarded.. - /// List of terminals assigned to the inventory of this merchant account.. - /// The merchant account. (required). - /// Array of stores under this merchant account.. - public MerchantAccount(List inStoreTerminals = default(List), List inventoryTerminals = default(List), string merchantAccount = default(string), List stores = default(List)) - { - this._MerchantAccount = merchantAccount; - this.InStoreTerminals = inStoreTerminals; - this.InventoryTerminals = inventoryTerminals; - this.Stores = stores; - } - - /// - /// List of terminals assigned to this merchant account as in-store terminals. This means that the terminal is ready to be boarded, or is already boarded. - /// - /// List of terminals assigned to this merchant account as in-store terminals. This means that the terminal is ready to be boarded, or is already boarded. - [DataMember(Name = "inStoreTerminals", EmitDefaultValue = false)] - public List InStoreTerminals { get; set; } - - /// - /// List of terminals assigned to the inventory of this merchant account. - /// - /// List of terminals assigned to the inventory of this merchant account. - [DataMember(Name = "inventoryTerminals", EmitDefaultValue = false)] - public List InventoryTerminals { get; set; } - - /// - /// The merchant account. - /// - /// The merchant account. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string _MerchantAccount { get; set; } - - /// - /// Array of stores under this merchant account. - /// - /// Array of stores under this merchant account. - [DataMember(Name = "stores", EmitDefaultValue = false)] - public List Stores { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantAccount {\n"); - sb.Append(" InStoreTerminals: ").Append(InStoreTerminals).Append("\n"); - sb.Append(" InventoryTerminals: ").Append(InventoryTerminals).Append("\n"); - sb.Append(" _MerchantAccount: ").Append(_MerchantAccount).Append("\n"); - sb.Append(" Stores: ").Append(Stores).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantAccount); - } - - /// - /// Returns true if MerchantAccount instances are equal - /// - /// Instance of MerchantAccount to be compared - /// Boolean - public bool Equals(MerchantAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.InStoreTerminals == input.InStoreTerminals || - this.InStoreTerminals != null && - input.InStoreTerminals != null && - this.InStoreTerminals.SequenceEqual(input.InStoreTerminals) - ) && - ( - this.InventoryTerminals == input.InventoryTerminals || - this.InventoryTerminals != null && - input.InventoryTerminals != null && - this.InventoryTerminals.SequenceEqual(input.InventoryTerminals) - ) && - ( - this._MerchantAccount == input._MerchantAccount || - (this._MerchantAccount != null && - this._MerchantAccount.Equals(input._MerchantAccount)) - ) && - ( - this.Stores == input.Stores || - this.Stores != null && - input.Stores != null && - this.Stores.SequenceEqual(input.Stores) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.InStoreTerminals != null) - { - hashCode = (hashCode * 59) + this.InStoreTerminals.GetHashCode(); - } - if (this.InventoryTerminals != null) - { - hashCode = (hashCode * 59) + this.InventoryTerminals.GetHashCode(); - } - if (this._MerchantAccount != null) - { - hashCode = (hashCode * 59) + this._MerchantAccount.GetHashCode(); - } - if (this.Stores != null) - { - hashCode = (hashCode * 59) + this.Stores.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/ServiceError.cs b/Adyen/Model/PosTerminalManagement/ServiceError.cs deleted file mode 100644 index 2e66819f1..000000000 --- a/Adyen/Model/PosTerminalManagement/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/PosTerminalManagement/Store.cs b/Adyen/Model/PosTerminalManagement/Store.cs deleted file mode 100644 index ce90abc26..000000000 --- a/Adyen/Model/PosTerminalManagement/Store.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.PosTerminalManagement -{ - /// - /// Store - /// - [DataContract(Name = "Store")] - public partial class Store : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Store() { } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The description of the store.. - /// The list of terminals assigned to the store.. - /// The code of the merchant account.. - /// The status of the store: - `PreActive`: the store has been created, but not yet activated. - `Active`: the store has been activated. This means you can process payments for this store. - `Inactive`: the store is currently not active. - `InactiveWithModifications`: the store is currently not active, but payment modifications such as refunds are possible. - `Closed`: the store has been closed. . - /// The code of the store. (required). - public Store(Address address = default(Address), string description = default(string), List inStoreTerminals = default(List), string merchantAccountCode = default(string), string status = default(string), string store = default(string)) - { - this._Store = store; - this.Address = address; - this.Description = description; - this.InStoreTerminals = inStoreTerminals; - this.MerchantAccountCode = merchantAccountCode; - this.Status = status; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public Address Address { get; set; } - - /// - /// The description of the store. - /// - /// The description of the store. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The list of terminals assigned to the store. - /// - /// The list of terminals assigned to the store. - [DataMember(Name = "inStoreTerminals", EmitDefaultValue = false)] - public List InStoreTerminals { get; set; } - - /// - /// The code of the merchant account. - /// - /// The code of the merchant account. - [DataMember(Name = "merchantAccountCode", EmitDefaultValue = false)] - public string MerchantAccountCode { get; set; } - - /// - /// The status of the store: - `PreActive`: the store has been created, but not yet activated. - `Active`: the store has been activated. This means you can process payments for this store. - `Inactive`: the store is currently not active. - `InactiveWithModifications`: the store is currently not active, but payment modifications such as refunds are possible. - `Closed`: the store has been closed. - /// - /// The status of the store: - `PreActive`: the store has been created, but not yet activated. - `Active`: the store has been activated. This means you can process payments for this store. - `Inactive`: the store is currently not active. - `InactiveWithModifications`: the store is currently not active, but payment modifications such as refunds are possible. - `Closed`: the store has been closed. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// The code of the store. - /// - /// The code of the store. - [DataMember(Name = "store", IsRequired = false, EmitDefaultValue = false)] - public string _Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Store {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" InStoreTerminals: ").Append(InStoreTerminals).Append("\n"); - sb.Append(" MerchantAccountCode: ").Append(MerchantAccountCode).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" _Store: ").Append(_Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Store); - } - - /// - /// Returns true if Store instances are equal - /// - /// Instance of Store to be compared - /// Boolean - public bool Equals(Store input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.InStoreTerminals == input.InStoreTerminals || - this.InStoreTerminals != null && - input.InStoreTerminals != null && - this.InStoreTerminals.SequenceEqual(input.InStoreTerminals) - ) && - ( - this.MerchantAccountCode == input.MerchantAccountCode || - (this.MerchantAccountCode != null && - this.MerchantAccountCode.Equals(input.MerchantAccountCode)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this._Store == input._Store || - (this._Store != null && - this._Store.Equals(input._Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.InStoreTerminals != null) - { - hashCode = (hashCode * 59) + this.InStoreTerminals.GetHashCode(); - } - if (this.MerchantAccountCode != null) - { - hashCode = (hashCode * 59) + this.MerchantAccountCode.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this._Store != null) - { - hashCode = (hashCode * 59) + this._Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/AbstractOpenAPISchema.cs b/Adyen/Model/Recurring/AbstractOpenAPISchema.cs deleted file mode 100644 index 85d09384b..000000000 --- a/Adyen/Model/Recurring/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.Recurring -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/Recurring/Address.cs b/Adyen/Model/Recurring/Address.cs deleted file mode 100644 index 6a5064a8a..000000000 --- a/Adyen/Model/Recurring/Address.cs +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Address() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Maximum length: 3000 characters. (required). - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. (required). - /// The number or name of the house. Maximum length: 3000 characters. (required). - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. (required). - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.. - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. (required). - public Address(string city = default(string), string country = default(string), string houseNumberOrName = default(string), string postalCode = default(string), string stateOrProvince = default(string), string street = default(string)) - { - this.City = city; - this.Country = country; - this.HouseNumberOrName = houseNumberOrName; - this.PostalCode = postalCode; - this.Street = street; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Maximum length: 3000 characters. - /// - /// The name of the city. Maximum length: 3000 characters. - [DataMember(Name = "city", IsRequired = false, EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - /// - /// The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The number or name of the house. Maximum length: 3000 characters. - /// - /// The number or name of the house. Maximum length: 3000 characters. - [DataMember(Name = "houseNumberOrName", IsRequired = false, EmitDefaultValue = false)] - public string HouseNumberOrName { get; set; } - - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - /// - /// A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries. - [DataMember(Name = "postalCode", IsRequired = false, EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - /// - /// The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`. - [DataMember(Name = "street", IsRequired = false, EmitDefaultValue = false)] - public string Street { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" HouseNumberOrName: ").Append(HouseNumberOrName).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append(" Street: ").Append(Street).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.HouseNumberOrName == input.HouseNumberOrName || - (this.HouseNumberOrName != null && - this.HouseNumberOrName.Equals(input.HouseNumberOrName)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ) && - ( - this.Street == input.Street || - (this.Street != null && - this.Street.Equals(input.Street)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.HouseNumberOrName != null) - { - hashCode = (hashCode * 59) + this.HouseNumberOrName.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - if (this.Street != null) - { - hashCode = (hashCode * 59) + this.Street.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) maxLength - if (this.City != null && this.City.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be less than 3000.", new [] { "City" }); - } - - // HouseNumberOrName (string) maxLength - if (this.HouseNumberOrName != null && this.HouseNumberOrName.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HouseNumberOrName, length must be less than 3000.", new [] { "HouseNumberOrName" }); - } - - // Street (string) maxLength - if (this.Street != null && this.Street.Length > 3000) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Street, length must be less than 3000.", new [] { "Street" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/Amount.cs b/Adyen/Model/Recurring/Amount.cs deleted file mode 100644 index edc844da6..000000000 --- a/Adyen/Model/Recurring/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/BankAccount.cs b/Adyen/Model/Recurring/BankAccount.cs deleted file mode 100644 index 1ab1a75ef..000000000 --- a/Adyen/Model/Recurring/BankAccount.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// BankAccount - /// - [DataContract(Name = "BankAccount")] - public partial class BankAccount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The bank account number (without separators).. - /// The bank city.. - /// The location id of the bank. The field value is `nil` in most cases.. - /// The name of the bank.. - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.. - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').. - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).. - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.. - /// The bank account holder's tax ID.. - public BankAccount(string bankAccountNumber = default(string), string bankCity = default(string), string bankLocationId = default(string), string bankName = default(string), string bic = default(string), string countryCode = default(string), string iban = default(string), string ownerName = default(string), string taxId = default(string)) - { - this.BankAccountNumber = bankAccountNumber; - this.BankCity = bankCity; - this.BankLocationId = bankLocationId; - this.BankName = bankName; - this.Bic = bic; - this.CountryCode = countryCode; - this.Iban = iban; - this.OwnerName = ownerName; - this.TaxId = taxId; - } - - /// - /// The bank account number (without separators). - /// - /// The bank account number (without separators). - [DataMember(Name = "bankAccountNumber", EmitDefaultValue = false)] - public string BankAccountNumber { get; set; } - - /// - /// The bank city. - /// - /// The bank city. - [DataMember(Name = "bankCity", EmitDefaultValue = false)] - public string BankCity { get; set; } - - /// - /// The location id of the bank. The field value is `nil` in most cases. - /// - /// The location id of the bank. The field value is `nil` in most cases. - [DataMember(Name = "bankLocationId", EmitDefaultValue = false)] - public string BankLocationId { get; set; } - - /// - /// The name of the bank. - /// - /// The name of the bank. - [DataMember(Name = "bankName", EmitDefaultValue = false)] - public string BankName { get; set; } - - /// - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - /// - /// The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases. - [DataMember(Name = "bic", EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL'). - /// - /// Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL'). - [DataMember(Name = "countryCode", EmitDefaultValue = false)] - public string CountryCode { get; set; } - - /// - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - /// - /// The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN). - [DataMember(Name = "iban", EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - /// - /// The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'. - [DataMember(Name = "ownerName", EmitDefaultValue = false)] - public string OwnerName { get; set; } - - /// - /// The bank account holder's tax ID. - /// - /// The bank account holder's tax ID. - [DataMember(Name = "taxId", EmitDefaultValue = false)] - public string TaxId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccount {\n"); - sb.Append(" BankAccountNumber: ").Append(BankAccountNumber).Append("\n"); - sb.Append(" BankCity: ").Append(BankCity).Append("\n"); - sb.Append(" BankLocationId: ").Append(BankLocationId).Append("\n"); - sb.Append(" BankName: ").Append(BankName).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" CountryCode: ").Append(CountryCode).Append("\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" OwnerName: ").Append(OwnerName).Append("\n"); - sb.Append(" TaxId: ").Append(TaxId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccount); - } - - /// - /// Returns true if BankAccount instances are equal - /// - /// Instance of BankAccount to be compared - /// Boolean - public bool Equals(BankAccount input) - { - if (input == null) - { - return false; - } - return - ( - this.BankAccountNumber == input.BankAccountNumber || - (this.BankAccountNumber != null && - this.BankAccountNumber.Equals(input.BankAccountNumber)) - ) && - ( - this.BankCity == input.BankCity || - (this.BankCity != null && - this.BankCity.Equals(input.BankCity)) - ) && - ( - this.BankLocationId == input.BankLocationId || - (this.BankLocationId != null && - this.BankLocationId.Equals(input.BankLocationId)) - ) && - ( - this.BankName == input.BankName || - (this.BankName != null && - this.BankName.Equals(input.BankName)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.CountryCode == input.CountryCode || - (this.CountryCode != null && - this.CountryCode.Equals(input.CountryCode)) - ) && - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.OwnerName == input.OwnerName || - (this.OwnerName != null && - this.OwnerName.Equals(input.OwnerName)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BankAccountNumber != null) - { - hashCode = (hashCode * 59) + this.BankAccountNumber.GetHashCode(); - } - if (this.BankCity != null) - { - hashCode = (hashCode * 59) + this.BankCity.GetHashCode(); - } - if (this.BankLocationId != null) - { - hashCode = (hashCode * 59) + this.BankLocationId.GetHashCode(); - } - if (this.BankName != null) - { - hashCode = (hashCode * 59) + this.BankName.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - if (this.CountryCode != null) - { - hashCode = (hashCode * 59) + this.CountryCode.GetHashCode(); - } - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - if (this.OwnerName != null) - { - hashCode = (hashCode * 59) + this.OwnerName.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/Card.cs b/Adyen/Model/Recurring/Card.cs deleted file mode 100644 index c7165b4eb..000000000 --- a/Adyen/Model/Recurring/Card.cs +++ /dev/null @@ -1,358 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// Card - /// - [DataContract(Name = "Card")] - public partial class Card : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored.. - /// The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November. - /// The card expiry year. Format: 4 digits. For example: 2020. - /// The name of the cardholder, as printed on the card.. - /// The issue number of the card (for some UK debit cards only).. - /// The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned.. - /// The month component of the start date (for some UK debit cards only).. - /// The year component of the start date (for some UK debit cards only).. - public Card(string cvc = default(string), string expiryMonth = default(string), string expiryYear = default(string), string holderName = default(string), string issueNumber = default(string), string number = default(string), string startMonth = default(string), string startYear = default(string)) - { - this.Cvc = cvc; - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.HolderName = holderName; - this.IssueNumber = issueNumber; - this.Number = number; - this.StartMonth = startMonth; - this.StartYear = startYear; - } - - /// - /// The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored. - /// - /// The [card verification code](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid) (1-20 characters). Depending on the card brand, it is known also as: * CVV2/CVC2 – length: 3 digits * CID – length: 4 digits > If you are using [Client-Side Encryption](https://docs.adyen.com/classic-integration/cse-integration-ecommerce), the CVC code is present in the encrypted data. You must never post the card details to the server. > This field must be always present in a [one-click payment request](https://docs.adyen.com/classic-integration/recurring-payments). > When this value is returned in a response, it is always empty because it is not stored. - [DataMember(Name = "cvc", EmitDefaultValue = false)] - public string Cvc { get; set; } - - /// - /// The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November - /// - /// The card expiry month. Format: 2 digits, zero-padded for single digits. For example: * 03 = March * 11 = November - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The card expiry year. Format: 4 digits. For example: 2020 - /// - /// The card expiry year. Format: 4 digits. For example: 2020 - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The name of the cardholder, as printed on the card. - /// - /// The name of the cardholder, as printed on the card. - [DataMember(Name = "holderName", EmitDefaultValue = false)] - public string HolderName { get; set; } - - /// - /// The issue number of the card (for some UK debit cards only). - /// - /// The issue number of the card (for some UK debit cards only). - [DataMember(Name = "issueNumber", EmitDefaultValue = false)] - public string IssueNumber { get; set; } - - /// - /// The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned. - /// - /// The card number (4-19 characters). Do not use any separators. When this value is returned in a response, only the last 4 digits of the card number are returned. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// The month component of the start date (for some UK debit cards only). - /// - /// The month component of the start date (for some UK debit cards only). - [DataMember(Name = "startMonth", EmitDefaultValue = false)] - public string StartMonth { get; set; } - - /// - /// The year component of the start date (for some UK debit cards only). - /// - /// The year component of the start date (for some UK debit cards only). - [DataMember(Name = "startYear", EmitDefaultValue = false)] - public string StartYear { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Card {\n"); - sb.Append(" Cvc: ").Append(Cvc).Append("\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" HolderName: ").Append(HolderName).Append("\n"); - sb.Append(" IssueNumber: ").Append(IssueNumber).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" StartMonth: ").Append(StartMonth).Append("\n"); - sb.Append(" StartYear: ").Append(StartYear).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Card); - } - - /// - /// Returns true if Card instances are equal - /// - /// Instance of Card to be compared - /// Boolean - public bool Equals(Card input) - { - if (input == null) - { - return false; - } - return - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.HolderName == input.HolderName || - (this.HolderName != null && - this.HolderName.Equals(input.HolderName)) - ) && - ( - this.IssueNumber == input.IssueNumber || - (this.IssueNumber != null && - this.IssueNumber.Equals(input.IssueNumber)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.StartMonth == input.StartMonth || - (this.StartMonth != null && - this.StartMonth.Equals(input.StartMonth)) - ) && - ( - this.StartYear == input.StartYear || - (this.StartYear != null && - this.StartYear.Equals(input.StartYear)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.HolderName != null) - { - hashCode = (hashCode * 59) + this.HolderName.GetHashCode(); - } - if (this.IssueNumber != null) - { - hashCode = (hashCode * 59) + this.IssueNumber.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.StartMonth != null) - { - hashCode = (hashCode * 59) + this.StartMonth.GetHashCode(); - } - if (this.StartYear != null) - { - hashCode = (hashCode * 59) + this.StartYear.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Cvc (string) maxLength - if (this.Cvc != null && this.Cvc.Length > 20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cvc, length must be less than 20.", new [] { "Cvc" }); - } - - // Cvc (string) minLength - if (this.Cvc != null && this.Cvc.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Cvc, length must be greater than 1.", new [] { "Cvc" }); - } - - // ExpiryMonth (string) maxLength - if (this.ExpiryMonth != null && this.ExpiryMonth.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryMonth, length must be less than 2.", new [] { "ExpiryMonth" }); - } - - // ExpiryMonth (string) minLength - if (this.ExpiryMonth != null && this.ExpiryMonth.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryMonth, length must be greater than 1.", new [] { "ExpiryMonth" }); - } - - // ExpiryYear (string) maxLength - if (this.ExpiryYear != null && this.ExpiryYear.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryYear, length must be less than 4.", new [] { "ExpiryYear" }); - } - - // ExpiryYear (string) minLength - if (this.ExpiryYear != null && this.ExpiryYear.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryYear, length must be greater than 4.", new [] { "ExpiryYear" }); - } - - // HolderName (string) maxLength - if (this.HolderName != null && this.HolderName.Length > 50) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HolderName, length must be less than 50.", new [] { "HolderName" }); - } - - // HolderName (string) minLength - if (this.HolderName != null && this.HolderName.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for HolderName, length must be greater than 1.", new [] { "HolderName" }); - } - - // IssueNumber (string) maxLength - if (this.IssueNumber != null && this.IssueNumber.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssueNumber, length must be less than 2.", new [] { "IssueNumber" }); - } - - // IssueNumber (string) minLength - if (this.IssueNumber != null && this.IssueNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssueNumber, length must be greater than 1.", new [] { "IssueNumber" }); - } - - // Number (string) maxLength - if (this.Number != null && this.Number.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, length must be less than 19.", new [] { "Number" }); - } - - // Number (string) minLength - if (this.Number != null && this.Number.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, length must be greater than 4.", new [] { "Number" }); - } - - // StartMonth (string) maxLength - if (this.StartMonth != null && this.StartMonth.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartMonth, length must be less than 2.", new [] { "StartMonth" }); - } - - // StartMonth (string) minLength - if (this.StartMonth != null && this.StartMonth.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartMonth, length must be greater than 1.", new [] { "StartMonth" }); - } - - // StartYear (string) maxLength - if (this.StartYear != null && this.StartYear.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartYear, length must be less than 4.", new [] { "StartYear" }); - } - - // StartYear (string) minLength - if (this.StartYear != null && this.StartYear.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartYear, length must be greater than 4.", new [] { "StartYear" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/CreatePermitRequest.cs b/Adyen/Model/Recurring/CreatePermitRequest.cs deleted file mode 100644 index fa7095424..000000000 --- a/Adyen/Model/Recurring/CreatePermitRequest.cs +++ /dev/null @@ -1,192 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// CreatePermitRequest - /// - [DataContract(Name = "CreatePermitRequest")] - public partial class CreatePermitRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreatePermitRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The permits to create for this recurring contract. (required). - /// The recurring contract the new permits will use. (required). - /// The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). (required). - public CreatePermitRequest(string merchantAccount = default(string), List permits = default(List), string recurringDetailReference = default(string), string shopperReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.Permits = permits; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperReference = shopperReference; - } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The permits to create for this recurring contract. - /// - /// The permits to create for this recurring contract. - [DataMember(Name = "permits", IsRequired = false, EmitDefaultValue = false)] - public List Permits { get; set; } - - /// - /// The recurring contract the new permits will use. - /// - /// The recurring contract the new permits will use. - [DataMember(Name = "recurringDetailReference", IsRequired = false, EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). - /// - /// The shopper's reference to uniquely identify this shopper (e.g. user ID or account ID). - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreatePermitRequest {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Permits: ").Append(Permits).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreatePermitRequest); - } - - /// - /// Returns true if CreatePermitRequest instances are equal - /// - /// Instance of CreatePermitRequest to be compared - /// Boolean - public bool Equals(CreatePermitRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Permits == input.Permits || - this.Permits != null && - input.Permits != null && - this.Permits.SequenceEqual(input.Permits) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Permits != null) - { - hashCode = (hashCode * 59) + this.Permits.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/CreatePermitResult.cs b/Adyen/Model/Recurring/CreatePermitResult.cs deleted file mode 100644 index acf357157..000000000 --- a/Adyen/Model/Recurring/CreatePermitResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// CreatePermitResult - /// - [DataContract(Name = "CreatePermitResult")] - public partial class CreatePermitResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// List of new permits.. - /// A unique reference associated with the request. This value is globally unique; quote it when communicating with us about this request.. - public CreatePermitResult(List permitResultList = default(List), string pspReference = default(string)) - { - this.PermitResultList = permitResultList; - this.PspReference = pspReference; - } - - /// - /// List of new permits. - /// - /// List of new permits. - [DataMember(Name = "permitResultList", EmitDefaultValue = false)] - public List PermitResultList { get; set; } - - /// - /// A unique reference associated with the request. This value is globally unique; quote it when communicating with us about this request. - /// - /// A unique reference associated with the request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreatePermitResult {\n"); - sb.Append(" PermitResultList: ").Append(PermitResultList).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreatePermitResult); - } - - /// - /// Returns true if CreatePermitResult instances are equal - /// - /// Instance of CreatePermitResult to be compared - /// Boolean - public bool Equals(CreatePermitResult input) - { - if (input == null) - { - return false; - } - return - ( - this.PermitResultList == input.PermitResultList || - this.PermitResultList != null && - input.PermitResultList != null && - this.PermitResultList.SequenceEqual(input.PermitResultList) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PermitResultList != null) - { - hashCode = (hashCode * 59) + this.PermitResultList.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/DisablePermitRequest.cs b/Adyen/Model/Recurring/DisablePermitRequest.cs deleted file mode 100644 index 06ed7983f..000000000 --- a/Adyen/Model/Recurring/DisablePermitRequest.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// DisablePermitRequest - /// - [DataContract(Name = "DisablePermitRequest")] - public partial class DisablePermitRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DisablePermitRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The permit token to disable. (required). - public DisablePermitRequest(string merchantAccount = default(string), string token = default(string)) - { - this.MerchantAccount = merchantAccount; - this.Token = token; - } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The permit token to disable. - /// - /// The permit token to disable. - [DataMember(Name = "token", IsRequired = false, EmitDefaultValue = false)] - public string Token { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DisablePermitRequest {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DisablePermitRequest); - } - - /// - /// Returns true if DisablePermitRequest instances are equal - /// - /// Instance of DisablePermitRequest to be compared - /// Boolean - public bool Equals(DisablePermitRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/DisablePermitResult.cs b/Adyen/Model/Recurring/DisablePermitResult.cs deleted file mode 100644 index f02ab09f2..000000000 --- a/Adyen/Model/Recurring/DisablePermitResult.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// DisablePermitResult - /// - [DataContract(Name = "DisablePermitResult")] - public partial class DisablePermitResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// A unique reference associated with the request. This value is globally unique; quote it when communicating with us about this request.. - /// Status of the disable request.. - public DisablePermitResult(string pspReference = default(string), string status = default(string)) - { - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// A unique reference associated with the request. This value is globally unique; quote it when communicating with us about this request. - /// - /// A unique reference associated with the request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Status of the disable request. - /// - /// Status of the disable request. - [DataMember(Name = "status", EmitDefaultValue = false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DisablePermitResult {\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DisablePermitResult); - } - - /// - /// Returns true if DisablePermitResult instances are equal - /// - /// Instance of DisablePermitResult to be compared - /// Boolean - public bool Equals(DisablePermitResult input) - { - if (input == null) - { - return false; - } - return - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/DisableRequest.cs b/Adyen/Model/Recurring/DisableRequest.cs deleted file mode 100644 index 8e902cccf..000000000 --- a/Adyen/Model/Recurring/DisableRequest.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// DisableRequest - /// - [DataContract(Name = "DisableRequest")] - public partial class DisableRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DisableRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// Specify the contract if you only want to disable a specific use. This field can be set to one of the following values, or to their combination (comma-separated): * ONECLICK * RECURRING * PAYOUT. - /// The merchant account identifier with which you want to process the transaction. (required). - /// The ID that uniquely identifies the recurring detail reference. If it is not provided, the whole recurring contract of the `shopperReference` will be disabled, which includes all recurring details.. - /// The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment. (required). - public DisableRequest(string contract = default(string), string merchantAccount = default(string), string recurringDetailReference = default(string), string shopperReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.ShopperReference = shopperReference; - this.Contract = contract; - this.RecurringDetailReference = recurringDetailReference; - } - - /// - /// Specify the contract if you only want to disable a specific use. This field can be set to one of the following values, or to their combination (comma-separated): * ONECLICK * RECURRING * PAYOUT - /// - /// Specify the contract if you only want to disable a specific use. This field can be set to one of the following values, or to their combination (comma-separated): * ONECLICK * RECURRING * PAYOUT - [DataMember(Name = "contract", EmitDefaultValue = false)] - public string Contract { get; set; } - - /// - /// The merchant account identifier with which you want to process the transaction. - /// - /// The merchant account identifier with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The ID that uniquely identifies the recurring detail reference. If it is not provided, the whole recurring contract of the `shopperReference` will be disabled, which includes all recurring details. - /// - /// The ID that uniquely identifies the recurring detail reference. If it is not provided, the whole recurring contract of the `shopperReference` will be disabled, which includes all recurring details. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment. - /// - /// The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment. - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DisableRequest {\n"); - sb.Append(" Contract: ").Append(Contract).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DisableRequest); - } - - /// - /// Returns true if DisableRequest instances are equal - /// - /// Instance of DisableRequest to be compared - /// Boolean - public bool Equals(DisableRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Contract == input.Contract || - (this.Contract != null && - this.Contract.Equals(input.Contract)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Contract != null) - { - hashCode = (hashCode * 59) + this.Contract.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/DisableResult.cs b/Adyen/Model/Recurring/DisableResult.cs deleted file mode 100644 index 013d3d339..000000000 --- a/Adyen/Model/Recurring/DisableResult.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// DisableResult - /// - [DataContract(Name = "DisableResult")] - public partial class DisableResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Depending on whether a specific recurring detail was in the request, result is either [detail-successfully-disabled] or [all-details-successfully-disabled].. - public DisableResult(string response = default(string)) - { - this.Response = response; - } - - /// - /// Depending on whether a specific recurring detail was in the request, result is either [detail-successfully-disabled] or [all-details-successfully-disabled]. - /// - /// Depending on whether a specific recurring detail was in the request, result is either [detail-successfully-disabled] or [all-details-successfully-disabled]. - [DataMember(Name = "response", EmitDefaultValue = false)] - public string Response { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DisableResult {\n"); - sb.Append(" Response: ").Append(Response).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DisableResult); - } - - /// - /// Returns true if DisableResult instances are equal - /// - /// Instance of DisableResult to be compared - /// Boolean - public bool Equals(DisableResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Response == input.Response || - (this.Response != null && - this.Response.Equals(input.Response)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Response != null) - { - hashCode = (hashCode * 59) + this.Response.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/Name.cs b/Adyen/Model/Recurring/Name.cs deleted file mode 100644 index 1e2bd6711..000000000 --- a/Adyen/Model/Recurring/Name.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// Name - /// - [DataContract(Name = "Name")] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// The first name. (required). - /// The last name. (required). - public Name(string firstName = default(string), string lastName = default(string)) - { - this.FirstName = firstName; - this.LastName = lastName; - } - - /// - /// The first name. - /// - /// The first name. - [DataMember(Name = "firstName", IsRequired = false, EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The last name. - /// - /// The last name. - [DataMember(Name = "lastName", IsRequired = false, EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // FirstName (string) maxLength - if (this.FirstName != null && this.FirstName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FirstName, length must be less than 80.", new [] { "FirstName" }); - } - - // LastName (string) maxLength - if (this.LastName != null && this.LastName.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for LastName, length must be less than 80.", new [] { "LastName" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/NotifyShopperRequest.cs b/Adyen/Model/Recurring/NotifyShopperRequest.cs deleted file mode 100644 index f67b9512e..000000000 --- a/Adyen/Model/Recurring/NotifyShopperRequest.cs +++ /dev/null @@ -1,285 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// NotifyShopperRequest - /// - [DataContract(Name = "NotifyShopperRequest")] - public partial class NotifyShopperRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NotifyShopperRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// Date on which the subscription amount will be debited from the shopper. In YYYY-MM-DD format. - /// Sequence of the debit. Depends on Frequency and Billing Attempts Rule.. - /// Reference of Pre-debit notification that is displayed to the shopper. Optional field. Maps to reference if missing. - /// The merchant account identifier with which you want to process the transaction. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - /// Pre-debit notification reference sent by the merchant. This is a mandatory field (required). - /// The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment. (required). - /// This is the `recurringDetailReference` returned in the response when you created the token.. - public NotifyShopperRequest(Amount amount = default(Amount), string billingDate = default(string), string billingSequenceNumber = default(string), string displayedReference = default(string), string merchantAccount = default(string), string recurringDetailReference = default(string), string reference = default(string), string shopperReference = default(string), string storedPaymentMethodId = default(string)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.Reference = reference; - this.ShopperReference = shopperReference; - this.BillingDate = billingDate; - this.BillingSequenceNumber = billingSequenceNumber; - this.DisplayedReference = displayedReference; - this.RecurringDetailReference = recurringDetailReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Date on which the subscription amount will be debited from the shopper. In YYYY-MM-DD format - /// - /// Date on which the subscription amount will be debited from the shopper. In YYYY-MM-DD format - [DataMember(Name = "billingDate", EmitDefaultValue = false)] - public string BillingDate { get; set; } - - /// - /// Sequence of the debit. Depends on Frequency and Billing Attempts Rule. - /// - /// Sequence of the debit. Depends on Frequency and Billing Attempts Rule. - [DataMember(Name = "billingSequenceNumber", EmitDefaultValue = false)] - public string BillingSequenceNumber { get; set; } - - /// - /// Reference of Pre-debit notification that is displayed to the shopper. Optional field. Maps to reference if missing - /// - /// Reference of Pre-debit notification that is displayed to the shopper. Optional field. Maps to reference if missing - [DataMember(Name = "displayedReference", EmitDefaultValue = false)] - public string DisplayedReference { get; set; } - - /// - /// The merchant account identifier with which you want to process the transaction. - /// - /// The merchant account identifier with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// Pre-debit notification reference sent by the merchant. This is a mandatory field - /// - /// Pre-debit notification reference sent by the merchant. This is a mandatory field - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment. - /// - /// The ID that uniquely identifies the shopper. This `shopperReference` must be the same as the `shopperReference` used in the initial payment. - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - /// - /// This is the `recurringDetailReference` returned in the response when you created the token. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NotifyShopperRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BillingDate: ").Append(BillingDate).Append("\n"); - sb.Append(" BillingSequenceNumber: ").Append(BillingSequenceNumber).Append("\n"); - sb.Append(" DisplayedReference: ").Append(DisplayedReference).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotifyShopperRequest); - } - - /// - /// Returns true if NotifyShopperRequest instances are equal - /// - /// Instance of NotifyShopperRequest to be compared - /// Boolean - public bool Equals(NotifyShopperRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BillingDate == input.BillingDate || - (this.BillingDate != null && - this.BillingDate.Equals(input.BillingDate)) - ) && - ( - this.BillingSequenceNumber == input.BillingSequenceNumber || - (this.BillingSequenceNumber != null && - this.BillingSequenceNumber.Equals(input.BillingSequenceNumber)) - ) && - ( - this.DisplayedReference == input.DisplayedReference || - (this.DisplayedReference != null && - this.DisplayedReference.Equals(input.DisplayedReference)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BillingDate != null) - { - hashCode = (hashCode * 59) + this.BillingDate.GetHashCode(); - } - if (this.BillingSequenceNumber != null) - { - hashCode = (hashCode * 59) + this.BillingSequenceNumber.GetHashCode(); - } - if (this.DisplayedReference != null) - { - hashCode = (hashCode * 59) + this.DisplayedReference.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/NotifyShopperResult.cs b/Adyen/Model/Recurring/NotifyShopperResult.cs deleted file mode 100644 index bfa4314ed..000000000 --- a/Adyen/Model/Recurring/NotifyShopperResult.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// NotifyShopperResult - /// - [DataContract(Name = "NotifyShopperResult")] - public partial class NotifyShopperResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Reference of Pre-debit notification that is displayed to the shopper. - /// A simple description of the `resultCode`.. - /// The unique reference that is associated with the request.. - /// Reference of Pre-debit notification sent in my the merchant. - /// The code indicating the status of notification.. - /// The unique reference for the request sent downstream.. - /// This is the recurringDetailReference returned in the response when token was created. - public NotifyShopperResult(string displayedReference = default(string), string message = default(string), string pspReference = default(string), string reference = default(string), string resultCode = default(string), string shopperNotificationReference = default(string), string storedPaymentMethodId = default(string)) - { - this.DisplayedReference = displayedReference; - this.Message = message; - this.PspReference = pspReference; - this.Reference = reference; - this.ResultCode = resultCode; - this.ShopperNotificationReference = shopperNotificationReference; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// Reference of Pre-debit notification that is displayed to the shopper - /// - /// Reference of Pre-debit notification that is displayed to the shopper - [DataMember(Name = "displayedReference", EmitDefaultValue = false)] - public string DisplayedReference { get; set; } - - /// - /// A simple description of the `resultCode`. - /// - /// A simple description of the `resultCode`. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The unique reference that is associated with the request. - /// - /// The unique reference that is associated with the request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// Reference of Pre-debit notification sent in my the merchant - /// - /// Reference of Pre-debit notification sent in my the merchant - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The code indicating the status of notification. - /// - /// The code indicating the status of notification. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public string ResultCode { get; set; } - - /// - /// The unique reference for the request sent downstream. - /// - /// The unique reference for the request sent downstream. - [DataMember(Name = "shopperNotificationReference", EmitDefaultValue = false)] - public string ShopperNotificationReference { get; set; } - - /// - /// This is the recurringDetailReference returned in the response when token was created - /// - /// This is the recurringDetailReference returned in the response when token was created - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NotifyShopperResult {\n"); - sb.Append(" DisplayedReference: ").Append(DisplayedReference).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ShopperNotificationReference: ").Append(ShopperNotificationReference).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NotifyShopperResult); - } - - /// - /// Returns true if NotifyShopperResult instances are equal - /// - /// Instance of NotifyShopperResult to be compared - /// Boolean - public bool Equals(NotifyShopperResult input) - { - if (input == null) - { - return false; - } - return - ( - this.DisplayedReference == input.DisplayedReference || - (this.DisplayedReference != null && - this.DisplayedReference.Equals(input.DisplayedReference)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ResultCode == input.ResultCode || - (this.ResultCode != null && - this.ResultCode.Equals(input.ResultCode)) - ) && - ( - this.ShopperNotificationReference == input.ShopperNotificationReference || - (this.ShopperNotificationReference != null && - this.ShopperNotificationReference.Equals(input.ShopperNotificationReference)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DisplayedReference != null) - { - hashCode = (hashCode * 59) + this.DisplayedReference.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ResultCode != null) - { - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - } - if (this.ShopperNotificationReference != null) - { - hashCode = (hashCode * 59) + this.ShopperNotificationReference.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/Permit.cs b/Adyen/Model/Recurring/Permit.cs deleted file mode 100644 index c27c722af..000000000 --- a/Adyen/Model/Recurring/Permit.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// Permit - /// - [DataContract(Name = "Permit")] - public partial class Permit : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Partner ID (when using the permit-per-partner token sharing model).. - /// The profile to apply to this permit (when using the shared permits model).. - /// restriction. - /// The key to link permit requests to permit results.. - /// The expiry date for this permit.. - public Permit(string partnerId = default(string), string profileReference = default(string), PermitRestriction restriction = default(PermitRestriction), string resultKey = default(string), DateTime validTillDate = default(DateTime)) - { - this.PartnerId = partnerId; - this.ProfileReference = profileReference; - this.Restriction = restriction; - this.ResultKey = resultKey; - this.ValidTillDate = validTillDate; - } - - /// - /// Partner ID (when using the permit-per-partner token sharing model). - /// - /// Partner ID (when using the permit-per-partner token sharing model). - [DataMember(Name = "partnerId", EmitDefaultValue = false)] - public string PartnerId { get; set; } - - /// - /// The profile to apply to this permit (when using the shared permits model). - /// - /// The profile to apply to this permit (when using the shared permits model). - [DataMember(Name = "profileReference", EmitDefaultValue = false)] - public string ProfileReference { get; set; } - - /// - /// Gets or Sets Restriction - /// - [DataMember(Name = "restriction", EmitDefaultValue = false)] - public PermitRestriction Restriction { get; set; } - - /// - /// The key to link permit requests to permit results. - /// - /// The key to link permit requests to permit results. - [DataMember(Name = "resultKey", EmitDefaultValue = false)] - public string ResultKey { get; set; } - - /// - /// The expiry date for this permit. - /// - /// The expiry date for this permit. - [DataMember(Name = "validTillDate", EmitDefaultValue = false)] - public DateTime ValidTillDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Permit {\n"); - sb.Append(" PartnerId: ").Append(PartnerId).Append("\n"); - sb.Append(" ProfileReference: ").Append(ProfileReference).Append("\n"); - sb.Append(" Restriction: ").Append(Restriction).Append("\n"); - sb.Append(" ResultKey: ").Append(ResultKey).Append("\n"); - sb.Append(" ValidTillDate: ").Append(ValidTillDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Permit); - } - - /// - /// Returns true if Permit instances are equal - /// - /// Instance of Permit to be compared - /// Boolean - public bool Equals(Permit input) - { - if (input == null) - { - return false; - } - return - ( - this.PartnerId == input.PartnerId || - (this.PartnerId != null && - this.PartnerId.Equals(input.PartnerId)) - ) && - ( - this.ProfileReference == input.ProfileReference || - (this.ProfileReference != null && - this.ProfileReference.Equals(input.ProfileReference)) - ) && - ( - this.Restriction == input.Restriction || - (this.Restriction != null && - this.Restriction.Equals(input.Restriction)) - ) && - ( - this.ResultKey == input.ResultKey || - (this.ResultKey != null && - this.ResultKey.Equals(input.ResultKey)) - ) && - ( - this.ValidTillDate == input.ValidTillDate || - (this.ValidTillDate != null && - this.ValidTillDate.Equals(input.ValidTillDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PartnerId != null) - { - hashCode = (hashCode * 59) + this.PartnerId.GetHashCode(); - } - if (this.ProfileReference != null) - { - hashCode = (hashCode * 59) + this.ProfileReference.GetHashCode(); - } - if (this.Restriction != null) - { - hashCode = (hashCode * 59) + this.Restriction.GetHashCode(); - } - if (this.ResultKey != null) - { - hashCode = (hashCode * 59) + this.ResultKey.GetHashCode(); - } - if (this.ValidTillDate != null) - { - hashCode = (hashCode * 59) + this.ValidTillDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/PermitRestriction.cs b/Adyen/Model/Recurring/PermitRestriction.cs deleted file mode 100644 index 4bdc8eda7..000000000 --- a/Adyen/Model/Recurring/PermitRestriction.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// PermitRestriction - /// - [DataContract(Name = "PermitRestriction")] - public partial class PermitRestriction : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// maxAmount. - /// singleTransactionLimit. - /// Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed.. - public PermitRestriction(Amount maxAmount = default(Amount), Amount singleTransactionLimit = default(Amount), bool? singleUse = default(bool?)) - { - this.MaxAmount = maxAmount; - this.SingleTransactionLimit = singleTransactionLimit; - this.SingleUse = singleUse; - } - - /// - /// Gets or Sets MaxAmount - /// - [DataMember(Name = "maxAmount", EmitDefaultValue = false)] - public Amount MaxAmount { get; set; } - - /// - /// Gets or Sets SingleTransactionLimit - /// - [DataMember(Name = "singleTransactionLimit", EmitDefaultValue = false)] - public Amount SingleTransactionLimit { get; set; } - - /// - /// Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed. - /// - /// Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed. - [DataMember(Name = "singleUse", EmitDefaultValue = false)] - public bool? SingleUse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PermitRestriction {\n"); - sb.Append(" MaxAmount: ").Append(MaxAmount).Append("\n"); - sb.Append(" SingleTransactionLimit: ").Append(SingleTransactionLimit).Append("\n"); - sb.Append(" SingleUse: ").Append(SingleUse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PermitRestriction); - } - - /// - /// Returns true if PermitRestriction instances are equal - /// - /// Instance of PermitRestriction to be compared - /// Boolean - public bool Equals(PermitRestriction input) - { - if (input == null) - { - return false; - } - return - ( - this.MaxAmount == input.MaxAmount || - (this.MaxAmount != null && - this.MaxAmount.Equals(input.MaxAmount)) - ) && - ( - this.SingleTransactionLimit == input.SingleTransactionLimit || - (this.SingleTransactionLimit != null && - this.SingleTransactionLimit.Equals(input.SingleTransactionLimit)) - ) && - ( - this.SingleUse == input.SingleUse || - this.SingleUse.Equals(input.SingleUse) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MaxAmount != null) - { - hashCode = (hashCode * 59) + this.MaxAmount.GetHashCode(); - } - if (this.SingleTransactionLimit != null) - { - hashCode = (hashCode * 59) + this.SingleTransactionLimit.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SingleUse.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/PermitResult.cs b/Adyen/Model/Recurring/PermitResult.cs deleted file mode 100644 index 9b10c3802..000000000 --- a/Adyen/Model/Recurring/PermitResult.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// PermitResult - /// - [DataContract(Name = "PermitResult")] - public partial class PermitResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The key to link permit requests to permit results.. - /// The permit token which is used to make payments by the partner company.. - public PermitResult(string resultKey = default(string), string token = default(string)) - { - this.ResultKey = resultKey; - this.Token = token; - } - - /// - /// The key to link permit requests to permit results. - /// - /// The key to link permit requests to permit results. - [DataMember(Name = "resultKey", EmitDefaultValue = false)] - public string ResultKey { get; set; } - - /// - /// The permit token which is used to make payments by the partner company. - /// - /// The permit token which is used to make payments by the partner company. - [DataMember(Name = "token", EmitDefaultValue = false)] - public string Token { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PermitResult {\n"); - sb.Append(" ResultKey: ").Append(ResultKey).Append("\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PermitResult); - } - - /// - /// Returns true if PermitResult instances are equal - /// - /// Instance of PermitResult to be compared - /// Boolean - public bool Equals(PermitResult input) - { - if (input == null) - { - return false; - } - return - ( - this.ResultKey == input.ResultKey || - (this.ResultKey != null && - this.ResultKey.Equals(input.ResultKey)) - ) && - ( - this.Token == input.Token || - (this.Token != null && - this.Token.Equals(input.Token)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ResultKey != null) - { - hashCode = (hashCode * 59) + this.ResultKey.GetHashCode(); - } - if (this.Token != null) - { - hashCode = (hashCode * 59) + this.Token.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/Recurring.cs b/Adyen/Model/Recurring/Recurring.cs deleted file mode 100644 index 5a3ee7659..000000000 --- a/Adyen/Model/Recurring/Recurring.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// Recurring - /// - [DataContract(Name = "Recurring")] - public partial class Recurring : IEquatable, IValidatableObject - { - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - [JsonConverter(typeof(StringEnumConverter))] - public enum ContractEnum - { - /// - /// Enum ONECLICK for value: ONECLICK - /// - [EnumMember(Value = "ONECLICK")] - ONECLICK = 1, - - /// - /// Enum RECURRING for value: RECURRING - /// - [EnumMember(Value = "RECURRING")] - RECURRING = 2, - - /// - /// Enum PAYOUT for value: PAYOUT - /// - [EnumMember(Value = "PAYOUT")] - PAYOUT = 3 - - } - - - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts). - [DataMember(Name = "contract", EmitDefaultValue = false)] - public ContractEnum? Contract { get; set; } - /// - /// The name of the token service. - /// - /// The name of the token service. - [JsonConverter(typeof(StringEnumConverter))] - public enum TokenServiceEnum - { - /// - /// Enum VISATOKENSERVICE for value: VISATOKENSERVICE - /// - [EnumMember(Value = "VISATOKENSERVICE")] - VISATOKENSERVICE = 1, - - /// - /// Enum MCTOKENSERVICE for value: MCTOKENSERVICE - /// - [EnumMember(Value = "MCTOKENSERVICE")] - MCTOKENSERVICE = 2, - - /// - /// Enum AMEXTOKENSERVICE for value: AMEXTOKENSERVICE - /// - [EnumMember(Value = "AMEXTOKENSERVICE")] - AMEXTOKENSERVICE = 3, - - /// - /// Enum TOKENSHARING for value: TOKEN_SHARING - /// - [EnumMember(Value = "TOKEN_SHARING")] - TOKENSHARING = 4 - - } - - - /// - /// The name of the token service. - /// - /// The name of the token service. - [DataMember(Name = "tokenService", EmitDefaultValue = false)] - public TokenServiceEnum? TokenService { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The type of recurring contract to be used. Possible values: * `ONECLICK` – Payment details can be used to initiate a one-click payment, where the shopper enters the [card security code (CVC/CVV)](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-security-code-cvc-cvv-cid). * `RECURRING` – Payment details can be used without the card security code to initiate [card-not-present transactions](https://docs.adyen.com/payments-fundamentals/payment-glossary#card-not-present-cnp). * `ONECLICK,RECURRING` – Payment details can be used regardless of whether the shopper is on your site or not. * `PAYOUT` – Payment details can be used to [make a payout](https://docs.adyen.com/online-payments/online-payouts).. - /// A descriptive name for this detail.. - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2.. - /// Minimum number of days between authorisations. Only for 3D Secure 2.. - /// The name of the token service.. - public Recurring(ContractEnum? contract = default(ContractEnum?), string recurringDetailName = default(string), DateTime recurringExpiry = default(DateTime), string recurringFrequency = default(string), TokenServiceEnum? tokenService = default(TokenServiceEnum?)) - { - this.Contract = contract; - this.RecurringDetailName = recurringDetailName; - this.RecurringExpiry = recurringExpiry; - this.RecurringFrequency = recurringFrequency; - this.TokenService = tokenService; - } - - /// - /// A descriptive name for this detail. - /// - /// A descriptive name for this detail. - [DataMember(Name = "recurringDetailName", EmitDefaultValue = false)] - public string RecurringDetailName { get; set; } - - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - /// - /// Date after which no further authorisations shall be performed. Only for 3D Secure 2. - [DataMember(Name = "recurringExpiry", EmitDefaultValue = false)] - public DateTime RecurringExpiry { get; set; } - - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - /// - /// Minimum number of days between authorisations. Only for 3D Secure 2. - [DataMember(Name = "recurringFrequency", EmitDefaultValue = false)] - public string RecurringFrequency { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Recurring {\n"); - sb.Append(" Contract: ").Append(Contract).Append("\n"); - sb.Append(" RecurringDetailName: ").Append(RecurringDetailName).Append("\n"); - sb.Append(" RecurringExpiry: ").Append(RecurringExpiry).Append("\n"); - sb.Append(" RecurringFrequency: ").Append(RecurringFrequency).Append("\n"); - sb.Append(" TokenService: ").Append(TokenService).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Recurring); - } - - /// - /// Returns true if Recurring instances are equal - /// - /// Instance of Recurring to be compared - /// Boolean - public bool Equals(Recurring input) - { - if (input == null) - { - return false; - } - return - ( - this.Contract == input.Contract || - this.Contract.Equals(input.Contract) - ) && - ( - this.RecurringDetailName == input.RecurringDetailName || - (this.RecurringDetailName != null && - this.RecurringDetailName.Equals(input.RecurringDetailName)) - ) && - ( - this.RecurringExpiry == input.RecurringExpiry || - (this.RecurringExpiry != null && - this.RecurringExpiry.Equals(input.RecurringExpiry)) - ) && - ( - this.RecurringFrequency == input.RecurringFrequency || - (this.RecurringFrequency != null && - this.RecurringFrequency.Equals(input.RecurringFrequency)) - ) && - ( - this.TokenService == input.TokenService || - this.TokenService.Equals(input.TokenService) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Contract.GetHashCode(); - if (this.RecurringDetailName != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailName.GetHashCode(); - } - if (this.RecurringExpiry != null) - { - hashCode = (hashCode * 59) + this.RecurringExpiry.GetHashCode(); - } - if (this.RecurringFrequency != null) - { - hashCode = (hashCode * 59) + this.RecurringFrequency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TokenService.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/RecurringDetail.cs b/Adyen/Model/Recurring/RecurringDetail.cs deleted file mode 100644 index c32389681..000000000 --- a/Adyen/Model/Recurring/RecurringDetail.cs +++ /dev/null @@ -1,435 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// RecurringDetail - /// - [DataContract(Name = "RecurringDetail")] - public partial class RecurringDetail : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RecurringDetail() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be returned in a particular response. The additionalData object consists of entries, each of which includes the key and value.. - /// The alias of the credit card number. Applies only to recurring contracts storing credit card details. - /// The alias type of the credit card number. Applies only to recurring contracts storing credit card details.. - /// bank. - /// billingAddress. - /// card. - /// Types of recurring contracts.. - /// The date when the recurring details were created.. - /// The `pspReference` of the first recurring payment that created the recurring detail.. - /// An optional descriptive name for this recurring detail.. - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID.. - /// The type or sub-brand of a payment method used, e.g. Visa Debit, Visa Corporate, etc. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant).. - /// The reference that uniquely identifies the recurring detail. (required). - /// shopperName. - /// A shopper's social security number (only in countries where it is legal to collect).. - /// tokenDetails. - /// The payment method, such as “mc\", \"visa\", \"ideal\", \"paypal\". (required). - public RecurringDetail(Dictionary additionalData = default(Dictionary), string alias = default(string), string aliasType = default(string), BankAccount bank = default(BankAccount), Address billingAddress = default(Address), Card card = default(Card), List contractTypes = default(List), DateTime creationDate = default(DateTime), string firstPspReference = default(string), string name = default(string), string networkTxReference = default(string), string paymentMethodVariant = default(string), string recurringDetailReference = default(string), Name shopperName = default(Name), string socialSecurityNumber = default(string), TokenDetails tokenDetails = default(TokenDetails), string variant = default(string)) - { - this.RecurringDetailReference = recurringDetailReference; - this.Variant = variant; - this.AdditionalData = additionalData; - this.Alias = alias; - this.AliasType = aliasType; - this.Bank = bank; - this.BillingAddress = billingAddress; - this.Card = card; - this.ContractTypes = contractTypes; - this.CreationDate = creationDate; - this.FirstPspReference = firstPspReference; - this.Name = name; - this.NetworkTxReference = networkTxReference; - this.PaymentMethodVariant = paymentMethodVariant; - this.ShopperName = shopperName; - this.SocialSecurityNumber = socialSecurityNumber; - this.TokenDetails = tokenDetails; - } - - /// - /// This field contains additional data, which may be returned in a particular response. The additionalData object consists of entries, each of which includes the key and value. - /// - /// This field contains additional data, which may be returned in a particular response. The additionalData object consists of entries, each of which includes the key and value. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// The alias of the credit card number. Applies only to recurring contracts storing credit card details - /// - /// The alias of the credit card number. Applies only to recurring contracts storing credit card details - [DataMember(Name = "alias", EmitDefaultValue = false)] - public string Alias { get; set; } - - /// - /// The alias type of the credit card number. Applies only to recurring contracts storing credit card details. - /// - /// The alias type of the credit card number. Applies only to recurring contracts storing credit card details. - [DataMember(Name = "aliasType", EmitDefaultValue = false)] - public string AliasType { get; set; } - - /// - /// Gets or Sets Bank - /// - [DataMember(Name = "bank", EmitDefaultValue = false)] - public BankAccount Bank { get; set; } - - /// - /// Gets or Sets BillingAddress - /// - [DataMember(Name = "billingAddress", EmitDefaultValue = false)] - public Address BillingAddress { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Types of recurring contracts. - /// - /// Types of recurring contracts. - [DataMember(Name = "contractTypes", EmitDefaultValue = false)] - public List ContractTypes { get; set; } - - /// - /// The date when the recurring details were created. - /// - /// The date when the recurring details were created. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The `pspReference` of the first recurring payment that created the recurring detail. - /// - /// The `pspReference` of the first recurring payment that created the recurring detail. - [DataMember(Name = "firstPspReference", EmitDefaultValue = false)] - public string FirstPspReference { get; set; } - - /// - /// An optional descriptive name for this recurring detail. - /// - /// An optional descriptive name for this recurring detail. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - /// - /// Returned in the response if you are not tokenizing with Adyen and are using the Merchant-initiated transactions (MIT) framework from Mastercard or Visa. This contains either the Mastercard Trace ID or the Visa Transaction ID. - [DataMember(Name = "networkTxReference", EmitDefaultValue = false)] - public string NetworkTxReference { get; set; } - - /// - /// The type or sub-brand of a payment method used, e.g. Visa Debit, Visa Corporate, etc. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). - /// - /// The type or sub-brand of a payment method used, e.g. Visa Debit, Visa Corporate, etc. For more information, refer to [PaymentMethodVariant](https://docs.adyen.com/development-resources/paymentmethodvariant). - [DataMember(Name = "paymentMethodVariant", EmitDefaultValue = false)] - public string PaymentMethodVariant { get; set; } - - /// - /// The reference that uniquely identifies the recurring detail. - /// - /// The reference that uniquely identifies the recurring detail. - [DataMember(Name = "recurringDetailReference", IsRequired = false, EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// Gets or Sets ShopperName - /// - [DataMember(Name = "shopperName", EmitDefaultValue = false)] - public Name ShopperName { get; set; } - - /// - /// A shopper's social security number (only in countries where it is legal to collect). - /// - /// A shopper's social security number (only in countries where it is legal to collect). - [DataMember(Name = "socialSecurityNumber", EmitDefaultValue = false)] - public string SocialSecurityNumber { get; set; } - - /// - /// Gets or Sets TokenDetails - /// - [DataMember(Name = "tokenDetails", EmitDefaultValue = false)] - public TokenDetails TokenDetails { get; set; } - - /// - /// The payment method, such as “mc\", \"visa\", \"ideal\", \"paypal\". - /// - /// The payment method, such as “mc\", \"visa\", \"ideal\", \"paypal\". - [DataMember(Name = "variant", IsRequired = false, EmitDefaultValue = false)] - public string Variant { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RecurringDetail {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Alias: ").Append(Alias).Append("\n"); - sb.Append(" AliasType: ").Append(AliasType).Append("\n"); - sb.Append(" Bank: ").Append(Bank).Append("\n"); - sb.Append(" BillingAddress: ").Append(BillingAddress).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" ContractTypes: ").Append(ContractTypes).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" FirstPspReference: ").Append(FirstPspReference).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" NetworkTxReference: ").Append(NetworkTxReference).Append("\n"); - sb.Append(" PaymentMethodVariant: ").Append(PaymentMethodVariant).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" ShopperName: ").Append(ShopperName).Append("\n"); - sb.Append(" SocialSecurityNumber: ").Append(SocialSecurityNumber).Append("\n"); - sb.Append(" TokenDetails: ").Append(TokenDetails).Append("\n"); - sb.Append(" Variant: ").Append(Variant).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecurringDetail); - } - - /// - /// Returns true if RecurringDetail instances are equal - /// - /// Instance of RecurringDetail to be compared - /// Boolean - public bool Equals(RecurringDetail input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Alias == input.Alias || - (this.Alias != null && - this.Alias.Equals(input.Alias)) - ) && - ( - this.AliasType == input.AliasType || - (this.AliasType != null && - this.AliasType.Equals(input.AliasType)) - ) && - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.BillingAddress == input.BillingAddress || - (this.BillingAddress != null && - this.BillingAddress.Equals(input.BillingAddress)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.ContractTypes == input.ContractTypes || - this.ContractTypes != null && - input.ContractTypes != null && - this.ContractTypes.SequenceEqual(input.ContractTypes) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.FirstPspReference == input.FirstPspReference || - (this.FirstPspReference != null && - this.FirstPspReference.Equals(input.FirstPspReference)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NetworkTxReference == input.NetworkTxReference || - (this.NetworkTxReference != null && - this.NetworkTxReference.Equals(input.NetworkTxReference)) - ) && - ( - this.PaymentMethodVariant == input.PaymentMethodVariant || - (this.PaymentMethodVariant != null && - this.PaymentMethodVariant.Equals(input.PaymentMethodVariant)) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.ShopperName == input.ShopperName || - (this.ShopperName != null && - this.ShopperName.Equals(input.ShopperName)) - ) && - ( - this.SocialSecurityNumber == input.SocialSecurityNumber || - (this.SocialSecurityNumber != null && - this.SocialSecurityNumber.Equals(input.SocialSecurityNumber)) - ) && - ( - this.TokenDetails == input.TokenDetails || - (this.TokenDetails != null && - this.TokenDetails.Equals(input.TokenDetails)) - ) && - ( - this.Variant == input.Variant || - (this.Variant != null && - this.Variant.Equals(input.Variant)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Alias != null) - { - hashCode = (hashCode * 59) + this.Alias.GetHashCode(); - } - if (this.AliasType != null) - { - hashCode = (hashCode * 59) + this.AliasType.GetHashCode(); - } - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - if (this.BillingAddress != null) - { - hashCode = (hashCode * 59) + this.BillingAddress.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.ContractTypes != null) - { - hashCode = (hashCode * 59) + this.ContractTypes.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.FirstPspReference != null) - { - hashCode = (hashCode * 59) + this.FirstPspReference.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.NetworkTxReference != null) - { - hashCode = (hashCode * 59) + this.NetworkTxReference.GetHashCode(); - } - if (this.PaymentMethodVariant != null) - { - hashCode = (hashCode * 59) + this.PaymentMethodVariant.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.ShopperName != null) - { - hashCode = (hashCode * 59) + this.ShopperName.GetHashCode(); - } - if (this.SocialSecurityNumber != null) - { - hashCode = (hashCode * 59) + this.SocialSecurityNumber.GetHashCode(); - } - if (this.TokenDetails != null) - { - hashCode = (hashCode * 59) + this.TokenDetails.GetHashCode(); - } - if (this.Variant != null) - { - hashCode = (hashCode * 59) + this.Variant.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/RecurringDetailWrapper.cs b/Adyen/Model/Recurring/RecurringDetailWrapper.cs deleted file mode 100644 index 47596afde..000000000 --- a/Adyen/Model/Recurring/RecurringDetailWrapper.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// RecurringDetailWrapper - /// - [DataContract(Name = "RecurringDetailWrapper")] - public partial class RecurringDetailWrapper : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// recurringDetail. - public RecurringDetailWrapper(RecurringDetail recurringDetail = default(RecurringDetail)) - { - this.RecurringDetail = recurringDetail; - } - - /// - /// Gets or Sets RecurringDetail - /// - [DataMember(Name = "RecurringDetail", EmitDefaultValue = false)] - public RecurringDetail RecurringDetail { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RecurringDetailWrapper {\n"); - sb.Append(" RecurringDetail: ").Append(RecurringDetail).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecurringDetailWrapper); - } - - /// - /// Returns true if RecurringDetailWrapper instances are equal - /// - /// Instance of RecurringDetailWrapper to be compared - /// Boolean - public bool Equals(RecurringDetailWrapper input) - { - if (input == null) - { - return false; - } - return - ( - this.RecurringDetail == input.RecurringDetail || - (this.RecurringDetail != null && - this.RecurringDetail.Equals(input.RecurringDetail)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RecurringDetail != null) - { - hashCode = (hashCode * 59) + this.RecurringDetail.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/RecurringDetailsRequest.cs b/Adyen/Model/Recurring/RecurringDetailsRequest.cs deleted file mode 100644 index 43a78d51f..000000000 --- a/Adyen/Model/Recurring/RecurringDetailsRequest.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// RecurringDetailsRequest - /// - [DataContract(Name = "RecurringDetailsRequest")] - public partial class RecurringDetailsRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RecurringDetailsRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account identifier you want to process the (transaction) request with. (required). - /// recurring. - /// The reference you use to uniquely identify the shopper (e.g. user ID or account ID). (required). - public RecurringDetailsRequest(string merchantAccount = default(string), Recurring recurring = default(Recurring), string shopperReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.ShopperReference = shopperReference; - this.Recurring = recurring; - } - - /// - /// The merchant account identifier you want to process the (transaction) request with. - /// - /// The merchant account identifier you want to process the (transaction) request with. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// Gets or Sets Recurring - /// - [DataMember(Name = "recurring", EmitDefaultValue = false)] - public Recurring Recurring { get; set; } - - /// - /// The reference you use to uniquely identify the shopper (e.g. user ID or account ID). - /// - /// The reference you use to uniquely identify the shopper (e.g. user ID or account ID). - [DataMember(Name = "shopperReference", IsRequired = false, EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RecurringDetailsRequest {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Recurring: ").Append(Recurring).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecurringDetailsRequest); - } - - /// - /// Returns true if RecurringDetailsRequest instances are equal - /// - /// Instance of RecurringDetailsRequest to be compared - /// Boolean - public bool Equals(RecurringDetailsRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Recurring == input.Recurring || - (this.Recurring != null && - this.Recurring.Equals(input.Recurring)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Recurring != null) - { - hashCode = (hashCode * 59) + this.Recurring.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/RecurringDetailsResult.cs b/Adyen/Model/Recurring/RecurringDetailsResult.cs deleted file mode 100644 index b16985b01..000000000 --- a/Adyen/Model/Recurring/RecurringDetailsResult.cs +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// RecurringDetailsResult - /// - [DataContract(Name = "RecurringDetailsResult")] - public partial class RecurringDetailsResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The date when the recurring details were created.. - /// Payment details stored for recurring payments.. - /// The most recent email for this shopper (if available).. - /// The reference you use to uniquely identify the shopper (e.g. user ID or account ID).. - public RecurringDetailsResult(DateTime creationDate = default(DateTime), List details = default(List), string lastKnownShopperEmail = default(string), string shopperReference = default(string)) - { - this.CreationDate = creationDate; - this.Details = details; - this.LastKnownShopperEmail = lastKnownShopperEmail; - this.ShopperReference = shopperReference; - } - - /// - /// The date when the recurring details were created. - /// - /// The date when the recurring details were created. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// Payment details stored for recurring payments. - /// - /// Payment details stored for recurring payments. - [DataMember(Name = "details", EmitDefaultValue = false)] - public List Details { get; set; } - - /// - /// The most recent email for this shopper (if available). - /// - /// The most recent email for this shopper (if available). - [DataMember(Name = "lastKnownShopperEmail", EmitDefaultValue = false)] - public string LastKnownShopperEmail { get; set; } - - /// - /// The reference you use to uniquely identify the shopper (e.g. user ID or account ID). - /// - /// The reference you use to uniquely identify the shopper (e.g. user ID or account ID). - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RecurringDetailsResult {\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Details: ").Append(Details).Append("\n"); - sb.Append(" LastKnownShopperEmail: ").Append(LastKnownShopperEmail).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RecurringDetailsResult); - } - - /// - /// Returns true if RecurringDetailsResult instances are equal - /// - /// Instance of RecurringDetailsResult to be compared - /// Boolean - public bool Equals(RecurringDetailsResult input) - { - if (input == null) - { - return false; - } - return - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Details == input.Details || - this.Details != null && - input.Details != null && - this.Details.SequenceEqual(input.Details) - ) && - ( - this.LastKnownShopperEmail == input.LastKnownShopperEmail || - (this.LastKnownShopperEmail != null && - this.LastKnownShopperEmail.Equals(input.LastKnownShopperEmail)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } - if (this.LastKnownShopperEmail != null) - { - hashCode = (hashCode * 59) + this.LastKnownShopperEmail.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.cs b/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.cs deleted file mode 100644 index 12487acde..000000000 --- a/Adyen/Model/Recurring/ScheduleAccountUpdaterRequest.cs +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// ScheduleAccountUpdaterRequest - /// - [DataContract(Name = "ScheduleAccountUpdaterRequest")] - public partial class ScheduleAccountUpdaterRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ScheduleAccountUpdaterRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// This field contains additional data, which may be required for a particular request.. - /// card. - /// Account of the merchant. (required). - /// A reference that merchants can apply for the call. (required). - /// The selected detail recurring reference. Optional if `card` is provided.. - /// The reference of the shopper that owns the recurring contract. Optional if `card` is provided.. - public ScheduleAccountUpdaterRequest(Dictionary additionalData = default(Dictionary), Card card = default(Card), string merchantAccount = default(string), string reference = default(string), string selectedRecurringDetailReference = default(string), string shopperReference = default(string)) - { - this.MerchantAccount = merchantAccount; - this.Reference = reference; - this.AdditionalData = additionalData; - this.Card = card; - this.SelectedRecurringDetailReference = selectedRecurringDetailReference; - this.ShopperReference = shopperReference; - } - - /// - /// This field contains additional data, which may be required for a particular request. - /// - /// This field contains additional data, which may be required for a particular request. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Account of the merchant. - /// - /// Account of the merchant. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// A reference that merchants can apply for the call. - /// - /// A reference that merchants can apply for the call. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The selected detail recurring reference. Optional if `card` is provided. - /// - /// The selected detail recurring reference. Optional if `card` is provided. - [DataMember(Name = "selectedRecurringDetailReference", EmitDefaultValue = false)] - public string SelectedRecurringDetailReference { get; set; } - - /// - /// The reference of the shopper that owns the recurring contract. Optional if `card` is provided. - /// - /// The reference of the shopper that owns the recurring contract. Optional if `card` is provided. - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ScheduleAccountUpdaterRequest {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" SelectedRecurringDetailReference: ").Append(SelectedRecurringDetailReference).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ScheduleAccountUpdaterRequest); - } - - /// - /// Returns true if ScheduleAccountUpdaterRequest instances are equal - /// - /// Instance of ScheduleAccountUpdaterRequest to be compared - /// Boolean - public bool Equals(ScheduleAccountUpdaterRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.SelectedRecurringDetailReference == input.SelectedRecurringDetailReference || - (this.SelectedRecurringDetailReference != null && - this.SelectedRecurringDetailReference.Equals(input.SelectedRecurringDetailReference)) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.SelectedRecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.SelectedRecurringDetailReference.GetHashCode(); - } - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.cs b/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.cs deleted file mode 100644 index dd058cc72..000000000 --- a/Adyen/Model/Recurring/ScheduleAccountUpdaterResult.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// ScheduleAccountUpdaterResult - /// - [DataContract(Name = "ScheduleAccountUpdaterResult")] - public partial class ScheduleAccountUpdaterResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ScheduleAccountUpdaterResult() { } - /// - /// Initializes a new instance of the class. - /// - /// Adyen's 16-character unique reference associated with the transaction. This value is globally unique; quote it when communicating with us about this request. (required). - /// The result of scheduling an Account Updater. If scheduling was successful, this field returns **Success**; otherwise it contains the error message. (required). - public ScheduleAccountUpdaterResult(string pspReference = default(string), string result = default(string)) - { - this.PspReference = pspReference; - this.Result = result; - } - - /// - /// Adyen's 16-character unique reference associated with the transaction. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character unique reference associated with the transaction. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", IsRequired = false, EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The result of scheduling an Account Updater. If scheduling was successful, this field returns **Success**; otherwise it contains the error message. - /// - /// The result of scheduling an Account Updater. If scheduling was successful, this field returns **Success**; otherwise it contains the error message. - [DataMember(Name = "result", IsRequired = false, EmitDefaultValue = false)] - public string Result { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ScheduleAccountUpdaterResult {\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ScheduleAccountUpdaterResult); - } - - /// - /// Returns true if ScheduleAccountUpdaterResult instances are equal - /// - /// Instance of ScheduleAccountUpdaterResult to be compared - /// Boolean - public bool Equals(ScheduleAccountUpdaterResult input) - { - if (input == null) - { - return false; - } - return - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.Result != null) - { - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/ServiceError.cs b/Adyen/Model/Recurring/ServiceError.cs deleted file mode 100644 index 946c388fa..000000000 --- a/Adyen/Model/Recurring/ServiceError.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.. - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(Dictionary additionalData = default(Dictionary), string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.AdditionalData = additionalData; - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Recurring/TokenDetails.cs b/Adyen/Model/Recurring/TokenDetails.cs deleted file mode 100644 index 2a76f01cf..000000000 --- a/Adyen/Model/Recurring/TokenDetails.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Adyen Recurring API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Recurring -{ - /// - /// TokenDetails - /// - [DataContract(Name = "TokenDetails")] - public partial class TokenDetails : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// tokenData. - /// tokenDataType. - public TokenDetails(Dictionary tokenData = default(Dictionary), string tokenDataType = default(string)) - { - this.TokenData = tokenData; - this.TokenDataType = tokenDataType; - } - - /// - /// Gets or Sets TokenData - /// - [DataMember(Name = "tokenData", EmitDefaultValue = false)] - public Dictionary TokenData { get; set; } - - /// - /// Gets or Sets TokenDataType - /// - [DataMember(Name = "tokenDataType", EmitDefaultValue = false)] - public string TokenDataType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TokenDetails {\n"); - sb.Append(" TokenData: ").Append(TokenData).Append("\n"); - sb.Append(" TokenDataType: ").Append(TokenDataType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TokenDetails); - } - - /// - /// Returns true if TokenDetails instances are equal - /// - /// Instance of TokenDetails to be compared - /// Boolean - public bool Equals(TokenDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.TokenData == input.TokenData || - this.TokenData != null && - input.TokenData != null && - this.TokenData.SequenceEqual(input.TokenData) - ) && - ( - this.TokenDataType == input.TokenDataType || - (this.TokenDataType != null && - this.TokenDataType.Equals(input.TokenDataType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TokenData != null) - { - hashCode = (hashCode * 59) + this.TokenData.GetHashCode(); - } - if (this.TokenDataType != null) - { - hashCode = (hashCode * 59) + this.TokenDataType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ReportWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/ReportWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index 79c972850..000000000 --- a/Adyen/Model/ReportWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Report webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.ReportWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.cs b/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.cs deleted file mode 100644 index 9fa8ed362..000000000 --- a/Adyen/Model/ReportWebhooks/BalancePlatformNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Report webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ReportWebhooks -{ - /// - /// BalancePlatformNotificationResponse - /// - [DataContract(Name = "BalancePlatformNotificationResponse")] - public partial class BalancePlatformNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public BalancePlatformNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalancePlatformNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalancePlatformNotificationResponse); - } - - /// - /// Returns true if BalancePlatformNotificationResponse instances are equal - /// - /// Instance of BalancePlatformNotificationResponse to be compared - /// Boolean - public bool Equals(BalancePlatformNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ReportWebhooks/ReportNotificationData.cs b/Adyen/Model/ReportWebhooks/ReportNotificationData.cs deleted file mode 100644 index 6d06b19c1..000000000 --- a/Adyen/Model/ReportWebhooks/ReportNotificationData.cs +++ /dev/null @@ -1,265 +0,0 @@ -/* -* Report webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ReportWebhooks -{ - /// - /// ReportNotificationData - /// - [DataContract(Name = "ReportNotificationData")] - public partial class ReportNotificationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ReportNotificationData() { } - /// - /// Initializes a new instance of the class. - /// - /// accountHolder. - /// balanceAccount. - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The URL at which you can download the report. To download, you must authenticate your GET request with your [API credentials](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/overview). (required). - /// The filename of the report. (required). - /// The ID of the resource.. - /// The type of report. Possible values: - `balanceplatform_accounting_interactive_report` - `balanceplatform_accounting_report` - `balanceplatform_balance_report` - `balanceplatform_fee_report` - `balanceplatform_payment_instrument_report` - `balanceplatform_payout_report` - `balanceplatform_statement_report` (required). - public ReportNotificationData(ResourceReference accountHolder = default(ResourceReference), ResourceReference balanceAccount = default(ResourceReference), string balancePlatform = default(string), DateTime creationDate = default(DateTime), string downloadUrl = default(string), string fileName = default(string), string id = default(string), string reportType = default(string)) - { - this.DownloadUrl = downloadUrl; - this.FileName = fileName; - this.ReportType = reportType; - this.AccountHolder = accountHolder; - this.BalanceAccount = balanceAccount; - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Id = id; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", EmitDefaultValue = false)] - public ResourceReference AccountHolder { get; set; } - - /// - /// Gets or Sets BalanceAccount - /// - [DataMember(Name = "balanceAccount", EmitDefaultValue = false)] - public ResourceReference BalanceAccount { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The URL at which you can download the report. To download, you must authenticate your GET request with your [API credentials](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/overview). - /// - /// The URL at which you can download the report. To download, you must authenticate your GET request with your [API credentials](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/overview). - [DataMember(Name = "downloadUrl", IsRequired = false, EmitDefaultValue = false)] - public string DownloadUrl { get; set; } - - /// - /// The filename of the report. - /// - /// The filename of the report. - [DataMember(Name = "fileName", IsRequired = false, EmitDefaultValue = false)] - public string FileName { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The type of report. Possible values: - `balanceplatform_accounting_interactive_report` - `balanceplatform_accounting_report` - `balanceplatform_balance_report` - `balanceplatform_fee_report` - `balanceplatform_payment_instrument_report` - `balanceplatform_payout_report` - `balanceplatform_statement_report` - /// - /// The type of report. Possible values: - `balanceplatform_accounting_interactive_report` - `balanceplatform_accounting_report` - `balanceplatform_balance_report` - `balanceplatform_fee_report` - `balanceplatform_payment_instrument_report` - `balanceplatform_payout_report` - `balanceplatform_statement_report` - [DataMember(Name = "reportType", IsRequired = false, EmitDefaultValue = false)] - public string ReportType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReportNotificationData {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" BalanceAccount: ").Append(BalanceAccount).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" DownloadUrl: ").Append(DownloadUrl).Append("\n"); - sb.Append(" FileName: ").Append(FileName).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" ReportType: ").Append(ReportType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReportNotificationData); - } - - /// - /// Returns true if ReportNotificationData instances are equal - /// - /// Instance of ReportNotificationData to be compared - /// Boolean - public bool Equals(ReportNotificationData input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.BalanceAccount == input.BalanceAccount || - (this.BalanceAccount != null && - this.BalanceAccount.Equals(input.BalanceAccount)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.DownloadUrl == input.DownloadUrl || - (this.DownloadUrl != null && - this.DownloadUrl.Equals(input.DownloadUrl)) - ) && - ( - this.FileName == input.FileName || - (this.FileName != null && - this.FileName.Equals(input.FileName)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.ReportType == input.ReportType || - (this.ReportType != null && - this.ReportType.Equals(input.ReportType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.BalanceAccount != null) - { - hashCode = (hashCode * 59) + this.BalanceAccount.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.DownloadUrl != null) - { - hashCode = (hashCode * 59) + this.DownloadUrl.GetHashCode(); - } - if (this.FileName != null) - { - hashCode = (hashCode * 59) + this.FileName.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.ReportType != null) - { - hashCode = (hashCode * 59) + this.ReportType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ReportWebhooks/ReportNotificationRequest.cs b/Adyen/Model/ReportWebhooks/ReportNotificationRequest.cs deleted file mode 100644 index bf980b541..000000000 --- a/Adyen/Model/ReportWebhooks/ReportNotificationRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Report webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ReportWebhooks -{ - /// - /// ReportNotificationRequest - /// - [DataContract(Name = "ReportNotificationRequest")] - public partial class ReportNotificationRequest : IEquatable, IValidatableObject - { - /// - /// Type of webhook. - /// - /// Type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BalancePlatformReportCreated for value: balancePlatform.report.created - /// - [EnumMember(Value = "balancePlatform.report.created")] - BalancePlatformReportCreated = 1 - - } - - - /// - /// Type of webhook. - /// - /// Type of webhook. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ReportNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of webhook. (required). - public ReportNotificationRequest(ReportNotificationData data = default(ReportNotificationData), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum type = default(TypeEnum)) - { - this.Data = data; - this.Environment = environment; - this.Type = type; - this.Timestamp = timestamp; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public ReportNotificationData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReportNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReportNotificationRequest); - } - - /// - /// Returns true if ReportNotificationRequest instances are equal - /// - /// Instance of ReportNotificationRequest to be compared - /// Boolean - public bool Equals(ReportNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ReportWebhooks/Resource.cs b/Adyen/Model/ReportWebhooks/Resource.cs deleted file mode 100644 index a6dd25a47..000000000 --- a/Adyen/Model/ReportWebhooks/Resource.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Report webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ReportWebhooks -{ - /// - /// Resource - /// - [DataContract(Name = "Resource")] - public partial class Resource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The ID of the resource.. - public Resource(string balancePlatform = default(string), DateTime creationDate = default(DateTime), string id = default(string)) - { - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Id = id; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Resource {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Resource); - } - - /// - /// Returns true if Resource instances are equal - /// - /// Instance of Resource to be compared - /// Boolean - public bool Equals(Resource input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/ReportWebhooks/ResourceReference.cs b/Adyen/Model/ReportWebhooks/ResourceReference.cs deleted file mode 100644 index cda328575..000000000 --- a/Adyen/Model/ReportWebhooks/ResourceReference.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Report webhooks -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.ReportWebhooks -{ - /// - /// ResourceReference - /// - [DataContract(Name = "ResourceReference")] - public partial class ResourceReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The reference for the resource.. - public ResourceReference(string description = default(string), string id = default(string), string reference = default(string)) - { - this.Description = description; - this.Id = id; - this.Reference = reference; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResourceReference {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResourceReference); - } - - /// - /// Returns true if ResourceReference instances are equal - /// - /// Instance of ResourceReference to be compared - /// Boolean - public bool Equals(ResourceReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/AbstractOpenAPISchema.cs b/Adyen/Model/StoredValue/AbstractOpenAPISchema.cs deleted file mode 100644 index 9f840618b..000000000 --- a/Adyen/Model/StoredValue/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.StoredValue -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/StoredValue/Amount.cs b/Adyen/Model/StoredValue/Amount.cs deleted file mode 100644 index 88481d096..000000000 --- a/Adyen/Model/StoredValue/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/ServiceError.cs b/Adyen/Model/StoredValue/ServiceError.cs deleted file mode 100644 index fa480b25a..000000000 --- a/Adyen/Model/StoredValue/ServiceError.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.. - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(Dictionary additionalData = default(Dictionary), string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.AdditionalData = additionalData; - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - /// - /// Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**. - [DataMember(Name = "additionalData", EmitDefaultValue = false)] - public Dictionary AdditionalData { get; set; } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" AdditionalData: ").Append(AdditionalData).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.AdditionalData == input.AdditionalData || - this.AdditionalData != null && - input.AdditionalData != null && - this.AdditionalData.SequenceEqual(input.AdditionalData) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalData != null) - { - hashCode = (hashCode * 59) + this.AdditionalData.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.cs b/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.cs deleted file mode 100644 index 43145fc7b..000000000 --- a/Adyen/Model/StoredValue/StoredValueBalanceCheckRequest.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueBalanceCheckRequest - /// - [DataContract(Name = "StoredValueBalanceCheckRequest")] - public partial class StoredValueBalanceCheckRequest : IEquatable, IValidatableObject - { - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoredValueBalanceCheckRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The collection that contains the type of the payment method and its specific information if available (required). - /// recurringDetailReference. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required). - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// shopperReference. - /// The physical store, for which this payment is processed.. - public StoredValueBalanceCheckRequest(Amount amount = default(Amount), string merchantAccount = default(string), Dictionary paymentMethod = default(Dictionary), string recurringDetailReference = default(string), string reference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperReference = default(string), string store = default(string)) - { - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.Reference = reference; - this.Amount = amount; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperInteraction = shopperInteraction; - this.ShopperReference = shopperReference; - this.Store = store; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The collection that contains the type of the payment method and its specific information if available - /// - /// The collection that contains the type of the payment method and its specific information if available - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public Dictionary PaymentMethod { get; set; } - - /// - /// Gets or Sets RecurringDetailReference - /// - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets ShopperReference - /// - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The physical store, for which this payment is processed. - /// - /// The physical store, for which this payment is processed. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueBalanceCheckRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueBalanceCheckRequest); - } - - /// - /// Returns true if StoredValueBalanceCheckRequest instances are equal - /// - /// Instance of StoredValueBalanceCheckRequest to be compared - /// Boolean - public bool Equals(StoredValueBalanceCheckRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - this.PaymentMethod != null && - input.PaymentMethod != null && - this.PaymentMethod.SequenceEqual(input.PaymentMethod) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 16.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.cs b/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.cs deleted file mode 100644 index c90b311be..000000000 --- a/Adyen/Model/StoredValue/StoredValueBalanceCheckResponse.cs +++ /dev/null @@ -1,233 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueBalanceCheckResponse - /// - [DataContract(Name = "StoredValueBalanceCheckResponse")] - public partial class StoredValueBalanceCheckResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 1, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 2, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 3, - - /// - /// Enum NotEnoughBalance for value: NotEnoughBalance - /// - [EnumMember(Value = "NotEnoughBalance")] - NotEnoughBalance = 4 - - } - - - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// currentBalance. - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values.. - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. . - /// Raw refusal reason received from the third party, where available. - public StoredValueBalanceCheckResponse(Amount currentBalance = default(Amount), string pspReference = default(string), string refusalReason = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?), string thirdPartyRefusalReason = default(string)) - { - this.CurrentBalance = currentBalance; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.ResultCode = resultCode; - this.ThirdPartyRefusalReason = thirdPartyRefusalReason; - } - - /// - /// Gets or Sets CurrentBalance - /// - [DataMember(Name = "currentBalance", EmitDefaultValue = false)] - public Amount CurrentBalance { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Raw refusal reason received from the third party, where available - /// - /// Raw refusal reason received from the third party, where available - [DataMember(Name = "thirdPartyRefusalReason", EmitDefaultValue = false)] - public string ThirdPartyRefusalReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueBalanceCheckResponse {\n"); - sb.Append(" CurrentBalance: ").Append(CurrentBalance).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ThirdPartyRefusalReason: ").Append(ThirdPartyRefusalReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueBalanceCheckResponse); - } - - /// - /// Returns true if StoredValueBalanceCheckResponse instances are equal - /// - /// Instance of StoredValueBalanceCheckResponse to be compared - /// Boolean - public bool Equals(StoredValueBalanceCheckResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CurrentBalance == input.CurrentBalance || - (this.CurrentBalance != null && - this.CurrentBalance.Equals(input.CurrentBalance)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.ThirdPartyRefusalReason == input.ThirdPartyRefusalReason || - (this.ThirdPartyRefusalReason != null && - this.ThirdPartyRefusalReason.Equals(input.ThirdPartyRefusalReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CurrentBalance != null) - { - hashCode = (hashCode * 59) + this.CurrentBalance.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.ThirdPartyRefusalReason != null) - { - hashCode = (hashCode * 59) + this.ThirdPartyRefusalReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.cs b/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.cs deleted file mode 100644 index 85a92afad..000000000 --- a/Adyen/Model/StoredValue/StoredValueBalanceMergeRequest.cs +++ /dev/null @@ -1,326 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueBalanceMergeRequest - /// - [DataContract(Name = "StoredValueBalanceMergeRequest")] - public partial class StoredValueBalanceMergeRequest : IEquatable, IValidatableObject - { - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoredValueBalanceMergeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The collection that contains the type of the payment method and its specific information if available (required). - /// recurringDetailReference. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required). - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// shopperReference. - /// The collection that contains the source payment method and its specific information if available. Note that type should not be included since it is inferred from the (target) payment method (required). - /// The physical store, for which this payment is processed.. - public StoredValueBalanceMergeRequest(Amount amount = default(Amount), string merchantAccount = default(string), Dictionary paymentMethod = default(Dictionary), string recurringDetailReference = default(string), string reference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperReference = default(string), Dictionary sourcePaymentMethod = default(Dictionary), string store = default(string)) - { - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.Reference = reference; - this.SourcePaymentMethod = sourcePaymentMethod; - this.Amount = amount; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperInteraction = shopperInteraction; - this.ShopperReference = shopperReference; - this.Store = store; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The collection that contains the type of the payment method and its specific information if available - /// - /// The collection that contains the type of the payment method and its specific information if available - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public Dictionary PaymentMethod { get; set; } - - /// - /// Gets or Sets RecurringDetailReference - /// - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets ShopperReference - /// - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The collection that contains the source payment method and its specific information if available. Note that type should not be included since it is inferred from the (target) payment method - /// - /// The collection that contains the source payment method and its specific information if available. Note that type should not be included since it is inferred from the (target) payment method - [DataMember(Name = "sourcePaymentMethod", IsRequired = false, EmitDefaultValue = false)] - public Dictionary SourcePaymentMethod { get; set; } - - /// - /// The physical store, for which this payment is processed. - /// - /// The physical store, for which this payment is processed. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueBalanceMergeRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" SourcePaymentMethod: ").Append(SourcePaymentMethod).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueBalanceMergeRequest); - } - - /// - /// Returns true if StoredValueBalanceMergeRequest instances are equal - /// - /// Instance of StoredValueBalanceMergeRequest to be compared - /// Boolean - public bool Equals(StoredValueBalanceMergeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - this.PaymentMethod != null && - input.PaymentMethod != null && - this.PaymentMethod.SequenceEqual(input.PaymentMethod) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.SourcePaymentMethod == input.SourcePaymentMethod || - this.SourcePaymentMethod != null && - input.SourcePaymentMethod != null && - this.SourcePaymentMethod.SequenceEqual(input.SourcePaymentMethod) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.SourcePaymentMethod != null) - { - hashCode = (hashCode * 59) + this.SourcePaymentMethod.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 16.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.cs b/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.cs deleted file mode 100644 index 1ff3ad245..000000000 --- a/Adyen/Model/StoredValue/StoredValueBalanceMergeResponse.cs +++ /dev/null @@ -1,252 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueBalanceMergeResponse - /// - [DataContract(Name = "StoredValueBalanceMergeResponse")] - public partial class StoredValueBalanceMergeResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 1, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 2, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 3, - - /// - /// Enum NotEnoughBalance for value: NotEnoughBalance - /// - [EnumMember(Value = "NotEnoughBalance")] - NotEnoughBalance = 4 - - } - - - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty.. - /// currentBalance. - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values.. - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. . - /// Raw refusal reason received from the third party, where available. - public StoredValueBalanceMergeResponse(string authCode = default(string), Amount currentBalance = default(Amount), string pspReference = default(string), string refusalReason = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?), string thirdPartyRefusalReason = default(string)) - { - this.AuthCode = authCode; - this.CurrentBalance = currentBalance; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.ResultCode = resultCode; - this.ThirdPartyRefusalReason = thirdPartyRefusalReason; - } - - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - [DataMember(Name = "authCode", EmitDefaultValue = false)] - public string AuthCode { get; set; } - - /// - /// Gets or Sets CurrentBalance - /// - [DataMember(Name = "currentBalance", EmitDefaultValue = false)] - public Amount CurrentBalance { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Raw refusal reason received from the third party, where available - /// - /// Raw refusal reason received from the third party, where available - [DataMember(Name = "thirdPartyRefusalReason", EmitDefaultValue = false)] - public string ThirdPartyRefusalReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueBalanceMergeResponse {\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" CurrentBalance: ").Append(CurrentBalance).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ThirdPartyRefusalReason: ").Append(ThirdPartyRefusalReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueBalanceMergeResponse); - } - - /// - /// Returns true if StoredValueBalanceMergeResponse instances are equal - /// - /// Instance of StoredValueBalanceMergeResponse to be compared - /// Boolean - public bool Equals(StoredValueBalanceMergeResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.CurrentBalance == input.CurrentBalance || - (this.CurrentBalance != null && - this.CurrentBalance.Equals(input.CurrentBalance)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.ThirdPartyRefusalReason == input.ThirdPartyRefusalReason || - (this.ThirdPartyRefusalReason != null && - this.ThirdPartyRefusalReason.Equals(input.ThirdPartyRefusalReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.CurrentBalance != null) - { - hashCode = (hashCode * 59) + this.CurrentBalance.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.ThirdPartyRefusalReason != null) - { - hashCode = (hashCode * 59) + this.ThirdPartyRefusalReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueIssueRequest.cs b/Adyen/Model/StoredValue/StoredValueIssueRequest.cs deleted file mode 100644 index 245e65dff..000000000 --- a/Adyen/Model/StoredValue/StoredValueIssueRequest.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueIssueRequest - /// - [DataContract(Name = "StoredValueIssueRequest")] - public partial class StoredValueIssueRequest : IEquatable, IValidatableObject - { - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoredValueIssueRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The collection that contains the type of the payment method and its specific information if available (required). - /// recurringDetailReference. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required). - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// shopperReference. - /// The physical store, for which this payment is processed.. - public StoredValueIssueRequest(Amount amount = default(Amount), string merchantAccount = default(string), Dictionary paymentMethod = default(Dictionary), string recurringDetailReference = default(string), string reference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperReference = default(string), string store = default(string)) - { - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.Reference = reference; - this.Amount = amount; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperInteraction = shopperInteraction; - this.ShopperReference = shopperReference; - this.Store = store; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The collection that contains the type of the payment method and its specific information if available - /// - /// The collection that contains the type of the payment method and its specific information if available - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public Dictionary PaymentMethod { get; set; } - - /// - /// Gets or Sets RecurringDetailReference - /// - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets ShopperReference - /// - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The physical store, for which this payment is processed. - /// - /// The physical store, for which this payment is processed. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueIssueRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueIssueRequest); - } - - /// - /// Returns true if StoredValueIssueRequest instances are equal - /// - /// Instance of StoredValueIssueRequest to be compared - /// Boolean - public bool Equals(StoredValueIssueRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - this.PaymentMethod != null && - input.PaymentMethod != null && - this.PaymentMethod.SequenceEqual(input.PaymentMethod) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 16.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueIssueResponse.cs b/Adyen/Model/StoredValue/StoredValueIssueResponse.cs deleted file mode 100644 index 41182b7c9..000000000 --- a/Adyen/Model/StoredValue/StoredValueIssueResponse.cs +++ /dev/null @@ -1,272 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueIssueResponse - /// - [DataContract(Name = "StoredValueIssueResponse")] - public partial class StoredValueIssueResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 1, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 2, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 3, - - /// - /// Enum NotEnoughBalance for value: NotEnoughBalance - /// - [EnumMember(Value = "NotEnoughBalance")] - NotEnoughBalance = 4 - - } - - - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty.. - /// currentBalance. - /// The collection that contains the type of the payment method and its specific information if available. - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values.. - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. . - /// Raw refusal reason received from the third party, where available. - public StoredValueIssueResponse(string authCode = default(string), Amount currentBalance = default(Amount), Dictionary paymentMethod = default(Dictionary), string pspReference = default(string), string refusalReason = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?), string thirdPartyRefusalReason = default(string)) - { - this.AuthCode = authCode; - this.CurrentBalance = currentBalance; - this.PaymentMethod = paymentMethod; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.ResultCode = resultCode; - this.ThirdPartyRefusalReason = thirdPartyRefusalReason; - } - - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - [DataMember(Name = "authCode", EmitDefaultValue = false)] - public string AuthCode { get; set; } - - /// - /// Gets or Sets CurrentBalance - /// - [DataMember(Name = "currentBalance", EmitDefaultValue = false)] - public Amount CurrentBalance { get; set; } - - /// - /// The collection that contains the type of the payment method and its specific information if available - /// - /// The collection that contains the type of the payment method and its specific information if available - [DataMember(Name = "paymentMethod", EmitDefaultValue = false)] - public Dictionary PaymentMethod { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Raw refusal reason received from the third party, where available - /// - /// Raw refusal reason received from the third party, where available - [DataMember(Name = "thirdPartyRefusalReason", EmitDefaultValue = false)] - public string ThirdPartyRefusalReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueIssueResponse {\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" CurrentBalance: ").Append(CurrentBalance).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ThirdPartyRefusalReason: ").Append(ThirdPartyRefusalReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueIssueResponse); - } - - /// - /// Returns true if StoredValueIssueResponse instances are equal - /// - /// Instance of StoredValueIssueResponse to be compared - /// Boolean - public bool Equals(StoredValueIssueResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.CurrentBalance == input.CurrentBalance || - (this.CurrentBalance != null && - this.CurrentBalance.Equals(input.CurrentBalance)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - this.PaymentMethod != null && - input.PaymentMethod != null && - this.PaymentMethod.SequenceEqual(input.PaymentMethod) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.ThirdPartyRefusalReason == input.ThirdPartyRefusalReason || - (this.ThirdPartyRefusalReason != null && - this.ThirdPartyRefusalReason.Equals(input.ThirdPartyRefusalReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.CurrentBalance != null) - { - hashCode = (hashCode * 59) + this.CurrentBalance.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.ThirdPartyRefusalReason != null) - { - hashCode = (hashCode * 59) + this.ThirdPartyRefusalReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueLoadRequest.cs b/Adyen/Model/StoredValue/StoredValueLoadRequest.cs deleted file mode 100644 index e3170e157..000000000 --- a/Adyen/Model/StoredValue/StoredValueLoadRequest.cs +++ /dev/null @@ -1,342 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueLoadRequest - /// - [DataContract(Name = "StoredValueLoadRequest")] - public partial class StoredValueLoadRequest : IEquatable, IValidatableObject - { - /// - /// The type of load you are trying to do, when absent we default to 'Load' - /// - /// The type of load you are trying to do, when absent we default to 'Load' - [JsonConverter(typeof(StringEnumConverter))] - public enum LoadTypeEnum - { - /// - /// Enum MerchandiseReturn for value: merchandiseReturn - /// - [EnumMember(Value = "merchandiseReturn")] - MerchandiseReturn = 1, - - /// - /// Enum Load for value: load - /// - [EnumMember(Value = "load")] - Load = 2 - - } - - - /// - /// The type of load you are trying to do, when absent we default to 'Load' - /// - /// The type of load you are trying to do, when absent we default to 'Load' - [DataMember(Name = "loadType", EmitDefaultValue = false)] - public LoadTypeEnum? LoadType { get; set; } - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoredValueLoadRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// The type of load you are trying to do, when absent we default to 'Load'. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The collection that contains the type of the payment method and its specific information if available (required). - /// recurringDetailReference. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required). - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// shopperReference. - /// The physical store, for which this payment is processed.. - public StoredValueLoadRequest(Amount amount = default(Amount), LoadTypeEnum? loadType = default(LoadTypeEnum?), string merchantAccount = default(string), Dictionary paymentMethod = default(Dictionary), string recurringDetailReference = default(string), string reference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperReference = default(string), string store = default(string)) - { - this.Amount = amount; - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.Reference = reference; - this.LoadType = loadType; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperInteraction = shopperInteraction; - this.ShopperReference = shopperReference; - this.Store = store; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The collection that contains the type of the payment method and its specific information if available - /// - /// The collection that contains the type of the payment method and its specific information if available - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public Dictionary PaymentMethod { get; set; } - - /// - /// Gets or Sets RecurringDetailReference - /// - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets ShopperReference - /// - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The physical store, for which this payment is processed. - /// - /// The physical store, for which this payment is processed. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueLoadRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" LoadType: ").Append(LoadType).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueLoadRequest); - } - - /// - /// Returns true if StoredValueLoadRequest instances are equal - /// - /// Instance of StoredValueLoadRequest to be compared - /// Boolean - public bool Equals(StoredValueLoadRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.LoadType == input.LoadType || - this.LoadType.Equals(input.LoadType) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - this.PaymentMethod != null && - input.PaymentMethod != null && - this.PaymentMethod.SequenceEqual(input.PaymentMethod) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LoadType.GetHashCode(); - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 16.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueLoadResponse.cs b/Adyen/Model/StoredValue/StoredValueLoadResponse.cs deleted file mode 100644 index 26c3ea3b6..000000000 --- a/Adyen/Model/StoredValue/StoredValueLoadResponse.cs +++ /dev/null @@ -1,252 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueLoadResponse - /// - [DataContract(Name = "StoredValueLoadResponse")] - public partial class StoredValueLoadResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 1, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 2, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 3, - - /// - /// Enum NotEnoughBalance for value: NotEnoughBalance - /// - [EnumMember(Value = "NotEnoughBalance")] - NotEnoughBalance = 4 - - } - - - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty.. - /// currentBalance. - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values.. - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. . - /// Raw refusal reason received from the third party, where available. - public StoredValueLoadResponse(string authCode = default(string), Amount currentBalance = default(Amount), string pspReference = default(string), string refusalReason = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?), string thirdPartyRefusalReason = default(string)) - { - this.AuthCode = authCode; - this.CurrentBalance = currentBalance; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.ResultCode = resultCode; - this.ThirdPartyRefusalReason = thirdPartyRefusalReason; - } - - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - [DataMember(Name = "authCode", EmitDefaultValue = false)] - public string AuthCode { get; set; } - - /// - /// Gets or Sets CurrentBalance - /// - [DataMember(Name = "currentBalance", EmitDefaultValue = false)] - public Amount CurrentBalance { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Raw refusal reason received from the third party, where available - /// - /// Raw refusal reason received from the third party, where available - [DataMember(Name = "thirdPartyRefusalReason", EmitDefaultValue = false)] - public string ThirdPartyRefusalReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueLoadResponse {\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" CurrentBalance: ").Append(CurrentBalance).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ThirdPartyRefusalReason: ").Append(ThirdPartyRefusalReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueLoadResponse); - } - - /// - /// Returns true if StoredValueLoadResponse instances are equal - /// - /// Instance of StoredValueLoadResponse to be compared - /// Boolean - public bool Equals(StoredValueLoadResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.CurrentBalance == input.CurrentBalance || - (this.CurrentBalance != null && - this.CurrentBalance.Equals(input.CurrentBalance)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.ThirdPartyRefusalReason == input.ThirdPartyRefusalReason || - (this.ThirdPartyRefusalReason != null && - this.ThirdPartyRefusalReason.Equals(input.ThirdPartyRefusalReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.CurrentBalance != null) - { - hashCode = (hashCode * 59) + this.CurrentBalance.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.ThirdPartyRefusalReason != null) - { - hashCode = (hashCode * 59) + this.ThirdPartyRefusalReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.cs b/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.cs deleted file mode 100644 index b0f2d482f..000000000 --- a/Adyen/Model/StoredValue/StoredValueStatusChangeRequest.cs +++ /dev/null @@ -1,342 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueStatusChangeRequest - /// - [DataContract(Name = "StoredValueStatusChangeRequest")] - public partial class StoredValueStatusChangeRequest : IEquatable, IValidatableObject - { - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [JsonConverter(typeof(StringEnumConverter))] - public enum ShopperInteractionEnum - { - /// - /// Enum Ecommerce for value: Ecommerce - /// - [EnumMember(Value = "Ecommerce")] - Ecommerce = 1, - - /// - /// Enum ContAuth for value: ContAuth - /// - [EnumMember(Value = "ContAuth")] - ContAuth = 2, - - /// - /// Enum Moto for value: Moto - /// - [EnumMember(Value = "Moto")] - Moto = 3, - - /// - /// Enum POS for value: POS - /// - [EnumMember(Value = "POS")] - POS = 4 - - } - - - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - /// - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal. - [DataMember(Name = "shopperInteraction", EmitDefaultValue = false)] - public ShopperInteractionEnum? ShopperInteraction { get; set; } - /// - /// The status you want to change to - /// - /// The status you want to change to - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Active for value: active - /// - [EnumMember(Value = "active")] - Active = 1, - - /// - /// Enum Inactive for value: inactive - /// - [EnumMember(Value = "inactive")] - Inactive = 2 - - } - - - /// - /// The status you want to change to - /// - /// The status you want to change to - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoredValueStatusChangeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The collection that contains the type of the payment method and its specific information if available (required). - /// recurringDetailReference. - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. (required). - /// Specifies the sales channel, through which the shopper gives their card details, and whether the shopper is a returning customer. For the web service API, Adyen assumes Ecommerce shopper interaction by default. This field has the following possible values: * `Ecommerce` - Online transactions where the cardholder is present (online). For better authorisation rates, we recommend sending the card security code (CSC) along with the request. * `ContAuth` - Card on file and/or subscription transactions, where the cardholder is known to the merchant (returning customer). If the shopper is present (online), you can supply also the CSC to improve authorisation (one-click payment). * `Moto` - Mail-order and telephone-order transactions where the shopper is in contact with the merchant via email or telephone. * `POS` - Point-of-sale transactions where the shopper is physically present to make a payment using a secure payment terminal.. - /// shopperReference. - /// The status you want to change to (required). - /// The physical store, for which this payment is processed.. - public StoredValueStatusChangeRequest(Amount amount = default(Amount), string merchantAccount = default(string), Dictionary paymentMethod = default(Dictionary), string recurringDetailReference = default(string), string reference = default(string), ShopperInteractionEnum? shopperInteraction = default(ShopperInteractionEnum?), string shopperReference = default(string), StatusEnum status = default(StatusEnum), string store = default(string)) - { - this.MerchantAccount = merchantAccount; - this.PaymentMethod = paymentMethod; - this.Reference = reference; - this.Status = status; - this.Amount = amount; - this.RecurringDetailReference = recurringDetailReference; - this.ShopperInteraction = shopperInteraction; - this.ShopperReference = shopperReference; - this.Store = store; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The collection that contains the type of the payment method and its specific information if available - /// - /// The collection that contains the type of the payment method and its specific information if available - [DataMember(Name = "paymentMethod", IsRequired = false, EmitDefaultValue = false)] - public Dictionary PaymentMethod { get; set; } - - /// - /// Gets or Sets RecurringDetailReference - /// - [DataMember(Name = "recurringDetailReference", EmitDefaultValue = false)] - public string RecurringDetailReference { get; set; } - - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - /// - /// The reference to uniquely identify a payment. This reference is used in all communication with you about the payment status. We recommend using a unique value per payment; however, it is not a requirement. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). Maximum length: 80 characters. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets ShopperReference - /// - [DataMember(Name = "shopperReference", EmitDefaultValue = false)] - public string ShopperReference { get; set; } - - /// - /// The physical store, for which this payment is processed. - /// - /// The physical store, for which this payment is processed. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueStatusChangeRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" PaymentMethod: ").Append(PaymentMethod).Append("\n"); - sb.Append(" RecurringDetailReference: ").Append(RecurringDetailReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ShopperInteraction: ").Append(ShopperInteraction).Append("\n"); - sb.Append(" ShopperReference: ").Append(ShopperReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueStatusChangeRequest); - } - - /// - /// Returns true if StoredValueStatusChangeRequest instances are equal - /// - /// Instance of StoredValueStatusChangeRequest to be compared - /// Boolean - public bool Equals(StoredValueStatusChangeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - this.PaymentMethod != null && - input.PaymentMethod != null && - this.PaymentMethod.SequenceEqual(input.PaymentMethod) - ) && - ( - this.RecurringDetailReference == input.RecurringDetailReference || - (this.RecurringDetailReference != null && - this.RecurringDetailReference.Equals(input.RecurringDetailReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ShopperInteraction == input.ShopperInteraction || - this.ShopperInteraction.Equals(input.ShopperInteraction) - ) && - ( - this.ShopperReference == input.ShopperReference || - (this.ShopperReference != null && - this.ShopperReference.Equals(input.ShopperReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.RecurringDetailReference != null) - { - hashCode = (hashCode * 59) + this.RecurringDetailReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ShopperInteraction.GetHashCode(); - if (this.ShopperReference != null) - { - hashCode = (hashCode * 59) + this.ShopperReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 16.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.cs b/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.cs deleted file mode 100644 index 9a2a30a85..000000000 --- a/Adyen/Model/StoredValue/StoredValueStatusChangeResponse.cs +++ /dev/null @@ -1,252 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueStatusChangeResponse - /// - [DataContract(Name = "StoredValueStatusChangeResponse")] - public partial class StoredValueStatusChangeResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 1, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 2, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 3, - - /// - /// Enum NotEnoughBalance for value: NotEnoughBalance - /// - [EnumMember(Value = "NotEnoughBalance")] - NotEnoughBalance = 4 - - } - - - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty.. - /// currentBalance. - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values.. - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. . - /// Raw refusal reason received from the third party, where available. - public StoredValueStatusChangeResponse(string authCode = default(string), Amount currentBalance = default(Amount), string pspReference = default(string), string refusalReason = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?), string thirdPartyRefusalReason = default(string)) - { - this.AuthCode = authCode; - this.CurrentBalance = currentBalance; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.ResultCode = resultCode; - this.ThirdPartyRefusalReason = thirdPartyRefusalReason; - } - - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - /// - /// Authorisation code: * When the payment is authorised, this field holds the authorisation code for the payment. * When the payment is not authorised, this field is empty. - [DataMember(Name = "authCode", EmitDefaultValue = false)] - public string AuthCode { get; set; } - - /// - /// Gets or Sets CurrentBalance - /// - [DataMember(Name = "currentBalance", EmitDefaultValue = false)] - public Amount CurrentBalance { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Raw refusal reason received from the third party, where available - /// - /// Raw refusal reason received from the third party, where available - [DataMember(Name = "thirdPartyRefusalReason", EmitDefaultValue = false)] - public string ThirdPartyRefusalReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueStatusChangeResponse {\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" CurrentBalance: ").Append(CurrentBalance).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ThirdPartyRefusalReason: ").Append(ThirdPartyRefusalReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueStatusChangeResponse); - } - - /// - /// Returns true if StoredValueStatusChangeResponse instances are equal - /// - /// Instance of StoredValueStatusChangeResponse to be compared - /// Boolean - public bool Equals(StoredValueStatusChangeResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.CurrentBalance == input.CurrentBalance || - (this.CurrentBalance != null && - this.CurrentBalance.Equals(input.CurrentBalance)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.ThirdPartyRefusalReason == input.ThirdPartyRefusalReason || - (this.ThirdPartyRefusalReason != null && - this.ThirdPartyRefusalReason.Equals(input.ThirdPartyRefusalReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.CurrentBalance != null) - { - hashCode = (hashCode * 59) + this.CurrentBalance.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.ThirdPartyRefusalReason != null) - { - hashCode = (hashCode * 59) + this.ThirdPartyRefusalReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueVoidRequest.cs b/Adyen/Model/StoredValue/StoredValueVoidRequest.cs deleted file mode 100644 index 88cef9e14..000000000 --- a/Adyen/Model/StoredValue/StoredValueVoidRequest.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueVoidRequest - /// - [DataContract(Name = "StoredValueVoidRequest")] - public partial class StoredValueVoidRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StoredValueVoidRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The merchant account identifier, with which you want to process the transaction. (required). - /// The original pspReference of the payment to modify. (required). - /// Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters.. - /// The physical store, for which this payment is processed.. - /// The reference of the tender.. - /// The unique ID of a POS terminal.. - public StoredValueVoidRequest(string merchantAccount = default(string), string originalReference = default(string), string reference = default(string), string store = default(string), string tenderReference = default(string), string uniqueTerminalId = default(string)) - { - this.MerchantAccount = merchantAccount; - this.OriginalReference = originalReference; - this.Reference = reference; - this.Store = store; - this.TenderReference = tenderReference; - this.UniqueTerminalId = uniqueTerminalId; - } - - /// - /// The merchant account identifier, with which you want to process the transaction. - /// - /// The merchant account identifier, with which you want to process the transaction. - [DataMember(Name = "merchantAccount", IsRequired = false, EmitDefaultValue = false)] - public string MerchantAccount { get; set; } - - /// - /// The original pspReference of the payment to modify. - /// - /// The original pspReference of the payment to modify. - [DataMember(Name = "originalReference", IsRequired = false, EmitDefaultValue = false)] - public string OriginalReference { get; set; } - - /// - /// Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - /// - /// Your reference for the payment modification. This reference is visible in Customer Area and in reports. Maximum length: 80 characters. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The physical store, for which this payment is processed. - /// - /// The physical store, for which this payment is processed. - [DataMember(Name = "store", EmitDefaultValue = false)] - public string Store { get; set; } - - /// - /// The reference of the tender. - /// - /// The reference of the tender. - [DataMember(Name = "tenderReference", EmitDefaultValue = false)] - public string TenderReference { get; set; } - - /// - /// The unique ID of a POS terminal. - /// - /// The unique ID of a POS terminal. - [DataMember(Name = "uniqueTerminalId", EmitDefaultValue = false)] - public string UniqueTerminalId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueVoidRequest {\n"); - sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); - sb.Append(" OriginalReference: ").Append(OriginalReference).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" TenderReference: ").Append(TenderReference).Append("\n"); - sb.Append(" UniqueTerminalId: ").Append(UniqueTerminalId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueVoidRequest); - } - - /// - /// Returns true if StoredValueVoidRequest instances are equal - /// - /// Instance of StoredValueVoidRequest to be compared - /// Boolean - public bool Equals(StoredValueVoidRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.MerchantAccount == input.MerchantAccount || - (this.MerchantAccount != null && - this.MerchantAccount.Equals(input.MerchantAccount)) - ) && - ( - this.OriginalReference == input.OriginalReference || - (this.OriginalReference != null && - this.OriginalReference.Equals(input.OriginalReference)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.TenderReference == input.TenderReference || - (this.TenderReference != null && - this.TenderReference.Equals(input.TenderReference)) - ) && - ( - this.UniqueTerminalId == input.UniqueTerminalId || - (this.UniqueTerminalId != null && - this.UniqueTerminalId.Equals(input.UniqueTerminalId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MerchantAccount != null) - { - hashCode = (hashCode * 59) + this.MerchantAccount.GetHashCode(); - } - if (this.OriginalReference != null) - { - hashCode = (hashCode * 59) + this.OriginalReference.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.TenderReference != null) - { - hashCode = (hashCode * 59) + this.TenderReference.GetHashCode(); - } - if (this.UniqueTerminalId != null) - { - hashCode = (hashCode * 59) + this.UniqueTerminalId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Store (string) maxLength - if (this.Store != null && this.Store.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be less than 16.", new [] { "Store" }); - } - - // Store (string) minLength - if (this.Store != null && this.Store.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Store, length must be greater than 1.", new [] { "Store" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/StoredValue/StoredValueVoidResponse.cs b/Adyen/Model/StoredValue/StoredValueVoidResponse.cs deleted file mode 100644 index 6ba6237c5..000000000 --- a/Adyen/Model/StoredValue/StoredValueVoidResponse.cs +++ /dev/null @@ -1,233 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.StoredValue -{ - /// - /// StoredValueVoidResponse - /// - [DataContract(Name = "StoredValueVoidResponse")] - public partial class StoredValueVoidResponse : IEquatable, IValidatableObject - { - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [JsonConverter(typeof(StringEnumConverter))] - public enum ResultCodeEnum - { - /// - /// Enum Success for value: Success - /// - [EnumMember(Value = "Success")] - Success = 1, - - /// - /// Enum Refused for value: Refused - /// - [EnumMember(Value = "Refused")] - Refused = 2, - - /// - /// Enum Error for value: Error - /// - [EnumMember(Value = "Error")] - Error = 3, - - /// - /// Enum NotEnoughBalance for value: NotEnoughBalance - /// - [EnumMember(Value = "NotEnoughBalance")] - NotEnoughBalance = 4 - - } - - - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - /// - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. - [DataMember(Name = "resultCode", EmitDefaultValue = false)] - public ResultCodeEnum? ResultCode { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// currentBalance. - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request.. - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values.. - /// The result of the payment. Possible values: * **Success** – The operation has been completed successfully. * **Refused** – The operation was refused. The reason is given in the `refusalReason` field. * **Error** – There was an error when the operation was processed. The reason is given in the `refusalReason` field. * **NotEnoughBalance** – The amount on the payment method is lower than the amount given in the request. Only applicable to balance checks. . - /// Raw refusal reason received from the third party, where available. - public StoredValueVoidResponse(Amount currentBalance = default(Amount), string pspReference = default(string), string refusalReason = default(string), ResultCodeEnum? resultCode = default(ResultCodeEnum?), string thirdPartyRefusalReason = default(string)) - { - this.CurrentBalance = currentBalance; - this.PspReference = pspReference; - this.RefusalReason = refusalReason; - this.ResultCode = resultCode; - this.ThirdPartyRefusalReason = thirdPartyRefusalReason; - } - - /// - /// Gets or Sets CurrentBalance - /// - [DataMember(Name = "currentBalance", EmitDefaultValue = false)] - public Amount CurrentBalance { get; set; } - - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - /// - /// Adyen's 16-character string reference associated with the transaction/request. This value is globally unique; quote it when communicating with us about this request. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - /// - /// If the transaction is refused or an error occurs, this field holds Adyen's mapped reason for the refusal or a description of the error. When a transaction fails, the authorisation response includes `resultCode` and `refusalReason` values. - [DataMember(Name = "refusalReason", EmitDefaultValue = false)] - public string RefusalReason { get; set; } - - /// - /// Raw refusal reason received from the third party, where available - /// - /// Raw refusal reason received from the third party, where available - [DataMember(Name = "thirdPartyRefusalReason", EmitDefaultValue = false)] - public string ThirdPartyRefusalReason { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StoredValueVoidResponse {\n"); - sb.Append(" CurrentBalance: ").Append(CurrentBalance).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" RefusalReason: ").Append(RefusalReason).Append("\n"); - sb.Append(" ResultCode: ").Append(ResultCode).Append("\n"); - sb.Append(" ThirdPartyRefusalReason: ").Append(ThirdPartyRefusalReason).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as StoredValueVoidResponse); - } - - /// - /// Returns true if StoredValueVoidResponse instances are equal - /// - /// Instance of StoredValueVoidResponse to be compared - /// Boolean - public bool Equals(StoredValueVoidResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CurrentBalance == input.CurrentBalance || - (this.CurrentBalance != null && - this.CurrentBalance.Equals(input.CurrentBalance)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.RefusalReason == input.RefusalReason || - (this.RefusalReason != null && - this.RefusalReason.Equals(input.RefusalReason)) - ) && - ( - this.ResultCode == input.ResultCode || - this.ResultCode.Equals(input.ResultCode) - ) && - ( - this.ThirdPartyRefusalReason == input.ThirdPartyRefusalReason || - (this.ThirdPartyRefusalReason != null && - this.ThirdPartyRefusalReason.Equals(input.ThirdPartyRefusalReason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CurrentBalance != null) - { - hashCode = (hashCode * 59) + this.CurrentBalance.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - if (this.RefusalReason != null) - { - hashCode = (hashCode * 59) + this.RefusalReason.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ResultCode.GetHashCode(); - if (this.ThirdPartyRefusalReason != null) - { - hashCode = (hashCode * 59) + this.ThirdPartyRefusalReason.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/TransactionWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index ac62839d2..000000000 --- a/Adyen/Model/TransactionWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/TransactionWebhooks/Amount.cs b/Adyen/Model/TransactionWebhooks/Amount.cs deleted file mode 100644 index 27c938e95..000000000 --- a/Adyen/Model/TransactionWebhooks/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.cs b/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.cs deleted file mode 100644 index 79ef5c400..000000000 --- a/Adyen/Model/TransactionWebhooks/BalancePlatformNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// BalancePlatformNotificationResponse - /// - [DataContract(Name = "BalancePlatformNotificationResponse")] - public partial class BalancePlatformNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks).. - public BalancePlatformNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks/#accept-webhooks). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalancePlatformNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalancePlatformNotificationResponse); - } - - /// - /// Returns true if BalancePlatformNotificationResponse instances are equal - /// - /// Instance of BalancePlatformNotificationResponse to be compared - /// Boolean - public bool Equals(BalancePlatformNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/BankCategoryData.cs b/Adyen/Model/TransactionWebhooks/BankCategoryData.cs deleted file mode 100644 index 81b2565d2..000000000 --- a/Adyen/Model/TransactionWebhooks/BankCategoryData.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// BankCategoryData - /// - [DataContract(Name = "BankCategoryData")] - public partial class BankCategoryData : IEquatable, IValidatableObject - { - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [JsonConverter(typeof(StringEnumConverter))] - public enum PriorityEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [DataMember(Name = "priority", EmitDefaultValue = false)] - public PriorityEnum? Priority { get; set; } - /// - /// **bank** - /// - /// **bank** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1 - - } - - - /// - /// **bank** - /// - /// **bank** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers within the United States and in [SEPA locations](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN).. - /// **bank** (default to TypeEnum.Bank). - public BankCategoryData(PriorityEnum? priority = default(PriorityEnum?), TypeEnum? type = TypeEnum.Bank) - { - this.Priority = priority; - this.Type = type; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankCategoryData {\n"); - sb.Append(" Priority: ").Append(Priority).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankCategoryData); - } - - /// - /// Returns true if BankCategoryData instances are equal - /// - /// Instance of BankCategoryData to be compared - /// Boolean - public bool Equals(BankCategoryData input) - { - if (input == null) - { - return false; - } - return - ( - this.Priority == input.Priority || - this.Priority.Equals(input.Priority) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Priority.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/InternalCategoryData.cs b/Adyen/Model/TransactionWebhooks/InternalCategoryData.cs deleted file mode 100644 index 374722f58..000000000 --- a/Adyen/Model/TransactionWebhooks/InternalCategoryData.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// InternalCategoryData - /// - [DataContract(Name = "InternalCategoryData")] - public partial class InternalCategoryData : IEquatable, IValidatableObject - { - /// - /// **internal** - /// - /// **internal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 1 - - } - - - /// - /// **internal** - /// - /// **internal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The capture's merchant reference included in the transfer.. - /// The capture reference included in the transfer.. - /// **internal** (default to TypeEnum.Internal). - public InternalCategoryData(string modificationMerchantReference = default(string), string modificationPspReference = default(string), TypeEnum? type = TypeEnum.Internal) - { - this.ModificationMerchantReference = modificationMerchantReference; - this.ModificationPspReference = modificationPspReference; - this.Type = type; - } - - /// - /// The capture's merchant reference included in the transfer. - /// - /// The capture's merchant reference included in the transfer. - [DataMember(Name = "modificationMerchantReference", EmitDefaultValue = false)] - public string ModificationMerchantReference { get; set; } - - /// - /// The capture reference included in the transfer. - /// - /// The capture reference included in the transfer. - [DataMember(Name = "modificationPspReference", EmitDefaultValue = false)] - public string ModificationPspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InternalCategoryData {\n"); - sb.Append(" ModificationMerchantReference: ").Append(ModificationMerchantReference).Append("\n"); - sb.Append(" ModificationPspReference: ").Append(ModificationPspReference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InternalCategoryData); - } - - /// - /// Returns true if InternalCategoryData instances are equal - /// - /// Instance of InternalCategoryData to be compared - /// Boolean - public bool Equals(InternalCategoryData input) - { - if (input == null) - { - return false; - } - return - ( - this.ModificationMerchantReference == input.ModificationMerchantReference || - (this.ModificationMerchantReference != null && - this.ModificationMerchantReference.Equals(input.ModificationMerchantReference)) - ) && - ( - this.ModificationPspReference == input.ModificationPspReference || - (this.ModificationPspReference != null && - this.ModificationPspReference.Equals(input.ModificationPspReference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ModificationMerchantReference != null) - { - hashCode = (hashCode * 59) + this.ModificationMerchantReference.GetHashCode(); - } - if (this.ModificationPspReference != null) - { - hashCode = (hashCode * 59) + this.ModificationPspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/IssuedCard.cs b/Adyen/Model/TransactionWebhooks/IssuedCard.cs deleted file mode 100644 index 7900f7bda..000000000 --- a/Adyen/Model/TransactionWebhooks/IssuedCard.cs +++ /dev/null @@ -1,391 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// IssuedCard - /// - [DataContract(Name = "IssuedCard")] - public partial class IssuedCard : IEquatable, IValidatableObject - { - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - [JsonConverter(typeof(StringEnumConverter))] - public enum PanEntryModeEnum - { - /// - /// Enum Chip for value: chip - /// - [EnumMember(Value = "chip")] - Chip = 1, - - /// - /// Enum Cof for value: cof - /// - [EnumMember(Value = "cof")] - Cof = 2, - - /// - /// Enum Contactless for value: contactless - /// - [EnumMember(Value = "contactless")] - Contactless = 3, - - /// - /// Enum Ecommerce for value: ecommerce - /// - [EnumMember(Value = "ecommerce")] - Ecommerce = 4, - - /// - /// Enum Magstripe for value: magstripe - /// - [EnumMember(Value = "magstripe")] - Magstripe = 5, - - /// - /// Enum Manual for value: manual - /// - [EnumMember(Value = "manual")] - Manual = 6, - - /// - /// Enum Token for value: token - /// - [EnumMember(Value = "token")] - Token = 7 - - } - - - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - [DataMember(Name = "panEntryMode", EmitDefaultValue = false)] - public PanEntryModeEnum? PanEntryMode { get; set; } - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - [JsonConverter(typeof(StringEnumConverter))] - public enum ProcessingTypeEnum - { - /// - /// Enum AtmWithdraw for value: atmWithdraw - /// - [EnumMember(Value = "atmWithdraw")] - AtmWithdraw = 1, - - /// - /// Enum BalanceInquiry for value: balanceInquiry - /// - [EnumMember(Value = "balanceInquiry")] - BalanceInquiry = 2, - - /// - /// Enum Ecommerce for value: ecommerce - /// - [EnumMember(Value = "ecommerce")] - Ecommerce = 3, - - /// - /// Enum Moto for value: moto - /// - [EnumMember(Value = "moto")] - Moto = 4, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 5, - - /// - /// Enum PurchaseWithCashback for value: purchaseWithCashback - /// - [EnumMember(Value = "purchaseWithCashback")] - PurchaseWithCashback = 6, - - /// - /// Enum Recurring for value: recurring - /// - [EnumMember(Value = "recurring")] - Recurring = 7, - - /// - /// Enum Token for value: token - /// - [EnumMember(Value = "token")] - Token = 8 - - } - - - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - [DataMember(Name = "processingType", EmitDefaultValue = false)] - public ProcessingTypeEnum? ProcessingType { get; set; } - /// - /// **issuedCard** - /// - /// **issuedCard** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum IssuedCard for value: issuedCard - /// - [EnumMember(Value = "issuedCard")] - IssuedCard = 1 - - } - - - /// - /// **issuedCard** - /// - /// **issuedCard** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation**. - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**.. - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments.. - /// relayedAuthorisationData. - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments.. - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme.. - /// threeDSecure. - /// **issuedCard** (default to TypeEnum.IssuedCard). - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information.. - public IssuedCard(string authorisationType = default(string), PanEntryModeEnum? panEntryMode = default(PanEntryModeEnum?), ProcessingTypeEnum? processingType = default(ProcessingTypeEnum?), RelayedAuthorisationData relayedAuthorisationData = default(RelayedAuthorisationData), string schemeTraceId = default(string), string schemeUniqueTransactionId = default(string), ThreeDSecure threeDSecure = default(ThreeDSecure), TypeEnum? type = TypeEnum.IssuedCard, List validationFacts = default(List)) - { - this.AuthorisationType = authorisationType; - this.PanEntryMode = panEntryMode; - this.ProcessingType = processingType; - this.RelayedAuthorisationData = relayedAuthorisationData; - this.SchemeTraceId = schemeTraceId; - this.SchemeUniqueTransactionId = schemeUniqueTransactionId; - this.ThreeDSecure = threeDSecure; - this.Type = type; - this.ValidationFacts = validationFacts; - } - - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** - [DataMember(Name = "authorisationType", EmitDefaultValue = false)] - public string AuthorisationType { get; set; } - - /// - /// Gets or Sets RelayedAuthorisationData - /// - [DataMember(Name = "relayedAuthorisationData", EmitDefaultValue = false)] - public RelayedAuthorisationData RelayedAuthorisationData { get; set; } - - /// - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. - /// - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. - [DataMember(Name = "schemeTraceId", EmitDefaultValue = false)] - public string SchemeTraceId { get; set; } - - /// - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. - /// - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. - [DataMember(Name = "schemeUniqueTransactionId", EmitDefaultValue = false)] - public string SchemeUniqueTransactionId { get; set; } - - /// - /// Gets or Sets ThreeDSecure - /// - [DataMember(Name = "threeDSecure", EmitDefaultValue = false)] - public ThreeDSecure ThreeDSecure { get; set; } - - /// - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. - /// - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. - [DataMember(Name = "validationFacts", EmitDefaultValue = false)] - public List ValidationFacts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IssuedCard {\n"); - sb.Append(" AuthorisationType: ").Append(AuthorisationType).Append("\n"); - sb.Append(" PanEntryMode: ").Append(PanEntryMode).Append("\n"); - sb.Append(" ProcessingType: ").Append(ProcessingType).Append("\n"); - sb.Append(" RelayedAuthorisationData: ").Append(RelayedAuthorisationData).Append("\n"); - sb.Append(" SchemeTraceId: ").Append(SchemeTraceId).Append("\n"); - sb.Append(" SchemeUniqueTransactionId: ").Append(SchemeUniqueTransactionId).Append("\n"); - sb.Append(" ThreeDSecure: ").Append(ThreeDSecure).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" ValidationFacts: ").Append(ValidationFacts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IssuedCard); - } - - /// - /// Returns true if IssuedCard instances are equal - /// - /// Instance of IssuedCard to be compared - /// Boolean - public bool Equals(IssuedCard input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthorisationType == input.AuthorisationType || - (this.AuthorisationType != null && - this.AuthorisationType.Equals(input.AuthorisationType)) - ) && - ( - this.PanEntryMode == input.PanEntryMode || - this.PanEntryMode.Equals(input.PanEntryMode) - ) && - ( - this.ProcessingType == input.ProcessingType || - this.ProcessingType.Equals(input.ProcessingType) - ) && - ( - this.RelayedAuthorisationData == input.RelayedAuthorisationData || - (this.RelayedAuthorisationData != null && - this.RelayedAuthorisationData.Equals(input.RelayedAuthorisationData)) - ) && - ( - this.SchemeTraceId == input.SchemeTraceId || - (this.SchemeTraceId != null && - this.SchemeTraceId.Equals(input.SchemeTraceId)) - ) && - ( - this.SchemeUniqueTransactionId == input.SchemeUniqueTransactionId || - (this.SchemeUniqueTransactionId != null && - this.SchemeUniqueTransactionId.Equals(input.SchemeUniqueTransactionId)) - ) && - ( - this.ThreeDSecure == input.ThreeDSecure || - (this.ThreeDSecure != null && - this.ThreeDSecure.Equals(input.ThreeDSecure)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.ValidationFacts == input.ValidationFacts || - this.ValidationFacts != null && - input.ValidationFacts != null && - this.ValidationFacts.SequenceEqual(input.ValidationFacts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthorisationType != null) - { - hashCode = (hashCode * 59) + this.AuthorisationType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PanEntryMode.GetHashCode(); - hashCode = (hashCode * 59) + this.ProcessingType.GetHashCode(); - if (this.RelayedAuthorisationData != null) - { - hashCode = (hashCode * 59) + this.RelayedAuthorisationData.GetHashCode(); - } - if (this.SchemeTraceId != null) - { - hashCode = (hashCode * 59) + this.SchemeTraceId.GetHashCode(); - } - if (this.SchemeUniqueTransactionId != null) - { - hashCode = (hashCode * 59) + this.SchemeUniqueTransactionId.GetHashCode(); - } - if (this.ThreeDSecure != null) - { - hashCode = (hashCode * 59) + this.ThreeDSecure.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.ValidationFacts != null) - { - hashCode = (hashCode * 59) + this.ValidationFacts.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/PaymentInstrument.cs b/Adyen/Model/TransactionWebhooks/PaymentInstrument.cs deleted file mode 100644 index a90a2d934..000000000 --- a/Adyen/Model/TransactionWebhooks/PaymentInstrument.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// PaymentInstrument - /// - [DataContract(Name = "PaymentInstrument")] - public partial class PaymentInstrument : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The reference for the resource.. - /// The type of wallet that the network token is associated with.. - public PaymentInstrument(string description = default(string), string id = default(string), string reference = default(string), string tokenType = default(string)) - { - this.Description = description; - this.Id = id; - this.Reference = reference; - this.TokenType = tokenType; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The type of wallet that the network token is associated with. - /// - /// The type of wallet that the network token is associated with. - [DataMember(Name = "tokenType", EmitDefaultValue = false)] - public string TokenType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrument {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" TokenType: ").Append(TokenType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrument); - } - - /// - /// Returns true if PaymentInstrument instances are equal - /// - /// Instance of PaymentInstrument to be compared - /// Boolean - public bool Equals(PaymentInstrument input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.TokenType == input.TokenType || - (this.TokenType != null && - this.TokenType.Equals(input.TokenType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.TokenType != null) - { - hashCode = (hashCode * 59) + this.TokenType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/PlatformPayment.cs b/Adyen/Model/TransactionWebhooks/PlatformPayment.cs deleted file mode 100644 index dccf20fa1..000000000 --- a/Adyen/Model/TransactionWebhooks/PlatformPayment.cs +++ /dev/null @@ -1,342 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// PlatformPayment - /// - [DataContract(Name = "PlatformPayment")] - public partial class PlatformPayment : IEquatable, IValidatableObject - { - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - [JsonConverter(typeof(StringEnumConverter))] - public enum PlatformPaymentTypeEnum - { - /// - /// Enum AcquiringFees for value: AcquiringFees - /// - [EnumMember(Value = "AcquiringFees")] - AcquiringFees = 1, - - /// - /// Enum AdyenCommission for value: AdyenCommission - /// - [EnumMember(Value = "AdyenCommission")] - AdyenCommission = 2, - - /// - /// Enum AdyenFees for value: AdyenFees - /// - [EnumMember(Value = "AdyenFees")] - AdyenFees = 3, - - /// - /// Enum AdyenMarkup for value: AdyenMarkup - /// - [EnumMember(Value = "AdyenMarkup")] - AdyenMarkup = 4, - - /// - /// Enum BalanceAccount for value: BalanceAccount - /// - [EnumMember(Value = "BalanceAccount")] - BalanceAccount = 5, - - /// - /// Enum ChargebackRemainder for value: ChargebackRemainder - /// - [EnumMember(Value = "ChargebackRemainder")] - ChargebackRemainder = 6, - - /// - /// Enum Commission for value: Commission - /// - [EnumMember(Value = "Commission")] - Commission = 7, - - /// - /// Enum DCCPlatformCommission for value: DCCPlatformCommission - /// - [EnumMember(Value = "DCCPlatformCommission")] - DCCPlatformCommission = 8, - - /// - /// Enum Default for value: Default - /// - [EnumMember(Value = "Default")] - Default = 9, - - /// - /// Enum Interchange for value: Interchange - /// - [EnumMember(Value = "Interchange")] - Interchange = 10, - - /// - /// Enum PaymentFee for value: PaymentFee - /// - [EnumMember(Value = "PaymentFee")] - PaymentFee = 11, - - /// - /// Enum Remainder for value: Remainder - /// - [EnumMember(Value = "Remainder")] - Remainder = 12, - - /// - /// Enum SchemeFee for value: SchemeFee - /// - [EnumMember(Value = "SchemeFee")] - SchemeFee = 13, - - /// - /// Enum Surcharge for value: Surcharge - /// - [EnumMember(Value = "Surcharge")] - Surcharge = 14, - - /// - /// Enum Tip for value: Tip - /// - [EnumMember(Value = "Tip")] - Tip = 15, - - /// - /// Enum TopUp for value: TopUp - /// - [EnumMember(Value = "TopUp")] - TopUp = 16, - - /// - /// Enum VAT for value: VAT - /// - [EnumMember(Value = "VAT")] - VAT = 17 - - } - - - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - [DataMember(Name = "platformPaymentType", EmitDefaultValue = false)] - public PlatformPaymentTypeEnum? PlatformPaymentType { get; set; } - /// - /// **platformPayment** - /// - /// **platformPayment** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 1 - - } - - - /// - /// **platformPayment** - /// - /// **platformPayment** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The capture's merchant reference included in the transfer.. - /// The capture reference included in the transfer.. - /// The payment's merchant reference included in the transfer.. - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax.. - /// The payment reference included in the transfer.. - /// **platformPayment** (default to TypeEnum.PlatformPayment). - public PlatformPayment(string modificationMerchantReference = default(string), string modificationPspReference = default(string), string paymentMerchantReference = default(string), PlatformPaymentTypeEnum? platformPaymentType = default(PlatformPaymentTypeEnum?), string pspPaymentReference = default(string), TypeEnum? type = TypeEnum.PlatformPayment) - { - this.ModificationMerchantReference = modificationMerchantReference; - this.ModificationPspReference = modificationPspReference; - this.PaymentMerchantReference = paymentMerchantReference; - this.PlatformPaymentType = platformPaymentType; - this.PspPaymentReference = pspPaymentReference; - this.Type = type; - } - - /// - /// The capture's merchant reference included in the transfer. - /// - /// The capture's merchant reference included in the transfer. - [DataMember(Name = "modificationMerchantReference", EmitDefaultValue = false)] - public string ModificationMerchantReference { get; set; } - - /// - /// The capture reference included in the transfer. - /// - /// The capture reference included in the transfer. - [DataMember(Name = "modificationPspReference", EmitDefaultValue = false)] - public string ModificationPspReference { get; set; } - - /// - /// The payment's merchant reference included in the transfer. - /// - /// The payment's merchant reference included in the transfer. - [DataMember(Name = "paymentMerchantReference", EmitDefaultValue = false)] - public string PaymentMerchantReference { get; set; } - - /// - /// The payment reference included in the transfer. - /// - /// The payment reference included in the transfer. - [DataMember(Name = "pspPaymentReference", EmitDefaultValue = false)] - public string PspPaymentReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PlatformPayment {\n"); - sb.Append(" ModificationMerchantReference: ").Append(ModificationMerchantReference).Append("\n"); - sb.Append(" ModificationPspReference: ").Append(ModificationPspReference).Append("\n"); - sb.Append(" PaymentMerchantReference: ").Append(PaymentMerchantReference).Append("\n"); - sb.Append(" PlatformPaymentType: ").Append(PlatformPaymentType).Append("\n"); - sb.Append(" PspPaymentReference: ").Append(PspPaymentReference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlatformPayment); - } - - /// - /// Returns true if PlatformPayment instances are equal - /// - /// Instance of PlatformPayment to be compared - /// Boolean - public bool Equals(PlatformPayment input) - { - if (input == null) - { - return false; - } - return - ( - this.ModificationMerchantReference == input.ModificationMerchantReference || - (this.ModificationMerchantReference != null && - this.ModificationMerchantReference.Equals(input.ModificationMerchantReference)) - ) && - ( - this.ModificationPspReference == input.ModificationPspReference || - (this.ModificationPspReference != null && - this.ModificationPspReference.Equals(input.ModificationPspReference)) - ) && - ( - this.PaymentMerchantReference == input.PaymentMerchantReference || - (this.PaymentMerchantReference != null && - this.PaymentMerchantReference.Equals(input.PaymentMerchantReference)) - ) && - ( - this.PlatformPaymentType == input.PlatformPaymentType || - this.PlatformPaymentType.Equals(input.PlatformPaymentType) - ) && - ( - this.PspPaymentReference == input.PspPaymentReference || - (this.PspPaymentReference != null && - this.PspPaymentReference.Equals(input.PspPaymentReference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ModificationMerchantReference != null) - { - hashCode = (hashCode * 59) + this.ModificationMerchantReference.GetHashCode(); - } - if (this.ModificationPspReference != null) - { - hashCode = (hashCode * 59) + this.ModificationPspReference.GetHashCode(); - } - if (this.PaymentMerchantReference != null) - { - hashCode = (hashCode * 59) + this.PaymentMerchantReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlatformPaymentType.GetHashCode(); - if (this.PspPaymentReference != null) - { - hashCode = (hashCode * 59) + this.PspPaymentReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/RelayedAuthorisationData.cs b/Adyen/Model/TransactionWebhooks/RelayedAuthorisationData.cs deleted file mode 100644 index c67a7e55d..000000000 --- a/Adyen/Model/TransactionWebhooks/RelayedAuthorisationData.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// RelayedAuthorisationData - /// - [DataContract(Name = "RelayedAuthorisationData")] - public partial class RelayedAuthorisationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`.. - /// Your reference for the relayed authorisation data.. - public RelayedAuthorisationData(Dictionary metadata = default(Dictionary), string reference = default(string)) - { - this.Metadata = metadata; - this.Reference = reference; - } - - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Your reference for the relayed authorisation data. - /// - /// Your reference for the relayed authorisation data. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RelayedAuthorisationData {\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RelayedAuthorisationData); - } - - /// - /// Returns true if RelayedAuthorisationData instances are equal - /// - /// Instance of RelayedAuthorisationData to be compared - /// Boolean - public bool Equals(RelayedAuthorisationData input) - { - if (input == null) - { - return false; - } - return - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/Resource.cs b/Adyen/Model/TransactionWebhooks/Resource.cs deleted file mode 100644 index 4c51d2dfa..000000000 --- a/Adyen/Model/TransactionWebhooks/Resource.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// Resource - /// - [DataContract(Name = "Resource")] - public partial class Resource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**.. - /// The ID of the resource.. - public Resource(string balancePlatform = default(string), DateTime creationDate = default(DateTime), string id = default(string)) - { - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Id = id; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Resource {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Resource); - } - - /// - /// Returns true if Resource instances are equal - /// - /// Instance of Resource to be compared - /// Boolean - public bool Equals(Resource input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/ResourceReference.cs b/Adyen/Model/TransactionWebhooks/ResourceReference.cs deleted file mode 100644 index abd2c9734..000000000 --- a/Adyen/Model/TransactionWebhooks/ResourceReference.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// ResourceReference - /// - [DataContract(Name = "ResourceReference")] - public partial class ResourceReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The reference for the resource.. - public ResourceReference(string description = default(string), string id = default(string), string reference = default(string)) - { - this.Description = description; - this.Id = id; - this.Reference = reference; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResourceReference {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResourceReference); - } - - /// - /// Returns true if ResourceReference instances are equal - /// - /// Instance of ResourceReference to be compared - /// Boolean - public bool Equals(ResourceReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/ThreeDSecure.cs b/Adyen/Model/TransactionWebhooks/ThreeDSecure.cs deleted file mode 100644 index 71b9254bb..000000000 --- a/Adyen/Model/TransactionWebhooks/ThreeDSecure.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// ThreeDSecure - /// - [DataContract(Name = "ThreeDSecure")] - public partial class ThreeDSecure : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The transaction identifier for the Access Control Server. - public ThreeDSecure(string acsTransactionId = default(string)) - { - this.AcsTransactionId = acsTransactionId; - } - - /// - /// The transaction identifier for the Access Control Server - /// - /// The transaction identifier for the Access Control Server - [DataMember(Name = "acsTransactionId", EmitDefaultValue = false)] - public string AcsTransactionId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThreeDSecure {\n"); - sb.Append(" AcsTransactionId: ").Append(AcsTransactionId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThreeDSecure); - } - - /// - /// Returns true if ThreeDSecure instances are equal - /// - /// Instance of ThreeDSecure to be compared - /// Boolean - public bool Equals(ThreeDSecure input) - { - if (input == null) - { - return false; - } - return - ( - this.AcsTransactionId == input.AcsTransactionId || - (this.AcsTransactionId != null && - this.AcsTransactionId.Equals(input.AcsTransactionId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcsTransactionId != null) - { - hashCode = (hashCode * 59) + this.AcsTransactionId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/Transaction.cs b/Adyen/Model/TransactionWebhooks/Transaction.cs deleted file mode 100644 index 9e0614204..000000000 --- a/Adyen/Model/TransactionWebhooks/Transaction.cs +++ /dev/null @@ -1,374 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// Transaction - /// - [DataContract(Name = "Transaction")] - public partial class Transaction : IEquatable, IValidatableObject - { - /// - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - /// - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2 - - } - - - /// - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - /// - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Transaction() { } - /// - /// Initializes a new instance of the class. - /// - /// accountHolder (required). - /// amount (required). - /// balanceAccount (required). - /// The unique identifier of the balance platform. (required). - /// The date the transaction was booked into the balance account. (required). - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**.. - /// The `description` from the `/transfers` request.. - /// The unique identifier of the transaction. (required). - /// paymentInstrument. - /// The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender.. - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. (required). - /// transfer. - /// The date the transfer amount becomes available in the balance account. (required). - public Transaction(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), string balancePlatform = default(string), DateTime bookingDate = default(DateTime), DateTime creationDate = default(DateTime), string description = default(string), string id = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument), string referenceForBeneficiary = default(string), StatusEnum status = default(StatusEnum), TransferView transfer = default(TransferView), DateTime valueDate = default(DateTime)) - { - this.AccountHolder = accountHolder; - this.Amount = amount; - this.BalanceAccount = balanceAccount; - this.BalancePlatform = balancePlatform; - this.BookingDate = bookingDate; - this.Id = id; - this.Status = status; - this.ValueDate = valueDate; - this.CreationDate = creationDate; - this.Description = description; - this.PaymentInstrument = paymentInstrument; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Transfer = transfer; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", IsRequired = false, EmitDefaultValue = false)] - public ResourceReference AccountHolder { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets BalanceAccount - /// - [DataMember(Name = "balanceAccount", IsRequired = false, EmitDefaultValue = false)] - public ResourceReference BalanceAccount { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", IsRequired = false, EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date the transaction was booked into the balance account. - /// - /// The date the transaction was booked into the balance account. - [DataMember(Name = "bookingDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime BookingDate { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2025-03-19T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The `description` from the `/transfers` request. - /// - /// The `description` from the `/transfers` request. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the transaction. - /// - /// The unique identifier of the transaction. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets PaymentInstrument - /// - [DataMember(Name = "paymentInstrument", EmitDefaultValue = false)] - public PaymentInstrument PaymentInstrument { get; set; } - - /// - /// The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. - /// - /// The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Transfer - /// - [DataMember(Name = "transfer", EmitDefaultValue = false)] - public TransferView Transfer { get; set; } - - /// - /// The date the transfer amount becomes available in the balance account. - /// - /// The date the transfer amount becomes available in the balance account. - [DataMember(Name = "valueDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime ValueDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Transaction {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BalanceAccount: ").Append(BalanceAccount).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" BookingDate: ").Append(BookingDate).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrument: ").Append(PaymentInstrument).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Transfer: ").Append(Transfer).Append("\n"); - sb.Append(" ValueDate: ").Append(ValueDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Transaction); - } - - /// - /// Returns true if Transaction instances are equal - /// - /// Instance of Transaction to be compared - /// Boolean - public bool Equals(Transaction input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BalanceAccount == input.BalanceAccount || - (this.BalanceAccount != null && - this.BalanceAccount.Equals(input.BalanceAccount)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.BookingDate == input.BookingDate || - (this.BookingDate != null && - this.BookingDate.Equals(input.BookingDate)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrument == input.PaymentInstrument || - (this.PaymentInstrument != null && - this.PaymentInstrument.Equals(input.PaymentInstrument)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Transfer == input.Transfer || - (this.Transfer != null && - this.Transfer.Equals(input.Transfer)) - ) && - ( - this.ValueDate == input.ValueDate || - (this.ValueDate != null && - this.ValueDate.Equals(input.ValueDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BalanceAccount != null) - { - hashCode = (hashCode * 59) + this.BalanceAccount.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.BookingDate != null) - { - hashCode = (hashCode * 59) + this.BookingDate.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrument != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrument.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Transfer != null) - { - hashCode = (hashCode * 59) + this.Transfer.GetHashCode(); - } - if (this.ValueDate != null) - { - hashCode = (hashCode * 59) + this.ValueDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.cs b/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.cs deleted file mode 100644 index 767484e66..000000000 --- a/Adyen/Model/TransactionWebhooks/TransactionNotificationRequestV4.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// TransactionNotificationRequestV4 - /// - [DataContract(Name = "TransactionNotificationRequestV4")] - public partial class TransactionNotificationRequestV4 : IEquatable, IValidatableObject - { - /// - /// Type of the webhook. - /// - /// Type of the webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BalancePlatformTransactionCreated for value: balancePlatform.transaction.created - /// - [EnumMember(Value = "balancePlatform.transaction.created")] - BalancePlatformTransactionCreated = 1 - - } - - - /// - /// Type of the webhook. - /// - /// Type of the webhook. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransactionNotificationRequestV4() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// Type of the webhook.. - public TransactionNotificationRequestV4(Transaction data = default(Transaction), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum? type = default(TypeEnum?)) - { - this.Data = data; - this.Environment = environment; - this.Timestamp = timestamp; - this.Type = type; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public Transaction Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionNotificationRequestV4 {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionNotificationRequestV4); - } - - /// - /// Returns true if TransactionNotificationRequestV4 instances are equal - /// - /// Instance of TransactionNotificationRequestV4 to be compared - /// Boolean - public bool Equals(TransactionNotificationRequestV4 input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/TransferNotificationValidationFact.cs b/Adyen/Model/TransactionWebhooks/TransferNotificationValidationFact.cs deleted file mode 100644 index 6a92d8d24..000000000 --- a/Adyen/Model/TransactionWebhooks/TransferNotificationValidationFact.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// TransferNotificationValidationFact - /// - [DataContract(Name = "TransferNotificationValidationFact")] - public partial class TransferNotificationValidationFact : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The evaluation result of the validation fact.. - /// The type of the validation fact.. - public TransferNotificationValidationFact(string result = default(string), string type = default(string)) - { - this.Result = result; - this.Type = type; - } - - /// - /// The evaluation result of the validation fact. - /// - /// The evaluation result of the validation fact. - [DataMember(Name = "result", EmitDefaultValue = false)] - public string Result { get; set; } - - /// - /// The type of the validation fact. - /// - /// The type of the validation fact. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferNotificationValidationFact {\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferNotificationValidationFact); - } - - /// - /// Returns true if TransferNotificationValidationFact instances are equal - /// - /// Instance of TransferNotificationValidationFact to be compared - /// Boolean - public bool Equals(TransferNotificationValidationFact input) - { - if (input == null) - { - return false; - } - return - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Result != null) - { - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/TransferView.cs b/Adyen/Model/TransactionWebhooks/TransferView.cs deleted file mode 100644 index 4ff6ea119..000000000 --- a/Adyen/Model/TransactionWebhooks/TransferView.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// TransferView - /// - [DataContract(Name = "TransferView")] - public partial class TransferView : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferView() { } - /// - /// Initializes a new instance of the class. - /// - /// categoryData. - /// The ID of the resource.. - /// The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. (required). - public TransferView(TransferViewCategoryData categoryData = default(TransferViewCategoryData), string id = default(string), string reference = default(string)) - { - this.Reference = reference; - this.CategoryData = categoryData; - this.Id = id; - } - - /// - /// Gets or Sets CategoryData - /// - [DataMember(Name = "categoryData", EmitDefaultValue = false)] - public TransferViewCategoryData CategoryData { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. - /// - /// The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferView {\n"); - sb.Append(" CategoryData: ").Append(CategoryData).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferView); - } - - /// - /// Returns true if TransferView instances are equal - /// - /// Instance of TransferView to be compared - /// Boolean - public bool Equals(TransferView input) - { - if (input == null) - { - return false; - } - return - ( - this.CategoryData == input.CategoryData || - (this.CategoryData != null && - this.CategoryData.Equals(input.CategoryData)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CategoryData != null) - { - hashCode = (hashCode * 59) + this.CategoryData.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransactionWebhooks/TransferViewCategoryData.cs b/Adyen/Model/TransactionWebhooks/TransferViewCategoryData.cs deleted file mode 100644 index 51149e611..000000000 --- a/Adyen/Model/TransactionWebhooks/TransferViewCategoryData.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* -* Transaction webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.TransactionWebhooks -{ - /// - /// The relevant data according to the transfer category. - /// - [JsonConverter(typeof(TransferViewCategoryDataJsonConverter))] - [DataContract(Name = "TransferView_categoryData")] - public partial class TransferViewCategoryData : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BankCategoryData. - public TransferViewCategoryData(BankCategoryData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InternalCategoryData. - public TransferViewCategoryData(InternalCategoryData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IssuedCard. - public TransferViewCategoryData(IssuedCard actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PlatformPayment. - public TransferViewCategoryData(PlatformPayment actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(BankCategoryData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(InternalCategoryData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IssuedCard)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PlatformPayment)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment"); - } - } - } - - /// - /// Get the actual instance of `BankCategoryData`. If the actual instance is not `BankCategoryData`, - /// the InvalidClassException will be thrown - /// - /// An instance of BankCategoryData - public BankCategoryData GetBankCategoryData() - { - return (BankCategoryData)this.ActualInstance; - } - - /// - /// Get the actual instance of `InternalCategoryData`. If the actual instance is not `InternalCategoryData`, - /// the InvalidClassException will be thrown - /// - /// An instance of InternalCategoryData - public InternalCategoryData GetInternalCategoryData() - { - return (InternalCategoryData)this.ActualInstance; - } - - /// - /// Get the actual instance of `IssuedCard`. If the actual instance is not `IssuedCard`, - /// the InvalidClassException will be thrown - /// - /// An instance of IssuedCard - public IssuedCard GetIssuedCard() - { - return (IssuedCard)this.ActualInstance; - } - - /// - /// Get the actual instance of `PlatformPayment`. If the actual instance is not `PlatformPayment`, - /// the InvalidClassException will be thrown - /// - /// An instance of PlatformPayment - public PlatformPayment GetPlatformPayment() - { - return (PlatformPayment)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferViewCategoryData {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferViewCategoryData.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferViewCategoryData - /// - /// JSON string - /// An instance of TransferViewCategoryData - public static TransferViewCategoryData FromJson(string jsonString) - { - TransferViewCategoryData newTransferViewCategoryData = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferViewCategoryData; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the BankCategoryData type enums - if (ContainsValue(type)) - { - newTransferViewCategoryData = new TransferViewCategoryData(JsonConvert.DeserializeObject(jsonString, TransferViewCategoryData.SerializerSettings)); - matchedTypes.Add("BankCategoryData"); - match++; - } - // Check if the jsonString type enum matches the InternalCategoryData type enums - if (ContainsValue(type)) - { - newTransferViewCategoryData = new TransferViewCategoryData(JsonConvert.DeserializeObject(jsonString, TransferViewCategoryData.SerializerSettings)); - matchedTypes.Add("InternalCategoryData"); - match++; - } - // Check if the jsonString type enum matches the IssuedCard type enums - if (ContainsValue(type)) - { - newTransferViewCategoryData = new TransferViewCategoryData(JsonConvert.DeserializeObject(jsonString, TransferViewCategoryData.SerializerSettings)); - matchedTypes.Add("IssuedCard"); - match++; - } - // Check if the jsonString type enum matches the PlatformPayment type enums - if (ContainsValue(type)) - { - newTransferViewCategoryData = new TransferViewCategoryData(JsonConvert.DeserializeObject(jsonString, TransferViewCategoryData.SerializerSettings)); - matchedTypes.Add("PlatformPayment"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferViewCategoryData; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferViewCategoryData); - } - - /// - /// Returns true if TransferViewCategoryData instances are equal - /// - /// Instance of TransferViewCategoryData to be compared - /// Boolean - public bool Equals(TransferViewCategoryData input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferViewCategoryData - /// - public class TransferViewCategoryDataJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferViewCategoryData).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferViewCategoryData.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.cs deleted file mode 100644 index ffd556e9b..000000000 --- a/Adyen/Model/TransferWebhooks/AULocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// AULocalAccountIdentification - /// - [DataContract(Name = "AULocalAccountIdentification")] - public partial class AULocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **auLocal** - /// - /// **auLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AuLocal for value: auLocal - /// - [EnumMember(Value = "auLocal")] - AuLocal = 1 - - } - - - /// - /// **auLocal** - /// - /// **auLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AULocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. (required). - /// **auLocal** (required) (default to TypeEnum.AuLocal). - public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), TypeEnum type = TypeEnum.AuLocal) - { - this.AccountNumber = accountNumber; - this.BsbCode = bsbCode; - this.Type = type; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. - /// - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. - [DataMember(Name = "bsbCode", IsRequired = false, EmitDefaultValue = false)] - public string BsbCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AULocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BsbCode: ").Append(BsbCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AULocalAccountIdentification); - } - - /// - /// Returns true if AULocalAccountIdentification instances are equal - /// - /// Instance of AULocalAccountIdentification to be compared - /// Boolean - public bool Equals(AULocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BsbCode == input.BsbCode || - (this.BsbCode != null && - this.BsbCode.Equals(input.BsbCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BsbCode != null) - { - hashCode = (hashCode * 59) + this.BsbCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 9.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 5.", new [] { "AccountNumber" }); - } - - // BsbCode (string) maxLength - if (this.BsbCode != null && this.BsbCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BsbCode, length must be less than 6.", new [] { "BsbCode" }); - } - - // BsbCode (string) minLength - if (this.BsbCode != null && this.BsbCode.Length < 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BsbCode, length must be greater than 6.", new [] { "BsbCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/AbstractOpenAPISchema.cs b/Adyen/Model/TransferWebhooks/AbstractOpenAPISchema.cs deleted file mode 100644 index 0491ef2d2..000000000 --- a/Adyen/Model/TransferWebhooks/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.cs b/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.cs deleted file mode 100644 index a87e5399e..000000000 --- a/Adyen/Model/TransferWebhooks/AdditionalBankIdentification.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// AdditionalBankIdentification - /// - [DataContract(Name = "AdditionalBankIdentification")] - public partial class AdditionalBankIdentification : IEquatable, IValidatableObject - { - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum GbSortCode for value: gbSortCode - /// - [EnumMember(Value = "gbSortCode")] - GbSortCode = 1, - - /// - /// Enum UsRoutingNumber for value: usRoutingNumber - /// - [EnumMember(Value = "usRoutingNumber")] - UsRoutingNumber = 2, - - /// - /// Enum AuBsbCode for value: auBsbCode - /// - [EnumMember(Value = "auBsbCode")] - AuBsbCode = 3, - - /// - /// Enum CaRoutingNumber for value: caRoutingNumber - /// - [EnumMember(Value = "caRoutingNumber")] - CaRoutingNumber = 4 - - } - - - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The value of the additional bank identification.. - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces.. - public AdditionalBankIdentification(string code = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Code = code; - this.Type = type; - } - - /// - /// The value of the additional bank identification. - /// - /// The value of the additional bank identification. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalBankIdentification {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalBankIdentification); - } - - /// - /// Returns true if AdditionalBankIdentification instances are equal - /// - /// Instance of AdditionalBankIdentification to be compared - /// Boolean - public bool Equals(AdditionalBankIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/Address.cs b/Adyen/Model/TransferWebhooks/Address.cs deleted file mode 100644 index b6f1ca785..000000000 --- a/Adyen/Model/TransferWebhooks/Address.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Address() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. . - /// The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. (required). - /// The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. . - /// The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. . - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US. . - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. . - public Address(string city = default(string), string country = default(string), string line1 = default(string), string line2 = default(string), string postalCode = default(string), string stateOrProvince = default(string)) - { - this.Country = country; - this.City = city; - this.Line1 = line1; - this.Line2 = line2; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - /// - /// The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. - /// - /// The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - /// - /// The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - [DataMember(Name = "line1", EmitDefaultValue = false)] - public string Line1 { get; set; } - - /// - /// The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - /// - /// The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - [DataMember(Name = "line2", EmitDefaultValue = false)] - public string Line2 { get; set; } - - /// - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US. - /// - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Line1: ").Append(Line1).Append("\n"); - sb.Append(" Line2: ").Append(Line2).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Line1 == input.Line1 || - (this.Line1 != null && - this.Line1.Equals(input.Line1)) - ) && - ( - this.Line2 == input.Line2 || - (this.Line2 != null && - this.Line2.Equals(input.Line2)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Line1 != null) - { - hashCode = (hashCode * 59) + this.Line1.GetHashCode(); - } - if (this.Line2 != null) - { - hashCode = (hashCode * 59) + this.Line2.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) minLength - if (this.City != null && this.City.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be greater than 3.", new [] { "City" }); - } - - // PostalCode (string) minLength - if (this.PostalCode != null && this.PostalCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PostalCode, length must be greater than 3.", new [] { "PostalCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/Airline.cs b/Adyen/Model/TransferWebhooks/Airline.cs deleted file mode 100644 index ed340acf7..000000000 --- a/Adyen/Model/TransferWebhooks/Airline.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Airline - /// - [DataContract(Name = "Airline")] - public partial class Airline : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Details about the flight legs for this ticket.. - /// The ticket's unique identifier. - public Airline(List legs = default(List), string ticketNumber = default(string)) - { - this.Legs = legs; - this.TicketNumber = ticketNumber; - } - - /// - /// Details about the flight legs for this ticket. - /// - /// Details about the flight legs for this ticket. - [DataMember(Name = "legs", EmitDefaultValue = false)] - public List Legs { get; set; } - - /// - /// The ticket's unique identifier - /// - /// The ticket's unique identifier - [DataMember(Name = "ticketNumber", EmitDefaultValue = false)] - public string TicketNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Airline {\n"); - sb.Append(" Legs: ").Append(Legs).Append("\n"); - sb.Append(" TicketNumber: ").Append(TicketNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Airline); - } - - /// - /// Returns true if Airline instances are equal - /// - /// Instance of Airline to be compared - /// Boolean - public bool Equals(Airline input) - { - if (input == null) - { - return false; - } - return - ( - this.Legs == input.Legs || - this.Legs != null && - input.Legs != null && - this.Legs.SequenceEqual(input.Legs) - ) && - ( - this.TicketNumber == input.TicketNumber || - (this.TicketNumber != null && - this.TicketNumber.Equals(input.TicketNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Legs != null) - { - hashCode = (hashCode * 59) + this.Legs.GetHashCode(); - } - if (this.TicketNumber != null) - { - hashCode = (hashCode * 59) + this.TicketNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/Amount.cs b/Adyen/Model/TransferWebhooks/Amount.cs deleted file mode 100644 index fac41e3d7..000000000 --- a/Adyen/Model/TransferWebhooks/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/AmountAdjustment.cs b/Adyen/Model/TransferWebhooks/AmountAdjustment.cs deleted file mode 100644 index 451715317..000000000 --- a/Adyen/Model/TransferWebhooks/AmountAdjustment.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// AmountAdjustment - /// - [DataContract(Name = "AmountAdjustment")] - public partial class AmountAdjustment : IEquatable, IValidatableObject - { - /// - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. - /// - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AmountAdjustmentTypeEnum - { - /// - /// Enum AtmMarkup for value: atmMarkup - /// - [EnumMember(Value = "atmMarkup")] - AtmMarkup = 1, - - /// - /// Enum AuthHoldReserve for value: authHoldReserve - /// - [EnumMember(Value = "authHoldReserve")] - AuthHoldReserve = 2, - - /// - /// Enum Exchange for value: exchange - /// - [EnumMember(Value = "exchange")] - Exchange = 3, - - /// - /// Enum ForexMarkup for value: forexMarkup - /// - [EnumMember(Value = "forexMarkup")] - ForexMarkup = 4 - - } - - - /// - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. - /// - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. - [DataMember(Name = "amountAdjustmentType", EmitDefaultValue = false)] - public AmountAdjustmentTypeEnum? AmountAdjustmentType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**.. - /// The basepoints associated with the applied markup.. - public AmountAdjustment(Amount amount = default(Amount), AmountAdjustmentTypeEnum? amountAdjustmentType = default(AmountAdjustmentTypeEnum?), int? basepoints = default(int?)) - { - this.Amount = amount; - this.AmountAdjustmentType = amountAdjustmentType; - this.Basepoints = basepoints; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The basepoints associated with the applied markup. - /// - /// The basepoints associated with the applied markup. - [DataMember(Name = "basepoints", EmitDefaultValue = false)] - public int? Basepoints { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AmountAdjustment {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" AmountAdjustmentType: ").Append(AmountAdjustmentType).Append("\n"); - sb.Append(" Basepoints: ").Append(Basepoints).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AmountAdjustment); - } - - /// - /// Returns true if AmountAdjustment instances are equal - /// - /// Instance of AmountAdjustment to be compared - /// Boolean - public bool Equals(AmountAdjustment input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.AmountAdjustmentType == input.AmountAdjustmentType || - this.AmountAdjustmentType.Equals(input.AmountAdjustmentType) - ) && - ( - this.Basepoints == input.Basepoints || - this.Basepoints.Equals(input.Basepoints) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AmountAdjustmentType.GetHashCode(); - hashCode = (hashCode * 59) + this.Basepoints.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.cs deleted file mode 100644 index d2aace177..000000000 --- a/Adyen/Model/TransferWebhooks/BRLocalAccountIdentification.cs +++ /dev/null @@ -1,269 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// BRLocalAccountIdentification - /// - [DataContract(Name = "BRLocalAccountIdentification")] - public partial class BRLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **brLocal** - /// - /// **brLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BrLocal for value: brLocal - /// - [EnumMember(Value = "brLocal")] - BrLocal = 1 - - } - - - /// - /// **brLocal** - /// - /// **brLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BRLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The 3-digit bank code, with leading zeros. (required). - /// The bank account branch number, without separators or whitespace. (required). - /// The 8-digit ISPB, with leading zeros.. - /// **brLocal** (required) (default to TypeEnum.BrLocal). - public BRLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string branchNumber = default(string), string ispb = default(string), TypeEnum type = TypeEnum.BrLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.BranchNumber = branchNumber; - this.Type = type; - this.Ispb = ispb; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit bank code, with leading zeros. - /// - /// The 3-digit bank code, with leading zeros. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// The bank account branch number, without separators or whitespace. - /// - /// The bank account branch number, without separators or whitespace. - [DataMember(Name = "branchNumber", IsRequired = false, EmitDefaultValue = false)] - public string BranchNumber { get; set; } - - /// - /// The 8-digit ISPB, with leading zeros. - /// - /// The 8-digit ISPB, with leading zeros. - [DataMember(Name = "ispb", EmitDefaultValue = false)] - public string Ispb { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BRLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" BranchNumber: ").Append(BranchNumber).Append("\n"); - sb.Append(" Ispb: ").Append(Ispb).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BRLocalAccountIdentification); - } - - /// - /// Returns true if BRLocalAccountIdentification instances are equal - /// - /// Instance of BRLocalAccountIdentification to be compared - /// Boolean - public bool Equals(BRLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.BranchNumber == input.BranchNumber || - (this.BranchNumber != null && - this.BranchNumber.Equals(input.BranchNumber)) - ) && - ( - this.Ispb == input.Ispb || - (this.Ispb != null && - this.Ispb.Equals(input.Ispb)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - if (this.BranchNumber != null) - { - hashCode = (hashCode * 59) + this.BranchNumber.GetHashCode(); - } - if (this.Ispb != null) - { - hashCode = (hashCode * 59) + this.Ispb.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 1.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 3.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 3.", new [] { "BankCode" }); - } - - // BranchNumber (string) maxLength - if (this.BranchNumber != null && this.BranchNumber.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BranchNumber, length must be less than 4.", new [] { "BranchNumber" }); - } - - // BranchNumber (string) minLength - if (this.BranchNumber != null && this.BranchNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BranchNumber, length must be greater than 1.", new [] { "BranchNumber" }); - } - - // Ispb (string) maxLength - if (this.Ispb != null && this.Ispb.Length > 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Ispb, length must be less than 8.", new [] { "Ispb" }); - } - - // Ispb (string) minLength - if (this.Ispb != null && this.Ispb.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Ispb, length must be greater than 8.", new [] { "Ispb" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/BalanceMutation.cs b/Adyen/Model/TransferWebhooks/BalanceMutation.cs deleted file mode 100644 index a0bf34dcc..000000000 --- a/Adyen/Model/TransferWebhooks/BalanceMutation.cs +++ /dev/null @@ -1,174 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// BalanceMutation - /// - [DataContract(Name = "BalanceMutation")] - public partial class BalanceMutation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The amount in the payment's currency that is debited or credited on the balance accounting register.. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).. - /// The amount in the payment's currency that is debited or credited on the received accounting register.. - /// The amount in the payment's currency that is debited or credited on the reserved accounting register.. - public BalanceMutation(long? balance = default(long?), string currency = default(string), long? received = default(long?), long? reserved = default(long?)) - { - this.Balance = balance; - this.Currency = currency; - this.Received = received; - this.Reserved = reserved; - } - - /// - /// The amount in the payment's currency that is debited or credited on the balance accounting register. - /// - /// The amount in the payment's currency that is debited or credited on the balance accounting register. - [DataMember(Name = "balance", EmitDefaultValue = false)] - public long? Balance { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount in the payment's currency that is debited or credited on the received accounting register. - /// - /// The amount in the payment's currency that is debited or credited on the received accounting register. - [DataMember(Name = "received", EmitDefaultValue = false)] - public long? Received { get; set; } - - /// - /// The amount in the payment's currency that is debited or credited on the reserved accounting register. - /// - /// The amount in the payment's currency that is debited or credited on the reserved accounting register. - [DataMember(Name = "reserved", EmitDefaultValue = false)] - public long? Reserved { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceMutation {\n"); - sb.Append(" Balance: ").Append(Balance).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Received: ").Append(Received).Append("\n"); - sb.Append(" Reserved: ").Append(Reserved).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceMutation); - } - - /// - /// Returns true if BalanceMutation instances are equal - /// - /// Instance of BalanceMutation to be compared - /// Boolean - public bool Equals(BalanceMutation input) - { - if (input == null) - { - return false; - } - return - ( - this.Balance == input.Balance || - this.Balance.Equals(input.Balance) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Received == input.Received || - this.Received.Equals(input.Received) - ) && - ( - this.Reserved == input.Reserved || - this.Reserved.Equals(input.Reserved) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Balance.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Received.GetHashCode(); - hashCode = (hashCode * 59) + this.Reserved.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.cs b/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.cs deleted file mode 100644 index b6ac6c04f..000000000 --- a/Adyen/Model/TransferWebhooks/BalancePlatformNotificationResponse.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// BalancePlatformNotificationResponse - /// - [DataContract(Name = "BalancePlatformNotificationResponse")] - public partial class BalancePlatformNotificationResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications).. - public BalancePlatformNotificationResponse(string notificationResponse = default(string)) - { - this.NotificationResponse = notificationResponse; - } - - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - /// - /// Respond with any **2xx** HTTP status code to [accept the webhook](https://docs.adyen.com/development-resources/webhooks#accept-notifications). - [DataMember(Name = "notificationResponse", EmitDefaultValue = false)] - public string NotificationResponse { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalancePlatformNotificationResponse {\n"); - sb.Append(" NotificationResponse: ").Append(NotificationResponse).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalancePlatformNotificationResponse); - } - - /// - /// Returns true if BalancePlatformNotificationResponse instances are equal - /// - /// Instance of BalancePlatformNotificationResponse to be compared - /// Boolean - public bool Equals(BalancePlatformNotificationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NotificationResponse == input.NotificationResponse || - (this.NotificationResponse != null && - this.NotificationResponse.Equals(input.NotificationResponse)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NotificationResponse != null) - { - hashCode = (hashCode * 59) + this.NotificationResponse.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/BankAccountV3.cs b/Adyen/Model/TransferWebhooks/BankAccountV3.cs deleted file mode 100644 index e899b96b3..000000000 --- a/Adyen/Model/TransferWebhooks/BankAccountV3.cs +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// BankAccountV3 - /// - [DataContract(Name = "BankAccountV3")] - public partial class BankAccountV3 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BankAccountV3() { } - /// - /// Initializes a new instance of the class. - /// - /// accountHolder (required). - /// accountIdentification (required). - public BankAccountV3(PartyIdentification accountHolder = default(PartyIdentification), BankAccountV3AccountIdentification accountIdentification = default(BankAccountV3AccountIdentification)) - { - this.AccountHolder = accountHolder; - this.AccountIdentification = accountIdentification; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", IsRequired = false, EmitDefaultValue = false)] - public PartyIdentification AccountHolder { get; set; } - - /// - /// Gets or Sets AccountIdentification - /// - [DataMember(Name = "accountIdentification", IsRequired = false, EmitDefaultValue = false)] - public BankAccountV3AccountIdentification AccountIdentification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountV3 {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" AccountIdentification: ").Append(AccountIdentification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountV3); - } - - /// - /// Returns true if BankAccountV3 instances are equal - /// - /// Instance of BankAccountV3 to be compared - /// Boolean - public bool Equals(BankAccountV3 input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.AccountIdentification == input.AccountIdentification || - (this.AccountIdentification != null && - this.AccountIdentification.Equals(input.AccountIdentification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.AccountIdentification != null) - { - hashCode = (hashCode * 59) + this.AccountIdentification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.cs b/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.cs deleted file mode 100644 index d04267cc3..000000000 --- a/Adyen/Model/TransferWebhooks/BankAccountV3AccountIdentification.cs +++ /dev/null @@ -1,743 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. - /// - [JsonConverter(typeof(BankAccountV3AccountIdentificationJsonConverter))] - [DataContract(Name = "BankAccountV3_accountIdentification")] - public partial class BankAccountV3AccountIdentification : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AULocalAccountIdentification. - public BankAccountV3AccountIdentification(AULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BRLocalAccountIdentification. - public BankAccountV3AccountIdentification(BRLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CALocalAccountIdentification. - public BankAccountV3AccountIdentification(CALocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CZLocalAccountIdentification. - public BankAccountV3AccountIdentification(CZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DKLocalAccountIdentification. - public BankAccountV3AccountIdentification(DKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HKLocalAccountIdentification. - public BankAccountV3AccountIdentification(HKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HULocalAccountIdentification. - public BankAccountV3AccountIdentification(HULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IbanAccountIdentification. - public BankAccountV3AccountIdentification(IbanAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NOLocalAccountIdentification. - public BankAccountV3AccountIdentification(NOLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NZLocalAccountIdentification. - public BankAccountV3AccountIdentification(NZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NumberAndBicAccountIdentification. - public BankAccountV3AccountIdentification(NumberAndBicAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PLLocalAccountIdentification. - public BankAccountV3AccountIdentification(PLLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SELocalAccountIdentification. - public BankAccountV3AccountIdentification(SELocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SGLocalAccountIdentification. - public BankAccountV3AccountIdentification(SGLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UKLocalAccountIdentification. - public BankAccountV3AccountIdentification(UKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of USLocalAccountIdentification. - public BankAccountV3AccountIdentification(USLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BRLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CALocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IbanAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NOLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NumberAndBicAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PLLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SELocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SGLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(USLocalAccountIdentification)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AULocalAccountIdentification, BRLocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification"); - } - } - } - - /// - /// Get the actual instance of `AULocalAccountIdentification`. If the actual instance is not `AULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of AULocalAccountIdentification - public AULocalAccountIdentification GetAULocalAccountIdentification() - { - return (AULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `BRLocalAccountIdentification`. If the actual instance is not `BRLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of BRLocalAccountIdentification - public BRLocalAccountIdentification GetBRLocalAccountIdentification() - { - return (BRLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CALocalAccountIdentification`. If the actual instance is not `CALocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CALocalAccountIdentification - public CALocalAccountIdentification GetCALocalAccountIdentification() - { - return (CALocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CZLocalAccountIdentification`. If the actual instance is not `CZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CZLocalAccountIdentification - public CZLocalAccountIdentification GetCZLocalAccountIdentification() - { - return (CZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `DKLocalAccountIdentification`. If the actual instance is not `DKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of DKLocalAccountIdentification - public DKLocalAccountIdentification GetDKLocalAccountIdentification() - { - return (DKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HKLocalAccountIdentification`. If the actual instance is not `HKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HKLocalAccountIdentification - public HKLocalAccountIdentification GetHKLocalAccountIdentification() - { - return (HKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HULocalAccountIdentification`. If the actual instance is not `HULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HULocalAccountIdentification - public HULocalAccountIdentification GetHULocalAccountIdentification() - { - return (HULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of IbanAccountIdentification - public IbanAccountIdentification GetIbanAccountIdentification() - { - return (IbanAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NOLocalAccountIdentification`. If the actual instance is not `NOLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NOLocalAccountIdentification - public NOLocalAccountIdentification GetNOLocalAccountIdentification() - { - return (NOLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NZLocalAccountIdentification`. If the actual instance is not `NZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NZLocalAccountIdentification - public NZLocalAccountIdentification GetNZLocalAccountIdentification() - { - return (NZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NumberAndBicAccountIdentification`. If the actual instance is not `NumberAndBicAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NumberAndBicAccountIdentification - public NumberAndBicAccountIdentification GetNumberAndBicAccountIdentification() - { - return (NumberAndBicAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `PLLocalAccountIdentification`. If the actual instance is not `PLLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of PLLocalAccountIdentification - public PLLocalAccountIdentification GetPLLocalAccountIdentification() - { - return (PLLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SELocalAccountIdentification`. If the actual instance is not `SELocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SELocalAccountIdentification - public SELocalAccountIdentification GetSELocalAccountIdentification() - { - return (SELocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SGLocalAccountIdentification`. If the actual instance is not `SGLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SGLocalAccountIdentification - public SGLocalAccountIdentification GetSGLocalAccountIdentification() - { - return (SGLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `UKLocalAccountIdentification`. If the actual instance is not `UKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of UKLocalAccountIdentification - public UKLocalAccountIdentification GetUKLocalAccountIdentification() - { - return (UKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `USLocalAccountIdentification`. If the actual instance is not `USLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of USLocalAccountIdentification - public USLocalAccountIdentification GetUSLocalAccountIdentification() - { - return (USLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BankAccountV3AccountIdentification {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, BankAccountV3AccountIdentification.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of BankAccountV3AccountIdentification - /// - /// JSON string - /// An instance of BankAccountV3AccountIdentification - public static BankAccountV3AccountIdentification FromJson(string jsonString) - { - BankAccountV3AccountIdentification newBankAccountV3AccountIdentification = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newBankAccountV3AccountIdentification; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the AULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("AULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the BRLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("BRLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CALocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("CALocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("CZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the DKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("DKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("HKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("HULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the IbanAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("IbanAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NOLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("NOLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("NZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NumberAndBicAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("NumberAndBicAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the PLLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("PLLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SELocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("SELocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SGLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("SGLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the UKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("UKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the USLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("USLocalAccountIdentification"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newBankAccountV3AccountIdentification; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountV3AccountIdentification); - } - - /// - /// Returns true if BankAccountV3AccountIdentification instances are equal - /// - /// Instance of BankAccountV3AccountIdentification to be compared - /// Boolean - public bool Equals(BankAccountV3AccountIdentification input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for BankAccountV3AccountIdentification - /// - public class BankAccountV3AccountIdentificationJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(BankAccountV3AccountIdentification).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return BankAccountV3AccountIdentification.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/BankCategoryData.cs b/Adyen/Model/TransferWebhooks/BankCategoryData.cs deleted file mode 100644 index e454dbd98..000000000 --- a/Adyen/Model/TransferWebhooks/BankCategoryData.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// BankCategoryData - /// - [DataContract(Name = "BankCategoryData")] - public partial class BankCategoryData : IEquatable, IValidatableObject - { - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [JsonConverter(typeof(StringEnumConverter))] - public enum PriorityEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [DataMember(Name = "priority", EmitDefaultValue = false)] - public PriorityEnum? Priority { get; set; } - /// - /// **bank** - /// - /// **bank** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1 - - } - - - /// - /// **bank** - /// - /// **bank** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN).. - /// **bank** (default to TypeEnum.Bank). - public BankCategoryData(PriorityEnum? priority = default(PriorityEnum?), TypeEnum? type = TypeEnum.Bank) - { - this.Priority = priority; - this.Type = type; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankCategoryData {\n"); - sb.Append(" Priority: ").Append(Priority).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankCategoryData); - } - - /// - /// Returns true if BankCategoryData instances are equal - /// - /// Instance of BankCategoryData to be compared - /// Boolean - public bool Equals(BankCategoryData input) - { - if (input == null) - { - return false; - } - return - ( - this.Priority == input.Priority || - this.Priority.Equals(input.Priority) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Priority.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.cs deleted file mode 100644 index fed732ce1..000000000 --- a/Adyen/Model/TransferWebhooks/CALocalAccountIdentification.cs +++ /dev/null @@ -1,274 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// CALocalAccountIdentification - /// - [DataContract(Name = "CALocalAccountIdentification")] - public partial class CALocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 1, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 2 - - } - - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// **caLocal** - /// - /// **caLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum CaLocal for value: caLocal - /// - [EnumMember(Value = "caLocal")] - CaLocal = 1 - - } - - - /// - /// **caLocal** - /// - /// **caLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CALocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. (required). - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The 3-digit institution number, without separators or whitespace. (required). - /// The 5-digit transit number, without separators or whitespace. (required). - /// **caLocal** (required) (default to TypeEnum.CaLocal). - public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) - { - this.AccountNumber = accountNumber; - this.InstitutionNumber = institutionNumber; - this.TransitNumber = transitNumber; - this.Type = type; - this.AccountType = accountType; - } - - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit institution number, without separators or whitespace. - /// - /// The 3-digit institution number, without separators or whitespace. - [DataMember(Name = "institutionNumber", IsRequired = false, EmitDefaultValue = false)] - public string InstitutionNumber { get; set; } - - /// - /// The 5-digit transit number, without separators or whitespace. - /// - /// The 5-digit transit number, without separators or whitespace. - [DataMember(Name = "transitNumber", IsRequired = false, EmitDefaultValue = false)] - public string TransitNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CALocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" InstitutionNumber: ").Append(InstitutionNumber).Append("\n"); - sb.Append(" TransitNumber: ").Append(TransitNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CALocalAccountIdentification); - } - - /// - /// Returns true if CALocalAccountIdentification instances are equal - /// - /// Instance of CALocalAccountIdentification to be compared - /// Boolean - public bool Equals(CALocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.InstitutionNumber == input.InstitutionNumber || - (this.InstitutionNumber != null && - this.InstitutionNumber.Equals(input.InstitutionNumber)) - ) && - ( - this.TransitNumber == input.TransitNumber || - (this.TransitNumber != null && - this.TransitNumber.Equals(input.TransitNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.InstitutionNumber != null) - { - hashCode = (hashCode * 59) + this.InstitutionNumber.GetHashCode(); - } - if (this.TransitNumber != null) - { - hashCode = (hashCode * 59) + this.TransitNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 12.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 5.", new [] { "AccountNumber" }); - } - - // InstitutionNumber (string) maxLength - if (this.InstitutionNumber != null && this.InstitutionNumber.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstitutionNumber, length must be less than 3.", new [] { "InstitutionNumber" }); - } - - // InstitutionNumber (string) minLength - if (this.InstitutionNumber != null && this.InstitutionNumber.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstitutionNumber, length must be greater than 3.", new [] { "InstitutionNumber" }); - } - - // TransitNumber (string) maxLength - if (this.TransitNumber != null && this.TransitNumber.Length > 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransitNumber, length must be less than 5.", new [] { "TransitNumber" }); - } - - // TransitNumber (string) minLength - if (this.TransitNumber != null && this.TransitNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransitNumber, length must be greater than 5.", new [] { "TransitNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.cs deleted file mode 100644 index f5abd4dc5..000000000 --- a/Adyen/Model/TransferWebhooks/CZLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// CZLocalAccountIdentification - /// - [DataContract(Name = "CZLocalAccountIdentification")] - public partial class CZLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **czLocal** - /// - /// **czLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum CzLocal for value: czLocal - /// - [EnumMember(Value = "czLocal")] - CzLocal = 1 - - } - - - /// - /// **czLocal** - /// - /// **czLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CZLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) (required). - /// The 4-digit bank code (Kód banky), without separators or whitespace. (required). - /// **czLocal** (required) (default to TypeEnum.CzLocal). - public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.CzLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.Type = type; - } - - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4-digit bank code (Kód banky), without separators or whitespace. - /// - /// The 4-digit bank code (Kód banky), without separators or whitespace. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CZLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CZLocalAccountIdentification); - } - - /// - /// Returns true if CZLocalAccountIdentification instances are equal - /// - /// Instance of CZLocalAccountIdentification to be compared - /// Boolean - public bool Equals(CZLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 17) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 17.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 2.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 4.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 4.", new [] { "BankCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/Card.cs b/Adyen/Model/TransferWebhooks/Card.cs deleted file mode 100644 index 690e52975..000000000 --- a/Adyen/Model/TransferWebhooks/Card.cs +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Card - /// - [DataContract(Name = "Card")] - public partial class Card : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Card() { } - /// - /// Initializes a new instance of the class. - /// - /// cardHolder (required). - /// cardIdentification (required). - public Card(PartyIdentification cardHolder = default(PartyIdentification), CardIdentification cardIdentification = default(CardIdentification)) - { - this.CardHolder = cardHolder; - this.CardIdentification = cardIdentification; - } - - /// - /// Gets or Sets CardHolder - /// - [DataMember(Name = "cardHolder", IsRequired = false, EmitDefaultValue = false)] - public PartyIdentification CardHolder { get; set; } - - /// - /// Gets or Sets CardIdentification - /// - [DataMember(Name = "cardIdentification", IsRequired = false, EmitDefaultValue = false)] - public CardIdentification CardIdentification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Card {\n"); - sb.Append(" CardHolder: ").Append(CardHolder).Append("\n"); - sb.Append(" CardIdentification: ").Append(CardIdentification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Card); - } - - /// - /// Returns true if Card instances are equal - /// - /// Instance of Card to be compared - /// Boolean - public bool Equals(Card input) - { - if (input == null) - { - return false; - } - return - ( - this.CardHolder == input.CardHolder || - (this.CardHolder != null && - this.CardHolder.Equals(input.CardHolder)) - ) && - ( - this.CardIdentification == input.CardIdentification || - (this.CardIdentification != null && - this.CardIdentification.Equals(input.CardIdentification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardHolder != null) - { - hashCode = (hashCode * 59) + this.CardHolder.GetHashCode(); - } - if (this.CardIdentification != null) - { - hashCode = (hashCode * 59) + this.CardIdentification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/CardIdentification.cs b/Adyen/Model/TransferWebhooks/CardIdentification.cs deleted file mode 100644 index 4a4a7c284..000000000 --- a/Adyen/Model/TransferWebhooks/CardIdentification.cs +++ /dev/null @@ -1,315 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// CardIdentification - /// - [DataContract(Name = "CardIdentification")] - public partial class CardIdentification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The expiry month of the card. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November. - /// The expiry year of the card. Format: four digits. For example: 2020. - /// The issue number of the card. Applies only to some UK debit cards.. - /// The card number without any separators. For security, the response only includes the last four digits of the card number.. - /// The month when the card was issued. Applies only to some UK debit cards. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November. - /// The year when the card was issued. Applies only to some UK debit cards. Format: four digits. For example: 2020. - /// The unique [token](/payouts/payout-service/pay-out-to-cards/manage-card-information#save-card-details) created to identify the counterparty. . - public CardIdentification(string expiryMonth = default(string), string expiryYear = default(string), string issueNumber = default(string), string number = default(string), string startMonth = default(string), string startYear = default(string), string storedPaymentMethodId = default(string)) - { - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.IssueNumber = issueNumber; - this.Number = number; - this.StartMonth = startMonth; - this.StartYear = startYear; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// The expiry month of the card. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November - /// - /// The expiry month of the card. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The expiry year of the card. Format: four digits. For example: 2020 - /// - /// The expiry year of the card. Format: four digits. For example: 2020 - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The issue number of the card. Applies only to some UK debit cards. - /// - /// The issue number of the card. Applies only to some UK debit cards. - [DataMember(Name = "issueNumber", EmitDefaultValue = false)] - public string IssueNumber { get; set; } - - /// - /// The card number without any separators. For security, the response only includes the last four digits of the card number. - /// - /// The card number without any separators. For security, the response only includes the last four digits of the card number. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// The month when the card was issued. Applies only to some UK debit cards. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November - /// - /// The month when the card was issued. Applies only to some UK debit cards. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November - [DataMember(Name = "startMonth", EmitDefaultValue = false)] - public string StartMonth { get; set; } - - /// - /// The year when the card was issued. Applies only to some UK debit cards. Format: four digits. For example: 2020 - /// - /// The year when the card was issued. Applies only to some UK debit cards. Format: four digits. For example: 2020 - [DataMember(Name = "startYear", EmitDefaultValue = false)] - public string StartYear { get; set; } - - /// - /// The unique [token](/payouts/payout-service/pay-out-to-cards/manage-card-information#save-card-details) created to identify the counterparty. - /// - /// The unique [token](/payouts/payout-service/pay-out-to-cards/manage-card-information#save-card-details) created to identify the counterparty. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardIdentification {\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" IssueNumber: ").Append(IssueNumber).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" StartMonth: ").Append(StartMonth).Append("\n"); - sb.Append(" StartYear: ").Append(StartYear).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardIdentification); - } - - /// - /// Returns true if CardIdentification instances are equal - /// - /// Instance of CardIdentification to be compared - /// Boolean - public bool Equals(CardIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.IssueNumber == input.IssueNumber || - (this.IssueNumber != null && - this.IssueNumber.Equals(input.IssueNumber)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.StartMonth == input.StartMonth || - (this.StartMonth != null && - this.StartMonth.Equals(input.StartMonth)) - ) && - ( - this.StartYear == input.StartYear || - (this.StartYear != null && - this.StartYear.Equals(input.StartYear)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.IssueNumber != null) - { - hashCode = (hashCode * 59) + this.IssueNumber.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.StartMonth != null) - { - hashCode = (hashCode * 59) + this.StartMonth.GetHashCode(); - } - if (this.StartYear != null) - { - hashCode = (hashCode * 59) + this.StartYear.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ExpiryMonth (string) maxLength - if (this.ExpiryMonth != null && this.ExpiryMonth.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryMonth, length must be less than 2.", new [] { "ExpiryMonth" }); - } - - // ExpiryMonth (string) minLength - if (this.ExpiryMonth != null && this.ExpiryMonth.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryMonth, length must be greater than 2.", new [] { "ExpiryMonth" }); - } - - // ExpiryYear (string) maxLength - if (this.ExpiryYear != null && this.ExpiryYear.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryYear, length must be less than 4.", new [] { "ExpiryYear" }); - } - - // ExpiryYear (string) minLength - if (this.ExpiryYear != null && this.ExpiryYear.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryYear, length must be greater than 4.", new [] { "ExpiryYear" }); - } - - // IssueNumber (string) maxLength - if (this.IssueNumber != null && this.IssueNumber.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssueNumber, length must be less than 2.", new [] { "IssueNumber" }); - } - - // IssueNumber (string) minLength - if (this.IssueNumber != null && this.IssueNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssueNumber, length must be greater than 1.", new [] { "IssueNumber" }); - } - - // Number (string) maxLength - if (this.Number != null && this.Number.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, length must be less than 19.", new [] { "Number" }); - } - - // Number (string) minLength - if (this.Number != null && this.Number.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, length must be greater than 4.", new [] { "Number" }); - } - - // StartMonth (string) maxLength - if (this.StartMonth != null && this.StartMonth.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartMonth, length must be less than 2.", new [] { "StartMonth" }); - } - - // StartMonth (string) minLength - if (this.StartMonth != null && this.StartMonth.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartMonth, length must be greater than 2.", new [] { "StartMonth" }); - } - - // StartYear (string) maxLength - if (this.StartYear != null && this.StartYear.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartYear, length must be less than 4.", new [] { "StartYear" }); - } - - // StartYear (string) minLength - if (this.StartYear != null && this.StartYear.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartYear, length must be greater than 4.", new [] { "StartYear" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.cs b/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.cs deleted file mode 100644 index bbbcdede2..000000000 --- a/Adyen/Model/TransferWebhooks/ConfirmationTrackingData.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// ConfirmationTrackingData - /// - [DataContract(Name = "ConfirmationTrackingData")] - public partial class ConfirmationTrackingData : IEquatable, IValidatableObject - { - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 1 - - } - - - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. - /// - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Confirmation for value: confirmation - /// - [EnumMember(Value = "confirmation")] - Confirmation = 1 - - } - - - /// - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. - /// - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ConfirmationTrackingData() { } - /// - /// Initializes a new instance of the class. - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. (required). - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. (required) (default to TypeEnum.Confirmation). - public ConfirmationTrackingData(StatusEnum status = default(StatusEnum), TypeEnum type = TypeEnum.Confirmation) - { - this.Status = status; - this.Type = type; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ConfirmationTrackingData {\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConfirmationTrackingData); - } - - /// - /// Returns true if ConfirmationTrackingData instances are equal - /// - /// Instance of ConfirmationTrackingData to be compared - /// Boolean - public bool Equals(ConfirmationTrackingData input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/CounterpartyV3.cs b/Adyen/Model/TransferWebhooks/CounterpartyV3.cs deleted file mode 100644 index 07461a26e..000000000 --- a/Adyen/Model/TransferWebhooks/CounterpartyV3.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// CounterpartyV3 - /// - [DataContract(Name = "CounterpartyV3")] - public partial class CounterpartyV3 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id).. - /// bankAccount. - /// card. - /// merchant. - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id).. - public CounterpartyV3(string balanceAccountId = default(string), BankAccountV3 bankAccount = default(BankAccountV3), Card card = default(Card), MerchantData merchant = default(MerchantData), string transferInstrumentId = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.BankAccount = bankAccount; - this.Card = card; - this.Merchant = merchant; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountV3 BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Gets or Sets Merchant - /// - [DataMember(Name = "merchant", EmitDefaultValue = false)] - public MerchantData Merchant { get; set; } - - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CounterpartyV3 {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Merchant: ").Append(Merchant).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CounterpartyV3); - } - - /// - /// Returns true if CounterpartyV3 instances are equal - /// - /// Instance of CounterpartyV3 to be compared - /// Boolean - public bool Equals(CounterpartyV3 input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Merchant == input.Merchant || - (this.Merchant != null && - this.Merchant.Equals(input.Merchant)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Merchant != null) - { - hashCode = (hashCode * 59) + this.Merchant.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.cs deleted file mode 100644 index 70de06423..000000000 --- a/Adyen/Model/TransferWebhooks/DKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// DKLocalAccountIdentification - /// - [DataContract(Name = "DKLocalAccountIdentification")] - public partial class DKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **dkLocal** - /// - /// **dkLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DkLocal for value: dkLocal - /// - [EnumMember(Value = "dkLocal")] - DkLocal = 1 - - } - - - /// - /// **dkLocal** - /// - /// **dkLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). (required). - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). (required). - /// **dkLocal** (required) (default to TypeEnum.DkLocal). - public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.DkLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.Type = type; - } - - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). - /// - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DKLocalAccountIdentification); - } - - /// - /// Returns true if DKLocalAccountIdentification instances are equal - /// - /// Instance of DKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(DKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 4.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 4.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 4.", new [] { "BankCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/DirectDebitInformation.cs b/Adyen/Model/TransferWebhooks/DirectDebitInformation.cs deleted file mode 100644 index aec40a19b..000000000 --- a/Adyen/Model/TransferWebhooks/DirectDebitInformation.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// DirectDebitInformation - /// - [DataContract(Name = "DirectDebitInformation")] - public partial class DirectDebitInformation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The date when the direct debit mandate was accepted by your user, in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format.. - /// The date when the funds are deducted from your user's balance account.. - /// Your unique identifier for the direct debit mandate.. - /// Identifies the direct debit transfer's type. Possible values: **OneOff**, **First**, **Recurring**, **Final**.. - public DirectDebitInformation(DateTime dateOfSignature = default(DateTime), DateTime dueDate = default(DateTime), string mandateId = default(string), string sequenceType = default(string)) - { - this.DateOfSignature = dateOfSignature; - this.DueDate = dueDate; - this.MandateId = mandateId; - this.SequenceType = sequenceType; - } - - /// - /// The date when the direct debit mandate was accepted by your user, in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. - /// - /// The date when the direct debit mandate was accepted by your user, in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. - [DataMember(Name = "dateOfSignature", EmitDefaultValue = false)] - public DateTime DateOfSignature { get; set; } - - /// - /// The date when the funds are deducted from your user's balance account. - /// - /// The date when the funds are deducted from your user's balance account. - [DataMember(Name = "dueDate", EmitDefaultValue = false)] - public DateTime DueDate { get; set; } - - /// - /// Your unique identifier for the direct debit mandate. - /// - /// Your unique identifier for the direct debit mandate. - [DataMember(Name = "mandateId", EmitDefaultValue = false)] - public string MandateId { get; set; } - - /// - /// Identifies the direct debit transfer's type. Possible values: **OneOff**, **First**, **Recurring**, **Final**. - /// - /// Identifies the direct debit transfer's type. Possible values: **OneOff**, **First**, **Recurring**, **Final**. - [DataMember(Name = "sequenceType", EmitDefaultValue = false)] - public string SequenceType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DirectDebitInformation {\n"); - sb.Append(" DateOfSignature: ").Append(DateOfSignature).Append("\n"); - sb.Append(" DueDate: ").Append(DueDate).Append("\n"); - sb.Append(" MandateId: ").Append(MandateId).Append("\n"); - sb.Append(" SequenceType: ").Append(SequenceType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DirectDebitInformation); - } - - /// - /// Returns true if DirectDebitInformation instances are equal - /// - /// Instance of DirectDebitInformation to be compared - /// Boolean - public bool Equals(DirectDebitInformation input) - { - if (input == null) - { - return false; - } - return - ( - this.DateOfSignature == input.DateOfSignature || - (this.DateOfSignature != null && - this.DateOfSignature.Equals(input.DateOfSignature)) - ) && - ( - this.DueDate == input.DueDate || - (this.DueDate != null && - this.DueDate.Equals(input.DueDate)) - ) && - ( - this.MandateId == input.MandateId || - (this.MandateId != null && - this.MandateId.Equals(input.MandateId)) - ) && - ( - this.SequenceType == input.SequenceType || - (this.SequenceType != null && - this.SequenceType.Equals(input.SequenceType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DateOfSignature != null) - { - hashCode = (hashCode * 59) + this.DateOfSignature.GetHashCode(); - } - if (this.DueDate != null) - { - hashCode = (hashCode * 59) + this.DueDate.GetHashCode(); - } - if (this.MandateId != null) - { - hashCode = (hashCode * 59) + this.MandateId.GetHashCode(); - } - if (this.SequenceType != null) - { - hashCode = (hashCode * 59) + this.SequenceType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/EstimationTrackingData.cs b/Adyen/Model/TransferWebhooks/EstimationTrackingData.cs deleted file mode 100644 index 54ff4a8ad..000000000 --- a/Adyen/Model/TransferWebhooks/EstimationTrackingData.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// EstimationTrackingData - /// - [DataContract(Name = "EstimationTrackingData")] - public partial class EstimationTrackingData : IEquatable, IValidatableObject - { - /// - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. - /// - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Estimation for value: estimation - /// - [EnumMember(Value = "estimation")] - Estimation = 1 - - } - - - /// - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. - /// - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EstimationTrackingData() { } - /// - /// Initializes a new instance of the class. - /// - /// The estimated time the beneficiary should have access to the funds. (required). - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. (required) (default to TypeEnum.Estimation). - public EstimationTrackingData(DateTime estimatedArrivalTime = default(DateTime), TypeEnum type = TypeEnum.Estimation) - { - this.EstimatedArrivalTime = estimatedArrivalTime; - this.Type = type; - } - - /// - /// The estimated time the beneficiary should have access to the funds. - /// - /// The estimated time the beneficiary should have access to the funds. - [DataMember(Name = "estimatedArrivalTime", IsRequired = false, EmitDefaultValue = false)] - public DateTime EstimatedArrivalTime { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EstimationTrackingData {\n"); - sb.Append(" EstimatedArrivalTime: ").Append(EstimatedArrivalTime).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EstimationTrackingData); - } - - /// - /// Returns true if EstimationTrackingData instances are equal - /// - /// Instance of EstimationTrackingData to be compared - /// Boolean - public bool Equals(EstimationTrackingData input) - { - if (input == null) - { - return false; - } - return - ( - this.EstimatedArrivalTime == input.EstimatedArrivalTime || - (this.EstimatedArrivalTime != null && - this.EstimatedArrivalTime.Equals(input.EstimatedArrivalTime)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EstimatedArrivalTime != null) - { - hashCode = (hashCode * 59) + this.EstimatedArrivalTime.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/ExternalReason.cs b/Adyen/Model/TransferWebhooks/ExternalReason.cs deleted file mode 100644 index c409d46a9..000000000 --- a/Adyen/Model/TransferWebhooks/ExternalReason.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// ExternalReason - /// - [DataContract(Name = "ExternalReason")] - public partial class ExternalReason : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The reason code.. - /// The description of the reason code.. - /// The namespace for the reason code.. - public ExternalReason(string code = default(string), string description = default(string), string _namespace = default(string)) - { - this.Code = code; - this.Description = description; - this.Namespace = _namespace; - } - - /// - /// The reason code. - /// - /// The reason code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The description of the reason code. - /// - /// The description of the reason code. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The namespace for the reason code. - /// - /// The namespace for the reason code. - [DataMember(Name = "namespace", EmitDefaultValue = false)] - public string Namespace { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ExternalReason {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Namespace: ").Append(Namespace).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ExternalReason); - } - - /// - /// Returns true if ExternalReason instances are equal - /// - /// Instance of ExternalReason to be compared - /// Boolean - public bool Equals(ExternalReason input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Namespace == input.Namespace || - (this.Namespace != null && - this.Namespace.Equals(input.Namespace)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Namespace != null) - { - hashCode = (hashCode * 59) + this.Namespace.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs deleted file mode 100644 index a86982f41..000000000 --- a/Adyen/Model/TransferWebhooks/HKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// HKLocalAccountIdentification - /// - [DataContract(Name = "HKLocalAccountIdentification")] - public partial class HKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **hkLocal** - /// - /// **hkLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum HkLocal for value: hkLocal - /// - [EnumMember(Value = "hkLocal")] - HkLocal = 1 - - } - - - /// - /// **hkLocal** - /// - /// **hkLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. (required). - /// The 3-digit clearing code, without separators or whitespace. (required). - /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) - { - this.AccountNumber = accountNumber; - this.ClearingCode = clearingCode; - this.Type = type; - } - - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit clearing code, without separators or whitespace. - /// - /// The 3-digit clearing code, without separators or whitespace. - [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] - public string ClearingCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HKLocalAccountIdentification); - } - - /// - /// Returns true if HKLocalAccountIdentification instances are equal - /// - /// Instance of HKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(HKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.ClearingCode == input.ClearingCode || - (this.ClearingCode != null && - this.ClearingCode.Equals(input.ClearingCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.ClearingCode != null) - { - hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 15) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 15.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 9.", new [] { "AccountNumber" }); - } - - // ClearingCode (string) maxLength - if (this.ClearingCode != null && this.ClearingCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be less than 3.", new [] { "ClearingCode" }); - } - - // ClearingCode (string) minLength - if (this.ClearingCode != null && this.ClearingCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be greater than 3.", new [] { "ClearingCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.cs deleted file mode 100644 index 0c194b29c..000000000 --- a/Adyen/Model/TransferWebhooks/HULocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// HULocalAccountIdentification - /// - [DataContract(Name = "HULocalAccountIdentification")] - public partial class HULocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **huLocal** - /// - /// **huLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum HuLocal for value: huLocal - /// - [EnumMember(Value = "huLocal")] - HuLocal = 1 - - } - - - /// - /// **huLocal** - /// - /// **huLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HULocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 24-digit bank account number, without separators or whitespace. (required). - /// **huLocal** (required) (default to TypeEnum.HuLocal). - public HULocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.HuLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 24-digit bank account number, without separators or whitespace. - /// - /// The 24-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HULocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HULocalAccountIdentification); - } - - /// - /// Returns true if HULocalAccountIdentification instances are equal - /// - /// Instance of HULocalAccountIdentification to be compared - /// Boolean - public bool Equals(HULocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 24) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 24.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 24) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 24.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/IbanAccountIdentification.cs b/Adyen/Model/TransferWebhooks/IbanAccountIdentification.cs deleted file mode 100644 index 840440053..000000000 --- a/Adyen/Model/TransferWebhooks/IbanAccountIdentification.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// IbanAccountIdentification - /// - [DataContract(Name = "IbanAccountIdentification")] - public partial class IbanAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **iban** - /// - /// **iban** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 1 - - } - - - /// - /// **iban** - /// - /// **iban** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IbanAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). - /// **iban** (required) (default to TypeEnum.Iban). - public IbanAccountIdentification(string iban = default(string), TypeEnum type = TypeEnum.Iban) - { - this.Iban = iban; - this.Type = type; - } - - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - [DataMember(Name = "iban", IsRequired = false, EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IbanAccountIdentification {\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IbanAccountIdentification); - } - - /// - /// Returns true if IbanAccountIdentification instances are equal - /// - /// Instance of IbanAccountIdentification to be compared - /// Boolean - public bool Equals(IbanAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/InternalCategoryData.cs b/Adyen/Model/TransferWebhooks/InternalCategoryData.cs deleted file mode 100644 index 2ffaa950f..000000000 --- a/Adyen/Model/TransferWebhooks/InternalCategoryData.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// InternalCategoryData - /// - [DataContract(Name = "InternalCategoryData")] - public partial class InternalCategoryData : IEquatable, IValidatableObject - { - /// - /// **internal** - /// - /// **internal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 1 - - } - - - /// - /// **internal** - /// - /// **internal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The capture's merchant reference included in the transfer.. - /// The capture reference included in the transfer.. - /// **internal** (default to TypeEnum.Internal). - public InternalCategoryData(string modificationMerchantReference = default(string), string modificationPspReference = default(string), TypeEnum? type = TypeEnum.Internal) - { - this.ModificationMerchantReference = modificationMerchantReference; - this.ModificationPspReference = modificationPspReference; - this.Type = type; - } - - /// - /// The capture's merchant reference included in the transfer. - /// - /// The capture's merchant reference included in the transfer. - [DataMember(Name = "modificationMerchantReference", EmitDefaultValue = false)] - public string ModificationMerchantReference { get; set; } - - /// - /// The capture reference included in the transfer. - /// - /// The capture reference included in the transfer. - [DataMember(Name = "modificationPspReference", EmitDefaultValue = false)] - public string ModificationPspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InternalCategoryData {\n"); - sb.Append(" ModificationMerchantReference: ").Append(ModificationMerchantReference).Append("\n"); - sb.Append(" ModificationPspReference: ").Append(ModificationPspReference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InternalCategoryData); - } - - /// - /// Returns true if InternalCategoryData instances are equal - /// - /// Instance of InternalCategoryData to be compared - /// Boolean - public bool Equals(InternalCategoryData input) - { - if (input == null) - { - return false; - } - return - ( - this.ModificationMerchantReference == input.ModificationMerchantReference || - (this.ModificationMerchantReference != null && - this.ModificationMerchantReference.Equals(input.ModificationMerchantReference)) - ) && - ( - this.ModificationPspReference == input.ModificationPspReference || - (this.ModificationPspReference != null && - this.ModificationPspReference.Equals(input.ModificationPspReference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ModificationMerchantReference != null) - { - hashCode = (hashCode * 59) + this.ModificationMerchantReference.GetHashCode(); - } - if (this.ModificationPspReference != null) - { - hashCode = (hashCode * 59) + this.ModificationPspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.cs b/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.cs deleted file mode 100644 index 2513df4e0..000000000 --- a/Adyen/Model/TransferWebhooks/InternalReviewTrackingData.cs +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// InternalReviewTrackingData - /// - [DataContract(Name = "InternalReviewTrackingData")] - public partial class InternalReviewTrackingData : IEquatable, IValidatableObject - { - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum RefusedForRegulatoryReasons for value: refusedForRegulatoryReasons - /// - [EnumMember(Value = "refusedForRegulatoryReasons")] - RefusedForRegulatoryReasons = 1 - - } - - - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. - /// - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 1, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 2 - - } - - - /// - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. - /// - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. - /// - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum InternalReview for value: internalReview - /// - [EnumMember(Value = "internalReview")] - InternalReview = 1 - - } - - - /// - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. - /// - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InternalReviewTrackingData() { } - /// - /// Initializes a new instance of the class. - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). . - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. (required). - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. (required) (default to TypeEnum.InternalReview). - public InternalReviewTrackingData(ReasonEnum? reason = default(ReasonEnum?), StatusEnum status = default(StatusEnum), TypeEnum type = TypeEnum.InternalReview) - { - this.Status = status; - this.Type = type; - this.Reason = reason; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InternalReviewTrackingData {\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InternalReviewTrackingData); - } - - /// - /// Returns true if InternalReviewTrackingData instances are equal - /// - /// Instance of InternalReviewTrackingData to be compared - /// Boolean - public bool Equals(InternalReviewTrackingData input) - { - if (input == null) - { - return false; - } - return - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/IssuedCard.cs b/Adyen/Model/TransferWebhooks/IssuedCard.cs deleted file mode 100644 index 0bdb73a71..000000000 --- a/Adyen/Model/TransferWebhooks/IssuedCard.cs +++ /dev/null @@ -1,373 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// IssuedCard - /// - [DataContract(Name = "IssuedCard")] - public partial class IssuedCard : IEquatable, IValidatableObject - { - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - [JsonConverter(typeof(StringEnumConverter))] - public enum PanEntryModeEnum - { - /// - /// Enum Chip for value: chip - /// - [EnumMember(Value = "chip")] - Chip = 1, - - /// - /// Enum Cof for value: cof - /// - [EnumMember(Value = "cof")] - Cof = 2, - - /// - /// Enum Contactless for value: contactless - /// - [EnumMember(Value = "contactless")] - Contactless = 3, - - /// - /// Enum Ecommerce for value: ecommerce - /// - [EnumMember(Value = "ecommerce")] - Ecommerce = 4, - - /// - /// Enum Magstripe for value: magstripe - /// - [EnumMember(Value = "magstripe")] - Magstripe = 5, - - /// - /// Enum Manual for value: manual - /// - [EnumMember(Value = "manual")] - Manual = 6, - - /// - /// Enum Token for value: token - /// - [EnumMember(Value = "token")] - Token = 7 - - } - - - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - [DataMember(Name = "panEntryMode", EmitDefaultValue = false)] - public PanEntryModeEnum? PanEntryMode { get; set; } - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - [JsonConverter(typeof(StringEnumConverter))] - public enum ProcessingTypeEnum - { - /// - /// Enum AtmWithdraw for value: atmWithdraw - /// - [EnumMember(Value = "atmWithdraw")] - AtmWithdraw = 1, - - /// - /// Enum BalanceInquiry for value: balanceInquiry - /// - [EnumMember(Value = "balanceInquiry")] - BalanceInquiry = 2, - - /// - /// Enum Ecommerce for value: ecommerce - /// - [EnumMember(Value = "ecommerce")] - Ecommerce = 3, - - /// - /// Enum Moto for value: moto - /// - [EnumMember(Value = "moto")] - Moto = 4, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 5, - - /// - /// Enum PurchaseWithCashback for value: purchaseWithCashback - /// - [EnumMember(Value = "purchaseWithCashback")] - PurchaseWithCashback = 6, - - /// - /// Enum Recurring for value: recurring - /// - [EnumMember(Value = "recurring")] - Recurring = 7, - - /// - /// Enum Token for value: token - /// - [EnumMember(Value = "token")] - Token = 8 - - } - - - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - [DataMember(Name = "processingType", EmitDefaultValue = false)] - public ProcessingTypeEnum? ProcessingType { get; set; } - /// - /// **issuedCard** - /// - /// **issuedCard** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum IssuedCard for value: issuedCard - /// - [EnumMember(Value = "issuedCard")] - IssuedCard = 1 - - } - - - /// - /// **issuedCard** - /// - /// **issuedCard** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation**. - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**.. - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments.. - /// relayedAuthorisationData. - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments.. - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme.. - /// **issuedCard** (default to TypeEnum.IssuedCard). - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information.. - public IssuedCard(string authorisationType = default(string), PanEntryModeEnum? panEntryMode = default(PanEntryModeEnum?), ProcessingTypeEnum? processingType = default(ProcessingTypeEnum?), RelayedAuthorisationData relayedAuthorisationData = default(RelayedAuthorisationData), string schemeTraceId = default(string), string schemeUniqueTransactionId = default(string), TypeEnum? type = TypeEnum.IssuedCard, List validationFacts = default(List)) - { - this.AuthorisationType = authorisationType; - this.PanEntryMode = panEntryMode; - this.ProcessingType = processingType; - this.RelayedAuthorisationData = relayedAuthorisationData; - this.SchemeTraceId = schemeTraceId; - this.SchemeUniqueTransactionId = schemeUniqueTransactionId; - this.Type = type; - this.ValidationFacts = validationFacts; - } - - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** - [DataMember(Name = "authorisationType", EmitDefaultValue = false)] - public string AuthorisationType { get; set; } - - /// - /// Gets or Sets RelayedAuthorisationData - /// - [DataMember(Name = "relayedAuthorisationData", EmitDefaultValue = false)] - public RelayedAuthorisationData RelayedAuthorisationData { get; set; } - - /// - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. - /// - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. - [DataMember(Name = "schemeTraceId", EmitDefaultValue = false)] - public string SchemeTraceId { get; set; } - - /// - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. - /// - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. - [DataMember(Name = "schemeUniqueTransactionId", EmitDefaultValue = false)] - public string SchemeUniqueTransactionId { get; set; } - - /// - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. - /// - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. - [DataMember(Name = "validationFacts", EmitDefaultValue = false)] - public List ValidationFacts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IssuedCard {\n"); - sb.Append(" AuthorisationType: ").Append(AuthorisationType).Append("\n"); - sb.Append(" PanEntryMode: ").Append(PanEntryMode).Append("\n"); - sb.Append(" ProcessingType: ").Append(ProcessingType).Append("\n"); - sb.Append(" RelayedAuthorisationData: ").Append(RelayedAuthorisationData).Append("\n"); - sb.Append(" SchemeTraceId: ").Append(SchemeTraceId).Append("\n"); - sb.Append(" SchemeUniqueTransactionId: ").Append(SchemeUniqueTransactionId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" ValidationFacts: ").Append(ValidationFacts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IssuedCard); - } - - /// - /// Returns true if IssuedCard instances are equal - /// - /// Instance of IssuedCard to be compared - /// Boolean - public bool Equals(IssuedCard input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthorisationType == input.AuthorisationType || - (this.AuthorisationType != null && - this.AuthorisationType.Equals(input.AuthorisationType)) - ) && - ( - this.PanEntryMode == input.PanEntryMode || - this.PanEntryMode.Equals(input.PanEntryMode) - ) && - ( - this.ProcessingType == input.ProcessingType || - this.ProcessingType.Equals(input.ProcessingType) - ) && - ( - this.RelayedAuthorisationData == input.RelayedAuthorisationData || - (this.RelayedAuthorisationData != null && - this.RelayedAuthorisationData.Equals(input.RelayedAuthorisationData)) - ) && - ( - this.SchemeTraceId == input.SchemeTraceId || - (this.SchemeTraceId != null && - this.SchemeTraceId.Equals(input.SchemeTraceId)) - ) && - ( - this.SchemeUniqueTransactionId == input.SchemeUniqueTransactionId || - (this.SchemeUniqueTransactionId != null && - this.SchemeUniqueTransactionId.Equals(input.SchemeUniqueTransactionId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.ValidationFacts == input.ValidationFacts || - this.ValidationFacts != null && - input.ValidationFacts != null && - this.ValidationFacts.SequenceEqual(input.ValidationFacts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthorisationType != null) - { - hashCode = (hashCode * 59) + this.AuthorisationType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PanEntryMode.GetHashCode(); - hashCode = (hashCode * 59) + this.ProcessingType.GetHashCode(); - if (this.RelayedAuthorisationData != null) - { - hashCode = (hashCode * 59) + this.RelayedAuthorisationData.GetHashCode(); - } - if (this.SchemeTraceId != null) - { - hashCode = (hashCode * 59) + this.SchemeTraceId.GetHashCode(); - } - if (this.SchemeUniqueTransactionId != null) - { - hashCode = (hashCode * 59) + this.SchemeUniqueTransactionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.ValidationFacts != null) - { - hashCode = (hashCode * 59) + this.ValidationFacts.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/IssuingTransactionData.cs b/Adyen/Model/TransferWebhooks/IssuingTransactionData.cs deleted file mode 100644 index d107a86fc..000000000 --- a/Adyen/Model/TransferWebhooks/IssuingTransactionData.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// IssuingTransactionData - /// - [DataContract(Name = "IssuingTransactionData")] - public partial class IssuingTransactionData : IEquatable, IValidatableObject - { - /// - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data - /// - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum IssuingTransactionData for value: issuingTransactionData - /// - [EnumMember(Value = "issuingTransactionData")] - IssuingTransactionData = 1 - - } - - - /// - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data - /// - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IssuingTransactionData() { } - /// - /// Initializes a new instance of the class. - /// - /// captureCycleId associated with transfer event.. - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data (required) (default to TypeEnum.IssuingTransactionData). - public IssuingTransactionData(string captureCycleId = default(string), TypeEnum type = TypeEnum.IssuingTransactionData) - { - this.Type = type; - this.CaptureCycleId = captureCycleId; - } - - /// - /// captureCycleId associated with transfer event. - /// - /// captureCycleId associated with transfer event. - [DataMember(Name = "captureCycleId", EmitDefaultValue = false)] - public string CaptureCycleId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IssuingTransactionData {\n"); - sb.Append(" CaptureCycleId: ").Append(CaptureCycleId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IssuingTransactionData); - } - - /// - /// Returns true if IssuingTransactionData instances are equal - /// - /// Instance of IssuingTransactionData to be compared - /// Boolean - public bool Equals(IssuingTransactionData input) - { - if (input == null) - { - return false; - } - return - ( - this.CaptureCycleId == input.CaptureCycleId || - (this.CaptureCycleId != null && - this.CaptureCycleId.Equals(input.CaptureCycleId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CaptureCycleId != null) - { - hashCode = (hashCode * 59) + this.CaptureCycleId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/Leg.cs b/Adyen/Model/TransferWebhooks/Leg.cs deleted file mode 100644 index 7acfff0c4..000000000 --- a/Adyen/Model/TransferWebhooks/Leg.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Leg - /// - [DataContract(Name = "Leg")] - public partial class Leg : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.. - /// The basic fare code for this leg.. - /// IATA code of the carrier operating the flight.. - /// The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details. - /// The flight departure date.. - /// The flight identifier.. - public Leg(string arrivalAirportCode = default(string), string basicFareCode = default(string), string carrierCode = default(string), string departureAirportCode = default(string), string departureDate = default(string), string flightNumber = default(string)) - { - this.ArrivalAirportCode = arrivalAirportCode; - this.BasicFareCode = basicFareCode; - this.CarrierCode = carrierCode; - this.DepartureAirportCode = departureAirportCode; - this.DepartureDate = departureDate; - this.FlightNumber = flightNumber; - } - - /// - /// The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. - /// - /// The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. - [DataMember(Name = "arrivalAirportCode", EmitDefaultValue = false)] - public string ArrivalAirportCode { get; set; } - - /// - /// The basic fare code for this leg. - /// - /// The basic fare code for this leg. - [DataMember(Name = "basicFareCode", EmitDefaultValue = false)] - public string BasicFareCode { get; set; } - - /// - /// IATA code of the carrier operating the flight. - /// - /// IATA code of the carrier operating the flight. - [DataMember(Name = "carrierCode", EmitDefaultValue = false)] - public string CarrierCode { get; set; } - - /// - /// The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details - /// - /// The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details - [DataMember(Name = "departureAirportCode", EmitDefaultValue = false)] - public string DepartureAirportCode { get; set; } - - /// - /// The flight departure date. - /// - /// The flight departure date. - [DataMember(Name = "departureDate", EmitDefaultValue = false)] - public string DepartureDate { get; set; } - - /// - /// The flight identifier. - /// - /// The flight identifier. - [DataMember(Name = "flightNumber", EmitDefaultValue = false)] - public string FlightNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Leg {\n"); - sb.Append(" ArrivalAirportCode: ").Append(ArrivalAirportCode).Append("\n"); - sb.Append(" BasicFareCode: ").Append(BasicFareCode).Append("\n"); - sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); - sb.Append(" DepartureAirportCode: ").Append(DepartureAirportCode).Append("\n"); - sb.Append(" DepartureDate: ").Append(DepartureDate).Append("\n"); - sb.Append(" FlightNumber: ").Append(FlightNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Leg); - } - - /// - /// Returns true if Leg instances are equal - /// - /// Instance of Leg to be compared - /// Boolean - public bool Equals(Leg input) - { - if (input == null) - { - return false; - } - return - ( - this.ArrivalAirportCode == input.ArrivalAirportCode || - (this.ArrivalAirportCode != null && - this.ArrivalAirportCode.Equals(input.ArrivalAirportCode)) - ) && - ( - this.BasicFareCode == input.BasicFareCode || - (this.BasicFareCode != null && - this.BasicFareCode.Equals(input.BasicFareCode)) - ) && - ( - this.CarrierCode == input.CarrierCode || - (this.CarrierCode != null && - this.CarrierCode.Equals(input.CarrierCode)) - ) && - ( - this.DepartureAirportCode == input.DepartureAirportCode || - (this.DepartureAirportCode != null && - this.DepartureAirportCode.Equals(input.DepartureAirportCode)) - ) && - ( - this.DepartureDate == input.DepartureDate || - (this.DepartureDate != null && - this.DepartureDate.Equals(input.DepartureDate)) - ) && - ( - this.FlightNumber == input.FlightNumber || - (this.FlightNumber != null && - this.FlightNumber.Equals(input.FlightNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrivalAirportCode != null) - { - hashCode = (hashCode * 59) + this.ArrivalAirportCode.GetHashCode(); - } - if (this.BasicFareCode != null) - { - hashCode = (hashCode * 59) + this.BasicFareCode.GetHashCode(); - } - if (this.CarrierCode != null) - { - hashCode = (hashCode * 59) + this.CarrierCode.GetHashCode(); - } - if (this.DepartureAirportCode != null) - { - hashCode = (hashCode * 59) + this.DepartureAirportCode.GetHashCode(); - } - if (this.DepartureDate != null) - { - hashCode = (hashCode * 59) + this.DepartureDate.GetHashCode(); - } - if (this.FlightNumber != null) - { - hashCode = (hashCode * 59) + this.FlightNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/Lodging.cs b/Adyen/Model/TransferWebhooks/Lodging.cs deleted file mode 100644 index ff1bc75ef..000000000 --- a/Adyen/Model/TransferWebhooks/Lodging.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Lodging - /// - [DataContract(Name = "Lodging")] - public partial class Lodging : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The check-in date.. - /// The total number of nights the room is booked for.. - public Lodging(string checkInDate = default(string), int? numberOfNights = default(int?)) - { - this.CheckInDate = checkInDate; - this.NumberOfNights = numberOfNights; - } - - /// - /// The check-in date. - /// - /// The check-in date. - [DataMember(Name = "checkInDate", EmitDefaultValue = false)] - public string CheckInDate { get; set; } - - /// - /// The total number of nights the room is booked for. - /// - /// The total number of nights the room is booked for. - [DataMember(Name = "numberOfNights", EmitDefaultValue = false)] - public int? NumberOfNights { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Lodging {\n"); - sb.Append(" CheckInDate: ").Append(CheckInDate).Append("\n"); - sb.Append(" NumberOfNights: ").Append(NumberOfNights).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Lodging); - } - - /// - /// Returns true if Lodging instances are equal - /// - /// Instance of Lodging to be compared - /// Boolean - public bool Equals(Lodging input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckInDate == input.CheckInDate || - (this.CheckInDate != null && - this.CheckInDate.Equals(input.CheckInDate)) - ) && - ( - this.NumberOfNights == input.NumberOfNights || - this.NumberOfNights.Equals(input.NumberOfNights) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckInDate != null) - { - hashCode = (hashCode * 59) + this.CheckInDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NumberOfNights.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/MerchantData.cs b/Adyen/Model/TransferWebhooks/MerchantData.cs deleted file mode 100644 index 3ecd098ae..000000000 --- a/Adyen/Model/TransferWebhooks/MerchantData.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// MerchantData - /// - [DataContract(Name = "MerchantData")] - public partial class MerchantData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the merchant's acquirer.. - /// The merchant category code.. - /// The unique identifier of the merchant.. - /// nameLocation. - /// The postal code of the merchant.. - public MerchantData(string acquirerId = default(string), string mcc = default(string), string merchantId = default(string), NameLocation nameLocation = default(NameLocation), string postalCode = default(string)) - { - this.AcquirerId = acquirerId; - this.Mcc = mcc; - this.MerchantId = merchantId; - this.NameLocation = nameLocation; - this.PostalCode = postalCode; - } - - /// - /// The unique identifier of the merchant's acquirer. - /// - /// The unique identifier of the merchant's acquirer. - [DataMember(Name = "acquirerId", EmitDefaultValue = false)] - public string AcquirerId { get; set; } - - /// - /// The merchant category code. - /// - /// The merchant category code. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The unique identifier of the merchant. - /// - /// The unique identifier of the merchant. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// Gets or Sets NameLocation - /// - [DataMember(Name = "nameLocation", EmitDefaultValue = false)] - public NameLocation NameLocation { get; set; } - - /// - /// The postal code of the merchant. - /// - /// The postal code of the merchant. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantData {\n"); - sb.Append(" AcquirerId: ").Append(AcquirerId).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" NameLocation: ").Append(NameLocation).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantData); - } - - /// - /// Returns true if MerchantData instances are equal - /// - /// Instance of MerchantData to be compared - /// Boolean - public bool Equals(MerchantData input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquirerId == input.AcquirerId || - (this.AcquirerId != null && - this.AcquirerId.Equals(input.AcquirerId)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.NameLocation == input.NameLocation || - (this.NameLocation != null && - this.NameLocation.Equals(input.NameLocation)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcquirerId != null) - { - hashCode = (hashCode * 59) + this.AcquirerId.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.NameLocation != null) - { - hashCode = (hashCode * 59) + this.NameLocation.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/MerchantPurchaseData.cs b/Adyen/Model/TransferWebhooks/MerchantPurchaseData.cs deleted file mode 100644 index 423149ce4..000000000 --- a/Adyen/Model/TransferWebhooks/MerchantPurchaseData.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// MerchantPurchaseData - /// - [DataContract(Name = "MerchantPurchaseData")] - public partial class MerchantPurchaseData : IEquatable, IValidatableObject - { - /// - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data - /// - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum MerchantPurchaseData for value: merchantPurchaseData - /// - [EnumMember(Value = "merchantPurchaseData")] - MerchantPurchaseData = 1 - - } - - - /// - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data - /// - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MerchantPurchaseData() { } - /// - /// Initializes a new instance of the class. - /// - /// airline. - /// Lodging information.. - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data (required) (default to TypeEnum.MerchantPurchaseData). - public MerchantPurchaseData(Airline airline = default(Airline), List lodging = default(List), TypeEnum type = TypeEnum.MerchantPurchaseData) - { - this.Type = type; - this.Airline = airline; - this.Lodging = lodging; - } - - /// - /// Gets or Sets Airline - /// - [DataMember(Name = "airline", EmitDefaultValue = false)] - public Airline Airline { get; set; } - - /// - /// Lodging information. - /// - /// Lodging information. - [DataMember(Name = "lodging", EmitDefaultValue = false)] - public List Lodging { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantPurchaseData {\n"); - sb.Append(" Airline: ").Append(Airline).Append("\n"); - sb.Append(" Lodging: ").Append(Lodging).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantPurchaseData); - } - - /// - /// Returns true if MerchantPurchaseData instances are equal - /// - /// Instance of MerchantPurchaseData to be compared - /// Boolean - public bool Equals(MerchantPurchaseData input) - { - if (input == null) - { - return false; - } - return - ( - this.Airline == input.Airline || - (this.Airline != null && - this.Airline.Equals(input.Airline)) - ) && - ( - this.Lodging == input.Lodging || - this.Lodging != null && - input.Lodging != null && - this.Lodging.SequenceEqual(input.Lodging) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Airline != null) - { - hashCode = (hashCode * 59) + this.Airline.GetHashCode(); - } - if (this.Lodging != null) - { - hashCode = (hashCode * 59) + this.Lodging.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/Modification.cs b/Adyen/Model/TransferWebhooks/Modification.cs deleted file mode 100644 index 8ea0f0c10..000000000 --- a/Adyen/Model/TransferWebhooks/Modification.cs +++ /dev/null @@ -1,612 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Modification - /// - [DataContract(Name = "Modification")] - public partial class Modification : IEquatable, IValidatableObject - { - /// - /// The status of the transfer event. - /// - /// The status of the transfer event. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ApprovalPending for value: approvalPending - /// - [EnumMember(Value = "approvalPending")] - ApprovalPending = 1, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 2, - - /// - /// Enum AtmWithdrawalReversalPending for value: atmWithdrawalReversalPending - /// - [EnumMember(Value = "atmWithdrawalReversalPending")] - AtmWithdrawalReversalPending = 3, - - /// - /// Enum AtmWithdrawalReversed for value: atmWithdrawalReversed - /// - [EnumMember(Value = "atmWithdrawalReversed")] - AtmWithdrawalReversed = 4, - - /// - /// Enum AuthAdjustmentAuthorised for value: authAdjustmentAuthorised - /// - [EnumMember(Value = "authAdjustmentAuthorised")] - AuthAdjustmentAuthorised = 5, - - /// - /// Enum AuthAdjustmentError for value: authAdjustmentError - /// - [EnumMember(Value = "authAdjustmentError")] - AuthAdjustmentError = 6, - - /// - /// Enum AuthAdjustmentRefused for value: authAdjustmentRefused - /// - [EnumMember(Value = "authAdjustmentRefused")] - AuthAdjustmentRefused = 7, - - /// - /// Enum Authorised for value: authorised - /// - [EnumMember(Value = "authorised")] - Authorised = 8, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 9, - - /// - /// Enum BankTransferPending for value: bankTransferPending - /// - [EnumMember(Value = "bankTransferPending")] - BankTransferPending = 10, - - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 11, - - /// - /// Enum BookingPending for value: bookingPending - /// - [EnumMember(Value = "bookingPending")] - BookingPending = 12, - - /// - /// Enum Cancelled for value: cancelled - /// - [EnumMember(Value = "cancelled")] - Cancelled = 13, - - /// - /// Enum CapturePending for value: capturePending - /// - [EnumMember(Value = "capturePending")] - CapturePending = 14, - - /// - /// Enum CaptureReversalPending for value: captureReversalPending - /// - [EnumMember(Value = "captureReversalPending")] - CaptureReversalPending = 15, - - /// - /// Enum CaptureReversed for value: captureReversed - /// - [EnumMember(Value = "captureReversed")] - CaptureReversed = 16, - - /// - /// Enum Captured for value: captured - /// - [EnumMember(Value = "captured")] - Captured = 17, - - /// - /// Enum CapturedExternally for value: capturedExternally - /// - [EnumMember(Value = "capturedExternally")] - CapturedExternally = 18, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 19, - - /// - /// Enum ChargebackExternally for value: chargebackExternally - /// - [EnumMember(Value = "chargebackExternally")] - ChargebackExternally = 20, - - /// - /// Enum ChargebackPending for value: chargebackPending - /// - [EnumMember(Value = "chargebackPending")] - ChargebackPending = 21, - - /// - /// Enum ChargebackReversalPending for value: chargebackReversalPending - /// - [EnumMember(Value = "chargebackReversalPending")] - ChargebackReversalPending = 22, - - /// - /// Enum ChargebackReversed for value: chargebackReversed - /// - [EnumMember(Value = "chargebackReversed")] - ChargebackReversed = 23, - - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 24, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 25, - - /// - /// Enum DepositCorrectionPending for value: depositCorrectionPending - /// - [EnumMember(Value = "depositCorrectionPending")] - DepositCorrectionPending = 26, - - /// - /// Enum Dispute for value: dispute - /// - [EnumMember(Value = "dispute")] - Dispute = 27, - - /// - /// Enum DisputeClosed for value: disputeClosed - /// - [EnumMember(Value = "disputeClosed")] - DisputeClosed = 28, - - /// - /// Enum DisputeExpired for value: disputeExpired - /// - [EnumMember(Value = "disputeExpired")] - DisputeExpired = 29, - - /// - /// Enum DisputeNeedsReview for value: disputeNeedsReview - /// - [EnumMember(Value = "disputeNeedsReview")] - DisputeNeedsReview = 30, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 31, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 32, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 33, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 34, - - /// - /// Enum FeePending for value: feePending - /// - [EnumMember(Value = "feePending")] - FeePending = 35, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 36, - - /// - /// Enum InternalTransferPending for value: internalTransferPending - /// - [EnumMember(Value = "internalTransferPending")] - InternalTransferPending = 37, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 38, - - /// - /// Enum InvoiceDeductionPending for value: invoiceDeductionPending - /// - [EnumMember(Value = "invoiceDeductionPending")] - InvoiceDeductionPending = 39, - - /// - /// Enum ManualCorrectionPending for value: manualCorrectionPending - /// - [EnumMember(Value = "manualCorrectionPending")] - ManualCorrectionPending = 40, - - /// - /// Enum ManuallyCorrected for value: manuallyCorrected - /// - [EnumMember(Value = "manuallyCorrected")] - ManuallyCorrected = 41, - - /// - /// Enum MatchedStatement for value: matchedStatement - /// - [EnumMember(Value = "matchedStatement")] - MatchedStatement = 42, - - /// - /// Enum MatchedStatementPending for value: matchedStatementPending - /// - [EnumMember(Value = "matchedStatementPending")] - MatchedStatementPending = 43, - - /// - /// Enum MerchantPayin for value: merchantPayin - /// - [EnumMember(Value = "merchantPayin")] - MerchantPayin = 44, - - /// - /// Enum MerchantPayinPending for value: merchantPayinPending - /// - [EnumMember(Value = "merchantPayinPending")] - MerchantPayinPending = 45, - - /// - /// Enum MerchantPayinReversed for value: merchantPayinReversed - /// - [EnumMember(Value = "merchantPayinReversed")] - MerchantPayinReversed = 46, - - /// - /// Enum MerchantPayinReversedPending for value: merchantPayinReversedPending - /// - [EnumMember(Value = "merchantPayinReversedPending")] - MerchantPayinReversedPending = 47, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 48, - - /// - /// Enum MiscCostPending for value: miscCostPending - /// - [EnumMember(Value = "miscCostPending")] - MiscCostPending = 49, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 50, - - /// - /// Enum PaymentCostPending for value: paymentCostPending - /// - [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 51, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 52, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 53, - - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 54, - - /// - /// Enum RefundPending for value: refundPending - /// - [EnumMember(Value = "refundPending")] - RefundPending = 55, - - /// - /// Enum RefundReversalPending for value: refundReversalPending - /// - [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 56, - - /// - /// Enum RefundReversed for value: refundReversed - /// - [EnumMember(Value = "refundReversed")] - RefundReversed = 57, - - /// - /// Enum Refunded for value: refunded - /// - [EnumMember(Value = "refunded")] - Refunded = 58, - - /// - /// Enum RefundedExternally for value: refundedExternally - /// - [EnumMember(Value = "refundedExternally")] - RefundedExternally = 59, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 60, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 61, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 62, - - /// - /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending - /// - [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 63, - - /// - /// Enum Returned for value: returned - /// - [EnumMember(Value = "returned")] - Returned = 64, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 65, - - /// - /// Enum SecondChargebackPending for value: secondChargebackPending - /// - [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 66, - - /// - /// Enum Undefined for value: undefined - /// - [EnumMember(Value = "undefined")] - Undefined = 67 - - } - - - /// - /// The status of the transfer event. - /// - /// The status of the transfer event. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The direction of the money movement.. - /// Our reference for the modification.. - /// Your reference for the modification, used internally within your platform.. - /// The status of the transfer event.. - /// The type of transfer modification.. - public Modification(string direction = default(string), string id = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string type = default(string)) - { - this.Direction = direction; - this.Id = id; - this.Reference = reference; - this.Status = status; - this.Type = type; - } - - /// - /// The direction of the money movement. - /// - /// The direction of the money movement. - [DataMember(Name = "direction", EmitDefaultValue = false)] - public string Direction { get; set; } - - /// - /// Our reference for the modification. - /// - /// Our reference for the modification. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Your reference for the modification, used internally within your platform. - /// - /// Your reference for the modification, used internally within your platform. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The type of transfer modification. - /// - /// The type of transfer modification. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Modification {\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Modification); - } - - /// - /// Returns true if Modification instances are equal - /// - /// Instance of Modification to be compared - /// Boolean - public bool Equals(Modification input) - { - if (input == null) - { - return false; - } - return - ( - this.Direction == input.Direction || - (this.Direction != null && - this.Direction.Equals(input.Direction)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Direction != null) - { - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.cs deleted file mode 100644 index ddfa7726e..000000000 --- a/Adyen/Model/TransferWebhooks/NOLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// NOLocalAccountIdentification - /// - [DataContract(Name = "NOLocalAccountIdentification")] - public partial class NOLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **noLocal** - /// - /// **noLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NoLocal for value: noLocal - /// - [EnumMember(Value = "noLocal")] - NoLocal = 1 - - } - - - /// - /// **noLocal** - /// - /// **noLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NOLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 11-digit bank account number, without separators or whitespace. (required). - /// **noLocal** (required) (default to TypeEnum.NoLocal). - public NOLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NoLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 11-digit bank account number, without separators or whitespace. - /// - /// The 11-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NOLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NOLocalAccountIdentification); - } - - /// - /// Returns true if NOLocalAccountIdentification instances are equal - /// - /// Instance of NOLocalAccountIdentification to be compared - /// Boolean - public bool Equals(NOLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 11.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 11.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs deleted file mode 100644 index 0f73302b6..000000000 --- a/Adyen/Model/TransferWebhooks/NZLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// NZLocalAccountIdentification - /// - [DataContract(Name = "NZLocalAccountIdentification")] - public partial class NZLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **nzLocal** - /// - /// **nzLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NzLocal for value: nzLocal - /// - [EnumMember(Value = "nzLocal")] - NzLocal = 1 - - } - - - /// - /// **nzLocal** - /// - /// **nzLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NZLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. (required). - /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NZLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NZLocalAccountIdentification); - } - - /// - /// Returns true if NZLocalAccountIdentification instances are equal - /// - /// Instance of NZLocalAccountIdentification to be compared - /// Boolean - public bool Equals(NZLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 16.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 15) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 15.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/NameLocation.cs b/Adyen/Model/TransferWebhooks/NameLocation.cs deleted file mode 100644 index 9aced707e..000000000 --- a/Adyen/Model/TransferWebhooks/NameLocation.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// NameLocation - /// - [DataContract(Name = "NameLocation")] - public partial class NameLocation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The city where the merchant is located.. - /// The country where the merchant is located in [three-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format.. - /// The home country in [three-digit country code](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) format, used for government-controlled merchants such as embassies.. - /// The name of the merchant's shop or service.. - /// The raw data.. - /// The state where the merchant is located.. - public NameLocation(string city = default(string), string country = default(string), string countryOfOrigin = default(string), string name = default(string), string rawData = default(string), string state = default(string)) - { - this.City = city; - this.Country = country; - this.CountryOfOrigin = countryOfOrigin; - this.Name = name; - this.RawData = rawData; - this.State = state; - } - - /// - /// The city where the merchant is located. - /// - /// The city where the merchant is located. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The country where the merchant is located in [three-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format. - /// - /// The country where the merchant is located in [three-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The home country in [three-digit country code](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) format, used for government-controlled merchants such as embassies. - /// - /// The home country in [three-digit country code](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) format, used for government-controlled merchants such as embassies. - [DataMember(Name = "countryOfOrigin", EmitDefaultValue = false)] - public string CountryOfOrigin { get; set; } - - /// - /// The name of the merchant's shop or service. - /// - /// The name of the merchant's shop or service. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The raw data. - /// - /// The raw data. - [DataMember(Name = "rawData", EmitDefaultValue = false)] - public string RawData { get; set; } - - /// - /// The state where the merchant is located. - /// - /// The state where the merchant is located. - [DataMember(Name = "state", EmitDefaultValue = false)] - public string State { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NameLocation {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CountryOfOrigin: ").Append(CountryOfOrigin).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" RawData: ").Append(RawData).Append("\n"); - sb.Append(" State: ").Append(State).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NameLocation); - } - - /// - /// Returns true if NameLocation instances are equal - /// - /// Instance of NameLocation to be compared - /// Boolean - public bool Equals(NameLocation input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.CountryOfOrigin == input.CountryOfOrigin || - (this.CountryOfOrigin != null && - this.CountryOfOrigin.Equals(input.CountryOfOrigin)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.RawData == input.RawData || - (this.RawData != null && - this.RawData.Equals(input.RawData)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.CountryOfOrigin != null) - { - hashCode = (hashCode * 59) + this.CountryOfOrigin.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.RawData != null) - { - hashCode = (hashCode * 59) + this.RawData.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.cs b/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.cs deleted file mode 100644 index 697ad6e8e..000000000 --- a/Adyen/Model/TransferWebhooks/NumberAndBicAccountIdentification.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// NumberAndBicAccountIdentification - /// - [DataContract(Name = "NumberAndBicAccountIdentification")] - public partial class NumberAndBicAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **numberAndBic** - /// - /// **numberAndBic** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NumberAndBic for value: numberAndBic - /// - [EnumMember(Value = "numberAndBic")] - NumberAndBic = 1 - - } - - - /// - /// **numberAndBic** - /// - /// **numberAndBic** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NumberAndBicAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. (required). - /// additionalBankIdentification. - /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// **numberAndBic** (required) (default to TypeEnum.NumberAndBic). - public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), TypeEnum type = TypeEnum.NumberAndBic) - { - this.AccountNumber = accountNumber; - this.Bic = bic; - this.Type = type; - this.AdditionalBankIdentification = additionalBankIdentification; - } - - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Gets or Sets AdditionalBankIdentification - /// - [DataMember(Name = "additionalBankIdentification", EmitDefaultValue = false)] - public AdditionalBankIdentification AdditionalBankIdentification { get; set; } - - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NumberAndBicAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AdditionalBankIdentification: ").Append(AdditionalBankIdentification).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberAndBicAccountIdentification); - } - - /// - /// Returns true if NumberAndBicAccountIdentification instances are equal - /// - /// Instance of NumberAndBicAccountIdentification to be compared - /// Boolean - public bool Equals(NumberAndBicAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AdditionalBankIdentification == input.AdditionalBankIdentification || - (this.AdditionalBankIdentification != null && - this.AdditionalBankIdentification.Equals(input.AdditionalBankIdentification)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AdditionalBankIdentification != null) - { - hashCode = (hashCode * 59) + this.AdditionalBankIdentification.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 34) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 34.", new [] { "AccountNumber" }); - } - - // Bic (string) maxLength - if (this.Bic != null && this.Bic.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be less than 11.", new [] { "Bic" }); - } - - // Bic (string) minLength - if (this.Bic != null && this.Bic.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be greater than 8.", new [] { "Bic" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.cs deleted file mode 100644 index 429f6bd7d..000000000 --- a/Adyen/Model/TransferWebhooks/PLLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// PLLocalAccountIdentification - /// - [DataContract(Name = "PLLocalAccountIdentification")] - public partial class PLLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **plLocal** - /// - /// **plLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PlLocal for value: plLocal - /// - [EnumMember(Value = "plLocal")] - PlLocal = 1 - - } - - - /// - /// **plLocal** - /// - /// **plLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PLLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. (required). - /// **plLocal** (required) (default to TypeEnum.PlLocal). - public PLLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.PlLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PLLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PLLocalAccountIdentification); - } - - /// - /// Returns true if PLLocalAccountIdentification instances are equal - /// - /// Instance of PLLocalAccountIdentification to be compared - /// Boolean - public bool Equals(PLLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 26.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 26.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/PartyIdentification.cs b/Adyen/Model/TransferWebhooks/PartyIdentification.cs deleted file mode 100644 index 76bdbfdef..000000000 --- a/Adyen/Model/TransferWebhooks/PartyIdentification.cs +++ /dev/null @@ -1,272 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// PartyIdentification - /// - [DataContract(Name = "PartyIdentification")] - public partial class PartyIdentification : IEquatable, IValidatableObject - { - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Individual for value: individual - /// - [EnumMember(Value = "individual")] - Individual = 1, - - /// - /// Enum Organization for value: organization - /// - [EnumMember(Value = "organization")] - Organization = 2, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 3 - - } - - - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**.. - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**.. - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**.. - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**.. - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`.. - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. (default to TypeEnum.Unknown). - public PartyIdentification(Address address = default(Address), DateTime dateOfBirth = default(DateTime), string firstName = default(string), string fullName = default(string), string lastName = default(string), string reference = default(string), TypeEnum? type = TypeEnum.Unknown) - { - this.Address = address; - this.DateOfBirth = dateOfBirth; - this.FirstName = firstName; - this.FullName = fullName; - this.LastName = lastName; - this.Reference = reference; - this.Type = type; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public Address Address { get; set; } - - /// - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. - /// - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - /// - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. - /// - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. - [DataMember(Name = "fullName", EmitDefaultValue = false)] - public string FullName { get; set; } - - /// - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - /// - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`. - /// - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PartyIdentification {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" FullName: ").Append(FullName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PartyIdentification); - } - - /// - /// Returns true if PartyIdentification instances are equal - /// - /// Instance of PartyIdentification to be compared - /// Boolean - public bool Equals(PartyIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.FullName == input.FullName || - (this.FullName != null && - this.FullName.Equals(input.FullName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.FullName != null) - { - hashCode = (hashCode * 59) + this.FullName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/PaymentInstrument.cs b/Adyen/Model/TransferWebhooks/PaymentInstrument.cs deleted file mode 100644 index e3e4f2e04..000000000 --- a/Adyen/Model/TransferWebhooks/PaymentInstrument.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// PaymentInstrument - /// - [DataContract(Name = "PaymentInstrument")] - public partial class PaymentInstrument : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The reference for the resource.. - /// The type of wallet that the network token is associated with.. - public PaymentInstrument(string description = default(string), string id = default(string), string reference = default(string), string tokenType = default(string)) - { - this.Description = description; - this.Id = id; - this.Reference = reference; - this.TokenType = tokenType; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The type of wallet that the network token is associated with. - /// - /// The type of wallet that the network token is associated with. - [DataMember(Name = "tokenType", EmitDefaultValue = false)] - public string TokenType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrument {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" TokenType: ").Append(TokenType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrument); - } - - /// - /// Returns true if PaymentInstrument instances are equal - /// - /// Instance of PaymentInstrument to be compared - /// Boolean - public bool Equals(PaymentInstrument input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.TokenType == input.TokenType || - (this.TokenType != null && - this.TokenType.Equals(input.TokenType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.TokenType != null) - { - hashCode = (hashCode * 59) + this.TokenType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/PlatformPayment.cs b/Adyen/Model/TransferWebhooks/PlatformPayment.cs deleted file mode 100644 index 3c76800a1..000000000 --- a/Adyen/Model/TransferWebhooks/PlatformPayment.cs +++ /dev/null @@ -1,342 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// PlatformPayment - /// - [DataContract(Name = "PlatformPayment")] - public partial class PlatformPayment : IEquatable, IValidatableObject - { - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - [JsonConverter(typeof(StringEnumConverter))] - public enum PlatformPaymentTypeEnum - { - /// - /// Enum AcquiringFees for value: AcquiringFees - /// - [EnumMember(Value = "AcquiringFees")] - AcquiringFees = 1, - - /// - /// Enum AdyenCommission for value: AdyenCommission - /// - [EnumMember(Value = "AdyenCommission")] - AdyenCommission = 2, - - /// - /// Enum AdyenFees for value: AdyenFees - /// - [EnumMember(Value = "AdyenFees")] - AdyenFees = 3, - - /// - /// Enum AdyenMarkup for value: AdyenMarkup - /// - [EnumMember(Value = "AdyenMarkup")] - AdyenMarkup = 4, - - /// - /// Enum BalanceAccount for value: BalanceAccount - /// - [EnumMember(Value = "BalanceAccount")] - BalanceAccount = 5, - - /// - /// Enum ChargebackRemainder for value: ChargebackRemainder - /// - [EnumMember(Value = "ChargebackRemainder")] - ChargebackRemainder = 6, - - /// - /// Enum Commission for value: Commission - /// - [EnumMember(Value = "Commission")] - Commission = 7, - - /// - /// Enum DCCPlatformCommission for value: DCCPlatformCommission - /// - [EnumMember(Value = "DCCPlatformCommission")] - DCCPlatformCommission = 8, - - /// - /// Enum Default for value: Default - /// - [EnumMember(Value = "Default")] - Default = 9, - - /// - /// Enum Interchange for value: Interchange - /// - [EnumMember(Value = "Interchange")] - Interchange = 10, - - /// - /// Enum PaymentFee for value: PaymentFee - /// - [EnumMember(Value = "PaymentFee")] - PaymentFee = 11, - - /// - /// Enum Remainder for value: Remainder - /// - [EnumMember(Value = "Remainder")] - Remainder = 12, - - /// - /// Enum SchemeFee for value: SchemeFee - /// - [EnumMember(Value = "SchemeFee")] - SchemeFee = 13, - - /// - /// Enum Surcharge for value: Surcharge - /// - [EnumMember(Value = "Surcharge")] - Surcharge = 14, - - /// - /// Enum Tip for value: Tip - /// - [EnumMember(Value = "Tip")] - Tip = 15, - - /// - /// Enum TopUp for value: TopUp - /// - [EnumMember(Value = "TopUp")] - TopUp = 16, - - /// - /// Enum VAT for value: VAT - /// - [EnumMember(Value = "VAT")] - VAT = 17 - - } - - - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - [DataMember(Name = "platformPaymentType", EmitDefaultValue = false)] - public PlatformPaymentTypeEnum? PlatformPaymentType { get; set; } - /// - /// **platformPayment** - /// - /// **platformPayment** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 1 - - } - - - /// - /// **platformPayment** - /// - /// **platformPayment** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The capture's merchant reference included in the transfer.. - /// The capture reference included in the transfer.. - /// The payment's merchant reference included in the transfer.. - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax.. - /// The payment reference included in the transfer.. - /// **platformPayment** (default to TypeEnum.PlatformPayment). - public PlatformPayment(string modificationMerchantReference = default(string), string modificationPspReference = default(string), string paymentMerchantReference = default(string), PlatformPaymentTypeEnum? platformPaymentType = default(PlatformPaymentTypeEnum?), string pspPaymentReference = default(string), TypeEnum? type = TypeEnum.PlatformPayment) - { - this.ModificationMerchantReference = modificationMerchantReference; - this.ModificationPspReference = modificationPspReference; - this.PaymentMerchantReference = paymentMerchantReference; - this.PlatformPaymentType = platformPaymentType; - this.PspPaymentReference = pspPaymentReference; - this.Type = type; - } - - /// - /// The capture's merchant reference included in the transfer. - /// - /// The capture's merchant reference included in the transfer. - [DataMember(Name = "modificationMerchantReference", EmitDefaultValue = false)] - public string ModificationMerchantReference { get; set; } - - /// - /// The capture reference included in the transfer. - /// - /// The capture reference included in the transfer. - [DataMember(Name = "modificationPspReference", EmitDefaultValue = false)] - public string ModificationPspReference { get; set; } - - /// - /// The payment's merchant reference included in the transfer. - /// - /// The payment's merchant reference included in the transfer. - [DataMember(Name = "paymentMerchantReference", EmitDefaultValue = false)] - public string PaymentMerchantReference { get; set; } - - /// - /// The payment reference included in the transfer. - /// - /// The payment reference included in the transfer. - [DataMember(Name = "pspPaymentReference", EmitDefaultValue = false)] - public string PspPaymentReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PlatformPayment {\n"); - sb.Append(" ModificationMerchantReference: ").Append(ModificationMerchantReference).Append("\n"); - sb.Append(" ModificationPspReference: ").Append(ModificationPspReference).Append("\n"); - sb.Append(" PaymentMerchantReference: ").Append(PaymentMerchantReference).Append("\n"); - sb.Append(" PlatformPaymentType: ").Append(PlatformPaymentType).Append("\n"); - sb.Append(" PspPaymentReference: ").Append(PspPaymentReference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlatformPayment); - } - - /// - /// Returns true if PlatformPayment instances are equal - /// - /// Instance of PlatformPayment to be compared - /// Boolean - public bool Equals(PlatformPayment input) - { - if (input == null) - { - return false; - } - return - ( - this.ModificationMerchantReference == input.ModificationMerchantReference || - (this.ModificationMerchantReference != null && - this.ModificationMerchantReference.Equals(input.ModificationMerchantReference)) - ) && - ( - this.ModificationPspReference == input.ModificationPspReference || - (this.ModificationPspReference != null && - this.ModificationPspReference.Equals(input.ModificationPspReference)) - ) && - ( - this.PaymentMerchantReference == input.PaymentMerchantReference || - (this.PaymentMerchantReference != null && - this.PaymentMerchantReference.Equals(input.PaymentMerchantReference)) - ) && - ( - this.PlatformPaymentType == input.PlatformPaymentType || - this.PlatformPaymentType.Equals(input.PlatformPaymentType) - ) && - ( - this.PspPaymentReference == input.PspPaymentReference || - (this.PspPaymentReference != null && - this.PspPaymentReference.Equals(input.PspPaymentReference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ModificationMerchantReference != null) - { - hashCode = (hashCode * 59) + this.ModificationMerchantReference.GetHashCode(); - } - if (this.ModificationPspReference != null) - { - hashCode = (hashCode * 59) + this.ModificationPspReference.GetHashCode(); - } - if (this.PaymentMerchantReference != null) - { - hashCode = (hashCode * 59) + this.PaymentMerchantReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlatformPaymentType.GetHashCode(); - if (this.PspPaymentReference != null) - { - hashCode = (hashCode * 59) + this.PspPaymentReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.cs b/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.cs deleted file mode 100644 index a09cc8f1a..000000000 --- a/Adyen/Model/TransferWebhooks/RelayedAuthorisationData.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// RelayedAuthorisationData - /// - [DataContract(Name = "RelayedAuthorisationData")] - public partial class RelayedAuthorisationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`.. - /// Your reference for the relayed authorisation data.. - public RelayedAuthorisationData(Dictionary metadata = default(Dictionary), string reference = default(string)) - { - this.Metadata = metadata; - this.Reference = reference; - } - - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Your reference for the relayed authorisation data. - /// - /// Your reference for the relayed authorisation data. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RelayedAuthorisationData {\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RelayedAuthorisationData); - } - - /// - /// Returns true if RelayedAuthorisationData instances are equal - /// - /// Instance of RelayedAuthorisationData to be compared - /// Boolean - public bool Equals(RelayedAuthorisationData input) - { - if (input == null) - { - return false; - } - return - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/Resource.cs b/Adyen/Model/TransferWebhooks/Resource.cs deleted file mode 100644 index 0647758b2..000000000 --- a/Adyen/Model/TransferWebhooks/Resource.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Resource - /// - [DataContract(Name = "Resource")] - public partial class Resource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the balance platform.. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The ID of the resource.. - public Resource(string balancePlatform = default(string), DateTime creationDate = default(DateTime), string id = default(string)) - { - this.BalancePlatform = balancePlatform; - this.CreationDate = creationDate; - this.Id = id; - } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Resource {\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Resource); - } - - /// - /// Returns true if Resource instances are equal - /// - /// Instance of Resource to be compared - /// Boolean - public bool Equals(Resource input) - { - if (input == null) - { - return false; - } - return - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/ResourceReference.cs b/Adyen/Model/TransferWebhooks/ResourceReference.cs deleted file mode 100644 index 93aaf5b8c..000000000 --- a/Adyen/Model/TransferWebhooks/ResourceReference.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// ResourceReference - /// - [DataContract(Name = "ResourceReference")] - public partial class ResourceReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The reference for the resource.. - public ResourceReference(string description = default(string), string id = default(string), string reference = default(string)) - { - this.Description = description; - this.Id = id; - this.Reference = reference; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResourceReference {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResourceReference); - } - - /// - /// Returns true if ResourceReference instances are equal - /// - /// Instance of ResourceReference to be compared - /// Boolean - public bool Equals(ResourceReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.cs deleted file mode 100644 index 8fcb831c7..000000000 --- a/Adyen/Model/TransferWebhooks/SELocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// SELocalAccountIdentification - /// - [DataContract(Name = "SELocalAccountIdentification")] - public partial class SELocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **seLocal** - /// - /// **seLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum SeLocal for value: seLocal - /// - [EnumMember(Value = "seLocal")] - SeLocal = 1 - - } - - - /// - /// **seLocal** - /// - /// **seLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SELocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. (required). - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. (required). - /// **seLocal** (required) (default to TypeEnum.SeLocal). - public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), TypeEnum type = TypeEnum.SeLocal) - { - this.AccountNumber = accountNumber; - this.ClearingNumber = clearingNumber; - this.Type = type; - } - - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. - /// - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. - [DataMember(Name = "clearingNumber", IsRequired = false, EmitDefaultValue = false)] - public string ClearingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SELocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" ClearingNumber: ").Append(ClearingNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SELocalAccountIdentification); - } - - /// - /// Returns true if SELocalAccountIdentification instances are equal - /// - /// Instance of SELocalAccountIdentification to be compared - /// Boolean - public bool Equals(SELocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.ClearingNumber == input.ClearingNumber || - (this.ClearingNumber != null && - this.ClearingNumber.Equals(input.ClearingNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.ClearingNumber != null) - { - hashCode = (hashCode * 59) + this.ClearingNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 7) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 7.", new [] { "AccountNumber" }); - } - - // ClearingNumber (string) maxLength - if (this.ClearingNumber != null && this.ClearingNumber.Length > 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingNumber, length must be less than 5.", new [] { "ClearingNumber" }); - } - - // ClearingNumber (string) minLength - if (this.ClearingNumber != null && this.ClearingNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingNumber, length must be greater than 4.", new [] { "ClearingNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.cs deleted file mode 100644 index 7fcc9c416..000000000 --- a/Adyen/Model/TransferWebhooks/SGLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// SGLocalAccountIdentification - /// - [DataContract(Name = "SGLocalAccountIdentification")] - public partial class SGLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **sgLocal** - /// - /// **sgLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum SgLocal for value: sgLocal - /// - [EnumMember(Value = "sgLocal")] - SgLocal = 1 - - } - - - /// - /// **sgLocal** - /// - /// **sgLocal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SGLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. (required). - /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// **sgLocal** (default to TypeEnum.SgLocal). - public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), TypeEnum? type = TypeEnum.SgLocal) - { - this.AccountNumber = accountNumber; - this.Bic = bic; - this.Type = type; - } - - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SGLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SGLocalAccountIdentification); - } - - /// - /// Returns true if SGLocalAccountIdentification instances are equal - /// - /// Instance of SGLocalAccountIdentification to be compared - /// Boolean - public bool Equals(SGLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 19.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 4.", new [] { "AccountNumber" }); - } - - // Bic (string) maxLength - if (this.Bic != null && this.Bic.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be less than 11.", new [] { "Bic" }); - } - - // Bic (string) minLength - if (this.Bic != null && this.Bic.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be greater than 8.", new [] { "Bic" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransactionEventViolation.cs b/Adyen/Model/TransferWebhooks/TransactionEventViolation.cs deleted file mode 100644 index 61c005897..000000000 --- a/Adyen/Model/TransferWebhooks/TransactionEventViolation.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransactionEventViolation - /// - [DataContract(Name = "TransactionEventViolation")] - public partial class TransactionEventViolation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An explanation about why the transaction rule failed.. - /// transactionRule. - /// transactionRuleSource. - public TransactionEventViolation(string reason = default(string), TransactionRuleReference transactionRule = default(TransactionRuleReference), TransactionRuleSource transactionRuleSource = default(TransactionRuleSource)) - { - this.Reason = reason; - this.TransactionRule = transactionRule; - this.TransactionRuleSource = transactionRuleSource; - } - - /// - /// An explanation about why the transaction rule failed. - /// - /// An explanation about why the transaction rule failed. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Gets or Sets TransactionRule - /// - [DataMember(Name = "transactionRule", EmitDefaultValue = false)] - public TransactionRuleReference TransactionRule { get; set; } - - /// - /// Gets or Sets TransactionRuleSource - /// - [DataMember(Name = "transactionRuleSource", EmitDefaultValue = false)] - public TransactionRuleSource TransactionRuleSource { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionEventViolation {\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" TransactionRule: ").Append(TransactionRule).Append("\n"); - sb.Append(" TransactionRuleSource: ").Append(TransactionRuleSource).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionEventViolation); - } - - /// - /// Returns true if TransactionEventViolation instances are equal - /// - /// Instance of TransactionEventViolation to be compared - /// Boolean - public bool Equals(TransactionEventViolation input) - { - if (input == null) - { - return false; - } - return - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ) && - ( - this.TransactionRule == input.TransactionRule || - (this.TransactionRule != null && - this.TransactionRule.Equals(input.TransactionRule)) - ) && - ( - this.TransactionRuleSource == input.TransactionRuleSource || - (this.TransactionRuleSource != null && - this.TransactionRuleSource.Equals(input.TransactionRuleSource)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - if (this.TransactionRule != null) - { - hashCode = (hashCode * 59) + this.TransactionRule.GetHashCode(); - } - if (this.TransactionRuleSource != null) - { - hashCode = (hashCode * 59) + this.TransactionRuleSource.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransactionRuleReference.cs b/Adyen/Model/TransferWebhooks/TransactionRuleReference.cs deleted file mode 100644 index c05436065..000000000 --- a/Adyen/Model/TransferWebhooks/TransactionRuleReference.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransactionRuleReference - /// - [DataContract(Name = "TransactionRuleReference")] - public partial class TransactionRuleReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The outcome type of the rule.. - /// The reference for the resource.. - /// The score of the rule in case it's a scoreBased rule.. - public TransactionRuleReference(string description = default(string), string id = default(string), string outcomeType = default(string), string reference = default(string), int? score = default(int?)) - { - this.Description = description; - this.Id = id; - this.OutcomeType = outcomeType; - this.Reference = reference; - this.Score = score; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The outcome type of the rule. - /// - /// The outcome type of the rule. - [DataMember(Name = "outcomeType", EmitDefaultValue = false)] - public string OutcomeType { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The score of the rule in case it's a scoreBased rule. - /// - /// The score of the rule in case it's a scoreBased rule. - [DataMember(Name = "score", EmitDefaultValue = false)] - public int? Score { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleReference {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" OutcomeType: ").Append(OutcomeType).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Score: ").Append(Score).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleReference); - } - - /// - /// Returns true if TransactionRuleReference instances are equal - /// - /// Instance of TransactionRuleReference to be compared - /// Boolean - public bool Equals(TransactionRuleReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.OutcomeType == input.OutcomeType || - (this.OutcomeType != null && - this.OutcomeType.Equals(input.OutcomeType)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Score == input.Score || - this.Score.Equals(input.Score) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.OutcomeType != null) - { - hashCode = (hashCode * 59) + this.OutcomeType.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Score.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransactionRuleSource.cs b/Adyen/Model/TransferWebhooks/TransactionRuleSource.cs deleted file mode 100644 index 102d95406..000000000 --- a/Adyen/Model/TransferWebhooks/TransactionRuleSource.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransactionRuleSource - /// - [DataContract(Name = "TransactionRuleSource")] - public partial class TransactionRuleSource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// ID of the resource, when applicable.. - /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen.. - public TransactionRuleSource(string id = default(string), string type = default(string)) - { - this.Id = id; - this.Type = type; - } - - /// - /// ID of the resource, when applicable. - /// - /// ID of the resource, when applicable. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen. - /// - /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleSource {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleSource); - } - - /// - /// Returns true if TransactionRuleSource instances are equal - /// - /// Instance of TransactionRuleSource to be compared - /// Boolean - public bool Equals(TransactionRuleSource input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransactionRulesResult.cs b/Adyen/Model/TransferWebhooks/TransactionRulesResult.cs deleted file mode 100644 index ea6333b5e..000000000 --- a/Adyen/Model/TransferWebhooks/TransactionRulesResult.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransactionRulesResult - /// - [DataContract(Name = "TransactionRulesResult")] - public partial class TransactionRulesResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The advice given by the Risk analysis.. - /// Indicates whether the transaction passed the evaluation for all hardblock rules. - /// The score of the Risk analysis.. - /// Array containing all the transaction rules that the transaction triggered.. - public TransactionRulesResult(string advice = default(string), bool? allHardBlockRulesPassed = default(bool?), int? score = default(int?), List triggeredTransactionRules = default(List)) - { - this.Advice = advice; - this.AllHardBlockRulesPassed = allHardBlockRulesPassed; - this.Score = score; - this.TriggeredTransactionRules = triggeredTransactionRules; - } - - /// - /// The advice given by the Risk analysis. - /// - /// The advice given by the Risk analysis. - [DataMember(Name = "advice", EmitDefaultValue = false)] - public string Advice { get; set; } - - /// - /// Indicates whether the transaction passed the evaluation for all hardblock rules - /// - /// Indicates whether the transaction passed the evaluation for all hardblock rules - [DataMember(Name = "allHardBlockRulesPassed", EmitDefaultValue = false)] - public bool? AllHardBlockRulesPassed { get; set; } - - /// - /// The score of the Risk analysis. - /// - /// The score of the Risk analysis. - [DataMember(Name = "score", EmitDefaultValue = false)] - public int? Score { get; set; } - - /// - /// Array containing all the transaction rules that the transaction triggered. - /// - /// Array containing all the transaction rules that the transaction triggered. - [DataMember(Name = "triggeredTransactionRules", EmitDefaultValue = false)] - public List TriggeredTransactionRules { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRulesResult {\n"); - sb.Append(" Advice: ").Append(Advice).Append("\n"); - sb.Append(" AllHardBlockRulesPassed: ").Append(AllHardBlockRulesPassed).Append("\n"); - sb.Append(" Score: ").Append(Score).Append("\n"); - sb.Append(" TriggeredTransactionRules: ").Append(TriggeredTransactionRules).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRulesResult); - } - - /// - /// Returns true if TransactionRulesResult instances are equal - /// - /// Instance of TransactionRulesResult to be compared - /// Boolean - public bool Equals(TransactionRulesResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Advice == input.Advice || - (this.Advice != null && - this.Advice.Equals(input.Advice)) - ) && - ( - this.AllHardBlockRulesPassed == input.AllHardBlockRulesPassed || - this.AllHardBlockRulesPassed.Equals(input.AllHardBlockRulesPassed) - ) && - ( - this.Score == input.Score || - this.Score.Equals(input.Score) - ) && - ( - this.TriggeredTransactionRules == input.TriggeredTransactionRules || - this.TriggeredTransactionRules != null && - input.TriggeredTransactionRules != null && - this.TriggeredTransactionRules.SequenceEqual(input.TriggeredTransactionRules) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Advice != null) - { - hashCode = (hashCode * 59) + this.Advice.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AllHardBlockRulesPassed.GetHashCode(); - hashCode = (hashCode * 59) + this.Score.GetHashCode(); - if (this.TriggeredTransactionRules != null) - { - hashCode = (hashCode * 59) + this.TriggeredTransactionRules.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferData.cs b/Adyen/Model/TransferWebhooks/TransferData.cs deleted file mode 100644 index a54e12985..000000000 --- a/Adyen/Model/TransferWebhooks/TransferData.cs +++ /dev/null @@ -1,1449 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransferData - /// - [DataContract(Name = "TransferData")] - public partial class TransferData : IEquatable, IValidatableObject - { - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 3, - - /// - /// Enum IssuedCard for value: issuedCard - /// - [EnumMember(Value = "issuedCard")] - IssuedCard = 4, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 5, - - /// - /// Enum TopUp for value: topUp - /// - [EnumMember(Value = "topUp")] - TopUp = 6 - - } - - - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - [DataMember(Name = "category", IsRequired = false, EmitDefaultValue = false)] - public CategoryEnum Category { get; set; } - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - [JsonConverter(typeof(StringEnumConverter))] - public enum DirectionEnum - { - /// - /// Enum Incoming for value: incoming - /// - [EnumMember(Value = "incoming")] - Incoming = 1, - - /// - /// Enum Outgoing for value: outgoing - /// - [EnumMember(Value = "outgoing")] - Outgoing = 2 - - } - - - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - [DataMember(Name = "direction", EmitDefaultValue = false)] - public DirectionEnum? Direction { get; set; } - /// - /// Additional information about the status of the transfer. - /// - /// Additional information about the status of the transfer. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 16, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 17, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 18, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 19, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 20, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 21, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 22, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 23, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 24 - - } - - - /// - /// Additional information about the status of the transfer. - /// - /// Additional information about the status of the transfer. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ApprovalPending for value: approvalPending - /// - [EnumMember(Value = "approvalPending")] - ApprovalPending = 1, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 2, - - /// - /// Enum AtmWithdrawalReversalPending for value: atmWithdrawalReversalPending - /// - [EnumMember(Value = "atmWithdrawalReversalPending")] - AtmWithdrawalReversalPending = 3, - - /// - /// Enum AtmWithdrawalReversed for value: atmWithdrawalReversed - /// - [EnumMember(Value = "atmWithdrawalReversed")] - AtmWithdrawalReversed = 4, - - /// - /// Enum AuthAdjustmentAuthorised for value: authAdjustmentAuthorised - /// - [EnumMember(Value = "authAdjustmentAuthorised")] - AuthAdjustmentAuthorised = 5, - - /// - /// Enum AuthAdjustmentError for value: authAdjustmentError - /// - [EnumMember(Value = "authAdjustmentError")] - AuthAdjustmentError = 6, - - /// - /// Enum AuthAdjustmentRefused for value: authAdjustmentRefused - /// - [EnumMember(Value = "authAdjustmentRefused")] - AuthAdjustmentRefused = 7, - - /// - /// Enum Authorised for value: authorised - /// - [EnumMember(Value = "authorised")] - Authorised = 8, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 9, - - /// - /// Enum BankTransferPending for value: bankTransferPending - /// - [EnumMember(Value = "bankTransferPending")] - BankTransferPending = 10, - - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 11, - - /// - /// Enum BookingPending for value: bookingPending - /// - [EnumMember(Value = "bookingPending")] - BookingPending = 12, - - /// - /// Enum Cancelled for value: cancelled - /// - [EnumMember(Value = "cancelled")] - Cancelled = 13, - - /// - /// Enum CapturePending for value: capturePending - /// - [EnumMember(Value = "capturePending")] - CapturePending = 14, - - /// - /// Enum CaptureReversalPending for value: captureReversalPending - /// - [EnumMember(Value = "captureReversalPending")] - CaptureReversalPending = 15, - - /// - /// Enum CaptureReversed for value: captureReversed - /// - [EnumMember(Value = "captureReversed")] - CaptureReversed = 16, - - /// - /// Enum Captured for value: captured - /// - [EnumMember(Value = "captured")] - Captured = 17, - - /// - /// Enum CapturedExternally for value: capturedExternally - /// - [EnumMember(Value = "capturedExternally")] - CapturedExternally = 18, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 19, - - /// - /// Enum ChargebackExternally for value: chargebackExternally - /// - [EnumMember(Value = "chargebackExternally")] - ChargebackExternally = 20, - - /// - /// Enum ChargebackPending for value: chargebackPending - /// - [EnumMember(Value = "chargebackPending")] - ChargebackPending = 21, - - /// - /// Enum ChargebackReversalPending for value: chargebackReversalPending - /// - [EnumMember(Value = "chargebackReversalPending")] - ChargebackReversalPending = 22, - - /// - /// Enum ChargebackReversed for value: chargebackReversed - /// - [EnumMember(Value = "chargebackReversed")] - ChargebackReversed = 23, - - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 24, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 25, - - /// - /// Enum DepositCorrectionPending for value: depositCorrectionPending - /// - [EnumMember(Value = "depositCorrectionPending")] - DepositCorrectionPending = 26, - - /// - /// Enum Dispute for value: dispute - /// - [EnumMember(Value = "dispute")] - Dispute = 27, - - /// - /// Enum DisputeClosed for value: disputeClosed - /// - [EnumMember(Value = "disputeClosed")] - DisputeClosed = 28, - - /// - /// Enum DisputeExpired for value: disputeExpired - /// - [EnumMember(Value = "disputeExpired")] - DisputeExpired = 29, - - /// - /// Enum DisputeNeedsReview for value: disputeNeedsReview - /// - [EnumMember(Value = "disputeNeedsReview")] - DisputeNeedsReview = 30, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 31, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 32, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 33, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 34, - - /// - /// Enum FeePending for value: feePending - /// - [EnumMember(Value = "feePending")] - FeePending = 35, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 36, - - /// - /// Enum InternalTransferPending for value: internalTransferPending - /// - [EnumMember(Value = "internalTransferPending")] - InternalTransferPending = 37, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 38, - - /// - /// Enum InvoiceDeductionPending for value: invoiceDeductionPending - /// - [EnumMember(Value = "invoiceDeductionPending")] - InvoiceDeductionPending = 39, - - /// - /// Enum ManualCorrectionPending for value: manualCorrectionPending - /// - [EnumMember(Value = "manualCorrectionPending")] - ManualCorrectionPending = 40, - - /// - /// Enum ManuallyCorrected for value: manuallyCorrected - /// - [EnumMember(Value = "manuallyCorrected")] - ManuallyCorrected = 41, - - /// - /// Enum MatchedStatement for value: matchedStatement - /// - [EnumMember(Value = "matchedStatement")] - MatchedStatement = 42, - - /// - /// Enum MatchedStatementPending for value: matchedStatementPending - /// - [EnumMember(Value = "matchedStatementPending")] - MatchedStatementPending = 43, - - /// - /// Enum MerchantPayin for value: merchantPayin - /// - [EnumMember(Value = "merchantPayin")] - MerchantPayin = 44, - - /// - /// Enum MerchantPayinPending for value: merchantPayinPending - /// - [EnumMember(Value = "merchantPayinPending")] - MerchantPayinPending = 45, - - /// - /// Enum MerchantPayinReversed for value: merchantPayinReversed - /// - [EnumMember(Value = "merchantPayinReversed")] - MerchantPayinReversed = 46, - - /// - /// Enum MerchantPayinReversedPending for value: merchantPayinReversedPending - /// - [EnumMember(Value = "merchantPayinReversedPending")] - MerchantPayinReversedPending = 47, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 48, - - /// - /// Enum MiscCostPending for value: miscCostPending - /// - [EnumMember(Value = "miscCostPending")] - MiscCostPending = 49, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 50, - - /// - /// Enum PaymentCostPending for value: paymentCostPending - /// - [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 51, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 52, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 53, - - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 54, - - /// - /// Enum RefundPending for value: refundPending - /// - [EnumMember(Value = "refundPending")] - RefundPending = 55, - - /// - /// Enum RefundReversalPending for value: refundReversalPending - /// - [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 56, - - /// - /// Enum RefundReversed for value: refundReversed - /// - [EnumMember(Value = "refundReversed")] - RefundReversed = 57, - - /// - /// Enum Refunded for value: refunded - /// - [EnumMember(Value = "refunded")] - Refunded = 58, - - /// - /// Enum RefundedExternally for value: refundedExternally - /// - [EnumMember(Value = "refundedExternally")] - RefundedExternally = 59, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 60, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 61, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 62, - - /// - /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending - /// - [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 63, - - /// - /// Enum Returned for value: returned - /// - [EnumMember(Value = "returned")] - Returned = 64, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 65, - - /// - /// Enum SecondChargebackPending for value: secondChargebackPending - /// - [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 66, - - /// - /// Enum Undefined for value: undefined - /// - [EnumMember(Value = "undefined")] - Undefined = 67 - - } - - - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Payment for value: payment - /// - [EnumMember(Value = "payment")] - Payment = 1, - - /// - /// Enum Capture for value: capture - /// - [EnumMember(Value = "capture")] - Capture = 2, - - /// - /// Enum CaptureReversal for value: captureReversal - /// - [EnumMember(Value = "captureReversal")] - CaptureReversal = 3, - - /// - /// Enum Refund for value: refund - /// - [EnumMember(Value = "refund")] - Refund = 4, - - /// - /// Enum RefundReversal for value: refundReversal - /// - [EnumMember(Value = "refundReversal")] - RefundReversal = 5, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 6, - - /// - /// Enum ChargebackCorrection for value: chargebackCorrection - /// - [EnumMember(Value = "chargebackCorrection")] - ChargebackCorrection = 7, - - /// - /// Enum ChargebackReversal for value: chargebackReversal - /// - [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 8, - - /// - /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection - /// - [EnumMember(Value = "chargebackReversalCorrection")] - ChargebackReversalCorrection = 9, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 10, - - /// - /// Enum SecondChargebackCorrection for value: secondChargebackCorrection - /// - [EnumMember(Value = "secondChargebackCorrection")] - SecondChargebackCorrection = 11, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 12, - - /// - /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal - /// - [EnumMember(Value = "atmWithdrawalReversal")] - AtmWithdrawalReversal = 13, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 14, - - /// - /// Enum InternalDirectDebit for value: internalDirectDebit - /// - [EnumMember(Value = "internalDirectDebit")] - InternalDirectDebit = 15, - - /// - /// Enum ManualCorrection for value: manualCorrection - /// - [EnumMember(Value = "manualCorrection")] - ManualCorrection = 16, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 17, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 18, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 19, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 20, - - /// - /// Enum BankDirectDebit for value: bankDirectDebit - /// - [EnumMember(Value = "bankDirectDebit")] - BankDirectDebit = 21, - - /// - /// Enum CardTransfer for value: cardTransfer - /// - [EnumMember(Value = "cardTransfer")] - CardTransfer = 22, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 23, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 24, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 25, - - /// - /// Enum Leftover for value: leftover - /// - [EnumMember(Value = "leftover")] - Leftover = 26, - - /// - /// Enum Grant for value: grant - /// - [EnumMember(Value = "grant")] - Grant = 27, - - /// - /// Enum CapitalFundsCollection for value: capitalFundsCollection - /// - [EnumMember(Value = "capitalFundsCollection")] - CapitalFundsCollection = 28, - - /// - /// Enum CashOutInstruction for value: cashOutInstruction - /// - [EnumMember(Value = "cashOutInstruction")] - CashOutInstruction = 29, - - /// - /// Enum CashoutFee for value: cashoutFee - /// - [EnumMember(Value = "cashoutFee")] - CashoutFee = 30, - - /// - /// Enum CashoutRepayment for value: cashoutRepayment - /// - [EnumMember(Value = "cashoutRepayment")] - CashoutRepayment = 31, - - /// - /// Enum CashoutFunding for value: cashoutFunding - /// - [EnumMember(Value = "cashoutFunding")] - CashoutFunding = 32, - - /// - /// Enum Repayment for value: repayment - /// - [EnumMember(Value = "repayment")] - Repayment = 33, - - /// - /// Enum Installment for value: installment - /// - [EnumMember(Value = "installment")] - Installment = 34, - - /// - /// Enum InstallmentReversal for value: installmentReversal - /// - [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 35, - - /// - /// Enum BalanceAdjustment for value: balanceAdjustment - /// - [EnumMember(Value = "balanceAdjustment")] - BalanceAdjustment = 36, - - /// - /// Enum BalanceRollover for value: balanceRollover - /// - [EnumMember(Value = "balanceRollover")] - BalanceRollover = 37, - - /// - /// Enum BalanceMigration for value: balanceMigration - /// - [EnumMember(Value = "balanceMigration")] - BalanceMigration = 38 - - } - - - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferData() { } - /// - /// Initializes a new instance of the class. - /// - /// accountHolder. - /// amount (required). - /// balanceAccount. - /// The unique identifier of the balance platform.. - /// The list of the latest balance statuses in the transfer.. - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. (required). - /// categoryData. - /// counterparty. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**. - /// directDebitInformation. - /// The direction of the transfer. Possible values: **incoming**, **outgoing**.. - /// The unique identifier of the latest transfer event. Included only when the `category` is **issuedCard**.. - /// The list of events leading up to the current status of the transfer.. - /// externalReason. - /// The ID of the resource.. - /// paymentInstrument. - /// Additional information about the status of the transfer.. - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.. - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.. - /// review. - /// The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order.. - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. (required). - /// tracking. - /// transactionRulesResult. - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.. - public TransferData(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), string balancePlatform = default(string), List balances = default(List), CategoryEnum category = default(CategoryEnum), TransferDataCategoryData categoryData = default(TransferDataCategoryData), TransferNotificationCounterParty counterparty = default(TransferNotificationCounterParty), DateTime creationDate = default(DateTime), string description = default(string), DirectDebitInformation directDebitInformation = default(DirectDebitInformation), DirectionEnum? direction = default(DirectionEnum?), string eventId = default(string), List events = default(List), ExternalReason externalReason = default(ExternalReason), string id = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument), ReasonEnum? reason = default(ReasonEnum?), string reference = default(string), string referenceForBeneficiary = default(string), TransferReview review = default(TransferReview), int? sequenceNumber = default(int?), StatusEnum status = default(StatusEnum), TransferDataTracking tracking = default(TransferDataTracking), TransactionRulesResult transactionRulesResult = default(TransactionRulesResult), TypeEnum? type = default(TypeEnum?)) - { - this.Amount = amount; - this.Category = category; - this.Status = status; - this.AccountHolder = accountHolder; - this.BalanceAccount = balanceAccount; - this.BalancePlatform = balancePlatform; - this.Balances = balances; - this.CategoryData = categoryData; - this.Counterparty = counterparty; - this.CreationDate = creationDate; - this.Description = description; - this.DirectDebitInformation = directDebitInformation; - this.Direction = direction; - this.EventId = eventId; - this.Events = events; - this.ExternalReason = externalReason; - this.Id = id; - this.PaymentInstrument = paymentInstrument; - this.Reason = reason; - this.Reference = reference; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Review = review; - this.SequenceNumber = sequenceNumber; - this.Tracking = tracking; - this.TransactionRulesResult = transactionRulesResult; - this.Type = type; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", EmitDefaultValue = false)] - public ResourceReference AccountHolder { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets BalanceAccount - /// - [DataMember(Name = "balanceAccount", EmitDefaultValue = false)] - public ResourceReference BalanceAccount { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The list of the latest balance statuses in the transfer. - /// - /// The list of the latest balance statuses in the transfer. - [DataMember(Name = "balances", EmitDefaultValue = false)] - public List Balances { get; set; } - - /// - /// Gets or Sets CategoryData - /// - [DataMember(Name = "categoryData", EmitDefaultValue = false)] - public TransferDataCategoryData CategoryData { get; set; } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", EmitDefaultValue = false)] - public TransferNotificationCounterParty Counterparty { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** - /// - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Gets or Sets DirectDebitInformation - /// - [DataMember(Name = "directDebitInformation", EmitDefaultValue = false)] - public DirectDebitInformation DirectDebitInformation { get; set; } - - /// - /// The unique identifier of the latest transfer event. Included only when the `category` is **issuedCard**. - /// - /// The unique identifier of the latest transfer event. Included only when the `category` is **issuedCard**. - [DataMember(Name = "eventId", EmitDefaultValue = false)] - public string EventId { get; set; } - - /// - /// The list of events leading up to the current status of the transfer. - /// - /// The list of events leading up to the current status of the transfer. - [DataMember(Name = "events", EmitDefaultValue = false)] - public List Events { get; set; } - - /// - /// Gets or Sets ExternalReason - /// - [DataMember(Name = "externalReason", EmitDefaultValue = false)] - public ExternalReason ExternalReason { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets PaymentInstrument - /// - [DataMember(Name = "paymentInstrument", EmitDefaultValue = false)] - public PaymentInstrument PaymentInstrument { get; set; } - - /// - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. - /// - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. - /// - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Review - /// - [DataMember(Name = "review", EmitDefaultValue = false)] - public TransferReview Review { get; set; } - - /// - /// The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order. - /// - /// The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order. - [DataMember(Name = "sequenceNumber", EmitDefaultValue = false)] - public int? SequenceNumber { get; set; } - - /// - /// Gets or Sets Tracking - /// - [DataMember(Name = "tracking", EmitDefaultValue = false)] - public TransferDataTracking Tracking { get; set; } - - /// - /// Gets or Sets TransactionRulesResult - /// - [DataMember(Name = "transactionRulesResult", EmitDefaultValue = false)] - public TransactionRulesResult TransactionRulesResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferData {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BalanceAccount: ").Append(BalanceAccount).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Balances: ").Append(Balances).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" CategoryData: ").Append(CategoryData).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DirectDebitInformation: ").Append(DirectDebitInformation).Append("\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" EventId: ").Append(EventId).Append("\n"); - sb.Append(" Events: ").Append(Events).Append("\n"); - sb.Append(" ExternalReason: ").Append(ExternalReason).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrument: ").Append(PaymentInstrument).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Review: ").Append(Review).Append("\n"); - sb.Append(" SequenceNumber: ").Append(SequenceNumber).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Tracking: ").Append(Tracking).Append("\n"); - sb.Append(" TransactionRulesResult: ").Append(TransactionRulesResult).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferData); - } - - /// - /// Returns true if TransferData instances are equal - /// - /// Instance of TransferData to be compared - /// Boolean - public bool Equals(TransferData input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BalanceAccount == input.BalanceAccount || - (this.BalanceAccount != null && - this.BalanceAccount.Equals(input.BalanceAccount)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Balances == input.Balances || - this.Balances != null && - input.Balances != null && - this.Balances.SequenceEqual(input.Balances) - ) && - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.CategoryData == input.CategoryData || - (this.CategoryData != null && - this.CategoryData.Equals(input.CategoryData)) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DirectDebitInformation == input.DirectDebitInformation || - (this.DirectDebitInformation != null && - this.DirectDebitInformation.Equals(input.DirectDebitInformation)) - ) && - ( - this.Direction == input.Direction || - this.Direction.Equals(input.Direction) - ) && - ( - this.EventId == input.EventId || - (this.EventId != null && - this.EventId.Equals(input.EventId)) - ) && - ( - this.Events == input.Events || - this.Events != null && - input.Events != null && - this.Events.SequenceEqual(input.Events) - ) && - ( - this.ExternalReason == input.ExternalReason || - (this.ExternalReason != null && - this.ExternalReason.Equals(input.ExternalReason)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrument == input.PaymentInstrument || - (this.PaymentInstrument != null && - this.PaymentInstrument.Equals(input.PaymentInstrument)) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Review == input.Review || - (this.Review != null && - this.Review.Equals(input.Review)) - ) && - ( - this.SequenceNumber == input.SequenceNumber || - this.SequenceNumber.Equals(input.SequenceNumber) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Tracking == input.Tracking || - (this.Tracking != null && - this.Tracking.Equals(input.Tracking)) - ) && - ( - this.TransactionRulesResult == input.TransactionRulesResult || - (this.TransactionRulesResult != null && - this.TransactionRulesResult.Equals(input.TransactionRulesResult)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BalanceAccount != null) - { - hashCode = (hashCode * 59) + this.BalanceAccount.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Balances != null) - { - hashCode = (hashCode * 59) + this.Balances.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.CategoryData != null) - { - hashCode = (hashCode * 59) + this.CategoryData.GetHashCode(); - } - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DirectDebitInformation != null) - { - hashCode = (hashCode * 59) + this.DirectDebitInformation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - if (this.EventId != null) - { - hashCode = (hashCode * 59) + this.EventId.GetHashCode(); - } - if (this.Events != null) - { - hashCode = (hashCode * 59) + this.Events.GetHashCode(); - } - if (this.ExternalReason != null) - { - hashCode = (hashCode * 59) + this.ExternalReason.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrument != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrument.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - if (this.Review != null) - { - hashCode = (hashCode * 59) + this.Review.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SequenceNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Tracking != null) - { - hashCode = (hashCode * 59) + this.Tracking.GetHashCode(); - } - if (this.TransactionRulesResult != null) - { - hashCode = (hashCode * 59) + this.TransactionRulesResult.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferDataCategoryData.cs b/Adyen/Model/TransferWebhooks/TransferDataCategoryData.cs deleted file mode 100644 index 51e7d283b..000000000 --- a/Adyen/Model/TransferWebhooks/TransferDataCategoryData.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// The relevant data according to the transfer category. - /// - [JsonConverter(typeof(TransferDataCategoryDataJsonConverter))] - [DataContract(Name = "TransferData_categoryData")] - public partial class TransferDataCategoryData : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BankCategoryData. - public TransferDataCategoryData(BankCategoryData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InternalCategoryData. - public TransferDataCategoryData(InternalCategoryData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IssuedCard. - public TransferDataCategoryData(IssuedCard actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PlatformPayment. - public TransferDataCategoryData(PlatformPayment actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(BankCategoryData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(InternalCategoryData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IssuedCard)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PlatformPayment)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment"); - } - } - } - - /// - /// Get the actual instance of `BankCategoryData`. If the actual instance is not `BankCategoryData`, - /// the InvalidClassException will be thrown - /// - /// An instance of BankCategoryData - public BankCategoryData GetBankCategoryData() - { - return (BankCategoryData)this.ActualInstance; - } - - /// - /// Get the actual instance of `InternalCategoryData`. If the actual instance is not `InternalCategoryData`, - /// the InvalidClassException will be thrown - /// - /// An instance of InternalCategoryData - public InternalCategoryData GetInternalCategoryData() - { - return (InternalCategoryData)this.ActualInstance; - } - - /// - /// Get the actual instance of `IssuedCard`. If the actual instance is not `IssuedCard`, - /// the InvalidClassException will be thrown - /// - /// An instance of IssuedCard - public IssuedCard GetIssuedCard() - { - return (IssuedCard)this.ActualInstance; - } - - /// - /// Get the actual instance of `PlatformPayment`. If the actual instance is not `PlatformPayment`, - /// the InvalidClassException will be thrown - /// - /// An instance of PlatformPayment - public PlatformPayment GetPlatformPayment() - { - return (PlatformPayment)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferDataCategoryData {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferDataCategoryData.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferDataCategoryData - /// - /// JSON string - /// An instance of TransferDataCategoryData - public static TransferDataCategoryData FromJson(string jsonString) - { - TransferDataCategoryData newTransferDataCategoryData = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferDataCategoryData; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the BankCategoryData type enums - if (ContainsValue(type)) - { - newTransferDataCategoryData = new TransferDataCategoryData(JsonConvert.DeserializeObject(jsonString, TransferDataCategoryData.SerializerSettings)); - matchedTypes.Add("BankCategoryData"); - match++; - } - // Check if the jsonString type enum matches the InternalCategoryData type enums - if (ContainsValue(type)) - { - newTransferDataCategoryData = new TransferDataCategoryData(JsonConvert.DeserializeObject(jsonString, TransferDataCategoryData.SerializerSettings)); - matchedTypes.Add("InternalCategoryData"); - match++; - } - // Check if the jsonString type enum matches the IssuedCard type enums - if (ContainsValue(type)) - { - newTransferDataCategoryData = new TransferDataCategoryData(JsonConvert.DeserializeObject(jsonString, TransferDataCategoryData.SerializerSettings)); - matchedTypes.Add("IssuedCard"); - match++; - } - // Check if the jsonString type enum matches the PlatformPayment type enums - if (ContainsValue(type)) - { - newTransferDataCategoryData = new TransferDataCategoryData(JsonConvert.DeserializeObject(jsonString, TransferDataCategoryData.SerializerSettings)); - matchedTypes.Add("PlatformPayment"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferDataCategoryData; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferDataCategoryData); - } - - /// - /// Returns true if TransferDataCategoryData instances are equal - /// - /// Instance of TransferDataCategoryData to be compared - /// Boolean - public bool Equals(TransferDataCategoryData input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferDataCategoryData - /// - public class TransferDataCategoryDataJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferDataCategoryData).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferDataCategoryData.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferDataTracking.cs b/Adyen/Model/TransferWebhooks/TransferDataTracking.cs deleted file mode 100644 index fda0fd0f3..000000000 --- a/Adyen/Model/TransferWebhooks/TransferDataTracking.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// The latest tracking information of the transfer. - /// - [JsonConverter(typeof(TransferDataTrackingJsonConverter))] - [DataContract(Name = "TransferData_tracking")] - public partial class TransferDataTracking : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ConfirmationTrackingData. - public TransferDataTracking(ConfirmationTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of EstimationTrackingData. - public TransferDataTracking(EstimationTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InternalReviewTrackingData. - public TransferDataTracking(InternalReviewTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(ConfirmationTrackingData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(EstimationTrackingData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(InternalReviewTrackingData)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: ConfirmationTrackingData, EstimationTrackingData, InternalReviewTrackingData"); - } - } - } - - /// - /// Get the actual instance of `ConfirmationTrackingData`. If the actual instance is not `ConfirmationTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of ConfirmationTrackingData - public ConfirmationTrackingData GetConfirmationTrackingData() - { - return (ConfirmationTrackingData)this.ActualInstance; - } - - /// - /// Get the actual instance of `EstimationTrackingData`. If the actual instance is not `EstimationTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of EstimationTrackingData - public EstimationTrackingData GetEstimationTrackingData() - { - return (EstimationTrackingData)this.ActualInstance; - } - - /// - /// Get the actual instance of `InternalReviewTrackingData`. If the actual instance is not `InternalReviewTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of InternalReviewTrackingData - public InternalReviewTrackingData GetInternalReviewTrackingData() - { - return (InternalReviewTrackingData)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferDataTracking {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferDataTracking.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferDataTracking - /// - /// JSON string - /// An instance of TransferDataTracking - public static TransferDataTracking FromJson(string jsonString) - { - TransferDataTracking newTransferDataTracking = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferDataTracking; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the ConfirmationTrackingData type enums - if (ContainsValue(type)) - { - newTransferDataTracking = new TransferDataTracking(JsonConvert.DeserializeObject(jsonString, TransferDataTracking.SerializerSettings)); - matchedTypes.Add("ConfirmationTrackingData"); - match++; - } - // Check if the jsonString type enum matches the EstimationTrackingData type enums - if (ContainsValue(type)) - { - newTransferDataTracking = new TransferDataTracking(JsonConvert.DeserializeObject(jsonString, TransferDataTracking.SerializerSettings)); - matchedTypes.Add("EstimationTrackingData"); - match++; - } - // Check if the jsonString type enum matches the InternalReviewTrackingData type enums - if (ContainsValue(type)) - { - newTransferDataTracking = new TransferDataTracking(JsonConvert.DeserializeObject(jsonString, TransferDataTracking.SerializerSettings)); - matchedTypes.Add("InternalReviewTrackingData"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferDataTracking; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferDataTracking); - } - - /// - /// Returns true if TransferDataTracking instances are equal - /// - /// Instance of TransferDataTracking to be compared - /// Boolean - public bool Equals(TransferDataTracking input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferDataTracking - /// - public class TransferDataTrackingJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferDataTracking).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferDataTracking.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferEvent.cs b/Adyen/Model/TransferWebhooks/TransferEvent.cs deleted file mode 100644 index 492604573..000000000 --- a/Adyen/Model/TransferWebhooks/TransferEvent.cs +++ /dev/null @@ -1,1023 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransferEvent - /// - [DataContract(Name = "TransferEvent")] - public partial class TransferEvent : IEquatable, IValidatableObject - { - /// - /// The reason for the transfer status. - /// - /// The reason for the transfer status. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 16, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 17, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 18, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 19, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 20, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 21, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 22, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 23, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 24 - - } - - - /// - /// The reason for the transfer status. - /// - /// The reason for the transfer status. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// The status of the transfer event. - /// - /// The status of the transfer event. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ApprovalPending for value: approvalPending - /// - [EnumMember(Value = "approvalPending")] - ApprovalPending = 1, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 2, - - /// - /// Enum AtmWithdrawalReversalPending for value: atmWithdrawalReversalPending - /// - [EnumMember(Value = "atmWithdrawalReversalPending")] - AtmWithdrawalReversalPending = 3, - - /// - /// Enum AtmWithdrawalReversed for value: atmWithdrawalReversed - /// - [EnumMember(Value = "atmWithdrawalReversed")] - AtmWithdrawalReversed = 4, - - /// - /// Enum AuthAdjustmentAuthorised for value: authAdjustmentAuthorised - /// - [EnumMember(Value = "authAdjustmentAuthorised")] - AuthAdjustmentAuthorised = 5, - - /// - /// Enum AuthAdjustmentError for value: authAdjustmentError - /// - [EnumMember(Value = "authAdjustmentError")] - AuthAdjustmentError = 6, - - /// - /// Enum AuthAdjustmentRefused for value: authAdjustmentRefused - /// - [EnumMember(Value = "authAdjustmentRefused")] - AuthAdjustmentRefused = 7, - - /// - /// Enum Authorised for value: authorised - /// - [EnumMember(Value = "authorised")] - Authorised = 8, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 9, - - /// - /// Enum BankTransferPending for value: bankTransferPending - /// - [EnumMember(Value = "bankTransferPending")] - BankTransferPending = 10, - - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 11, - - /// - /// Enum BookingPending for value: bookingPending - /// - [EnumMember(Value = "bookingPending")] - BookingPending = 12, - - /// - /// Enum Cancelled for value: cancelled - /// - [EnumMember(Value = "cancelled")] - Cancelled = 13, - - /// - /// Enum CapturePending for value: capturePending - /// - [EnumMember(Value = "capturePending")] - CapturePending = 14, - - /// - /// Enum CaptureReversalPending for value: captureReversalPending - /// - [EnumMember(Value = "captureReversalPending")] - CaptureReversalPending = 15, - - /// - /// Enum CaptureReversed for value: captureReversed - /// - [EnumMember(Value = "captureReversed")] - CaptureReversed = 16, - - /// - /// Enum Captured for value: captured - /// - [EnumMember(Value = "captured")] - Captured = 17, - - /// - /// Enum CapturedExternally for value: capturedExternally - /// - [EnumMember(Value = "capturedExternally")] - CapturedExternally = 18, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 19, - - /// - /// Enum ChargebackExternally for value: chargebackExternally - /// - [EnumMember(Value = "chargebackExternally")] - ChargebackExternally = 20, - - /// - /// Enum ChargebackPending for value: chargebackPending - /// - [EnumMember(Value = "chargebackPending")] - ChargebackPending = 21, - - /// - /// Enum ChargebackReversalPending for value: chargebackReversalPending - /// - [EnumMember(Value = "chargebackReversalPending")] - ChargebackReversalPending = 22, - - /// - /// Enum ChargebackReversed for value: chargebackReversed - /// - [EnumMember(Value = "chargebackReversed")] - ChargebackReversed = 23, - - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 24, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 25, - - /// - /// Enum DepositCorrectionPending for value: depositCorrectionPending - /// - [EnumMember(Value = "depositCorrectionPending")] - DepositCorrectionPending = 26, - - /// - /// Enum Dispute for value: dispute - /// - [EnumMember(Value = "dispute")] - Dispute = 27, - - /// - /// Enum DisputeClosed for value: disputeClosed - /// - [EnumMember(Value = "disputeClosed")] - DisputeClosed = 28, - - /// - /// Enum DisputeExpired for value: disputeExpired - /// - [EnumMember(Value = "disputeExpired")] - DisputeExpired = 29, - - /// - /// Enum DisputeNeedsReview for value: disputeNeedsReview - /// - [EnumMember(Value = "disputeNeedsReview")] - DisputeNeedsReview = 30, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 31, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 32, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 33, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 34, - - /// - /// Enum FeePending for value: feePending - /// - [EnumMember(Value = "feePending")] - FeePending = 35, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 36, - - /// - /// Enum InternalTransferPending for value: internalTransferPending - /// - [EnumMember(Value = "internalTransferPending")] - InternalTransferPending = 37, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 38, - - /// - /// Enum InvoiceDeductionPending for value: invoiceDeductionPending - /// - [EnumMember(Value = "invoiceDeductionPending")] - InvoiceDeductionPending = 39, - - /// - /// Enum ManualCorrectionPending for value: manualCorrectionPending - /// - [EnumMember(Value = "manualCorrectionPending")] - ManualCorrectionPending = 40, - - /// - /// Enum ManuallyCorrected for value: manuallyCorrected - /// - [EnumMember(Value = "manuallyCorrected")] - ManuallyCorrected = 41, - - /// - /// Enum MatchedStatement for value: matchedStatement - /// - [EnumMember(Value = "matchedStatement")] - MatchedStatement = 42, - - /// - /// Enum MatchedStatementPending for value: matchedStatementPending - /// - [EnumMember(Value = "matchedStatementPending")] - MatchedStatementPending = 43, - - /// - /// Enum MerchantPayin for value: merchantPayin - /// - [EnumMember(Value = "merchantPayin")] - MerchantPayin = 44, - - /// - /// Enum MerchantPayinPending for value: merchantPayinPending - /// - [EnumMember(Value = "merchantPayinPending")] - MerchantPayinPending = 45, - - /// - /// Enum MerchantPayinReversed for value: merchantPayinReversed - /// - [EnumMember(Value = "merchantPayinReversed")] - MerchantPayinReversed = 46, - - /// - /// Enum MerchantPayinReversedPending for value: merchantPayinReversedPending - /// - [EnumMember(Value = "merchantPayinReversedPending")] - MerchantPayinReversedPending = 47, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 48, - - /// - /// Enum MiscCostPending for value: miscCostPending - /// - [EnumMember(Value = "miscCostPending")] - MiscCostPending = 49, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 50, - - /// - /// Enum PaymentCostPending for value: paymentCostPending - /// - [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 51, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 52, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 53, - - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 54, - - /// - /// Enum RefundPending for value: refundPending - /// - [EnumMember(Value = "refundPending")] - RefundPending = 55, - - /// - /// Enum RefundReversalPending for value: refundReversalPending - /// - [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 56, - - /// - /// Enum RefundReversed for value: refundReversed - /// - [EnumMember(Value = "refundReversed")] - RefundReversed = 57, - - /// - /// Enum Refunded for value: refunded - /// - [EnumMember(Value = "refunded")] - Refunded = 58, - - /// - /// Enum RefundedExternally for value: refundedExternally - /// - [EnumMember(Value = "refundedExternally")] - RefundedExternally = 59, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 60, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 61, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 62, - - /// - /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending - /// - [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 63, - - /// - /// Enum Returned for value: returned - /// - [EnumMember(Value = "returned")] - Returned = 64, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 65, - - /// - /// Enum SecondChargebackPending for value: secondChargebackPending - /// - [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 66, - - /// - /// Enum Undefined for value: undefined - /// - [EnumMember(Value = "undefined")] - Undefined = 67 - - } - - - /// - /// The status of the transfer event. - /// - /// The status of the transfer event. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The type of the transfer event. Possible values: **accounting**, **tracking**. - /// - /// The type of the transfer event. Possible values: **accounting**, **tracking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Accounting for value: accounting - /// - [EnumMember(Value = "accounting")] - Accounting = 1, - - /// - /// Enum Tracking for value: tracking - /// - [EnumMember(Value = "tracking")] - Tracking = 2 - - } - - - /// - /// The type of the transfer event. Possible values: **accounting**, **tracking**. - /// - /// The type of the transfer event. Possible values: **accounting**, **tracking**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The amount adjustments in this transfer. Only applicable for [issuing](https://docs.adyen.com/issuing/) integrations.. - /// Scheme unique arn identifier useful for tracing captures, chargebacks, refunds, etc.. - /// The date when the transfer request was sent.. - /// The estimated time when the beneficiary should have access to the funds.. - /// A list of event data.. - /// externalReason. - /// The unique identifier of the transfer event.. - /// modification. - /// The list of balance mutations per event.. - /// originalAmount. - /// The reason for the transfer status.. - /// The status of the transfer event.. - /// trackingData. - /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes.. - /// The type of the transfer event. Possible values: **accounting**, **tracking**.. - /// The date when the tracking status was updated.. - /// The date when the funds are expected to be deducted from or credited to the balance account. This date can be in either the past or future.. - public TransferEvent(Amount amount = default(Amount), List amountAdjustments = default(List), string arn = default(string), DateTime bookingDate = default(DateTime), DateTime estimatedArrivalTime = default(DateTime), List eventsData = default(List), ExternalReason externalReason = default(ExternalReason), string id = default(string), Modification modification = default(Modification), List mutations = default(List), Amount originalAmount = default(Amount), ReasonEnum? reason = default(ReasonEnum?), StatusEnum? status = default(StatusEnum?), TransferEventTrackingData trackingData = default(TransferEventTrackingData), string transactionId = default(string), TypeEnum? type = default(TypeEnum?), DateTime updateDate = default(DateTime), DateTime valueDate = default(DateTime)) - { - this.Amount = amount; - this.AmountAdjustments = amountAdjustments; - this.Arn = arn; - this.BookingDate = bookingDate; - this.EstimatedArrivalTime = estimatedArrivalTime; - this.EventsData = eventsData; - this.ExternalReason = externalReason; - this.Id = id; - this.Modification = modification; - this.Mutations = mutations; - this.OriginalAmount = originalAmount; - this.Reason = reason; - this.Status = status; - this.TrackingData = trackingData; - this.TransactionId = transactionId; - this.Type = type; - this.UpdateDate = updateDate; - this.ValueDate = valueDate; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The amount adjustments in this transfer. Only applicable for [issuing](https://docs.adyen.com/issuing/) integrations. - /// - /// The amount adjustments in this transfer. Only applicable for [issuing](https://docs.adyen.com/issuing/) integrations. - [DataMember(Name = "amountAdjustments", EmitDefaultValue = false)] - public List AmountAdjustments { get; set; } - - /// - /// Scheme unique arn identifier useful for tracing captures, chargebacks, refunds, etc. - /// - /// Scheme unique arn identifier useful for tracing captures, chargebacks, refunds, etc. - [DataMember(Name = "arn", EmitDefaultValue = false)] - public string Arn { get; set; } - - /// - /// The date when the transfer request was sent. - /// - /// The date when the transfer request was sent. - [DataMember(Name = "bookingDate", EmitDefaultValue = false)] - public DateTime BookingDate { get; set; } - - /// - /// The estimated time when the beneficiary should have access to the funds. - /// - /// The estimated time when the beneficiary should have access to the funds. - [DataMember(Name = "estimatedArrivalTime", EmitDefaultValue = false)] - public DateTime EstimatedArrivalTime { get; set; } - - /// - /// A list of event data. - /// - /// A list of event data. - [DataMember(Name = "eventsData", EmitDefaultValue = false)] - public List EventsData { get; set; } - - /// - /// Gets or Sets ExternalReason - /// - [DataMember(Name = "externalReason", EmitDefaultValue = false)] - public ExternalReason ExternalReason { get; set; } - - /// - /// The unique identifier of the transfer event. - /// - /// The unique identifier of the transfer event. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Modification - /// - [DataMember(Name = "modification", EmitDefaultValue = false)] - public Modification Modification { get; set; } - - /// - /// The list of balance mutations per event. - /// - /// The list of balance mutations per event. - [DataMember(Name = "mutations", EmitDefaultValue = false)] - public List Mutations { get; set; } - - /// - /// Gets or Sets OriginalAmount - /// - [DataMember(Name = "originalAmount", EmitDefaultValue = false)] - public Amount OriginalAmount { get; set; } - - /// - /// Gets or Sets TrackingData - /// - [DataMember(Name = "trackingData", EmitDefaultValue = false)] - public TransferEventTrackingData TrackingData { get; set; } - - /// - /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. - /// - /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. - [DataMember(Name = "transactionId", EmitDefaultValue = false)] - public string TransactionId { get; set; } - - /// - /// The date when the tracking status was updated. - /// - /// The date when the tracking status was updated. - [DataMember(Name = "updateDate", EmitDefaultValue = false)] - public DateTime UpdateDate { get; set; } - - /// - /// The date when the funds are expected to be deducted from or credited to the balance account. This date can be in either the past or future. - /// - /// The date when the funds are expected to be deducted from or credited to the balance account. This date can be in either the past or future. - [DataMember(Name = "valueDate", EmitDefaultValue = false)] - public DateTime ValueDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferEvent {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" AmountAdjustments: ").Append(AmountAdjustments).Append("\n"); - sb.Append(" Arn: ").Append(Arn).Append("\n"); - sb.Append(" BookingDate: ").Append(BookingDate).Append("\n"); - sb.Append(" EstimatedArrivalTime: ").Append(EstimatedArrivalTime).Append("\n"); - sb.Append(" EventsData: ").Append(EventsData).Append("\n"); - sb.Append(" ExternalReason: ").Append(ExternalReason).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Modification: ").Append(Modification).Append("\n"); - sb.Append(" Mutations: ").Append(Mutations).Append("\n"); - sb.Append(" OriginalAmount: ").Append(OriginalAmount).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TrackingData: ").Append(TrackingData).Append("\n"); - sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UpdateDate: ").Append(UpdateDate).Append("\n"); - sb.Append(" ValueDate: ").Append(ValueDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferEvent); - } - - /// - /// Returns true if TransferEvent instances are equal - /// - /// Instance of TransferEvent to be compared - /// Boolean - public bool Equals(TransferEvent input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.AmountAdjustments == input.AmountAdjustments || - this.AmountAdjustments != null && - input.AmountAdjustments != null && - this.AmountAdjustments.SequenceEqual(input.AmountAdjustments) - ) && - ( - this.Arn == input.Arn || - (this.Arn != null && - this.Arn.Equals(input.Arn)) - ) && - ( - this.BookingDate == input.BookingDate || - (this.BookingDate != null && - this.BookingDate.Equals(input.BookingDate)) - ) && - ( - this.EstimatedArrivalTime == input.EstimatedArrivalTime || - (this.EstimatedArrivalTime != null && - this.EstimatedArrivalTime.Equals(input.EstimatedArrivalTime)) - ) && - ( - this.EventsData == input.EventsData || - this.EventsData != null && - input.EventsData != null && - this.EventsData.SequenceEqual(input.EventsData) - ) && - ( - this.ExternalReason == input.ExternalReason || - (this.ExternalReason != null && - this.ExternalReason.Equals(input.ExternalReason)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Modification == input.Modification || - (this.Modification != null && - this.Modification.Equals(input.Modification)) - ) && - ( - this.Mutations == input.Mutations || - this.Mutations != null && - input.Mutations != null && - this.Mutations.SequenceEqual(input.Mutations) - ) && - ( - this.OriginalAmount == input.OriginalAmount || - (this.OriginalAmount != null && - this.OriginalAmount.Equals(input.OriginalAmount)) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TrackingData == input.TrackingData || - (this.TrackingData != null && - this.TrackingData.Equals(input.TrackingData)) - ) && - ( - this.TransactionId == input.TransactionId || - (this.TransactionId != null && - this.TransactionId.Equals(input.TransactionId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UpdateDate == input.UpdateDate || - (this.UpdateDate != null && - this.UpdateDate.Equals(input.UpdateDate)) - ) && - ( - this.ValueDate == input.ValueDate || - (this.ValueDate != null && - this.ValueDate.Equals(input.ValueDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.AmountAdjustments != null) - { - hashCode = (hashCode * 59) + this.AmountAdjustments.GetHashCode(); - } - if (this.Arn != null) - { - hashCode = (hashCode * 59) + this.Arn.GetHashCode(); - } - if (this.BookingDate != null) - { - hashCode = (hashCode * 59) + this.BookingDate.GetHashCode(); - } - if (this.EstimatedArrivalTime != null) - { - hashCode = (hashCode * 59) + this.EstimatedArrivalTime.GetHashCode(); - } - if (this.EventsData != null) - { - hashCode = (hashCode * 59) + this.EventsData.GetHashCode(); - } - if (this.ExternalReason != null) - { - hashCode = (hashCode * 59) + this.ExternalReason.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Modification != null) - { - hashCode = (hashCode * 59) + this.Modification.GetHashCode(); - } - if (this.Mutations != null) - { - hashCode = (hashCode * 59) + this.Mutations.GetHashCode(); - } - if (this.OriginalAmount != null) - { - hashCode = (hashCode * 59) + this.OriginalAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TrackingData != null) - { - hashCode = (hashCode * 59) + this.TrackingData.GetHashCode(); - } - if (this.TransactionId != null) - { - hashCode = (hashCode * 59) + this.TransactionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UpdateDate != null) - { - hashCode = (hashCode * 59) + this.UpdateDate.GetHashCode(); - } - if (this.ValueDate != null) - { - hashCode = (hashCode * 59) + this.ValueDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferEventEventsDataInner.cs b/Adyen/Model/TransferWebhooks/TransferEventEventsDataInner.cs deleted file mode 100644 index 13c472659..000000000 --- a/Adyen/Model/TransferWebhooks/TransferEventEventsDataInner.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransferEventEventsDataInner - /// - [JsonConverter(typeof(TransferEventEventsDataInnerJsonConverter))] - [DataContract(Name = "TransferEvent_eventsData_inner")] - public partial class TransferEventEventsDataInner : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IssuingTransactionData. - public TransferEventEventsDataInner(IssuingTransactionData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MerchantPurchaseData. - public TransferEventEventsDataInner(MerchantPurchaseData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(IssuingTransactionData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MerchantPurchaseData)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: IssuingTransactionData, MerchantPurchaseData"); - } - } - } - - /// - /// Get the actual instance of `IssuingTransactionData`. If the actual instance is not `IssuingTransactionData`, - /// the InvalidClassException will be thrown - /// - /// An instance of IssuingTransactionData - public IssuingTransactionData GetIssuingTransactionData() - { - return (IssuingTransactionData)this.ActualInstance; - } - - /// - /// Get the actual instance of `MerchantPurchaseData`. If the actual instance is not `MerchantPurchaseData`, - /// the InvalidClassException will be thrown - /// - /// An instance of MerchantPurchaseData - public MerchantPurchaseData GetMerchantPurchaseData() - { - return (MerchantPurchaseData)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferEventEventsDataInner {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferEventEventsDataInner.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferEventEventsDataInner - /// - /// JSON string - /// An instance of TransferEventEventsDataInner - public static TransferEventEventsDataInner FromJson(string jsonString) - { - TransferEventEventsDataInner newTransferEventEventsDataInner = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferEventEventsDataInner; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the IssuingTransactionData type enums - if (ContainsValue(type)) - { - newTransferEventEventsDataInner = new TransferEventEventsDataInner(JsonConvert.DeserializeObject(jsonString, TransferEventEventsDataInner.SerializerSettings)); - matchedTypes.Add("IssuingTransactionData"); - match++; - } - // Check if the jsonString type enum matches the MerchantPurchaseData type enums - if (ContainsValue(type)) - { - newTransferEventEventsDataInner = new TransferEventEventsDataInner(JsonConvert.DeserializeObject(jsonString, TransferEventEventsDataInner.SerializerSettings)); - matchedTypes.Add("MerchantPurchaseData"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferEventEventsDataInner; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferEventEventsDataInner); - } - - /// - /// Returns true if TransferEventEventsDataInner instances are equal - /// - /// Instance of TransferEventEventsDataInner to be compared - /// Boolean - public bool Equals(TransferEventEventsDataInner input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferEventEventsDataInner - /// - public class TransferEventEventsDataInnerJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferEventEventsDataInner).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferEventEventsDataInner.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferEventTrackingData.cs b/Adyen/Model/TransferWebhooks/TransferEventTrackingData.cs deleted file mode 100644 index bcf824f11..000000000 --- a/Adyen/Model/TransferWebhooks/TransferEventTrackingData.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// Additional information for the tracking event. - /// - [JsonConverter(typeof(TransferEventTrackingDataJsonConverter))] - [DataContract(Name = "TransferEvent_trackingData")] - public partial class TransferEventTrackingData : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ConfirmationTrackingData. - public TransferEventTrackingData(ConfirmationTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of EstimationTrackingData. - public TransferEventTrackingData(EstimationTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InternalReviewTrackingData. - public TransferEventTrackingData(InternalReviewTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(ConfirmationTrackingData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(EstimationTrackingData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(InternalReviewTrackingData)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: ConfirmationTrackingData, EstimationTrackingData, InternalReviewTrackingData"); - } - } - } - - /// - /// Get the actual instance of `ConfirmationTrackingData`. If the actual instance is not `ConfirmationTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of ConfirmationTrackingData - public ConfirmationTrackingData GetConfirmationTrackingData() - { - return (ConfirmationTrackingData)this.ActualInstance; - } - - /// - /// Get the actual instance of `EstimationTrackingData`. If the actual instance is not `EstimationTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of EstimationTrackingData - public EstimationTrackingData GetEstimationTrackingData() - { - return (EstimationTrackingData)this.ActualInstance; - } - - /// - /// Get the actual instance of `InternalReviewTrackingData`. If the actual instance is not `InternalReviewTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of InternalReviewTrackingData - public InternalReviewTrackingData GetInternalReviewTrackingData() - { - return (InternalReviewTrackingData)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferEventTrackingData {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferEventTrackingData.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferEventTrackingData - /// - /// JSON string - /// An instance of TransferEventTrackingData - public static TransferEventTrackingData FromJson(string jsonString) - { - TransferEventTrackingData newTransferEventTrackingData = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferEventTrackingData; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the ConfirmationTrackingData type enums - if (ContainsValue(type)) - { - newTransferEventTrackingData = new TransferEventTrackingData(JsonConvert.DeserializeObject(jsonString, TransferEventTrackingData.SerializerSettings)); - matchedTypes.Add("ConfirmationTrackingData"); - match++; - } - // Check if the jsonString type enum matches the EstimationTrackingData type enums - if (ContainsValue(type)) - { - newTransferEventTrackingData = new TransferEventTrackingData(JsonConvert.DeserializeObject(jsonString, TransferEventTrackingData.SerializerSettings)); - matchedTypes.Add("EstimationTrackingData"); - match++; - } - // Check if the jsonString type enum matches the InternalReviewTrackingData type enums - if (ContainsValue(type)) - { - newTransferEventTrackingData = new TransferEventTrackingData(JsonConvert.DeserializeObject(jsonString, TransferEventTrackingData.SerializerSettings)); - matchedTypes.Add("InternalReviewTrackingData"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferEventTrackingData; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferEventTrackingData); - } - - /// - /// Returns true if TransferEventTrackingData instances are equal - /// - /// Instance of TransferEventTrackingData to be compared - /// Boolean - public bool Equals(TransferEventTrackingData input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferEventTrackingData - /// - public class TransferEventTrackingDataJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferEventTrackingData).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferEventTrackingData.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.cs b/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.cs deleted file mode 100644 index 7c9afff8b..000000000 --- a/Adyen/Model/TransferWebhooks/TransferNotificationCounterParty.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransferNotificationCounterParty - /// - [DataContract(Name = "TransferNotificationCounterParty")] - public partial class TransferNotificationCounterParty : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id).. - /// bankAccount. - /// card. - /// merchant. - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id).. - public TransferNotificationCounterParty(string balanceAccountId = default(string), BankAccountV3 bankAccount = default(BankAccountV3), Card card = default(Card), TransferNotificationMerchantData merchant = default(TransferNotificationMerchantData), string transferInstrumentId = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.BankAccount = bankAccount; - this.Card = card; - this.Merchant = merchant; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountV3 BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Gets or Sets Merchant - /// - [DataMember(Name = "merchant", EmitDefaultValue = false)] - public TransferNotificationMerchantData Merchant { get; set; } - - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferNotificationCounterParty {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Merchant: ").Append(Merchant).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferNotificationCounterParty); - } - - /// - /// Returns true if TransferNotificationCounterParty instances are equal - /// - /// Instance of TransferNotificationCounterParty to be compared - /// Boolean - public bool Equals(TransferNotificationCounterParty input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Merchant == input.Merchant || - (this.Merchant != null && - this.Merchant.Equals(input.Merchant)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Merchant != null) - { - hashCode = (hashCode * 59) + this.Merchant.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.cs b/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.cs deleted file mode 100644 index 87ccaeb86..000000000 --- a/Adyen/Model/TransferWebhooks/TransferNotificationMerchantData.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransferNotificationMerchantData - /// - [DataContract(Name = "TransferNotificationMerchantData")] - public partial class TransferNotificationMerchantData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the merchant's acquirer.. - /// The city where the merchant is located.. - /// The country where the merchant is located.. - /// The merchant category code.. - /// The unique identifier of the merchant.. - /// The name of the merchant's shop or service.. - /// The postal code of the merchant.. - public TransferNotificationMerchantData(string acquirerId = default(string), string city = default(string), string country = default(string), string mcc = default(string), string merchantId = default(string), string name = default(string), string postalCode = default(string)) - { - this.AcquirerId = acquirerId; - this.City = city; - this.Country = country; - this.Mcc = mcc; - this.MerchantId = merchantId; - this.Name = name; - this.PostalCode = postalCode; - } - - /// - /// The unique identifier of the merchant's acquirer. - /// - /// The unique identifier of the merchant's acquirer. - [DataMember(Name = "acquirerId", EmitDefaultValue = false)] - public string AcquirerId { get; set; } - - /// - /// The city where the merchant is located. - /// - /// The city where the merchant is located. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The country where the merchant is located. - /// - /// The country where the merchant is located. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The merchant category code. - /// - /// The merchant category code. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The unique identifier of the merchant. - /// - /// The unique identifier of the merchant. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The name of the merchant's shop or service. - /// - /// The name of the merchant's shop or service. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The postal code of the merchant. - /// - /// The postal code of the merchant. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferNotificationMerchantData {\n"); - sb.Append(" AcquirerId: ").Append(AcquirerId).Append("\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferNotificationMerchantData); - } - - /// - /// Returns true if TransferNotificationMerchantData instances are equal - /// - /// Instance of TransferNotificationMerchantData to be compared - /// Boolean - public bool Equals(TransferNotificationMerchantData input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquirerId == input.AcquirerId || - (this.AcquirerId != null && - this.AcquirerId.Equals(input.AcquirerId)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcquirerId != null) - { - hashCode = (hashCode * 59) + this.AcquirerId.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferNotificationRequest.cs b/Adyen/Model/TransferWebhooks/TransferNotificationRequest.cs deleted file mode 100644 index 0e1aa9cc3..000000000 --- a/Adyen/Model/TransferWebhooks/TransferNotificationRequest.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransferNotificationRequest - /// - [DataContract(Name = "TransferNotificationRequest")] - public partial class TransferNotificationRequest : IEquatable, IValidatableObject - { - /// - /// The type of webhook. - /// - /// The type of webhook. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Created for value: balancePlatform.transfer.created - /// - [EnumMember(Value = "balancePlatform.transfer.created")] - Created = 1, - - /// - /// Enum Updated for value: balancePlatform.transfer.updated - /// - [EnumMember(Value = "balancePlatform.transfer.updated")] - Updated = 2 - - } - - - /// - /// The type of webhook. - /// - /// The type of webhook. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferNotificationRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// data (required). - /// The environment from which the webhook originated. Possible values: **test**, **live**. (required). - /// When the event was queued.. - /// The type of webhook.. - public TransferNotificationRequest(TransferData data = default(TransferData), string environment = default(string), DateTime timestamp = default(DateTime), TypeEnum? type = default(TypeEnum?)) - { - this.Data = data; - this.Environment = environment; - this.Timestamp = timestamp; - this.Type = type; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", IsRequired = false, EmitDefaultValue = false)] - public TransferData Data { get; set; } - - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - /// - /// The environment from which the webhook originated. Possible values: **test**, **live**. - [DataMember(Name = "environment", IsRequired = false, EmitDefaultValue = false)] - public string Environment { get; set; } - - /// - /// When the event was queued. - /// - /// When the event was queued. - [DataMember(Name = "timestamp", EmitDefaultValue = false)] - public DateTime Timestamp { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferNotificationRequest {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append(" Environment: ").Append(Environment).Append("\n"); - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferNotificationRequest); - } - - /// - /// Returns true if TransferNotificationRequest instances are equal - /// - /// Instance of TransferNotificationRequest to be compared - /// Boolean - public bool Equals(TransferNotificationRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - (this.Data != null && - this.Data.Equals(input.Data)) - ) && - ( - this.Environment == input.Environment || - (this.Environment != null && - this.Environment.Equals(input.Environment)) - ) && - ( - this.Timestamp == input.Timestamp || - (this.Timestamp != null && - this.Timestamp.Equals(input.Timestamp)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Environment != null) - { - hashCode = (hashCode * 59) + this.Environment.GetHashCode(); - } - if (this.Timestamp != null) - { - hashCode = (hashCode * 59) + this.Timestamp.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.cs b/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.cs deleted file mode 100644 index 414189c41..000000000 --- a/Adyen/Model/TransferWebhooks/TransferNotificationValidationFact.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransferNotificationValidationFact - /// - [DataContract(Name = "TransferNotificationValidationFact")] - public partial class TransferNotificationValidationFact : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The evaluation result of the validation fact.. - /// The type of the validation fact.. - public TransferNotificationValidationFact(string result = default(string), string type = default(string)) - { - this.Result = result; - this.Type = type; - } - - /// - /// The evaluation result of the validation fact. - /// - /// The evaluation result of the validation fact. - [DataMember(Name = "result", EmitDefaultValue = false)] - public string Result { get; set; } - - /// - /// The type of the validation fact. - /// - /// The type of the validation fact. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferNotificationValidationFact {\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferNotificationValidationFact); - } - - /// - /// Returns true if TransferNotificationValidationFact instances are equal - /// - /// Instance of TransferNotificationValidationFact to be compared - /// Boolean - public bool Equals(TransferNotificationValidationFact input) - { - if (input == null) - { - return false; - } - return - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Result != null) - { - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/TransferReview.cs b/Adyen/Model/TransferWebhooks/TransferReview.cs deleted file mode 100644 index a9b930807..000000000 --- a/Adyen/Model/TransferWebhooks/TransferReview.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// TransferReview - /// - [DataContract(Name = "TransferReview")] - public partial class TransferReview : IEquatable, IValidatableObject - { - /// - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**. - /// - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ScaOnApprovalEnum - { - /// - /// Enum Completed for value: completed - /// - [EnumMember(Value = "completed")] - Completed = 1, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 2, - - /// - /// Enum Required for value: required - /// - [EnumMember(Value = "required")] - Required = 3 - - } - - - /// - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**. - /// - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**. - [DataMember(Name = "scaOnApproval", EmitDefaultValue = false)] - public ScaOnApprovalEnum? ScaOnApproval { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Shows the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer.. - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**.. - public TransferReview(int? numberOfApprovalsRequired = default(int?), ScaOnApprovalEnum? scaOnApproval = default(ScaOnApprovalEnum?)) - { - this.NumberOfApprovalsRequired = numberOfApprovalsRequired; - this.ScaOnApproval = scaOnApproval; - } - - /// - /// Shows the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer. - /// - /// Shows the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer. - [DataMember(Name = "numberOfApprovalsRequired", EmitDefaultValue = false)] - public int? NumberOfApprovalsRequired { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferReview {\n"); - sb.Append(" NumberOfApprovalsRequired: ").Append(NumberOfApprovalsRequired).Append("\n"); - sb.Append(" ScaOnApproval: ").Append(ScaOnApproval).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferReview); - } - - /// - /// Returns true if TransferReview instances are equal - /// - /// Instance of TransferReview to be compared - /// Boolean - public bool Equals(TransferReview input) - { - if (input == null) - { - return false; - } - return - ( - this.NumberOfApprovalsRequired == input.NumberOfApprovalsRequired || - this.NumberOfApprovalsRequired.Equals(input.NumberOfApprovalsRequired) - ) && - ( - this.ScaOnApproval == input.ScaOnApproval || - this.ScaOnApproval.Equals(input.ScaOnApproval) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.NumberOfApprovalsRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.ScaOnApproval.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.cs deleted file mode 100644 index 558228009..000000000 --- a/Adyen/Model/TransferWebhooks/UKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// UKLocalAccountIdentification - /// - [DataContract(Name = "UKLocalAccountIdentification")] - public partial class UKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **ukLocal** - /// - /// **ukLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UkLocal for value: ukLocal - /// - [EnumMember(Value = "ukLocal")] - UkLocal = 1 - - } - - - /// - /// **ukLocal** - /// - /// **ukLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 8-digit bank account number, without separators or whitespace. (required). - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). - /// **ukLocal** (required) (default to TypeEnum.UkLocal). - public UKLocalAccountIdentification(string accountNumber = default(string), string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) - { - this.AccountNumber = accountNumber; - this.SortCode = sortCode; - this.Type = type; - } - - /// - /// The 8-digit bank account number, without separators or whitespace. - /// - /// The 8-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - /// - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - [DataMember(Name = "sortCode", IsRequired = false, EmitDefaultValue = false)] - public string SortCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" SortCode: ").Append(SortCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UKLocalAccountIdentification); - } - - /// - /// Returns true if UKLocalAccountIdentification instances are equal - /// - /// Instance of UKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(UKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.SortCode == input.SortCode || - (this.SortCode != null && - this.SortCode.Equals(input.SortCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.SortCode != null) - { - hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 8.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 8.", new [] { "AccountNumber" }); - } - - // SortCode (string) maxLength - if (this.SortCode != null && this.SortCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be less than 6.", new [] { "SortCode" }); - } - - // SortCode (string) minLength - if (this.SortCode != null && this.SortCode.Length < 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be greater than 6.", new [] { "SortCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.cs b/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.cs deleted file mode 100644 index 343796272..000000000 --- a/Adyen/Model/TransferWebhooks/USLocalAccountIdentification.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Transfer webhooks -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.TransferWebhooks -{ - /// - /// USLocalAccountIdentification - /// - [DataContract(Name = "USLocalAccountIdentification")] - public partial class USLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 1, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 2 - - } - - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// **usLocal** - /// - /// **usLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UsLocal for value: usLocal - /// - [EnumMember(Value = "usLocal")] - UsLocal = 1 - - } - - - /// - /// **usLocal** - /// - /// **usLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected USLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). - /// **usLocal** (required) (default to TypeEnum.UsLocal). - public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) - { - this.AccountNumber = accountNumber; - this.RoutingNumber = routingNumber; - this.Type = type; - this.AccountType = accountType; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - /// - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - [DataMember(Name = "routingNumber", IsRequired = false, EmitDefaultValue = false)] - public string RoutingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class USLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as USLocalAccountIdentification); - } - - /// - /// Returns true if USLocalAccountIdentification instances are equal - /// - /// Instance of USLocalAccountIdentification to be compared - /// Boolean - public bool Equals(USLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.RoutingNumber == input.RoutingNumber || - (this.RoutingNumber != null && - this.RoutingNumber.Equals(input.RoutingNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.RoutingNumber != null) - { - hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 18) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 18.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 2.", new [] { "AccountNumber" }); - } - - // RoutingNumber (string) maxLength - if (this.RoutingNumber != null && this.RoutingNumber.Length > 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RoutingNumber, length must be less than 9.", new [] { "RoutingNumber" }); - } - - // RoutingNumber (string) minLength - if (this.RoutingNumber != null && this.RoutingNumber.Length < 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RoutingNumber, length must be greater than 9.", new [] { "RoutingNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/AULocalAccountIdentification.cs b/Adyen/Model/Transfers/AULocalAccountIdentification.cs deleted file mode 100644 index c73bc6570..000000000 --- a/Adyen/Model/Transfers/AULocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// AULocalAccountIdentification - /// - [DataContract(Name = "AULocalAccountIdentification")] - public partial class AULocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **auLocal** - /// - /// **auLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum AuLocal for value: auLocal - /// - [EnumMember(Value = "auLocal")] - AuLocal = 1 - - } - - - /// - /// **auLocal** - /// - /// **auLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AULocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. (required). - /// **auLocal** (required) (default to TypeEnum.AuLocal). - public AULocalAccountIdentification(string accountNumber = default(string), string bsbCode = default(string), TypeEnum type = TypeEnum.AuLocal) - { - this.AccountNumber = accountNumber; - this.BsbCode = bsbCode; - this.Type = type; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. - /// - /// The 6-digit [Bank State Branch (BSB) code](https://en.wikipedia.org/wiki/Bank_state_branch), without separators or whitespace. - [DataMember(Name = "bsbCode", IsRequired = false, EmitDefaultValue = false)] - public string BsbCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AULocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BsbCode: ").Append(BsbCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AULocalAccountIdentification); - } - - /// - /// Returns true if AULocalAccountIdentification instances are equal - /// - /// Instance of AULocalAccountIdentification to be compared - /// Boolean - public bool Equals(AULocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BsbCode == input.BsbCode || - (this.BsbCode != null && - this.BsbCode.Equals(input.BsbCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BsbCode != null) - { - hashCode = (hashCode * 59) + this.BsbCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 9.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 5.", new [] { "AccountNumber" }); - } - - // BsbCode (string) maxLength - if (this.BsbCode != null && this.BsbCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BsbCode, length must be less than 6.", new [] { "BsbCode" }); - } - - // BsbCode (string) minLength - if (this.BsbCode != null && this.BsbCode.Length < 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BsbCode, length must be greater than 6.", new [] { "BsbCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/AbstractOpenAPISchema.cs b/Adyen/Model/Transfers/AbstractOpenAPISchema.cs deleted file mode 100644 index d948f31f3..000000000 --- a/Adyen/Model/Transfers/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Adyen.Model.Transfers -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Model/Transfers/AdditionalBankIdentification.cs b/Adyen/Model/Transfers/AdditionalBankIdentification.cs deleted file mode 100644 index a25b56001..000000000 --- a/Adyen/Model/Transfers/AdditionalBankIdentification.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// AdditionalBankIdentification - /// - [DataContract(Name = "AdditionalBankIdentification")] - public partial class AdditionalBankIdentification : IEquatable, IValidatableObject - { - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum GbSortCode for value: gbSortCode - /// - [EnumMember(Value = "gbSortCode")] - GbSortCode = 1, - - /// - /// Enum UsRoutingNumber for value: usRoutingNumber - /// - [EnumMember(Value = "usRoutingNumber")] - UsRoutingNumber = 2, - - /// - /// Enum AuBsbCode for value: auBsbCode - /// - [EnumMember(Value = "auBsbCode")] - AuBsbCode = 3, - - /// - /// Enum CaRoutingNumber for value: caRoutingNumber - /// - [EnumMember(Value = "caRoutingNumber")] - CaRoutingNumber = 4 - - } - - - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - /// - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The value of the additional bank identification.. - /// The type of additional bank identification, depending on the country. Possible values: * **gbSortCode**: The 6-digit [UK sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or spaces * **usRoutingNumber**: The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or spaces.. - public AdditionalBankIdentification(string code = default(string), TypeEnum? type = default(TypeEnum?)) - { - this.Code = code; - this.Type = type; - } - - /// - /// The value of the additional bank identification. - /// - /// The value of the additional bank identification. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AdditionalBankIdentification {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalBankIdentification); - } - - /// - /// Returns true if AdditionalBankIdentification instances are equal - /// - /// Instance of AdditionalBankIdentification to be compared - /// Boolean - public bool Equals(AdditionalBankIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Address.cs b/Adyen/Model/Transfers/Address.cs deleted file mode 100644 index 7baabcb09..000000000 --- a/Adyen/Model/Transfers/Address.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Address - /// - [DataContract(Name = "Address")] - public partial class Address : IEquatable
, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Address() { } - /// - /// Initializes a new instance of the class. - /// - /// The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. . - /// The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. (required). - /// The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. . - /// The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. . - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US. . - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. . - public Address(string city = default(string), string country = default(string), string line1 = default(string), string line2 = default(string), string postalCode = default(string), string stateOrProvince = default(string)) - { - this.Country = country; - this.City = city; - this.Line1 = line1; - this.Line2 = line2; - this.PostalCode = postalCode; - this.StateOrProvince = stateOrProvince; - } - - /// - /// The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - /// - /// The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. - /// - /// The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**. - [DataMember(Name = "country", IsRequired = false, EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - /// - /// The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - [DataMember(Name = "line1", EmitDefaultValue = false)] - public string Line1 { get; set; } - - /// - /// The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - /// - /// The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**. - [DataMember(Name = "line2", EmitDefaultValue = false)] - public string Line2 { get; set; } - - /// - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US. - /// - /// The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - /// - /// The two-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada. - [DataMember(Name = "stateOrProvince", EmitDefaultValue = false)] - public string StateOrProvince { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Address {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Line1: ").Append(Line1).Append("\n"); - sb.Append(" Line2: ").Append(Line2).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" StateOrProvince: ").Append(StateOrProvince).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Address); - } - - /// - /// Returns true if Address instances are equal - /// - /// Instance of Address to be compared - /// Boolean - public bool Equals(Address input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Line1 == input.Line1 || - (this.Line1 != null && - this.Line1.Equals(input.Line1)) - ) && - ( - this.Line2 == input.Line2 || - (this.Line2 != null && - this.Line2.Equals(input.Line2)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.StateOrProvince == input.StateOrProvince || - (this.StateOrProvince != null && - this.StateOrProvince.Equals(input.StateOrProvince)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Line1 != null) - { - hashCode = (hashCode * 59) + this.Line1.GetHashCode(); - } - if (this.Line2 != null) - { - hashCode = (hashCode * 59) + this.Line2.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.StateOrProvince != null) - { - hashCode = (hashCode * 59) + this.StateOrProvince.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // City (string) minLength - if (this.City != null && this.City.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for City, length must be greater than 3.", new [] { "City" }); - } - - // PostalCode (string) minLength - if (this.PostalCode != null && this.PostalCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PostalCode, length must be greater than 3.", new [] { "PostalCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Airline.cs b/Adyen/Model/Transfers/Airline.cs deleted file mode 100644 index 1b70fe119..000000000 --- a/Adyen/Model/Transfers/Airline.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Airline - /// - [DataContract(Name = "Airline")] - public partial class Airline : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Details about the flight legs for this ticket.. - /// The ticket's unique identifier. - public Airline(List legs = default(List), string ticketNumber = default(string)) - { - this.Legs = legs; - this.TicketNumber = ticketNumber; - } - - /// - /// Details about the flight legs for this ticket. - /// - /// Details about the flight legs for this ticket. - [DataMember(Name = "legs", EmitDefaultValue = false)] - public List Legs { get; set; } - - /// - /// The ticket's unique identifier - /// - /// The ticket's unique identifier - [DataMember(Name = "ticketNumber", EmitDefaultValue = false)] - public string TicketNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Airline {\n"); - sb.Append(" Legs: ").Append(Legs).Append("\n"); - sb.Append(" TicketNumber: ").Append(TicketNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Airline); - } - - /// - /// Returns true if Airline instances are equal - /// - /// Instance of Airline to be compared - /// Boolean - public bool Equals(Airline input) - { - if (input == null) - { - return false; - } - return - ( - this.Legs == input.Legs || - this.Legs != null && - input.Legs != null && - this.Legs.SequenceEqual(input.Legs) - ) && - ( - this.TicketNumber == input.TicketNumber || - (this.TicketNumber != null && - this.TicketNumber.Equals(input.TicketNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Legs != null) - { - hashCode = (hashCode * 59) + this.Legs.GetHashCode(); - } - if (this.TicketNumber != null) - { - hashCode = (hashCode * 59) + this.TicketNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Amount.cs b/Adyen/Model/Transfers/Amount.cs deleted file mode 100644 index b6d3c694e..000000000 --- a/Adyen/Model/Transfers/Amount.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Amount - /// - [DataContract(Name = "Amount")] - public partial class Amount : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Amount() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). (required). - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). (required). - public Amount(string currency = default(string), long? value = default(long?)) - { - this.Currency = currency; - this.Value = value; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes#currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - /// - /// The amount of the transaction, in [minor units](https://docs.adyen.com/development-resources/currency-codes#minor-units). - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public long? Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Amount {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Amount); - } - - /// - /// Returns true if Amount instances are equal - /// - /// Instance of Amount to be compared - /// Boolean - public bool Equals(Amount input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Value == input.Value || - this.Value.Equals(input.Value) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // Currency (string) minLength - if (this.Currency != null && this.Currency.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Currency, length must be greater than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/AmountAdjustment.cs b/Adyen/Model/Transfers/AmountAdjustment.cs deleted file mode 100644 index 3dbf9ee94..000000000 --- a/Adyen/Model/Transfers/AmountAdjustment.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// AmountAdjustment - /// - [DataContract(Name = "AmountAdjustment")] - public partial class AmountAdjustment : IEquatable, IValidatableObject - { - /// - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. - /// - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AmountAdjustmentTypeEnum - { - /// - /// Enum AtmMarkup for value: atmMarkup - /// - [EnumMember(Value = "atmMarkup")] - AtmMarkup = 1, - - /// - /// Enum AuthHoldReserve for value: authHoldReserve - /// - [EnumMember(Value = "authHoldReserve")] - AuthHoldReserve = 2, - - /// - /// Enum Exchange for value: exchange - /// - [EnumMember(Value = "exchange")] - Exchange = 3, - - /// - /// Enum ForexMarkup for value: forexMarkup - /// - [EnumMember(Value = "forexMarkup")] - ForexMarkup = 4 - - } - - - /// - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. - /// - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**. - [DataMember(Name = "amountAdjustmentType", EmitDefaultValue = false)] - public AmountAdjustmentTypeEnum? AmountAdjustmentType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The type of markup that is applied to an authorised payment. Possible values: **exchange**, **forexMarkup**, **authHoldReserve**, **atmMarkup**.. - /// The basepoints associated with the applied markup.. - public AmountAdjustment(Amount amount = default(Amount), AmountAdjustmentTypeEnum? amountAdjustmentType = default(AmountAdjustmentTypeEnum?), int? basepoints = default(int?)) - { - this.Amount = amount; - this.AmountAdjustmentType = amountAdjustmentType; - this.Basepoints = basepoints; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The basepoints associated with the applied markup. - /// - /// The basepoints associated with the applied markup. - [DataMember(Name = "basepoints", EmitDefaultValue = false)] - public int? Basepoints { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AmountAdjustment {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" AmountAdjustmentType: ").Append(AmountAdjustmentType).Append("\n"); - sb.Append(" Basepoints: ").Append(Basepoints).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AmountAdjustment); - } - - /// - /// Returns true if AmountAdjustment instances are equal - /// - /// Instance of AmountAdjustment to be compared - /// Boolean - public bool Equals(AmountAdjustment input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.AmountAdjustmentType == input.AmountAdjustmentType || - this.AmountAdjustmentType.Equals(input.AmountAdjustmentType) - ) && - ( - this.Basepoints == input.Basepoints || - this.Basepoints.Equals(input.Basepoints) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AmountAdjustmentType.GetHashCode(); - hashCode = (hashCode * 59) + this.Basepoints.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/ApproveTransfersRequest.cs b/Adyen/Model/Transfers/ApproveTransfersRequest.cs deleted file mode 100644 index c3633ccdf..000000000 --- a/Adyen/Model/Transfers/ApproveTransfersRequest.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// ApproveTransfersRequest - /// - [DataContract(Name = "ApproveTransfersRequest")] - public partial class ApproveTransfersRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains the unique identifiers of the transfers that you want to approve.. - public ApproveTransfersRequest(List transferIds = default(List)) - { - this.TransferIds = transferIds; - } - - /// - /// Contains the unique identifiers of the transfers that you want to approve. - /// - /// Contains the unique identifiers of the transfers that you want to approve. - [DataMember(Name = "transferIds", EmitDefaultValue = false)] - public List TransferIds { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApproveTransfersRequest {\n"); - sb.Append(" TransferIds: ").Append(TransferIds).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApproveTransfersRequest); - } - - /// - /// Returns true if ApproveTransfersRequest instances are equal - /// - /// Instance of ApproveTransfersRequest to be compared - /// Boolean - public bool Equals(ApproveTransfersRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.TransferIds == input.TransferIds || - this.TransferIds != null && - input.TransferIds != null && - this.TransferIds.SequenceEqual(input.TransferIds) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TransferIds != null) - { - hashCode = (hashCode * 59) + this.TransferIds.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/BRLocalAccountIdentification.cs b/Adyen/Model/Transfers/BRLocalAccountIdentification.cs deleted file mode 100644 index 039fde693..000000000 --- a/Adyen/Model/Transfers/BRLocalAccountIdentification.cs +++ /dev/null @@ -1,269 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// BRLocalAccountIdentification - /// - [DataContract(Name = "BRLocalAccountIdentification")] - public partial class BRLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **brLocal** - /// - /// **brLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BrLocal for value: brLocal - /// - [EnumMember(Value = "brLocal")] - BrLocal = 1 - - } - - - /// - /// **brLocal** - /// - /// **brLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BRLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The 3-digit bank code, with leading zeros. (required). - /// The bank account branch number, without separators or whitespace. (required). - /// The 8-digit ISPB, with leading zeros.. - /// **brLocal** (required) (default to TypeEnum.BrLocal). - public BRLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), string branchNumber = default(string), string ispb = default(string), TypeEnum type = TypeEnum.BrLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.BranchNumber = branchNumber; - this.Type = type; - this.Ispb = ispb; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit bank code, with leading zeros. - /// - /// The 3-digit bank code, with leading zeros. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// The bank account branch number, without separators or whitespace. - /// - /// The bank account branch number, without separators or whitespace. - [DataMember(Name = "branchNumber", IsRequired = false, EmitDefaultValue = false)] - public string BranchNumber { get; set; } - - /// - /// The 8-digit ISPB, with leading zeros. - /// - /// The 8-digit ISPB, with leading zeros. - [DataMember(Name = "ispb", EmitDefaultValue = false)] - public string Ispb { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BRLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" BranchNumber: ").Append(BranchNumber).Append("\n"); - sb.Append(" Ispb: ").Append(Ispb).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BRLocalAccountIdentification); - } - - /// - /// Returns true if BRLocalAccountIdentification instances are equal - /// - /// Instance of BRLocalAccountIdentification to be compared - /// Boolean - public bool Equals(BRLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.BranchNumber == input.BranchNumber || - (this.BranchNumber != null && - this.BranchNumber.Equals(input.BranchNumber)) - ) && - ( - this.Ispb == input.Ispb || - (this.Ispb != null && - this.Ispb.Equals(input.Ispb)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - if (this.BranchNumber != null) - { - hashCode = (hashCode * 59) + this.BranchNumber.GetHashCode(); - } - if (this.Ispb != null) - { - hashCode = (hashCode * 59) + this.Ispb.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 1.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 3.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 3.", new [] { "BankCode" }); - } - - // BranchNumber (string) maxLength - if (this.BranchNumber != null && this.BranchNumber.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BranchNumber, length must be less than 4.", new [] { "BranchNumber" }); - } - - // BranchNumber (string) minLength - if (this.BranchNumber != null && this.BranchNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BranchNumber, length must be greater than 1.", new [] { "BranchNumber" }); - } - - // Ispb (string) maxLength - if (this.Ispb != null && this.Ispb.Length > 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Ispb, length must be less than 8.", new [] { "Ispb" }); - } - - // Ispb (string) minLength - if (this.Ispb != null && this.Ispb.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Ispb, length must be greater than 8.", new [] { "Ispb" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/BalanceMutation.cs b/Adyen/Model/Transfers/BalanceMutation.cs deleted file mode 100644 index ca32ab37e..000000000 --- a/Adyen/Model/Transfers/BalanceMutation.cs +++ /dev/null @@ -1,174 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// BalanceMutation - /// - [DataContract(Name = "BalanceMutation")] - public partial class BalanceMutation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The amount in the payment's currency that is debited or credited on the balance accounting register.. - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes).. - /// The amount in the payment's currency that is debited or credited on the received accounting register.. - /// The amount in the payment's currency that is debited or credited on the reserved accounting register.. - public BalanceMutation(long? balance = default(long?), string currency = default(string), long? received = default(long?), long? reserved = default(long?)) - { - this.Balance = balance; - this.Currency = currency; - this.Received = received; - this.Reserved = reserved; - } - - /// - /// The amount in the payment's currency that is debited or credited on the balance accounting register. - /// - /// The amount in the payment's currency that is debited or credited on the balance accounting register. - [DataMember(Name = "balance", EmitDefaultValue = false)] - public long? Balance { get; set; } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// The amount in the payment's currency that is debited or credited on the received accounting register. - /// - /// The amount in the payment's currency that is debited or credited on the received accounting register. - [DataMember(Name = "received", EmitDefaultValue = false)] - public long? Received { get; set; } - - /// - /// The amount in the payment's currency that is debited or credited on the reserved accounting register. - /// - /// The amount in the payment's currency that is debited or credited on the reserved accounting register. - [DataMember(Name = "reserved", EmitDefaultValue = false)] - public long? Reserved { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BalanceMutation {\n"); - sb.Append(" Balance: ").Append(Balance).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Received: ").Append(Received).Append("\n"); - sb.Append(" Reserved: ").Append(Reserved).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceMutation); - } - - /// - /// Returns true if BalanceMutation instances are equal - /// - /// Instance of BalanceMutation to be compared - /// Boolean - public bool Equals(BalanceMutation input) - { - if (input == null) - { - return false; - } - return - ( - this.Balance == input.Balance || - this.Balance.Equals(input.Balance) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Received == input.Received || - this.Received.Equals(input.Received) - ) && - ( - this.Reserved == input.Reserved || - this.Reserved.Equals(input.Reserved) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Balance.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Received.GetHashCode(); - hashCode = (hashCode * 59) + this.Reserved.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/BankAccountV3.cs b/Adyen/Model/Transfers/BankAccountV3.cs deleted file mode 100644 index e422ca5bc..000000000 --- a/Adyen/Model/Transfers/BankAccountV3.cs +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// BankAccountV3 - /// - [DataContract(Name = "BankAccountV3")] - public partial class BankAccountV3 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BankAccountV3() { } - /// - /// Initializes a new instance of the class. - /// - /// accountHolder (required). - /// accountIdentification (required). - public BankAccountV3(PartyIdentification accountHolder = default(PartyIdentification), BankAccountV3AccountIdentification accountIdentification = default(BankAccountV3AccountIdentification)) - { - this.AccountHolder = accountHolder; - this.AccountIdentification = accountIdentification; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", IsRequired = false, EmitDefaultValue = false)] - public PartyIdentification AccountHolder { get; set; } - - /// - /// Gets or Sets AccountIdentification - /// - [DataMember(Name = "accountIdentification", IsRequired = false, EmitDefaultValue = false)] - public BankAccountV3AccountIdentification AccountIdentification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankAccountV3 {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" AccountIdentification: ").Append(AccountIdentification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountV3); - } - - /// - /// Returns true if BankAccountV3 instances are equal - /// - /// Instance of BankAccountV3 to be compared - /// Boolean - public bool Equals(BankAccountV3 input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.AccountIdentification == input.AccountIdentification || - (this.AccountIdentification != null && - this.AccountIdentification.Equals(input.AccountIdentification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.AccountIdentification != null) - { - hashCode = (hashCode * 59) + this.AccountIdentification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/BankAccountV3AccountIdentification.cs b/Adyen/Model/Transfers/BankAccountV3AccountIdentification.cs deleted file mode 100644 index 68ffaca4c..000000000 --- a/Adyen/Model/Transfers/BankAccountV3AccountIdentification.cs +++ /dev/null @@ -1,743 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Transfers -{ - /// - /// Contains the bank account details. The fields required in this object depend on the country of the bank account and the currency of the transfer. - /// - [JsonConverter(typeof(BankAccountV3AccountIdentificationJsonConverter))] - [DataContract(Name = "BankAccountV3_accountIdentification")] - public partial class BankAccountV3AccountIdentification : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of AULocalAccountIdentification. - public BankAccountV3AccountIdentification(AULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BRLocalAccountIdentification. - public BankAccountV3AccountIdentification(BRLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CALocalAccountIdentification. - public BankAccountV3AccountIdentification(CALocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of CZLocalAccountIdentification. - public BankAccountV3AccountIdentification(CZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of DKLocalAccountIdentification. - public BankAccountV3AccountIdentification(DKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HKLocalAccountIdentification. - public BankAccountV3AccountIdentification(HKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of HULocalAccountIdentification. - public BankAccountV3AccountIdentification(HULocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IbanAccountIdentification. - public BankAccountV3AccountIdentification(IbanAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NOLocalAccountIdentification. - public BankAccountV3AccountIdentification(NOLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NZLocalAccountIdentification. - public BankAccountV3AccountIdentification(NZLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of NumberAndBicAccountIdentification. - public BankAccountV3AccountIdentification(NumberAndBicAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PLLocalAccountIdentification. - public BankAccountV3AccountIdentification(PLLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SELocalAccountIdentification. - public BankAccountV3AccountIdentification(SELocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of SGLocalAccountIdentification. - public BankAccountV3AccountIdentification(SGLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of UKLocalAccountIdentification. - public BankAccountV3AccountIdentification(UKLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of USLocalAccountIdentification. - public BankAccountV3AccountIdentification(USLocalAccountIdentification actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(AULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(BRLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CALocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(CZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(DKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(HULocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IbanAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NOLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NZLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(NumberAndBicAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PLLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SELocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(SGLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(UKLocalAccountIdentification)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(USLocalAccountIdentification)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: AULocalAccountIdentification, BRLocalAccountIdentification, CALocalAccountIdentification, CZLocalAccountIdentification, DKLocalAccountIdentification, HKLocalAccountIdentification, HULocalAccountIdentification, IbanAccountIdentification, NOLocalAccountIdentification, NZLocalAccountIdentification, NumberAndBicAccountIdentification, PLLocalAccountIdentification, SELocalAccountIdentification, SGLocalAccountIdentification, UKLocalAccountIdentification, USLocalAccountIdentification"); - } - } - } - - /// - /// Get the actual instance of `AULocalAccountIdentification`. If the actual instance is not `AULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of AULocalAccountIdentification - public AULocalAccountIdentification GetAULocalAccountIdentification() - { - return (AULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `BRLocalAccountIdentification`. If the actual instance is not `BRLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of BRLocalAccountIdentification - public BRLocalAccountIdentification GetBRLocalAccountIdentification() - { - return (BRLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CALocalAccountIdentification`. If the actual instance is not `CALocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CALocalAccountIdentification - public CALocalAccountIdentification GetCALocalAccountIdentification() - { - return (CALocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `CZLocalAccountIdentification`. If the actual instance is not `CZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of CZLocalAccountIdentification - public CZLocalAccountIdentification GetCZLocalAccountIdentification() - { - return (CZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `DKLocalAccountIdentification`. If the actual instance is not `DKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of DKLocalAccountIdentification - public DKLocalAccountIdentification GetDKLocalAccountIdentification() - { - return (DKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HKLocalAccountIdentification`. If the actual instance is not `HKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HKLocalAccountIdentification - public HKLocalAccountIdentification GetHKLocalAccountIdentification() - { - return (HKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `HULocalAccountIdentification`. If the actual instance is not `HULocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of HULocalAccountIdentification - public HULocalAccountIdentification GetHULocalAccountIdentification() - { - return (HULocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `IbanAccountIdentification`. If the actual instance is not `IbanAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of IbanAccountIdentification - public IbanAccountIdentification GetIbanAccountIdentification() - { - return (IbanAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NOLocalAccountIdentification`. If the actual instance is not `NOLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NOLocalAccountIdentification - public NOLocalAccountIdentification GetNOLocalAccountIdentification() - { - return (NOLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NZLocalAccountIdentification`. If the actual instance is not `NZLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NZLocalAccountIdentification - public NZLocalAccountIdentification GetNZLocalAccountIdentification() - { - return (NZLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `NumberAndBicAccountIdentification`. If the actual instance is not `NumberAndBicAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of NumberAndBicAccountIdentification - public NumberAndBicAccountIdentification GetNumberAndBicAccountIdentification() - { - return (NumberAndBicAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `PLLocalAccountIdentification`. If the actual instance is not `PLLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of PLLocalAccountIdentification - public PLLocalAccountIdentification GetPLLocalAccountIdentification() - { - return (PLLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SELocalAccountIdentification`. If the actual instance is not `SELocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SELocalAccountIdentification - public SELocalAccountIdentification GetSELocalAccountIdentification() - { - return (SELocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `SGLocalAccountIdentification`. If the actual instance is not `SGLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of SGLocalAccountIdentification - public SGLocalAccountIdentification GetSGLocalAccountIdentification() - { - return (SGLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `UKLocalAccountIdentification`. If the actual instance is not `UKLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of UKLocalAccountIdentification - public UKLocalAccountIdentification GetUKLocalAccountIdentification() - { - return (UKLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Get the actual instance of `USLocalAccountIdentification`. If the actual instance is not `USLocalAccountIdentification`, - /// the InvalidClassException will be thrown - /// - /// An instance of USLocalAccountIdentification - public USLocalAccountIdentification GetUSLocalAccountIdentification() - { - return (USLocalAccountIdentification)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BankAccountV3AccountIdentification {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, BankAccountV3AccountIdentification.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of BankAccountV3AccountIdentification - /// - /// JSON string - /// An instance of BankAccountV3AccountIdentification - public static BankAccountV3AccountIdentification FromJson(string jsonString) - { - BankAccountV3AccountIdentification newBankAccountV3AccountIdentification = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newBankAccountV3AccountIdentification; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the AULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("AULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the BRLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("BRLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CALocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("CALocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the CZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("CZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the DKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("DKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("HKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the HULocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("HULocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the IbanAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("IbanAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NOLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("NOLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NZLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("NZLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the NumberAndBicAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("NumberAndBicAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the PLLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("PLLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SELocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("SELocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the SGLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("SGLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the UKLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("UKLocalAccountIdentification"); - match++; - } - // Check if the jsonString type enum matches the USLocalAccountIdentification type enums - if (ContainsValue(type)) - { - newBankAccountV3AccountIdentification = new BankAccountV3AccountIdentification(JsonConvert.DeserializeObject(jsonString, BankAccountV3AccountIdentification.SerializerSettings)); - matchedTypes.Add("USLocalAccountIdentification"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newBankAccountV3AccountIdentification; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankAccountV3AccountIdentification); - } - - /// - /// Returns true if BankAccountV3AccountIdentification instances are equal - /// - /// Instance of BankAccountV3AccountIdentification to be compared - /// Boolean - public bool Equals(BankAccountV3AccountIdentification input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for BankAccountV3AccountIdentification - /// - public class BankAccountV3AccountIdentificationJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(BankAccountV3AccountIdentification).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return BankAccountV3AccountIdentification.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Transfers/BankCategoryData.cs b/Adyen/Model/Transfers/BankCategoryData.cs deleted file mode 100644 index 10629360c..000000000 --- a/Adyen/Model/Transfers/BankCategoryData.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// BankCategoryData - /// - [DataContract(Name = "BankCategoryData")] - public partial class BankCategoryData : IEquatable, IValidatableObject - { - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [JsonConverter(typeof(StringEnumConverter))] - public enum PriorityEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [DataMember(Name = "priority", EmitDefaultValue = false)] - public PriorityEnum? Priority { get; set; } - /// - /// **bank** - /// - /// **bank** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1 - - } - - - /// - /// **bank** - /// - /// **bank** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN).. - /// **bank** (default to TypeEnum.Bank). - public BankCategoryData(PriorityEnum? priority = default(PriorityEnum?), TypeEnum? type = TypeEnum.Bank) - { - this.Priority = priority; - this.Type = type; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class BankCategoryData {\n"); - sb.Append(" Priority: ").Append(Priority).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BankCategoryData); - } - - /// - /// Returns true if BankCategoryData instances are equal - /// - /// Instance of BankCategoryData to be compared - /// Boolean - public bool Equals(BankCategoryData input) - { - if (input == null) - { - return false; - } - return - ( - this.Priority == input.Priority || - this.Priority.Equals(input.Priority) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Priority.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CALocalAccountIdentification.cs b/Adyen/Model/Transfers/CALocalAccountIdentification.cs deleted file mode 100644 index fc961d81d..000000000 --- a/Adyen/Model/Transfers/CALocalAccountIdentification.cs +++ /dev/null @@ -1,274 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CALocalAccountIdentification - /// - [DataContract(Name = "CALocalAccountIdentification")] - public partial class CALocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 1, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 2 - - } - - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// **caLocal** - /// - /// **caLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum CaLocal for value: caLocal - /// - [EnumMember(Value = "caLocal")] - CaLocal = 1 - - } - - - /// - /// **caLocal** - /// - /// **caLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CALocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. (required). - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The 3-digit institution number, without separators or whitespace. (required). - /// The 5-digit transit number, without separators or whitespace. (required). - /// **caLocal** (required) (default to TypeEnum.CaLocal). - public CALocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string institutionNumber = default(string), string transitNumber = default(string), TypeEnum type = TypeEnum.CaLocal) - { - this.AccountNumber = accountNumber; - this.InstitutionNumber = institutionNumber; - this.TransitNumber = transitNumber; - this.Type = type; - this.AccountType = accountType; - } - - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. - /// - /// The 5- to 12-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit institution number, without separators or whitespace. - /// - /// The 3-digit institution number, without separators or whitespace. - [DataMember(Name = "institutionNumber", IsRequired = false, EmitDefaultValue = false)] - public string InstitutionNumber { get; set; } - - /// - /// The 5-digit transit number, without separators or whitespace. - /// - /// The 5-digit transit number, without separators or whitespace. - [DataMember(Name = "transitNumber", IsRequired = false, EmitDefaultValue = false)] - public string TransitNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CALocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" InstitutionNumber: ").Append(InstitutionNumber).Append("\n"); - sb.Append(" TransitNumber: ").Append(TransitNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CALocalAccountIdentification); - } - - /// - /// Returns true if CALocalAccountIdentification instances are equal - /// - /// Instance of CALocalAccountIdentification to be compared - /// Boolean - public bool Equals(CALocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.InstitutionNumber == input.InstitutionNumber || - (this.InstitutionNumber != null && - this.InstitutionNumber.Equals(input.InstitutionNumber)) - ) && - ( - this.TransitNumber == input.TransitNumber || - (this.TransitNumber != null && - this.TransitNumber.Equals(input.TransitNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.InstitutionNumber != null) - { - hashCode = (hashCode * 59) + this.InstitutionNumber.GetHashCode(); - } - if (this.TransitNumber != null) - { - hashCode = (hashCode * 59) + this.TransitNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 12) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 12.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 5.", new [] { "AccountNumber" }); - } - - // InstitutionNumber (string) maxLength - if (this.InstitutionNumber != null && this.InstitutionNumber.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstitutionNumber, length must be less than 3.", new [] { "InstitutionNumber" }); - } - - // InstitutionNumber (string) minLength - if (this.InstitutionNumber != null && this.InstitutionNumber.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for InstitutionNumber, length must be greater than 3.", new [] { "InstitutionNumber" }); - } - - // TransitNumber (string) maxLength - if (this.TransitNumber != null && this.TransitNumber.Length > 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransitNumber, length must be less than 5.", new [] { "TransitNumber" }); - } - - // TransitNumber (string) minLength - if (this.TransitNumber != null && this.TransitNumber.Length < 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for TransitNumber, length must be greater than 5.", new [] { "TransitNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CZLocalAccountIdentification.cs b/Adyen/Model/Transfers/CZLocalAccountIdentification.cs deleted file mode 100644 index 7baf2d303..000000000 --- a/Adyen/Model/Transfers/CZLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CZLocalAccountIdentification - /// - [DataContract(Name = "CZLocalAccountIdentification")] - public partial class CZLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **czLocal** - /// - /// **czLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum CzLocal for value: czLocal - /// - [EnumMember(Value = "czLocal")] - CzLocal = 1 - - } - - - /// - /// **czLocal** - /// - /// **czLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CZLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) (required). - /// The 4-digit bank code (Kód banky), without separators or whitespace. (required). - /// **czLocal** (required) (default to TypeEnum.CzLocal). - public CZLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.CzLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.Type = type; - } - - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) - /// - /// The 2- to 16-digit bank account number (Číslo účtu) in the following format: - The optional prefix (předčíslí). - The required second part (základní část) which must be at least two non-zero digits. Examples: - **19-123457** (with prefix) - **123457** (without prefix) - **000019-0000123457** (with prefix, normalized) - **000000-0000123457** (without prefix, normalized) - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4-digit bank code (Kód banky), without separators or whitespace. - /// - /// The 4-digit bank code (Kód banky), without separators or whitespace. - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CZLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CZLocalAccountIdentification); - } - - /// - /// Returns true if CZLocalAccountIdentification instances are equal - /// - /// Instance of CZLocalAccountIdentification to be compared - /// Boolean - public bool Equals(CZLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 17) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 17.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 2.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 4.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 4.", new [] { "BankCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CancelTransfersRequest.cs b/Adyen/Model/Transfers/CancelTransfersRequest.cs deleted file mode 100644 index cae57f40b..000000000 --- a/Adyen/Model/Transfers/CancelTransfersRequest.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CancelTransfersRequest - /// - [DataContract(Name = "CancelTransfersRequest")] - public partial class CancelTransfersRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains the unique identifiers of the transfers that you want to cancel.. - public CancelTransfersRequest(List transferIds = default(List)) - { - this.TransferIds = transferIds; - } - - /// - /// Contains the unique identifiers of the transfers that you want to cancel. - /// - /// Contains the unique identifiers of the transfers that you want to cancel. - [DataMember(Name = "transferIds", EmitDefaultValue = false)] - public List TransferIds { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CancelTransfersRequest {\n"); - sb.Append(" TransferIds: ").Append(TransferIds).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CancelTransfersRequest); - } - - /// - /// Returns true if CancelTransfersRequest instances are equal - /// - /// Instance of CancelTransfersRequest to be compared - /// Boolean - public bool Equals(CancelTransfersRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.TransferIds == input.TransferIds || - this.TransferIds != null && - input.TransferIds != null && - this.TransferIds.SequenceEqual(input.TransferIds) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TransferIds != null) - { - hashCode = (hashCode * 59) + this.TransferIds.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CapitalBalance.cs b/Adyen/Model/Transfers/CapitalBalance.cs deleted file mode 100644 index eb7ce23c8..000000000 --- a/Adyen/Model/Transfers/CapitalBalance.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CapitalBalance - /// - [DataContract(Name = "CapitalBalance")] - public partial class CapitalBalance : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CapitalBalance() { } - /// - /// Initializes a new instance of the class. - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). (required). - /// Fee amount. (required). - /// Principal amount. (required). - /// Total amount. A sum of principal amount and fee amount. (required). - public CapitalBalance(string currency = default(string), long? fee = default(long?), long? principal = default(long?), long? total = default(long?)) - { - this.Currency = currency; - this.Fee = fee; - this.Principal = principal; - this.Total = total; - } - - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - /// - /// The three-character [ISO currency code](https://docs.adyen.com/development-resources/currency-codes). - [DataMember(Name = "currency", IsRequired = false, EmitDefaultValue = false)] - public string Currency { get; set; } - - /// - /// Fee amount. - /// - /// Fee amount. - [DataMember(Name = "fee", IsRequired = false, EmitDefaultValue = false)] - public long? Fee { get; set; } - - /// - /// Principal amount. - /// - /// Principal amount. - [DataMember(Name = "principal", IsRequired = false, EmitDefaultValue = false)] - public long? Principal { get; set; } - - /// - /// Total amount. A sum of principal amount and fee amount. - /// - /// Total amount. A sum of principal amount and fee amount. - [DataMember(Name = "total", IsRequired = false, EmitDefaultValue = false)] - public long? Total { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapitalBalance {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Fee: ").Append(Fee).Append("\n"); - sb.Append(" Principal: ").Append(Principal).Append("\n"); - sb.Append(" Total: ").Append(Total).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapitalBalance); - } - - /// - /// Returns true if CapitalBalance instances are equal - /// - /// Instance of CapitalBalance to be compared - /// Boolean - public bool Equals(CapitalBalance input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Fee == input.Fee || - this.Fee.Equals(input.Fee) - ) && - ( - this.Principal == input.Principal || - this.Principal.Equals(input.Principal) - ) && - ( - this.Total == input.Total || - this.Total.Equals(input.Total) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Fee.GetHashCode(); - hashCode = (hashCode * 59) + this.Principal.GetHashCode(); - hashCode = (hashCode * 59) + this.Total.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CapitalGrant.cs b/Adyen/Model/Transfers/CapitalGrant.cs deleted file mode 100644 index 4228e110c..000000000 --- a/Adyen/Model/Transfers/CapitalGrant.cs +++ /dev/null @@ -1,322 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CapitalGrant - /// - [DataContract(Name = "CapitalGrant")] - public partial class CapitalGrant : IEquatable, IValidatableObject - { - /// - /// The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**, **WrittenOff**, **Failed**, **Revoked**. - /// - /// The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**, **WrittenOff**, **Failed**, **Revoked**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Pending for value: Pending - /// - [EnumMember(Value = "Pending")] - Pending = 1, - - /// - /// Enum Active for value: Active - /// - [EnumMember(Value = "Active")] - Active = 2, - - /// - /// Enum Repaid for value: Repaid - /// - [EnumMember(Value = "Repaid")] - Repaid = 3, - - /// - /// Enum Failed for value: Failed - /// - [EnumMember(Value = "Failed")] - Failed = 4, - - /// - /// Enum WrittenOff for value: WrittenOff - /// - [EnumMember(Value = "WrittenOff")] - WrittenOff = 5, - - /// - /// Enum Revoked for value: Revoked - /// - [EnumMember(Value = "Revoked")] - Revoked = 6 - - } - - - /// - /// The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**, **WrittenOff**, **Failed**, **Revoked**. - /// - /// The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**, **WrittenOff**, **Failed**, **Revoked**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CapitalGrant() { } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// balances (required). - /// counterparty. - /// fee. - /// The identifier of the grant account used for the grant. (required). - /// The identifier of the grant offer that has been selected and from which the grant details will be used. (required). - /// The identifier of the grant reference. (required). - /// repayment. - /// The current status of the grant. Possible values: **Pending**, **Active**, **Repaid**, **WrittenOff**, **Failed**, **Revoked**. (required). - public CapitalGrant(Amount amount = default(Amount), CapitalBalance balances = default(CapitalBalance), Counterparty counterparty = default(Counterparty), Fee fee = default(Fee), string grantAccountId = default(string), string grantOfferId = default(string), string id = default(string), Repayment repayment = default(Repayment), StatusEnum status = default(StatusEnum)) - { - this.Balances = balances; - this.GrantAccountId = grantAccountId; - this.GrantOfferId = grantOfferId; - this.Id = id; - this.Status = status; - this.Amount = amount; - this.Counterparty = counterparty; - this.Fee = fee; - this.Repayment = repayment; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets Balances - /// - [DataMember(Name = "balances", IsRequired = false, EmitDefaultValue = false)] - public CapitalBalance Balances { get; set; } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", EmitDefaultValue = false)] - public Counterparty Counterparty { get; set; } - - /// - /// Gets or Sets Fee - /// - [DataMember(Name = "fee", EmitDefaultValue = false)] - public Fee Fee { get; set; } - - /// - /// The identifier of the grant account used for the grant. - /// - /// The identifier of the grant account used for the grant. - [DataMember(Name = "grantAccountId", IsRequired = false, EmitDefaultValue = false)] - public string GrantAccountId { get; set; } - - /// - /// The identifier of the grant offer that has been selected and from which the grant details will be used. - /// - /// The identifier of the grant offer that has been selected and from which the grant details will be used. - [DataMember(Name = "grantOfferId", IsRequired = false, EmitDefaultValue = false)] - public string GrantOfferId { get; set; } - - /// - /// The identifier of the grant reference. - /// - /// The identifier of the grant reference. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Repayment - /// - [DataMember(Name = "repayment", EmitDefaultValue = false)] - public Repayment Repayment { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapitalGrant {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Balances: ").Append(Balances).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" Fee: ").Append(Fee).Append("\n"); - sb.Append(" GrantAccountId: ").Append(GrantAccountId).Append("\n"); - sb.Append(" GrantOfferId: ").Append(GrantOfferId).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Repayment: ").Append(Repayment).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapitalGrant); - } - - /// - /// Returns true if CapitalGrant instances are equal - /// - /// Instance of CapitalGrant to be compared - /// Boolean - public bool Equals(CapitalGrant input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Balances == input.Balances || - (this.Balances != null && - this.Balances.Equals(input.Balances)) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.Fee == input.Fee || - (this.Fee != null && - this.Fee.Equals(input.Fee)) - ) && - ( - this.GrantAccountId == input.GrantAccountId || - (this.GrantAccountId != null && - this.GrantAccountId.Equals(input.GrantAccountId)) - ) && - ( - this.GrantOfferId == input.GrantOfferId || - (this.GrantOfferId != null && - this.GrantOfferId.Equals(input.GrantOfferId)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Repayment == input.Repayment || - (this.Repayment != null && - this.Repayment.Equals(input.Repayment)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Balances != null) - { - hashCode = (hashCode * 59) + this.Balances.GetHashCode(); - } - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.Fee != null) - { - hashCode = (hashCode * 59) + this.Fee.GetHashCode(); - } - if (this.GrantAccountId != null) - { - hashCode = (hashCode * 59) + this.GrantAccountId.GetHashCode(); - } - if (this.GrantOfferId != null) - { - hashCode = (hashCode * 59) + this.GrantOfferId.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Repayment != null) - { - hashCode = (hashCode * 59) + this.Repayment.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CapitalGrantInfo.cs b/Adyen/Model/Transfers/CapitalGrantInfo.cs deleted file mode 100644 index b7379b371..000000000 --- a/Adyen/Model/Transfers/CapitalGrantInfo.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CapitalGrantInfo - /// - [DataContract(Name = "CapitalGrantInfo")] - public partial class CapitalGrantInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CapitalGrantInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// counterparty. - /// The identifier of the grant account used for the grant. (required). - /// The identifier of the grant offer that has been selected and from which the grant details will be used. (required). - public CapitalGrantInfo(Counterparty counterparty = default(Counterparty), string grantAccountId = default(string), string grantOfferId = default(string)) - { - this.GrantAccountId = grantAccountId; - this.GrantOfferId = grantOfferId; - this.Counterparty = counterparty; - } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", EmitDefaultValue = false)] - public Counterparty Counterparty { get; set; } - - /// - /// The identifier of the grant account used for the grant. - /// - /// The identifier of the grant account used for the grant. - [DataMember(Name = "grantAccountId", IsRequired = false, EmitDefaultValue = false)] - public string GrantAccountId { get; set; } - - /// - /// The identifier of the grant offer that has been selected and from which the grant details will be used. - /// - /// The identifier of the grant offer that has been selected and from which the grant details will be used. - [DataMember(Name = "grantOfferId", IsRequired = false, EmitDefaultValue = false)] - public string GrantOfferId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapitalGrantInfo {\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" GrantAccountId: ").Append(GrantAccountId).Append("\n"); - sb.Append(" GrantOfferId: ").Append(GrantOfferId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapitalGrantInfo); - } - - /// - /// Returns true if CapitalGrantInfo instances are equal - /// - /// Instance of CapitalGrantInfo to be compared - /// Boolean - public bool Equals(CapitalGrantInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.GrantAccountId == input.GrantAccountId || - (this.GrantAccountId != null && - this.GrantAccountId.Equals(input.GrantAccountId)) - ) && - ( - this.GrantOfferId == input.GrantOfferId || - (this.GrantOfferId != null && - this.GrantOfferId.Equals(input.GrantOfferId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.GrantAccountId != null) - { - hashCode = (hashCode * 59) + this.GrantAccountId.GetHashCode(); - } - if (this.GrantOfferId != null) - { - hashCode = (hashCode * 59) + this.GrantOfferId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CapitalGrants.cs b/Adyen/Model/Transfers/CapitalGrants.cs deleted file mode 100644 index a97877ea8..000000000 --- a/Adyen/Model/Transfers/CapitalGrants.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CapitalGrants - /// - [DataContract(Name = "CapitalGrants")] - public partial class CapitalGrants : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CapitalGrants() { } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the grant. (required). - public CapitalGrants(List grants = default(List)) - { - this.Grants = grants; - } - - /// - /// The unique identifier of the grant. - /// - /// The unique identifier of the grant. - [DataMember(Name = "grants", IsRequired = false, EmitDefaultValue = false)] - public List Grants { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CapitalGrants {\n"); - sb.Append(" Grants: ").Append(Grants).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CapitalGrants); - } - - /// - /// Returns true if CapitalGrants instances are equal - /// - /// Instance of CapitalGrants to be compared - /// Boolean - public bool Equals(CapitalGrants input) - { - if (input == null) - { - return false; - } - return - ( - this.Grants == input.Grants || - this.Grants != null && - input.Grants != null && - this.Grants.SequenceEqual(input.Grants) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Grants != null) - { - hashCode = (hashCode * 59) + this.Grants.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Card.cs b/Adyen/Model/Transfers/Card.cs deleted file mode 100644 index b8b266788..000000000 --- a/Adyen/Model/Transfers/Card.cs +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Card - /// - [DataContract(Name = "Card")] - public partial class Card : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Card() { } - /// - /// Initializes a new instance of the class. - /// - /// cardHolder (required). - /// cardIdentification (required). - public Card(PartyIdentification cardHolder = default(PartyIdentification), CardIdentification cardIdentification = default(CardIdentification)) - { - this.CardHolder = cardHolder; - this.CardIdentification = cardIdentification; - } - - /// - /// Gets or Sets CardHolder - /// - [DataMember(Name = "cardHolder", IsRequired = false, EmitDefaultValue = false)] - public PartyIdentification CardHolder { get; set; } - - /// - /// Gets or Sets CardIdentification - /// - [DataMember(Name = "cardIdentification", IsRequired = false, EmitDefaultValue = false)] - public CardIdentification CardIdentification { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Card {\n"); - sb.Append(" CardHolder: ").Append(CardHolder).Append("\n"); - sb.Append(" CardIdentification: ").Append(CardIdentification).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Card); - } - - /// - /// Returns true if Card instances are equal - /// - /// Instance of Card to be compared - /// Boolean - public bool Equals(Card input) - { - if (input == null) - { - return false; - } - return - ( - this.CardHolder == input.CardHolder || - (this.CardHolder != null && - this.CardHolder.Equals(input.CardHolder)) - ) && - ( - this.CardIdentification == input.CardIdentification || - (this.CardIdentification != null && - this.CardIdentification.Equals(input.CardIdentification)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CardHolder != null) - { - hashCode = (hashCode * 59) + this.CardHolder.GetHashCode(); - } - if (this.CardIdentification != null) - { - hashCode = (hashCode * 59) + this.CardIdentification.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CardIdentification.cs b/Adyen/Model/Transfers/CardIdentification.cs deleted file mode 100644 index 6ae0de064..000000000 --- a/Adyen/Model/Transfers/CardIdentification.cs +++ /dev/null @@ -1,315 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CardIdentification - /// - [DataContract(Name = "CardIdentification")] - public partial class CardIdentification : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The expiry month of the card. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November. - /// The expiry year of the card. Format: four digits. For example: 2020. - /// The issue number of the card. Applies only to some UK debit cards.. - /// The card number without any separators. For security, the response only includes the last four digits of the card number.. - /// The month when the card was issued. Applies only to some UK debit cards. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November. - /// The year when the card was issued. Applies only to some UK debit cards. Format: four digits. For example: 2020. - /// The unique [token](/payouts/payout-service/pay-out-to-cards/manage-card-information#save-card-details) created to identify the counterparty. . - public CardIdentification(string expiryMonth = default(string), string expiryYear = default(string), string issueNumber = default(string), string number = default(string), string startMonth = default(string), string startYear = default(string), string storedPaymentMethodId = default(string)) - { - this.ExpiryMonth = expiryMonth; - this.ExpiryYear = expiryYear; - this.IssueNumber = issueNumber; - this.Number = number; - this.StartMonth = startMonth; - this.StartYear = startYear; - this.StoredPaymentMethodId = storedPaymentMethodId; - } - - /// - /// The expiry month of the card. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November - /// - /// The expiry month of the card. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November - [DataMember(Name = "expiryMonth", EmitDefaultValue = false)] - public string ExpiryMonth { get; set; } - - /// - /// The expiry year of the card. Format: four digits. For example: 2020 - /// - /// The expiry year of the card. Format: four digits. For example: 2020 - [DataMember(Name = "expiryYear", EmitDefaultValue = false)] - public string ExpiryYear { get; set; } - - /// - /// The issue number of the card. Applies only to some UK debit cards. - /// - /// The issue number of the card. Applies only to some UK debit cards. - [DataMember(Name = "issueNumber", EmitDefaultValue = false)] - public string IssueNumber { get; set; } - - /// - /// The card number without any separators. For security, the response only includes the last four digits of the card number. - /// - /// The card number without any separators. For security, the response only includes the last four digits of the card number. - [DataMember(Name = "number", EmitDefaultValue = false)] - public string Number { get; set; } - - /// - /// The month when the card was issued. Applies only to some UK debit cards. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November - /// - /// The month when the card was issued. Applies only to some UK debit cards. Format: two digits. Add a leading zero for single-digit months. For example: * 03 = March * 11 = November - [DataMember(Name = "startMonth", EmitDefaultValue = false)] - public string StartMonth { get; set; } - - /// - /// The year when the card was issued. Applies only to some UK debit cards. Format: four digits. For example: 2020 - /// - /// The year when the card was issued. Applies only to some UK debit cards. Format: four digits. For example: 2020 - [DataMember(Name = "startYear", EmitDefaultValue = false)] - public string StartYear { get; set; } - - /// - /// The unique [token](/payouts/payout-service/pay-out-to-cards/manage-card-information#save-card-details) created to identify the counterparty. - /// - /// The unique [token](/payouts/payout-service/pay-out-to-cards/manage-card-information#save-card-details) created to identify the counterparty. - [DataMember(Name = "storedPaymentMethodId", EmitDefaultValue = false)] - public string StoredPaymentMethodId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CardIdentification {\n"); - sb.Append(" ExpiryMonth: ").Append(ExpiryMonth).Append("\n"); - sb.Append(" ExpiryYear: ").Append(ExpiryYear).Append("\n"); - sb.Append(" IssueNumber: ").Append(IssueNumber).Append("\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" StartMonth: ").Append(StartMonth).Append("\n"); - sb.Append(" StartYear: ").Append(StartYear).Append("\n"); - sb.Append(" StoredPaymentMethodId: ").Append(StoredPaymentMethodId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CardIdentification); - } - - /// - /// Returns true if CardIdentification instances are equal - /// - /// Instance of CardIdentification to be compared - /// Boolean - public bool Equals(CardIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiryMonth == input.ExpiryMonth || - (this.ExpiryMonth != null && - this.ExpiryMonth.Equals(input.ExpiryMonth)) - ) && - ( - this.ExpiryYear == input.ExpiryYear || - (this.ExpiryYear != null && - this.ExpiryYear.Equals(input.ExpiryYear)) - ) && - ( - this.IssueNumber == input.IssueNumber || - (this.IssueNumber != null && - this.IssueNumber.Equals(input.IssueNumber)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ) && - ( - this.StartMonth == input.StartMonth || - (this.StartMonth != null && - this.StartMonth.Equals(input.StartMonth)) - ) && - ( - this.StartYear == input.StartYear || - (this.StartYear != null && - this.StartYear.Equals(input.StartYear)) - ) && - ( - this.StoredPaymentMethodId == input.StoredPaymentMethodId || - (this.StoredPaymentMethodId != null && - this.StoredPaymentMethodId.Equals(input.StoredPaymentMethodId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ExpiryMonth != null) - { - hashCode = (hashCode * 59) + this.ExpiryMonth.GetHashCode(); - } - if (this.ExpiryYear != null) - { - hashCode = (hashCode * 59) + this.ExpiryYear.GetHashCode(); - } - if (this.IssueNumber != null) - { - hashCode = (hashCode * 59) + this.IssueNumber.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - if (this.StartMonth != null) - { - hashCode = (hashCode * 59) + this.StartMonth.GetHashCode(); - } - if (this.StartYear != null) - { - hashCode = (hashCode * 59) + this.StartYear.GetHashCode(); - } - if (this.StoredPaymentMethodId != null) - { - hashCode = (hashCode * 59) + this.StoredPaymentMethodId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // ExpiryMonth (string) maxLength - if (this.ExpiryMonth != null && this.ExpiryMonth.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryMonth, length must be less than 2.", new [] { "ExpiryMonth" }); - } - - // ExpiryMonth (string) minLength - if (this.ExpiryMonth != null && this.ExpiryMonth.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryMonth, length must be greater than 2.", new [] { "ExpiryMonth" }); - } - - // ExpiryYear (string) maxLength - if (this.ExpiryYear != null && this.ExpiryYear.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryYear, length must be less than 4.", new [] { "ExpiryYear" }); - } - - // ExpiryYear (string) minLength - if (this.ExpiryYear != null && this.ExpiryYear.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ExpiryYear, length must be greater than 4.", new [] { "ExpiryYear" }); - } - - // IssueNumber (string) maxLength - if (this.IssueNumber != null && this.IssueNumber.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssueNumber, length must be less than 2.", new [] { "IssueNumber" }); - } - - // IssueNumber (string) minLength - if (this.IssueNumber != null && this.IssueNumber.Length < 1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for IssueNumber, length must be greater than 1.", new [] { "IssueNumber" }); - } - - // Number (string) maxLength - if (this.Number != null && this.Number.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, length must be less than 19.", new [] { "Number" }); - } - - // Number (string) minLength - if (this.Number != null && this.Number.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, length must be greater than 4.", new [] { "Number" }); - } - - // StartMonth (string) maxLength - if (this.StartMonth != null && this.StartMonth.Length > 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartMonth, length must be less than 2.", new [] { "StartMonth" }); - } - - // StartMonth (string) minLength - if (this.StartMonth != null && this.StartMonth.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartMonth, length must be greater than 2.", new [] { "StartMonth" }); - } - - // StartYear (string) maxLength - if (this.StartYear != null && this.StartYear.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartYear, length must be less than 4.", new [] { "StartYear" }); - } - - // StartYear (string) minLength - if (this.StartYear != null && this.StartYear.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StartYear, length must be greater than 4.", new [] { "StartYear" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/ConfirmationTrackingData.cs b/Adyen/Model/Transfers/ConfirmationTrackingData.cs deleted file mode 100644 index 3b4779b86..000000000 --- a/Adyen/Model/Transfers/ConfirmationTrackingData.cs +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// ConfirmationTrackingData - /// - [DataContract(Name = "ConfirmationTrackingData")] - public partial class ConfirmationTrackingData : IEquatable, IValidatableObject - { - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 1 - - } - - - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. - /// - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Confirmation for value: confirmation - /// - [EnumMember(Value = "confirmation")] - Confirmation = 1 - - } - - - /// - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. - /// - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ConfirmationTrackingData() { } - /// - /// Initializes a new instance of the class. - /// - /// The status of the transfer. Possible values: - **credited**: the funds are credited to your user's transfer instrument or bank account. (required). - /// The type of the tracking event. Possible values: - **confirmation**: the transfer passed Adyen's internal review. (required) (default to TypeEnum.Confirmation). - public ConfirmationTrackingData(StatusEnum status = default(StatusEnum), TypeEnum type = TypeEnum.Confirmation) - { - this.Status = status; - this.Type = type; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ConfirmationTrackingData {\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ConfirmationTrackingData); - } - - /// - /// Returns true if ConfirmationTrackingData instances are equal - /// - /// Instance of ConfirmationTrackingData to be compared - /// Boolean - public bool Equals(ConfirmationTrackingData input) - { - if (input == null) - { - return false; - } - return - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Counterparty.cs b/Adyen/Model/Transfers/Counterparty.cs deleted file mode 100644 index 4d4368613..000000000 --- a/Adyen/Model/Transfers/Counterparty.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Counterparty - /// - [DataContract(Name = "Counterparty")] - public partial class Counterparty : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided.. - /// The identifier of the balance account that belongs to the receiving account holder.. - /// The identifier of the transfer instrument that belongs to the legal entity of the account holder.. - public Counterparty(string accountHolderId = default(string), string balanceAccountId = default(string), string transferInstrumentId = default(string)) - { - this.AccountHolderId = accountHolderId; - this.BalanceAccountId = balanceAccountId; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided. - /// - /// The identifier of the receiving account holder. The payout will default to the primary balance account of this account holder if no `balanceAccountId` is provided. - [DataMember(Name = "accountHolderId", EmitDefaultValue = false)] - public string AccountHolderId { get; set; } - - /// - /// The identifier of the balance account that belongs to the receiving account holder. - /// - /// The identifier of the balance account that belongs to the receiving account holder. - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// The identifier of the transfer instrument that belongs to the legal entity of the account holder. - /// - /// The identifier of the transfer instrument that belongs to the legal entity of the account holder. - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Counterparty {\n"); - sb.Append(" AccountHolderId: ").Append(AccountHolderId).Append("\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Counterparty); - } - - /// - /// Returns true if Counterparty instances are equal - /// - /// Instance of Counterparty to be compared - /// Boolean - public bool Equals(Counterparty input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolderId == input.AccountHolderId || - (this.AccountHolderId != null && - this.AccountHolderId.Equals(input.AccountHolderId)) - ) && - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolderId != null) - { - hashCode = (hashCode * 59) + this.AccountHolderId.GetHashCode(); - } - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CounterpartyInfoV3.cs b/Adyen/Model/Transfers/CounterpartyInfoV3.cs deleted file mode 100644 index dbcf7112f..000000000 --- a/Adyen/Model/Transfers/CounterpartyInfoV3.cs +++ /dev/null @@ -1,184 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CounterpartyInfoV3 - /// - [DataContract(Name = "CounterpartyInfoV3")] - public partial class CounterpartyInfoV3 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id).. - /// bankAccount. - /// card. - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id).. - public CounterpartyInfoV3(string balanceAccountId = default(string), BankAccountV3 bankAccount = default(BankAccountV3), Card card = default(Card), string transferInstrumentId = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.BankAccount = bankAccount; - this.Card = card; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountV3 BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CounterpartyInfoV3 {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CounterpartyInfoV3); - } - - /// - /// Returns true if CounterpartyInfoV3 instances are equal - /// - /// Instance of CounterpartyInfoV3 to be compared - /// Boolean - public bool Equals(CounterpartyInfoV3 input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/CounterpartyV3.cs b/Adyen/Model/Transfers/CounterpartyV3.cs deleted file mode 100644 index 0e035d0d5..000000000 --- a/Adyen/Model/Transfers/CounterpartyV3.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// CounterpartyV3 - /// - [DataContract(Name = "CounterpartyV3")] - public partial class CounterpartyV3 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id).. - /// bankAccount. - /// card. - /// merchant. - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id).. - public CounterpartyV3(string balanceAccountId = default(string), BankAccountV3 bankAccount = default(BankAccountV3), Card card = default(Card), MerchantData merchant = default(MerchantData), string transferInstrumentId = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.BankAccount = bankAccount; - this.Card = card; - this.Merchant = merchant; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountV3 BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Gets or Sets Merchant - /// - [DataMember(Name = "merchant", EmitDefaultValue = false)] - public MerchantData Merchant { get; set; } - - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CounterpartyV3 {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Merchant: ").Append(Merchant).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CounterpartyV3); - } - - /// - /// Returns true if CounterpartyV3 instances are equal - /// - /// Instance of CounterpartyV3 to be compared - /// Boolean - public bool Equals(CounterpartyV3 input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Merchant == input.Merchant || - (this.Merchant != null && - this.Merchant.Equals(input.Merchant)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Merchant != null) - { - hashCode = (hashCode * 59) + this.Merchant.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/DKLocalAccountIdentification.cs b/Adyen/Model/Transfers/DKLocalAccountIdentification.cs deleted file mode 100644 index 3a29c95a0..000000000 --- a/Adyen/Model/Transfers/DKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// DKLocalAccountIdentification - /// - [DataContract(Name = "DKLocalAccountIdentification")] - public partial class DKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **dkLocal** - /// - /// **dkLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum DkLocal for value: dkLocal - /// - [EnumMember(Value = "dkLocal")] - DkLocal = 1 - - } - - - /// - /// **dkLocal** - /// - /// **dkLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). (required). - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). (required). - /// **dkLocal** (required) (default to TypeEnum.DkLocal). - public DKLocalAccountIdentification(string accountNumber = default(string), string bankCode = default(string), TypeEnum type = TypeEnum.DkLocal) - { - this.AccountNumber = accountNumber; - this.BankCode = bankCode; - this.Type = type; - } - - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). - /// - /// The 4-10 digits bank account number (Kontonummer) (without separators or whitespace). - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). - /// - /// The 4-digit bank code (Registreringsnummer) (without separators or whitespace). - [DataMember(Name = "bankCode", IsRequired = false, EmitDefaultValue = false)] - public string BankCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" BankCode: ").Append(BankCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DKLocalAccountIdentification); - } - - /// - /// Returns true if DKLocalAccountIdentification instances are equal - /// - /// Instance of DKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(DKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.BankCode == input.BankCode || - (this.BankCode != null && - this.BankCode.Equals(input.BankCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.BankCode != null) - { - hashCode = (hashCode * 59) + this.BankCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 4.", new [] { "AccountNumber" }); - } - - // BankCode (string) maxLength - if (this.BankCode != null && this.BankCode.Length > 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be less than 4.", new [] { "BankCode" }); - } - - // BankCode (string) minLength - if (this.BankCode != null && this.BankCode.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for BankCode, length must be greater than 4.", new [] { "BankCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/DirectDebitInformation.cs b/Adyen/Model/Transfers/DirectDebitInformation.cs deleted file mode 100644 index a7d798f11..000000000 --- a/Adyen/Model/Transfers/DirectDebitInformation.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// DirectDebitInformation - /// - [DataContract(Name = "DirectDebitInformation")] - public partial class DirectDebitInformation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The date when the direct debit mandate was accepted by your user, in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format.. - /// The date when the funds are deducted from your user's balance account.. - /// Your unique identifier for the direct debit mandate.. - /// Identifies the direct debit transfer's type. Possible values: **OneOff**, **First**, **Recurring**, **Final**.. - public DirectDebitInformation(DateTime dateOfSignature = default(DateTime), DateTime dueDate = default(DateTime), string mandateId = default(string), string sequenceType = default(string)) - { - this.DateOfSignature = dateOfSignature; - this.DueDate = dueDate; - this.MandateId = mandateId; - this.SequenceType = sequenceType; - } - - /// - /// The date when the direct debit mandate was accepted by your user, in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. - /// - /// The date when the direct debit mandate was accepted by your user, in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. - [DataMember(Name = "dateOfSignature", EmitDefaultValue = false)] - public DateTime DateOfSignature { get; set; } - - /// - /// The date when the funds are deducted from your user's balance account. - /// - /// The date when the funds are deducted from your user's balance account. - [DataMember(Name = "dueDate", EmitDefaultValue = false)] - public DateTime DueDate { get; set; } - - /// - /// Your unique identifier for the direct debit mandate. - /// - /// Your unique identifier for the direct debit mandate. - [DataMember(Name = "mandateId", EmitDefaultValue = false)] - public string MandateId { get; set; } - - /// - /// Identifies the direct debit transfer's type. Possible values: **OneOff**, **First**, **Recurring**, **Final**. - /// - /// Identifies the direct debit transfer's type. Possible values: **OneOff**, **First**, **Recurring**, **Final**. - [DataMember(Name = "sequenceType", EmitDefaultValue = false)] - public string SequenceType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DirectDebitInformation {\n"); - sb.Append(" DateOfSignature: ").Append(DateOfSignature).Append("\n"); - sb.Append(" DueDate: ").Append(DueDate).Append("\n"); - sb.Append(" MandateId: ").Append(MandateId).Append("\n"); - sb.Append(" SequenceType: ").Append(SequenceType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DirectDebitInformation); - } - - /// - /// Returns true if DirectDebitInformation instances are equal - /// - /// Instance of DirectDebitInformation to be compared - /// Boolean - public bool Equals(DirectDebitInformation input) - { - if (input == null) - { - return false; - } - return - ( - this.DateOfSignature == input.DateOfSignature || - (this.DateOfSignature != null && - this.DateOfSignature.Equals(input.DateOfSignature)) - ) && - ( - this.DueDate == input.DueDate || - (this.DueDate != null && - this.DueDate.Equals(input.DueDate)) - ) && - ( - this.MandateId == input.MandateId || - (this.MandateId != null && - this.MandateId.Equals(input.MandateId)) - ) && - ( - this.SequenceType == input.SequenceType || - (this.SequenceType != null && - this.SequenceType.Equals(input.SequenceType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DateOfSignature != null) - { - hashCode = (hashCode * 59) + this.DateOfSignature.GetHashCode(); - } - if (this.DueDate != null) - { - hashCode = (hashCode * 59) + this.DueDate.GetHashCode(); - } - if (this.MandateId != null) - { - hashCode = (hashCode * 59) + this.MandateId.GetHashCode(); - } - if (this.SequenceType != null) - { - hashCode = (hashCode * 59) + this.SequenceType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/EstimationTrackingData.cs b/Adyen/Model/Transfers/EstimationTrackingData.cs deleted file mode 100644 index 77103f56a..000000000 --- a/Adyen/Model/Transfers/EstimationTrackingData.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// EstimationTrackingData - /// - [DataContract(Name = "EstimationTrackingData")] - public partial class EstimationTrackingData : IEquatable, IValidatableObject - { - /// - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. - /// - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Estimation for value: estimation - /// - [EnumMember(Value = "estimation")] - Estimation = 1 - - } - - - /// - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. - /// - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EstimationTrackingData() { } - /// - /// Initializes a new instance of the class. - /// - /// The estimated time the beneficiary should have access to the funds. (required). - /// The type of tracking event. Possible values: - **estimation**: the estimated date and time of when the funds will be credited has been determined. (required) (default to TypeEnum.Estimation). - public EstimationTrackingData(DateTime estimatedArrivalTime = default(DateTime), TypeEnum type = TypeEnum.Estimation) - { - this.EstimatedArrivalTime = estimatedArrivalTime; - this.Type = type; - } - - /// - /// The estimated time the beneficiary should have access to the funds. - /// - /// The estimated time the beneficiary should have access to the funds. - [DataMember(Name = "estimatedArrivalTime", IsRequired = false, EmitDefaultValue = false)] - public DateTime EstimatedArrivalTime { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class EstimationTrackingData {\n"); - sb.Append(" EstimatedArrivalTime: ").Append(EstimatedArrivalTime).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EstimationTrackingData); - } - - /// - /// Returns true if EstimationTrackingData instances are equal - /// - /// Instance of EstimationTrackingData to be compared - /// Boolean - public bool Equals(EstimationTrackingData input) - { - if (input == null) - { - return false; - } - return - ( - this.EstimatedArrivalTime == input.EstimatedArrivalTime || - (this.EstimatedArrivalTime != null && - this.EstimatedArrivalTime.Equals(input.EstimatedArrivalTime)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EstimatedArrivalTime != null) - { - hashCode = (hashCode * 59) + this.EstimatedArrivalTime.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/ExternalReason.cs b/Adyen/Model/Transfers/ExternalReason.cs deleted file mode 100644 index 262464092..000000000 --- a/Adyen/Model/Transfers/ExternalReason.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// ExternalReason - /// - [DataContract(Name = "ExternalReason")] - public partial class ExternalReason : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The reason code.. - /// The description of the reason code.. - /// The namespace for the reason code.. - public ExternalReason(string code = default(string), string description = default(string), string _namespace = default(string)) - { - this.Code = code; - this.Description = description; - this.Namespace = _namespace; - } - - /// - /// The reason code. - /// - /// The reason code. - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } - - /// - /// The description of the reason code. - /// - /// The description of the reason code. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The namespace for the reason code. - /// - /// The namespace for the reason code. - [DataMember(Name = "namespace", EmitDefaultValue = false)] - public string Namespace { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ExternalReason {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Namespace: ").Append(Namespace).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ExternalReason); - } - - /// - /// Returns true if ExternalReason instances are equal - /// - /// Instance of ExternalReason to be compared - /// Boolean - public bool Equals(ExternalReason input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Namespace == input.Namespace || - (this.Namespace != null && - this.Namespace.Equals(input.Namespace)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Namespace != null) - { - hashCode = (hashCode * 59) + this.Namespace.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Fee.cs b/Adyen/Model/Transfers/Fee.cs deleted file mode 100644 index fa3c86ce0..000000000 --- a/Adyen/Model/Transfers/Fee.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Fee - /// - [DataContract(Name = "Fee")] - public partial class Fee : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Fee() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - public Fee(Amount amount = default(Amount)) - { - this.Amount = amount; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Fee {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Fee); - } - - /// - /// Returns true if Fee instances are equal - /// - /// Instance of Fee to be compared - /// Boolean - public bool Equals(Fee input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/FindTransfersResponse.cs b/Adyen/Model/Transfers/FindTransfersResponse.cs deleted file mode 100644 index 8d7aa423e..000000000 --- a/Adyen/Model/Transfers/FindTransfersResponse.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// FindTransfersResponse - /// - [DataContract(Name = "FindTransfersResponse")] - public partial class FindTransfersResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Contains the transfers that match the query parameters.. - public FindTransfersResponse(Links links = default(Links), List data = default(List)) - { - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// Contains the transfers that match the query parameters. - /// - /// Contains the transfers that match the query parameters. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class FindTransfersResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FindTransfersResponse); - } - - /// - /// Returns true if FindTransfersResponse instances are equal - /// - /// Instance of FindTransfersResponse to be compared - /// Boolean - public bool Equals(FindTransfersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/HKLocalAccountIdentification.cs b/Adyen/Model/Transfers/HKLocalAccountIdentification.cs deleted file mode 100644 index eb7eada4e..000000000 --- a/Adyen/Model/Transfers/HKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// HKLocalAccountIdentification - /// - [DataContract(Name = "HKLocalAccountIdentification")] - public partial class HKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **hkLocal** - /// - /// **hkLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum HkLocal for value: hkLocal - /// - [EnumMember(Value = "hkLocal")] - HkLocal = 1 - - } - - - /// - /// **hkLocal** - /// - /// **hkLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. (required). - /// The 3-digit clearing code, without separators or whitespace. (required). - /// **hkLocal** (required) (default to TypeEnum.HkLocal). - public HKLocalAccountIdentification(string accountNumber = default(string), string clearingCode = default(string), TypeEnum type = TypeEnum.HkLocal) - { - this.AccountNumber = accountNumber; - this.ClearingCode = clearingCode; - this.Type = type; - } - - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. - /// - /// The 9- to 15-character bank account number (alphanumeric), without separators or whitespace. Starts with the 3-digit branch code. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 3-digit clearing code, without separators or whitespace. - /// - /// The 3-digit clearing code, without separators or whitespace. - [DataMember(Name = "clearingCode", IsRequired = false, EmitDefaultValue = false)] - public string ClearingCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" ClearingCode: ").Append(ClearingCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HKLocalAccountIdentification); - } - - /// - /// Returns true if HKLocalAccountIdentification instances are equal - /// - /// Instance of HKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(HKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.ClearingCode == input.ClearingCode || - (this.ClearingCode != null && - this.ClearingCode.Equals(input.ClearingCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.ClearingCode != null) - { - hashCode = (hashCode * 59) + this.ClearingCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 15) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 15.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 9.", new [] { "AccountNumber" }); - } - - // ClearingCode (string) maxLength - if (this.ClearingCode != null && this.ClearingCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be less than 3.", new [] { "ClearingCode" }); - } - - // ClearingCode (string) minLength - if (this.ClearingCode != null && this.ClearingCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingCode, length must be greater than 3.", new [] { "ClearingCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/HULocalAccountIdentification.cs b/Adyen/Model/Transfers/HULocalAccountIdentification.cs deleted file mode 100644 index 2a3945077..000000000 --- a/Adyen/Model/Transfers/HULocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// HULocalAccountIdentification - /// - [DataContract(Name = "HULocalAccountIdentification")] - public partial class HULocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **huLocal** - /// - /// **huLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum HuLocal for value: huLocal - /// - [EnumMember(Value = "huLocal")] - HuLocal = 1 - - } - - - /// - /// **huLocal** - /// - /// **huLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HULocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 24-digit bank account number, without separators or whitespace. (required). - /// **huLocal** (required) (default to TypeEnum.HuLocal). - public HULocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.HuLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 24-digit bank account number, without separators or whitespace. - /// - /// The 24-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HULocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HULocalAccountIdentification); - } - - /// - /// Returns true if HULocalAccountIdentification instances are equal - /// - /// Instance of HULocalAccountIdentification to be compared - /// Boolean - public bool Equals(HULocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 24) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 24.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 24) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 24.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/IbanAccountIdentification.cs b/Adyen/Model/Transfers/IbanAccountIdentification.cs deleted file mode 100644 index 20c892836..000000000 --- a/Adyen/Model/Transfers/IbanAccountIdentification.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// IbanAccountIdentification - /// - [DataContract(Name = "IbanAccountIdentification")] - public partial class IbanAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **iban** - /// - /// **iban** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Iban for value: iban - /// - [EnumMember(Value = "iban")] - Iban = 1 - - } - - - /// - /// **iban** - /// - /// **iban** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IbanAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. (required). - /// **iban** (required) (default to TypeEnum.Iban). - public IbanAccountIdentification(string iban = default(string), TypeEnum type = TypeEnum.Iban) - { - this.Iban = iban; - this.Type = type; - } - - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - /// - /// The international bank account number as defined in the [ISO-13616](https://www.iso.org/standard/81090.html) standard. - [DataMember(Name = "iban", IsRequired = false, EmitDefaultValue = false)] - public string Iban { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IbanAccountIdentification {\n"); - sb.Append(" Iban: ").Append(Iban).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IbanAccountIdentification); - } - - /// - /// Returns true if IbanAccountIdentification instances are equal - /// - /// Instance of IbanAccountIdentification to be compared - /// Boolean - public bool Equals(IbanAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Iban == input.Iban || - (this.Iban != null && - this.Iban.Equals(input.Iban)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Iban != null) - { - hashCode = (hashCode * 59) + this.Iban.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/InternalCategoryData.cs b/Adyen/Model/Transfers/InternalCategoryData.cs deleted file mode 100644 index b7255e40b..000000000 --- a/Adyen/Model/Transfers/InternalCategoryData.cs +++ /dev/null @@ -1,178 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// InternalCategoryData - /// - [DataContract(Name = "InternalCategoryData")] - public partial class InternalCategoryData : IEquatable, IValidatableObject - { - /// - /// **internal** - /// - /// **internal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 1 - - } - - - /// - /// **internal** - /// - /// **internal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The capture's merchant reference included in the transfer.. - /// The capture reference included in the transfer.. - /// **internal** (default to TypeEnum.Internal). - public InternalCategoryData(string modificationMerchantReference = default(string), string modificationPspReference = default(string), TypeEnum? type = TypeEnum.Internal) - { - this.ModificationMerchantReference = modificationMerchantReference; - this.ModificationPspReference = modificationPspReference; - this.Type = type; - } - - /// - /// The capture's merchant reference included in the transfer. - /// - /// The capture's merchant reference included in the transfer. - [DataMember(Name = "modificationMerchantReference", EmitDefaultValue = false)] - public string ModificationMerchantReference { get; set; } - - /// - /// The capture reference included in the transfer. - /// - /// The capture reference included in the transfer. - [DataMember(Name = "modificationPspReference", EmitDefaultValue = false)] - public string ModificationPspReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InternalCategoryData {\n"); - sb.Append(" ModificationMerchantReference: ").Append(ModificationMerchantReference).Append("\n"); - sb.Append(" ModificationPspReference: ").Append(ModificationPspReference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InternalCategoryData); - } - - /// - /// Returns true if InternalCategoryData instances are equal - /// - /// Instance of InternalCategoryData to be compared - /// Boolean - public bool Equals(InternalCategoryData input) - { - if (input == null) - { - return false; - } - return - ( - this.ModificationMerchantReference == input.ModificationMerchantReference || - (this.ModificationMerchantReference != null && - this.ModificationMerchantReference.Equals(input.ModificationMerchantReference)) - ) && - ( - this.ModificationPspReference == input.ModificationPspReference || - (this.ModificationPspReference != null && - this.ModificationPspReference.Equals(input.ModificationPspReference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ModificationMerchantReference != null) - { - hashCode = (hashCode * 59) + this.ModificationMerchantReference.GetHashCode(); - } - if (this.ModificationPspReference != null) - { - hashCode = (hashCode * 59) + this.ModificationPspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/InternalReviewTrackingData.cs b/Adyen/Model/Transfers/InternalReviewTrackingData.cs deleted file mode 100644 index edc26272f..000000000 --- a/Adyen/Model/Transfers/InternalReviewTrackingData.cs +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// InternalReviewTrackingData - /// - [DataContract(Name = "InternalReviewTrackingData")] - public partial class InternalReviewTrackingData : IEquatable, IValidatableObject - { - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum RefusedForRegulatoryReasons for value: refusedForRegulatoryReasons - /// - [EnumMember(Value = "refusedForRegulatoryReasons")] - RefusedForRegulatoryReasons = 1 - - } - - - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. - /// - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 1, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 2 - - } - - - /// - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. - /// - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. - /// - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum InternalReview for value: internalReview - /// - [EnumMember(Value = "internalReview")] - InternalReview = 1 - - } - - - /// - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. - /// - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InternalReviewTrackingData() { } - /// - /// Initializes a new instance of the class. - /// - /// The reason why the transfer failed Adyen's internal review. Possible values: - **refusedForRegulatoryReasons**: the transfer does not comply with Adyen's risk policy. For more information, [contact the Support Team](https://www.adyen.help/hc/en-us/requests/new). . - /// The status of the transfer. Possible values: - **pending**: the transfer is under internal review. - **failed**: the transfer failed Adyen's internal review. For details, see `reason`. (required). - /// The type of tracking event. Possible values: - **internalReview**: the transfer was flagged because it does not comply with Adyen's risk policy. (required) (default to TypeEnum.InternalReview). - public InternalReviewTrackingData(ReasonEnum? reason = default(ReasonEnum?), StatusEnum status = default(StatusEnum), TypeEnum type = TypeEnum.InternalReview) - { - this.Status = status; - this.Type = type; - this.Reason = reason; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InternalReviewTrackingData {\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InternalReviewTrackingData); - } - - /// - /// Returns true if InternalReviewTrackingData instances are equal - /// - /// Instance of InternalReviewTrackingData to be compared - /// Boolean - public bool Equals(InternalReviewTrackingData input) - { - if (input == null) - { - return false; - } - return - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/InvalidField.cs b/Adyen/Model/Transfers/InvalidField.cs deleted file mode 100644 index 91105c60c..000000000 --- a/Adyen/Model/Transfers/InvalidField.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// InvalidField - /// - [DataContract(Name = "InvalidField")] - public partial class InvalidField : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InvalidField() { } - /// - /// Initializes a new instance of the class. - /// - /// Description of the validation error. (required). - /// The field that has an invalid value. (required). - /// The invalid value. (required). - public InvalidField(string message = default(string), string name = default(string), string value = default(string)) - { - this.Message = message; - this.Name = name; - this.Value = value; - } - - /// - /// Description of the validation error. - /// - /// Description of the validation error. - [DataMember(Name = "message", IsRequired = false, EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The field that has an invalid value. - /// - /// The field that has an invalid value. - [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The invalid value. - /// - /// The invalid value. - [DataMember(Name = "value", IsRequired = false, EmitDefaultValue = false)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class InvalidField {\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InvalidField); - } - - /// - /// Returns true if InvalidField instances are equal - /// - /// Instance of InvalidField to be compared - /// Boolean - public bool Equals(InvalidField input) - { - if (input == null) - { - return false; - } - return - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/IssuedCard.cs b/Adyen/Model/Transfers/IssuedCard.cs deleted file mode 100644 index dd0bb4adc..000000000 --- a/Adyen/Model/Transfers/IssuedCard.cs +++ /dev/null @@ -1,373 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// IssuedCard - /// - [DataContract(Name = "IssuedCard")] - public partial class IssuedCard : IEquatable, IValidatableObject - { - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - [JsonConverter(typeof(StringEnumConverter))] - public enum PanEntryModeEnum - { - /// - /// Enum Chip for value: chip - /// - [EnumMember(Value = "chip")] - Chip = 1, - - /// - /// Enum Cof for value: cof - /// - [EnumMember(Value = "cof")] - Cof = 2, - - /// - /// Enum Contactless for value: contactless - /// - [EnumMember(Value = "contactless")] - Contactless = 3, - - /// - /// Enum Ecommerce for value: ecommerce - /// - [EnumMember(Value = "ecommerce")] - Ecommerce = 4, - - /// - /// Enum Magstripe for value: magstripe - /// - [EnumMember(Value = "magstripe")] - Magstripe = 5, - - /// - /// Enum Manual for value: manual - /// - [EnumMember(Value = "manual")] - Manual = 6, - - /// - /// Enum Token for value: token - /// - [EnumMember(Value = "token")] - Token = 7 - - } - - - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - /// - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**. - [DataMember(Name = "panEntryMode", EmitDefaultValue = false)] - public PanEntryModeEnum? PanEntryMode { get; set; } - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - [JsonConverter(typeof(StringEnumConverter))] - public enum ProcessingTypeEnum - { - /// - /// Enum AtmWithdraw for value: atmWithdraw - /// - [EnumMember(Value = "atmWithdraw")] - AtmWithdraw = 1, - - /// - /// Enum BalanceInquiry for value: balanceInquiry - /// - [EnumMember(Value = "balanceInquiry")] - BalanceInquiry = 2, - - /// - /// Enum Ecommerce for value: ecommerce - /// - [EnumMember(Value = "ecommerce")] - Ecommerce = 3, - - /// - /// Enum Moto for value: moto - /// - [EnumMember(Value = "moto")] - Moto = 4, - - /// - /// Enum Pos for value: pos - /// - [EnumMember(Value = "pos")] - Pos = 5, - - /// - /// Enum PurchaseWithCashback for value: purchaseWithCashback - /// - [EnumMember(Value = "purchaseWithCashback")] - PurchaseWithCashback = 6, - - /// - /// Enum Recurring for value: recurring - /// - [EnumMember(Value = "recurring")] - Recurring = 7, - - /// - /// Enum Token for value: token - /// - [EnumMember(Value = "token")] - Token = 8 - - } - - - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - /// - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments. - [DataMember(Name = "processingType", EmitDefaultValue = false)] - public ProcessingTypeEnum? ProcessingType { get; set; } - /// - /// **issuedCard** - /// - /// **issuedCard** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum IssuedCard for value: issuedCard - /// - [EnumMember(Value = "issuedCard")] - IssuedCard = 1 - - } - - - /// - /// **issuedCard** - /// - /// **issuedCard** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation**. - /// Indicates the method used for entering the PAN to initiate a transaction. Possible values: **manual**, **chip**, **magstripe**, **contactless**, **cof**, **ecommerce**, **token**.. - /// Contains information about how the payment was processed. For example, **ecommerce** for online or **pos** for in-person payments.. - /// relayedAuthorisationData. - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments.. - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme.. - /// **issuedCard** (default to TypeEnum.IssuedCard). - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information.. - public IssuedCard(string authorisationType = default(string), PanEntryModeEnum? panEntryMode = default(PanEntryModeEnum?), ProcessingTypeEnum? processingType = default(ProcessingTypeEnum?), RelayedAuthorisationData relayedAuthorisationData = default(RelayedAuthorisationData), string schemeTraceId = default(string), string schemeUniqueTransactionId = default(string), TypeEnum? type = TypeEnum.IssuedCard, List validationFacts = default(List)) - { - this.AuthorisationType = authorisationType; - this.PanEntryMode = panEntryMode; - this.ProcessingType = processingType; - this.RelayedAuthorisationData = relayedAuthorisationData; - this.SchemeTraceId = schemeTraceId; - this.SchemeUniqueTransactionId = schemeUniqueTransactionId; - this.Type = type; - this.ValidationFacts = validationFacts; - } - - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** - /// - /// The authorisation type. For example, **defaultAuthorisation**, **preAuthorisation**, **finalAuthorisation** - [DataMember(Name = "authorisationType", EmitDefaultValue = false)] - public string AuthorisationType { get; set; } - - /// - /// Gets or Sets RelayedAuthorisationData - /// - [DataMember(Name = "relayedAuthorisationData", EmitDefaultValue = false)] - public RelayedAuthorisationData RelayedAuthorisationData { get; set; } - - /// - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. - /// - /// The identifier of the original payment. This ID is provided by the scheme and can be alphanumeric or numeric, depending on the scheme. The `schemeTraceID` should refer to an original `schemeUniqueTransactionID` provided in an earlier payment (not necessarily processed by Adyen). A `schemeTraceId` is typically available for authorization adjustments or recurring payments. - [DataMember(Name = "schemeTraceId", EmitDefaultValue = false)] - public string SchemeTraceId { get; set; } - - /// - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. - /// - /// The unique identifier created by the scheme. This ID can be alphanumeric or numeric depending on the scheme. - [DataMember(Name = "schemeUniqueTransactionId", EmitDefaultValue = false)] - public string SchemeUniqueTransactionId { get; set; } - - /// - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. - /// - /// The evaluation of the validation facts. See [validation checks](https://docs.adyen.com/issuing/validation-checks) for more information. - [DataMember(Name = "validationFacts", EmitDefaultValue = false)] - public List ValidationFacts { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IssuedCard {\n"); - sb.Append(" AuthorisationType: ").Append(AuthorisationType).Append("\n"); - sb.Append(" PanEntryMode: ").Append(PanEntryMode).Append("\n"); - sb.Append(" ProcessingType: ").Append(ProcessingType).Append("\n"); - sb.Append(" RelayedAuthorisationData: ").Append(RelayedAuthorisationData).Append("\n"); - sb.Append(" SchemeTraceId: ").Append(SchemeTraceId).Append("\n"); - sb.Append(" SchemeUniqueTransactionId: ").Append(SchemeUniqueTransactionId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" ValidationFacts: ").Append(ValidationFacts).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IssuedCard); - } - - /// - /// Returns true if IssuedCard instances are equal - /// - /// Instance of IssuedCard to be compared - /// Boolean - public bool Equals(IssuedCard input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthorisationType == input.AuthorisationType || - (this.AuthorisationType != null && - this.AuthorisationType.Equals(input.AuthorisationType)) - ) && - ( - this.PanEntryMode == input.PanEntryMode || - this.PanEntryMode.Equals(input.PanEntryMode) - ) && - ( - this.ProcessingType == input.ProcessingType || - this.ProcessingType.Equals(input.ProcessingType) - ) && - ( - this.RelayedAuthorisationData == input.RelayedAuthorisationData || - (this.RelayedAuthorisationData != null && - this.RelayedAuthorisationData.Equals(input.RelayedAuthorisationData)) - ) && - ( - this.SchemeTraceId == input.SchemeTraceId || - (this.SchemeTraceId != null && - this.SchemeTraceId.Equals(input.SchemeTraceId)) - ) && - ( - this.SchemeUniqueTransactionId == input.SchemeUniqueTransactionId || - (this.SchemeUniqueTransactionId != null && - this.SchemeUniqueTransactionId.Equals(input.SchemeUniqueTransactionId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.ValidationFacts == input.ValidationFacts || - this.ValidationFacts != null && - input.ValidationFacts != null && - this.ValidationFacts.SequenceEqual(input.ValidationFacts) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthorisationType != null) - { - hashCode = (hashCode * 59) + this.AuthorisationType.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PanEntryMode.GetHashCode(); - hashCode = (hashCode * 59) + this.ProcessingType.GetHashCode(); - if (this.RelayedAuthorisationData != null) - { - hashCode = (hashCode * 59) + this.RelayedAuthorisationData.GetHashCode(); - } - if (this.SchemeTraceId != null) - { - hashCode = (hashCode * 59) + this.SchemeTraceId.GetHashCode(); - } - if (this.SchemeUniqueTransactionId != null) - { - hashCode = (hashCode * 59) + this.SchemeUniqueTransactionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.ValidationFacts != null) - { - hashCode = (hashCode * 59) + this.ValidationFacts.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/IssuingTransactionData.cs b/Adyen/Model/Transfers/IssuingTransactionData.cs deleted file mode 100644 index 599dc5f36..000000000 --- a/Adyen/Model/Transfers/IssuingTransactionData.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// IssuingTransactionData - /// - [DataContract(Name = "IssuingTransactionData")] - public partial class IssuingTransactionData : IEquatable, IValidatableObject - { - /// - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data - /// - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum IssuingTransactionData for value: issuingTransactionData - /// - [EnumMember(Value = "issuingTransactionData")] - IssuingTransactionData = 1 - - } - - - /// - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data - /// - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IssuingTransactionData() { } - /// - /// Initializes a new instance of the class. - /// - /// captureCycleId associated with transfer event.. - /// The type of events data. Possible values: - **issuingTransactionData**: issuing transaction data (required) (default to TypeEnum.IssuingTransactionData). - public IssuingTransactionData(string captureCycleId = default(string), TypeEnum type = TypeEnum.IssuingTransactionData) - { - this.Type = type; - this.CaptureCycleId = captureCycleId; - } - - /// - /// captureCycleId associated with transfer event. - /// - /// captureCycleId associated with transfer event. - [DataMember(Name = "captureCycleId", EmitDefaultValue = false)] - public string CaptureCycleId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IssuingTransactionData {\n"); - sb.Append(" CaptureCycleId: ").Append(CaptureCycleId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as IssuingTransactionData); - } - - /// - /// Returns true if IssuingTransactionData instances are equal - /// - /// Instance of IssuingTransactionData to be compared - /// Boolean - public bool Equals(IssuingTransactionData input) - { - if (input == null) - { - return false; - } - return - ( - this.CaptureCycleId == input.CaptureCycleId || - (this.CaptureCycleId != null && - this.CaptureCycleId.Equals(input.CaptureCycleId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CaptureCycleId != null) - { - hashCode = (hashCode * 59) + this.CaptureCycleId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Leg.cs b/Adyen/Model/Transfers/Leg.cs deleted file mode 100644 index c8b1b2fb6..000000000 --- a/Adyen/Model/Transfers/Leg.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Leg - /// - [DataContract(Name = "Leg")] - public partial class Leg : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details.. - /// The basic fare code for this leg.. - /// IATA code of the carrier operating the flight.. - /// The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details. - /// The flight departure date.. - /// The flight identifier.. - public Leg(string arrivalAirportCode = default(string), string basicFareCode = default(string), string carrierCode = default(string), string departureAirportCode = default(string), string departureDate = default(string), string flightNumber = default(string)) - { - this.ArrivalAirportCode = arrivalAirportCode; - this.BasicFareCode = basicFareCode; - this.CarrierCode = carrierCode; - this.DepartureAirportCode = departureAirportCode; - this.DepartureDate = departureDate; - this.FlightNumber = flightNumber; - } - - /// - /// The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. - /// - /// The IATA 3-letter airport code of the destination airport. This field is required if the airline data includes leg details. - [DataMember(Name = "arrivalAirportCode", EmitDefaultValue = false)] - public string ArrivalAirportCode { get; set; } - - /// - /// The basic fare code for this leg. - /// - /// The basic fare code for this leg. - [DataMember(Name = "basicFareCode", EmitDefaultValue = false)] - public string BasicFareCode { get; set; } - - /// - /// IATA code of the carrier operating the flight. - /// - /// IATA code of the carrier operating the flight. - [DataMember(Name = "carrierCode", EmitDefaultValue = false)] - public string CarrierCode { get; set; } - - /// - /// The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details - /// - /// The IATA three-letter airport code of the departure airport. This field is required if the airline data includes leg details - [DataMember(Name = "departureAirportCode", EmitDefaultValue = false)] - public string DepartureAirportCode { get; set; } - - /// - /// The flight departure date. - /// - /// The flight departure date. - [DataMember(Name = "departureDate", EmitDefaultValue = false)] - public string DepartureDate { get; set; } - - /// - /// The flight identifier. - /// - /// The flight identifier. - [DataMember(Name = "flightNumber", EmitDefaultValue = false)] - public string FlightNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Leg {\n"); - sb.Append(" ArrivalAirportCode: ").Append(ArrivalAirportCode).Append("\n"); - sb.Append(" BasicFareCode: ").Append(BasicFareCode).Append("\n"); - sb.Append(" CarrierCode: ").Append(CarrierCode).Append("\n"); - sb.Append(" DepartureAirportCode: ").Append(DepartureAirportCode).Append("\n"); - sb.Append(" DepartureDate: ").Append(DepartureDate).Append("\n"); - sb.Append(" FlightNumber: ").Append(FlightNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Leg); - } - - /// - /// Returns true if Leg instances are equal - /// - /// Instance of Leg to be compared - /// Boolean - public bool Equals(Leg input) - { - if (input == null) - { - return false; - } - return - ( - this.ArrivalAirportCode == input.ArrivalAirportCode || - (this.ArrivalAirportCode != null && - this.ArrivalAirportCode.Equals(input.ArrivalAirportCode)) - ) && - ( - this.BasicFareCode == input.BasicFareCode || - (this.BasicFareCode != null && - this.BasicFareCode.Equals(input.BasicFareCode)) - ) && - ( - this.CarrierCode == input.CarrierCode || - (this.CarrierCode != null && - this.CarrierCode.Equals(input.CarrierCode)) - ) && - ( - this.DepartureAirportCode == input.DepartureAirportCode || - (this.DepartureAirportCode != null && - this.DepartureAirportCode.Equals(input.DepartureAirportCode)) - ) && - ( - this.DepartureDate == input.DepartureDate || - (this.DepartureDate != null && - this.DepartureDate.Equals(input.DepartureDate)) - ) && - ( - this.FlightNumber == input.FlightNumber || - (this.FlightNumber != null && - this.FlightNumber.Equals(input.FlightNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrivalAirportCode != null) - { - hashCode = (hashCode * 59) + this.ArrivalAirportCode.GetHashCode(); - } - if (this.BasicFareCode != null) - { - hashCode = (hashCode * 59) + this.BasicFareCode.GetHashCode(); - } - if (this.CarrierCode != null) - { - hashCode = (hashCode * 59) + this.CarrierCode.GetHashCode(); - } - if (this.DepartureAirportCode != null) - { - hashCode = (hashCode * 59) + this.DepartureAirportCode.GetHashCode(); - } - if (this.DepartureDate != null) - { - hashCode = (hashCode * 59) + this.DepartureDate.GetHashCode(); - } - if (this.FlightNumber != null) - { - hashCode = (hashCode * 59) + this.FlightNumber.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Link.cs b/Adyen/Model/Transfers/Link.cs deleted file mode 100644 index c71f539c0..000000000 --- a/Adyen/Model/Transfers/Link.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Link - /// - [DataContract(Name = "Link")] - public partial class Link : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The link to the resource.. - public Link(string href = default(string)) - { - this.Href = href; - } - - /// - /// The link to the resource. - /// - /// The link to the resource. - [DataMember(Name = "href", EmitDefaultValue = false)] - public string Href { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Link {\n"); - sb.Append(" Href: ").Append(Href).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Link); - } - - /// - /// Returns true if Link instances are equal - /// - /// Instance of Link to be compared - /// Boolean - public bool Equals(Link input) - { - if (input == null) - { - return false; - } - return - ( - this.Href == input.Href || - (this.Href != null && - this.Href.Equals(input.Href)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Href != null) - { - hashCode = (hashCode * 59) + this.Href.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Links.cs b/Adyen/Model/Transfers/Links.cs deleted file mode 100644 index ac35b2cc8..000000000 --- a/Adyen/Model/Transfers/Links.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Links - /// - [DataContract(Name = "Links")] - public partial class Links : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// next. - /// prev. - public Links(Link next = default(Link), Link prev = default(Link)) - { - this.Next = next; - this.Prev = prev; - } - - /// - /// Gets or Sets Next - /// - [DataMember(Name = "next", EmitDefaultValue = false)] - public Link Next { get; set; } - - /// - /// Gets or Sets Prev - /// - [DataMember(Name = "prev", EmitDefaultValue = false)] - public Link Prev { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Links {\n"); - sb.Append(" Next: ").Append(Next).Append("\n"); - sb.Append(" Prev: ").Append(Prev).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Links); - } - - /// - /// Returns true if Links instances are equal - /// - /// Instance of Links to be compared - /// Boolean - public bool Equals(Links input) - { - if (input == null) - { - return false; - } - return - ( - this.Next == input.Next || - (this.Next != null && - this.Next.Equals(input.Next)) - ) && - ( - this.Prev == input.Prev || - (this.Prev != null && - this.Prev.Equals(input.Prev)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Next != null) - { - hashCode = (hashCode * 59) + this.Next.GetHashCode(); - } - if (this.Prev != null) - { - hashCode = (hashCode * 59) + this.Prev.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Lodging.cs b/Adyen/Model/Transfers/Lodging.cs deleted file mode 100644 index 773aa7c80..000000000 --- a/Adyen/Model/Transfers/Lodging.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Lodging - /// - [DataContract(Name = "Lodging")] - public partial class Lodging : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The check-in date.. - /// The total number of nights the room is booked for.. - public Lodging(string checkInDate = default(string), int? numberOfNights = default(int?)) - { - this.CheckInDate = checkInDate; - this.NumberOfNights = numberOfNights; - } - - /// - /// The check-in date. - /// - /// The check-in date. - [DataMember(Name = "checkInDate", EmitDefaultValue = false)] - public string CheckInDate { get; set; } - - /// - /// The total number of nights the room is booked for. - /// - /// The total number of nights the room is booked for. - [DataMember(Name = "numberOfNights", EmitDefaultValue = false)] - public int? NumberOfNights { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Lodging {\n"); - sb.Append(" CheckInDate: ").Append(CheckInDate).Append("\n"); - sb.Append(" NumberOfNights: ").Append(NumberOfNights).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Lodging); - } - - /// - /// Returns true if Lodging instances are equal - /// - /// Instance of Lodging to be compared - /// Boolean - public bool Equals(Lodging input) - { - if (input == null) - { - return false; - } - return - ( - this.CheckInDate == input.CheckInDate || - (this.CheckInDate != null && - this.CheckInDate.Equals(input.CheckInDate)) - ) && - ( - this.NumberOfNights == input.NumberOfNights || - this.NumberOfNights.Equals(input.NumberOfNights) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckInDate != null) - { - hashCode = (hashCode * 59) + this.CheckInDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NumberOfNights.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/MerchantData.cs b/Adyen/Model/Transfers/MerchantData.cs deleted file mode 100644 index e9ed87879..000000000 --- a/Adyen/Model/Transfers/MerchantData.cs +++ /dev/null @@ -1,204 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// MerchantData - /// - [DataContract(Name = "MerchantData")] - public partial class MerchantData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the merchant's acquirer.. - /// The merchant category code.. - /// The unique identifier of the merchant.. - /// nameLocation. - /// The postal code of the merchant.. - public MerchantData(string acquirerId = default(string), string mcc = default(string), string merchantId = default(string), NameLocation nameLocation = default(NameLocation), string postalCode = default(string)) - { - this.AcquirerId = acquirerId; - this.Mcc = mcc; - this.MerchantId = merchantId; - this.NameLocation = nameLocation; - this.PostalCode = postalCode; - } - - /// - /// The unique identifier of the merchant's acquirer. - /// - /// The unique identifier of the merchant's acquirer. - [DataMember(Name = "acquirerId", EmitDefaultValue = false)] - public string AcquirerId { get; set; } - - /// - /// The merchant category code. - /// - /// The merchant category code. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The unique identifier of the merchant. - /// - /// The unique identifier of the merchant. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// Gets or Sets NameLocation - /// - [DataMember(Name = "nameLocation", EmitDefaultValue = false)] - public NameLocation NameLocation { get; set; } - - /// - /// The postal code of the merchant. - /// - /// The postal code of the merchant. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantData {\n"); - sb.Append(" AcquirerId: ").Append(AcquirerId).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" NameLocation: ").Append(NameLocation).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantData); - } - - /// - /// Returns true if MerchantData instances are equal - /// - /// Instance of MerchantData to be compared - /// Boolean - public bool Equals(MerchantData input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquirerId == input.AcquirerId || - (this.AcquirerId != null && - this.AcquirerId.Equals(input.AcquirerId)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.NameLocation == input.NameLocation || - (this.NameLocation != null && - this.NameLocation.Equals(input.NameLocation)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcquirerId != null) - { - hashCode = (hashCode * 59) + this.AcquirerId.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.NameLocation != null) - { - hashCode = (hashCode * 59) + this.NameLocation.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/MerchantPurchaseData.cs b/Adyen/Model/Transfers/MerchantPurchaseData.cs deleted file mode 100644 index 071c23987..000000000 --- a/Adyen/Model/Transfers/MerchantPurchaseData.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// MerchantPurchaseData - /// - [DataContract(Name = "MerchantPurchaseData")] - public partial class MerchantPurchaseData : IEquatable, IValidatableObject - { - /// - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data - /// - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum MerchantPurchaseData for value: merchantPurchaseData - /// - [EnumMember(Value = "merchantPurchaseData")] - MerchantPurchaseData = 1 - - } - - - /// - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data - /// - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MerchantPurchaseData() { } - /// - /// Initializes a new instance of the class. - /// - /// airline. - /// Lodging information.. - /// The type of events data. Possible values: - **merchantPurchaseData**: merchant purchase data (required) (default to TypeEnum.MerchantPurchaseData). - public MerchantPurchaseData(Airline airline = default(Airline), List lodging = default(List), TypeEnum type = TypeEnum.MerchantPurchaseData) - { - this.Type = type; - this.Airline = airline; - this.Lodging = lodging; - } - - /// - /// Gets or Sets Airline - /// - [DataMember(Name = "airline", EmitDefaultValue = false)] - public Airline Airline { get; set; } - - /// - /// Lodging information. - /// - /// Lodging information. - [DataMember(Name = "lodging", EmitDefaultValue = false)] - public List Lodging { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class MerchantPurchaseData {\n"); - sb.Append(" Airline: ").Append(Airline).Append("\n"); - sb.Append(" Lodging: ").Append(Lodging).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MerchantPurchaseData); - } - - /// - /// Returns true if MerchantPurchaseData instances are equal - /// - /// Instance of MerchantPurchaseData to be compared - /// Boolean - public bool Equals(MerchantPurchaseData input) - { - if (input == null) - { - return false; - } - return - ( - this.Airline == input.Airline || - (this.Airline != null && - this.Airline.Equals(input.Airline)) - ) && - ( - this.Lodging == input.Lodging || - this.Lodging != null && - input.Lodging != null && - this.Lodging.SequenceEqual(input.Lodging) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Airline != null) - { - hashCode = (hashCode * 59) + this.Airline.GetHashCode(); - } - if (this.Lodging != null) - { - hashCode = (hashCode * 59) + this.Lodging.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Modification.cs b/Adyen/Model/Transfers/Modification.cs deleted file mode 100644 index 58a214391..000000000 --- a/Adyen/Model/Transfers/Modification.cs +++ /dev/null @@ -1,612 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Modification - /// - [DataContract(Name = "Modification")] - public partial class Modification : IEquatable, IValidatableObject - { - /// - /// The status of the transfer event. - /// - /// The status of the transfer event. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ApprovalPending for value: approvalPending - /// - [EnumMember(Value = "approvalPending")] - ApprovalPending = 1, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 2, - - /// - /// Enum AtmWithdrawalReversalPending for value: atmWithdrawalReversalPending - /// - [EnumMember(Value = "atmWithdrawalReversalPending")] - AtmWithdrawalReversalPending = 3, - - /// - /// Enum AtmWithdrawalReversed for value: atmWithdrawalReversed - /// - [EnumMember(Value = "atmWithdrawalReversed")] - AtmWithdrawalReversed = 4, - - /// - /// Enum AuthAdjustmentAuthorised for value: authAdjustmentAuthorised - /// - [EnumMember(Value = "authAdjustmentAuthorised")] - AuthAdjustmentAuthorised = 5, - - /// - /// Enum AuthAdjustmentError for value: authAdjustmentError - /// - [EnumMember(Value = "authAdjustmentError")] - AuthAdjustmentError = 6, - - /// - /// Enum AuthAdjustmentRefused for value: authAdjustmentRefused - /// - [EnumMember(Value = "authAdjustmentRefused")] - AuthAdjustmentRefused = 7, - - /// - /// Enum Authorised for value: authorised - /// - [EnumMember(Value = "authorised")] - Authorised = 8, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 9, - - /// - /// Enum BankTransferPending for value: bankTransferPending - /// - [EnumMember(Value = "bankTransferPending")] - BankTransferPending = 10, - - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 11, - - /// - /// Enum BookingPending for value: bookingPending - /// - [EnumMember(Value = "bookingPending")] - BookingPending = 12, - - /// - /// Enum Cancelled for value: cancelled - /// - [EnumMember(Value = "cancelled")] - Cancelled = 13, - - /// - /// Enum CapturePending for value: capturePending - /// - [EnumMember(Value = "capturePending")] - CapturePending = 14, - - /// - /// Enum CaptureReversalPending for value: captureReversalPending - /// - [EnumMember(Value = "captureReversalPending")] - CaptureReversalPending = 15, - - /// - /// Enum CaptureReversed for value: captureReversed - /// - [EnumMember(Value = "captureReversed")] - CaptureReversed = 16, - - /// - /// Enum Captured for value: captured - /// - [EnumMember(Value = "captured")] - Captured = 17, - - /// - /// Enum CapturedExternally for value: capturedExternally - /// - [EnumMember(Value = "capturedExternally")] - CapturedExternally = 18, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 19, - - /// - /// Enum ChargebackExternally for value: chargebackExternally - /// - [EnumMember(Value = "chargebackExternally")] - ChargebackExternally = 20, - - /// - /// Enum ChargebackPending for value: chargebackPending - /// - [EnumMember(Value = "chargebackPending")] - ChargebackPending = 21, - - /// - /// Enum ChargebackReversalPending for value: chargebackReversalPending - /// - [EnumMember(Value = "chargebackReversalPending")] - ChargebackReversalPending = 22, - - /// - /// Enum ChargebackReversed for value: chargebackReversed - /// - [EnumMember(Value = "chargebackReversed")] - ChargebackReversed = 23, - - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 24, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 25, - - /// - /// Enum DepositCorrectionPending for value: depositCorrectionPending - /// - [EnumMember(Value = "depositCorrectionPending")] - DepositCorrectionPending = 26, - - /// - /// Enum Dispute for value: dispute - /// - [EnumMember(Value = "dispute")] - Dispute = 27, - - /// - /// Enum DisputeClosed for value: disputeClosed - /// - [EnumMember(Value = "disputeClosed")] - DisputeClosed = 28, - - /// - /// Enum DisputeExpired for value: disputeExpired - /// - [EnumMember(Value = "disputeExpired")] - DisputeExpired = 29, - - /// - /// Enum DisputeNeedsReview for value: disputeNeedsReview - /// - [EnumMember(Value = "disputeNeedsReview")] - DisputeNeedsReview = 30, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 31, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 32, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 33, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 34, - - /// - /// Enum FeePending for value: feePending - /// - [EnumMember(Value = "feePending")] - FeePending = 35, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 36, - - /// - /// Enum InternalTransferPending for value: internalTransferPending - /// - [EnumMember(Value = "internalTransferPending")] - InternalTransferPending = 37, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 38, - - /// - /// Enum InvoiceDeductionPending for value: invoiceDeductionPending - /// - [EnumMember(Value = "invoiceDeductionPending")] - InvoiceDeductionPending = 39, - - /// - /// Enum ManualCorrectionPending for value: manualCorrectionPending - /// - [EnumMember(Value = "manualCorrectionPending")] - ManualCorrectionPending = 40, - - /// - /// Enum ManuallyCorrected for value: manuallyCorrected - /// - [EnumMember(Value = "manuallyCorrected")] - ManuallyCorrected = 41, - - /// - /// Enum MatchedStatement for value: matchedStatement - /// - [EnumMember(Value = "matchedStatement")] - MatchedStatement = 42, - - /// - /// Enum MatchedStatementPending for value: matchedStatementPending - /// - [EnumMember(Value = "matchedStatementPending")] - MatchedStatementPending = 43, - - /// - /// Enum MerchantPayin for value: merchantPayin - /// - [EnumMember(Value = "merchantPayin")] - MerchantPayin = 44, - - /// - /// Enum MerchantPayinPending for value: merchantPayinPending - /// - [EnumMember(Value = "merchantPayinPending")] - MerchantPayinPending = 45, - - /// - /// Enum MerchantPayinReversed for value: merchantPayinReversed - /// - [EnumMember(Value = "merchantPayinReversed")] - MerchantPayinReversed = 46, - - /// - /// Enum MerchantPayinReversedPending for value: merchantPayinReversedPending - /// - [EnumMember(Value = "merchantPayinReversedPending")] - MerchantPayinReversedPending = 47, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 48, - - /// - /// Enum MiscCostPending for value: miscCostPending - /// - [EnumMember(Value = "miscCostPending")] - MiscCostPending = 49, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 50, - - /// - /// Enum PaymentCostPending for value: paymentCostPending - /// - [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 51, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 52, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 53, - - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 54, - - /// - /// Enum RefundPending for value: refundPending - /// - [EnumMember(Value = "refundPending")] - RefundPending = 55, - - /// - /// Enum RefundReversalPending for value: refundReversalPending - /// - [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 56, - - /// - /// Enum RefundReversed for value: refundReversed - /// - [EnumMember(Value = "refundReversed")] - RefundReversed = 57, - - /// - /// Enum Refunded for value: refunded - /// - [EnumMember(Value = "refunded")] - Refunded = 58, - - /// - /// Enum RefundedExternally for value: refundedExternally - /// - [EnumMember(Value = "refundedExternally")] - RefundedExternally = 59, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 60, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 61, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 62, - - /// - /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending - /// - [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 63, - - /// - /// Enum Returned for value: returned - /// - [EnumMember(Value = "returned")] - Returned = 64, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 65, - - /// - /// Enum SecondChargebackPending for value: secondChargebackPending - /// - [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 66, - - /// - /// Enum Undefined for value: undefined - /// - [EnumMember(Value = "undefined")] - Undefined = 67 - - } - - - /// - /// The status of the transfer event. - /// - /// The status of the transfer event. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The direction of the money movement.. - /// Our reference for the modification.. - /// Your reference for the modification, used internally within your platform.. - /// The status of the transfer event.. - /// The type of transfer modification.. - public Modification(string direction = default(string), string id = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string type = default(string)) - { - this.Direction = direction; - this.Id = id; - this.Reference = reference; - this.Status = status; - this.Type = type; - } - - /// - /// The direction of the money movement. - /// - /// The direction of the money movement. - [DataMember(Name = "direction", EmitDefaultValue = false)] - public string Direction { get; set; } - - /// - /// Our reference for the modification. - /// - /// Our reference for the modification. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Your reference for the modification, used internally within your platform. - /// - /// Your reference for the modification, used internally within your platform. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The type of transfer modification. - /// - /// The type of transfer modification. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Modification {\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Modification); - } - - /// - /// Returns true if Modification instances are equal - /// - /// Instance of Modification to be compared - /// Boolean - public bool Equals(Modification input) - { - if (input == null) - { - return false; - } - return - ( - this.Direction == input.Direction || - (this.Direction != null && - this.Direction.Equals(input.Direction)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Direction != null) - { - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/NOLocalAccountIdentification.cs b/Adyen/Model/Transfers/NOLocalAccountIdentification.cs deleted file mode 100644 index 21a6de275..000000000 --- a/Adyen/Model/Transfers/NOLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// NOLocalAccountIdentification - /// - [DataContract(Name = "NOLocalAccountIdentification")] - public partial class NOLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **noLocal** - /// - /// **noLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NoLocal for value: noLocal - /// - [EnumMember(Value = "noLocal")] - NoLocal = 1 - - } - - - /// - /// **noLocal** - /// - /// **noLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NOLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 11-digit bank account number, without separators or whitespace. (required). - /// **noLocal** (required) (default to TypeEnum.NoLocal). - public NOLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NoLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 11-digit bank account number, without separators or whitespace. - /// - /// The 11-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NOLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NOLocalAccountIdentification); - } - - /// - /// Returns true if NOLocalAccountIdentification instances are equal - /// - /// Instance of NOLocalAccountIdentification to be compared - /// Boolean - public bool Equals(NOLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 11.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 11.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/NZLocalAccountIdentification.cs b/Adyen/Model/Transfers/NZLocalAccountIdentification.cs deleted file mode 100644 index db7bc6b61..000000000 --- a/Adyen/Model/Transfers/NZLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// NZLocalAccountIdentification - /// - [DataContract(Name = "NZLocalAccountIdentification")] - public partial class NZLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **nzLocal** - /// - /// **nzLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NzLocal for value: nzLocal - /// - [EnumMember(Value = "nzLocal")] - NzLocal = 1 - - } - - - /// - /// **nzLocal** - /// - /// **nzLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NZLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. (required). - /// **nzLocal** (required) (default to TypeEnum.NzLocal). - public NZLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.NzLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. - /// - /// The 15-16 digit bank account number. The first 2 digits are the bank number, the next 4 digits are the branch number, the next 7 digits are the account number, and the final 2-3 digits are the suffix. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NZLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NZLocalAccountIdentification); - } - - /// - /// Returns true if NZLocalAccountIdentification instances are equal - /// - /// Instance of NZLocalAccountIdentification to be compared - /// Boolean - public bool Equals(NZLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 16) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 16.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 15) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 15.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/NameLocation.cs b/Adyen/Model/Transfers/NameLocation.cs deleted file mode 100644 index 5cb542586..000000000 --- a/Adyen/Model/Transfers/NameLocation.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// NameLocation - /// - [DataContract(Name = "NameLocation")] - public partial class NameLocation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The city where the merchant is located.. - /// The country where the merchant is located in [three-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format.. - /// The home country in [three-digit country code](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) format, used for government-controlled merchants such as embassies.. - /// The name of the merchant's shop or service.. - /// The raw data.. - /// The state where the merchant is located.. - public NameLocation(string city = default(string), string country = default(string), string countryOfOrigin = default(string), string name = default(string), string rawData = default(string), string state = default(string)) - { - this.City = city; - this.Country = country; - this.CountryOfOrigin = countryOfOrigin; - this.Name = name; - this.RawData = rawData; - this.State = state; - } - - /// - /// The city where the merchant is located. - /// - /// The city where the merchant is located. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The country where the merchant is located in [three-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format. - /// - /// The country where the merchant is located in [three-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The home country in [three-digit country code](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) format, used for government-controlled merchants such as embassies. - /// - /// The home country in [three-digit country code](https://en.wikipedia.org/wiki/ISO_3166-1_numeric) format, used for government-controlled merchants such as embassies. - [DataMember(Name = "countryOfOrigin", EmitDefaultValue = false)] - public string CountryOfOrigin { get; set; } - - /// - /// The name of the merchant's shop or service. - /// - /// The name of the merchant's shop or service. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The raw data. - /// - /// The raw data. - [DataMember(Name = "rawData", EmitDefaultValue = false)] - public string RawData { get; set; } - - /// - /// The state where the merchant is located. - /// - /// The state where the merchant is located. - [DataMember(Name = "state", EmitDefaultValue = false)] - public string State { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NameLocation {\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" CountryOfOrigin: ").Append(CountryOfOrigin).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" RawData: ").Append(RawData).Append("\n"); - sb.Append(" State: ").Append(State).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NameLocation); - } - - /// - /// Returns true if NameLocation instances are equal - /// - /// Instance of NameLocation to be compared - /// Boolean - public bool Equals(NameLocation input) - { - if (input == null) - { - return false; - } - return - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.CountryOfOrigin == input.CountryOfOrigin || - (this.CountryOfOrigin != null && - this.CountryOfOrigin.Equals(input.CountryOfOrigin)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.RawData == input.RawData || - (this.RawData != null && - this.RawData.Equals(input.RawData)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.CountryOfOrigin != null) - { - hashCode = (hashCode * 59) + this.CountryOfOrigin.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.RawData != null) - { - hashCode = (hashCode * 59) + this.RawData.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/NumberAndBicAccountIdentification.cs b/Adyen/Model/Transfers/NumberAndBicAccountIdentification.cs deleted file mode 100644 index 92c34e628..000000000 --- a/Adyen/Model/Transfers/NumberAndBicAccountIdentification.cs +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// NumberAndBicAccountIdentification - /// - [DataContract(Name = "NumberAndBicAccountIdentification")] - public partial class NumberAndBicAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **numberAndBic** - /// - /// **numberAndBic** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum NumberAndBic for value: numberAndBic - /// - [EnumMember(Value = "numberAndBic")] - NumberAndBic = 1 - - } - - - /// - /// **numberAndBic** - /// - /// **numberAndBic** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected NumberAndBicAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. (required). - /// additionalBankIdentification. - /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// **numberAndBic** (required) (default to TypeEnum.NumberAndBic). - public NumberAndBicAccountIdentification(string accountNumber = default(string), AdditionalBankIdentification additionalBankIdentification = default(AdditionalBankIdentification), string bic = default(string), TypeEnum type = TypeEnum.NumberAndBic) - { - this.AccountNumber = accountNumber; - this.Bic = bic; - this.Type = type; - this.AdditionalBankIdentification = additionalBankIdentification; - } - - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. - /// - /// The bank account number, without separators or whitespace. The length and format depends on the bank or country. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Gets or Sets AdditionalBankIdentification - /// - [DataMember(Name = "additionalBankIdentification", EmitDefaultValue = false)] - public AdditionalBankIdentification AdditionalBankIdentification { get; set; } - - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class NumberAndBicAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AdditionalBankIdentification: ").Append(AdditionalBankIdentification).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberAndBicAccountIdentification); - } - - /// - /// Returns true if NumberAndBicAccountIdentification instances are equal - /// - /// Instance of NumberAndBicAccountIdentification to be compared - /// Boolean - public bool Equals(NumberAndBicAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AdditionalBankIdentification == input.AdditionalBankIdentification || - (this.AdditionalBankIdentification != null && - this.AdditionalBankIdentification.Equals(input.AdditionalBankIdentification)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.AdditionalBankIdentification != null) - { - hashCode = (hashCode * 59) + this.AdditionalBankIdentification.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 34) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 34.", new [] { "AccountNumber" }); - } - - // Bic (string) maxLength - if (this.Bic != null && this.Bic.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be less than 11.", new [] { "Bic" }); - } - - // Bic (string) minLength - if (this.Bic != null && this.Bic.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be greater than 8.", new [] { "Bic" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/PLLocalAccountIdentification.cs b/Adyen/Model/Transfers/PLLocalAccountIdentification.cs deleted file mode 100644 index 886cd3d87..000000000 --- a/Adyen/Model/Transfers/PLLocalAccountIdentification.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// PLLocalAccountIdentification - /// - [DataContract(Name = "PLLocalAccountIdentification")] - public partial class PLLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **plLocal** - /// - /// **plLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PlLocal for value: plLocal - /// - [EnumMember(Value = "plLocal")] - PlLocal = 1 - - } - - - /// - /// **plLocal** - /// - /// **plLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PLLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. (required). - /// **plLocal** (required) (default to TypeEnum.PlLocal). - public PLLocalAccountIdentification(string accountNumber = default(string), TypeEnum type = TypeEnum.PlLocal) - { - this.AccountNumber = accountNumber; - this.Type = type; - } - - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. - /// - /// The 26-digit bank account number ([Numer rachunku](https://pl.wikipedia.org/wiki/Numer_Rachunku_Bankowego)), without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PLLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PLLocalAccountIdentification); - } - - /// - /// Returns true if PLLocalAccountIdentification instances are equal - /// - /// Instance of PLLocalAccountIdentification to be compared - /// Boolean - public bool Equals(PLLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 26.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 26) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 26.", new [] { "AccountNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/PartyIdentification.cs b/Adyen/Model/Transfers/PartyIdentification.cs deleted file mode 100644 index 62c87d54e..000000000 --- a/Adyen/Model/Transfers/PartyIdentification.cs +++ /dev/null @@ -1,272 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// PartyIdentification - /// - [DataContract(Name = "PartyIdentification")] - public partial class PartyIdentification : IEquatable, IValidatableObject - { - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Individual for value: individual - /// - [EnumMember(Value = "individual")] - Individual = 1, - - /// - /// Enum Organization for value: organization - /// - [EnumMember(Value = "organization")] - Organization = 2, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 3 - - } - - - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**.. - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**.. - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**.. - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**.. - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`.. - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. (default to TypeEnum.Unknown). - public PartyIdentification(Address address = default(Address), DateTime dateOfBirth = default(DateTime), string firstName = default(string), string fullName = default(string), string lastName = default(string), string reference = default(string), TypeEnum? type = TypeEnum.Unknown) - { - this.Address = address; - this.DateOfBirth = dateOfBirth; - this.FirstName = firstName; - this.FullName = fullName; - this.LastName = lastName; - this.Reference = reference; - this.Type = type; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public Address Address { get; set; } - - /// - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. - /// - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - /// - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. - /// - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. - [DataMember(Name = "fullName", EmitDefaultValue = false)] - public string FullName { get; set; } - - /// - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - /// - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`. - /// - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PartyIdentification {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" FullName: ").Append(FullName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PartyIdentification); - } - - /// - /// Returns true if PartyIdentification instances are equal - /// - /// Instance of PartyIdentification to be compared - /// Boolean - public bool Equals(PartyIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.FullName == input.FullName || - (this.FullName != null && - this.FullName.Equals(input.FullName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.FullName != null) - { - hashCode = (hashCode * 59) + this.FullName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/PaymentInstrument.cs b/Adyen/Model/Transfers/PaymentInstrument.cs deleted file mode 100644 index b52e7837c..000000000 --- a/Adyen/Model/Transfers/PaymentInstrument.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// PaymentInstrument - /// - [DataContract(Name = "PaymentInstrument")] - public partial class PaymentInstrument : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The reference for the resource.. - /// The type of wallet that the network token is associated with.. - public PaymentInstrument(string description = default(string), string id = default(string), string reference = default(string), string tokenType = default(string)) - { - this.Description = description; - this.Id = id; - this.Reference = reference; - this.TokenType = tokenType; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The type of wallet that the network token is associated with. - /// - /// The type of wallet that the network token is associated with. - [DataMember(Name = "tokenType", EmitDefaultValue = false)] - public string TokenType { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentInstrument {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" TokenType: ").Append(TokenType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentInstrument); - } - - /// - /// Returns true if PaymentInstrument instances are equal - /// - /// Instance of PaymentInstrument to be compared - /// Boolean - public bool Equals(PaymentInstrument input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.TokenType == input.TokenType || - (this.TokenType != null && - this.TokenType.Equals(input.TokenType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.TokenType != null) - { - hashCode = (hashCode * 59) + this.TokenType.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/PlatformPayment.cs b/Adyen/Model/Transfers/PlatformPayment.cs deleted file mode 100644 index 019a0d52d..000000000 --- a/Adyen/Model/Transfers/PlatformPayment.cs +++ /dev/null @@ -1,342 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// PlatformPayment - /// - [DataContract(Name = "PlatformPayment")] - public partial class PlatformPayment : IEquatable, IValidatableObject - { - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - [JsonConverter(typeof(StringEnumConverter))] - public enum PlatformPaymentTypeEnum - { - /// - /// Enum AcquiringFees for value: AcquiringFees - /// - [EnumMember(Value = "AcquiringFees")] - AcquiringFees = 1, - - /// - /// Enum AdyenCommission for value: AdyenCommission - /// - [EnumMember(Value = "AdyenCommission")] - AdyenCommission = 2, - - /// - /// Enum AdyenFees for value: AdyenFees - /// - [EnumMember(Value = "AdyenFees")] - AdyenFees = 3, - - /// - /// Enum AdyenMarkup for value: AdyenMarkup - /// - [EnumMember(Value = "AdyenMarkup")] - AdyenMarkup = 4, - - /// - /// Enum BalanceAccount for value: BalanceAccount - /// - [EnumMember(Value = "BalanceAccount")] - BalanceAccount = 5, - - /// - /// Enum ChargebackRemainder for value: ChargebackRemainder - /// - [EnumMember(Value = "ChargebackRemainder")] - ChargebackRemainder = 6, - - /// - /// Enum Commission for value: Commission - /// - [EnumMember(Value = "Commission")] - Commission = 7, - - /// - /// Enum DCCPlatformCommission for value: DCCPlatformCommission - /// - [EnumMember(Value = "DCCPlatformCommission")] - DCCPlatformCommission = 8, - - /// - /// Enum Default for value: Default - /// - [EnumMember(Value = "Default")] - Default = 9, - - /// - /// Enum Interchange for value: Interchange - /// - [EnumMember(Value = "Interchange")] - Interchange = 10, - - /// - /// Enum PaymentFee for value: PaymentFee - /// - [EnumMember(Value = "PaymentFee")] - PaymentFee = 11, - - /// - /// Enum Remainder for value: Remainder - /// - [EnumMember(Value = "Remainder")] - Remainder = 12, - - /// - /// Enum SchemeFee for value: SchemeFee - /// - [EnumMember(Value = "SchemeFee")] - SchemeFee = 13, - - /// - /// Enum Surcharge for value: Surcharge - /// - [EnumMember(Value = "Surcharge")] - Surcharge = 14, - - /// - /// Enum Tip for value: Tip - /// - [EnumMember(Value = "Tip")] - Tip = 15, - - /// - /// Enum TopUp for value: TopUp - /// - [EnumMember(Value = "TopUp")] - TopUp = 16, - - /// - /// Enum VAT for value: VAT - /// - [EnumMember(Value = "VAT")] - VAT = 17 - - } - - - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - /// - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax. - [DataMember(Name = "platformPaymentType", EmitDefaultValue = false)] - public PlatformPaymentTypeEnum? PlatformPaymentType { get; set; } - /// - /// **platformPayment** - /// - /// **platformPayment** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 1 - - } - - - /// - /// **platformPayment** - /// - /// **platformPayment** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The capture's merchant reference included in the transfer.. - /// The capture reference included in the transfer.. - /// The payment's merchant reference included in the transfer.. - /// Specifies the nature of the transfer. This parameter helps categorize transfers so you can reconcile transactions at a later time, using the Balance Platform Accounting Report for [marketplaces](https://docs.adyen.com/marketplaces/reports-and-fees/balance-platform-accounting-report/) or [platforms](https://docs.adyen.com/platforms/reports-and-fees/balance-platform-accounting-report/). Possible values: * **AcquiringFees**: for the acquiring fee incurred on a transaction. * **AdyenCommission**: for the transaction fee due to Adyen under [blended rates](https://www.adyen.com/knowledge-hub/guides/payments-training-guide/get-the-best-from-your-card-processing). * **AdyenFees**: for all the transaction fees due to Adyen. This is the sum of Adyen's commission and Adyen's markup. * **AdyenMarkup**: for the transaction fee due to Adyen under [Interchange++ pricing](https://www.adyen.com/pricing). * **BalanceAccount**: or the sale amount of a transaction. * **Commission**: for your platform's commission on a transaction. * **DCCPlatformCommission**: for the DCC Commission for the platform on a transaction. * **Interchange**: for the interchange fee (fee paid to the issuer) incurred on a transaction. * **PaymentFee**: for all of the transaction fees. * **Remainder**: for the left over amount after currency conversion. * **SchemeFee**: for the scheme fee incurred on a transaction. This is the sum of the interchange fees and the acquiring fees. * **Surcharge**: for the surcharge paid by the customer on a transaction. * **Tip**: for the tip paid by the customer. * **TopUp**: for an incoming transfer to top up your user's balance account. * **VAT**: for the Value Added Tax.. - /// The payment reference included in the transfer.. - /// **platformPayment** (default to TypeEnum.PlatformPayment). - public PlatformPayment(string modificationMerchantReference = default(string), string modificationPspReference = default(string), string paymentMerchantReference = default(string), PlatformPaymentTypeEnum? platformPaymentType = default(PlatformPaymentTypeEnum?), string pspPaymentReference = default(string), TypeEnum? type = TypeEnum.PlatformPayment) - { - this.ModificationMerchantReference = modificationMerchantReference; - this.ModificationPspReference = modificationPspReference; - this.PaymentMerchantReference = paymentMerchantReference; - this.PlatformPaymentType = platformPaymentType; - this.PspPaymentReference = pspPaymentReference; - this.Type = type; - } - - /// - /// The capture's merchant reference included in the transfer. - /// - /// The capture's merchant reference included in the transfer. - [DataMember(Name = "modificationMerchantReference", EmitDefaultValue = false)] - public string ModificationMerchantReference { get; set; } - - /// - /// The capture reference included in the transfer. - /// - /// The capture reference included in the transfer. - [DataMember(Name = "modificationPspReference", EmitDefaultValue = false)] - public string ModificationPspReference { get; set; } - - /// - /// The payment's merchant reference included in the transfer. - /// - /// The payment's merchant reference included in the transfer. - [DataMember(Name = "paymentMerchantReference", EmitDefaultValue = false)] - public string PaymentMerchantReference { get; set; } - - /// - /// The payment reference included in the transfer. - /// - /// The payment reference included in the transfer. - [DataMember(Name = "pspPaymentReference", EmitDefaultValue = false)] - public string PspPaymentReference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PlatformPayment {\n"); - sb.Append(" ModificationMerchantReference: ").Append(ModificationMerchantReference).Append("\n"); - sb.Append(" ModificationPspReference: ").Append(ModificationPspReference).Append("\n"); - sb.Append(" PaymentMerchantReference: ").Append(PaymentMerchantReference).Append("\n"); - sb.Append(" PlatformPaymentType: ").Append(PlatformPaymentType).Append("\n"); - sb.Append(" PspPaymentReference: ").Append(PspPaymentReference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlatformPayment); - } - - /// - /// Returns true if PlatformPayment instances are equal - /// - /// Instance of PlatformPayment to be compared - /// Boolean - public bool Equals(PlatformPayment input) - { - if (input == null) - { - return false; - } - return - ( - this.ModificationMerchantReference == input.ModificationMerchantReference || - (this.ModificationMerchantReference != null && - this.ModificationMerchantReference.Equals(input.ModificationMerchantReference)) - ) && - ( - this.ModificationPspReference == input.ModificationPspReference || - (this.ModificationPspReference != null && - this.ModificationPspReference.Equals(input.ModificationPspReference)) - ) && - ( - this.PaymentMerchantReference == input.PaymentMerchantReference || - (this.PaymentMerchantReference != null && - this.PaymentMerchantReference.Equals(input.PaymentMerchantReference)) - ) && - ( - this.PlatformPaymentType == input.PlatformPaymentType || - this.PlatformPaymentType.Equals(input.PlatformPaymentType) - ) && - ( - this.PspPaymentReference == input.PspPaymentReference || - (this.PspPaymentReference != null && - this.PspPaymentReference.Equals(input.PspPaymentReference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ModificationMerchantReference != null) - { - hashCode = (hashCode * 59) + this.ModificationMerchantReference.GetHashCode(); - } - if (this.ModificationPspReference != null) - { - hashCode = (hashCode * 59) + this.ModificationPspReference.GetHashCode(); - } - if (this.PaymentMerchantReference != null) - { - hashCode = (hashCode * 59) + this.PaymentMerchantReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PlatformPaymentType.GetHashCode(); - if (this.PspPaymentReference != null) - { - hashCode = (hashCode * 59) + this.PspPaymentReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/RelayedAuthorisationData.cs b/Adyen/Model/Transfers/RelayedAuthorisationData.cs deleted file mode 100644 index f3d2f98b7..000000000 --- a/Adyen/Model/Transfers/RelayedAuthorisationData.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// RelayedAuthorisationData - /// - [DataContract(Name = "RelayedAuthorisationData")] - public partial class RelayedAuthorisationData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`.. - /// Your reference for the relayed authorisation data.. - public RelayedAuthorisationData(Dictionary metadata = default(Dictionary), string reference = default(string)) - { - this.Metadata = metadata; - this.Reference = reference; - } - - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. - /// - /// Contains key-value pairs of your references and descriptions, for example, `customId`:`your-own-custom-field-12345`. - [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } - - /// - /// Your reference for the relayed authorisation data. - /// - /// Your reference for the relayed authorisation data. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RelayedAuthorisationData {\n"); - sb.Append(" Metadata: ").Append(Metadata).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RelayedAuthorisationData); - } - - /// - /// Returns true if RelayedAuthorisationData instances are equal - /// - /// Instance of RelayedAuthorisationData to be compared - /// Boolean - public bool Equals(RelayedAuthorisationData input) - { - if (input == null) - { - return false; - } - return - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Repayment.cs b/Adyen/Model/Transfers/Repayment.cs deleted file mode 100644 index a77e4820b..000000000 --- a/Adyen/Model/Transfers/Repayment.cs +++ /dev/null @@ -1,166 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Repayment - /// - [DataContract(Name = "Repayment")] - public partial class Repayment : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Repayment() { } - /// - /// Initializes a new instance of the class. - /// - /// The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). (required). - /// term. - /// threshold. - public Repayment(int? basisPoints = default(int?), RepaymentTerm term = default(RepaymentTerm), ThresholdRepayment threshold = default(ThresholdRepayment)) - { - this.BasisPoints = basisPoints; - this.Term = term; - this.Threshold = threshold; - } - - /// - /// The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). - /// - /// The repayment that is deducted daily from incoming net volume, in [basis points](https://www.investopedia.com/terms/b/basispoint.asp). - [DataMember(Name = "basisPoints", IsRequired = false, EmitDefaultValue = false)] - public int? BasisPoints { get; set; } - - /// - /// Gets or Sets Term - /// - [DataMember(Name = "term", EmitDefaultValue = false)] - public RepaymentTerm Term { get; set; } - - /// - /// Gets or Sets Threshold - /// - [DataMember(Name = "threshold", EmitDefaultValue = false)] - public ThresholdRepayment Threshold { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Repayment {\n"); - sb.Append(" BasisPoints: ").Append(BasisPoints).Append("\n"); - sb.Append(" Term: ").Append(Term).Append("\n"); - sb.Append(" Threshold: ").Append(Threshold).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Repayment); - } - - /// - /// Returns true if Repayment instances are equal - /// - /// Instance of Repayment to be compared - /// Boolean - public bool Equals(Repayment input) - { - if (input == null) - { - return false; - } - return - ( - this.BasisPoints == input.BasisPoints || - this.BasisPoints.Equals(input.BasisPoints) - ) && - ( - this.Term == input.Term || - (this.Term != null && - this.Term.Equals(input.Term)) - ) && - ( - this.Threshold == input.Threshold || - (this.Threshold != null && - this.Threshold.Equals(input.Threshold)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.BasisPoints.GetHashCode(); - if (this.Term != null) - { - hashCode = (hashCode * 59) + this.Term.GetHashCode(); - } - if (this.Threshold != null) - { - hashCode = (hashCode * 59) + this.Threshold.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/RepaymentTerm.cs b/Adyen/Model/Transfers/RepaymentTerm.cs deleted file mode 100644 index f1a84a90e..000000000 --- a/Adyen/Model/Transfers/RepaymentTerm.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// RepaymentTerm - /// - [DataContract(Name = "RepaymentTerm")] - public partial class RepaymentTerm : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RepaymentTerm() { } - /// - /// Initializes a new instance of the class. - /// - /// The estimated term for repaying the grant, in days. (required). - /// The maximum term for repaying the grant, in days. Only applies when `contractType` is **loan**.. - public RepaymentTerm(int? estimatedDays = default(int?), int? maximumDays = default(int?)) - { - this.EstimatedDays = estimatedDays; - this.MaximumDays = maximumDays; - } - - /// - /// The estimated term for repaying the grant, in days. - /// - /// The estimated term for repaying the grant, in days. - [DataMember(Name = "estimatedDays", IsRequired = false, EmitDefaultValue = false)] - public int? EstimatedDays { get; set; } - - /// - /// The maximum term for repaying the grant, in days. Only applies when `contractType` is **loan**. - /// - /// The maximum term for repaying the grant, in days. Only applies when `contractType` is **loan**. - [DataMember(Name = "maximumDays", EmitDefaultValue = false)] - public int? MaximumDays { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RepaymentTerm {\n"); - sb.Append(" EstimatedDays: ").Append(EstimatedDays).Append("\n"); - sb.Append(" MaximumDays: ").Append(MaximumDays).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RepaymentTerm); - } - - /// - /// Returns true if RepaymentTerm instances are equal - /// - /// Instance of RepaymentTerm to be compared - /// Boolean - public bool Equals(RepaymentTerm input) - { - if (input == null) - { - return false; - } - return - ( - this.EstimatedDays == input.EstimatedDays || - this.EstimatedDays.Equals(input.EstimatedDays) - ) && - ( - this.MaximumDays == input.MaximumDays || - this.MaximumDays.Equals(input.MaximumDays) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EstimatedDays.GetHashCode(); - hashCode = (hashCode * 59) + this.MaximumDays.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/ResourceReference.cs b/Adyen/Model/Transfers/ResourceReference.cs deleted file mode 100644 index 5a00c434d..000000000 --- a/Adyen/Model/Transfers/ResourceReference.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// ResourceReference - /// - [DataContract(Name = "ResourceReference")] - public partial class ResourceReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The reference for the resource.. - public ResourceReference(string description = default(string), string id = default(string), string reference = default(string)) - { - this.Description = description; - this.Id = id; - this.Reference = reference; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ResourceReference {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ResourceReference); - } - - /// - /// Returns true if ResourceReference instances are equal - /// - /// Instance of ResourceReference to be compared - /// Boolean - public bool Equals(ResourceReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/RestServiceError.cs b/Adyen/Model/Transfers/RestServiceError.cs deleted file mode 100644 index 131f1f8a6..000000000 --- a/Adyen/Model/Transfers/RestServiceError.cs +++ /dev/null @@ -1,282 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// RestServiceError - /// - [DataContract(Name = "RestServiceError")] - public partial class RestServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RestServiceError() { } - /// - /// Initializes a new instance of the class. - /// - /// A human-readable explanation specific to this occurrence of the problem. (required). - /// A code that identifies the problem type. (required). - /// A unique URI that identifies the specific occurrence of the problem.. - /// Detailed explanation of each validation error, when applicable.. - /// A unique reference for the request, essentially the same as `pspReference`.. - /// response. - /// The HTTP status code. (required). - /// A short, human-readable summary of the problem type. (required). - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. (required). - public RestServiceError(string detail = default(string), string errorCode = default(string), string instance = default(string), List invalidFields = default(List), string requestId = default(string), Object response = default(Object), int? status = default(int?), string title = default(string), string type = default(string)) - { - this.Detail = detail; - this.ErrorCode = errorCode; - this.Status = status; - this.Title = title; - this.Type = type; - this.Instance = instance; - this.InvalidFields = invalidFields; - this.RequestId = requestId; - this.Response = response; - } - - /// - /// A human-readable explanation specific to this occurrence of the problem. - /// - /// A human-readable explanation specific to this occurrence of the problem. - [DataMember(Name = "detail", IsRequired = false, EmitDefaultValue = false)] - public string Detail { get; set; } - - /// - /// A code that identifies the problem type. - /// - /// A code that identifies the problem type. - [DataMember(Name = "errorCode", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// A unique URI that identifies the specific occurrence of the problem. - /// - /// A unique URI that identifies the specific occurrence of the problem. - [DataMember(Name = "instance", EmitDefaultValue = false)] - public string Instance { get; set; } - - /// - /// Detailed explanation of each validation error, when applicable. - /// - /// Detailed explanation of each validation error, when applicable. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A unique reference for the request, essentially the same as `pspReference`. - /// - /// A unique reference for the request, essentially the same as `pspReference`. - [DataMember(Name = "requestId", EmitDefaultValue = false)] - public string RequestId { get; set; } - - /// - /// Gets or Sets Response - /// - [DataMember(Name = "response", EmitDefaultValue = false)] - public Object Response { get; set; } - - /// - /// The HTTP status code. - /// - /// The HTTP status code. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// A short, human-readable summary of the problem type. - /// - /// A short, human-readable summary of the problem type. - [DataMember(Name = "title", IsRequired = false, EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. - /// - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RestServiceError {\n"); - sb.Append(" Detail: ").Append(Detail).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Instance: ").Append(Instance).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" RequestId: ").Append(RequestId).Append("\n"); - sb.Append(" Response: ").Append(Response).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RestServiceError); - } - - /// - /// Returns true if RestServiceError instances are equal - /// - /// Instance of RestServiceError to be compared - /// Boolean - public bool Equals(RestServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.Detail == input.Detail || - (this.Detail != null && - this.Detail.Equals(input.Detail)) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.Instance == input.Instance || - (this.Instance != null && - this.Instance.Equals(input.Instance)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.RequestId == input.RequestId || - (this.RequestId != null && - this.RequestId.Equals(input.RequestId)) - ) && - ( - this.Response == input.Response || - (this.Response != null && - this.Response.Equals(input.Response)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Detail != null) - { - hashCode = (hashCode * 59) + this.Detail.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.Instance != null) - { - hashCode = (hashCode * 59) + this.Instance.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.RequestId != null) - { - hashCode = (hashCode * 59) + this.RequestId.GetHashCode(); - } - if (this.Response != null) - { - hashCode = (hashCode * 59) + this.Response.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/ReturnTransferRequest.cs b/Adyen/Model/Transfers/ReturnTransferRequest.cs deleted file mode 100644 index d0c246393..000000000 --- a/Adyen/Model/Transfers/ReturnTransferRequest.cs +++ /dev/null @@ -1,158 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// ReturnTransferRequest - /// - [DataContract(Name = "ReturnTransferRequest")] - public partial class ReturnTransferRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ReturnTransferRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// Your internal reference for the return. If you don't provide this in the request, Adyen generates a unique reference. This reference is used in all communication with you about the instruction status. We recommend using a unique value per instruction. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). . - public ReturnTransferRequest(Amount amount = default(Amount), string reference = default(string)) - { - this.Amount = amount; - this.Reference = reference; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Your internal reference for the return. If you don't provide this in the request, Adyen generates a unique reference. This reference is used in all communication with you about the instruction status. We recommend using a unique value per instruction. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). - /// - /// Your internal reference for the return. If you don't provide this in the request, Adyen generates a unique reference. This reference is used in all communication with you about the instruction status. We recommend using a unique value per instruction. If you need to provide multiple references for a transaction, separate them with hyphens (\"-\"). - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReturnTransferRequest {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReturnTransferRequest); - } - - /// - /// Returns true if ReturnTransferRequest instances are equal - /// - /// Instance of ReturnTransferRequest to be compared - /// Boolean - public bool Equals(ReturnTransferRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/ReturnTransferResponse.cs b/Adyen/Model/Transfers/ReturnTransferResponse.cs deleted file mode 100644 index 4d8205390..000000000 --- a/Adyen/Model/Transfers/ReturnTransferResponse.cs +++ /dev/null @@ -1,203 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// ReturnTransferResponse - /// - [DataContract(Name = "ReturnTransferResponse")] - public partial class ReturnTransferResponse : IEquatable, IValidatableObject - { - /// - /// The resulting status of the return. Possible values: **Authorised**, **Declined**. - /// - /// The resulting status of the return. Possible values: **Authorised**, **Declined**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Authorised for value: Authorised - /// - [EnumMember(Value = "Authorised")] - Authorised = 1, - - /// - /// Enum Declined for value: Declined - /// - [EnumMember(Value = "Declined")] - Declined = 2 - - } - - - /// - /// The resulting status of the return. Possible values: **Authorised**, **Declined**. - /// - /// The resulting status of the return. Possible values: **Authorised**, **Declined**. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the return.. - /// Your internal reference for the return.. - /// The resulting status of the return. Possible values: **Authorised**, **Declined**.. - /// The unique identifier of the original transfer.. - public ReturnTransferResponse(string id = default(string), string reference = default(string), StatusEnum? status = default(StatusEnum?), string transferId = default(string)) - { - this.Id = id; - this.Reference = reference; - this.Status = status; - this.TransferId = transferId; - } - - /// - /// The unique identifier of the return. - /// - /// The unique identifier of the return. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Your internal reference for the return. - /// - /// Your internal reference for the return. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The unique identifier of the original transfer. - /// - /// The unique identifier of the original transfer. - [DataMember(Name = "transferId", EmitDefaultValue = false)] - public string TransferId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ReturnTransferResponse {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TransferId: ").Append(TransferId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReturnTransferResponse); - } - - /// - /// Returns true if ReturnTransferResponse instances are equal - /// - /// Instance of ReturnTransferResponse to be compared - /// Boolean - public bool Equals(ReturnTransferResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TransferId == input.TransferId || - (this.TransferId != null && - this.TransferId.Equals(input.TransferId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TransferId != null) - { - hashCode = (hashCode * 59) + this.TransferId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/RoutingDetails.cs b/Adyen/Model/Transfers/RoutingDetails.cs deleted file mode 100644 index 7921b63d0..000000000 --- a/Adyen/Model/Transfers/RoutingDetails.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// RoutingDetails - /// - [DataContract(Name = "RoutingDetails")] - public partial class RoutingDetails : IEquatable, IValidatableObject - { - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [JsonConverter(typeof(StringEnumConverter))] - public enum PriorityEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [DataMember(Name = "priority", EmitDefaultValue = false)] - public PriorityEnum? Priority { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// A human-readable explanation specific to this occurrence of the problem.. - /// A code that identifies the problem type.. - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN).. - /// A short, human-readable summary of the problem type.. - public RoutingDetails(string detail = default(string), string errorCode = default(string), PriorityEnum? priority = default(PriorityEnum?), string title = default(string)) - { - this.Detail = detail; - this.ErrorCode = errorCode; - this.Priority = priority; - this.Title = title; - } - - /// - /// A human-readable explanation specific to this occurrence of the problem. - /// - /// A human-readable explanation specific to this occurrence of the problem. - [DataMember(Name = "detail", EmitDefaultValue = false)] - public string Detail { get; set; } - - /// - /// A code that identifies the problem type. - /// - /// A code that identifies the problem type. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// A short, human-readable summary of the problem type. - /// - /// A short, human-readable summary of the problem type. - [DataMember(Name = "title", EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RoutingDetails {\n"); - sb.Append(" Detail: ").Append(Detail).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Priority: ").Append(Priority).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RoutingDetails); - } - - /// - /// Returns true if RoutingDetails instances are equal - /// - /// Instance of RoutingDetails to be compared - /// Boolean - public bool Equals(RoutingDetails input) - { - if (input == null) - { - return false; - } - return - ( - this.Detail == input.Detail || - (this.Detail != null && - this.Detail.Equals(input.Detail)) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.Priority == input.Priority || - this.Priority.Equals(input.Priority) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Detail != null) - { - hashCode = (hashCode * 59) + this.Detail.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priority.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/SELocalAccountIdentification.cs b/Adyen/Model/Transfers/SELocalAccountIdentification.cs deleted file mode 100644 index 127079745..000000000 --- a/Adyen/Model/Transfers/SELocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// SELocalAccountIdentification - /// - [DataContract(Name = "SELocalAccountIdentification")] - public partial class SELocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **seLocal** - /// - /// **seLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum SeLocal for value: seLocal - /// - [EnumMember(Value = "seLocal")] - SeLocal = 1 - - } - - - /// - /// **seLocal** - /// - /// **seLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SELocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. (required). - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. (required). - /// **seLocal** (required) (default to TypeEnum.SeLocal). - public SELocalAccountIdentification(string accountNumber = default(string), string clearingNumber = default(string), TypeEnum type = TypeEnum.SeLocal) - { - this.AccountNumber = accountNumber; - this.ClearingNumber = clearingNumber; - this.Type = type; - } - - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. - /// - /// The 7- to 10-digit bank account number ([Bankkontonummer](https://sv.wikipedia.org/wiki/Bankkonto)), without the clearing number, separators, or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. - /// - /// The 4- to 5-digit clearing number ([Clearingnummer](https://sv.wikipedia.org/wiki/Clearingnummer)), without separators or whitespace. - [DataMember(Name = "clearingNumber", IsRequired = false, EmitDefaultValue = false)] - public string ClearingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SELocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" ClearingNumber: ").Append(ClearingNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SELocalAccountIdentification); - } - - /// - /// Returns true if SELocalAccountIdentification instances are equal - /// - /// Instance of SELocalAccountIdentification to be compared - /// Boolean - public bool Equals(SELocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.ClearingNumber == input.ClearingNumber || - (this.ClearingNumber != null && - this.ClearingNumber.Equals(input.ClearingNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.ClearingNumber != null) - { - hashCode = (hashCode * 59) + this.ClearingNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 10.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 7) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 7.", new [] { "AccountNumber" }); - } - - // ClearingNumber (string) maxLength - if (this.ClearingNumber != null && this.ClearingNumber.Length > 5) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingNumber, length must be less than 5.", new [] { "ClearingNumber" }); - } - - // ClearingNumber (string) minLength - if (this.ClearingNumber != null && this.ClearingNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ClearingNumber, length must be greater than 4.", new [] { "ClearingNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/SGLocalAccountIdentification.cs b/Adyen/Model/Transfers/SGLocalAccountIdentification.cs deleted file mode 100644 index ff769d54f..000000000 --- a/Adyen/Model/Transfers/SGLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// SGLocalAccountIdentification - /// - [DataContract(Name = "SGLocalAccountIdentification")] - public partial class SGLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **sgLocal** - /// - /// **sgLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum SgLocal for value: sgLocal - /// - [EnumMember(Value = "sgLocal")] - SgLocal = 1 - - } - - - /// - /// **sgLocal** - /// - /// **sgLocal** - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected SGLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. (required). - /// The bank's 8- or 11-character BIC or SWIFT code. (required). - /// **sgLocal** (default to TypeEnum.SgLocal). - public SGLocalAccountIdentification(string accountNumber = default(string), string bic = default(string), TypeEnum? type = TypeEnum.SgLocal) - { - this.AccountNumber = accountNumber; - this.Bic = bic; - this.Type = type; - } - - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. - /// - /// The 4- to 19-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - /// - /// The bank's 8- or 11-character BIC or SWIFT code. - [DataMember(Name = "bic", IsRequired = false, EmitDefaultValue = false)] - public string Bic { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class SGLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" Bic: ").Append(Bic).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SGLocalAccountIdentification); - } - - /// - /// Returns true if SGLocalAccountIdentification instances are equal - /// - /// Instance of SGLocalAccountIdentification to be compared - /// Boolean - public bool Equals(SGLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Bic == input.Bic || - (this.Bic != null && - this.Bic.Equals(input.Bic)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.Bic != null) - { - hashCode = (hashCode * 59) + this.Bic.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 19) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 19.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 4.", new [] { "AccountNumber" }); - } - - // Bic (string) maxLength - if (this.Bic != null && this.Bic.Length > 11) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be less than 11.", new [] { "Bic" }); - } - - // Bic (string) minLength - if (this.Bic != null && this.Bic.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Bic, length must be greater than 8.", new [] { "Bic" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/ServiceError.cs b/Adyen/Model/Transfers/ServiceError.cs deleted file mode 100644 index 176991b5f..000000000 --- a/Adyen/Model/Transfers/ServiceError.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// ServiceError - /// - [DataContract(Name = "ServiceError")] - public partial class ServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The error code mapped to the error message.. - /// The category of the error.. - /// A short explanation of the issue.. - /// The PSP reference of the payment.. - /// The HTTP response status.. - public ServiceError(string errorCode = default(string), string errorType = default(string), string message = default(string), string pspReference = default(string), int? status = default(int?)) - { - this.ErrorCode = errorCode; - this.ErrorType = errorType; - this.Message = message; - this.PspReference = pspReference; - this.Status = status; - } - - /// - /// The error code mapped to the error message. - /// - /// The error code mapped to the error message. - [DataMember(Name = "errorCode", EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// The category of the error. - /// - /// The category of the error. - [DataMember(Name = "errorType", EmitDefaultValue = false)] - public string ErrorType { get; set; } - - /// - /// A short explanation of the issue. - /// - /// A short explanation of the issue. - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } - - /// - /// The PSP reference of the payment. - /// - /// The PSP reference of the payment. - [DataMember(Name = "pspReference", EmitDefaultValue = false)] - public string PspReference { get; set; } - - /// - /// The HTTP response status. - /// - /// The HTTP response status. - [DataMember(Name = "status", EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServiceError {\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" ErrorType: ").Append(ErrorType).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append(" PspReference: ").Append(PspReference).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ServiceError); - } - - /// - /// Returns true if ServiceError instances are equal - /// - /// Instance of ServiceError to be compared - /// Boolean - public bool Equals(ServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.ErrorType == input.ErrorType || - (this.ErrorType != null && - this.ErrorType.Equals(input.ErrorType)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.PspReference == input.PspReference || - (this.PspReference != null && - this.PspReference.Equals(input.PspReference)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.ErrorType != null) - { - hashCode = (hashCode * 59) + this.ErrorType.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.PspReference != null) - { - hashCode = (hashCode * 59) + this.PspReference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/ThresholdRepayment.cs b/Adyen/Model/Transfers/ThresholdRepayment.cs deleted file mode 100644 index 67627da1f..000000000 --- a/Adyen/Model/Transfers/ThresholdRepayment.cs +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// ThresholdRepayment - /// - [DataContract(Name = "ThresholdRepayment")] - public partial class ThresholdRepayment : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ThresholdRepayment() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - public ThresholdRepayment(Amount amount = default(Amount)) - { - this.Amount = amount; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ThresholdRepayment {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ThresholdRepayment); - } - - /// - /// Returns true if ThresholdRepayment instances are equal - /// - /// Instance of ThresholdRepayment to be compared - /// Boolean - public bool Equals(ThresholdRepayment input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Transaction.cs b/Adyen/Model/Transfers/Transaction.cs deleted file mode 100644 index d4f87fd65..000000000 --- a/Adyen/Model/Transfers/Transaction.cs +++ /dev/null @@ -1,374 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Transaction - /// - [DataContract(Name = "Transaction")] - public partial class Transaction : IEquatable, IValidatableObject - { - /// - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - /// - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2 - - } - - - /// - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - /// - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Transaction() { } - /// - /// Initializes a new instance of the class. - /// - /// accountHolder (required). - /// amount (required). - /// balanceAccount (required). - /// The unique identifier of the balance platform. (required). - /// The date the transaction was booked into the balance account. (required). - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// The `description` from the `/transfers` request.. - /// The unique identifier of the transaction. (required). - /// paymentInstrument. - /// The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender.. - /// The status of the transaction. Possible values: * **pending**: The transaction is still pending. * **booked**: The transaction has been booked to the balance account. (required). - /// transfer. - /// The date the transfer amount becomes available in the balance account. (required). - public Transaction(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), string balancePlatform = default(string), DateTime bookingDate = default(DateTime), DateTime creationDate = default(DateTime), string description = default(string), string id = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument), string referenceForBeneficiary = default(string), StatusEnum status = default(StatusEnum), TransferView transfer = default(TransferView), DateTime valueDate = default(DateTime)) - { - this.AccountHolder = accountHolder; - this.Amount = amount; - this.BalanceAccount = balanceAccount; - this.BalancePlatform = balancePlatform; - this.BookingDate = bookingDate; - this.Id = id; - this.Status = status; - this.ValueDate = valueDate; - this.CreationDate = creationDate; - this.Description = description; - this.PaymentInstrument = paymentInstrument; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Transfer = transfer; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", IsRequired = false, EmitDefaultValue = false)] - public ResourceReference AccountHolder { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets BalanceAccount - /// - [DataMember(Name = "balanceAccount", IsRequired = false, EmitDefaultValue = false)] - public ResourceReference BalanceAccount { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", IsRequired = false, EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The date the transaction was booked into the balance account. - /// - /// The date the transaction was booked into the balance account. - [DataMember(Name = "bookingDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime BookingDate { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// The `description` from the `/transfers` request. - /// - /// The `description` from the `/transfers` request. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the transaction. - /// - /// The unique identifier of the transaction. - [DataMember(Name = "id", IsRequired = false, EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets PaymentInstrument - /// - [DataMember(Name = "paymentInstrument", EmitDefaultValue = false)] - public PaymentInstrument PaymentInstrument { get; set; } - - /// - /// The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. - /// - /// The reference sent to or received from the counterparty. * For outgoing funds, this is the [`referenceForBeneficiary`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__resParam_referenceForBeneficiary) from the [`/transfers`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_referenceForBeneficiary) request. * For incoming funds, this is the reference from the sender. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Transfer - /// - [DataMember(Name = "transfer", EmitDefaultValue = false)] - public TransferView Transfer { get; set; } - - /// - /// The date the transfer amount becomes available in the balance account. - /// - /// The date the transfer amount becomes available in the balance account. - [DataMember(Name = "valueDate", IsRequired = false, EmitDefaultValue = false)] - public DateTime ValueDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Transaction {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BalanceAccount: ").Append(BalanceAccount).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" BookingDate: ").Append(BookingDate).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrument: ").Append(PaymentInstrument).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Transfer: ").Append(Transfer).Append("\n"); - sb.Append(" ValueDate: ").Append(ValueDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Transaction); - } - - /// - /// Returns true if Transaction instances are equal - /// - /// Instance of Transaction to be compared - /// Boolean - public bool Equals(Transaction input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BalanceAccount == input.BalanceAccount || - (this.BalanceAccount != null && - this.BalanceAccount.Equals(input.BalanceAccount)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.BookingDate == input.BookingDate || - (this.BookingDate != null && - this.BookingDate.Equals(input.BookingDate)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrument == input.PaymentInstrument || - (this.PaymentInstrument != null && - this.PaymentInstrument.Equals(input.PaymentInstrument)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Transfer == input.Transfer || - (this.Transfer != null && - this.Transfer.Equals(input.Transfer)) - ) && - ( - this.ValueDate == input.ValueDate || - (this.ValueDate != null && - this.ValueDate.Equals(input.ValueDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BalanceAccount != null) - { - hashCode = (hashCode * 59) + this.BalanceAccount.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.BookingDate != null) - { - hashCode = (hashCode * 59) + this.BookingDate.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrument != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrument.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Transfer != null) - { - hashCode = (hashCode * 59) + this.Transfer.GetHashCode(); - } - if (this.ValueDate != null) - { - hashCode = (hashCode * 59) + this.ValueDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransactionEventViolation.cs b/Adyen/Model/Transfers/TransactionEventViolation.cs deleted file mode 100644 index 6b220514d..000000000 --- a/Adyen/Model/Transfers/TransactionEventViolation.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransactionEventViolation - /// - [DataContract(Name = "TransactionEventViolation")] - public partial class TransactionEventViolation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// An explanation about why the transaction rule failed.. - /// transactionRule. - /// transactionRuleSource. - public TransactionEventViolation(string reason = default(string), TransactionRuleReference transactionRule = default(TransactionRuleReference), TransactionRuleSource transactionRuleSource = default(TransactionRuleSource)) - { - this.Reason = reason; - this.TransactionRule = transactionRule; - this.TransactionRuleSource = transactionRuleSource; - } - - /// - /// An explanation about why the transaction rule failed. - /// - /// An explanation about why the transaction rule failed. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public string Reason { get; set; } - - /// - /// Gets or Sets TransactionRule - /// - [DataMember(Name = "transactionRule", EmitDefaultValue = false)] - public TransactionRuleReference TransactionRule { get; set; } - - /// - /// Gets or Sets TransactionRuleSource - /// - [DataMember(Name = "transactionRuleSource", EmitDefaultValue = false)] - public TransactionRuleSource TransactionRuleSource { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionEventViolation {\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" TransactionRule: ").Append(TransactionRule).Append("\n"); - sb.Append(" TransactionRuleSource: ").Append(TransactionRuleSource).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionEventViolation); - } - - /// - /// Returns true if TransactionEventViolation instances are equal - /// - /// Instance of TransactionEventViolation to be compared - /// Boolean - public bool Equals(TransactionEventViolation input) - { - if (input == null) - { - return false; - } - return - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ) && - ( - this.TransactionRule == input.TransactionRule || - (this.TransactionRule != null && - this.TransactionRule.Equals(input.TransactionRule)) - ) && - ( - this.TransactionRuleSource == input.TransactionRuleSource || - (this.TransactionRuleSource != null && - this.TransactionRuleSource.Equals(input.TransactionRuleSource)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - if (this.TransactionRule != null) - { - hashCode = (hashCode * 59) + this.TransactionRule.GetHashCode(); - } - if (this.TransactionRuleSource != null) - { - hashCode = (hashCode * 59) + this.TransactionRuleSource.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransactionRuleReference.cs b/Adyen/Model/Transfers/TransactionRuleReference.cs deleted file mode 100644 index 8f5f0251f..000000000 --- a/Adyen/Model/Transfers/TransactionRuleReference.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransactionRuleReference - /// - [DataContract(Name = "TransactionRuleReference")] - public partial class TransactionRuleReference : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The description of the resource.. - /// The unique identifier of the resource.. - /// The outcome type of the rule.. - /// The reference for the resource.. - /// The score of the rule in case it's a scoreBased rule.. - public TransactionRuleReference(string description = default(string), string id = default(string), string outcomeType = default(string), string reference = default(string), int? score = default(int?)) - { - this.Description = description; - this.Id = id; - this.OutcomeType = outcomeType; - this.Reference = reference; - this.Score = score; - } - - /// - /// The description of the resource. - /// - /// The description of the resource. - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the resource. - /// - /// The unique identifier of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The outcome type of the rule. - /// - /// The outcome type of the rule. - [DataMember(Name = "outcomeType", EmitDefaultValue = false)] - public string OutcomeType { get; set; } - - /// - /// The reference for the resource. - /// - /// The reference for the resource. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// The score of the rule in case it's a scoreBased rule. - /// - /// The score of the rule in case it's a scoreBased rule. - [DataMember(Name = "score", EmitDefaultValue = false)] - public int? Score { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleReference {\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" OutcomeType: ").Append(OutcomeType).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Score: ").Append(Score).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleReference); - } - - /// - /// Returns true if TransactionRuleReference instances are equal - /// - /// Instance of TransactionRuleReference to be compared - /// Boolean - public bool Equals(TransactionRuleReference input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.OutcomeType == input.OutcomeType || - (this.OutcomeType != null && - this.OutcomeType.Equals(input.OutcomeType)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Score == input.Score || - this.Score.Equals(input.Score) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.OutcomeType != null) - { - hashCode = (hashCode * 59) + this.OutcomeType.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Score.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransactionRuleSource.cs b/Adyen/Model/Transfers/TransactionRuleSource.cs deleted file mode 100644 index d94c4e2a4..000000000 --- a/Adyen/Model/Transfers/TransactionRuleSource.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransactionRuleSource - /// - [DataContract(Name = "TransactionRuleSource")] - public partial class TransactionRuleSource : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// ID of the resource, when applicable.. - /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen.. - public TransactionRuleSource(string id = default(string), string type = default(string)) - { - this.Id = id; - this.Type = type; - } - - /// - /// ID of the resource, when applicable. - /// - /// ID of the resource, when applicable. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen. - /// - /// Indicates the type of resource for which the transaction rule is defined. Possible values: * **PaymentInstrumentGroup** * **PaymentInstrument** * **BalancePlatform** * **EntityUsageConfiguration** * **PlatformRule**: The transaction rule is a platform-wide rule imposed by Adyen. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRuleSource {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRuleSource); - } - - /// - /// Returns true if TransactionRuleSource instances are equal - /// - /// Instance of TransactionRuleSource to be compared - /// Boolean - public bool Equals(TransactionRuleSource input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransactionRulesResult.cs b/Adyen/Model/Transfers/TransactionRulesResult.cs deleted file mode 100644 index 6145d28cf..000000000 --- a/Adyen/Model/Transfers/TransactionRulesResult.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransactionRulesResult - /// - [DataContract(Name = "TransactionRulesResult")] - public partial class TransactionRulesResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The advice given by the Risk analysis.. - /// Indicates whether the transaction passed the evaluation for all hardblock rules. - /// The score of the Risk analysis.. - /// Array containing all the transaction rules that the transaction triggered.. - public TransactionRulesResult(string advice = default(string), bool? allHardBlockRulesPassed = default(bool?), int? score = default(int?), List triggeredTransactionRules = default(List)) - { - this.Advice = advice; - this.AllHardBlockRulesPassed = allHardBlockRulesPassed; - this.Score = score; - this.TriggeredTransactionRules = triggeredTransactionRules; - } - - /// - /// The advice given by the Risk analysis. - /// - /// The advice given by the Risk analysis. - [DataMember(Name = "advice", EmitDefaultValue = false)] - public string Advice { get; set; } - - /// - /// Indicates whether the transaction passed the evaluation for all hardblock rules - /// - /// Indicates whether the transaction passed the evaluation for all hardblock rules - [DataMember(Name = "allHardBlockRulesPassed", EmitDefaultValue = false)] - public bool? AllHardBlockRulesPassed { get; set; } - - /// - /// The score of the Risk analysis. - /// - /// The score of the Risk analysis. - [DataMember(Name = "score", EmitDefaultValue = false)] - public int? Score { get; set; } - - /// - /// Array containing all the transaction rules that the transaction triggered. - /// - /// Array containing all the transaction rules that the transaction triggered. - [DataMember(Name = "triggeredTransactionRules", EmitDefaultValue = false)] - public List TriggeredTransactionRules { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionRulesResult {\n"); - sb.Append(" Advice: ").Append(Advice).Append("\n"); - sb.Append(" AllHardBlockRulesPassed: ").Append(AllHardBlockRulesPassed).Append("\n"); - sb.Append(" Score: ").Append(Score).Append("\n"); - sb.Append(" TriggeredTransactionRules: ").Append(TriggeredTransactionRules).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionRulesResult); - } - - /// - /// Returns true if TransactionRulesResult instances are equal - /// - /// Instance of TransactionRulesResult to be compared - /// Boolean - public bool Equals(TransactionRulesResult input) - { - if (input == null) - { - return false; - } - return - ( - this.Advice == input.Advice || - (this.Advice != null && - this.Advice.Equals(input.Advice)) - ) && - ( - this.AllHardBlockRulesPassed == input.AllHardBlockRulesPassed || - this.AllHardBlockRulesPassed.Equals(input.AllHardBlockRulesPassed) - ) && - ( - this.Score == input.Score || - this.Score.Equals(input.Score) - ) && - ( - this.TriggeredTransactionRules == input.TriggeredTransactionRules || - this.TriggeredTransactionRules != null && - input.TriggeredTransactionRules != null && - this.TriggeredTransactionRules.SequenceEqual(input.TriggeredTransactionRules) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Advice != null) - { - hashCode = (hashCode * 59) + this.Advice.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AllHardBlockRulesPassed.GetHashCode(); - hashCode = (hashCode * 59) + this.Score.GetHashCode(); - if (this.TriggeredTransactionRules != null) - { - hashCode = (hashCode * 59) + this.TriggeredTransactionRules.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransactionSearchResponse.cs b/Adyen/Model/Transfers/TransactionSearchResponse.cs deleted file mode 100644 index a4ee437d5..000000000 --- a/Adyen/Model/Transfers/TransactionSearchResponse.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransactionSearchResponse - /// - [DataContract(Name = "TransactionSearchResponse")] - public partial class TransactionSearchResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// links. - /// Contains the transactions that match the query parameters.. - public TransactionSearchResponse(Links links = default(Links), List data = default(List)) - { - this.Links = links; - this.Data = data; - } - - /// - /// Gets or Sets Links - /// - [DataMember(Name = "_links", EmitDefaultValue = false)] - public Links Links { get; set; } - - /// - /// Contains the transactions that match the query parameters. - /// - /// Contains the transactions that match the query parameters. - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionSearchResponse {\n"); - sb.Append(" Links: ").Append(Links).Append("\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionSearchResponse); - } - - /// - /// Returns true if TransactionSearchResponse instances are equal - /// - /// Instance of TransactionSearchResponse to be compared - /// Boolean - public bool Equals(TransactionSearchResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Links == input.Links || - (this.Links != null && - this.Links.Equals(input.Links)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Links != null) - { - hashCode = (hashCode * 59) + this.Links.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/Transfer.cs b/Adyen/Model/Transfers/Transfer.cs deleted file mode 100644 index f20e4d37d..000000000 --- a/Adyen/Model/Transfers/Transfer.cs +++ /dev/null @@ -1,1302 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// Transfer - /// - [DataContract(Name = "Transfer")] - public partial class Transfer : IEquatable, IValidatableObject - { - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 3, - - /// - /// Enum IssuedCard for value: issuedCard - /// - [EnumMember(Value = "issuedCard")] - IssuedCard = 4, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 5, - - /// - /// Enum TopUp for value: topUp - /// - [EnumMember(Value = "topUp")] - TopUp = 6 - - } - - - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - [DataMember(Name = "category", IsRequired = false, EmitDefaultValue = false)] - public CategoryEnum Category { get; set; } - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - [JsonConverter(typeof(StringEnumConverter))] - public enum DirectionEnum - { - /// - /// Enum Incoming for value: incoming - /// - [EnumMember(Value = "incoming")] - Incoming = 1, - - /// - /// Enum Outgoing for value: outgoing - /// - [EnumMember(Value = "outgoing")] - Outgoing = 2 - - } - - - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - [DataMember(Name = "direction", EmitDefaultValue = false)] - public DirectionEnum? Direction { get; set; } - /// - /// Additional information about the status of the transfer. - /// - /// Additional information about the status of the transfer. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 16, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 17, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 18, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 19, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 20, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 21, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 22, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 23, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 24 - - } - - - /// - /// Additional information about the status of the transfer. - /// - /// Additional information about the status of the transfer. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ApprovalPending for value: approvalPending - /// - [EnumMember(Value = "approvalPending")] - ApprovalPending = 1, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 2, - - /// - /// Enum AtmWithdrawalReversalPending for value: atmWithdrawalReversalPending - /// - [EnumMember(Value = "atmWithdrawalReversalPending")] - AtmWithdrawalReversalPending = 3, - - /// - /// Enum AtmWithdrawalReversed for value: atmWithdrawalReversed - /// - [EnumMember(Value = "atmWithdrawalReversed")] - AtmWithdrawalReversed = 4, - - /// - /// Enum AuthAdjustmentAuthorised for value: authAdjustmentAuthorised - /// - [EnumMember(Value = "authAdjustmentAuthorised")] - AuthAdjustmentAuthorised = 5, - - /// - /// Enum AuthAdjustmentError for value: authAdjustmentError - /// - [EnumMember(Value = "authAdjustmentError")] - AuthAdjustmentError = 6, - - /// - /// Enum AuthAdjustmentRefused for value: authAdjustmentRefused - /// - [EnumMember(Value = "authAdjustmentRefused")] - AuthAdjustmentRefused = 7, - - /// - /// Enum Authorised for value: authorised - /// - [EnumMember(Value = "authorised")] - Authorised = 8, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 9, - - /// - /// Enum BankTransferPending for value: bankTransferPending - /// - [EnumMember(Value = "bankTransferPending")] - BankTransferPending = 10, - - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 11, - - /// - /// Enum BookingPending for value: bookingPending - /// - [EnumMember(Value = "bookingPending")] - BookingPending = 12, - - /// - /// Enum Cancelled for value: cancelled - /// - [EnumMember(Value = "cancelled")] - Cancelled = 13, - - /// - /// Enum CapturePending for value: capturePending - /// - [EnumMember(Value = "capturePending")] - CapturePending = 14, - - /// - /// Enum CaptureReversalPending for value: captureReversalPending - /// - [EnumMember(Value = "captureReversalPending")] - CaptureReversalPending = 15, - - /// - /// Enum CaptureReversed for value: captureReversed - /// - [EnumMember(Value = "captureReversed")] - CaptureReversed = 16, - - /// - /// Enum Captured for value: captured - /// - [EnumMember(Value = "captured")] - Captured = 17, - - /// - /// Enum CapturedExternally for value: capturedExternally - /// - [EnumMember(Value = "capturedExternally")] - CapturedExternally = 18, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 19, - - /// - /// Enum ChargebackExternally for value: chargebackExternally - /// - [EnumMember(Value = "chargebackExternally")] - ChargebackExternally = 20, - - /// - /// Enum ChargebackPending for value: chargebackPending - /// - [EnumMember(Value = "chargebackPending")] - ChargebackPending = 21, - - /// - /// Enum ChargebackReversalPending for value: chargebackReversalPending - /// - [EnumMember(Value = "chargebackReversalPending")] - ChargebackReversalPending = 22, - - /// - /// Enum ChargebackReversed for value: chargebackReversed - /// - [EnumMember(Value = "chargebackReversed")] - ChargebackReversed = 23, - - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 24, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 25, - - /// - /// Enum DepositCorrectionPending for value: depositCorrectionPending - /// - [EnumMember(Value = "depositCorrectionPending")] - DepositCorrectionPending = 26, - - /// - /// Enum Dispute for value: dispute - /// - [EnumMember(Value = "dispute")] - Dispute = 27, - - /// - /// Enum DisputeClosed for value: disputeClosed - /// - [EnumMember(Value = "disputeClosed")] - DisputeClosed = 28, - - /// - /// Enum DisputeExpired for value: disputeExpired - /// - [EnumMember(Value = "disputeExpired")] - DisputeExpired = 29, - - /// - /// Enum DisputeNeedsReview for value: disputeNeedsReview - /// - [EnumMember(Value = "disputeNeedsReview")] - DisputeNeedsReview = 30, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 31, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 32, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 33, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 34, - - /// - /// Enum FeePending for value: feePending - /// - [EnumMember(Value = "feePending")] - FeePending = 35, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 36, - - /// - /// Enum InternalTransferPending for value: internalTransferPending - /// - [EnumMember(Value = "internalTransferPending")] - InternalTransferPending = 37, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 38, - - /// - /// Enum InvoiceDeductionPending for value: invoiceDeductionPending - /// - [EnumMember(Value = "invoiceDeductionPending")] - InvoiceDeductionPending = 39, - - /// - /// Enum ManualCorrectionPending for value: manualCorrectionPending - /// - [EnumMember(Value = "manualCorrectionPending")] - ManualCorrectionPending = 40, - - /// - /// Enum ManuallyCorrected for value: manuallyCorrected - /// - [EnumMember(Value = "manuallyCorrected")] - ManuallyCorrected = 41, - - /// - /// Enum MatchedStatement for value: matchedStatement - /// - [EnumMember(Value = "matchedStatement")] - MatchedStatement = 42, - - /// - /// Enum MatchedStatementPending for value: matchedStatementPending - /// - [EnumMember(Value = "matchedStatementPending")] - MatchedStatementPending = 43, - - /// - /// Enum MerchantPayin for value: merchantPayin - /// - [EnumMember(Value = "merchantPayin")] - MerchantPayin = 44, - - /// - /// Enum MerchantPayinPending for value: merchantPayinPending - /// - [EnumMember(Value = "merchantPayinPending")] - MerchantPayinPending = 45, - - /// - /// Enum MerchantPayinReversed for value: merchantPayinReversed - /// - [EnumMember(Value = "merchantPayinReversed")] - MerchantPayinReversed = 46, - - /// - /// Enum MerchantPayinReversedPending for value: merchantPayinReversedPending - /// - [EnumMember(Value = "merchantPayinReversedPending")] - MerchantPayinReversedPending = 47, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 48, - - /// - /// Enum MiscCostPending for value: miscCostPending - /// - [EnumMember(Value = "miscCostPending")] - MiscCostPending = 49, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 50, - - /// - /// Enum PaymentCostPending for value: paymentCostPending - /// - [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 51, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 52, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 53, - - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 54, - - /// - /// Enum RefundPending for value: refundPending - /// - [EnumMember(Value = "refundPending")] - RefundPending = 55, - - /// - /// Enum RefundReversalPending for value: refundReversalPending - /// - [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 56, - - /// - /// Enum RefundReversed for value: refundReversed - /// - [EnumMember(Value = "refundReversed")] - RefundReversed = 57, - - /// - /// Enum Refunded for value: refunded - /// - [EnumMember(Value = "refunded")] - Refunded = 58, - - /// - /// Enum RefundedExternally for value: refundedExternally - /// - [EnumMember(Value = "refundedExternally")] - RefundedExternally = 59, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 60, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 61, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 62, - - /// - /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending - /// - [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 63, - - /// - /// Enum Returned for value: returned - /// - [EnumMember(Value = "returned")] - Returned = 64, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 65, - - /// - /// Enum SecondChargebackPending for value: secondChargebackPending - /// - [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 66, - - /// - /// Enum Undefined for value: undefined - /// - [EnumMember(Value = "undefined")] - Undefined = 67 - - } - - - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Payment for value: payment - /// - [EnumMember(Value = "payment")] - Payment = 1, - - /// - /// Enum Capture for value: capture - /// - [EnumMember(Value = "capture")] - Capture = 2, - - /// - /// Enum CaptureReversal for value: captureReversal - /// - [EnumMember(Value = "captureReversal")] - CaptureReversal = 3, - - /// - /// Enum Refund for value: refund - /// - [EnumMember(Value = "refund")] - Refund = 4, - - /// - /// Enum RefundReversal for value: refundReversal - /// - [EnumMember(Value = "refundReversal")] - RefundReversal = 5, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 6, - - /// - /// Enum ChargebackCorrection for value: chargebackCorrection - /// - [EnumMember(Value = "chargebackCorrection")] - ChargebackCorrection = 7, - - /// - /// Enum ChargebackReversal for value: chargebackReversal - /// - [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 8, - - /// - /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection - /// - [EnumMember(Value = "chargebackReversalCorrection")] - ChargebackReversalCorrection = 9, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 10, - - /// - /// Enum SecondChargebackCorrection for value: secondChargebackCorrection - /// - [EnumMember(Value = "secondChargebackCorrection")] - SecondChargebackCorrection = 11, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 12, - - /// - /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal - /// - [EnumMember(Value = "atmWithdrawalReversal")] - AtmWithdrawalReversal = 13, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 14, - - /// - /// Enum InternalDirectDebit for value: internalDirectDebit - /// - [EnumMember(Value = "internalDirectDebit")] - InternalDirectDebit = 15, - - /// - /// Enum ManualCorrection for value: manualCorrection - /// - [EnumMember(Value = "manualCorrection")] - ManualCorrection = 16, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 17, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 18, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 19, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 20, - - /// - /// Enum BankDirectDebit for value: bankDirectDebit - /// - [EnumMember(Value = "bankDirectDebit")] - BankDirectDebit = 21, - - /// - /// Enum CardTransfer for value: cardTransfer - /// - [EnumMember(Value = "cardTransfer")] - CardTransfer = 22, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 23, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 24, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 25, - - /// - /// Enum Leftover for value: leftover - /// - [EnumMember(Value = "leftover")] - Leftover = 26, - - /// - /// Enum Grant for value: grant - /// - [EnumMember(Value = "grant")] - Grant = 27, - - /// - /// Enum CapitalFundsCollection for value: capitalFundsCollection - /// - [EnumMember(Value = "capitalFundsCollection")] - CapitalFundsCollection = 28, - - /// - /// Enum CashOutInstruction for value: cashOutInstruction - /// - [EnumMember(Value = "cashOutInstruction")] - CashOutInstruction = 29, - - /// - /// Enum CashoutFee for value: cashoutFee - /// - [EnumMember(Value = "cashoutFee")] - CashoutFee = 30, - - /// - /// Enum CashoutRepayment for value: cashoutRepayment - /// - [EnumMember(Value = "cashoutRepayment")] - CashoutRepayment = 31, - - /// - /// Enum CashoutFunding for value: cashoutFunding - /// - [EnumMember(Value = "cashoutFunding")] - CashoutFunding = 32, - - /// - /// Enum Repayment for value: repayment - /// - [EnumMember(Value = "repayment")] - Repayment = 33, - - /// - /// Enum Installment for value: installment - /// - [EnumMember(Value = "installment")] - Installment = 34, - - /// - /// Enum InstallmentReversal for value: installmentReversal - /// - [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 35, - - /// - /// Enum BalanceAdjustment for value: balanceAdjustment - /// - [EnumMember(Value = "balanceAdjustment")] - BalanceAdjustment = 36, - - /// - /// Enum BalanceRollover for value: balanceRollover - /// - [EnumMember(Value = "balanceRollover")] - BalanceRollover = 37, - - /// - /// Enum BalanceMigration for value: balanceMigration - /// - [EnumMember(Value = "balanceMigration")] - BalanceMigration = 38 - - } - - - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Transfer() { } - /// - /// Initializes a new instance of the class. - /// - /// accountHolder. - /// amount (required). - /// balanceAccount. - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. (required). - /// categoryData. - /// counterparty (required). - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**. - /// directDebitInformation. - /// The direction of the transfer. Possible values: **incoming**, **outgoing**.. - /// The ID of the resource.. - /// paymentInstrument. - /// Additional information about the status of the transfer.. - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.. - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.. - /// review. - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. (required). - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.. - public Transfer(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), CategoryEnum category = default(CategoryEnum), TransferCategoryData categoryData = default(TransferCategoryData), CounterpartyV3 counterparty = default(CounterpartyV3), DateTime creationDate = default(DateTime), string description = default(string), DirectDebitInformation directDebitInformation = default(DirectDebitInformation), DirectionEnum? direction = default(DirectionEnum?), string id = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument), ReasonEnum? reason = default(ReasonEnum?), string reference = default(string), string referenceForBeneficiary = default(string), TransferReview review = default(TransferReview), StatusEnum status = default(StatusEnum), TypeEnum? type = default(TypeEnum?)) - { - this.Amount = amount; - this.Category = category; - this.Counterparty = counterparty; - this.Status = status; - this.AccountHolder = accountHolder; - this.BalanceAccount = balanceAccount; - this.CategoryData = categoryData; - this.CreationDate = creationDate; - this.Description = description; - this.DirectDebitInformation = directDebitInformation; - this.Direction = direction; - this.Id = id; - this.PaymentInstrument = paymentInstrument; - this.Reason = reason; - this.Reference = reference; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Review = review; - this.Type = type; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", EmitDefaultValue = false)] - public ResourceReference AccountHolder { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets BalanceAccount - /// - [DataMember(Name = "balanceAccount", EmitDefaultValue = false)] - public ResourceReference BalanceAccount { get; set; } - - /// - /// Gets or Sets CategoryData - /// - [DataMember(Name = "categoryData", EmitDefaultValue = false)] - public TransferCategoryData CategoryData { get; set; } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", IsRequired = false, EmitDefaultValue = false)] - public CounterpartyV3 Counterparty { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** - /// - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Gets or Sets DirectDebitInformation - /// - [DataMember(Name = "directDebitInformation", EmitDefaultValue = false)] - public DirectDebitInformation DirectDebitInformation { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets PaymentInstrument - /// - [DataMember(Name = "paymentInstrument", EmitDefaultValue = false)] - public PaymentInstrument PaymentInstrument { get; set; } - - /// - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. - /// - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. - /// - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Review - /// - [DataMember(Name = "review", EmitDefaultValue = false)] - public TransferReview Review { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Transfer {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BalanceAccount: ").Append(BalanceAccount).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" CategoryData: ").Append(CategoryData).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DirectDebitInformation: ").Append(DirectDebitInformation).Append("\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrument: ").Append(PaymentInstrument).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Review: ").Append(Review).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Transfer); - } - - /// - /// Returns true if Transfer instances are equal - /// - /// Instance of Transfer to be compared - /// Boolean - public bool Equals(Transfer input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BalanceAccount == input.BalanceAccount || - (this.BalanceAccount != null && - this.BalanceAccount.Equals(input.BalanceAccount)) - ) && - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.CategoryData == input.CategoryData || - (this.CategoryData != null && - this.CategoryData.Equals(input.CategoryData)) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DirectDebitInformation == input.DirectDebitInformation || - (this.DirectDebitInformation != null && - this.DirectDebitInformation.Equals(input.DirectDebitInformation)) - ) && - ( - this.Direction == input.Direction || - this.Direction.Equals(input.Direction) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrument == input.PaymentInstrument || - (this.PaymentInstrument != null && - this.PaymentInstrument.Equals(input.PaymentInstrument)) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Review == input.Review || - (this.Review != null && - this.Review.Equals(input.Review)) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BalanceAccount != null) - { - hashCode = (hashCode * 59) + this.BalanceAccount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.CategoryData != null) - { - hashCode = (hashCode * 59) + this.CategoryData.GetHashCode(); - } - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DirectDebitInformation != null) - { - hashCode = (hashCode * 59) + this.DirectDebitInformation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrument != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrument.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - if (this.Review != null) - { - hashCode = (hashCode * 59) + this.Review.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferCategoryData.cs b/Adyen/Model/Transfers/TransferCategoryData.cs deleted file mode 100644 index 4be2500ee..000000000 --- a/Adyen/Model/Transfers/TransferCategoryData.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Transfers -{ - /// - /// The relevant data according to the transfer category. - /// - [JsonConverter(typeof(TransferCategoryDataJsonConverter))] - [DataContract(Name = "Transfer_categoryData")] - public partial class TransferCategoryData : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of BankCategoryData. - public TransferCategoryData(BankCategoryData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InternalCategoryData. - public TransferCategoryData(InternalCategoryData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IssuedCard. - public TransferCategoryData(IssuedCard actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of PlatformPayment. - public TransferCategoryData(PlatformPayment actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(BankCategoryData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(InternalCategoryData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(IssuedCard)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(PlatformPayment)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: BankCategoryData, InternalCategoryData, IssuedCard, PlatformPayment"); - } - } - } - - /// - /// Get the actual instance of `BankCategoryData`. If the actual instance is not `BankCategoryData`, - /// the InvalidClassException will be thrown - /// - /// An instance of BankCategoryData - public BankCategoryData GetBankCategoryData() - { - return (BankCategoryData)this.ActualInstance; - } - - /// - /// Get the actual instance of `InternalCategoryData`. If the actual instance is not `InternalCategoryData`, - /// the InvalidClassException will be thrown - /// - /// An instance of InternalCategoryData - public InternalCategoryData GetInternalCategoryData() - { - return (InternalCategoryData)this.ActualInstance; - } - - /// - /// Get the actual instance of `IssuedCard`. If the actual instance is not `IssuedCard`, - /// the InvalidClassException will be thrown - /// - /// An instance of IssuedCard - public IssuedCard GetIssuedCard() - { - return (IssuedCard)this.ActualInstance; - } - - /// - /// Get the actual instance of `PlatformPayment`. If the actual instance is not `PlatformPayment`, - /// the InvalidClassException will be thrown - /// - /// An instance of PlatformPayment - public PlatformPayment GetPlatformPayment() - { - return (PlatformPayment)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferCategoryData {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferCategoryData.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferCategoryData - /// - /// JSON string - /// An instance of TransferCategoryData - public static TransferCategoryData FromJson(string jsonString) - { - TransferCategoryData newTransferCategoryData = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferCategoryData; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the BankCategoryData type enums - if (ContainsValue(type)) - { - newTransferCategoryData = new TransferCategoryData(JsonConvert.DeserializeObject(jsonString, TransferCategoryData.SerializerSettings)); - matchedTypes.Add("BankCategoryData"); - match++; - } - // Check if the jsonString type enum matches the InternalCategoryData type enums - if (ContainsValue(type)) - { - newTransferCategoryData = new TransferCategoryData(JsonConvert.DeserializeObject(jsonString, TransferCategoryData.SerializerSettings)); - matchedTypes.Add("InternalCategoryData"); - match++; - } - // Check if the jsonString type enum matches the IssuedCard type enums - if (ContainsValue(type)) - { - newTransferCategoryData = new TransferCategoryData(JsonConvert.DeserializeObject(jsonString, TransferCategoryData.SerializerSettings)); - matchedTypes.Add("IssuedCard"); - match++; - } - // Check if the jsonString type enum matches the PlatformPayment type enums - if (ContainsValue(type)) - { - newTransferCategoryData = new TransferCategoryData(JsonConvert.DeserializeObject(jsonString, TransferCategoryData.SerializerSettings)); - matchedTypes.Add("PlatformPayment"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferCategoryData; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferCategoryData); - } - - /// - /// Returns true if TransferCategoryData instances are equal - /// - /// Instance of TransferCategoryData to be compared - /// Boolean - public bool Equals(TransferCategoryData input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferCategoryData - /// - public class TransferCategoryDataJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferCategoryData).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferCategoryData.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferData.cs b/Adyen/Model/Transfers/TransferData.cs deleted file mode 100644 index 8edea2c8a..000000000 --- a/Adyen/Model/Transfers/TransferData.cs +++ /dev/null @@ -1,1449 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferData - /// - [DataContract(Name = "TransferData")] - public partial class TransferData : IEquatable, IValidatableObject - { - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 3, - - /// - /// Enum IssuedCard for value: issuedCard - /// - [EnumMember(Value = "issuedCard")] - IssuedCard = 4, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 5, - - /// - /// Enum TopUp for value: topUp - /// - [EnumMember(Value = "topUp")] - TopUp = 6 - - } - - - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - [DataMember(Name = "category", IsRequired = false, EmitDefaultValue = false)] - public CategoryEnum Category { get; set; } - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - [JsonConverter(typeof(StringEnumConverter))] - public enum DirectionEnum - { - /// - /// Enum Incoming for value: incoming - /// - [EnumMember(Value = "incoming")] - Incoming = 1, - - /// - /// Enum Outgoing for value: outgoing - /// - [EnumMember(Value = "outgoing")] - Outgoing = 2 - - } - - - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - /// - /// The direction of the transfer. Possible values: **incoming**, **outgoing**. - [DataMember(Name = "direction", EmitDefaultValue = false)] - public DirectionEnum? Direction { get; set; } - /// - /// Additional information about the status of the transfer. - /// - /// Additional information about the status of the transfer. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 16, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 17, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 18, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 19, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 20, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 21, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 22, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 23, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 24 - - } - - - /// - /// Additional information about the status of the transfer. - /// - /// Additional information about the status of the transfer. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ApprovalPending for value: approvalPending - /// - [EnumMember(Value = "approvalPending")] - ApprovalPending = 1, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 2, - - /// - /// Enum AtmWithdrawalReversalPending for value: atmWithdrawalReversalPending - /// - [EnumMember(Value = "atmWithdrawalReversalPending")] - AtmWithdrawalReversalPending = 3, - - /// - /// Enum AtmWithdrawalReversed for value: atmWithdrawalReversed - /// - [EnumMember(Value = "atmWithdrawalReversed")] - AtmWithdrawalReversed = 4, - - /// - /// Enum AuthAdjustmentAuthorised for value: authAdjustmentAuthorised - /// - [EnumMember(Value = "authAdjustmentAuthorised")] - AuthAdjustmentAuthorised = 5, - - /// - /// Enum AuthAdjustmentError for value: authAdjustmentError - /// - [EnumMember(Value = "authAdjustmentError")] - AuthAdjustmentError = 6, - - /// - /// Enum AuthAdjustmentRefused for value: authAdjustmentRefused - /// - [EnumMember(Value = "authAdjustmentRefused")] - AuthAdjustmentRefused = 7, - - /// - /// Enum Authorised for value: authorised - /// - [EnumMember(Value = "authorised")] - Authorised = 8, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 9, - - /// - /// Enum BankTransferPending for value: bankTransferPending - /// - [EnumMember(Value = "bankTransferPending")] - BankTransferPending = 10, - - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 11, - - /// - /// Enum BookingPending for value: bookingPending - /// - [EnumMember(Value = "bookingPending")] - BookingPending = 12, - - /// - /// Enum Cancelled for value: cancelled - /// - [EnumMember(Value = "cancelled")] - Cancelled = 13, - - /// - /// Enum CapturePending for value: capturePending - /// - [EnumMember(Value = "capturePending")] - CapturePending = 14, - - /// - /// Enum CaptureReversalPending for value: captureReversalPending - /// - [EnumMember(Value = "captureReversalPending")] - CaptureReversalPending = 15, - - /// - /// Enum CaptureReversed for value: captureReversed - /// - [EnumMember(Value = "captureReversed")] - CaptureReversed = 16, - - /// - /// Enum Captured for value: captured - /// - [EnumMember(Value = "captured")] - Captured = 17, - - /// - /// Enum CapturedExternally for value: capturedExternally - /// - [EnumMember(Value = "capturedExternally")] - CapturedExternally = 18, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 19, - - /// - /// Enum ChargebackExternally for value: chargebackExternally - /// - [EnumMember(Value = "chargebackExternally")] - ChargebackExternally = 20, - - /// - /// Enum ChargebackPending for value: chargebackPending - /// - [EnumMember(Value = "chargebackPending")] - ChargebackPending = 21, - - /// - /// Enum ChargebackReversalPending for value: chargebackReversalPending - /// - [EnumMember(Value = "chargebackReversalPending")] - ChargebackReversalPending = 22, - - /// - /// Enum ChargebackReversed for value: chargebackReversed - /// - [EnumMember(Value = "chargebackReversed")] - ChargebackReversed = 23, - - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 24, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 25, - - /// - /// Enum DepositCorrectionPending for value: depositCorrectionPending - /// - [EnumMember(Value = "depositCorrectionPending")] - DepositCorrectionPending = 26, - - /// - /// Enum Dispute for value: dispute - /// - [EnumMember(Value = "dispute")] - Dispute = 27, - - /// - /// Enum DisputeClosed for value: disputeClosed - /// - [EnumMember(Value = "disputeClosed")] - DisputeClosed = 28, - - /// - /// Enum DisputeExpired for value: disputeExpired - /// - [EnumMember(Value = "disputeExpired")] - DisputeExpired = 29, - - /// - /// Enum DisputeNeedsReview for value: disputeNeedsReview - /// - [EnumMember(Value = "disputeNeedsReview")] - DisputeNeedsReview = 30, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 31, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 32, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 33, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 34, - - /// - /// Enum FeePending for value: feePending - /// - [EnumMember(Value = "feePending")] - FeePending = 35, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 36, - - /// - /// Enum InternalTransferPending for value: internalTransferPending - /// - [EnumMember(Value = "internalTransferPending")] - InternalTransferPending = 37, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 38, - - /// - /// Enum InvoiceDeductionPending for value: invoiceDeductionPending - /// - [EnumMember(Value = "invoiceDeductionPending")] - InvoiceDeductionPending = 39, - - /// - /// Enum ManualCorrectionPending for value: manualCorrectionPending - /// - [EnumMember(Value = "manualCorrectionPending")] - ManualCorrectionPending = 40, - - /// - /// Enum ManuallyCorrected for value: manuallyCorrected - /// - [EnumMember(Value = "manuallyCorrected")] - ManuallyCorrected = 41, - - /// - /// Enum MatchedStatement for value: matchedStatement - /// - [EnumMember(Value = "matchedStatement")] - MatchedStatement = 42, - - /// - /// Enum MatchedStatementPending for value: matchedStatementPending - /// - [EnumMember(Value = "matchedStatementPending")] - MatchedStatementPending = 43, - - /// - /// Enum MerchantPayin for value: merchantPayin - /// - [EnumMember(Value = "merchantPayin")] - MerchantPayin = 44, - - /// - /// Enum MerchantPayinPending for value: merchantPayinPending - /// - [EnumMember(Value = "merchantPayinPending")] - MerchantPayinPending = 45, - - /// - /// Enum MerchantPayinReversed for value: merchantPayinReversed - /// - [EnumMember(Value = "merchantPayinReversed")] - MerchantPayinReversed = 46, - - /// - /// Enum MerchantPayinReversedPending for value: merchantPayinReversedPending - /// - [EnumMember(Value = "merchantPayinReversedPending")] - MerchantPayinReversedPending = 47, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 48, - - /// - /// Enum MiscCostPending for value: miscCostPending - /// - [EnumMember(Value = "miscCostPending")] - MiscCostPending = 49, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 50, - - /// - /// Enum PaymentCostPending for value: paymentCostPending - /// - [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 51, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 52, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 53, - - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 54, - - /// - /// Enum RefundPending for value: refundPending - /// - [EnumMember(Value = "refundPending")] - RefundPending = 55, - - /// - /// Enum RefundReversalPending for value: refundReversalPending - /// - [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 56, - - /// - /// Enum RefundReversed for value: refundReversed - /// - [EnumMember(Value = "refundReversed")] - RefundReversed = 57, - - /// - /// Enum Refunded for value: refunded - /// - [EnumMember(Value = "refunded")] - Refunded = 58, - - /// - /// Enum RefundedExternally for value: refundedExternally - /// - [EnumMember(Value = "refundedExternally")] - RefundedExternally = 59, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 60, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 61, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 62, - - /// - /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending - /// - [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 63, - - /// - /// Enum Returned for value: returned - /// - [EnumMember(Value = "returned")] - Returned = 64, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 65, - - /// - /// Enum SecondChargebackPending for value: secondChargebackPending - /// - [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 66, - - /// - /// Enum Undefined for value: undefined - /// - [EnumMember(Value = "undefined")] - Undefined = 67 - - } - - - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - /// - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public StatusEnum Status { get; set; } - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Payment for value: payment - /// - [EnumMember(Value = "payment")] - Payment = 1, - - /// - /// Enum Capture for value: capture - /// - [EnumMember(Value = "capture")] - Capture = 2, - - /// - /// Enum CaptureReversal for value: captureReversal - /// - [EnumMember(Value = "captureReversal")] - CaptureReversal = 3, - - /// - /// Enum Refund for value: refund - /// - [EnumMember(Value = "refund")] - Refund = 4, - - /// - /// Enum RefundReversal for value: refundReversal - /// - [EnumMember(Value = "refundReversal")] - RefundReversal = 5, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 6, - - /// - /// Enum ChargebackCorrection for value: chargebackCorrection - /// - [EnumMember(Value = "chargebackCorrection")] - ChargebackCorrection = 7, - - /// - /// Enum ChargebackReversal for value: chargebackReversal - /// - [EnumMember(Value = "chargebackReversal")] - ChargebackReversal = 8, - - /// - /// Enum ChargebackReversalCorrection for value: chargebackReversalCorrection - /// - [EnumMember(Value = "chargebackReversalCorrection")] - ChargebackReversalCorrection = 9, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 10, - - /// - /// Enum SecondChargebackCorrection for value: secondChargebackCorrection - /// - [EnumMember(Value = "secondChargebackCorrection")] - SecondChargebackCorrection = 11, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 12, - - /// - /// Enum AtmWithdrawalReversal for value: atmWithdrawalReversal - /// - [EnumMember(Value = "atmWithdrawalReversal")] - AtmWithdrawalReversal = 13, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 14, - - /// - /// Enum InternalDirectDebit for value: internalDirectDebit - /// - [EnumMember(Value = "internalDirectDebit")] - InternalDirectDebit = 15, - - /// - /// Enum ManualCorrection for value: manualCorrection - /// - [EnumMember(Value = "manualCorrection")] - ManualCorrection = 16, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 17, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 18, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 19, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 20, - - /// - /// Enum BankDirectDebit for value: bankDirectDebit - /// - [EnumMember(Value = "bankDirectDebit")] - BankDirectDebit = 21, - - /// - /// Enum CardTransfer for value: cardTransfer - /// - [EnumMember(Value = "cardTransfer")] - CardTransfer = 22, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 23, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 24, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 25, - - /// - /// Enum Leftover for value: leftover - /// - [EnumMember(Value = "leftover")] - Leftover = 26, - - /// - /// Enum Grant for value: grant - /// - [EnumMember(Value = "grant")] - Grant = 27, - - /// - /// Enum CapitalFundsCollection for value: capitalFundsCollection - /// - [EnumMember(Value = "capitalFundsCollection")] - CapitalFundsCollection = 28, - - /// - /// Enum CashOutInstruction for value: cashOutInstruction - /// - [EnumMember(Value = "cashOutInstruction")] - CashOutInstruction = 29, - - /// - /// Enum CashoutFee for value: cashoutFee - /// - [EnumMember(Value = "cashoutFee")] - CashoutFee = 30, - - /// - /// Enum CashoutRepayment for value: cashoutRepayment - /// - [EnumMember(Value = "cashoutRepayment")] - CashoutRepayment = 31, - - /// - /// Enum CashoutFunding for value: cashoutFunding - /// - [EnumMember(Value = "cashoutFunding")] - CashoutFunding = 32, - - /// - /// Enum Repayment for value: repayment - /// - [EnumMember(Value = "repayment")] - Repayment = 33, - - /// - /// Enum Installment for value: installment - /// - [EnumMember(Value = "installment")] - Installment = 34, - - /// - /// Enum InstallmentReversal for value: installmentReversal - /// - [EnumMember(Value = "installmentReversal")] - InstallmentReversal = 35, - - /// - /// Enum BalanceAdjustment for value: balanceAdjustment - /// - [EnumMember(Value = "balanceAdjustment")] - BalanceAdjustment = 36, - - /// - /// Enum BalanceRollover for value: balanceRollover - /// - [EnumMember(Value = "balanceRollover")] - BalanceRollover = 37, - - /// - /// Enum BalanceMigration for value: balanceMigration - /// - [EnumMember(Value = "balanceMigration")] - BalanceMigration = 38 - - } - - - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - /// - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferData() { } - /// - /// Initializes a new instance of the class. - /// - /// accountHolder. - /// amount (required). - /// balanceAccount. - /// The unique identifier of the balance platform.. - /// The list of the latest balance statuses in the transfer.. - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. (required). - /// categoryData. - /// counterparty. - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**.. - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**. - /// directDebitInformation. - /// The direction of the transfer. Possible values: **incoming**, **outgoing**.. - /// The unique identifier of the latest transfer event. Included only when the `category` is **issuedCard**.. - /// The list of events leading up to the current status of the transfer.. - /// externalReason. - /// The ID of the resource.. - /// paymentInstrument. - /// Additional information about the status of the transfer.. - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.. - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.. - /// review. - /// The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order.. - /// The result of the transfer. For example, **authorised**, **refused**, or **error**. (required). - /// tracking. - /// transactionRulesResult. - /// The type of transfer or transaction. For example, **refund**, **payment**, **internalTransfer**, **bankTransfer**.. - public TransferData(ResourceReference accountHolder = default(ResourceReference), Amount amount = default(Amount), ResourceReference balanceAccount = default(ResourceReference), string balancePlatform = default(string), List balances = default(List), CategoryEnum category = default(CategoryEnum), TransferCategoryData categoryData = default(TransferCategoryData), TransferNotificationCounterParty counterparty = default(TransferNotificationCounterParty), DateTime creationDate = default(DateTime), string description = default(string), DirectDebitInformation directDebitInformation = default(DirectDebitInformation), DirectionEnum? direction = default(DirectionEnum?), string eventId = default(string), List events = default(List), ExternalReason externalReason = default(ExternalReason), string id = default(string), PaymentInstrument paymentInstrument = default(PaymentInstrument), ReasonEnum? reason = default(ReasonEnum?), string reference = default(string), string referenceForBeneficiary = default(string), TransferReview review = default(TransferReview), int? sequenceNumber = default(int?), StatusEnum status = default(StatusEnum), TransferDataTracking tracking = default(TransferDataTracking), TransactionRulesResult transactionRulesResult = default(TransactionRulesResult), TypeEnum? type = default(TypeEnum?)) - { - this.Amount = amount; - this.Category = category; - this.Status = status; - this.AccountHolder = accountHolder; - this.BalanceAccount = balanceAccount; - this.BalancePlatform = balancePlatform; - this.Balances = balances; - this.CategoryData = categoryData; - this.Counterparty = counterparty; - this.CreationDate = creationDate; - this.Description = description; - this.DirectDebitInformation = directDebitInformation; - this.Direction = direction; - this.EventId = eventId; - this.Events = events; - this.ExternalReason = externalReason; - this.Id = id; - this.PaymentInstrument = paymentInstrument; - this.Reason = reason; - this.Reference = reference; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Review = review; - this.SequenceNumber = sequenceNumber; - this.Tracking = tracking; - this.TransactionRulesResult = transactionRulesResult; - this.Type = type; - } - - /// - /// Gets or Sets AccountHolder - /// - [DataMember(Name = "accountHolder", EmitDefaultValue = false)] - public ResourceReference AccountHolder { get; set; } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// Gets or Sets BalanceAccount - /// - [DataMember(Name = "balanceAccount", EmitDefaultValue = false)] - public ResourceReference BalanceAccount { get; set; } - - /// - /// The unique identifier of the balance platform. - /// - /// The unique identifier of the balance platform. - [DataMember(Name = "balancePlatform", EmitDefaultValue = false)] - public string BalancePlatform { get; set; } - - /// - /// The list of the latest balance statuses in the transfer. - /// - /// The list of the latest balance statuses in the transfer. - [DataMember(Name = "balances", EmitDefaultValue = false)] - public List Balances { get; set; } - - /// - /// Gets or Sets CategoryData - /// - [DataMember(Name = "categoryData", EmitDefaultValue = false)] - public TransferCategoryData CategoryData { get; set; } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", EmitDefaultValue = false)] - public TransferNotificationCounterParty Counterparty { get; set; } - - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - /// - /// The date and time when the event was triggered, in ISO 8601 extended format. For example, **2020-12-18T10:15:30+01:00**. - [DataMember(Name = "creationDate", EmitDefaultValue = false)] - public DateTime CreationDate { get; set; } - - /// - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** - /// - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Gets or Sets DirectDebitInformation - /// - [DataMember(Name = "directDebitInformation", EmitDefaultValue = false)] - public DirectDebitInformation DirectDebitInformation { get; set; } - - /// - /// The unique identifier of the latest transfer event. Included only when the `category` is **issuedCard**. - /// - /// The unique identifier of the latest transfer event. Included only when the `category` is **issuedCard**. - [DataMember(Name = "eventId", EmitDefaultValue = false)] - public string EventId { get; set; } - - /// - /// The list of events leading up to the current status of the transfer. - /// - /// The list of events leading up to the current status of the transfer. - [DataMember(Name = "events", EmitDefaultValue = false)] - public List Events { get; set; } - - /// - /// Gets or Sets ExternalReason - /// - [DataMember(Name = "externalReason", EmitDefaultValue = false)] - public ExternalReason ExternalReason { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets PaymentInstrument - /// - [DataMember(Name = "paymentInstrument", EmitDefaultValue = false)] - public PaymentInstrument PaymentInstrument { get; set; } - - /// - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. - /// - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. - /// - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both the source and recipient of funds. Supported characters: **a-z**, **A-Z**, **0-9**.The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Review - /// - [DataMember(Name = "review", EmitDefaultValue = false)] - public TransferReview Review { get; set; } - - /// - /// The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order. - /// - /// The sequence number of the transfer webhook. The numbers start from 1 and increase with each new webhook for a specific transfer. The sequence number can help you restore the correct sequence of events even if they arrive out of order. - [DataMember(Name = "sequenceNumber", EmitDefaultValue = false)] - public int? SequenceNumber { get; set; } - - /// - /// Gets or Sets Tracking - /// - [DataMember(Name = "tracking", EmitDefaultValue = false)] - public TransferDataTracking Tracking { get; set; } - - /// - /// Gets or Sets TransactionRulesResult - /// - [DataMember(Name = "transactionRulesResult", EmitDefaultValue = false)] - public TransactionRulesResult TransactionRulesResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferData {\n"); - sb.Append(" AccountHolder: ").Append(AccountHolder).Append("\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BalanceAccount: ").Append(BalanceAccount).Append("\n"); - sb.Append(" BalancePlatform: ").Append(BalancePlatform).Append("\n"); - sb.Append(" Balances: ").Append(Balances).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" CategoryData: ").Append(CategoryData).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" CreationDate: ").Append(CreationDate).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" DirectDebitInformation: ").Append(DirectDebitInformation).Append("\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" EventId: ").Append(EventId).Append("\n"); - sb.Append(" Events: ").Append(Events).Append("\n"); - sb.Append(" ExternalReason: ").Append(ExternalReason).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PaymentInstrument: ").Append(PaymentInstrument).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Review: ").Append(Review).Append("\n"); - sb.Append(" SequenceNumber: ").Append(SequenceNumber).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Tracking: ").Append(Tracking).Append("\n"); - sb.Append(" TransactionRulesResult: ").Append(TransactionRulesResult).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferData); - } - - /// - /// Returns true if TransferData instances are equal - /// - /// Instance of TransferData to be compared - /// Boolean - public bool Equals(TransferData input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BalanceAccount == input.BalanceAccount || - (this.BalanceAccount != null && - this.BalanceAccount.Equals(input.BalanceAccount)) - ) && - ( - this.BalancePlatform == input.BalancePlatform || - (this.BalancePlatform != null && - this.BalancePlatform.Equals(input.BalancePlatform)) - ) && - ( - this.Balances == input.Balances || - this.Balances != null && - input.Balances != null && - this.Balances.SequenceEqual(input.Balances) - ) && - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.CategoryData == input.CategoryData || - (this.CategoryData != null && - this.CategoryData.Equals(input.CategoryData)) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.CreationDate == input.CreationDate || - (this.CreationDate != null && - this.CreationDate.Equals(input.CreationDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DirectDebitInformation == input.DirectDebitInformation || - (this.DirectDebitInformation != null && - this.DirectDebitInformation.Equals(input.DirectDebitInformation)) - ) && - ( - this.Direction == input.Direction || - this.Direction.Equals(input.Direction) - ) && - ( - this.EventId == input.EventId || - (this.EventId != null && - this.EventId.Equals(input.EventId)) - ) && - ( - this.Events == input.Events || - this.Events != null && - input.Events != null && - this.Events.SequenceEqual(input.Events) - ) && - ( - this.ExternalReason == input.ExternalReason || - (this.ExternalReason != null && - this.ExternalReason.Equals(input.ExternalReason)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PaymentInstrument == input.PaymentInstrument || - (this.PaymentInstrument != null && - this.PaymentInstrument.Equals(input.PaymentInstrument)) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Review == input.Review || - (this.Review != null && - this.Review.Equals(input.Review)) - ) && - ( - this.SequenceNumber == input.SequenceNumber || - this.SequenceNumber.Equals(input.SequenceNumber) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Tracking == input.Tracking || - (this.Tracking != null && - this.Tracking.Equals(input.Tracking)) - ) && - ( - this.TransactionRulesResult == input.TransactionRulesResult || - (this.TransactionRulesResult != null && - this.TransactionRulesResult.Equals(input.TransactionRulesResult)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BalanceAccount != null) - { - hashCode = (hashCode * 59) + this.BalanceAccount.GetHashCode(); - } - if (this.BalancePlatform != null) - { - hashCode = (hashCode * 59) + this.BalancePlatform.GetHashCode(); - } - if (this.Balances != null) - { - hashCode = (hashCode * 59) + this.Balances.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.CategoryData != null) - { - hashCode = (hashCode * 59) + this.CategoryData.GetHashCode(); - } - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.CreationDate != null) - { - hashCode = (hashCode * 59) + this.CreationDate.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DirectDebitInformation != null) - { - hashCode = (hashCode * 59) + this.DirectDebitInformation.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Direction.GetHashCode(); - if (this.EventId != null) - { - hashCode = (hashCode * 59) + this.EventId.GetHashCode(); - } - if (this.Events != null) - { - hashCode = (hashCode * 59) + this.Events.GetHashCode(); - } - if (this.ExternalReason != null) - { - hashCode = (hashCode * 59) + this.ExternalReason.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.PaymentInstrument != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrument.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - if (this.Review != null) - { - hashCode = (hashCode * 59) + this.Review.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SequenceNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Tracking != null) - { - hashCode = (hashCode * 59) + this.Tracking.GetHashCode(); - } - if (this.TransactionRulesResult != null) - { - hashCode = (hashCode * 59) + this.TransactionRulesResult.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferDataTracking.cs b/Adyen/Model/Transfers/TransferDataTracking.cs deleted file mode 100644 index 9ea967f67..000000000 --- a/Adyen/Model/Transfers/TransferDataTracking.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Transfers -{ - /// - /// The latest tracking information of the transfer. - /// - [JsonConverter(typeof(TransferDataTrackingJsonConverter))] - [DataContract(Name = "TransferData_tracking")] - public partial class TransferDataTracking : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ConfirmationTrackingData. - public TransferDataTracking(ConfirmationTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of EstimationTrackingData. - public TransferDataTracking(EstimationTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InternalReviewTrackingData. - public TransferDataTracking(InternalReviewTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(ConfirmationTrackingData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(EstimationTrackingData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(InternalReviewTrackingData)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: ConfirmationTrackingData, EstimationTrackingData, InternalReviewTrackingData"); - } - } - } - - /// - /// Get the actual instance of `ConfirmationTrackingData`. If the actual instance is not `ConfirmationTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of ConfirmationTrackingData - public ConfirmationTrackingData GetConfirmationTrackingData() - { - return (ConfirmationTrackingData)this.ActualInstance; - } - - /// - /// Get the actual instance of `EstimationTrackingData`. If the actual instance is not `EstimationTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of EstimationTrackingData - public EstimationTrackingData GetEstimationTrackingData() - { - return (EstimationTrackingData)this.ActualInstance; - } - - /// - /// Get the actual instance of `InternalReviewTrackingData`. If the actual instance is not `InternalReviewTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of InternalReviewTrackingData - public InternalReviewTrackingData GetInternalReviewTrackingData() - { - return (InternalReviewTrackingData)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferDataTracking {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferDataTracking.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferDataTracking - /// - /// JSON string - /// An instance of TransferDataTracking - public static TransferDataTracking FromJson(string jsonString) - { - TransferDataTracking newTransferDataTracking = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferDataTracking; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the ConfirmationTrackingData type enums - if (ContainsValue(type)) - { - newTransferDataTracking = new TransferDataTracking(JsonConvert.DeserializeObject(jsonString, TransferDataTracking.SerializerSettings)); - matchedTypes.Add("ConfirmationTrackingData"); - match++; - } - // Check if the jsonString type enum matches the EstimationTrackingData type enums - if (ContainsValue(type)) - { - newTransferDataTracking = new TransferDataTracking(JsonConvert.DeserializeObject(jsonString, TransferDataTracking.SerializerSettings)); - matchedTypes.Add("EstimationTrackingData"); - match++; - } - // Check if the jsonString type enum matches the InternalReviewTrackingData type enums - if (ContainsValue(type)) - { - newTransferDataTracking = new TransferDataTracking(JsonConvert.DeserializeObject(jsonString, TransferDataTracking.SerializerSettings)); - matchedTypes.Add("InternalReviewTrackingData"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferDataTracking; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferDataTracking); - } - - /// - /// Returns true if TransferDataTracking instances are equal - /// - /// Instance of TransferDataTracking to be compared - /// Boolean - public bool Equals(TransferDataTracking input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferDataTracking - /// - public class TransferDataTrackingJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferDataTracking).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferDataTracking.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferEvent.cs b/Adyen/Model/Transfers/TransferEvent.cs deleted file mode 100644 index d5d0b9dba..000000000 --- a/Adyen/Model/Transfers/TransferEvent.cs +++ /dev/null @@ -1,1023 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferEvent - /// - [DataContract(Name = "TransferEvent")] - public partial class TransferEvent : IEquatable, IValidatableObject - { - /// - /// The reason for the transfer status. - /// - /// The reason for the transfer status. - [JsonConverter(typeof(StringEnumConverter))] - public enum ReasonEnum - { - /// - /// Enum AccountHierarchyNotActive for value: accountHierarchyNotActive - /// - [EnumMember(Value = "accountHierarchyNotActive")] - AccountHierarchyNotActive = 1, - - /// - /// Enum AmountLimitExceeded for value: amountLimitExceeded - /// - [EnumMember(Value = "amountLimitExceeded")] - AmountLimitExceeded = 2, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 3, - - /// - /// Enum BalanceAccountTemporarilyBlockedByTransactionRule for value: balanceAccountTemporarilyBlockedByTransactionRule - /// - [EnumMember(Value = "balanceAccountTemporarilyBlockedByTransactionRule")] - BalanceAccountTemporarilyBlockedByTransactionRule = 4, - - /// - /// Enum CounterpartyAccountBlocked for value: counterpartyAccountBlocked - /// - [EnumMember(Value = "counterpartyAccountBlocked")] - CounterpartyAccountBlocked = 5, - - /// - /// Enum CounterpartyAccountClosed for value: counterpartyAccountClosed - /// - [EnumMember(Value = "counterpartyAccountClosed")] - CounterpartyAccountClosed = 6, - - /// - /// Enum CounterpartyAccountNotFound for value: counterpartyAccountNotFound - /// - [EnumMember(Value = "counterpartyAccountNotFound")] - CounterpartyAccountNotFound = 7, - - /// - /// Enum CounterpartyAddressRequired for value: counterpartyAddressRequired - /// - [EnumMember(Value = "counterpartyAddressRequired")] - CounterpartyAddressRequired = 8, - - /// - /// Enum CounterpartyBankTimedOut for value: counterpartyBankTimedOut - /// - [EnumMember(Value = "counterpartyBankTimedOut")] - CounterpartyBankTimedOut = 9, - - /// - /// Enum CounterpartyBankUnavailable for value: counterpartyBankUnavailable - /// - [EnumMember(Value = "counterpartyBankUnavailable")] - CounterpartyBankUnavailable = 10, - - /// - /// Enum Declined for value: declined - /// - [EnumMember(Value = "declined")] - Declined = 11, - - /// - /// Enum DeclinedByTransactionRule for value: declinedByTransactionRule - /// - [EnumMember(Value = "declinedByTransactionRule")] - DeclinedByTransactionRule = 12, - - /// - /// Enum DirectDebitNotSupported for value: directDebitNotSupported - /// - [EnumMember(Value = "directDebitNotSupported")] - DirectDebitNotSupported = 13, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 14, - - /// - /// Enum NotEnoughBalance for value: notEnoughBalance - /// - [EnumMember(Value = "notEnoughBalance")] - NotEnoughBalance = 15, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 16, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 17, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 18, - - /// - /// Enum RefusedByCounterpartyBank for value: refusedByCounterpartyBank - /// - [EnumMember(Value = "refusedByCounterpartyBank")] - RefusedByCounterpartyBank = 19, - - /// - /// Enum RefusedByCustomer for value: refusedByCustomer - /// - [EnumMember(Value = "refusedByCustomer")] - RefusedByCustomer = 20, - - /// - /// Enum RouteNotFound for value: routeNotFound - /// - [EnumMember(Value = "routeNotFound")] - RouteNotFound = 21, - - /// - /// Enum ScaFailed for value: scaFailed - /// - [EnumMember(Value = "scaFailed")] - ScaFailed = 22, - - /// - /// Enum TransferInstrumentDoesNotExist for value: transferInstrumentDoesNotExist - /// - [EnumMember(Value = "transferInstrumentDoesNotExist")] - TransferInstrumentDoesNotExist = 23, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 24 - - } - - - /// - /// The reason for the transfer status. - /// - /// The reason for the transfer status. - [DataMember(Name = "reason", EmitDefaultValue = false)] - public ReasonEnum? Reason { get; set; } - /// - /// The status of the transfer event. - /// - /// The status of the transfer event. - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum ApprovalPending for value: approvalPending - /// - [EnumMember(Value = "approvalPending")] - ApprovalPending = 1, - - /// - /// Enum AtmWithdrawal for value: atmWithdrawal - /// - [EnumMember(Value = "atmWithdrawal")] - AtmWithdrawal = 2, - - /// - /// Enum AtmWithdrawalReversalPending for value: atmWithdrawalReversalPending - /// - [EnumMember(Value = "atmWithdrawalReversalPending")] - AtmWithdrawalReversalPending = 3, - - /// - /// Enum AtmWithdrawalReversed for value: atmWithdrawalReversed - /// - [EnumMember(Value = "atmWithdrawalReversed")] - AtmWithdrawalReversed = 4, - - /// - /// Enum AuthAdjustmentAuthorised for value: authAdjustmentAuthorised - /// - [EnumMember(Value = "authAdjustmentAuthorised")] - AuthAdjustmentAuthorised = 5, - - /// - /// Enum AuthAdjustmentError for value: authAdjustmentError - /// - [EnumMember(Value = "authAdjustmentError")] - AuthAdjustmentError = 6, - - /// - /// Enum AuthAdjustmentRefused for value: authAdjustmentRefused - /// - [EnumMember(Value = "authAdjustmentRefused")] - AuthAdjustmentRefused = 7, - - /// - /// Enum Authorised for value: authorised - /// - [EnumMember(Value = "authorised")] - Authorised = 8, - - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 9, - - /// - /// Enum BankTransferPending for value: bankTransferPending - /// - [EnumMember(Value = "bankTransferPending")] - BankTransferPending = 10, - - /// - /// Enum Booked for value: booked - /// - [EnumMember(Value = "booked")] - Booked = 11, - - /// - /// Enum BookingPending for value: bookingPending - /// - [EnumMember(Value = "bookingPending")] - BookingPending = 12, - - /// - /// Enum Cancelled for value: cancelled - /// - [EnumMember(Value = "cancelled")] - Cancelled = 13, - - /// - /// Enum CapturePending for value: capturePending - /// - [EnumMember(Value = "capturePending")] - CapturePending = 14, - - /// - /// Enum CaptureReversalPending for value: captureReversalPending - /// - [EnumMember(Value = "captureReversalPending")] - CaptureReversalPending = 15, - - /// - /// Enum CaptureReversed for value: captureReversed - /// - [EnumMember(Value = "captureReversed")] - CaptureReversed = 16, - - /// - /// Enum Captured for value: captured - /// - [EnumMember(Value = "captured")] - Captured = 17, - - /// - /// Enum CapturedExternally for value: capturedExternally - /// - [EnumMember(Value = "capturedExternally")] - CapturedExternally = 18, - - /// - /// Enum Chargeback for value: chargeback - /// - [EnumMember(Value = "chargeback")] - Chargeback = 19, - - /// - /// Enum ChargebackExternally for value: chargebackExternally - /// - [EnumMember(Value = "chargebackExternally")] - ChargebackExternally = 20, - - /// - /// Enum ChargebackPending for value: chargebackPending - /// - [EnumMember(Value = "chargebackPending")] - ChargebackPending = 21, - - /// - /// Enum ChargebackReversalPending for value: chargebackReversalPending - /// - [EnumMember(Value = "chargebackReversalPending")] - ChargebackReversalPending = 22, - - /// - /// Enum ChargebackReversed for value: chargebackReversed - /// - [EnumMember(Value = "chargebackReversed")] - ChargebackReversed = 23, - - /// - /// Enum Credited for value: credited - /// - [EnumMember(Value = "credited")] - Credited = 24, - - /// - /// Enum DepositCorrection for value: depositCorrection - /// - [EnumMember(Value = "depositCorrection")] - DepositCorrection = 25, - - /// - /// Enum DepositCorrectionPending for value: depositCorrectionPending - /// - [EnumMember(Value = "depositCorrectionPending")] - DepositCorrectionPending = 26, - - /// - /// Enum Dispute for value: dispute - /// - [EnumMember(Value = "dispute")] - Dispute = 27, - - /// - /// Enum DisputeClosed for value: disputeClosed - /// - [EnumMember(Value = "disputeClosed")] - DisputeClosed = 28, - - /// - /// Enum DisputeExpired for value: disputeExpired - /// - [EnumMember(Value = "disputeExpired")] - DisputeExpired = 29, - - /// - /// Enum DisputeNeedsReview for value: disputeNeedsReview - /// - [EnumMember(Value = "disputeNeedsReview")] - DisputeNeedsReview = 30, - - /// - /// Enum Error for value: error - /// - [EnumMember(Value = "error")] - Error = 31, - - /// - /// Enum Expired for value: expired - /// - [EnumMember(Value = "expired")] - Expired = 32, - - /// - /// Enum Failed for value: failed - /// - [EnumMember(Value = "failed")] - Failed = 33, - - /// - /// Enum Fee for value: fee - /// - [EnumMember(Value = "fee")] - Fee = 34, - - /// - /// Enum FeePending for value: feePending - /// - [EnumMember(Value = "feePending")] - FeePending = 35, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 36, - - /// - /// Enum InternalTransferPending for value: internalTransferPending - /// - [EnumMember(Value = "internalTransferPending")] - InternalTransferPending = 37, - - /// - /// Enum InvoiceDeduction for value: invoiceDeduction - /// - [EnumMember(Value = "invoiceDeduction")] - InvoiceDeduction = 38, - - /// - /// Enum InvoiceDeductionPending for value: invoiceDeductionPending - /// - [EnumMember(Value = "invoiceDeductionPending")] - InvoiceDeductionPending = 39, - - /// - /// Enum ManualCorrectionPending for value: manualCorrectionPending - /// - [EnumMember(Value = "manualCorrectionPending")] - ManualCorrectionPending = 40, - - /// - /// Enum ManuallyCorrected for value: manuallyCorrected - /// - [EnumMember(Value = "manuallyCorrected")] - ManuallyCorrected = 41, - - /// - /// Enum MatchedStatement for value: matchedStatement - /// - [EnumMember(Value = "matchedStatement")] - MatchedStatement = 42, - - /// - /// Enum MatchedStatementPending for value: matchedStatementPending - /// - [EnumMember(Value = "matchedStatementPending")] - MatchedStatementPending = 43, - - /// - /// Enum MerchantPayin for value: merchantPayin - /// - [EnumMember(Value = "merchantPayin")] - MerchantPayin = 44, - - /// - /// Enum MerchantPayinPending for value: merchantPayinPending - /// - [EnumMember(Value = "merchantPayinPending")] - MerchantPayinPending = 45, - - /// - /// Enum MerchantPayinReversed for value: merchantPayinReversed - /// - [EnumMember(Value = "merchantPayinReversed")] - MerchantPayinReversed = 46, - - /// - /// Enum MerchantPayinReversedPending for value: merchantPayinReversedPending - /// - [EnumMember(Value = "merchantPayinReversedPending")] - MerchantPayinReversedPending = 47, - - /// - /// Enum MiscCost for value: miscCost - /// - [EnumMember(Value = "miscCost")] - MiscCost = 48, - - /// - /// Enum MiscCostPending for value: miscCostPending - /// - [EnumMember(Value = "miscCostPending")] - MiscCostPending = 49, - - /// - /// Enum PaymentCost for value: paymentCost - /// - [EnumMember(Value = "paymentCost")] - PaymentCost = 50, - - /// - /// Enum PaymentCostPending for value: paymentCostPending - /// - [EnumMember(Value = "paymentCostPending")] - PaymentCostPending = 51, - - /// - /// Enum PendingApproval for value: pendingApproval - /// - [EnumMember(Value = "pendingApproval")] - PendingApproval = 52, - - /// - /// Enum PendingExecution for value: pendingExecution - /// - [EnumMember(Value = "pendingExecution")] - PendingExecution = 53, - - /// - /// Enum Received for value: received - /// - [EnumMember(Value = "received")] - Received = 54, - - /// - /// Enum RefundPending for value: refundPending - /// - [EnumMember(Value = "refundPending")] - RefundPending = 55, - - /// - /// Enum RefundReversalPending for value: refundReversalPending - /// - [EnumMember(Value = "refundReversalPending")] - RefundReversalPending = 56, - - /// - /// Enum RefundReversed for value: refundReversed - /// - [EnumMember(Value = "refundReversed")] - RefundReversed = 57, - - /// - /// Enum Refunded for value: refunded - /// - [EnumMember(Value = "refunded")] - Refunded = 58, - - /// - /// Enum RefundedExternally for value: refundedExternally - /// - [EnumMember(Value = "refundedExternally")] - RefundedExternally = 59, - - /// - /// Enum Refused for value: refused - /// - [EnumMember(Value = "refused")] - Refused = 60, - - /// - /// Enum Rejected for value: rejected - /// - [EnumMember(Value = "rejected")] - Rejected = 61, - - /// - /// Enum ReserveAdjustment for value: reserveAdjustment - /// - [EnumMember(Value = "reserveAdjustment")] - ReserveAdjustment = 62, - - /// - /// Enum ReserveAdjustmentPending for value: reserveAdjustmentPending - /// - [EnumMember(Value = "reserveAdjustmentPending")] - ReserveAdjustmentPending = 63, - - /// - /// Enum Returned for value: returned - /// - [EnumMember(Value = "returned")] - Returned = 64, - - /// - /// Enum SecondChargeback for value: secondChargeback - /// - [EnumMember(Value = "secondChargeback")] - SecondChargeback = 65, - - /// - /// Enum SecondChargebackPending for value: secondChargebackPending - /// - [EnumMember(Value = "secondChargebackPending")] - SecondChargebackPending = 66, - - /// - /// Enum Undefined for value: undefined - /// - [EnumMember(Value = "undefined")] - Undefined = 67 - - } - - - /// - /// The status of the transfer event. - /// - /// The status of the transfer event. - [DataMember(Name = "status", EmitDefaultValue = false)] - public StatusEnum? Status { get; set; } - /// - /// The type of the transfer event. Possible values: **accounting**, **tracking**. - /// - /// The type of the transfer event. Possible values: **accounting**, **tracking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Accounting for value: accounting - /// - [EnumMember(Value = "accounting")] - Accounting = 1, - - /// - /// Enum Tracking for value: tracking - /// - [EnumMember(Value = "tracking")] - Tracking = 2 - - } - - - /// - /// The type of the transfer event. Possible values: **accounting**, **tracking**. - /// - /// The type of the transfer event. Possible values: **accounting**, **tracking**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// amount. - /// The amount adjustments in this transfer. Only applicable for [issuing](https://docs.adyen.com/issuing/) integrations.. - /// Scheme unique arn identifier useful for tracing captures, chargebacks, refunds, etc.. - /// The date when the transfer request was sent.. - /// The estimated time when the beneficiary should have access to the funds.. - /// A list of event data.. - /// externalReason. - /// The unique identifier of the transfer event.. - /// modification. - /// The list of balance mutations per event.. - /// originalAmount. - /// The reason for the transfer status.. - /// The status of the transfer event.. - /// trackingData. - /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes.. - /// The type of the transfer event. Possible values: **accounting**, **tracking**.. - /// The date when the tracking status was updated.. - /// The date when the funds are expected to be deducted from or credited to the balance account. This date can be in either the past or future.. - public TransferEvent(Amount amount = default(Amount), List amountAdjustments = default(List), string arn = default(string), DateTime bookingDate = default(DateTime), DateTime estimatedArrivalTime = default(DateTime), List eventsData = default(List), ExternalReason externalReason = default(ExternalReason), string id = default(string), Modification modification = default(Modification), List mutations = default(List), Amount originalAmount = default(Amount), ReasonEnum? reason = default(ReasonEnum?), StatusEnum? status = default(StatusEnum?), TransferEventTrackingData trackingData = default(TransferEventTrackingData), string transactionId = default(string), TypeEnum? type = default(TypeEnum?), DateTime updateDate = default(DateTime), DateTime valueDate = default(DateTime)) - { - this.Amount = amount; - this.AmountAdjustments = amountAdjustments; - this.Arn = arn; - this.BookingDate = bookingDate; - this.EstimatedArrivalTime = estimatedArrivalTime; - this.EventsData = eventsData; - this.ExternalReason = externalReason; - this.Id = id; - this.Modification = modification; - this.Mutations = mutations; - this.OriginalAmount = originalAmount; - this.Reason = reason; - this.Status = status; - this.TrackingData = trackingData; - this.TransactionId = transactionId; - this.Type = type; - this.UpdateDate = updateDate; - this.ValueDate = valueDate; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The amount adjustments in this transfer. Only applicable for [issuing](https://docs.adyen.com/issuing/) integrations. - /// - /// The amount adjustments in this transfer. Only applicable for [issuing](https://docs.adyen.com/issuing/) integrations. - [DataMember(Name = "amountAdjustments", EmitDefaultValue = false)] - public List AmountAdjustments { get; set; } - - /// - /// Scheme unique arn identifier useful for tracing captures, chargebacks, refunds, etc. - /// - /// Scheme unique arn identifier useful for tracing captures, chargebacks, refunds, etc. - [DataMember(Name = "arn", EmitDefaultValue = false)] - public string Arn { get; set; } - - /// - /// The date when the transfer request was sent. - /// - /// The date when the transfer request was sent. - [DataMember(Name = "bookingDate", EmitDefaultValue = false)] - public DateTime BookingDate { get; set; } - - /// - /// The estimated time when the beneficiary should have access to the funds. - /// - /// The estimated time when the beneficiary should have access to the funds. - [DataMember(Name = "estimatedArrivalTime", EmitDefaultValue = false)] - public DateTime EstimatedArrivalTime { get; set; } - - /// - /// A list of event data. - /// - /// A list of event data. - [DataMember(Name = "eventsData", EmitDefaultValue = false)] - public List EventsData { get; set; } - - /// - /// Gets or Sets ExternalReason - /// - [DataMember(Name = "externalReason", EmitDefaultValue = false)] - public ExternalReason ExternalReason { get; set; } - - /// - /// The unique identifier of the transfer event. - /// - /// The unique identifier of the transfer event. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Modification - /// - [DataMember(Name = "modification", EmitDefaultValue = false)] - public Modification Modification { get; set; } - - /// - /// The list of balance mutations per event. - /// - /// The list of balance mutations per event. - [DataMember(Name = "mutations", EmitDefaultValue = false)] - public List Mutations { get; set; } - - /// - /// Gets or Sets OriginalAmount - /// - [DataMember(Name = "originalAmount", EmitDefaultValue = false)] - public Amount OriginalAmount { get; set; } - - /// - /// Gets or Sets TrackingData - /// - [DataMember(Name = "trackingData", EmitDefaultValue = false)] - public TransferEventTrackingData TrackingData { get; set; } - - /// - /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. - /// - /// The id of the transaction that is related to this accounting event. Only sent for events of type **accounting** where the balance changes. - [DataMember(Name = "transactionId", EmitDefaultValue = false)] - public string TransactionId { get; set; } - - /// - /// The date when the tracking status was updated. - /// - /// The date when the tracking status was updated. - [DataMember(Name = "updateDate", EmitDefaultValue = false)] - public DateTime UpdateDate { get; set; } - - /// - /// The date when the funds are expected to be deducted from or credited to the balance account. This date can be in either the past or future. - /// - /// The date when the funds are expected to be deducted from or credited to the balance account. This date can be in either the past or future. - [DataMember(Name = "valueDate", EmitDefaultValue = false)] - public DateTime ValueDate { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferEvent {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" AmountAdjustments: ").Append(AmountAdjustments).Append("\n"); - sb.Append(" Arn: ").Append(Arn).Append("\n"); - sb.Append(" BookingDate: ").Append(BookingDate).Append("\n"); - sb.Append(" EstimatedArrivalTime: ").Append(EstimatedArrivalTime).Append("\n"); - sb.Append(" EventsData: ").Append(EventsData).Append("\n"); - sb.Append(" ExternalReason: ").Append(ExternalReason).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Modification: ").Append(Modification).Append("\n"); - sb.Append(" Mutations: ").Append(Mutations).Append("\n"); - sb.Append(" OriginalAmount: ").Append(OriginalAmount).Append("\n"); - sb.Append(" Reason: ").Append(Reason).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" TrackingData: ").Append(TrackingData).Append("\n"); - sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UpdateDate: ").Append(UpdateDate).Append("\n"); - sb.Append(" ValueDate: ").Append(ValueDate).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferEvent); - } - - /// - /// Returns true if TransferEvent instances are equal - /// - /// Instance of TransferEvent to be compared - /// Boolean - public bool Equals(TransferEvent input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.AmountAdjustments == input.AmountAdjustments || - this.AmountAdjustments != null && - input.AmountAdjustments != null && - this.AmountAdjustments.SequenceEqual(input.AmountAdjustments) - ) && - ( - this.Arn == input.Arn || - (this.Arn != null && - this.Arn.Equals(input.Arn)) - ) && - ( - this.BookingDate == input.BookingDate || - (this.BookingDate != null && - this.BookingDate.Equals(input.BookingDate)) - ) && - ( - this.EstimatedArrivalTime == input.EstimatedArrivalTime || - (this.EstimatedArrivalTime != null && - this.EstimatedArrivalTime.Equals(input.EstimatedArrivalTime)) - ) && - ( - this.EventsData == input.EventsData || - this.EventsData != null && - input.EventsData != null && - this.EventsData.SequenceEqual(input.EventsData) - ) && - ( - this.ExternalReason == input.ExternalReason || - (this.ExternalReason != null && - this.ExternalReason.Equals(input.ExternalReason)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Modification == input.Modification || - (this.Modification != null && - this.Modification.Equals(input.Modification)) - ) && - ( - this.Mutations == input.Mutations || - this.Mutations != null && - input.Mutations != null && - this.Mutations.SequenceEqual(input.Mutations) - ) && - ( - this.OriginalAmount == input.OriginalAmount || - (this.OriginalAmount != null && - this.OriginalAmount.Equals(input.OriginalAmount)) - ) && - ( - this.Reason == input.Reason || - this.Reason.Equals(input.Reason) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.TrackingData == input.TrackingData || - (this.TrackingData != null && - this.TrackingData.Equals(input.TrackingData)) - ) && - ( - this.TransactionId == input.TransactionId || - (this.TransactionId != null && - this.TransactionId.Equals(input.TransactionId)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UpdateDate == input.UpdateDate || - (this.UpdateDate != null && - this.UpdateDate.Equals(input.UpdateDate)) - ) && - ( - this.ValueDate == input.ValueDate || - (this.ValueDate != null && - this.ValueDate.Equals(input.ValueDate)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.AmountAdjustments != null) - { - hashCode = (hashCode * 59) + this.AmountAdjustments.GetHashCode(); - } - if (this.Arn != null) - { - hashCode = (hashCode * 59) + this.Arn.GetHashCode(); - } - if (this.BookingDate != null) - { - hashCode = (hashCode * 59) + this.BookingDate.GetHashCode(); - } - if (this.EstimatedArrivalTime != null) - { - hashCode = (hashCode * 59) + this.EstimatedArrivalTime.GetHashCode(); - } - if (this.EventsData != null) - { - hashCode = (hashCode * 59) + this.EventsData.GetHashCode(); - } - if (this.ExternalReason != null) - { - hashCode = (hashCode * 59) + this.ExternalReason.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Modification != null) - { - hashCode = (hashCode * 59) + this.Modification.GetHashCode(); - } - if (this.Mutations != null) - { - hashCode = (hashCode * 59) + this.Mutations.GetHashCode(); - } - if (this.OriginalAmount != null) - { - hashCode = (hashCode * 59) + this.OriginalAmount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.TrackingData != null) - { - hashCode = (hashCode * 59) + this.TrackingData.GetHashCode(); - } - if (this.TransactionId != null) - { - hashCode = (hashCode * 59) + this.TransactionId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UpdateDate != null) - { - hashCode = (hashCode * 59) + this.UpdateDate.GetHashCode(); - } - if (this.ValueDate != null) - { - hashCode = (hashCode * 59) + this.ValueDate.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferEventEventsDataInner.cs b/Adyen/Model/Transfers/TransferEventEventsDataInner.cs deleted file mode 100644 index 0728c984b..000000000 --- a/Adyen/Model/Transfers/TransferEventEventsDataInner.cs +++ /dev/null @@ -1,281 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferEventEventsDataInner - /// - [JsonConverter(typeof(TransferEventEventsDataInnerJsonConverter))] - [DataContract(Name = "TransferEvent_eventsData_inner")] - public partial class TransferEventEventsDataInner : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of IssuingTransactionData. - public TransferEventEventsDataInner(IssuingTransactionData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of MerchantPurchaseData. - public TransferEventEventsDataInner(MerchantPurchaseData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(IssuingTransactionData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(MerchantPurchaseData)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: IssuingTransactionData, MerchantPurchaseData"); - } - } - } - - /// - /// Get the actual instance of `IssuingTransactionData`. If the actual instance is not `IssuingTransactionData`, - /// the InvalidClassException will be thrown - /// - /// An instance of IssuingTransactionData - public IssuingTransactionData GetIssuingTransactionData() - { - return (IssuingTransactionData)this.ActualInstance; - } - - /// - /// Get the actual instance of `MerchantPurchaseData`. If the actual instance is not `MerchantPurchaseData`, - /// the InvalidClassException will be thrown - /// - /// An instance of MerchantPurchaseData - public MerchantPurchaseData GetMerchantPurchaseData() - { - return (MerchantPurchaseData)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferEventEventsDataInner {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferEventEventsDataInner.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferEventEventsDataInner - /// - /// JSON string - /// An instance of TransferEventEventsDataInner - public static TransferEventEventsDataInner FromJson(string jsonString) - { - TransferEventEventsDataInner newTransferEventEventsDataInner = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferEventEventsDataInner; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the IssuingTransactionData type enums - if (ContainsValue(type)) - { - newTransferEventEventsDataInner = new TransferEventEventsDataInner(JsonConvert.DeserializeObject(jsonString, TransferEventEventsDataInner.SerializerSettings)); - matchedTypes.Add("IssuingTransactionData"); - match++; - } - // Check if the jsonString type enum matches the MerchantPurchaseData type enums - if (ContainsValue(type)) - { - newTransferEventEventsDataInner = new TransferEventEventsDataInner(JsonConvert.DeserializeObject(jsonString, TransferEventEventsDataInner.SerializerSettings)); - matchedTypes.Add("MerchantPurchaseData"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferEventEventsDataInner; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferEventEventsDataInner); - } - - /// - /// Returns true if TransferEventEventsDataInner instances are equal - /// - /// Instance of TransferEventEventsDataInner to be compared - /// Boolean - public bool Equals(TransferEventEventsDataInner input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferEventEventsDataInner - /// - public class TransferEventEventsDataInnerJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferEventEventsDataInner).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferEventEventsDataInner.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferEventTrackingData.cs b/Adyen/Model/Transfers/TransferEventTrackingData.cs deleted file mode 100644 index 15deafb3b..000000000 --- a/Adyen/Model/Transfers/TransferEventTrackingData.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -using System.Reflection; - -namespace Adyen.Model.Transfers -{ - /// - /// Additional information for the tracking event. - /// - [JsonConverter(typeof(TransferEventTrackingDataJsonConverter))] - [DataContract(Name = "TransferEvent_trackingData")] - public partial class TransferEventTrackingData : AbstractOpenAPISchema, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of ConfirmationTrackingData. - public TransferEventTrackingData(ConfirmationTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of EstimationTrackingData. - public TransferEventTrackingData(EstimationTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of InternalReviewTrackingData. - public TransferEventTrackingData(InternalReviewTrackingData actualInstance) - { - this.IsNullable = false; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - if (value.GetType() == typeof(ConfirmationTrackingData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(EstimationTrackingData)) - { - this._actualInstance = value; - } - else if (value.GetType() == typeof(InternalReviewTrackingData)) - { - this._actualInstance = value; - } - else - { - throw new ArgumentException("Invalid instance found. Must be the following types: ConfirmationTrackingData, EstimationTrackingData, InternalReviewTrackingData"); - } - } - } - - /// - /// Get the actual instance of `ConfirmationTrackingData`. If the actual instance is not `ConfirmationTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of ConfirmationTrackingData - public ConfirmationTrackingData GetConfirmationTrackingData() - { - return (ConfirmationTrackingData)this.ActualInstance; - } - - /// - /// Get the actual instance of `EstimationTrackingData`. If the actual instance is not `EstimationTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of EstimationTrackingData - public EstimationTrackingData GetEstimationTrackingData() - { - return (EstimationTrackingData)this.ActualInstance; - } - - /// - /// Get the actual instance of `InternalReviewTrackingData`. If the actual instance is not `InternalReviewTrackingData`, - /// the InvalidClassException will be thrown - /// - /// An instance of InternalReviewTrackingData - public InternalReviewTrackingData GetInternalReviewTrackingData() - { - return (InternalReviewTrackingData)this.ActualInstance; - } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransferEventTrackingData {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, TransferEventTrackingData.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of TransferEventTrackingData - /// - /// JSON string - /// An instance of TransferEventTrackingData - public static TransferEventTrackingData FromJson(string jsonString) - { - TransferEventTrackingData newTransferEventTrackingData = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return newTransferEventTrackingData; - } - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - // Check if the jsonString type enum matches the ConfirmationTrackingData type enums - if (ContainsValue(type)) - { - newTransferEventTrackingData = new TransferEventTrackingData(JsonConvert.DeserializeObject(jsonString, TransferEventTrackingData.SerializerSettings)); - matchedTypes.Add("ConfirmationTrackingData"); - match++; - } - // Check if the jsonString type enum matches the EstimationTrackingData type enums - if (ContainsValue(type)) - { - newTransferEventTrackingData = new TransferEventTrackingData(JsonConvert.DeserializeObject(jsonString, TransferEventTrackingData.SerializerSettings)); - matchedTypes.Add("EstimationTrackingData"); - match++; - } - // Check if the jsonString type enum matches the InternalReviewTrackingData type enums - if (ContainsValue(type)) - { - newTransferEventTrackingData = new TransferEventTrackingData(JsonConvert.DeserializeObject(jsonString, TransferEventTrackingData.SerializerSettings)); - matchedTypes.Add("InternalReviewTrackingData"); - match++; - } - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return newTransferEventTrackingData; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferEventTrackingData); - } - - /// - /// Returns true if TransferEventTrackingData instances are equal - /// - /// Instance of TransferEventTrackingData to be compared - /// Boolean - public bool Equals(TransferEventTrackingData input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// Custom JSON converter for TransferEventTrackingData - /// - public class TransferEventTrackingDataJsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof(TransferEventTrackingData).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return TransferEventTrackingData.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferInfo.cs b/Adyen/Model/Transfers/TransferInfo.cs deleted file mode 100644 index a42c994ca..000000000 --- a/Adyen/Model/Transfers/TransferInfo.cs +++ /dev/null @@ -1,516 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferInfo - /// - [DataContract(Name = "TransferInfo")] - public partial class TransferInfo : IEquatable, IValidatableObject - { - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - [JsonConverter(typeof(StringEnumConverter))] - public enum CategoryEnum - { - /// - /// Enum Bank for value: bank - /// - [EnumMember(Value = "bank")] - Bank = 1, - - /// - /// Enum Card for value: card - /// - [EnumMember(Value = "card")] - Card = 2, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 3, - - /// - /// Enum IssuedCard for value: issuedCard - /// - [EnumMember(Value = "issuedCard")] - IssuedCard = 4, - - /// - /// Enum PlatformPayment for value: platformPayment - /// - [EnumMember(Value = "platformPayment")] - PlatformPayment = 5, - - /// - /// Enum TopUp for value: topUp - /// - [EnumMember(Value = "topUp")] - TopUp = 6 - - } - - - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - /// - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. - [DataMember(Name = "category", IsRequired = false, EmitDefaultValue = false)] - public CategoryEnum Category { get; set; } - /// - /// Defines Priorities - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PrioritiesEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Required for transfers with `category` **bank**. For more details, see [fallback priorities](https://docs.adyen.com/payouts/payout-service/payout-to-users/#fallback-priorities). - /// - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Required for transfers with `category` **bank**. For more details, see [fallback priorities](https://docs.adyen.com/payouts/payout-service/payout-to-users/#fallback-priorities). - [DataMember(Name = "priorities", EmitDefaultValue = false)] - public List Priorities { get; set; } - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [JsonConverter(typeof(StringEnumConverter))] - public enum PriorityEnum - { - /// - /// Enum CrossBorder for value: crossBorder - /// - [EnumMember(Value = "crossBorder")] - CrossBorder = 1, - - /// - /// Enum Fast for value: fast - /// - [EnumMember(Value = "fast")] - Fast = 2, - - /// - /// Enum Instant for value: instant - /// - [EnumMember(Value = "instant")] - Instant = 3, - - /// - /// Enum Internal for value: internal - /// - [EnumMember(Value = "internal")] - Internal = 4, - - /// - /// Enum Regular for value: regular - /// - [EnumMember(Value = "regular")] - Regular = 5, - - /// - /// Enum Wire for value: wire - /// - [EnumMember(Value = "wire")] - Wire = 6 - - } - - - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - /// - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). - [DataMember(Name = "priority", EmitDefaultValue = false)] - public PriorityEnum? Priority { get; set; } - /// - /// The type of transfer. Possible values: - **bankTransfer**: for push transfers to a transfer instrument or a bank account. The `category` must be **bank**. - **internalTransfer**: for push transfers between balance accounts. The `category` must be **internal**. - **internalDirectDebit**: for pull transfers (direct debits) between balance accounts. The `category` must be **internal**. - /// - /// The type of transfer. Possible values: - **bankTransfer**: for push transfers to a transfer instrument or a bank account. The `category` must be **bank**. - **internalTransfer**: for push transfers between balance accounts. The `category` must be **internal**. - **internalDirectDebit**: for pull transfers (direct debits) between balance accounts. The `category` must be **internal**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum BankTransfer for value: bankTransfer - /// - [EnumMember(Value = "bankTransfer")] - BankTransfer = 1, - - /// - /// Enum InternalTransfer for value: internalTransfer - /// - [EnumMember(Value = "internalTransfer")] - InternalTransfer = 2, - - /// - /// Enum InternalDirectDebit for value: internalDirectDebit - /// - [EnumMember(Value = "internalDirectDebit")] - InternalDirectDebit = 3 - - } - - - /// - /// The type of transfer. Possible values: - **bankTransfer**: for push transfers to a transfer instrument or a bank account. The `category` must be **bank**. - **internalTransfer**: for push transfers between balance accounts. The `category` must be **internal**. - **internalDirectDebit**: for pull transfers (direct debits) between balance accounts. The `category` must be **internal**. - /// - /// The type of transfer. Possible values: - **bankTransfer**: for push transfers to a transfer instrument or a bank account. The `category` must be **bank**. - **internalTransfer**: for push transfers between balance accounts. The `category` must be **internal**. - **internalDirectDebit**: for pull transfers (direct debits) between balance accounts. The `category` must be **internal**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// amount (required). - /// The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount** assigned to the balance account, you must specify the [payment instrument ID](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id) of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account.. - /// The category of the transfer. Possible values: - **bank**: a transfer involving a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **card**: a transfer involving a third-party card. - **internal**: a transfer between [balance accounts](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: a transfer initiated by a Adyen-issued card. - **platformPayment**: funds movements related to payments that are acquired for your users. - **topUp**: an incoming transfer initiated by your user to top up their balance account. (required). - /// counterparty (required). - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?**. - /// The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount**, you must specify the payment instrument ID of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account.. - /// The list of priorities for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. You can provide multiple priorities. Adyen will try to pay out using the priority you list first. If that's not possible, it moves on to the next option in the order of your provided priorities. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN). Required for transfers with `category` **bank**. For more details, see [fallback priorities](https://docs.adyen.com/payouts/payout-service/payout-to-users/#fallback-priorities).. - /// The priority for the bank transfer. This sets the speed at which the transfer is sent and the fees that you have to pay. Required for transfers with `category` **bank**. Possible values: * **regular**: for normal, low-value transactions. * **fast**: a faster way to transfer funds, but the fees are higher. Recommended for high-priority, low-value transactions. * **wire**: the fastest way to transfer funds, but this has the highest fees. Recommended for high-priority, high-value transactions. * **instant**: for instant funds transfers in [SEPA countries](https://www.ecb.europa.eu/paym/integration/retail/sepa/html/index.en.html). * **crossBorder**: for high-value transfers to a recipient in a different country. * **internal**: for transfers to an Adyen-issued business bank account (by bank account number/IBAN).. - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference.. - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both parties involved in the funds movement. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others.. - /// review. - /// The type of transfer. Possible values: - **bankTransfer**: for push transfers to a transfer instrument or a bank account. The `category` must be **bank**. - **internalTransfer**: for push transfers between balance accounts. The `category` must be **internal**. - **internalDirectDebit**: for pull transfers (direct debits) between balance accounts. The `category` must be **internal**. . - /// ultimateParty. - public TransferInfo(Amount amount = default(Amount), string balanceAccountId = default(string), CategoryEnum category = default(CategoryEnum), CounterpartyInfoV3 counterparty = default(CounterpartyInfoV3), string description = default(string), string paymentInstrumentId = default(string), List priorities = default(List), PriorityEnum? priority = default(PriorityEnum?), string reference = default(string), string referenceForBeneficiary = default(string), TransferRequestReview review = default(TransferRequestReview), TypeEnum? type = default(TypeEnum?), UltimatePartyIdentification ultimateParty = default(UltimatePartyIdentification)) - { - this.Amount = amount; - this.Category = category; - this.Counterparty = counterparty; - this.BalanceAccountId = balanceAccountId; - this.Description = description; - this.PaymentInstrumentId = paymentInstrumentId; - this.Priorities = priorities; - this.Priority = priority; - this.Reference = reference; - this.ReferenceForBeneficiary = referenceForBeneficiary; - this.Review = review; - this.Type = type; - this.UltimateParty = ultimateParty; - } - - /// - /// Gets or Sets Amount - /// - [DataMember(Name = "amount", IsRequired = false, EmitDefaultValue = false)] - public Amount Amount { get; set; } - - /// - /// The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount** assigned to the balance account, you must specify the [payment instrument ID](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id) of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account. - /// - /// The unique identifier of the source [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount** assigned to the balance account, you must specify the [payment instrument ID](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id) of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account. - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets Counterparty - /// - [DataMember(Name = "counterparty", IsRequired = false, EmitDefaultValue = false)] - public CounterpartyInfoV3 Counterparty { get; set; } - - /// - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** - /// - /// Your description for the transfer. It is used by most banks as the transfer description. We recommend sending a maximum of 140 characters, otherwise the description may be truncated. Supported characters: **[a-z] [A-Z] [0-9] / - ?** **: ( ) . , ' + Space** Supported characters for **regular** and **fast** transfers to a US counterparty: **[a-z] [A-Z] [0-9] & $ % # @** **~ = + - _ ' \" ! ?** - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount**, you must specify the payment instrument ID of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account. - /// - /// The unique identifier of the source [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#responses-200-id). If you want to make a transfer using a **virtual** **bankAccount**, you must specify the payment instrument ID of the **virtual** **bankAccount**. If you only specify a balance account ID, Adyen uses the default **physical** **bankAccount** payment instrument assigned to the balance account. - [DataMember(Name = "paymentInstrumentId", EmitDefaultValue = false)] - public string PaymentInstrumentId { get; set; } - - /// - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. - /// - /// Your reference for the transfer, used internally within your platform. If you don't provide this in the request, Adyen generates a unique reference. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both parties involved in the funds movement. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. - /// - /// A reference that is sent to the recipient. This reference is also sent in all webhooks related to the transfer, so you can use it to track statuses for both parties involved in the funds movement. Supported characters: **a-z**, **A-Z**, **0-9**. The maximum length depends on the `category`. - **internal**: 80 characters - **bank**: 35 characters when transferring to an IBAN, 15 characters for others. - [DataMember(Name = "referenceForBeneficiary", EmitDefaultValue = false)] - public string ReferenceForBeneficiary { get; set; } - - /// - /// Gets or Sets Review - /// - [DataMember(Name = "review", EmitDefaultValue = false)] - public TransferRequestReview Review { get; set; } - - /// - /// Gets or Sets UltimateParty - /// - [DataMember(Name = "ultimateParty", EmitDefaultValue = false)] - public UltimatePartyIdentification UltimateParty { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferInfo {\n"); - sb.Append(" Amount: ").Append(Amount).Append("\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Counterparty: ").Append(Counterparty).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" PaymentInstrumentId: ").Append(PaymentInstrumentId).Append("\n"); - sb.Append(" Priorities: ").Append(Priorities).Append("\n"); - sb.Append(" Priority: ").Append(Priority).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ReferenceForBeneficiary: ").Append(ReferenceForBeneficiary).Append("\n"); - sb.Append(" Review: ").Append(Review).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" UltimateParty: ").Append(UltimateParty).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferInfo); - } - - /// - /// Returns true if TransferInfo instances are equal - /// - /// Instance of TransferInfo to be compared - /// Boolean - public bool Equals(TransferInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - (this.Amount != null && - this.Amount.Equals(input.Amount)) - ) && - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.Category == input.Category || - this.Category.Equals(input.Category) - ) && - ( - this.Counterparty == input.Counterparty || - (this.Counterparty != null && - this.Counterparty.Equals(input.Counterparty)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.PaymentInstrumentId == input.PaymentInstrumentId || - (this.PaymentInstrumentId != null && - this.PaymentInstrumentId.Equals(input.PaymentInstrumentId)) - ) && - ( - this.Priorities == input.Priorities || - this.Priorities.SequenceEqual(input.Priorities) - ) && - ( - this.Priority == input.Priority || - this.Priority.Equals(input.Priority) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ReferenceForBeneficiary == input.ReferenceForBeneficiary || - (this.ReferenceForBeneficiary != null && - this.ReferenceForBeneficiary.Equals(input.ReferenceForBeneficiary)) - ) && - ( - this.Review == input.Review || - (this.Review != null && - this.Review.Equals(input.Review)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.UltimateParty == input.UltimateParty || - (this.UltimateParty != null && - this.UltimateParty.Equals(input.UltimateParty)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Amount != null) - { - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - } - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - if (this.Counterparty != null) - { - hashCode = (hashCode * 59) + this.Counterparty.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.PaymentInstrumentId != null) - { - hashCode = (hashCode * 59) + this.PaymentInstrumentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Priorities.GetHashCode(); - hashCode = (hashCode * 59) + this.Priority.GetHashCode(); - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ReferenceForBeneficiary != null) - { - hashCode = (hashCode * 59) + this.ReferenceForBeneficiary.GetHashCode(); - } - if (this.Review != null) - { - hashCode = (hashCode * 59) + this.Review.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.UltimateParty != null) - { - hashCode = (hashCode * 59) + this.UltimateParty.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Description (string) maxLength - if (this.Description != null && this.Description.Length > 140) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Description, length must be less than 140.", new [] { "Description" }); - } - - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 80) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 80.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferNotificationCounterParty.cs b/Adyen/Model/Transfers/TransferNotificationCounterParty.cs deleted file mode 100644 index 4082ae956..000000000 --- a/Adyen/Model/Transfers/TransferNotificationCounterParty.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferNotificationCounterParty - /// - [DataContract(Name = "TransferNotificationCounterParty")] - public partial class TransferNotificationCounterParty : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id).. - /// bankAccount. - /// card. - /// merchant. - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id).. - public TransferNotificationCounterParty(string balanceAccountId = default(string), BankAccountV3 bankAccount = default(BankAccountV3), Card card = default(Card), TransferNotificationMerchantData merchant = default(TransferNotificationMerchantData), string transferInstrumentId = default(string)) - { - this.BalanceAccountId = balanceAccountId; - this.BankAccount = bankAccount; - this.Card = card; - this.Merchant = merchant; - this.TransferInstrumentId = transferInstrumentId; - } - - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - /// - /// The unique identifier of the counterparty [balance account](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/balanceAccounts#responses-200-id). - [DataMember(Name = "balanceAccountId", EmitDefaultValue = false)] - public string BalanceAccountId { get; set; } - - /// - /// Gets or Sets BankAccount - /// - [DataMember(Name = "bankAccount", EmitDefaultValue = false)] - public BankAccountV3 BankAccount { get; set; } - - /// - /// Gets or Sets Card - /// - [DataMember(Name = "card", EmitDefaultValue = false)] - public Card Card { get; set; } - - /// - /// Gets or Sets Merchant - /// - [DataMember(Name = "merchant", EmitDefaultValue = false)] - public TransferNotificationMerchantData Merchant { get; set; } - - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - /// - /// The unique identifier of the counterparty [transfer instrument](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments#responses-200-id). - [DataMember(Name = "transferInstrumentId", EmitDefaultValue = false)] - public string TransferInstrumentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferNotificationCounterParty {\n"); - sb.Append(" BalanceAccountId: ").Append(BalanceAccountId).Append("\n"); - sb.Append(" BankAccount: ").Append(BankAccount).Append("\n"); - sb.Append(" Card: ").Append(Card).Append("\n"); - sb.Append(" Merchant: ").Append(Merchant).Append("\n"); - sb.Append(" TransferInstrumentId: ").Append(TransferInstrumentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferNotificationCounterParty); - } - - /// - /// Returns true if TransferNotificationCounterParty instances are equal - /// - /// Instance of TransferNotificationCounterParty to be compared - /// Boolean - public bool Equals(TransferNotificationCounterParty input) - { - if (input == null) - { - return false; - } - return - ( - this.BalanceAccountId == input.BalanceAccountId || - (this.BalanceAccountId != null && - this.BalanceAccountId.Equals(input.BalanceAccountId)) - ) && - ( - this.BankAccount == input.BankAccount || - (this.BankAccount != null && - this.BankAccount.Equals(input.BankAccount)) - ) && - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Merchant == input.Merchant || - (this.Merchant != null && - this.Merchant.Equals(input.Merchant)) - ) && - ( - this.TransferInstrumentId == input.TransferInstrumentId || - (this.TransferInstrumentId != null && - this.TransferInstrumentId.Equals(input.TransferInstrumentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BalanceAccountId != null) - { - hashCode = (hashCode * 59) + this.BalanceAccountId.GetHashCode(); - } - if (this.BankAccount != null) - { - hashCode = (hashCode * 59) + this.BankAccount.GetHashCode(); - } - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Merchant != null) - { - hashCode = (hashCode * 59) + this.Merchant.GetHashCode(); - } - if (this.TransferInstrumentId != null) - { - hashCode = (hashCode * 59) + this.TransferInstrumentId.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferNotificationMerchantData.cs b/Adyen/Model/Transfers/TransferNotificationMerchantData.cs deleted file mode 100644 index 46de0daa5..000000000 --- a/Adyen/Model/Transfers/TransferNotificationMerchantData.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferNotificationMerchantData - /// - [DataContract(Name = "TransferNotificationMerchantData")] - public partial class TransferNotificationMerchantData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The unique identifier of the merchant's acquirer.. - /// The city where the merchant is located.. - /// The country where the merchant is located.. - /// The merchant category code.. - /// The unique identifier of the merchant.. - /// The name of the merchant's shop or service.. - /// The postal code of the merchant.. - public TransferNotificationMerchantData(string acquirerId = default(string), string city = default(string), string country = default(string), string mcc = default(string), string merchantId = default(string), string name = default(string), string postalCode = default(string)) - { - this.AcquirerId = acquirerId; - this.City = city; - this.Country = country; - this.Mcc = mcc; - this.MerchantId = merchantId; - this.Name = name; - this.PostalCode = postalCode; - } - - /// - /// The unique identifier of the merchant's acquirer. - /// - /// The unique identifier of the merchant's acquirer. - [DataMember(Name = "acquirerId", EmitDefaultValue = false)] - public string AcquirerId { get; set; } - - /// - /// The city where the merchant is located. - /// - /// The city where the merchant is located. - [DataMember(Name = "city", EmitDefaultValue = false)] - public string City { get; set; } - - /// - /// The country where the merchant is located. - /// - /// The country where the merchant is located. - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// The merchant category code. - /// - /// The merchant category code. - [DataMember(Name = "mcc", EmitDefaultValue = false)] - public string Mcc { get; set; } - - /// - /// The unique identifier of the merchant. - /// - /// The unique identifier of the merchant. - [DataMember(Name = "merchantId", EmitDefaultValue = false)] - public string MerchantId { get; set; } - - /// - /// The name of the merchant's shop or service. - /// - /// The name of the merchant's shop or service. - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// The postal code of the merchant. - /// - /// The postal code of the merchant. - [DataMember(Name = "postalCode", EmitDefaultValue = false)] - public string PostalCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferNotificationMerchantData {\n"); - sb.Append(" AcquirerId: ").Append(AcquirerId).Append("\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Mcc: ").Append(Mcc).Append("\n"); - sb.Append(" MerchantId: ").Append(MerchantId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferNotificationMerchantData); - } - - /// - /// Returns true if TransferNotificationMerchantData instances are equal - /// - /// Instance of TransferNotificationMerchantData to be compared - /// Boolean - public bool Equals(TransferNotificationMerchantData input) - { - if (input == null) - { - return false; - } - return - ( - this.AcquirerId == input.AcquirerId || - (this.AcquirerId != null && - this.AcquirerId.Equals(input.AcquirerId)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Mcc == input.Mcc || - (this.Mcc != null && - this.Mcc.Equals(input.Mcc)) - ) && - ( - this.MerchantId == input.MerchantId || - (this.MerchantId != null && - this.MerchantId.Equals(input.MerchantId)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AcquirerId != null) - { - hashCode = (hashCode * 59) + this.AcquirerId.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Mcc != null) - { - hashCode = (hashCode * 59) + this.Mcc.GetHashCode(); - } - if (this.MerchantId != null) - { - hashCode = (hashCode * 59) + this.MerchantId.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferNotificationValidationFact.cs b/Adyen/Model/Transfers/TransferNotificationValidationFact.cs deleted file mode 100644 index eb124bae1..000000000 --- a/Adyen/Model/Transfers/TransferNotificationValidationFact.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferNotificationValidationFact - /// - [DataContract(Name = "TransferNotificationValidationFact")] - public partial class TransferNotificationValidationFact : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The evaluation result of the validation fact.. - /// The type of the validation fact.. - public TransferNotificationValidationFact(string result = default(string), string type = default(string)) - { - this.Result = result; - this.Type = type; - } - - /// - /// The evaluation result of the validation fact. - /// - /// The evaluation result of the validation fact. - [DataMember(Name = "result", EmitDefaultValue = false)] - public string Result { get; set; } - - /// - /// The type of the validation fact. - /// - /// The type of the validation fact. - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferNotificationValidationFact {\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferNotificationValidationFact); - } - - /// - /// Returns true if TransferNotificationValidationFact instances are equal - /// - /// Instance of TransferNotificationValidationFact to be compared - /// Boolean - public bool Equals(TransferNotificationValidationFact input) - { - if (input == null) - { - return false; - } - return - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Result != null) - { - hashCode = (hashCode * 59) + this.Result.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferRequestReview.cs b/Adyen/Model/Transfers/TransferRequestReview.cs deleted file mode 100644 index 73f4d0505..000000000 --- a/Adyen/Model/Transfers/TransferRequestReview.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferRequestReview - /// - [DataContract(Name = "TransferRequestReview")] - public partial class TransferRequestReview : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Specifies the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer.. - /// Specifies whether you will initiate Strong Customer Authentication (SCA) in thePOST [/transfers/approve](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) request. Only applies to transfers made with an Adyen [business account](https://docs.adyen.com/platforms/business-accounts).. - public TransferRequestReview(int? numberOfApprovalsRequired = default(int?), bool? scaOnApproval = default(bool?)) - { - this.NumberOfApprovalsRequired = numberOfApprovalsRequired; - this.ScaOnApproval = scaOnApproval; - } - - /// - /// Specifies the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer. - /// - /// Specifies the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer. - [DataMember(Name = "numberOfApprovalsRequired", EmitDefaultValue = false)] - public int? NumberOfApprovalsRequired { get; set; } - - /// - /// Specifies whether you will initiate Strong Customer Authentication (SCA) in thePOST [/transfers/approve](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) request. Only applies to transfers made with an Adyen [business account](https://docs.adyen.com/platforms/business-accounts). - /// - /// Specifies whether you will initiate Strong Customer Authentication (SCA) in thePOST [/transfers/approve](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) request. Only applies to transfers made with an Adyen [business account](https://docs.adyen.com/platforms/business-accounts). - [DataMember(Name = "scaOnApproval", EmitDefaultValue = false)] - public bool? ScaOnApproval { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferRequestReview {\n"); - sb.Append(" NumberOfApprovalsRequired: ").Append(NumberOfApprovalsRequired).Append("\n"); - sb.Append(" ScaOnApproval: ").Append(ScaOnApproval).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferRequestReview); - } - - /// - /// Returns true if TransferRequestReview instances are equal - /// - /// Instance of TransferRequestReview to be compared - /// Boolean - public bool Equals(TransferRequestReview input) - { - if (input == null) - { - return false; - } - return - ( - this.NumberOfApprovalsRequired == input.NumberOfApprovalsRequired || - this.NumberOfApprovalsRequired.Equals(input.NumberOfApprovalsRequired) - ) && - ( - this.ScaOnApproval == input.ScaOnApproval || - this.ScaOnApproval.Equals(input.ScaOnApproval) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.NumberOfApprovalsRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.ScaOnApproval.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferReview.cs b/Adyen/Model/Transfers/TransferReview.cs deleted file mode 100644 index 99db0551d..000000000 --- a/Adyen/Model/Transfers/TransferReview.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferReview - /// - [DataContract(Name = "TransferReview")] - public partial class TransferReview : IEquatable, IValidatableObject - { - /// - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**. - /// - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**. - [JsonConverter(typeof(StringEnumConverter))] - public enum ScaOnApprovalEnum - { - /// - /// Enum Completed for value: completed - /// - [EnumMember(Value = "completed")] - Completed = 1, - - /// - /// Enum NotApplicable for value: notApplicable - /// - [EnumMember(Value = "notApplicable")] - NotApplicable = 2, - - /// - /// Enum Required for value: required - /// - [EnumMember(Value = "required")] - Required = 3 - - } - - - /// - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**. - /// - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**. - [DataMember(Name = "scaOnApproval", EmitDefaultValue = false)] - public ScaOnApprovalEnum? ScaOnApproval { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Shows the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer.. - /// Shows the status of the Strong Customer Authentication (SCA) process. Possible values: **required**, **notApplicable**.. - public TransferReview(int? numberOfApprovalsRequired = default(int?), ScaOnApprovalEnum? scaOnApproval = default(ScaOnApprovalEnum?)) - { - this.NumberOfApprovalsRequired = numberOfApprovalsRequired; - this.ScaOnApproval = scaOnApproval; - } - - /// - /// Shows the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer. - /// - /// Shows the number of [approvals](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers/approve) required to process the transfer. - [DataMember(Name = "numberOfApprovalsRequired", EmitDefaultValue = false)] - public int? NumberOfApprovalsRequired { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferReview {\n"); - sb.Append(" NumberOfApprovalsRequired: ").Append(NumberOfApprovalsRequired).Append("\n"); - sb.Append(" ScaOnApproval: ").Append(ScaOnApproval).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferReview); - } - - /// - /// Returns true if TransferReview instances are equal - /// - /// Instance of TransferReview to be compared - /// Boolean - public bool Equals(TransferReview input) - { - if (input == null) - { - return false; - } - return - ( - this.NumberOfApprovalsRequired == input.NumberOfApprovalsRequired || - this.NumberOfApprovalsRequired.Equals(input.NumberOfApprovalsRequired) - ) && - ( - this.ScaOnApproval == input.ScaOnApproval || - this.ScaOnApproval.Equals(input.ScaOnApproval) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.NumberOfApprovalsRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.ScaOnApproval.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferServiceRestServiceError.cs b/Adyen/Model/Transfers/TransferServiceRestServiceError.cs deleted file mode 100644 index 871a886d5..000000000 --- a/Adyen/Model/Transfers/TransferServiceRestServiceError.cs +++ /dev/null @@ -1,302 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferServiceRestServiceError - /// - [DataContract(Name = "TransferServiceRestServiceError")] - public partial class TransferServiceRestServiceError : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferServiceRestServiceError() { } - /// - /// Initializes a new instance of the class. - /// - /// A human-readable explanation specific to this occurrence of the problem. (required). - /// A code that identifies the problem type. (required). - /// A unique URI that identifies the specific occurrence of the problem.. - /// Detailed explanation of each validation error, when applicable.. - /// A unique reference for the request, essentially the same as `pspReference`.. - /// response. - /// Detailed explanation of each attempt to route the transfer with the priorities from the request.. - /// The HTTP status code. (required). - /// A short, human-readable summary of the problem type. (required). - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. (required). - public TransferServiceRestServiceError(string detail = default(string), string errorCode = default(string), string instance = default(string), List invalidFields = default(List), string requestId = default(string), Object response = default(Object), List routingDetails = default(List), int? status = default(int?), string title = default(string), string type = default(string)) - { - this.Detail = detail; - this.ErrorCode = errorCode; - this.Status = status; - this.Title = title; - this.Type = type; - this.Instance = instance; - this.InvalidFields = invalidFields; - this.RequestId = requestId; - this.Response = response; - this.RoutingDetails = routingDetails; - } - - /// - /// A human-readable explanation specific to this occurrence of the problem. - /// - /// A human-readable explanation specific to this occurrence of the problem. - [DataMember(Name = "detail", IsRequired = false, EmitDefaultValue = false)] - public string Detail { get; set; } - - /// - /// A code that identifies the problem type. - /// - /// A code that identifies the problem type. - [DataMember(Name = "errorCode", IsRequired = false, EmitDefaultValue = false)] - public string ErrorCode { get; set; } - - /// - /// A unique URI that identifies the specific occurrence of the problem. - /// - /// A unique URI that identifies the specific occurrence of the problem. - [DataMember(Name = "instance", EmitDefaultValue = false)] - public string Instance { get; set; } - - /// - /// Detailed explanation of each validation error, when applicable. - /// - /// Detailed explanation of each validation error, when applicable. - [DataMember(Name = "invalidFields", EmitDefaultValue = false)] - public List InvalidFields { get; set; } - - /// - /// A unique reference for the request, essentially the same as `pspReference`. - /// - /// A unique reference for the request, essentially the same as `pspReference`. - [DataMember(Name = "requestId", EmitDefaultValue = false)] - public string RequestId { get; set; } - - /// - /// Gets or Sets Response - /// - [DataMember(Name = "response", EmitDefaultValue = false)] - public Object Response { get; set; } - - /// - /// Detailed explanation of each attempt to route the transfer with the priorities from the request. - /// - /// Detailed explanation of each attempt to route the transfer with the priorities from the request. - [DataMember(Name = "routingDetails", EmitDefaultValue = false)] - public List RoutingDetails { get; set; } - - /// - /// The HTTP status code. - /// - /// The HTTP status code. - [DataMember(Name = "status", IsRequired = false, EmitDefaultValue = false)] - public int? Status { get; set; } - - /// - /// A short, human-readable summary of the problem type. - /// - /// A short, human-readable summary of the problem type. - [DataMember(Name = "title", IsRequired = false, EmitDefaultValue = false)] - public string Title { get; set; } - - /// - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. - /// - /// A URI that identifies the problem type, pointing to human-readable documentation on this problem type. - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferServiceRestServiceError {\n"); - sb.Append(" Detail: ").Append(Detail).Append("\n"); - sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" Instance: ").Append(Instance).Append("\n"); - sb.Append(" InvalidFields: ").Append(InvalidFields).Append("\n"); - sb.Append(" RequestId: ").Append(RequestId).Append("\n"); - sb.Append(" Response: ").Append(Response).Append("\n"); - sb.Append(" RoutingDetails: ").Append(RoutingDetails).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Title: ").Append(Title).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferServiceRestServiceError); - } - - /// - /// Returns true if TransferServiceRestServiceError instances are equal - /// - /// Instance of TransferServiceRestServiceError to be compared - /// Boolean - public bool Equals(TransferServiceRestServiceError input) - { - if (input == null) - { - return false; - } - return - ( - this.Detail == input.Detail || - (this.Detail != null && - this.Detail.Equals(input.Detail)) - ) && - ( - this.ErrorCode == input.ErrorCode || - (this.ErrorCode != null && - this.ErrorCode.Equals(input.ErrorCode)) - ) && - ( - this.Instance == input.Instance || - (this.Instance != null && - this.Instance.Equals(input.Instance)) - ) && - ( - this.InvalidFields == input.InvalidFields || - this.InvalidFields != null && - input.InvalidFields != null && - this.InvalidFields.SequenceEqual(input.InvalidFields) - ) && - ( - this.RequestId == input.RequestId || - (this.RequestId != null && - this.RequestId.Equals(input.RequestId)) - ) && - ( - this.Response == input.Response || - (this.Response != null && - this.Response.Equals(input.Response)) - ) && - ( - this.RoutingDetails == input.RoutingDetails || - this.RoutingDetails != null && - input.RoutingDetails != null && - this.RoutingDetails.SequenceEqual(input.RoutingDetails) - ) && - ( - this.Status == input.Status || - this.Status.Equals(input.Status) - ) && - ( - this.Title == input.Title || - (this.Title != null && - this.Title.Equals(input.Title)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Detail != null) - { - hashCode = (hashCode * 59) + this.Detail.GetHashCode(); - } - if (this.ErrorCode != null) - { - hashCode = (hashCode * 59) + this.ErrorCode.GetHashCode(); - } - if (this.Instance != null) - { - hashCode = (hashCode * 59) + this.Instance.GetHashCode(); - } - if (this.InvalidFields != null) - { - hashCode = (hashCode * 59) + this.InvalidFields.GetHashCode(); - } - if (this.RequestId != null) - { - hashCode = (hashCode * 59) + this.RequestId.GetHashCode(); - } - if (this.Response != null) - { - hashCode = (hashCode * 59) + this.Response.GetHashCode(); - } - if (this.RoutingDetails != null) - { - hashCode = (hashCode * 59) + this.RoutingDetails.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.Title != null) - { - hashCode = (hashCode * 59) + this.Title.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/TransferView.cs b/Adyen/Model/Transfers/TransferView.cs deleted file mode 100644 index 3b0d74a65..000000000 --- a/Adyen/Model/Transfers/TransferView.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// TransferView - /// - [DataContract(Name = "TransferView")] - public partial class TransferView : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TransferView() { } - /// - /// Initializes a new instance of the class. - /// - /// categoryData. - /// The ID of the resource.. - /// The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. (required). - public TransferView(TransferCategoryData categoryData = default(TransferCategoryData), string id = default(string), string reference = default(string)) - { - this.Reference = reference; - this.CategoryData = categoryData; - this.Id = id; - } - - /// - /// Gets or Sets CategoryData - /// - [DataMember(Name = "categoryData", EmitDefaultValue = false)] - public TransferCategoryData CategoryData { get; set; } - - /// - /// The ID of the resource. - /// - /// The ID of the resource. - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. - /// - /// The [`reference`](https://docs.adyen.com/api-explorer/#/transfers/latest/post/transfers__reqParam_reference) from the `/transfers` request. If you haven't provided any, Adyen generates a unique reference. - [DataMember(Name = "reference", IsRequired = false, EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransferView {\n"); - sb.Append(" CategoryData: ").Append(CategoryData).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferView); - } - - /// - /// Returns true if TransferView instances are equal - /// - /// Instance of TransferView to be compared - /// Boolean - public bool Equals(TransferView input) - { - if (input == null) - { - return false; - } - return - ( - this.CategoryData == input.CategoryData || - (this.CategoryData != null && - this.CategoryData.Equals(input.CategoryData)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CategoryData != null) - { - hashCode = (hashCode * 59) + this.CategoryData.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/UKLocalAccountIdentification.cs b/Adyen/Model/Transfers/UKLocalAccountIdentification.cs deleted file mode 100644 index b63c3fef2..000000000 --- a/Adyen/Model/Transfers/UKLocalAccountIdentification.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// UKLocalAccountIdentification - /// - [DataContract(Name = "UKLocalAccountIdentification")] - public partial class UKLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// **ukLocal** - /// - /// **ukLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UkLocal for value: ukLocal - /// - [EnumMember(Value = "ukLocal")] - UkLocal = 1 - - } - - - /// - /// **ukLocal** - /// - /// **ukLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UKLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The 8-digit bank account number, without separators or whitespace. (required). - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. (required). - /// **ukLocal** (required) (default to TypeEnum.UkLocal). - public UKLocalAccountIdentification(string accountNumber = default(string), string sortCode = default(string), TypeEnum type = TypeEnum.UkLocal) - { - this.AccountNumber = accountNumber; - this.SortCode = sortCode; - this.Type = type; - } - - /// - /// The 8-digit bank account number, without separators or whitespace. - /// - /// The 8-digit bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - /// - /// The 6-digit [sort code](https://en.wikipedia.org/wiki/Sort_code), without separators or whitespace. - [DataMember(Name = "sortCode", IsRequired = false, EmitDefaultValue = false)] - public string SortCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UKLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" SortCode: ").Append(SortCode).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UKLocalAccountIdentification); - } - - /// - /// Returns true if UKLocalAccountIdentification instances are equal - /// - /// Instance of UKLocalAccountIdentification to be compared - /// Boolean - public bool Equals(UKLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.SortCode == input.SortCode || - (this.SortCode != null && - this.SortCode.Equals(input.SortCode)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.SortCode != null) - { - hashCode = (hashCode * 59) + this.SortCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 8.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 8.", new [] { "AccountNumber" }); - } - - // SortCode (string) maxLength - if (this.SortCode != null && this.SortCode.Length > 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be less than 6.", new [] { "SortCode" }); - } - - // SortCode (string) minLength - if (this.SortCode != null && this.SortCode.Length < 6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SortCode, length must be greater than 6.", new [] { "SortCode" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/USLocalAccountIdentification.cs b/Adyen/Model/Transfers/USLocalAccountIdentification.cs deleted file mode 100644 index 52e188da1..000000000 --- a/Adyen/Model/Transfers/USLocalAccountIdentification.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// USLocalAccountIdentification - /// - [DataContract(Name = "USLocalAccountIdentification")] - public partial class USLocalAccountIdentification : IEquatable, IValidatableObject - { - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [JsonConverter(typeof(StringEnumConverter))] - public enum AccountTypeEnum - { - /// - /// Enum Checking for value: checking - /// - [EnumMember(Value = "checking")] - Checking = 1, - - /// - /// Enum Savings for value: savings - /// - [EnumMember(Value = "savings")] - Savings = 2 - - } - - - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - /// - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. - [DataMember(Name = "accountType", EmitDefaultValue = false)] - public AccountTypeEnum? AccountType { get; set; } - /// - /// **usLocal** - /// - /// **usLocal** - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum UsLocal for value: usLocal - /// - [EnumMember(Value = "usLocal")] - UsLocal = 1 - - } - - - /// - /// **usLocal** - /// - /// **usLocal** - [DataMember(Name = "type", IsRequired = false, EmitDefaultValue = false)] - public TypeEnum Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected USLocalAccountIdentification() { } - /// - /// Initializes a new instance of the class. - /// - /// The bank account number, without separators or whitespace. (required). - /// The bank account type. Possible values: **checking** or **savings**. Defaults to **checking**. (default to AccountTypeEnum.Checking). - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. (required). - /// **usLocal** (required) (default to TypeEnum.UsLocal). - public USLocalAccountIdentification(string accountNumber = default(string), AccountTypeEnum? accountType = AccountTypeEnum.Checking, string routingNumber = default(string), TypeEnum type = TypeEnum.UsLocal) - { - this.AccountNumber = accountNumber; - this.RoutingNumber = routingNumber; - this.Type = type; - this.AccountType = accountType; - } - - /// - /// The bank account number, without separators or whitespace. - /// - /// The bank account number, without separators or whitespace. - [DataMember(Name = "accountNumber", IsRequired = false, EmitDefaultValue = false)] - public string AccountNumber { get; set; } - - /// - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - /// - /// The 9-digit [routing number](https://en.wikipedia.org/wiki/ABA_routing_transit_number), without separators or whitespace. - [DataMember(Name = "routingNumber", IsRequired = false, EmitDefaultValue = false)] - public string RoutingNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class USLocalAccountIdentification {\n"); - sb.Append(" AccountNumber: ").Append(AccountNumber).Append("\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" RoutingNumber: ").Append(RoutingNumber).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as USLocalAccountIdentification); - } - - /// - /// Returns true if USLocalAccountIdentification instances are equal - /// - /// Instance of USLocalAccountIdentification to be compared - /// Boolean - public bool Equals(USLocalAccountIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.AccountType == input.AccountType || - this.AccountType.Equals(input.AccountType) - ) && - ( - this.RoutingNumber == input.RoutingNumber || - (this.RoutingNumber != null && - this.RoutingNumber.Equals(input.RoutingNumber)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - if (this.RoutingNumber != null) - { - hashCode = (hashCode * 59) + this.RoutingNumber.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // AccountNumber (string) maxLength - if (this.AccountNumber != null && this.AccountNumber.Length > 18) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be less than 18.", new [] { "AccountNumber" }); - } - - // AccountNumber (string) minLength - if (this.AccountNumber != null && this.AccountNumber.Length < 2) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for AccountNumber, length must be greater than 2.", new [] { "AccountNumber" }); - } - - // RoutingNumber (string) maxLength - if (this.RoutingNumber != null && this.RoutingNumber.Length > 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RoutingNumber, length must be less than 9.", new [] { "RoutingNumber" }); - } - - // RoutingNumber (string) minLength - if (this.RoutingNumber != null && this.RoutingNumber.Length < 9) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for RoutingNumber, length must be greater than 9.", new [] { "RoutingNumber" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Model/Transfers/UltimatePartyIdentification.cs b/Adyen/Model/Transfers/UltimatePartyIdentification.cs deleted file mode 100644 index 820f42a56..000000000 --- a/Adyen/Model/Transfers/UltimatePartyIdentification.cs +++ /dev/null @@ -1,272 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; - -namespace Adyen.Model.Transfers -{ - /// - /// UltimatePartyIdentification - /// - [DataContract(Name = "UltimatePartyIdentification")] - public partial class UltimatePartyIdentification : IEquatable, IValidatableObject - { - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - /// - /// Enum Individual for value: individual - /// - [EnumMember(Value = "individual")] - Individual = 1, - - /// - /// Enum Organization for value: organization - /// - [EnumMember(Value = "organization")] - Organization = 2, - - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown = 3 - - } - - - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - /// - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. - [DataMember(Name = "type", EmitDefaultValue = false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// address. - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**.. - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**.. - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**.. - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**.. - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`.. - /// The type of entity that owns the bank account or card. Possible values: **individual**, **organization**, or **unknown**. Required when `category` is **card**. In this case, the value must be **individual**. (default to TypeEnum.Unknown). - public UltimatePartyIdentification(Address address = default(Address), DateTime dateOfBirth = default(DateTime), string firstName = default(string), string fullName = default(string), string lastName = default(string), string reference = default(string), TypeEnum? type = TypeEnum.Unknown) - { - this.Address = address; - this.DateOfBirth = dateOfBirth; - this.FirstName = firstName; - this.FullName = fullName; - this.LastName = lastName; - this.Reference = reference; - this.Type = type; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = false)] - public Address Address { get; set; } - - /// - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. - /// - /// The date of birth of the individual in [ISO-8601](https://www.w3.org/TR/NOTE-datetime) format. For example, **YYYY-MM-DD**. Allowed only when `type` is **individual**. - [DataMember(Name = "dateOfBirth", EmitDefaultValue = false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime DateOfBirth { get; set; } - - /// - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - /// - /// The first name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - [DataMember(Name = "firstName", EmitDefaultValue = false)] - public string FirstName { get; set; } - - /// - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. - /// - /// The full name of the entity that owns the bank account or card. Supported characters: [a-z] [A-Z] [0-9] , . ; : - — / \\ + & ! ? @ ( ) \" ' and space. Required when `category` is **bank**. - [DataMember(Name = "fullName", EmitDefaultValue = false)] - public string FullName { get; set; } - - /// - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - /// - /// The last name of the individual. Supported characters: [a-z] [A-Z] - . / — and space. This parameter is: - Allowed only when `type` is **individual**. - Required when `category` is **card**. - [DataMember(Name = "lastName", EmitDefaultValue = false)] - public string LastName { get; set; } - - /// - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`. - /// - /// A unique reference to identify the party or counterparty involved in the transfer. For example, your client's unique wallet or payee ID. Required when you include `cardIdentification.storedPaymentMethodId`. - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UltimatePartyIdentification {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" DateOfBirth: ").Append(DateOfBirth).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" FullName: ").Append(FullName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UltimatePartyIdentification); - } - - /// - /// Returns true if UltimatePartyIdentification instances are equal - /// - /// Instance of UltimatePartyIdentification to be compared - /// Boolean - public bool Equals(UltimatePartyIdentification input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.DateOfBirth == input.DateOfBirth || - (this.DateOfBirth != null && - this.DateOfBirth.Equals(input.DateOfBirth)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.FullName == input.FullName || - (this.FullName != null && - this.FullName.Equals(input.FullName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.DateOfBirth != null) - { - hashCode = (hashCode * 59) + this.DateOfBirth.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.FullName != null) - { - hashCode = (hashCode * 59) + this.FullName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - return hashCode; - } - } - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - public IEnumerable Validate(ValidationContext validationContext) - { - // Reference (string) maxLength - if (this.Reference != null && this.Reference.Length > 150) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Reference, length must be less than 150.", new [] { "Reference" }); - } - - yield break; - } - } - -} diff --git a/Adyen/Service/ApiException.cs b/Adyen/Service/ApiException.cs deleted file mode 100644 index 5c687f468..000000000 --- a/Adyen/Service/ApiException.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using Adyen.Model; - -namespace Adyen.Service -{ - public class ApiException:Exception - { - public int StatusCode { get; set; } - - public ApiError ApiError{ get; set; } - - public ApiException(int statusCode,string message) - :base(message) - { - StatusCode = statusCode; - } - } -} diff --git a/Adyen/Service/BalanceControlService.cs b/Adyen/Service/BalanceControlService.cs deleted file mode 100644 index ef1052ff1..000000000 --- a/Adyen/Service/BalanceControlService.cs +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Adyen Balance Control API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalanceControl; - -namespace Adyen.Service -{ - /// - /// BalanceControlService Interface - /// - public interface IBalanceControlService - { - /// - /// Start a balance transfer - /// - /// - - /// - Additional request options. - /// . - [Obsolete("Deprecated since Adyen Balance Control API v1.")] - Model.BalanceControl.BalanceTransferResponse BalanceTransfer(BalanceTransferRequest balanceTransferRequest = default, RequestOptions requestOptions = default); - - /// - /// Start a balance transfer - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since Adyen Balance Control API v1.")] - Task BalanceTransferAsync(BalanceTransferRequest balanceTransferRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the BalanceControlService API endpoints - /// - public class BalanceControlService : AbstractService, IBalanceControlService - { - private readonly string _baseUrl; - - public BalanceControlService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://pal-test.adyen.com/pal/servlet/BalanceControl/v1"); - } - - [Obsolete("Deprecated since Adyen Balance Control API v1.")] - public Model.BalanceControl.BalanceTransferResponse BalanceTransfer(BalanceTransferRequest balanceTransferRequest = default, RequestOptions requestOptions = default) - { - return BalanceTransferAsync(balanceTransferRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since Adyen Balance Control API v1.")] - public async Task BalanceTransferAsync(BalanceTransferRequest balanceTransferRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/balanceTransfer"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(balanceTransferRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/AccountHoldersService.cs b/Adyen/Service/BalancePlatform/AccountHoldersService.cs deleted file mode 100644 index 0bb03115c..000000000 --- a/Adyen/Service/BalancePlatform/AccountHoldersService.cs +++ /dev/null @@ -1,233 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// AccountHoldersService Interface - /// - public interface IAccountHoldersService - { - /// - /// Create an account holder - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.AccountHolder CreateAccountHolder(AccountHolderInfo accountHolderInfo = default, RequestOptions requestOptions = default); - - /// - /// Create an account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateAccountHolderAsync(AccountHolderInfo accountHolderInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an account holder - /// - /// - The unique identifier of the account holder. - /// - Additional request options. - /// . - Model.BalancePlatform.AccountHolder GetAccountHolder(string id, RequestOptions requestOptions = default); - - /// - /// Get an account holder - /// - /// - The unique identifier of the account holder. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAccountHolderAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all balance accounts of an account holder - /// - /// - The unique identifier of the account holder. - /// - The number of items that you want to skip. - /// - The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// . - Model.BalancePlatform.PaginatedBalanceAccountsResponse GetAllBalanceAccountsOfAccountHolder(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get all balance accounts of an account holder - /// - /// - The unique identifier of the account holder. - /// - The number of items that you want to skip. - /// - The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllBalanceAccountsOfAccountHolderAsync(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all transaction rules for an account holder - /// - /// - The unique identifier of the account holder. - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForAccountHolder(string id, RequestOptions requestOptions = default); - - /// - /// Get all transaction rules for an account holder - /// - /// - The unique identifier of the account holder. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllTransactionRulesForAccountHolderAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a tax form - /// - /// - The unique identifier of the account holder. - /// - The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec** - /// - The tax year in YYYY format for the tax form you want to retrieve - /// - Additional request options. - /// . - Model.BalancePlatform.GetTaxFormResponse GetTaxForm(string id, string formType, int year, RequestOptions requestOptions = default); - - /// - /// Get a tax form - /// - /// - The unique identifier of the account holder. - /// - The type of tax form you want to retrieve. Accepted values are **US1099k** and **US1099nec** - /// - The tax year in YYYY format for the tax form you want to retrieve - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTaxFormAsync(string id, string formType, int year, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update an account holder - /// - /// - The unique identifier of the account holder. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.AccountHolder UpdateAccountHolder(string id, AccountHolderUpdateRequest accountHolderUpdateRequest = default, RequestOptions requestOptions = default); - - /// - /// Update an account holder - /// - /// - The unique identifier of the account holder. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateAccountHolderAsync(string id, AccountHolderUpdateRequest accountHolderUpdateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AccountHoldersService API endpoints - /// - public class AccountHoldersService : AbstractService, IAccountHoldersService - { - private readonly string _baseUrl; - - public AccountHoldersService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.AccountHolder CreateAccountHolder(AccountHolderInfo accountHolderInfo = default, RequestOptions requestOptions = default) - { - return CreateAccountHolderAsync(accountHolderInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateAccountHolderAsync(AccountHolderInfo accountHolderInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/accountHolders"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(accountHolderInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.AccountHolder GetAccountHolder(string id, RequestOptions requestOptions = default) - { - return GetAccountHolderAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAccountHolderAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/accountHolders/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.PaginatedBalanceAccountsResponse GetAllBalanceAccountsOfAccountHolder(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return GetAllBalanceAccountsOfAccountHolderAsync(id, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllBalanceAccountsOfAccountHolderAsync(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/accountHolders/{id}/balanceAccounts" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForAccountHolder(string id, RequestOptions requestOptions = default) - { - return GetAllTransactionRulesForAccountHolderAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllTransactionRulesForAccountHolderAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/accountHolders/{id}/transactionRules"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.GetTaxFormResponse GetTaxForm(string id, string formType, int year, RequestOptions requestOptions = default) - { - return GetTaxFormAsync(id, formType, year, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTaxFormAsync(string id, string formType, int year, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("formType", formType); - queryParams.Add("year", year.ToString()); - var endpoint = _baseUrl + $"/accountHolders/{id}/taxForms" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.AccountHolder UpdateAccountHolder(string id, AccountHolderUpdateRequest accountHolderUpdateRequest = default, RequestOptions requestOptions = default) - { - return UpdateAccountHolderAsync(id, accountHolderUpdateRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateAccountHolderAsync(string id, AccountHolderUpdateRequest accountHolderUpdateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/accountHolders/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(accountHolderUpdateRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/BalanceAccountsService.cs b/Adyen/Service/BalancePlatform/BalanceAccountsService.cs deleted file mode 100644 index 36438a81d..000000000 --- a/Adyen/Service/BalancePlatform/BalanceAccountsService.cs +++ /dev/null @@ -1,360 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// BalanceAccountsService Interface - /// - public interface IBalanceAccountsService - { - /// - /// Create a balance account - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.BalanceAccount CreateBalanceAccount(BalanceAccountInfo balanceAccountInfo = default, RequestOptions requestOptions = default); - - /// - /// Create a balance account - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateBalanceAccountAsync(BalanceAccountInfo balanceAccountInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a sweep - /// - /// - The unique identifier of the balance account. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.SweepConfigurationV2 CreateSweep(string balanceAccountId, CreateSweepConfigurationV2 createSweepConfigurationV2 = default, RequestOptions requestOptions = default); - - /// - /// Create a sweep - /// - /// - The unique identifier of the balance account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateSweepAsync(string balanceAccountId, CreateSweepConfigurationV2 createSweepConfigurationV2 = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a sweep - /// - /// - The unique identifier of the balance account. - /// - The unique identifier of the sweep. - /// - Additional request options. - void DeleteSweep(string balanceAccountId, string sweepId, RequestOptions requestOptions = default); - - /// - /// Delete a sweep - /// - /// - The unique identifier of the balance account. - /// - The unique identifier of the sweep. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeleteSweepAsync(string balanceAccountId, string sweepId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all sweeps for a balance account - /// - /// - The unique identifier of the balance account. - /// - The number of items that you want to skip. - /// - The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// . - Model.BalancePlatform.BalanceSweepConfigurationsResponse GetAllSweepsForBalanceAccount(string balanceAccountId, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get all sweeps for a balance account - /// - /// - The unique identifier of the balance account. - /// - The number of items that you want to skip. - /// - The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllSweepsForBalanceAccountAsync(string balanceAccountId, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all transaction rules for a balance account - /// - /// - The unique identifier of the balance account. - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForBalanceAccount(string id, RequestOptions requestOptions = default); - - /// - /// Get all transaction rules for a balance account - /// - /// - The unique identifier of the balance account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllTransactionRulesForBalanceAccountAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a balance account - /// - /// - The unique identifier of the balance account. - /// - Additional request options. - /// . - Model.BalancePlatform.BalanceAccount GetBalanceAccount(string id, RequestOptions requestOptions = default); - - /// - /// Get a balance account - /// - /// - The unique identifier of the balance account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetBalanceAccountAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get payment instruments linked to a balance account - /// - /// - The unique identifier of the balance account. - /// - The number of items that you want to skip. - /// - The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. - /// - The status of the payment instruments that you want to get. By default, the response includes payment instruments with any status. - /// - Additional request options. - /// . - Model.BalancePlatform.PaginatedPaymentInstrumentsResponse GetPaymentInstrumentsLinkedToBalanceAccount(string id, int? offset = default, int? limit = default, string status = default, RequestOptions requestOptions = default); - - /// - /// Get payment instruments linked to a balance account - /// - /// - The unique identifier of the balance account. - /// - The number of items that you want to skip. - /// - The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. - /// - The status of the payment instruments that you want to get. By default, the response includes payment instruments with any status. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPaymentInstrumentsLinkedToBalanceAccountAsync(string id, int? offset = default, int? limit = default, string status = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a sweep - /// - /// - The unique identifier of the balance account. - /// - The unique identifier of the sweep. - /// - Additional request options. - /// . - Model.BalancePlatform.SweepConfigurationV2 GetSweep(string balanceAccountId, string sweepId, RequestOptions requestOptions = default); - - /// - /// Get a sweep - /// - /// - The unique identifier of the balance account. - /// - The unique identifier of the sweep. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetSweepAsync(string balanceAccountId, string sweepId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a balance account - /// - /// - The unique identifier of the balance account. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.BalanceAccount UpdateBalanceAccount(string id, BalanceAccountUpdateRequest balanceAccountUpdateRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a balance account - /// - /// - The unique identifier of the balance account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateBalanceAccountAsync(string id, BalanceAccountUpdateRequest balanceAccountUpdateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a sweep - /// - /// - The unique identifier of the balance account. - /// - The unique identifier of the sweep. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.SweepConfigurationV2 UpdateSweep(string balanceAccountId, string sweepId, UpdateSweepConfigurationV2 updateSweepConfigurationV2 = default, RequestOptions requestOptions = default); - - /// - /// Update a sweep - /// - /// - The unique identifier of the balance account. - /// - The unique identifier of the sweep. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateSweepAsync(string balanceAccountId, string sweepId, UpdateSweepConfigurationV2 updateSweepConfigurationV2 = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the BalanceAccountsService API endpoints - /// - public class BalanceAccountsService : AbstractService, IBalanceAccountsService - { - private readonly string _baseUrl; - - public BalanceAccountsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.BalanceAccount CreateBalanceAccount(BalanceAccountInfo balanceAccountInfo = default, RequestOptions requestOptions = default) - { - return CreateBalanceAccountAsync(balanceAccountInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateBalanceAccountAsync(BalanceAccountInfo balanceAccountInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/balanceAccounts"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(balanceAccountInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.SweepConfigurationV2 CreateSweep(string balanceAccountId, CreateSweepConfigurationV2 createSweepConfigurationV2 = default, RequestOptions requestOptions = default) - { - return CreateSweepAsync(balanceAccountId, createSweepConfigurationV2, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateSweepAsync(string balanceAccountId, CreateSweepConfigurationV2 createSweepConfigurationV2 = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balanceAccounts/{balanceAccountId}/sweeps"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createSweepConfigurationV2.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public void DeleteSweep(string balanceAccountId, string sweepId, RequestOptions requestOptions = default) - { - DeleteSweepAsync(balanceAccountId, sweepId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteSweepAsync(string balanceAccountId, string sweepId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.BalanceSweepConfigurationsResponse GetAllSweepsForBalanceAccount(string balanceAccountId, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return GetAllSweepsForBalanceAccountAsync(balanceAccountId, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllSweepsForBalanceAccountAsync(string balanceAccountId, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/balanceAccounts/{balanceAccountId}/sweeps" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForBalanceAccount(string id, RequestOptions requestOptions = default) - { - return GetAllTransactionRulesForBalanceAccountAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllTransactionRulesForBalanceAccountAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balanceAccounts/{id}/transactionRules"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.BalanceAccount GetBalanceAccount(string id, RequestOptions requestOptions = default) - { - return GetBalanceAccountAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetBalanceAccountAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balanceAccounts/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.PaginatedPaymentInstrumentsResponse GetPaymentInstrumentsLinkedToBalanceAccount(string id, int? offset = default, int? limit = default, string status = default, RequestOptions requestOptions = default) - { - return GetPaymentInstrumentsLinkedToBalanceAccountAsync(id, offset, limit, status, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPaymentInstrumentsLinkedToBalanceAccountAsync(string id, int? offset = default, int? limit = default, string status = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - if (status != null) queryParams.Add("status", status); - var endpoint = _baseUrl + $"/balanceAccounts/{id}/paymentInstruments" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.SweepConfigurationV2 GetSweep(string balanceAccountId, string sweepId, RequestOptions requestOptions = default) - { - return GetSweepAsync(balanceAccountId, sweepId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetSweepAsync(string balanceAccountId, string sweepId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.BalanceAccount UpdateBalanceAccount(string id, BalanceAccountUpdateRequest balanceAccountUpdateRequest = default, RequestOptions requestOptions = default) - { - return UpdateBalanceAccountAsync(id, balanceAccountUpdateRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateBalanceAccountAsync(string id, BalanceAccountUpdateRequest balanceAccountUpdateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balanceAccounts/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(balanceAccountUpdateRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.SweepConfigurationV2 UpdateSweep(string balanceAccountId, string sweepId, UpdateSweepConfigurationV2 updateSweepConfigurationV2 = default, RequestOptions requestOptions = default) - { - return UpdateSweepAsync(balanceAccountId, sweepId, updateSweepConfigurationV2, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateSweepAsync(string balanceAccountId, string sweepId, UpdateSweepConfigurationV2 updateSweepConfigurationV2 = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateSweepConfigurationV2.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/BankAccountValidationService.cs b/Adyen/Service/BalancePlatform/BankAccountValidationService.cs deleted file mode 100644 index 0eb5228d1..000000000 --- a/Adyen/Service/BalancePlatform/BankAccountValidationService.cs +++ /dev/null @@ -1,68 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// BankAccountValidationService Interface - /// - public interface IBankAccountValidationService - { - /// - /// Validate a bank account - /// - /// - - /// - Additional request options. - void ValidateBankAccountIdentification(BankAccountIdentificationValidationRequest bankAccountIdentificationValidationRequest = default, RequestOptions requestOptions = default); - - /// - /// Validate a bank account - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task ValidateBankAccountIdentificationAsync(BankAccountIdentificationValidationRequest bankAccountIdentificationValidationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the BankAccountValidationService API endpoints - /// - public class BankAccountValidationService : AbstractService, IBankAccountValidationService - { - private readonly string _baseUrl; - - public BankAccountValidationService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public void ValidateBankAccountIdentification(BankAccountIdentificationValidationRequest bankAccountIdentificationValidationRequest = default, RequestOptions requestOptions = default) - { - ValidateBankAccountIdentificationAsync(bankAccountIdentificationValidationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ValidateBankAccountIdentificationAsync(BankAccountIdentificationValidationRequest bankAccountIdentificationValidationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/validateBankAccountIdentification"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(bankAccountIdentificationValidationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/CardOrdersService.cs b/Adyen/Service/BalancePlatform/CardOrdersService.cs deleted file mode 100644 index 9db6ccf97..000000000 --- a/Adyen/Service/BalancePlatform/CardOrdersService.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// CardOrdersService Interface - /// - public interface ICardOrdersService - { - /// - /// Get card order items - /// - /// - The unique identifier of the card order. - /// - Specifies the position of an element in a list of card orders. The response includes a list of card order items that starts at the specified offset. **Default:** 0, which means that the response contains all the elements in the list of card order items. - /// - The number of card order items returned per page. **Default:** 10. - /// - Additional request options. - /// . - Model.BalancePlatform.PaginatedGetCardOrderItemResponse GetCardOrderItems(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get card order items - /// - /// - The unique identifier of the card order. - /// - Specifies the position of an element in a list of card orders. The response includes a list of card order items that starts at the specified offset. **Default:** 0, which means that the response contains all the elements in the list of card order items. - /// - The number of card order items returned per page. **Default:** 10. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetCardOrderItemsAsync(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of card orders - /// - /// - The unique identifier of the card order. - /// - The unique identifier of the card manufacturer profile. - /// - The status of the card order. - /// - The unique code of the card manufacturer profile. Possible values: **mcmaestro**, **mc**, **visa**, **mcdebit**. - /// - Only include card orders that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - Only include card orders that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - Only include card orders that have been locked on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - Only include card orders that have been locked on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - The service center at which the card is issued. The value is case-sensitive. - /// - Specifies the position of an element in a list of card orders. The response includes a list of card orders that starts at the specified offset. **Default:** 0, which means that the response contains all the elements in the list of card orders. - /// - The number of card orders returned per page. **Default:** 10. - /// - Additional request options. - /// . - Model.BalancePlatform.PaginatedGetCardOrderResponse ListCardOrders(string id = default, string cardManufacturingProfileId = default, string status = default, string txVariantCode = default, DateTime? createdSince = default, DateTime? createdUntil = default, DateTime? lockedSince = default, DateTime? lockedUntil = default, string serviceCenter = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get a list of card orders - /// - /// - The unique identifier of the card order. - /// - The unique identifier of the card manufacturer profile. - /// - The status of the card order. - /// - The unique code of the card manufacturer profile. Possible values: **mcmaestro**, **mc**, **visa**, **mcdebit**. - /// - Only include card orders that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - Only include card orders that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - Only include card orders that have been locked on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - Only include card orders that have been locked on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - The service center at which the card is issued. The value is case-sensitive. - /// - Specifies the position of an element in a list of card orders. The response includes a list of card orders that starts at the specified offset. **Default:** 0, which means that the response contains all the elements in the list of card orders. - /// - The number of card orders returned per page. **Default:** 10. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListCardOrdersAsync(string id = default, string cardManufacturingProfileId = default, string status = default, string txVariantCode = default, DateTime? createdSince = default, DateTime? createdUntil = default, DateTime? lockedSince = default, DateTime? lockedUntil = default, string serviceCenter = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the CardOrdersService API endpoints - /// - public class CardOrdersService : AbstractService, ICardOrdersService - { - private readonly string _baseUrl; - - public CardOrdersService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.PaginatedGetCardOrderItemResponse GetCardOrderItems(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return GetCardOrderItemsAsync(id, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetCardOrderItemsAsync(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/cardorders/{id}/items" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.PaginatedGetCardOrderResponse ListCardOrders(string id = default, string cardManufacturingProfileId = default, string status = default, string txVariantCode = default, DateTime? createdSince = default, DateTime? createdUntil = default, DateTime? lockedSince = default, DateTime? lockedUntil = default, string serviceCenter = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return ListCardOrdersAsync(id, cardManufacturingProfileId, status, txVariantCode, createdSince, createdUntil, lockedSince, lockedUntil, serviceCenter, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListCardOrdersAsync(string id = default, string cardManufacturingProfileId = default, string status = default, string txVariantCode = default, DateTime? createdSince = default, DateTime? createdUntil = default, DateTime? lockedSince = default, DateTime? lockedUntil = default, string serviceCenter = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (id != null) queryParams.Add("id", id); - if (cardManufacturingProfileId != null) queryParams.Add("cardManufacturingProfileId", cardManufacturingProfileId); - if (status != null) queryParams.Add("status", status); - if (txVariantCode != null) queryParams.Add("txVariantCode", txVariantCode); - if (createdSince != null) queryParams.Add("createdSince", createdSince.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")); - if (createdUntil != null) queryParams.Add("createdUntil", createdUntil.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")); - if (lockedSince != null) queryParams.Add("lockedSince", lockedSince.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")); - if (lockedUntil != null) queryParams.Add("lockedUntil", lockedUntil.Value.ToString("yyyy-MM-ddTHH:mm:ssZ")); - if (serviceCenter != null) queryParams.Add("serviceCenter", serviceCenter); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + "/cardorders" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/GrantAccountsService.cs b/Adyen/Service/BalancePlatform/GrantAccountsService.cs deleted file mode 100644 index 28bbcbc56..000000000 --- a/Adyen/Service/BalancePlatform/GrantAccountsService.cs +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// GrantAccountsService Interface - /// - public interface IGrantAccountsService - { - /// - /// Get a grant account - /// - /// - The unique identifier of the grant account. - /// - Additional request options. - /// . - [Obsolete("Deprecated since Configuration API v2. Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead.")] - Model.BalancePlatform.CapitalGrantAccount GetGrantAccount(string id, RequestOptions requestOptions = default); - - /// - /// Get a grant account - /// - /// - The unique identifier of the grant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since Configuration API v2. Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead.")] - Task GetGrantAccountAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the GrantAccountsService API endpoints - /// - public class GrantAccountsService : AbstractService, IGrantAccountsService - { - private readonly string _baseUrl; - - public GrantAccountsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - [Obsolete("Deprecated since Configuration API v2. Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead.")] - public Model.BalancePlatform.CapitalGrantAccount GetGrantAccount(string id, RequestOptions requestOptions = default) - { - return GetGrantAccountAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since Configuration API v2. Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead.")] - public async Task GetGrantAccountAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/grantAccounts/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/GrantOffersService.cs b/Adyen/Service/BalancePlatform/GrantOffersService.cs deleted file mode 100644 index 347f55d5d..000000000 --- a/Adyen/Service/BalancePlatform/GrantOffersService.cs +++ /dev/null @@ -1,110 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// GrantOffersService Interface - /// - public interface IGrantOffersService - { - /// - /// Get all available grant offers - /// - /// - The unique identifier of the grant account. - /// - Additional request options. - /// . - [Obsolete("Deprecated since Configuration API v2. Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead.")] - Model.BalancePlatform.GrantOffers GetAllAvailableGrantOffers(string accountHolderId, RequestOptions requestOptions = default); - - /// - /// Get all available grant offers - /// - /// - The unique identifier of the grant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since Configuration API v2. Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead.")] - Task GetAllAvailableGrantOffersAsync(string accountHolderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a grant offer - /// - /// - The unique identifier of the grant offer. - /// - Additional request options. - /// . - [Obsolete("Deprecated since Configuration API v2. Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead.")] - Model.BalancePlatform.GrantOffer GetGrantOffer(string grantOfferId, RequestOptions requestOptions = default); - - /// - /// Get a grant offer - /// - /// - The unique identifier of the grant offer. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since Configuration API v2. Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead.")] - Task GetGrantOfferAsync(string grantOfferId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the GrantOffersService API endpoints - /// - public class GrantOffersService : AbstractService, IGrantOffersService - { - private readonly string _baseUrl; - - public GrantOffersService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - [Obsolete("Deprecated since Configuration API v2. Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead.")] - public Model.BalancePlatform.GrantOffers GetAllAvailableGrantOffers(string accountHolderId, RequestOptions requestOptions = default) - { - return GetAllAvailableGrantOffersAsync(accountHolderId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since Configuration API v2. Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead.")] - public async Task GetAllAvailableGrantOffersAsync(string accountHolderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("accountHolderId", accountHolderId); - var endpoint = _baseUrl + "/grantOffers" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("Deprecated since Configuration API v2. Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead.")] - public Model.BalancePlatform.GrantOffer GetGrantOffer(string grantOfferId, RequestOptions requestOptions = default) - { - return GetGrantOfferAsync(grantOfferId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since Configuration API v2. Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead.")] - public async Task GetGrantOfferAsync(string grantOfferId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/grantOffers/{grantOfferId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/ManageCardPINService.cs b/Adyen/Service/BalancePlatform/ManageCardPINService.cs deleted file mode 100644 index 01b16f43d..000000000 --- a/Adyen/Service/BalancePlatform/ManageCardPINService.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// ManageCardPINService Interface - /// - public interface IManageCardPINService - { - /// - /// Change a card PIN - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.PinChangeResponse ChangeCardPin(PinChangeRequest pinChangeRequest = default, RequestOptions requestOptions = default); - - /// - /// Change a card PIN - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ChangeCardPinAsync(PinChangeRequest pinChangeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an RSA public key - /// - /// - The purpose of the public key. Possible values: **pinChange**, **pinReveal**, **panReveal**. Default value: **pinReveal**. - /// - The encoding format of public key. Possible values: **jwk**, **pem**. Default value: **pem**. - /// - Additional request options. - /// . - Model.BalancePlatform.PublicKeyResponse PublicKey(string purpose = default, string format = default, RequestOptions requestOptions = default); - - /// - /// Get an RSA public key - /// - /// - The purpose of the public key. Possible values: **pinChange**, **pinReveal**, **panReveal**. Default value: **pinReveal**. - /// - The encoding format of public key. Possible values: **jwk**, **pem**. Default value: **pem**. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task PublicKeyAsync(string purpose = default, string format = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Reveal a card PIN - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.RevealPinResponse RevealCardPin(RevealPinRequest revealPinRequest = default, RequestOptions requestOptions = default); - - /// - /// Reveal a card PIN - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RevealCardPinAsync(RevealPinRequest revealPinRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the ManageCardPINService API endpoints - /// - public class ManageCardPINService : AbstractService, IManageCardPINService - { - private readonly string _baseUrl; - - public ManageCardPINService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.PinChangeResponse ChangeCardPin(PinChangeRequest pinChangeRequest = default, RequestOptions requestOptions = default) - { - return ChangeCardPinAsync(pinChangeRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ChangeCardPinAsync(PinChangeRequest pinChangeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/pins/change"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(pinChangeRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.PublicKeyResponse PublicKey(string purpose = default, string format = default, RequestOptions requestOptions = default) - { - return PublicKeyAsync(purpose, format, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task PublicKeyAsync(string purpose = default, string format = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (purpose != null) queryParams.Add("purpose", purpose); - if (format != null) queryParams.Add("format", format); - var endpoint = _baseUrl + "/publicKey" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.RevealPinResponse RevealCardPin(RevealPinRequest revealPinRequest = default, RequestOptions requestOptions = default) - { - return RevealCardPinAsync(revealPinRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RevealCardPinAsync(RevealPinRequest revealPinRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/pins/reveal"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(revealPinRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/ManageSCADevicesService.cs b/Adyen/Service/BalancePlatform/ManageSCADevicesService.cs deleted file mode 100644 index be9278d7a..000000000 --- a/Adyen/Service/BalancePlatform/ManageSCADevicesService.cs +++ /dev/null @@ -1,233 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// ManageSCADevicesService Interface - /// - public interface IManageSCADevicesService - { - /// - /// Complete an association between an SCA device and a resource - /// - /// - The unique identifier of the SCA device that you are associating with a resource. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.AssociationFinaliseResponse CompleteAssociationBetweenScaDeviceAndResource(string deviceId, AssociationFinaliseRequest associationFinaliseRequest = default, RequestOptions requestOptions = default); - - /// - /// Complete an association between an SCA device and a resource - /// - /// - The unique identifier of the SCA device that you are associating with a resource. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CompleteAssociationBetweenScaDeviceAndResourceAsync(string deviceId, AssociationFinaliseRequest associationFinaliseRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Complete the registration of an SCA device - /// - /// - The unique identifier of the SCA device. You obtain this `id` in the response of a POST&nbsp;[/registeredDevices](https://docs.adyen.com/api-explorer/balanceplatform/2/post/registeredDevices#responses-200-id) request. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.RegisterSCAFinalResponse CompleteRegistrationOfScaDevice(string id, RegisterSCARequest registerSCARequest = default, RequestOptions requestOptions = default); - - /// - /// Complete the registration of an SCA device - /// - /// - The unique identifier of the SCA device. You obtain this `id` in the response of a POST&nbsp;[/registeredDevices](https://docs.adyen.com/api-explorer/balanceplatform/2/post/registeredDevices#responses-200-id) request. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CompleteRegistrationOfScaDeviceAsync(string id, RegisterSCARequest registerSCARequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a registration of an SCA device - /// - /// - The unique identifier of the SCA device. - /// - The unique identifier of the payment instrument linked to the SCA device. - /// - Additional request options. - void DeleteRegistrationOfScaDevice(string id, string paymentInstrumentId, RequestOptions requestOptions = default); - - /// - /// Delete a registration of an SCA device - /// - /// - The unique identifier of the SCA device. - /// - The unique identifier of the payment instrument linked to the SCA device. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeleteRegistrationOfScaDeviceAsync(string id, string paymentInstrumentId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Initiate an association between an SCA device and a resource - /// - /// - The unique identifier of the SCA device that you are associating with a resource. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.AssociationInitiateResponse InitiateAssociationBetweenScaDeviceAndResource(string deviceId, AssociationInitiateRequest associationInitiateRequest = default, RequestOptions requestOptions = default); - - /// - /// Initiate an association between an SCA device and a resource - /// - /// - The unique identifier of the SCA device that you are associating with a resource. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task InitiateAssociationBetweenScaDeviceAndResourceAsync(string deviceId, AssociationInitiateRequest associationInitiateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Initiate the registration of an SCA device - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.RegisterSCAResponse InitiateRegistrationOfScaDevice(RegisterSCARequest registerSCARequest = default, RequestOptions requestOptions = default); - - /// - /// Initiate the registration of an SCA device - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task InitiateRegistrationOfScaDeviceAsync(RegisterSCARequest registerSCARequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of registered SCA devices - /// - /// - The unique identifier of a payment instrument. It limits the returned list to SCA devices associated to this payment instrument. - /// - The index of the page to retrieve. The index of the first page is 0 (zero). Default: 0. - /// - The number of items to have on a page. Default: 20. Maximum: 100. - /// - Additional request options. - /// . - Model.BalancePlatform.SearchRegisteredDevicesResponse ListRegisteredScaDevices(string paymentInstrumentId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// Get a list of registered SCA devices - /// - /// - The unique identifier of a payment instrument. It limits the returned list to SCA devices associated to this payment instrument. - /// - The index of the page to retrieve. The index of the first page is 0 (zero). Default: 0. - /// - The number of items to have on a page. Default: 20. Maximum: 100. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListRegisteredScaDevicesAsync(string paymentInstrumentId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the ManageSCADevicesService API endpoints - /// - public class ManageSCADevicesService : AbstractService, IManageSCADevicesService - { - private readonly string _baseUrl; - - public ManageSCADevicesService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.AssociationFinaliseResponse CompleteAssociationBetweenScaDeviceAndResource(string deviceId, AssociationFinaliseRequest associationFinaliseRequest = default, RequestOptions requestOptions = default) - { - return CompleteAssociationBetweenScaDeviceAndResourceAsync(deviceId, associationFinaliseRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CompleteAssociationBetweenScaDeviceAndResourceAsync(string deviceId, AssociationFinaliseRequest associationFinaliseRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/registeredDevices/{deviceId}/associations"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(associationFinaliseRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.RegisterSCAFinalResponse CompleteRegistrationOfScaDevice(string id, RegisterSCARequest registerSCARequest = default, RequestOptions requestOptions = default) - { - return CompleteRegistrationOfScaDeviceAsync(id, registerSCARequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CompleteRegistrationOfScaDeviceAsync(string id, RegisterSCARequest registerSCARequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/registeredDevices/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(registerSCARequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public void DeleteRegistrationOfScaDevice(string id, string paymentInstrumentId, RequestOptions requestOptions = default) - { - DeleteRegistrationOfScaDeviceAsync(id, paymentInstrumentId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteRegistrationOfScaDeviceAsync(string id, string paymentInstrumentId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("paymentInstrumentId", paymentInstrumentId); - var endpoint = _baseUrl + $"/registeredDevices/{id}" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.AssociationInitiateResponse InitiateAssociationBetweenScaDeviceAndResource(string deviceId, AssociationInitiateRequest associationInitiateRequest = default, RequestOptions requestOptions = default) - { - return InitiateAssociationBetweenScaDeviceAndResourceAsync(deviceId, associationInitiateRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task InitiateAssociationBetweenScaDeviceAndResourceAsync(string deviceId, AssociationInitiateRequest associationInitiateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/registeredDevices/{deviceId}/associations"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(associationInitiateRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.RegisterSCAResponse InitiateRegistrationOfScaDevice(RegisterSCARequest registerSCARequest = default, RequestOptions requestOptions = default) - { - return InitiateRegistrationOfScaDeviceAsync(registerSCARequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task InitiateRegistrationOfScaDeviceAsync(RegisterSCARequest registerSCARequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/registeredDevices"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(registerSCARequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.SearchRegisteredDevicesResponse ListRegisteredScaDevices(string paymentInstrumentId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListRegisteredScaDevicesAsync(paymentInstrumentId, pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListRegisteredScaDevicesAsync(string paymentInstrumentId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("paymentInstrumentId", paymentInstrumentId); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + "/registeredDevices" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/NetworkTokensService.cs b/Adyen/Service/BalancePlatform/NetworkTokensService.cs deleted file mode 100644 index bc270a550..000000000 --- a/Adyen/Service/BalancePlatform/NetworkTokensService.cs +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// NetworkTokensService Interface - /// - public interface INetworkTokensService - { - /// - /// Get a network token - /// - /// - The unique identifier of the network token. - /// - Additional request options. - /// . - Model.BalancePlatform.GetNetworkTokenResponse GetNetworkToken(string networkTokenId, RequestOptions requestOptions = default); - - /// - /// Get a network token - /// - /// - The unique identifier of the network token. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetNetworkTokenAsync(string networkTokenId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a network token - /// - /// - The unique identifier of the network token. - /// - - /// - Additional request options. - void UpdateNetworkToken(string networkTokenId, UpdateNetworkTokenRequest updateNetworkTokenRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a network token - /// - /// - The unique identifier of the network token. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task UpdateNetworkTokenAsync(string networkTokenId, UpdateNetworkTokenRequest updateNetworkTokenRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the NetworkTokensService API endpoints - /// - public class NetworkTokensService : AbstractService, INetworkTokensService - { - private readonly string _baseUrl; - - public NetworkTokensService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.GetNetworkTokenResponse GetNetworkToken(string networkTokenId, RequestOptions requestOptions = default) - { - return GetNetworkTokenAsync(networkTokenId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetNetworkTokenAsync(string networkTokenId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/networkTokens/{networkTokenId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public void UpdateNetworkToken(string networkTokenId, UpdateNetworkTokenRequest updateNetworkTokenRequest = default, RequestOptions requestOptions = default) - { - UpdateNetworkTokenAsync(networkTokenId, updateNetworkTokenRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateNetworkTokenAsync(string networkTokenId, UpdateNetworkTokenRequest updateNetworkTokenRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/networkTokens/{networkTokenId}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(updateNetworkTokenRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/PaymentInstrumentGroupsService.cs b/Adyen/Service/BalancePlatform/PaymentInstrumentGroupsService.cs deleted file mode 100644 index 9ec50ed2a..000000000 --- a/Adyen/Service/BalancePlatform/PaymentInstrumentGroupsService.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// PaymentInstrumentGroupsService Interface - /// - public interface IPaymentInstrumentGroupsService - { - /// - /// Create a payment instrument group - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.PaymentInstrumentGroup CreatePaymentInstrumentGroup(PaymentInstrumentGroupInfo paymentInstrumentGroupInfo = default, RequestOptions requestOptions = default); - - /// - /// Create a payment instrument group - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreatePaymentInstrumentGroupAsync(PaymentInstrumentGroupInfo paymentInstrumentGroupInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all transaction rules for a payment instrument group - /// - /// - The unique identifier of the payment instrument group. - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForPaymentInstrumentGroup(string id, RequestOptions requestOptions = default); - - /// - /// Get all transaction rules for a payment instrument group - /// - /// - The unique identifier of the payment instrument group. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllTransactionRulesForPaymentInstrumentGroupAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a payment instrument group - /// - /// - The unique identifier of the payment instrument group. - /// - Additional request options. - /// . - Model.BalancePlatform.PaymentInstrumentGroup GetPaymentInstrumentGroup(string id, RequestOptions requestOptions = default); - - /// - /// Get a payment instrument group - /// - /// - The unique identifier of the payment instrument group. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPaymentInstrumentGroupAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PaymentInstrumentGroupsService API endpoints - /// - public class PaymentInstrumentGroupsService : AbstractService, IPaymentInstrumentGroupsService - { - private readonly string _baseUrl; - - public PaymentInstrumentGroupsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.PaymentInstrumentGroup CreatePaymentInstrumentGroup(PaymentInstrumentGroupInfo paymentInstrumentGroupInfo = default, RequestOptions requestOptions = default) - { - return CreatePaymentInstrumentGroupAsync(paymentInstrumentGroupInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreatePaymentInstrumentGroupAsync(PaymentInstrumentGroupInfo paymentInstrumentGroupInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/paymentInstrumentGroups"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentInstrumentGroupInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForPaymentInstrumentGroup(string id, RequestOptions requestOptions = default) - { - return GetAllTransactionRulesForPaymentInstrumentGroupAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllTransactionRulesForPaymentInstrumentGroupAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentInstrumentGroups/{id}/transactionRules"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.PaymentInstrumentGroup GetPaymentInstrumentGroup(string id, RequestOptions requestOptions = default) - { - return GetPaymentInstrumentGroupAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPaymentInstrumentGroupAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentInstrumentGroups/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/PaymentInstrumentsService.cs b/Adyen/Service/BalancePlatform/PaymentInstrumentsService.cs deleted file mode 100644 index fa5fb9f7c..000000000 --- a/Adyen/Service/BalancePlatform/PaymentInstrumentsService.cs +++ /dev/null @@ -1,246 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// PaymentInstrumentsService Interface - /// - public interface IPaymentInstrumentsService - { - /// - /// Create a payment instrument - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.PaymentInstrument CreatePaymentInstrument(PaymentInstrumentInfo paymentInstrumentInfo = default, RequestOptions requestOptions = default); - - /// - /// Create a payment instrument - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreatePaymentInstrumentAsync(PaymentInstrumentInfo paymentInstrumentInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all transaction rules for a payment instrument - /// - /// - The unique identifier of the payment instrument. - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForPaymentInstrument(string id, RequestOptions requestOptions = default); - - /// - /// Get all transaction rules for a payment instrument - /// - /// - The unique identifier of the payment instrument. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllTransactionRulesForPaymentInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the PAN of a payment instrument - /// - /// - The unique identifier of the payment instrument. - /// - Additional request options. - /// . - Model.BalancePlatform.PaymentInstrumentRevealInfo GetPanOfPaymentInstrument(string id, RequestOptions requestOptions = default); - - /// - /// Get the PAN of a payment instrument - /// - /// - The unique identifier of the payment instrument. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPanOfPaymentInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a payment instrument - /// - /// - The unique identifier of the payment instrument. - /// - Additional request options. - /// . - Model.BalancePlatform.PaymentInstrument GetPaymentInstrument(string id, RequestOptions requestOptions = default); - - /// - /// Get a payment instrument - /// - /// - The unique identifier of the payment instrument. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPaymentInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// List network tokens - /// - /// - The unique identifier of the payment instrument. - /// - Additional request options. - /// . - Model.BalancePlatform.ListNetworkTokensResponse ListNetworkTokens(string id, RequestOptions requestOptions = default); - - /// - /// List network tokens - /// - /// - The unique identifier of the payment instrument. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListNetworkTokensAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Reveal the data of a payment instrument - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.PaymentInstrumentRevealResponse RevealDataOfPaymentInstrument(PaymentInstrumentRevealRequest paymentInstrumentRevealRequest = default, RequestOptions requestOptions = default); - - /// - /// Reveal the data of a payment instrument - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RevealDataOfPaymentInstrumentAsync(PaymentInstrumentRevealRequest paymentInstrumentRevealRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a payment instrument - /// - /// - The unique identifier of the payment instrument. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.UpdatePaymentInstrument UpdatePaymentInstrument(string id, PaymentInstrumentUpdateRequest paymentInstrumentUpdateRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a payment instrument - /// - /// - The unique identifier of the payment instrument. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdatePaymentInstrumentAsync(string id, PaymentInstrumentUpdateRequest paymentInstrumentUpdateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PaymentInstrumentsService API endpoints - /// - public class PaymentInstrumentsService : AbstractService, IPaymentInstrumentsService - { - private readonly string _baseUrl; - - public PaymentInstrumentsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.PaymentInstrument CreatePaymentInstrument(PaymentInstrumentInfo paymentInstrumentInfo = default, RequestOptions requestOptions = default) - { - return CreatePaymentInstrumentAsync(paymentInstrumentInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreatePaymentInstrumentAsync(PaymentInstrumentInfo paymentInstrumentInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/paymentInstruments"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentInstrumentInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForPaymentInstrument(string id, RequestOptions requestOptions = default) - { - return GetAllTransactionRulesForPaymentInstrumentAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllTransactionRulesForPaymentInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentInstruments/{id}/transactionRules"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.PaymentInstrumentRevealInfo GetPanOfPaymentInstrument(string id, RequestOptions requestOptions = default) - { - return GetPanOfPaymentInstrumentAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPanOfPaymentInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentInstruments/{id}/reveal"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.PaymentInstrument GetPaymentInstrument(string id, RequestOptions requestOptions = default) - { - return GetPaymentInstrumentAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPaymentInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentInstruments/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.ListNetworkTokensResponse ListNetworkTokens(string id, RequestOptions requestOptions = default) - { - return ListNetworkTokensAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListNetworkTokensAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentInstruments/{id}/networkTokens"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.PaymentInstrumentRevealResponse RevealDataOfPaymentInstrument(PaymentInstrumentRevealRequest paymentInstrumentRevealRequest = default, RequestOptions requestOptions = default) - { - return RevealDataOfPaymentInstrumentAsync(paymentInstrumentRevealRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RevealDataOfPaymentInstrumentAsync(PaymentInstrumentRevealRequest paymentInstrumentRevealRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/paymentInstruments/reveal"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentInstrumentRevealRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.UpdatePaymentInstrument UpdatePaymentInstrument(string id, PaymentInstrumentUpdateRequest paymentInstrumentUpdateRequest = default, RequestOptions requestOptions = default) - { - return UpdatePaymentInstrumentAsync(id, paymentInstrumentUpdateRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdatePaymentInstrumentAsync(string id, PaymentInstrumentUpdateRequest paymentInstrumentUpdateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentInstruments/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentInstrumentUpdateRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/PlatformService.cs b/Adyen/Service/BalancePlatform/PlatformService.cs deleted file mode 100644 index a1209432d..000000000 --- a/Adyen/Service/BalancePlatform/PlatformService.cs +++ /dev/null @@ -1,136 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// PlatformService Interface - /// - public interface IPlatformService - { - /// - /// Get all account holders under a balance platform - /// - /// - The unique identifier of the balance platform. - /// - The number of items that you want to skip. - /// - The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// . - Model.BalancePlatform.PaginatedAccountHoldersResponse GetAllAccountHoldersUnderBalancePlatform(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get all account holders under a balance platform - /// - /// - The unique identifier of the balance platform. - /// - The number of items that you want to skip. - /// - The number of items returned per page, maximum 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllAccountHoldersUnderBalancePlatformAsync(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all transaction rules for a balance platform - /// - /// - The unique identifier of the balance platform. - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForBalancePlatform(string id, RequestOptions requestOptions = default); - - /// - /// Get all transaction rules for a balance platform - /// - /// - The unique identifier of the balance platform. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllTransactionRulesForBalancePlatformAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a balance platform - /// - /// - The unique identifier of the balance platform. - /// - Additional request options. - /// . - Model.BalancePlatform.BalancePlatform GetBalancePlatform(string id, RequestOptions requestOptions = default); - - /// - /// Get a balance platform - /// - /// - The unique identifier of the balance platform. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetBalancePlatformAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PlatformService API endpoints - /// - public class PlatformService : AbstractService, IPlatformService - { - private readonly string _baseUrl; - - public PlatformService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.PaginatedAccountHoldersResponse GetAllAccountHoldersUnderBalancePlatform(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return GetAllAccountHoldersUnderBalancePlatformAsync(id, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllAccountHoldersUnderBalancePlatformAsync(string id, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/balancePlatforms/{id}/accountHolders" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.TransactionRulesResponse GetAllTransactionRulesForBalancePlatform(string id, RequestOptions requestOptions = default) - { - return GetAllTransactionRulesForBalancePlatformAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllTransactionRulesForBalancePlatformAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balancePlatforms/{id}/transactionRules"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.BalancePlatform GetBalancePlatform(string id, RequestOptions requestOptions = default) - { - return GetBalancePlatformAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetBalancePlatformAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/balancePlatforms/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/TransactionRulesService.cs b/Adyen/Service/BalancePlatform/TransactionRulesService.cs deleted file mode 100644 index 9e1b02719..000000000 --- a/Adyen/Service/BalancePlatform/TransactionRulesService.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// TransactionRulesService Interface - /// - public interface ITransactionRulesService - { - /// - /// Create a transaction rule - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRule CreateTransactionRule(TransactionRuleInfo transactionRuleInfo = default, RequestOptions requestOptions = default); - - /// - /// Create a transaction rule - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateTransactionRuleAsync(TransactionRuleInfo transactionRuleInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a transaction rule - /// - /// - The unique identifier of the transaction rule. - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRule DeleteTransactionRule(string transactionRuleId, RequestOptions requestOptions = default); - - /// - /// Delete a transaction rule - /// - /// - The unique identifier of the transaction rule. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteTransactionRuleAsync(string transactionRuleId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a transaction rule - /// - /// - The unique identifier of the transaction rule. - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRuleResponse GetTransactionRule(string transactionRuleId, RequestOptions requestOptions = default); - - /// - /// Get a transaction rule - /// - /// - The unique identifier of the transaction rule. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTransactionRuleAsync(string transactionRuleId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a transaction rule - /// - /// - The unique identifier of the transaction rule. - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.TransactionRule UpdateTransactionRule(string transactionRuleId, TransactionRuleInfo transactionRuleInfo = default, RequestOptions requestOptions = default); - - /// - /// Update a transaction rule - /// - /// - The unique identifier of the transaction rule. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTransactionRuleAsync(string transactionRuleId, TransactionRuleInfo transactionRuleInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TransactionRulesService API endpoints - /// - public class TransactionRulesService : AbstractService, ITransactionRulesService - { - private readonly string _baseUrl; - - public TransactionRulesService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.TransactionRule CreateTransactionRule(TransactionRuleInfo transactionRuleInfo = default, RequestOptions requestOptions = default) - { - return CreateTransactionRuleAsync(transactionRuleInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateTransactionRuleAsync(TransactionRuleInfo transactionRuleInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/transactionRules"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(transactionRuleInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.TransactionRule DeleteTransactionRule(string transactionRuleId, RequestOptions requestOptions = default) - { - return DeleteTransactionRuleAsync(transactionRuleId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteTransactionRuleAsync(string transactionRuleId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transactionRules/{transactionRuleId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.TransactionRuleResponse GetTransactionRule(string transactionRuleId, RequestOptions requestOptions = default) - { - return GetTransactionRuleAsync(transactionRuleId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTransactionRuleAsync(string transactionRuleId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transactionRules/{transactionRuleId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.BalancePlatform.TransactionRule UpdateTransactionRule(string transactionRuleId, TransactionRuleInfo transactionRuleInfo = default, RequestOptions requestOptions = default) - { - return UpdateTransactionRuleAsync(transactionRuleId, transactionRuleInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTransactionRuleAsync(string transactionRuleId, TransactionRuleInfo transactionRuleInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transactionRules/{transactionRuleId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(transactionRuleInfo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BalancePlatform/TransferRoutesService.cs b/Adyen/Service/BalancePlatform/TransferRoutesService.cs deleted file mode 100644 index 2f64bb58f..000000000 --- a/Adyen/Service/BalancePlatform/TransferRoutesService.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Configuration API -* -* -* The version of the OpenAPI document: 2 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BalancePlatform; - -namespace Adyen.Service.BalancePlatform -{ - /// - /// TransferRoutesService Interface - /// - public interface ITransferRoutesService - { - /// - /// Calculate transfer routes - /// - /// - - /// - Additional request options. - /// . - Model.BalancePlatform.TransferRouteResponse CalculateTransferRoutes(TransferRouteRequest transferRouteRequest = default, RequestOptions requestOptions = default); - - /// - /// Calculate transfer routes - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CalculateTransferRoutesAsync(TransferRouteRequest transferRouteRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TransferRoutesService API endpoints - /// - public class TransferRoutesService : AbstractService, ITransferRoutesService - { - private readonly string _baseUrl; - - public TransferRoutesService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/bcl/v2"); - } - - public Model.BalancePlatform.TransferRouteResponse CalculateTransferRoutes(TransferRouteRequest transferRouteRequest = default, RequestOptions requestOptions = default) - { - return CalculateTransferRoutesAsync(transferRouteRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CalculateTransferRoutesAsync(TransferRouteRequest transferRouteRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/transferRoutes/calculate"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(transferRouteRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/BinLookupService.cs b/Adyen/Service/BinLookupService.cs deleted file mode 100644 index 2e77f2293..000000000 --- a/Adyen/Service/BinLookupService.cs +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Adyen BinLookup API -* -* -* The version of the OpenAPI document: 54 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.BinLookup; - -namespace Adyen.Service -{ - /// - /// BinLookupService Interface - /// - public interface IBinLookupService - { - /// - /// Check if 3D Secure is available - /// - /// - - /// - Additional request options. - /// . - Model.BinLookup.ThreeDSAvailabilityResponse Get3dsAvailability(ThreeDSAvailabilityRequest threeDSAvailabilityRequest = default, RequestOptions requestOptions = default); - - /// - /// Check if 3D Secure is available - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task Get3dsAvailabilityAsync(ThreeDSAvailabilityRequest threeDSAvailabilityRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a fees cost estimate - /// - /// - - /// - Additional request options. - /// . - Model.BinLookup.CostEstimateResponse GetCostEstimate(CostEstimateRequest costEstimateRequest = default, RequestOptions requestOptions = default); - - /// - /// Get a fees cost estimate - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetCostEstimateAsync(CostEstimateRequest costEstimateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the BinLookupService API endpoints - /// - public class BinLookupService : AbstractService, IBinLookupService - { - private readonly string _baseUrl; - - public BinLookupService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://pal-test.adyen.com/pal/servlet/BinLookup/v54"); - } - - public Model.BinLookup.ThreeDSAvailabilityResponse Get3dsAvailability(ThreeDSAvailabilityRequest threeDSAvailabilityRequest = default, RequestOptions requestOptions = default) - { - return Get3dsAvailabilityAsync(threeDSAvailabilityRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task Get3dsAvailabilityAsync(ThreeDSAvailabilityRequest threeDSAvailabilityRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/get3dsAvailability"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(threeDSAvailabilityRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.BinLookup.CostEstimateResponse GetCostEstimate(CostEstimateRequest costEstimateRequest = default, RequestOptions requestOptions = default) - { - return GetCostEstimateAsync(costEstimateRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetCostEstimateAsync(CostEstimateRequest costEstimateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getCostEstimate"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(costEstimateRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Checkout/DonationsService.cs b/Adyen/Service/Checkout/DonationsService.cs deleted file mode 100644 index c9e869252..000000000 --- a/Adyen/Service/Checkout/DonationsService.cs +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Checkout; - -namespace Adyen.Service.Checkout -{ - /// - /// DonationsService Interface - /// - public interface IDonationsService - { - /// - /// Get a list of donation campaigns. - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.DonationCampaignsResponse DonationCampaigns(DonationCampaignsRequest donationCampaignsRequest = default, RequestOptions requestOptions = default); - - /// - /// Get a list of donation campaigns. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DonationCampaignsAsync(DonationCampaignsRequest donationCampaignsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Start a transaction for donations - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.DonationPaymentResponse Donations(DonationPaymentRequest donationPaymentRequest = default, RequestOptions requestOptions = default); - - /// - /// Start a transaction for donations - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DonationsAsync(DonationPaymentRequest donationPaymentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the DonationsService API endpoints - /// - public class DonationsService : AbstractService, IDonationsService - { - private readonly string _baseUrl; - - public DonationsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://checkout-test.adyen.com/v71"); - } - - public Model.Checkout.DonationCampaignsResponse DonationCampaigns(DonationCampaignsRequest donationCampaignsRequest = default, RequestOptions requestOptions = default) - { - return DonationCampaignsAsync(donationCampaignsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DonationCampaignsAsync(DonationCampaignsRequest donationCampaignsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/donationCampaigns"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(donationCampaignsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.DonationPaymentResponse Donations(DonationPaymentRequest donationPaymentRequest = default, RequestOptions requestOptions = default) - { - return DonationsAsync(donationPaymentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DonationsAsync(DonationPaymentRequest donationPaymentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/donations"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(donationPaymentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Checkout/ModificationsService.cs b/Adyen/Service/Checkout/ModificationsService.cs deleted file mode 100644 index 6a2c6ac91..000000000 --- a/Adyen/Service/Checkout/ModificationsService.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Checkout; - -namespace Adyen.Service.Checkout -{ - /// - /// ModificationsService Interface - /// - public interface IModificationsService - { - /// - /// Cancel an authorised payment - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.StandalonePaymentCancelResponse CancelAuthorisedPayment(StandalonePaymentCancelRequest standalonePaymentCancelRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel an authorised payment - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CancelAuthorisedPaymentAsync(StandalonePaymentCancelRequest standalonePaymentCancelRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Cancel an authorised payment - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to cancel. - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentCancelResponse CancelAuthorisedPaymentByPspReference(string paymentPspReference, PaymentCancelRequest paymentCancelRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel an authorised payment - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to cancel. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CancelAuthorisedPaymentByPspReferenceAsync(string paymentPspReference, PaymentCancelRequest paymentCancelRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Capture an authorised payment - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to capture. - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentCaptureResponse CaptureAuthorisedPayment(string paymentPspReference, PaymentCaptureRequest paymentCaptureRequest = default, RequestOptions requestOptions = default); - - /// - /// Capture an authorised payment - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to capture. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CaptureAuthorisedPaymentAsync(string paymentPspReference, PaymentCaptureRequest paymentCaptureRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Refund a captured payment - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to refund. - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentRefundResponse RefundCapturedPayment(string paymentPspReference, PaymentRefundRequest paymentRefundRequest = default, RequestOptions requestOptions = default); - - /// - /// Refund a captured payment - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to refund. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RefundCapturedPaymentAsync(string paymentPspReference, PaymentRefundRequest paymentRefundRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Refund or cancel a payment - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to reverse. - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentReversalResponse RefundOrCancelPayment(string paymentPspReference, PaymentReversalRequest paymentReversalRequest = default, RequestOptions requestOptions = default); - - /// - /// Refund or cancel a payment - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment that you want to reverse. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RefundOrCancelPaymentAsync(string paymentPspReference, PaymentReversalRequest paymentReversalRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update an authorised amount - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment. - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentAmountUpdateResponse UpdateAuthorisedAmount(string paymentPspReference, PaymentAmountUpdateRequest paymentAmountUpdateRequest = default, RequestOptions requestOptions = default); - - /// - /// Update an authorised amount - /// - /// - The [`pspReference`](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/post/payments__resParam_pspReference) of the payment. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateAuthorisedAmountAsync(string paymentPspReference, PaymentAmountUpdateRequest paymentAmountUpdateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the ModificationsService API endpoints - /// - public class ModificationsService : AbstractService, IModificationsService - { - private readonly string _baseUrl; - - public ModificationsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://checkout-test.adyen.com/v71"); - } - - public Model.Checkout.StandalonePaymentCancelResponse CancelAuthorisedPayment(StandalonePaymentCancelRequest standalonePaymentCancelRequest = default, RequestOptions requestOptions = default) - { - return CancelAuthorisedPaymentAsync(standalonePaymentCancelRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CancelAuthorisedPaymentAsync(StandalonePaymentCancelRequest standalonePaymentCancelRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/cancels"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(standalonePaymentCancelRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentCancelResponse CancelAuthorisedPaymentByPspReference(string paymentPspReference, PaymentCancelRequest paymentCancelRequest = default, RequestOptions requestOptions = default) - { - return CancelAuthorisedPaymentByPspReferenceAsync(paymentPspReference, paymentCancelRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CancelAuthorisedPaymentByPspReferenceAsync(string paymentPspReference, PaymentCancelRequest paymentCancelRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/payments/{paymentPspReference}/cancels"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentCancelRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentCaptureResponse CaptureAuthorisedPayment(string paymentPspReference, PaymentCaptureRequest paymentCaptureRequest = default, RequestOptions requestOptions = default) - { - return CaptureAuthorisedPaymentAsync(paymentPspReference, paymentCaptureRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CaptureAuthorisedPaymentAsync(string paymentPspReference, PaymentCaptureRequest paymentCaptureRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/payments/{paymentPspReference}/captures"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentCaptureRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentRefundResponse RefundCapturedPayment(string paymentPspReference, PaymentRefundRequest paymentRefundRequest = default, RequestOptions requestOptions = default) - { - return RefundCapturedPaymentAsync(paymentPspReference, paymentRefundRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RefundCapturedPaymentAsync(string paymentPspReference, PaymentRefundRequest paymentRefundRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/payments/{paymentPspReference}/refunds"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentRefundRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentReversalResponse RefundOrCancelPayment(string paymentPspReference, PaymentReversalRequest paymentReversalRequest = default, RequestOptions requestOptions = default) - { - return RefundOrCancelPaymentAsync(paymentPspReference, paymentReversalRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RefundOrCancelPaymentAsync(string paymentPspReference, PaymentReversalRequest paymentReversalRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/payments/{paymentPspReference}/reversals"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentReversalRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentAmountUpdateResponse UpdateAuthorisedAmount(string paymentPspReference, PaymentAmountUpdateRequest paymentAmountUpdateRequest = default, RequestOptions requestOptions = default) - { - return UpdateAuthorisedAmountAsync(paymentPspReference, paymentAmountUpdateRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateAuthorisedAmountAsync(string paymentPspReference, PaymentAmountUpdateRequest paymentAmountUpdateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/payments/{paymentPspReference}/amountUpdates"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentAmountUpdateRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Checkout/OrdersService.cs b/Adyen/Service/Checkout/OrdersService.cs deleted file mode 100644 index d034ecd83..000000000 --- a/Adyen/Service/Checkout/OrdersService.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Checkout; - -namespace Adyen.Service.Checkout -{ - /// - /// OrdersService Interface - /// - public interface IOrdersService - { - /// - /// Cancel an order - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.CancelOrderResponse CancelOrder(CancelOrderRequest cancelOrderRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel an order - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CancelOrderAsync(CancelOrderRequest cancelOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the balance of a gift card - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.BalanceCheckResponse GetBalanceOfGiftCard(BalanceCheckRequest balanceCheckRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the balance of a gift card - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetBalanceOfGiftCardAsync(BalanceCheckRequest balanceCheckRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create an order - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.CreateOrderResponse Orders(CreateOrderRequest createOrderRequest = default, RequestOptions requestOptions = default); - - /// - /// Create an order - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task OrdersAsync(CreateOrderRequest createOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the OrdersService API endpoints - /// - public class OrdersService : AbstractService, IOrdersService - { - private readonly string _baseUrl; - - public OrdersService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://checkout-test.adyen.com/v71"); - } - - public Model.Checkout.CancelOrderResponse CancelOrder(CancelOrderRequest cancelOrderRequest = default, RequestOptions requestOptions = default) - { - return CancelOrderAsync(cancelOrderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CancelOrderAsync(CancelOrderRequest cancelOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/orders/cancel"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(cancelOrderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.BalanceCheckResponse GetBalanceOfGiftCard(BalanceCheckRequest balanceCheckRequest = default, RequestOptions requestOptions = default) - { - return GetBalanceOfGiftCardAsync(balanceCheckRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetBalanceOfGiftCardAsync(BalanceCheckRequest balanceCheckRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/paymentMethods/balance"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(balanceCheckRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.CreateOrderResponse Orders(CreateOrderRequest createOrderRequest = default, RequestOptions requestOptions = default) - { - return OrdersAsync(createOrderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task OrdersAsync(CreateOrderRequest createOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/orders"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createOrderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Checkout/PaymentLinksService.cs b/Adyen/Service/Checkout/PaymentLinksService.cs deleted file mode 100644 index bb88e898c..000000000 --- a/Adyen/Service/Checkout/PaymentLinksService.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Checkout; - -namespace Adyen.Service.Checkout -{ - /// - /// PaymentLinksService Interface - /// - public interface IPaymentLinksService - { - /// - /// Get a payment link - /// - /// - Unique identifier of the payment link. - /// - Additional request options. - /// . - Model.Checkout.PaymentLinkResponse GetPaymentLink(string linkId, RequestOptions requestOptions = default); - - /// - /// Get a payment link - /// - /// - Unique identifier of the payment link. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPaymentLinkAsync(string linkId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a payment link - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentLinkResponse PaymentLinks(PaymentLinkRequest paymentLinkRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a payment link - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task PaymentLinksAsync(PaymentLinkRequest paymentLinkRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update the status of a payment link - /// - /// - Unique identifier of the payment link. - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentLinkResponse UpdatePaymentLink(string linkId, UpdatePaymentLinkRequest updatePaymentLinkRequest = default, RequestOptions requestOptions = default); - - /// - /// Update the status of a payment link - /// - /// - Unique identifier of the payment link. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdatePaymentLinkAsync(string linkId, UpdatePaymentLinkRequest updatePaymentLinkRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PaymentLinksService API endpoints - /// - public class PaymentLinksService : AbstractService, IPaymentLinksService - { - private readonly string _baseUrl; - - public PaymentLinksService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://checkout-test.adyen.com/v71"); - } - - public Model.Checkout.PaymentLinkResponse GetPaymentLink(string linkId, RequestOptions requestOptions = default) - { - return GetPaymentLinkAsync(linkId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPaymentLinkAsync(string linkId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentLinks/{linkId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentLinkResponse PaymentLinks(PaymentLinkRequest paymentLinkRequest = default, RequestOptions requestOptions = default) - { - return PaymentLinksAsync(paymentLinkRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task PaymentLinksAsync(PaymentLinkRequest paymentLinkRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/paymentLinks"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentLinkRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentLinkResponse UpdatePaymentLink(string linkId, UpdatePaymentLinkRequest updatePaymentLinkRequest = default, RequestOptions requestOptions = default) - { - return UpdatePaymentLinkAsync(linkId, updatePaymentLinkRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdatePaymentLinkAsync(string linkId, UpdatePaymentLinkRequest updatePaymentLinkRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/paymentLinks/{linkId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updatePaymentLinkRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Checkout/PaymentsService.cs b/Adyen/Service/Checkout/PaymentsService.cs deleted file mode 100644 index 363f8c1e5..000000000 --- a/Adyen/Service/Checkout/PaymentsService.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Checkout; - -namespace Adyen.Service.Checkout -{ - /// - /// PaymentsService Interface - /// - public interface IPaymentsService - { - /// - /// Get the brands and other details of a card - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.CardDetailsResponse CardDetails(CardDetailsRequest cardDetailsRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the brands and other details of a card - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CardDetailsAsync(CardDetailsRequest cardDetailsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the result of a payment session - /// - /// - A unique identifier of the session. - /// - The `sessionResult` value from the Drop-in or Component. - /// - Additional request options. - /// . - Model.Checkout.SessionResultResponse GetResultOfPaymentSession(string sessionId, string sessionResult, RequestOptions requestOptions = default); - - /// - /// Get the result of a payment session - /// - /// - A unique identifier of the session. - /// - The `sessionResult` value from the Drop-in or Component. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetResultOfPaymentSessionAsync(string sessionId, string sessionResult, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of available payment methods - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentMethodsResponse PaymentMethods(PaymentMethodsRequest paymentMethodsRequest = default, RequestOptions requestOptions = default); - - /// - /// Get a list of available payment methods - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task PaymentMethodsAsync(PaymentMethodsRequest paymentMethodsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Start a transaction - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentResponse Payments(PaymentRequest paymentRequest = default, RequestOptions requestOptions = default); - - /// - /// Start a transaction - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task PaymentsAsync(PaymentRequest paymentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Submit details for a payment - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.PaymentDetailsResponse PaymentsDetails(PaymentDetailsRequest paymentDetailsRequest = default, RequestOptions requestOptions = default); - - /// - /// Submit details for a payment - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task PaymentsDetailsAsync(PaymentDetailsRequest paymentDetailsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a payment session - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.CreateCheckoutSessionResponse Sessions(CreateCheckoutSessionRequest createCheckoutSessionRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a payment session - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task SessionsAsync(CreateCheckoutSessionRequest createCheckoutSessionRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PaymentsService API endpoints - /// - public class PaymentsService : AbstractService, IPaymentsService - { - private readonly string _baseUrl; - - public PaymentsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://checkout-test.adyen.com/v71"); - } - - public Model.Checkout.CardDetailsResponse CardDetails(CardDetailsRequest cardDetailsRequest = default, RequestOptions requestOptions = default) - { - return CardDetailsAsync(cardDetailsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CardDetailsAsync(CardDetailsRequest cardDetailsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/cardDetails"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(cardDetailsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.SessionResultResponse GetResultOfPaymentSession(string sessionId, string sessionResult, RequestOptions requestOptions = default) - { - return GetResultOfPaymentSessionAsync(sessionId, sessionResult, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetResultOfPaymentSessionAsync(string sessionId, string sessionResult, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("sessionResult", sessionResult); - var endpoint = _baseUrl + $"/sessions/{sessionId}" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentMethodsResponse PaymentMethods(PaymentMethodsRequest paymentMethodsRequest = default, RequestOptions requestOptions = default) - { - return PaymentMethodsAsync(paymentMethodsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task PaymentMethodsAsync(PaymentMethodsRequest paymentMethodsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/paymentMethods"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentMethodsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentResponse Payments(PaymentRequest paymentRequest = default, RequestOptions requestOptions = default) - { - return PaymentsAsync(paymentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task PaymentsAsync(PaymentRequest paymentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/payments"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaymentDetailsResponse PaymentsDetails(PaymentDetailsRequest paymentDetailsRequest = default, RequestOptions requestOptions = default) - { - return PaymentsDetailsAsync(paymentDetailsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task PaymentsDetailsAsync(PaymentDetailsRequest paymentDetailsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/payments/details"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentDetailsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.CreateCheckoutSessionResponse Sessions(CreateCheckoutSessionRequest createCheckoutSessionRequest = default, RequestOptions requestOptions = default) - { - return SessionsAsync(createCheckoutSessionRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SessionsAsync(CreateCheckoutSessionRequest createCheckoutSessionRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/sessions"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createCheckoutSessionRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Checkout/RecurringService.cs b/Adyen/Service/Checkout/RecurringService.cs deleted file mode 100644 index 2342ff512..000000000 --- a/Adyen/Service/Checkout/RecurringService.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Checkout; - -namespace Adyen.Service.Checkout -{ - /// - /// RecurringService Interface - /// - public interface IRecurringService - { - /// - /// Delete a token for stored payment details - /// - /// - The unique identifier of the token. - /// - Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - /// - Your merchant account. - /// - Additional request options. - void DeleteTokenForStoredPaymentDetails(string storedPaymentMethodId, string shopperReference, string merchantAccount, RequestOptions requestOptions = default); - - /// - /// Delete a token for stored payment details - /// - /// - The unique identifier of the token. - /// - Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - /// - Your merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeleteTokenForStoredPaymentDetailsAsync(string storedPaymentMethodId, string shopperReference, string merchantAccount, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get tokens for stored payment details - /// - /// - Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - /// - Your merchant account. - /// - Additional request options. - /// . - Model.Checkout.ListStoredPaymentMethodsResponse GetTokensForStoredPaymentDetails(string shopperReference = default, string merchantAccount = default, RequestOptions requestOptions = default); - - /// - /// Get tokens for stored payment details - /// - /// - Your reference to uniquely identify this shopper, for example user ID or account ID. Minimum length: 3 characters. > Your reference must not include personally identifiable information (PII), for example name or email address. - /// - Your merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTokensForStoredPaymentDetailsAsync(string shopperReference = default, string merchantAccount = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a token to store payment details - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.StoredPaymentMethodResource StoredPaymentMethods(StoredPaymentMethodRequest storedPaymentMethodRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a token to store payment details - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task StoredPaymentMethodsAsync(StoredPaymentMethodRequest storedPaymentMethodRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the RecurringService API endpoints - /// - public class RecurringService : AbstractService, IRecurringService - { - private readonly string _baseUrl; - - public RecurringService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://checkout-test.adyen.com/v71"); - } - - public void DeleteTokenForStoredPaymentDetails(string storedPaymentMethodId, string shopperReference, string merchantAccount, RequestOptions requestOptions = default) - { - DeleteTokenForStoredPaymentDetailsAsync(storedPaymentMethodId, shopperReference, merchantAccount, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteTokenForStoredPaymentDetailsAsync(string storedPaymentMethodId, string shopperReference, string merchantAccount, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("shopperReference", shopperReference); - queryParams.Add("merchantAccount", merchantAccount); - var endpoint = _baseUrl + $"/storedPaymentMethods/{storedPaymentMethodId}" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.ListStoredPaymentMethodsResponse GetTokensForStoredPaymentDetails(string shopperReference = default, string merchantAccount = default, RequestOptions requestOptions = default) - { - return GetTokensForStoredPaymentDetailsAsync(shopperReference, merchantAccount, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTokensForStoredPaymentDetailsAsync(string shopperReference = default, string merchantAccount = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (shopperReference != null) queryParams.Add("shopperReference", shopperReference); - if (merchantAccount != null) queryParams.Add("merchantAccount", merchantAccount); - var endpoint = _baseUrl + "/storedPaymentMethods" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.StoredPaymentMethodResource StoredPaymentMethods(StoredPaymentMethodRequest storedPaymentMethodRequest = default, RequestOptions requestOptions = default) - { - return StoredPaymentMethodsAsync(storedPaymentMethodRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task StoredPaymentMethodsAsync(StoredPaymentMethodRequest storedPaymentMethodRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/storedPaymentMethods"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storedPaymentMethodRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Checkout/UtilityService.cs b/Adyen/Service/Checkout/UtilityService.cs deleted file mode 100644 index c6360aa89..000000000 --- a/Adyen/Service/Checkout/UtilityService.cs +++ /dev/null @@ -1,132 +0,0 @@ -/* -* Adyen Checkout API -* -* -* The version of the OpenAPI document: 71 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Checkout; - -namespace Adyen.Service.Checkout -{ - /// - /// UtilityService Interface - /// - public interface IUtilityService - { - /// - /// Get an Apple Pay session - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.ApplePaySessionResponse GetApplePaySession(ApplePaySessionRequest applePaySessionRequest = default, RequestOptions requestOptions = default); - - /// - /// Get an Apple Pay session - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetApplePaySessionAsync(ApplePaySessionRequest applePaySessionRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create originKey values for domains - /// - /// - - /// - Additional request options. - /// . - [Obsolete("Deprecated since Adyen Checkout API v67.")] - Model.Checkout.UtilityResponse OriginKeys(UtilityRequest utilityRequest = default, RequestOptions requestOptions = default); - - /// - /// Create originKey values for domains - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since Adyen Checkout API v67.")] - Task OriginKeysAsync(UtilityRequest utilityRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Updates the order for PayPal Express Checkout - /// - /// - - /// - Additional request options. - /// . - Model.Checkout.PaypalUpdateOrderResponse UpdatesOrderForPaypalExpressCheckout(PaypalUpdateOrderRequest paypalUpdateOrderRequest = default, RequestOptions requestOptions = default); - - /// - /// Updates the order for PayPal Express Checkout - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdatesOrderForPaypalExpressCheckoutAsync(PaypalUpdateOrderRequest paypalUpdateOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the UtilityService API endpoints - /// - public class UtilityService : AbstractService, IUtilityService - { - private readonly string _baseUrl; - - public UtilityService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://checkout-test.adyen.com/v71"); - } - - public Model.Checkout.ApplePaySessionResponse GetApplePaySession(ApplePaySessionRequest applePaySessionRequest = default, RequestOptions requestOptions = default) - { - return GetApplePaySessionAsync(applePaySessionRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetApplePaySessionAsync(ApplePaySessionRequest applePaySessionRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/applePay/sessions"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(applePaySessionRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("Deprecated since Adyen Checkout API v67.")] - public Model.Checkout.UtilityResponse OriginKeys(UtilityRequest utilityRequest = default, RequestOptions requestOptions = default) - { - return OriginKeysAsync(utilityRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since Adyen Checkout API v67.")] - public async Task OriginKeysAsync(UtilityRequest utilityRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/originKeys"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(utilityRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Checkout.PaypalUpdateOrderResponse UpdatesOrderForPaypalExpressCheckout(PaypalUpdateOrderRequest paypalUpdateOrderRequest = default, RequestOptions requestOptions = default) - { - return UpdatesOrderForPaypalExpressCheckoutAsync(paypalUpdateOrderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdatesOrderForPaypalExpressCheckoutAsync(PaypalUpdateOrderRequest paypalUpdateOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/paypal/updateOrder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paypalUpdateOrderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/DataProtectionService.cs b/Adyen/Service/DataProtectionService.cs deleted file mode 100644 index be6c11ea1..000000000 --- a/Adyen/Service/DataProtectionService.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Adyen Data Protection API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.DataProtection; - -namespace Adyen.Service -{ - /// - /// DataProtectionService Interface - /// - public interface IDataProtectionService - { - /// - /// Submit a Subject Erasure Request. - /// - /// - - /// - Additional request options. - /// . - Model.DataProtection.SubjectErasureResponse RequestSubjectErasure(SubjectErasureByPspReferenceRequest subjectErasureByPspReferenceRequest = default, RequestOptions requestOptions = default); - - /// - /// Submit a Subject Erasure Request. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RequestSubjectErasureAsync(SubjectErasureByPspReferenceRequest subjectErasureByPspReferenceRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the DataProtectionService API endpoints - /// - public class DataProtectionService : AbstractService, IDataProtectionService - { - private readonly string _baseUrl; - - public DataProtectionService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://ca-test.adyen.com/ca/services/DataProtectionService/v1"); - } - - public Model.DataProtection.SubjectErasureResponse RequestSubjectErasure(SubjectErasureByPspReferenceRequest subjectErasureByPspReferenceRequest = default, RequestOptions requestOptions = default) - { - return RequestSubjectErasureAsync(subjectErasureByPspReferenceRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RequestSubjectErasureAsync(SubjectErasureByPspReferenceRequest subjectErasureByPspReferenceRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/requestSubjectErasure"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(subjectErasureByPspReferenceRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/DisputesService.cs b/Adyen/Service/DisputesService.cs deleted file mode 100644 index 4df6826b4..000000000 --- a/Adyen/Service/DisputesService.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Disputes API -* -* -* The version of the OpenAPI document: 30 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Disputes; - -namespace Adyen.Service -{ - /// - /// DisputesService Interface - /// - public interface IDisputesService - { - /// - /// Accept a dispute - /// - /// - - /// - Additional request options. - /// . - Model.Disputes.AcceptDisputeResponse AcceptDispute(AcceptDisputeRequest acceptDisputeRequest = default, RequestOptions requestOptions = default); - - /// - /// Accept a dispute - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task AcceptDisputeAsync(AcceptDisputeRequest acceptDisputeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Defend a dispute - /// - /// - - /// - Additional request options. - /// . - Model.Disputes.DefendDisputeResponse DefendDispute(DefendDisputeRequest defendDisputeRequest = default, RequestOptions requestOptions = default); - - /// - /// Defend a dispute - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DefendDisputeAsync(DefendDisputeRequest defendDisputeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a defense document - /// - /// - - /// - Additional request options. - /// . - Model.Disputes.DeleteDefenseDocumentResponse DeleteDisputeDefenseDocument(DeleteDefenseDocumentRequest deleteDefenseDocumentRequest = default, RequestOptions requestOptions = default); - - /// - /// Delete a defense document - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteDisputeDefenseDocumentAsync(DeleteDefenseDocumentRequest deleteDefenseDocumentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get applicable defense reasons - /// - /// - - /// - Additional request options. - /// . - Model.Disputes.DefenseReasonsResponse RetrieveApplicableDefenseReasons(DefenseReasonsRequest defenseReasonsRequest = default, RequestOptions requestOptions = default); - - /// - /// Get applicable defense reasons - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RetrieveApplicableDefenseReasonsAsync(DefenseReasonsRequest defenseReasonsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Supply a defense document - /// - /// - - /// - Additional request options. - /// . - Model.Disputes.SupplyDefenseDocumentResponse SupplyDefenseDocument(SupplyDefenseDocumentRequest supplyDefenseDocumentRequest = default, RequestOptions requestOptions = default); - - /// - /// Supply a defense document - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task SupplyDefenseDocumentAsync(SupplyDefenseDocumentRequest supplyDefenseDocumentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the DisputesService API endpoints - /// - public class DisputesService : AbstractService, IDisputesService - { - private readonly string _baseUrl; - - public DisputesService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://ca-test.adyen.com/ca/services/DisputeService/v30"); - } - - public Model.Disputes.AcceptDisputeResponse AcceptDispute(AcceptDisputeRequest acceptDisputeRequest = default, RequestOptions requestOptions = default) - { - return AcceptDisputeAsync(acceptDisputeRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AcceptDisputeAsync(AcceptDisputeRequest acceptDisputeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/acceptDispute"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(acceptDisputeRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Disputes.DefendDisputeResponse DefendDispute(DefendDisputeRequest defendDisputeRequest = default, RequestOptions requestOptions = default) - { - return DefendDisputeAsync(defendDisputeRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DefendDisputeAsync(DefendDisputeRequest defendDisputeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/defendDispute"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(defendDisputeRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Disputes.DeleteDefenseDocumentResponse DeleteDisputeDefenseDocument(DeleteDefenseDocumentRequest deleteDefenseDocumentRequest = default, RequestOptions requestOptions = default) - { - return DeleteDisputeDefenseDocumentAsync(deleteDefenseDocumentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteDisputeDefenseDocumentAsync(DeleteDefenseDocumentRequest deleteDefenseDocumentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/deleteDisputeDefenseDocument"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(deleteDefenseDocumentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Disputes.DefenseReasonsResponse RetrieveApplicableDefenseReasons(DefenseReasonsRequest defenseReasonsRequest = default, RequestOptions requestOptions = default) - { - return RetrieveApplicableDefenseReasonsAsync(defenseReasonsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RetrieveApplicableDefenseReasonsAsync(DefenseReasonsRequest defenseReasonsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/retrieveApplicableDefenseReasons"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(defenseReasonsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Disputes.SupplyDefenseDocumentResponse SupplyDefenseDocument(SupplyDefenseDocumentRequest supplyDefenseDocumentRequest = default, RequestOptions requestOptions = default) - { - return SupplyDefenseDocumentAsync(supplyDefenseDocumentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SupplyDefenseDocumentAsync(SupplyDefenseDocumentRequest supplyDefenseDocumentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/supplyDefenseDocument"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(supplyDefenseDocumentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/LegalEntityManagement/BusinessLinesService.cs b/Adyen/Service/LegalEntityManagement/BusinessLinesService.cs deleted file mode 100644 index 70f8faf00..000000000 --- a/Adyen/Service/LegalEntityManagement/BusinessLinesService.cs +++ /dev/null @@ -1,157 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.LegalEntityManagement; - -namespace Adyen.Service.LegalEntityManagement -{ - /// - /// BusinessLinesService Interface - /// - public interface IBusinessLinesService - { - /// - /// Create a business line - /// - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.BusinessLine CreateBusinessLine(BusinessLineInfo businessLineInfo = default, RequestOptions requestOptions = default); - - /// - /// Create a business line - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateBusinessLineAsync(BusinessLineInfo businessLineInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a business line - /// - /// - The unique identifier of the business line to be deleted. - /// - Additional request options. - void DeleteBusinessLine(string id, RequestOptions requestOptions = default); - - /// - /// Delete a business line - /// - /// - The unique identifier of the business line to be deleted. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeleteBusinessLineAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a business line - /// - /// - The unique identifier of the business line. - /// - Additional request options. - /// . - Model.LegalEntityManagement.BusinessLine GetBusinessLine(string id, RequestOptions requestOptions = default); - - /// - /// Get a business line - /// - /// - The unique identifier of the business line. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetBusinessLineAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a business line - /// - /// - The unique identifier of the business line. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.BusinessLine UpdateBusinessLine(string id, BusinessLineInfoUpdate businessLineInfoUpdate = default, RequestOptions requestOptions = default); - - /// - /// Update a business line - /// - /// - The unique identifier of the business line. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateBusinessLineAsync(string id, BusinessLineInfoUpdate businessLineInfoUpdate = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the BusinessLinesService API endpoints - /// - public class BusinessLinesService : AbstractService, IBusinessLinesService - { - private readonly string _baseUrl; - - public BusinessLinesService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://kyc-test.adyen.com/lem/v4"); - } - - public Model.LegalEntityManagement.BusinessLine CreateBusinessLine(BusinessLineInfo businessLineInfo = default, RequestOptions requestOptions = default) - { - return CreateBusinessLineAsync(businessLineInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateBusinessLineAsync(BusinessLineInfo businessLineInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/businessLines"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(businessLineInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public void DeleteBusinessLine(string id, RequestOptions requestOptions = default) - { - DeleteBusinessLineAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteBusinessLineAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/businessLines/{id}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.BusinessLine GetBusinessLine(string id, RequestOptions requestOptions = default) - { - return GetBusinessLineAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetBusinessLineAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/businessLines/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.BusinessLine UpdateBusinessLine(string id, BusinessLineInfoUpdate businessLineInfoUpdate = default, RequestOptions requestOptions = default) - { - return UpdateBusinessLineAsync(id, businessLineInfoUpdate, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateBusinessLineAsync(string id, BusinessLineInfoUpdate businessLineInfoUpdate = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/businessLines/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(businessLineInfoUpdate.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/LegalEntityManagement/DocumentsService.cs b/Adyen/Service/LegalEntityManagement/DocumentsService.cs deleted file mode 100644 index 12535a3d5..000000000 --- a/Adyen/Service/LegalEntityManagement/DocumentsService.cs +++ /dev/null @@ -1,162 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.LegalEntityManagement; - -namespace Adyen.Service.LegalEntityManagement -{ - /// - /// DocumentsService Interface - /// - public interface IDocumentsService - { - /// - /// Delete a document - /// - /// - The unique identifier of the document to be deleted. - /// - Additional request options. - void DeleteDocument(string id, RequestOptions requestOptions = default); - - /// - /// Delete a document - /// - /// - The unique identifier of the document to be deleted. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeleteDocumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a document - /// - /// - The unique identifier of the document. - /// - Do not load document content while fetching the document. - /// - Additional request options. - /// . - Model.LegalEntityManagement.Document GetDocument(string id, bool? skipContent = default, RequestOptions requestOptions = default); - - /// - /// Get a document - /// - /// - The unique identifier of the document. - /// - Do not load document content while fetching the document. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetDocumentAsync(string id, bool? skipContent = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a document - /// - /// - The unique identifier of the document to be updated. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.Document UpdateDocument(string id, Document document = default, RequestOptions requestOptions = default); - - /// - /// Update a document - /// - /// - The unique identifier of the document to be updated. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateDocumentAsync(string id, Document document = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Upload a document for verification checks - /// - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.Document UploadDocumentForVerificationChecks(Document document = default, RequestOptions requestOptions = default); - - /// - /// Upload a document for verification checks - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UploadDocumentForVerificationChecksAsync(Document document = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the DocumentsService API endpoints - /// - public class DocumentsService : AbstractService, IDocumentsService - { - private readonly string _baseUrl; - - public DocumentsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://kyc-test.adyen.com/lem/v4"); - } - - public void DeleteDocument(string id, RequestOptions requestOptions = default) - { - DeleteDocumentAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteDocumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/documents/{id}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.Document GetDocument(string id, bool? skipContent = default, RequestOptions requestOptions = default) - { - return GetDocumentAsync(id, skipContent, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetDocumentAsync(string id, bool? skipContent = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (skipContent != null) queryParams.Add("skipContent", skipContent.ToString()); - var endpoint = _baseUrl + $"/documents/{id}" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.Document UpdateDocument(string id, Document document = default, RequestOptions requestOptions = default) - { - return UpdateDocumentAsync(id, document, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateDocumentAsync(string id, Document document = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/documents/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(document.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.Document UploadDocumentForVerificationChecks(Document document = default, RequestOptions requestOptions = default) - { - return UploadDocumentForVerificationChecksAsync(document, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UploadDocumentForVerificationChecksAsync(Document document = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/documents"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(document.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/LegalEntityManagement/HostedOnboardingService.cs b/Adyen/Service/LegalEntityManagement/HostedOnboardingService.cs deleted file mode 100644 index 94da68864..000000000 --- a/Adyen/Service/LegalEntityManagement/HostedOnboardingService.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.LegalEntityManagement; - -namespace Adyen.Service.LegalEntityManagement -{ - /// - /// HostedOnboardingService Interface - /// - public interface IHostedOnboardingService - { - /// - /// Get a link to an Adyen-hosted onboarding page - /// - /// - The unique identifier of the legal entity - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.OnboardingLink GetLinkToAdyenhostedOnboardingPage(string id, OnboardingLinkInfo onboardingLinkInfo = default, RequestOptions requestOptions = default); - - /// - /// Get a link to an Adyen-hosted onboarding page - /// - /// - The unique identifier of the legal entity - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetLinkToAdyenhostedOnboardingPageAsync(string id, OnboardingLinkInfo onboardingLinkInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an onboarding link theme - /// - /// - The unique identifier of the theme - /// - Additional request options. - /// . - Model.LegalEntityManagement.OnboardingTheme GetOnboardingLinkTheme(string id, RequestOptions requestOptions = default); - - /// - /// Get an onboarding link theme - /// - /// - The unique identifier of the theme - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetOnboardingLinkThemeAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of hosted onboarding page themes - /// - /// - Additional request options. - /// . - Model.LegalEntityManagement.OnboardingThemes ListHostedOnboardingPageThemes(RequestOptions requestOptions = default); - - /// - /// Get a list of hosted onboarding page themes - /// - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListHostedOnboardingPageThemesAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the HostedOnboardingService API endpoints - /// - public class HostedOnboardingService : AbstractService, IHostedOnboardingService - { - private readonly string _baseUrl; - - public HostedOnboardingService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://kyc-test.adyen.com/lem/v4"); - } - - public Model.LegalEntityManagement.OnboardingLink GetLinkToAdyenhostedOnboardingPage(string id, OnboardingLinkInfo onboardingLinkInfo = default, RequestOptions requestOptions = default) - { - return GetLinkToAdyenhostedOnboardingPageAsync(id, onboardingLinkInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetLinkToAdyenhostedOnboardingPageAsync(string id, OnboardingLinkInfo onboardingLinkInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/onboardingLinks"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(onboardingLinkInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.OnboardingTheme GetOnboardingLinkTheme(string id, RequestOptions requestOptions = default) - { - return GetOnboardingLinkThemeAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetOnboardingLinkThemeAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/themes/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.OnboardingThemes ListHostedOnboardingPageThemes(RequestOptions requestOptions = default) - { - return ListHostedOnboardingPageThemesAsync(requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListHostedOnboardingPageThemesAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/themes"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/LegalEntityManagement/LegalEntitiesService.cs b/Adyen/Service/LegalEntityManagement/LegalEntitiesService.cs deleted file mode 100644 index aa9758085..000000000 --- a/Adyen/Service/LegalEntityManagement/LegalEntitiesService.cs +++ /dev/null @@ -1,217 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.LegalEntityManagement; - -namespace Adyen.Service.LegalEntityManagement -{ - /// - /// LegalEntitiesService Interface - /// - public interface ILegalEntitiesService - { - /// - /// Check a legal entity's verification errors - /// - /// - The unique identifier of the legal entity. - /// - Additional request options. - /// . - Model.LegalEntityManagement.VerificationErrors CheckLegalEntitysVerificationErrors(string id, RequestOptions requestOptions = default); - - /// - /// Check a legal entity's verification errors - /// - /// - The unique identifier of the legal entity. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CheckLegalEntitysVerificationErrorsAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Confirm data review - /// - /// - The unique identifier of the legal entity. - /// - Additional request options. - /// . - Model.LegalEntityManagement.DataReviewConfirmationResponse ConfirmDataReview(string id, RequestOptions requestOptions = default); - - /// - /// Confirm data review - /// - /// - The unique identifier of the legal entity. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ConfirmDataReviewAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a legal entity - /// - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.LegalEntity CreateLegalEntity(LegalEntityInfoRequiredType legalEntityInfoRequiredType = default, RequestOptions requestOptions = default); - - /// - /// Create a legal entity - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateLegalEntityAsync(LegalEntityInfoRequiredType legalEntityInfoRequiredType = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all business lines under a legal entity - /// - /// - The unique identifier of the legal entity. - /// - Additional request options. - /// . - Model.LegalEntityManagement.BusinessLines GetAllBusinessLinesUnderLegalEntity(string id, RequestOptions requestOptions = default); - - /// - /// Get all business lines under a legal entity - /// - /// - The unique identifier of the legal entity. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllBusinessLinesUnderLegalEntityAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a legal entity - /// - /// - The unique identifier of the legal entity. - /// - Additional request options. - /// . - Model.LegalEntityManagement.LegalEntity GetLegalEntity(string id, RequestOptions requestOptions = default); - - /// - /// Get a legal entity - /// - /// - The unique identifier of the legal entity. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetLegalEntityAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a legal entity - /// - /// - The unique identifier of the legal entity. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.LegalEntity UpdateLegalEntity(string id, LegalEntityInfo legalEntityInfo = default, RequestOptions requestOptions = default); - - /// - /// Update a legal entity - /// - /// - The unique identifier of the legal entity. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateLegalEntityAsync(string id, LegalEntityInfo legalEntityInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the LegalEntitiesService API endpoints - /// - public class LegalEntitiesService : AbstractService, ILegalEntitiesService - { - private readonly string _baseUrl; - - public LegalEntitiesService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://kyc-test.adyen.com/lem/v4"); - } - - public Model.LegalEntityManagement.VerificationErrors CheckLegalEntitysVerificationErrors(string id, RequestOptions requestOptions = default) - { - return CheckLegalEntitysVerificationErrorsAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CheckLegalEntitysVerificationErrorsAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/checkVerificationErrors"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.DataReviewConfirmationResponse ConfirmDataReview(string id, RequestOptions requestOptions = default) - { - return ConfirmDataReviewAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ConfirmDataReviewAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/confirmDataReview"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.LegalEntity CreateLegalEntity(LegalEntityInfoRequiredType legalEntityInfoRequiredType = default, RequestOptions requestOptions = default) - { - return CreateLegalEntityAsync(legalEntityInfoRequiredType, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateLegalEntityAsync(LegalEntityInfoRequiredType legalEntityInfoRequiredType = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/legalEntities"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(legalEntityInfoRequiredType.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.BusinessLines GetAllBusinessLinesUnderLegalEntity(string id, RequestOptions requestOptions = default) - { - return GetAllBusinessLinesUnderLegalEntityAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllBusinessLinesUnderLegalEntityAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/businessLines"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.LegalEntity GetLegalEntity(string id, RequestOptions requestOptions = default) - { - return GetLegalEntityAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetLegalEntityAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.LegalEntity UpdateLegalEntity(string id, LegalEntityInfo legalEntityInfo = default, RequestOptions requestOptions = default) - { - return UpdateLegalEntityAsync(id, legalEntityInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateLegalEntityAsync(string id, LegalEntityInfo legalEntityInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(legalEntityInfo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/LegalEntityManagement/PCIQuestionnairesService.cs b/Adyen/Service/LegalEntityManagement/PCIQuestionnairesService.cs deleted file mode 100644 index 348765a33..000000000 --- a/Adyen/Service/LegalEntityManagement/PCIQuestionnairesService.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.LegalEntityManagement; - -namespace Adyen.Service.LegalEntityManagement -{ - /// - /// PCIQuestionnairesService Interface - /// - public interface IPCIQuestionnairesService - { - /// - /// Calculate PCI status of a legal entity - /// - /// - The unique identifier of the legal entity to calculate PCI status. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.CalculatePciStatusResponse CalculatePciStatusOfLegalEntity(string id, CalculatePciStatusRequest calculatePciStatusRequest = default, RequestOptions requestOptions = default); - - /// - /// Calculate PCI status of a legal entity - /// - /// - The unique identifier of the legal entity to calculate PCI status. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CalculatePciStatusOfLegalEntityAsync(string id, CalculatePciStatusRequest calculatePciStatusRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Generate PCI questionnaire - /// - /// - The unique identifier of the legal entity to get PCI questionnaire information. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.GeneratePciDescriptionResponse GeneratePciQuestionnaire(string id, GeneratePciDescriptionRequest generatePciDescriptionRequest = default, RequestOptions requestOptions = default); - - /// - /// Generate PCI questionnaire - /// - /// - The unique identifier of the legal entity to get PCI questionnaire information. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GeneratePciQuestionnaireAsync(string id, GeneratePciDescriptionRequest generatePciDescriptionRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get PCI questionnaire - /// - /// - The legal entity ID of the individual who signed the PCI questionnaire. - /// - The unique identifier of the signed PCI questionnaire. - /// - Additional request options. - /// . - Model.LegalEntityManagement.GetPciQuestionnaireResponse GetPciQuestionnaire(string id, string pciid, RequestOptions requestOptions = default); - - /// - /// Get PCI questionnaire - /// - /// - The legal entity ID of the individual who signed the PCI questionnaire. - /// - The unique identifier of the signed PCI questionnaire. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPciQuestionnaireAsync(string id, string pciid, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get PCI questionnaire details - /// - /// - The unique identifier of the legal entity to get PCI questionnaire information. - /// - Additional request options. - /// . - Model.LegalEntityManagement.GetPciQuestionnaireInfosResponse GetPciQuestionnaireDetails(string id, RequestOptions requestOptions = default); - - /// - /// Get PCI questionnaire details - /// - /// - The unique identifier of the legal entity to get PCI questionnaire information. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPciQuestionnaireDetailsAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Sign PCI questionnaire - /// - /// - The legal entity ID of the user that has a contractual relationship with your platform. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.PciSigningResponse SignPciQuestionnaire(string id, PciSigningRequest pciSigningRequest = default, RequestOptions requestOptions = default); - - /// - /// Sign PCI questionnaire - /// - /// - The legal entity ID of the user that has a contractual relationship with your platform. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task SignPciQuestionnaireAsync(string id, PciSigningRequest pciSigningRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PCIQuestionnairesService API endpoints - /// - public class PCIQuestionnairesService : AbstractService, IPCIQuestionnairesService - { - private readonly string _baseUrl; - - public PCIQuestionnairesService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://kyc-test.adyen.com/lem/v4"); - } - - public Model.LegalEntityManagement.CalculatePciStatusResponse CalculatePciStatusOfLegalEntity(string id, CalculatePciStatusRequest calculatePciStatusRequest = default, RequestOptions requestOptions = default) - { - return CalculatePciStatusOfLegalEntityAsync(id, calculatePciStatusRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CalculatePciStatusOfLegalEntityAsync(string id, CalculatePciStatusRequest calculatePciStatusRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/pciQuestionnaires/signingRequired"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(calculatePciStatusRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.GeneratePciDescriptionResponse GeneratePciQuestionnaire(string id, GeneratePciDescriptionRequest generatePciDescriptionRequest = default, RequestOptions requestOptions = default) - { - return GeneratePciQuestionnaireAsync(id, generatePciDescriptionRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GeneratePciQuestionnaireAsync(string id, GeneratePciDescriptionRequest generatePciDescriptionRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/pciQuestionnaires/generatePciTemplates"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(generatePciDescriptionRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.GetPciQuestionnaireResponse GetPciQuestionnaire(string id, string pciid, RequestOptions requestOptions = default) - { - return GetPciQuestionnaireAsync(id, pciid, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPciQuestionnaireAsync(string id, string pciid, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/pciQuestionnaires/{pciid}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.GetPciQuestionnaireInfosResponse GetPciQuestionnaireDetails(string id, RequestOptions requestOptions = default) - { - return GetPciQuestionnaireDetailsAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPciQuestionnaireDetailsAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/pciQuestionnaires"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.PciSigningResponse SignPciQuestionnaire(string id, PciSigningRequest pciSigningRequest = default, RequestOptions requestOptions = default) - { - return SignPciQuestionnaireAsync(id, pciSigningRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SignPciQuestionnaireAsync(string id, PciSigningRequest pciSigningRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/pciQuestionnaires/signPciTemplates"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(pciSigningRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentService.cs b/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentService.cs deleted file mode 100644 index fad8a1eaa..000000000 --- a/Adyen/Service/LegalEntityManagement/TaxEDeliveryConsentService.cs +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.LegalEntityManagement; - -namespace Adyen.Service.LegalEntityManagement -{ - /// - /// TaxEDeliveryConsentService Interface - /// - public interface ITaxEDeliveryConsentService - { - /// - /// Check the status of consent for electronic delivery of tax forms - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - Additional request options. - /// . - Model.LegalEntityManagement.CheckTaxElectronicDeliveryConsentResponse CheckStatusOfConsentForElectronicDeliveryOfTaxForms(string id, RequestOptions requestOptions = default); - - /// - /// Check the status of consent for electronic delivery of tax forms - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CheckStatusOfConsentForElectronicDeliveryOfTaxFormsAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Set the consent status for electronic delivery of tax forms - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - - /// - Additional request options. - void SetConsentStatusForElectronicDeliveryOfTaxForms(string id, SetTaxElectronicDeliveryConsentRequest setTaxElectronicDeliveryConsentRequest = default, RequestOptions requestOptions = default); - - /// - /// Set the consent status for electronic delivery of tax forms - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task SetConsentStatusForElectronicDeliveryOfTaxFormsAsync(string id, SetTaxElectronicDeliveryConsentRequest setTaxElectronicDeliveryConsentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TaxEDeliveryConsentService API endpoints - /// - public class TaxEDeliveryConsentService : AbstractService, ITaxEDeliveryConsentService - { - private readonly string _baseUrl; - - public TaxEDeliveryConsentService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://kyc-test.adyen.com/lem/v4"); - } - - public Model.LegalEntityManagement.CheckTaxElectronicDeliveryConsentResponse CheckStatusOfConsentForElectronicDeliveryOfTaxForms(string id, RequestOptions requestOptions = default) - { - return CheckStatusOfConsentForElectronicDeliveryOfTaxFormsAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CheckStatusOfConsentForElectronicDeliveryOfTaxFormsAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/checkTaxElectronicDeliveryConsent"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public void SetConsentStatusForElectronicDeliveryOfTaxForms(string id, SetTaxElectronicDeliveryConsentRequest setTaxElectronicDeliveryConsentRequest = default, RequestOptions requestOptions = default) - { - SetConsentStatusForElectronicDeliveryOfTaxFormsAsync(id, setTaxElectronicDeliveryConsentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SetConsentStatusForElectronicDeliveryOfTaxFormsAsync(string id, SetTaxElectronicDeliveryConsentRequest setTaxElectronicDeliveryConsentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/setTaxElectronicDeliveryConsent"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(setTaxElectronicDeliveryConsentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/LegalEntityManagement/TermsOfServiceService.cs b/Adyen/Service/LegalEntityManagement/TermsOfServiceService.cs deleted file mode 100644 index f215ef771..000000000 --- a/Adyen/Service/LegalEntityManagement/TermsOfServiceService.cs +++ /dev/null @@ -1,199 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.LegalEntityManagement; - -namespace Adyen.Service.LegalEntityManagement -{ - /// - /// TermsOfServiceService Interface - /// - public interface ITermsOfServiceService - { - /// - /// Accept Terms of Service - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. For legal representatives of individuals, this is the ID of the individual. - /// - The unique identifier of the Terms of Service document. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.AcceptTermsOfServiceResponse AcceptTermsOfService(string id, string termsofservicedocumentid, AcceptTermsOfServiceRequest acceptTermsOfServiceRequest = default, RequestOptions requestOptions = default); - - /// - /// Accept Terms of Service - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. For legal representatives of individuals, this is the ID of the individual. - /// - The unique identifier of the Terms of Service document. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task AcceptTermsOfServiceAsync(string id, string termsofservicedocumentid, AcceptTermsOfServiceRequest acceptTermsOfServiceRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get accepted Terms of Service document - /// - /// - The unique identifier of the legal entity. For sole proprietorship, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - An Adyen-generated reference for the accepted Terms of Service. - /// - The format of the Terms of Service document. Possible values: **JSON**, **PDF**, or **TXT** - /// - Additional request options. - /// . - Model.LegalEntityManagement.GetAcceptedTermsOfServiceDocumentResponse GetAcceptedTermsOfServiceDocument(string id, string termsofserviceacceptancereference, string termsOfServiceDocumentFormat = default, RequestOptions requestOptions = default); - - /// - /// Get accepted Terms of Service document - /// - /// - The unique identifier of the legal entity. For sole proprietorship, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - An Adyen-generated reference for the accepted Terms of Service. - /// - The format of the Terms of Service document. Possible values: **JSON**, **PDF**, or **TXT** - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAcceptedTermsOfServiceDocumentAsync(string id, string termsofserviceacceptancereference, string termsOfServiceDocumentFormat = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get Terms of Service document - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.GetTermsOfServiceDocumentResponse GetTermsOfServiceDocument(string id, GetTermsOfServiceDocumentRequest getTermsOfServiceDocumentRequest = default, RequestOptions requestOptions = default); - - /// - /// Get Terms of Service document - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTermsOfServiceDocumentAsync(string id, GetTermsOfServiceDocumentRequest getTermsOfServiceDocumentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get Terms of Service information for a legal entity - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - Additional request options. - /// . - Model.LegalEntityManagement.GetTermsOfServiceAcceptanceInfosResponse GetTermsOfServiceInformationForLegalEntity(string id, RequestOptions requestOptions = default); - - /// - /// Get Terms of Service information for a legal entity - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTermsOfServiceInformationForLegalEntityAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get Terms of Service status - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - Additional request options. - /// . - Model.LegalEntityManagement.CalculateTermsOfServiceStatusResponse GetTermsOfServiceStatus(string id, RequestOptions requestOptions = default); - - /// - /// Get Terms of Service status - /// - /// - The unique identifier of the legal entity. For sole proprietorships, this is the individual legal entity ID of the owner. For organizations, this is the ID of the organization. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTermsOfServiceStatusAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TermsOfServiceService API endpoints - /// - public class TermsOfServiceService : AbstractService, ITermsOfServiceService - { - private readonly string _baseUrl; - - public TermsOfServiceService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://kyc-test.adyen.com/lem/v4"); - } - - public Model.LegalEntityManagement.AcceptTermsOfServiceResponse AcceptTermsOfService(string id, string termsofservicedocumentid, AcceptTermsOfServiceRequest acceptTermsOfServiceRequest = default, RequestOptions requestOptions = default) - { - return AcceptTermsOfServiceAsync(id, termsofservicedocumentid, acceptTermsOfServiceRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AcceptTermsOfServiceAsync(string id, string termsofservicedocumentid, AcceptTermsOfServiceRequest acceptTermsOfServiceRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/termsOfService/{termsofservicedocumentid}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(acceptTermsOfServiceRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.GetAcceptedTermsOfServiceDocumentResponse GetAcceptedTermsOfServiceDocument(string id, string termsofserviceacceptancereference, string termsOfServiceDocumentFormat = default, RequestOptions requestOptions = default) - { - return GetAcceptedTermsOfServiceDocumentAsync(id, termsofserviceacceptancereference, termsOfServiceDocumentFormat, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAcceptedTermsOfServiceDocumentAsync(string id, string termsofserviceacceptancereference, string termsOfServiceDocumentFormat = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (termsOfServiceDocumentFormat != null) queryParams.Add("termsOfServiceDocumentFormat", termsOfServiceDocumentFormat); - var endpoint = _baseUrl + $"/legalEntities/{id}/acceptedTermsOfServiceDocument/{termsofserviceacceptancereference}" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.GetTermsOfServiceDocumentResponse GetTermsOfServiceDocument(string id, GetTermsOfServiceDocumentRequest getTermsOfServiceDocumentRequest = default, RequestOptions requestOptions = default) - { - return GetTermsOfServiceDocumentAsync(id, getTermsOfServiceDocumentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTermsOfServiceDocumentAsync(string id, GetTermsOfServiceDocumentRequest getTermsOfServiceDocumentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/termsOfService"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getTermsOfServiceDocumentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.GetTermsOfServiceAcceptanceInfosResponse GetTermsOfServiceInformationForLegalEntity(string id, RequestOptions requestOptions = default) - { - return GetTermsOfServiceInformationForLegalEntityAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTermsOfServiceInformationForLegalEntityAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/termsOfServiceAcceptanceInfos"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.CalculateTermsOfServiceStatusResponse GetTermsOfServiceStatus(string id, RequestOptions requestOptions = default) - { - return GetTermsOfServiceStatusAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTermsOfServiceStatusAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/legalEntities/{id}/termsOfServiceStatus"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/LegalEntityManagement/TransferInstrumentsService.cs b/Adyen/Service/LegalEntityManagement/TransferInstrumentsService.cs deleted file mode 100644 index ad03cebc5..000000000 --- a/Adyen/Service/LegalEntityManagement/TransferInstrumentsService.cs +++ /dev/null @@ -1,157 +0,0 @@ -/* -* Legal Entity Management API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.LegalEntityManagement; - -namespace Adyen.Service.LegalEntityManagement -{ - /// - /// TransferInstrumentsService Interface - /// - public interface ITransferInstrumentsService - { - /// - /// Create a transfer instrument - /// - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.TransferInstrument CreateTransferInstrument(TransferInstrumentInfo transferInstrumentInfo = default, RequestOptions requestOptions = default); - - /// - /// Create a transfer instrument - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateTransferInstrumentAsync(TransferInstrumentInfo transferInstrumentInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a transfer instrument - /// - /// - The unique identifier of the transfer instrument to be deleted. - /// - Additional request options. - void DeleteTransferInstrument(string id, RequestOptions requestOptions = default); - - /// - /// Delete a transfer instrument - /// - /// - The unique identifier of the transfer instrument to be deleted. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeleteTransferInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a transfer instrument - /// - /// - The unique identifier of the transfer instrument. - /// - Additional request options. - /// . - Model.LegalEntityManagement.TransferInstrument GetTransferInstrument(string id, RequestOptions requestOptions = default); - - /// - /// Get a transfer instrument - /// - /// - The unique identifier of the transfer instrument. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTransferInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a transfer instrument - /// - /// - The unique identifier of the transfer instrument. - /// - - /// - Additional request options. - /// . - Model.LegalEntityManagement.TransferInstrument UpdateTransferInstrument(string id, TransferInstrumentInfo transferInstrumentInfo = default, RequestOptions requestOptions = default); - - /// - /// Update a transfer instrument - /// - /// - The unique identifier of the transfer instrument. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTransferInstrumentAsync(string id, TransferInstrumentInfo transferInstrumentInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TransferInstrumentsService API endpoints - /// - public class TransferInstrumentsService : AbstractService, ITransferInstrumentsService - { - private readonly string _baseUrl; - - public TransferInstrumentsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://kyc-test.adyen.com/lem/v4"); - } - - public Model.LegalEntityManagement.TransferInstrument CreateTransferInstrument(TransferInstrumentInfo transferInstrumentInfo = default, RequestOptions requestOptions = default) - { - return CreateTransferInstrumentAsync(transferInstrumentInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateTransferInstrumentAsync(TransferInstrumentInfo transferInstrumentInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/transferInstruments"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(transferInstrumentInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public void DeleteTransferInstrument(string id, RequestOptions requestOptions = default) - { - DeleteTransferInstrumentAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteTransferInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transferInstruments/{id}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.TransferInstrument GetTransferInstrument(string id, RequestOptions requestOptions = default) - { - return GetTransferInstrumentAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTransferInstrumentAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transferInstruments/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.LegalEntityManagement.TransferInstrument UpdateTransferInstrument(string id, TransferInstrumentInfo transferInstrumentInfo = default, RequestOptions requestOptions = default) - { - return UpdateTransferInstrumentAsync(id, transferInstrumentInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTransferInstrumentAsync(string id, TransferInstrumentInfo transferInstrumentInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transferInstruments/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(transferInstrumentInfo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/APICredentialsCompanyLevelService.cs b/Adyen/Service/Management/APICredentialsCompanyLevelService.cs deleted file mode 100644 index 55e6938d6..000000000 --- a/Adyen/Service/Management/APICredentialsCompanyLevelService.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// APICredentialsCompanyLevelService Interface - /// - public interface IAPICredentialsCompanyLevelService - { - /// - /// Create an API credential. - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// . - Model.Management.CreateCompanyApiCredentialResponse CreateApiCredential(string companyId, CreateCompanyApiCredentialRequest createCompanyApiCredentialRequest = default, RequestOptions requestOptions = default); - - /// - /// Create an API credential. - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateApiCredentialAsync(string companyId, CreateCompanyApiCredentialRequest createCompanyApiCredentialRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an API credential - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// . - Model.Management.CompanyApiCredential GetApiCredential(string companyId, string apiCredentialId, RequestOptions requestOptions = default); - - /// - /// Get an API credential - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetApiCredentialAsync(string companyId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of API credentials - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// . - Model.Management.ListCompanyApiCredentialsResponse ListApiCredentials(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// Get a list of API credentials - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListApiCredentialsAsync(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update an API credential. - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - - /// - Additional request options. - /// . - Model.Management.CompanyApiCredential UpdateApiCredential(string companyId, string apiCredentialId, UpdateCompanyApiCredentialRequest updateCompanyApiCredentialRequest = default, RequestOptions requestOptions = default); - - /// - /// Update an API credential. - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateApiCredentialAsync(string companyId, string apiCredentialId, UpdateCompanyApiCredentialRequest updateCompanyApiCredentialRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the APICredentialsCompanyLevelService API endpoints - /// - public class APICredentialsCompanyLevelService : AbstractService, IAPICredentialsCompanyLevelService - { - private readonly string _baseUrl; - - public APICredentialsCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.CreateCompanyApiCredentialResponse CreateApiCredential(string companyId, CreateCompanyApiCredentialRequest createCompanyApiCredentialRequest = default, RequestOptions requestOptions = default) - { - return CreateApiCredentialAsync(companyId, createCompanyApiCredentialRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateApiCredentialAsync(string companyId, CreateCompanyApiCredentialRequest createCompanyApiCredentialRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createCompanyApiCredentialRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.CompanyApiCredential GetApiCredential(string companyId, string apiCredentialId, RequestOptions requestOptions = default) - { - return GetApiCredentialAsync(companyId, apiCredentialId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetApiCredentialAsync(string companyId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListCompanyApiCredentialsResponse ListApiCredentials(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListApiCredentialsAsync(companyId, pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListApiCredentialsAsync(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.CompanyApiCredential UpdateApiCredential(string companyId, string apiCredentialId, UpdateCompanyApiCredentialRequest updateCompanyApiCredentialRequest = default, RequestOptions requestOptions = default) - { - return UpdateApiCredentialAsync(companyId, apiCredentialId, updateCompanyApiCredentialRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateApiCredentialAsync(string companyId, string apiCredentialId, UpdateCompanyApiCredentialRequest updateCompanyApiCredentialRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateCompanyApiCredentialRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/APICredentialsMerchantLevelService.cs b/Adyen/Service/Management/APICredentialsMerchantLevelService.cs deleted file mode 100644 index 70c1f663b..000000000 --- a/Adyen/Service/Management/APICredentialsMerchantLevelService.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// APICredentialsMerchantLevelService Interface - /// - public interface IAPICredentialsMerchantLevelService - { - /// - /// Create an API credential - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.CreateApiCredentialResponse CreateApiCredential(string merchantId, CreateMerchantApiCredentialRequest createMerchantApiCredentialRequest = default, RequestOptions requestOptions = default); - - /// - /// Create an API credential - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateApiCredentialAsync(string merchantId, CreateMerchantApiCredentialRequest createMerchantApiCredentialRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an API credential - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// . - Model.Management.ApiCredential GetApiCredential(string merchantId, string apiCredentialId, RequestOptions requestOptions = default); - - /// - /// Get an API credential - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetApiCredentialAsync(string merchantId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of API credentials - /// - /// - The unique identifier of the merchant account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// . - Model.Management.ListMerchantApiCredentialsResponse ListApiCredentials(string merchantId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// Get a list of API credentials - /// - /// - The unique identifier of the merchant account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListApiCredentialsAsync(string merchantId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update an API credential - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - - /// - Additional request options. - /// . - Model.Management.ApiCredential UpdateApiCredential(string merchantId, string apiCredentialId, UpdateMerchantApiCredentialRequest updateMerchantApiCredentialRequest = default, RequestOptions requestOptions = default); - - /// - /// Update an API credential - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateApiCredentialAsync(string merchantId, string apiCredentialId, UpdateMerchantApiCredentialRequest updateMerchantApiCredentialRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the APICredentialsMerchantLevelService API endpoints - /// - public class APICredentialsMerchantLevelService : AbstractService, IAPICredentialsMerchantLevelService - { - private readonly string _baseUrl; - - public APICredentialsMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.CreateApiCredentialResponse CreateApiCredential(string merchantId, CreateMerchantApiCredentialRequest createMerchantApiCredentialRequest = default, RequestOptions requestOptions = default) - { - return CreateApiCredentialAsync(merchantId, createMerchantApiCredentialRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateApiCredentialAsync(string merchantId, CreateMerchantApiCredentialRequest createMerchantApiCredentialRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createMerchantApiCredentialRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ApiCredential GetApiCredential(string merchantId, string apiCredentialId, RequestOptions requestOptions = default) - { - return GetApiCredentialAsync(merchantId, apiCredentialId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetApiCredentialAsync(string merchantId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListMerchantApiCredentialsResponse ListApiCredentials(string merchantId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListApiCredentialsAsync(merchantId, pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListApiCredentialsAsync(string merchantId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ApiCredential UpdateApiCredential(string merchantId, string apiCredentialId, UpdateMerchantApiCredentialRequest updateMerchantApiCredentialRequest = default, RequestOptions requestOptions = default) - { - return UpdateApiCredentialAsync(merchantId, apiCredentialId, updateMerchantApiCredentialRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateApiCredentialAsync(string merchantId, string apiCredentialId, UpdateMerchantApiCredentialRequest updateMerchantApiCredentialRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateMerchantApiCredentialRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/APIKeyCompanyLevelService.cs b/Adyen/Service/Management/APIKeyCompanyLevelService.cs deleted file mode 100644 index edef15239..000000000 --- a/Adyen/Service/Management/APIKeyCompanyLevelService.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// APIKeyCompanyLevelService Interface - /// - public interface IAPIKeyCompanyLevelService - { - /// - /// Generate new API key - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// . - Model.Management.GenerateApiKeyResponse GenerateNewApiKey(string companyId, string apiCredentialId, RequestOptions requestOptions = default); - - /// - /// Generate new API key - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GenerateNewApiKeyAsync(string companyId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the APIKeyCompanyLevelService API endpoints - /// - public class APIKeyCompanyLevelService : AbstractService, IAPIKeyCompanyLevelService - { - private readonly string _baseUrl; - - public APIKeyCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.GenerateApiKeyResponse GenerateNewApiKey(string companyId, string apiCredentialId, RequestOptions requestOptions = default) - { - return GenerateNewApiKeyAsync(companyId, apiCredentialId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GenerateNewApiKeyAsync(string companyId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}/generateApiKey"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/APIKeyMerchantLevelService.cs b/Adyen/Service/Management/APIKeyMerchantLevelService.cs deleted file mode 100644 index 0770db10c..000000000 --- a/Adyen/Service/Management/APIKeyMerchantLevelService.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// APIKeyMerchantLevelService Interface - /// - public interface IAPIKeyMerchantLevelService - { - /// - /// Generate new API key - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// . - Model.Management.GenerateApiKeyResponse GenerateNewApiKey(string merchantId, string apiCredentialId, RequestOptions requestOptions = default); - - /// - /// Generate new API key - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GenerateNewApiKeyAsync(string merchantId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the APIKeyMerchantLevelService API endpoints - /// - public class APIKeyMerchantLevelService : AbstractService, IAPIKeyMerchantLevelService - { - private readonly string _baseUrl; - - public APIKeyMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.GenerateApiKeyResponse GenerateNewApiKey(string merchantId, string apiCredentialId, RequestOptions requestOptions = default) - { - return GenerateNewApiKeyAsync(merchantId, apiCredentialId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GenerateNewApiKeyAsync(string merchantId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateApiKey"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/AccountCompanyLevelService.cs b/Adyen/Service/Management/AccountCompanyLevelService.cs deleted file mode 100644 index eea8789a0..000000000 --- a/Adyen/Service/Management/AccountCompanyLevelService.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// AccountCompanyLevelService Interface - /// - public interface IAccountCompanyLevelService - { - /// - /// Get a company account - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// . - Model.Management.Company GetCompanyAccount(string companyId, RequestOptions requestOptions = default); - - /// - /// Get a company account - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetCompanyAccountAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of company accounts - /// - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// . - Model.Management.ListCompanyResponse ListCompanyAccounts(int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// Get a list of company accounts - /// - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListCompanyAccountsAsync(int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of merchant accounts - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// . - Model.Management.ListMerchantResponse ListMerchantAccounts(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// Get a list of merchant accounts - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListMerchantAccountsAsync(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AccountCompanyLevelService API endpoints - /// - public class AccountCompanyLevelService : AbstractService, IAccountCompanyLevelService - { - private readonly string _baseUrl; - - public AccountCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.Company GetCompanyAccount(string companyId, RequestOptions requestOptions = default) - { - return GetCompanyAccountAsync(companyId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetCompanyAccountAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListCompanyResponse ListCompanyAccounts(int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListCompanyAccountsAsync(pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListCompanyAccountsAsync(int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + "/companies" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListMerchantResponse ListMerchantAccounts(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListMerchantAccountsAsync(companyId, pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListMerchantAccountsAsync(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + $"/companies/{companyId}/merchants" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/AccountMerchantLevelService.cs b/Adyen/Service/Management/AccountMerchantLevelService.cs deleted file mode 100644 index 700286e5a..000000000 --- a/Adyen/Service/Management/AccountMerchantLevelService.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// AccountMerchantLevelService Interface - /// - public interface IAccountMerchantLevelService - { - /// - /// Create a merchant account - /// - /// - - /// - Additional request options. - /// . - Model.Management.CreateMerchantResponse CreateMerchantAccount(CreateMerchantRequest createMerchantRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a merchant account - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateMerchantAccountAsync(CreateMerchantRequest createMerchantRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a merchant account - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// . - Model.Management.Merchant GetMerchantAccount(string merchantId, RequestOptions requestOptions = default); - - /// - /// Get a merchant account - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetMerchantAccountAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of merchant accounts - /// - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// . - Model.Management.ListMerchantResponse ListMerchantAccounts(int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// Get a list of merchant accounts - /// - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListMerchantAccountsAsync(int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Request to activate a merchant account - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// . - Model.Management.RequestActivationResponse RequestToActivateMerchantAccount(string merchantId, RequestOptions requestOptions = default); - - /// - /// Request to activate a merchant account - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RequestToActivateMerchantAccountAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AccountMerchantLevelService API endpoints - /// - public class AccountMerchantLevelService : AbstractService, IAccountMerchantLevelService - { - private readonly string _baseUrl; - - public AccountMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.CreateMerchantResponse CreateMerchantAccount(CreateMerchantRequest createMerchantRequest = default, RequestOptions requestOptions = default) - { - return CreateMerchantAccountAsync(createMerchantRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateMerchantAccountAsync(CreateMerchantRequest createMerchantRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/merchants"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createMerchantRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Merchant GetMerchantAccount(string merchantId, RequestOptions requestOptions = default) - { - return GetMerchantAccountAsync(merchantId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetMerchantAccountAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListMerchantResponse ListMerchantAccounts(int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListMerchantAccountsAsync(pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListMerchantAccountsAsync(int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + "/merchants" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.RequestActivationResponse RequestToActivateMerchantAccount(string merchantId, RequestOptions requestOptions = default) - { - return RequestToActivateMerchantAccountAsync(merchantId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RequestToActivateMerchantAccountAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/activate"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/AccountStoreLevelService.cs b/Adyen/Service/Management/AccountStoreLevelService.cs deleted file mode 100644 index 2df2b47d7..000000000 --- a/Adyen/Service/Management/AccountStoreLevelService.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// AccountStoreLevelService Interface - /// - public interface IAccountStoreLevelService - { - /// - /// Create a store - /// - /// - - /// - Additional request options. - /// . - Model.Management.Store CreateStore(StoreCreationWithMerchantCodeRequest storeCreationWithMerchantCodeRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a store - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateStoreAsync(StoreCreationWithMerchantCodeRequest storeCreationWithMerchantCodeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a store - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.Store CreateStoreByMerchantId(string merchantId, StoreCreationRequest storeCreationRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a store - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateStoreByMerchantIdAsync(string merchantId, StoreCreationRequest storeCreationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a store - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store. - /// - Additional request options. - /// . - Model.Management.Store GetStore(string merchantId, string storeId, RequestOptions requestOptions = default); - - /// - /// Get a store - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetStoreAsync(string merchantId, string storeId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a store - /// - /// - The unique identifier of the store. - /// - Additional request options. - /// . - Model.Management.Store GetStoreById(string storeId, RequestOptions requestOptions = default); - - /// - /// Get a store - /// - /// - The unique identifier of the store. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetStoreByIdAsync(string storeId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of stores - /// - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - The reference of the store. - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// . - Model.Management.ListStoresResponse ListStores(int? pageNumber = default, int? pageSize = default, string reference = default, string merchantId = default, RequestOptions requestOptions = default); - - /// - /// Get a list of stores - /// - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - The reference of the store. - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListStoresAsync(int? pageNumber = default, int? pageSize = default, string reference = default, string merchantId = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of stores - /// - /// - The unique identifier of the merchant account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - The reference of the store. - /// - Additional request options. - /// . - Model.Management.ListStoresResponse ListStoresByMerchantId(string merchantId, int? pageNumber = default, int? pageSize = default, string reference = default, RequestOptions requestOptions = default); - - /// - /// Get a list of stores - /// - /// - The unique identifier of the merchant account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - The reference of the store. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListStoresByMerchantIdAsync(string merchantId, int? pageNumber = default, int? pageSize = default, string reference = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a store - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store. - /// - - /// - Additional request options. - /// . - Model.Management.Store UpdateStore(string merchantId, string storeId, UpdateStoreRequest updateStoreRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a store - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateStoreAsync(string merchantId, string storeId, UpdateStoreRequest updateStoreRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a store - /// - /// - The unique identifier of the store. - /// - - /// - Additional request options. - /// . - Model.Management.Store UpdateStoreById(string storeId, UpdateStoreRequest updateStoreRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a store - /// - /// - The unique identifier of the store. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateStoreByIdAsync(string storeId, UpdateStoreRequest updateStoreRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AccountStoreLevelService API endpoints - /// - public class AccountStoreLevelService : AbstractService, IAccountStoreLevelService - { - private readonly string _baseUrl; - - public AccountStoreLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.Store CreateStore(StoreCreationWithMerchantCodeRequest storeCreationWithMerchantCodeRequest = default, RequestOptions requestOptions = default) - { - return CreateStoreAsync(storeCreationWithMerchantCodeRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateStoreAsync(StoreCreationWithMerchantCodeRequest storeCreationWithMerchantCodeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/stores"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storeCreationWithMerchantCodeRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Store CreateStoreByMerchantId(string merchantId, StoreCreationRequest storeCreationRequest = default, RequestOptions requestOptions = default) - { - return CreateStoreByMerchantIdAsync(merchantId, storeCreationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateStoreByMerchantIdAsync(string merchantId, StoreCreationRequest storeCreationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storeCreationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Store GetStore(string merchantId, string storeId, RequestOptions requestOptions = default) - { - return GetStoreAsync(merchantId, storeId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetStoreAsync(string merchantId, string storeId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{storeId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Store GetStoreById(string storeId, RequestOptions requestOptions = default) - { - return GetStoreByIdAsync(storeId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetStoreByIdAsync(string storeId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/stores/{storeId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListStoresResponse ListStores(int? pageNumber = default, int? pageSize = default, string reference = default, string merchantId = default, RequestOptions requestOptions = default) - { - return ListStoresAsync(pageNumber, pageSize, reference, merchantId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListStoresAsync(int? pageNumber = default, int? pageSize = default, string reference = default, string merchantId = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - if (reference != null) queryParams.Add("reference", reference); - if (merchantId != null) queryParams.Add("merchantId", merchantId); - var endpoint = _baseUrl + "/stores" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListStoresResponse ListStoresByMerchantId(string merchantId, int? pageNumber = default, int? pageSize = default, string reference = default, RequestOptions requestOptions = default) - { - return ListStoresByMerchantIdAsync(merchantId, pageNumber, pageSize, reference, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListStoresByMerchantIdAsync(string merchantId, int? pageNumber = default, int? pageSize = default, string reference = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - if (reference != null) queryParams.Add("reference", reference); - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Store UpdateStore(string merchantId, string storeId, UpdateStoreRequest updateStoreRequest = default, RequestOptions requestOptions = default) - { - return UpdateStoreAsync(merchantId, storeId, updateStoreRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateStoreAsync(string merchantId, string storeId, UpdateStoreRequest updateStoreRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{storeId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateStoreRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Store UpdateStoreById(string storeId, UpdateStoreRequest updateStoreRequest = default, RequestOptions requestOptions = default) - { - return UpdateStoreByIdAsync(storeId, updateStoreRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateStoreByIdAsync(string storeId, UpdateStoreRequest updateStoreRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/stores/{storeId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateStoreRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/AllowedOriginsCompanyLevelService.cs b/Adyen/Service/Management/AllowedOriginsCompanyLevelService.cs deleted file mode 100644 index c354522d6..000000000 --- a/Adyen/Service/Management/AllowedOriginsCompanyLevelService.cs +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// AllowedOriginsCompanyLevelService Interface - /// - public interface IAllowedOriginsCompanyLevelService - { - /// - /// Create an allowed origin - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - - /// - Additional request options. - /// . - Model.Management.AllowedOrigin CreateAllowedOrigin(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default); - - /// - /// Create an allowed origin - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateAllowedOriginAsync(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete an allowed origin - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Unique identifier of the allowed origin. - /// - Additional request options. - void DeleteAllowedOrigin(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default); - - /// - /// Delete an allowed origin - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeleteAllowedOriginAsync(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an allowed origin - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// . - Model.Management.AllowedOrigin GetAllowedOrigin(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default); - - /// - /// Get an allowed origin - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllowedOriginAsync(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of allowed origins - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// . - Model.Management.AllowedOriginsResponse ListAllowedOrigins(string companyId, string apiCredentialId, RequestOptions requestOptions = default); - - /// - /// Get a list of allowed origins - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListAllowedOriginsAsync(string companyId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AllowedOriginsCompanyLevelService API endpoints - /// - public class AllowedOriginsCompanyLevelService : AbstractService, IAllowedOriginsCompanyLevelService - { - private readonly string _baseUrl; - - public AllowedOriginsCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.AllowedOrigin CreateAllowedOrigin(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default) - { - return CreateAllowedOriginAsync(companyId, apiCredentialId, allowedOrigin, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateAllowedOriginAsync(string companyId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(allowedOrigin.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public void DeleteAllowedOrigin(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default) - { - DeleteAllowedOriginAsync(companyId, apiCredentialId, originId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteAllowedOriginAsync(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.AllowedOrigin GetAllowedOrigin(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default) - { - return GetAllowedOriginAsync(companyId, apiCredentialId, originId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllowedOriginAsync(string companyId, string apiCredentialId, string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.AllowedOriginsResponse ListAllowedOrigins(string companyId, string apiCredentialId, RequestOptions requestOptions = default) - { - return ListAllowedOriginsAsync(companyId, apiCredentialId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListAllowedOriginsAsync(string companyId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/AllowedOriginsMerchantLevelService.cs b/Adyen/Service/Management/AllowedOriginsMerchantLevelService.cs deleted file mode 100644 index f47988715..000000000 --- a/Adyen/Service/Management/AllowedOriginsMerchantLevelService.cs +++ /dev/null @@ -1,169 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// AllowedOriginsMerchantLevelService Interface - /// - public interface IAllowedOriginsMerchantLevelService - { - /// - /// Create an allowed origin - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - - /// - Additional request options. - /// . - Model.Management.AllowedOrigin CreateAllowedOrigin(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default); - - /// - /// Create an allowed origin - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateAllowedOriginAsync(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete an allowed origin - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Unique identifier of the allowed origin. - /// - Additional request options. - void DeleteAllowedOrigin(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default); - - /// - /// Delete an allowed origin - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeleteAllowedOriginAsync(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an allowed origin - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// . - Model.Management.AllowedOrigin GetAllowedOrigin(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default); - - /// - /// Get an allowed origin - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllowedOriginAsync(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of allowed origins - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// . - Model.Management.AllowedOriginsResponse ListAllowedOrigins(string merchantId, string apiCredentialId, RequestOptions requestOptions = default); - - /// - /// Get a list of allowed origins - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListAllowedOriginsAsync(string merchantId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AllowedOriginsMerchantLevelService API endpoints - /// - public class AllowedOriginsMerchantLevelService : AbstractService, IAllowedOriginsMerchantLevelService - { - private readonly string _baseUrl; - - public AllowedOriginsMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.AllowedOrigin CreateAllowedOrigin(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default) - { - return CreateAllowedOriginAsync(merchantId, apiCredentialId, allowedOrigin, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateAllowedOriginAsync(string merchantId, string apiCredentialId, AllowedOrigin allowedOrigin = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(allowedOrigin.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public void DeleteAllowedOrigin(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default) - { - DeleteAllowedOriginAsync(merchantId, apiCredentialId, originId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteAllowedOriginAsync(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.AllowedOrigin GetAllowedOrigin(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default) - { - return GetAllowedOriginAsync(merchantId, apiCredentialId, originId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllowedOriginAsync(string merchantId, string apiCredentialId, string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.AllowedOriginsResponse ListAllowedOrigins(string merchantId, string apiCredentialId, RequestOptions requestOptions = default) - { - return ListAllowedOriginsAsync(merchantId, apiCredentialId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListAllowedOriginsAsync(string merchantId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/AndroidFilesCompanyLevelService.cs b/Adyen/Service/Management/AndroidFilesCompanyLevelService.cs deleted file mode 100644 index 55e259b7d..000000000 --- a/Adyen/Service/Management/AndroidFilesCompanyLevelService.cs +++ /dev/null @@ -1,244 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// AndroidFilesCompanyLevelService Interface - /// - public interface IAndroidFilesCompanyLevelService - { - /// - /// Get Android app - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the app. - /// - Additional request options. - /// . - Model.Management.AndroidApp GetAndroidApp(string companyId, string id, RequestOptions requestOptions = default); - - /// - /// Get Android app - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the app. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAndroidAppAsync(string companyId, string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of Android apps - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 20 items on a page. - /// - The package name that uniquely identifies the Android app. - /// - The version number of the app. - /// - Additional request options. - /// . - Model.Management.AndroidAppsResponse ListAndroidApps(string companyId, int? pageNumber = default, int? pageSize = default, string packageName = default, int? versionCode = default, RequestOptions requestOptions = default); - - /// - /// Get a list of Android apps - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 20 items on a page. - /// - The package name that uniquely identifies the Android app. - /// - The version number of the app. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListAndroidAppsAsync(string companyId, int? pageNumber = default, int? pageSize = default, string packageName = default, int? versionCode = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of Android certificates - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 20 items on a page. - /// - The name of the certificate. - /// - Additional request options. - /// . - Model.Management.AndroidCertificatesResponse ListAndroidCertificates(string companyId, int? pageNumber = default, int? pageSize = default, string certificateName = default, RequestOptions requestOptions = default); - - /// - /// Get a list of Android certificates - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 20 items on a page. - /// - The name of the certificate. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListAndroidCertificatesAsync(string companyId, int? pageNumber = default, int? pageSize = default, string certificateName = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Reprocess Android App - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the app. - /// - Additional request options. - /// . - Model.Management.ReprocessAndroidAppResponse ReprocessAndroidApp(string companyId, string id, RequestOptions requestOptions = default); - - /// - /// Reprocess Android App - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the app. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ReprocessAndroidAppAsync(string companyId, string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Upload Android App - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// . - Model.Management.UploadAndroidAppResponse UploadAndroidApp(string companyId, RequestOptions requestOptions = default); - - /// - /// Upload Android App - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UploadAndroidAppAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Upload Android Certificate - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// . - Model.Management.UploadAndroidCertificateResponse UploadAndroidCertificate(string companyId, RequestOptions requestOptions = default); - - /// - /// Upload Android Certificate - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UploadAndroidCertificateAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AndroidFilesCompanyLevelService API endpoints - /// - public class AndroidFilesCompanyLevelService : AbstractService, IAndroidFilesCompanyLevelService - { - private readonly string _baseUrl; - - public AndroidFilesCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.AndroidApp GetAndroidApp(string companyId, string id, RequestOptions requestOptions = default) - { - return GetAndroidAppAsync(companyId, id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAndroidAppAsync(string companyId, string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/androidApps/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.AndroidAppsResponse ListAndroidApps(string companyId, int? pageNumber = default, int? pageSize = default, string packageName = default, int? versionCode = default, RequestOptions requestOptions = default) - { - return ListAndroidAppsAsync(companyId, pageNumber, pageSize, packageName, versionCode, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListAndroidAppsAsync(string companyId, int? pageNumber = default, int? pageSize = default, string packageName = default, int? versionCode = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - if (packageName != null) queryParams.Add("packageName", packageName); - if (versionCode != null) queryParams.Add("versionCode", versionCode.ToString()); - var endpoint = _baseUrl + $"/companies/{companyId}/androidApps" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.AndroidCertificatesResponse ListAndroidCertificates(string companyId, int? pageNumber = default, int? pageSize = default, string certificateName = default, RequestOptions requestOptions = default) - { - return ListAndroidCertificatesAsync(companyId, pageNumber, pageSize, certificateName, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListAndroidCertificatesAsync(string companyId, int? pageNumber = default, int? pageSize = default, string certificateName = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - if (certificateName != null) queryParams.Add("certificateName", certificateName); - var endpoint = _baseUrl + $"/companies/{companyId}/androidCertificates" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ReprocessAndroidAppResponse ReprocessAndroidApp(string companyId, string id, RequestOptions requestOptions = default) - { - return ReprocessAndroidAppAsync(companyId, id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ReprocessAndroidAppAsync(string companyId, string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/androidApps/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.UploadAndroidAppResponse UploadAndroidApp(string companyId, RequestOptions requestOptions = default) - { - return UploadAndroidAppAsync(companyId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UploadAndroidAppAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/androidApps"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.UploadAndroidCertificateResponse UploadAndroidCertificate(string companyId, RequestOptions requestOptions = default) - { - return UploadAndroidCertificateAsync(companyId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UploadAndroidCertificateAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/androidCertificates"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/ClientKeyCompanyLevelService.cs b/Adyen/Service/Management/ClientKeyCompanyLevelService.cs deleted file mode 100644 index 338b7f8d3..000000000 --- a/Adyen/Service/Management/ClientKeyCompanyLevelService.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// ClientKeyCompanyLevelService Interface - /// - public interface IClientKeyCompanyLevelService - { - /// - /// Generate new client key - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// . - Model.Management.GenerateClientKeyResponse GenerateNewClientKey(string companyId, string apiCredentialId, RequestOptions requestOptions = default); - - /// - /// Generate new client key - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GenerateNewClientKeyAsync(string companyId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the ClientKeyCompanyLevelService API endpoints - /// - public class ClientKeyCompanyLevelService : AbstractService, IClientKeyCompanyLevelService - { - private readonly string _baseUrl; - - public ClientKeyCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.GenerateClientKeyResponse GenerateNewClientKey(string companyId, string apiCredentialId, RequestOptions requestOptions = default) - { - return GenerateNewClientKeyAsync(companyId, apiCredentialId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GenerateNewClientKeyAsync(string companyId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/apiCredentials/{apiCredentialId}/generateClientKey"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/ClientKeyMerchantLevelService.cs b/Adyen/Service/Management/ClientKeyMerchantLevelService.cs deleted file mode 100644 index 5d6adce76..000000000 --- a/Adyen/Service/Management/ClientKeyMerchantLevelService.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// ClientKeyMerchantLevelService Interface - /// - public interface IClientKeyMerchantLevelService - { - /// - /// Generate new client key - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// . - Model.Management.GenerateClientKeyResponse GenerateNewClientKey(string merchantId, string apiCredentialId, RequestOptions requestOptions = default); - - /// - /// Generate new client key - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the API credential. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GenerateNewClientKeyAsync(string merchantId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the ClientKeyMerchantLevelService API endpoints - /// - public class ClientKeyMerchantLevelService : AbstractService, IClientKeyMerchantLevelService - { - private readonly string _baseUrl; - - public ClientKeyMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.GenerateClientKeyResponse GenerateNewClientKey(string merchantId, string apiCredentialId, RequestOptions requestOptions = default) - { - return GenerateNewClientKeyAsync(merchantId, apiCredentialId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GenerateNewClientKeyAsync(string merchantId, string apiCredentialId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateClientKey"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/MyAPICredentialService.cs b/Adyen/Service/Management/MyAPICredentialService.cs deleted file mode 100644 index 208fb6997..000000000 --- a/Adyen/Service/Management/MyAPICredentialService.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// MyAPICredentialService Interface - /// - public interface IMyAPICredentialService - { - /// - /// Add allowed origin - /// - /// - - /// - Additional request options. - /// . - Model.Management.AllowedOrigin AddAllowedOrigin(CreateAllowedOriginRequest createAllowedOriginRequest = default, RequestOptions requestOptions = default); - - /// - /// Add allowed origin - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task AddAllowedOriginAsync(CreateAllowedOriginRequest createAllowedOriginRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Generate a client key - /// - /// - Additional request options. - /// . - Model.Management.GenerateClientKeyResponse GenerateClientKey(RequestOptions requestOptions = default); - - /// - /// Generate a client key - /// - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GenerateClientKeyAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get allowed origin details - /// - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// . - Model.Management.AllowedOrigin GetAllowedOriginDetails(string originId, RequestOptions requestOptions = default); - - /// - /// Get allowed origin details - /// - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllowedOriginDetailsAsync(string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get allowed origins - /// - /// - Additional request options. - /// . - Model.Management.AllowedOriginsResponse GetAllowedOrigins(RequestOptions requestOptions = default); - - /// - /// Get allowed origins - /// - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllowedOriginsAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get API credential details - /// - /// - Additional request options. - /// . - Model.Management.MeApiCredential GetApiCredentialDetails(RequestOptions requestOptions = default); - - /// - /// Get API credential details - /// - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetApiCredentialDetailsAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Remove allowed origin - /// - /// - Unique identifier of the allowed origin. - /// - Additional request options. - void RemoveAllowedOrigin(string originId, RequestOptions requestOptions = default); - - /// - /// Remove allowed origin - /// - /// - Unique identifier of the allowed origin. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task RemoveAllowedOriginAsync(string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the MyAPICredentialService API endpoints - /// - public class MyAPICredentialService : AbstractService, IMyAPICredentialService - { - private readonly string _baseUrl; - - public MyAPICredentialService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.AllowedOrigin AddAllowedOrigin(CreateAllowedOriginRequest createAllowedOriginRequest = default, RequestOptions requestOptions = default) - { - return AddAllowedOriginAsync(createAllowedOriginRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AddAllowedOriginAsync(CreateAllowedOriginRequest createAllowedOriginRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/me/allowedOrigins"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createAllowedOriginRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.GenerateClientKeyResponse GenerateClientKey(RequestOptions requestOptions = default) - { - return GenerateClientKeyAsync(requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GenerateClientKeyAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/me/generateClientKey"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.AllowedOrigin GetAllowedOriginDetails(string originId, RequestOptions requestOptions = default) - { - return GetAllowedOriginDetailsAsync(originId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllowedOriginDetailsAsync(string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/me/allowedOrigins/{originId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.AllowedOriginsResponse GetAllowedOrigins(RequestOptions requestOptions = default) - { - return GetAllowedOriginsAsync(requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllowedOriginsAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/me/allowedOrigins"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.MeApiCredential GetApiCredentialDetails(RequestOptions requestOptions = default) - { - return GetApiCredentialDetailsAsync(requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetApiCredentialDetailsAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/me"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public void RemoveAllowedOrigin(string originId, RequestOptions requestOptions = default) - { - RemoveAllowedOriginAsync(originId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RemoveAllowedOriginAsync(string originId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/me/allowedOrigins/{originId}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/PaymentMethodsMerchantLevelService.cs b/Adyen/Service/Management/PaymentMethodsMerchantLevelService.cs deleted file mode 100644 index 75d5ef32e..000000000 --- a/Adyen/Service/Management/PaymentMethodsMerchantLevelService.cs +++ /dev/null @@ -1,241 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// PaymentMethodsMerchantLevelService Interface - /// - public interface IPaymentMethodsMerchantLevelService - { - /// - /// Add an Apple Pay domain - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payment method. - /// - - /// - Additional request options. - void AddApplePayDomain(string merchantId, string paymentMethodId, ApplePayInfo applePayInfo = default, RequestOptions requestOptions = default); - - /// - /// Add an Apple Pay domain - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payment method. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task AddApplePayDomainAsync(string merchantId, string paymentMethodId, ApplePayInfo applePayInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all payment methods - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store for which to return the payment methods. - /// - The unique identifier of the Business Line for which to return the payment methods. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - The number of the page to fetch. - /// - Additional request options. - /// . - Model.Management.PaymentMethodResponse GetAllPaymentMethods(string merchantId, string storeId = default, string businessLineId = default, int? pageSize = default, int? pageNumber = default, RequestOptions requestOptions = default); - - /// - /// Get all payment methods - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store for which to return the payment methods. - /// - The unique identifier of the Business Line for which to return the payment methods. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - The number of the page to fetch. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllPaymentMethodsAsync(string merchantId, string storeId = default, string businessLineId = default, int? pageSize = default, int? pageNumber = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get Apple Pay domains - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payment method. - /// - Additional request options. - /// . - Model.Management.ApplePayInfo GetApplePayDomains(string merchantId, string paymentMethodId, RequestOptions requestOptions = default); - - /// - /// Get Apple Pay domains - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payment method. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetApplePayDomainsAsync(string merchantId, string paymentMethodId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get payment method details - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payment method. - /// - Additional request options. - /// . - Model.Management.PaymentMethod GetPaymentMethodDetails(string merchantId, string paymentMethodId, RequestOptions requestOptions = default); - - /// - /// Get payment method details - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payment method. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPaymentMethodDetailsAsync(string merchantId, string paymentMethodId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Request a payment method - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.PaymentMethod RequestPaymentMethod(string merchantId, PaymentMethodSetupInfo paymentMethodSetupInfo = default, RequestOptions requestOptions = default); - - /// - /// Request a payment method - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RequestPaymentMethodAsync(string merchantId, PaymentMethodSetupInfo paymentMethodSetupInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a payment method - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payment method. - /// - - /// - Additional request options. - /// . - Model.Management.PaymentMethod UpdatePaymentMethod(string merchantId, string paymentMethodId, UpdatePaymentMethodInfo updatePaymentMethodInfo = default, RequestOptions requestOptions = default); - - /// - /// Update a payment method - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payment method. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdatePaymentMethodAsync(string merchantId, string paymentMethodId, UpdatePaymentMethodInfo updatePaymentMethodInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PaymentMethodsMerchantLevelService API endpoints - /// - public class PaymentMethodsMerchantLevelService : AbstractService, IPaymentMethodsMerchantLevelService - { - private readonly string _baseUrl; - - public PaymentMethodsMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public void AddApplePayDomain(string merchantId, string paymentMethodId, ApplePayInfo applePayInfo = default, RequestOptions requestOptions = default) - { - AddApplePayDomainAsync(merchantId, paymentMethodId, applePayInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AddApplePayDomainAsync(string merchantId, string paymentMethodId, ApplePayInfo applePayInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(applePayInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.PaymentMethodResponse GetAllPaymentMethods(string merchantId, string storeId = default, string businessLineId = default, int? pageSize = default, int? pageNumber = default, RequestOptions requestOptions = default) - { - return GetAllPaymentMethodsAsync(merchantId, storeId, businessLineId, pageSize, pageNumber, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllPaymentMethodsAsync(string merchantId, string storeId = default, string businessLineId = default, int? pageSize = default, int? pageNumber = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (storeId != null) queryParams.Add("storeId", storeId); - if (businessLineId != null) queryParams.Add("businessLineId", businessLineId); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentMethodSettings" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ApplePayInfo GetApplePayDomains(string merchantId, string paymentMethodId, RequestOptions requestOptions = default) - { - return GetApplePayDomainsAsync(merchantId, paymentMethodId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetApplePayDomainsAsync(string merchantId, string paymentMethodId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/getApplePayDomains"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.PaymentMethod GetPaymentMethodDetails(string merchantId, string paymentMethodId, RequestOptions requestOptions = default) - { - return GetPaymentMethodDetailsAsync(merchantId, paymentMethodId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPaymentMethodDetailsAsync(string merchantId, string paymentMethodId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.PaymentMethod RequestPaymentMethod(string merchantId, PaymentMethodSetupInfo paymentMethodSetupInfo = default, RequestOptions requestOptions = default) - { - return RequestPaymentMethodAsync(merchantId, paymentMethodSetupInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RequestPaymentMethodAsync(string merchantId, PaymentMethodSetupInfo paymentMethodSetupInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentMethodSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentMethodSetupInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.PaymentMethod UpdatePaymentMethod(string merchantId, string paymentMethodId, UpdatePaymentMethodInfo updatePaymentMethodInfo = default, RequestOptions requestOptions = default) - { - return UpdatePaymentMethodAsync(merchantId, paymentMethodId, updatePaymentMethodInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdatePaymentMethodAsync(string merchantId, string paymentMethodId, UpdatePaymentMethodInfo updatePaymentMethodInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updatePaymentMethodInfo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/PayoutSettingsMerchantLevelService.cs b/Adyen/Service/Management/PayoutSettingsMerchantLevelService.cs deleted file mode 100644 index aaa3a2586..000000000 --- a/Adyen/Service/Management/PayoutSettingsMerchantLevelService.cs +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// PayoutSettingsMerchantLevelService Interface - /// - public interface IPayoutSettingsMerchantLevelService - { - /// - /// Add a payout setting - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.PayoutSettings AddPayoutSetting(string merchantId, PayoutSettingsRequest payoutSettingsRequest = default, RequestOptions requestOptions = default); - - /// - /// Add a payout setting - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task AddPayoutSettingAsync(string merchantId, PayoutSettingsRequest payoutSettingsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a payout setting - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payout setting. - /// - Additional request options. - void DeletePayoutSetting(string merchantId, string payoutSettingsId, RequestOptions requestOptions = default); - - /// - /// Delete a payout setting - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payout setting. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task DeletePayoutSettingAsync(string merchantId, string payoutSettingsId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a payout setting - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payout setting. - /// - Additional request options. - /// . - Model.Management.PayoutSettings GetPayoutSetting(string merchantId, string payoutSettingsId, RequestOptions requestOptions = default); - - /// - /// Get a payout setting - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payout setting. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPayoutSettingAsync(string merchantId, string payoutSettingsId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of payout settings - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// . - Model.Management.PayoutSettingsResponse ListPayoutSettings(string merchantId, RequestOptions requestOptions = default); - - /// - /// Get a list of payout settings - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListPayoutSettingsAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a payout setting - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payout setting. - /// - - /// - Additional request options. - /// . - Model.Management.PayoutSettings UpdatePayoutSetting(string merchantId, string payoutSettingsId, UpdatePayoutSettingsRequest updatePayoutSettingsRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a payout setting - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the payout setting. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdatePayoutSettingAsync(string merchantId, string payoutSettingsId, UpdatePayoutSettingsRequest updatePayoutSettingsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PayoutSettingsMerchantLevelService API endpoints - /// - public class PayoutSettingsMerchantLevelService : AbstractService, IPayoutSettingsMerchantLevelService - { - private readonly string _baseUrl; - - public PayoutSettingsMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.PayoutSettings AddPayoutSetting(string merchantId, PayoutSettingsRequest payoutSettingsRequest = default, RequestOptions requestOptions = default) - { - return AddPayoutSettingAsync(merchantId, payoutSettingsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AddPayoutSettingAsync(string merchantId, PayoutSettingsRequest payoutSettingsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/payoutSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(payoutSettingsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public void DeletePayoutSetting(string merchantId, string payoutSettingsId, RequestOptions requestOptions = default) - { - DeletePayoutSettingAsync(merchantId, payoutSettingsId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeletePayoutSettingAsync(string merchantId, string payoutSettingsId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.PayoutSettings GetPayoutSetting(string merchantId, string payoutSettingsId, RequestOptions requestOptions = default) - { - return GetPayoutSettingAsync(merchantId, payoutSettingsId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPayoutSettingAsync(string merchantId, string payoutSettingsId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.PayoutSettingsResponse ListPayoutSettings(string merchantId, RequestOptions requestOptions = default) - { - return ListPayoutSettingsAsync(merchantId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListPayoutSettingsAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/payoutSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.PayoutSettings UpdatePayoutSetting(string merchantId, string payoutSettingsId, UpdatePayoutSettingsRequest updatePayoutSettingsRequest = default, RequestOptions requestOptions = default) - { - return UpdatePayoutSettingAsync(merchantId, payoutSettingsId, updatePayoutSettingsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdatePayoutSettingAsync(string merchantId, string payoutSettingsId, UpdatePayoutSettingsRequest updatePayoutSettingsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/payoutSettings/{payoutSettingsId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updatePayoutSettingsRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/SplitConfigurationMerchantLevelService.cs b/Adyen/Service/Management/SplitConfigurationMerchantLevelService.cs deleted file mode 100644 index 6b217da75..000000000 --- a/Adyen/Service/Management/SplitConfigurationMerchantLevelService.cs +++ /dev/null @@ -1,334 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// SplitConfigurationMerchantLevelService Interface - /// - public interface ISplitConfigurationMerchantLevelService - { - /// - /// Create a rule - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - - /// - Additional request options. - /// . - Model.Management.SplitConfiguration CreateRule(string merchantId, string splitConfigurationId, SplitConfigurationRule splitConfigurationRule = default, RequestOptions requestOptions = default); - - /// - /// Create a rule - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateRuleAsync(string merchantId, string splitConfigurationId, SplitConfigurationRule splitConfigurationRule = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a split configuration - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.SplitConfiguration CreateSplitConfiguration(string merchantId, SplitConfiguration splitConfiguration = default, RequestOptions requestOptions = default); - - /// - /// Create a split configuration - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateSplitConfigurationAsync(string merchantId, SplitConfiguration splitConfiguration = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a split configuration - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - Additional request options. - /// . - Model.Management.SplitConfiguration DeleteSplitConfiguration(string merchantId, string splitConfigurationId, RequestOptions requestOptions = default); - - /// - /// Delete a split configuration - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteSplitConfigurationAsync(string merchantId, string splitConfigurationId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a split configuration rule - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - - /// - Additional request options. - /// . - Model.Management.SplitConfiguration DeleteSplitConfigurationRule(string merchantId, string splitConfigurationId, string ruleId, RequestOptions requestOptions = default); - - /// - /// Delete a split configuration rule - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteSplitConfigurationRuleAsync(string merchantId, string splitConfigurationId, string ruleId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a split configuration - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - Additional request options. - /// . - Model.Management.SplitConfiguration GetSplitConfiguration(string merchantId, string splitConfigurationId, RequestOptions requestOptions = default); - - /// - /// Get a split configuration - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetSplitConfigurationAsync(string merchantId, string splitConfigurationId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of split configurations - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// . - Model.Management.SplitConfigurationList ListSplitConfigurations(string merchantId, RequestOptions requestOptions = default); - - /// - /// Get a list of split configurations - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListSplitConfigurationsAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update split conditions - /// - /// - The unique identifier of the merchant account. - /// - The identifier of the split configuration. - /// - The unique identifier of the split configuration rule. - /// - - /// - Additional request options. - /// . - Model.Management.SplitConfiguration UpdateSplitConditions(string merchantId, string splitConfigurationId, string ruleId, UpdateSplitConfigurationRuleRequest updateSplitConfigurationRuleRequest = default, RequestOptions requestOptions = default); - - /// - /// Update split conditions - /// - /// - The unique identifier of the merchant account. - /// - The identifier of the split configuration. - /// - The unique identifier of the split configuration rule. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateSplitConditionsAsync(string merchantId, string splitConfigurationId, string ruleId, UpdateSplitConfigurationRuleRequest updateSplitConfigurationRuleRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update split configuration description - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - - /// - Additional request options. - /// . - Model.Management.SplitConfiguration UpdateSplitConfigurationDescription(string merchantId, string splitConfigurationId, UpdateSplitConfigurationRequest updateSplitConfigurationRequest = default, RequestOptions requestOptions = default); - - /// - /// Update split configuration description - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateSplitConfigurationDescriptionAsync(string merchantId, string splitConfigurationId, UpdateSplitConfigurationRequest updateSplitConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update the split logic - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - The unique identifier of the split configuration rule. - /// - The unique identifier of the split configuration split. - /// - - /// - Additional request options. - /// . - Model.Management.SplitConfiguration UpdateSplitLogic(string merchantId, string splitConfigurationId, string ruleId, string splitLogicId, UpdateSplitConfigurationLogicRequest updateSplitConfigurationLogicRequest = default, RequestOptions requestOptions = default); - - /// - /// Update the split logic - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the split configuration. - /// - The unique identifier of the split configuration rule. - /// - The unique identifier of the split configuration split. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateSplitLogicAsync(string merchantId, string splitConfigurationId, string ruleId, string splitLogicId, UpdateSplitConfigurationLogicRequest updateSplitConfigurationLogicRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the SplitConfigurationMerchantLevelService API endpoints - /// - public class SplitConfigurationMerchantLevelService : AbstractService, ISplitConfigurationMerchantLevelService - { - private readonly string _baseUrl; - - public SplitConfigurationMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.SplitConfiguration CreateRule(string merchantId, string splitConfigurationId, SplitConfigurationRule splitConfigurationRule = default, RequestOptions requestOptions = default) - { - return CreateRuleAsync(merchantId, splitConfigurationId, splitConfigurationRule, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateRuleAsync(string merchantId, string splitConfigurationId, SplitConfigurationRule splitConfigurationRule = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(splitConfigurationRule.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.SplitConfiguration CreateSplitConfiguration(string merchantId, SplitConfiguration splitConfiguration = default, RequestOptions requestOptions = default) - { - return CreateSplitConfigurationAsync(merchantId, splitConfiguration, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateSplitConfigurationAsync(string merchantId, SplitConfiguration splitConfiguration = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(splitConfiguration.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.SplitConfiguration DeleteSplitConfiguration(string merchantId, string splitConfigurationId, RequestOptions requestOptions = default) - { - return DeleteSplitConfigurationAsync(merchantId, splitConfigurationId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteSplitConfigurationAsync(string merchantId, string splitConfigurationId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.SplitConfiguration DeleteSplitConfigurationRule(string merchantId, string splitConfigurationId, string ruleId, RequestOptions requestOptions = default) - { - return DeleteSplitConfigurationRuleAsync(merchantId, splitConfigurationId, ruleId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteSplitConfigurationRuleAsync(string merchantId, string splitConfigurationId, string ruleId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.SplitConfiguration GetSplitConfiguration(string merchantId, string splitConfigurationId, RequestOptions requestOptions = default) - { - return GetSplitConfigurationAsync(merchantId, splitConfigurationId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetSplitConfigurationAsync(string merchantId, string splitConfigurationId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.SplitConfigurationList ListSplitConfigurations(string merchantId, RequestOptions requestOptions = default) - { - return ListSplitConfigurationsAsync(merchantId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListSplitConfigurationsAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.SplitConfiguration UpdateSplitConditions(string merchantId, string splitConfigurationId, string ruleId, UpdateSplitConfigurationRuleRequest updateSplitConfigurationRuleRequest = default, RequestOptions requestOptions = default) - { - return UpdateSplitConditionsAsync(merchantId, splitConfigurationId, ruleId, updateSplitConfigurationRuleRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateSplitConditionsAsync(string merchantId, string splitConfigurationId, string ruleId, UpdateSplitConfigurationRuleRequest updateSplitConfigurationRuleRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateSplitConfigurationRuleRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.SplitConfiguration UpdateSplitConfigurationDescription(string merchantId, string splitConfigurationId, UpdateSplitConfigurationRequest updateSplitConfigurationRequest = default, RequestOptions requestOptions = default) - { - return UpdateSplitConfigurationDescriptionAsync(merchantId, splitConfigurationId, updateSplitConfigurationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateSplitConfigurationDescriptionAsync(string merchantId, string splitConfigurationId, UpdateSplitConfigurationRequest updateSplitConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateSplitConfigurationRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.SplitConfiguration UpdateSplitLogic(string merchantId, string splitConfigurationId, string ruleId, string splitLogicId, UpdateSplitConfigurationLogicRequest updateSplitConfigurationLogicRequest = default, RequestOptions requestOptions = default) - { - return UpdateSplitLogicAsync(merchantId, splitConfigurationId, ruleId, splitLogicId, updateSplitConfigurationLogicRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateSplitLogicAsync(string merchantId, string splitConfigurationId, string ruleId, string splitLogicId, UpdateSplitConfigurationLogicRequest updateSplitConfigurationLogicRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateSplitConfigurationLogicRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalActionsCompanyLevelService.cs b/Adyen/Service/Management/TerminalActionsCompanyLevelService.cs deleted file mode 100644 index 83e9cd364..000000000 --- a/Adyen/Service/Management/TerminalActionsCompanyLevelService.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalActionsCompanyLevelService Interface - /// - public interface ITerminalActionsCompanyLevelService - { - /// - /// Get terminal action - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the terminal action. - /// - Additional request options. - /// . - Model.Management.ExternalTerminalAction GetTerminalAction(string companyId, string actionId, RequestOptions requestOptions = default); - - /// - /// Get terminal action - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the terminal action. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalActionAsync(string companyId, string actionId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of terminal actions - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 20 items on a page. - /// - Returns terminal actions with the specified status. Allowed values: **pending**, **successful**, **failed**, **cancelled**, **tryLater**. - /// - Returns terminal actions of the specified type. Allowed values: **InstallAndroidApp**, **UninstallAndroidApp**, **InstallAndroidCertificate**, **UninstallAndroidCertificate**. - /// - Additional request options. - /// . - Model.Management.ListExternalTerminalActionsResponse ListTerminalActions(string companyId, int? pageNumber = default, int? pageSize = default, string status = default, string type = default, RequestOptions requestOptions = default); - - /// - /// Get a list of terminal actions - /// - /// - The unique identifier of the company account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 20 items on a page. - /// - Returns terminal actions with the specified status. Allowed values: **pending**, **successful**, **failed**, **cancelled**, **tryLater**. - /// - Returns terminal actions of the specified type. Allowed values: **InstallAndroidApp**, **UninstallAndroidApp**, **InstallAndroidCertificate**, **UninstallAndroidCertificate**. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListTerminalActionsAsync(string companyId, int? pageNumber = default, int? pageSize = default, string status = default, string type = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalActionsCompanyLevelService API endpoints - /// - public class TerminalActionsCompanyLevelService : AbstractService, ITerminalActionsCompanyLevelService - { - private readonly string _baseUrl; - - public TerminalActionsCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.ExternalTerminalAction GetTerminalAction(string companyId, string actionId, RequestOptions requestOptions = default) - { - return GetTerminalActionAsync(companyId, actionId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalActionAsync(string companyId, string actionId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/terminalActions/{actionId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListExternalTerminalActionsResponse ListTerminalActions(string companyId, int? pageNumber = default, int? pageSize = default, string status = default, string type = default, RequestOptions requestOptions = default) - { - return ListTerminalActionsAsync(companyId, pageNumber, pageSize, status, type, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListTerminalActionsAsync(string companyId, int? pageNumber = default, int? pageSize = default, string status = default, string type = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - if (status != null) queryParams.Add("status", status); - if (type != null) queryParams.Add("type", type); - var endpoint = _baseUrl + $"/companies/{companyId}/terminalActions" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalActionsTerminalLevelService.cs b/Adyen/Service/Management/TerminalActionsTerminalLevelService.cs deleted file mode 100644 index b71d84041..000000000 --- a/Adyen/Service/Management/TerminalActionsTerminalLevelService.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalActionsTerminalLevelService Interface - /// - public interface ITerminalActionsTerminalLevelService - { - /// - /// Create a terminal action - /// - /// - - /// - Additional request options. - /// . - Model.Management.ScheduleTerminalActionsResponse CreateTerminalAction(ScheduleTerminalActionsRequest scheduleTerminalActionsRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a terminal action - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateTerminalActionAsync(ScheduleTerminalActionsRequest scheduleTerminalActionsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalActionsTerminalLevelService API endpoints - /// - public class TerminalActionsTerminalLevelService : AbstractService, ITerminalActionsTerminalLevelService - { - private readonly string _baseUrl; - - public TerminalActionsTerminalLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.ScheduleTerminalActionsResponse CreateTerminalAction(ScheduleTerminalActionsRequest scheduleTerminalActionsRequest = default, RequestOptions requestOptions = default) - { - return CreateTerminalActionAsync(scheduleTerminalActionsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateTerminalActionAsync(ScheduleTerminalActionsRequest scheduleTerminalActionsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/terminals/scheduleActions"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(scheduleTerminalActionsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalOrdersCompanyLevelService.cs b/Adyen/Service/Management/TerminalOrdersCompanyLevelService.cs deleted file mode 100644 index c432551fa..000000000 --- a/Adyen/Service/Management/TerminalOrdersCompanyLevelService.cs +++ /dev/null @@ -1,387 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalOrdersCompanyLevelService Interface - /// - public interface ITerminalOrdersCompanyLevelService - { - /// - /// Cancel an order - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the order. - /// - Additional request options. - /// . - Model.Management.TerminalOrder CancelOrder(string companyId, string orderId, RequestOptions requestOptions = default); - - /// - /// Cancel an order - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the order. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CancelOrderAsync(string companyId, string orderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create an order - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalOrder CreateOrder(string companyId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default); - - /// - /// Create an order - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateOrderAsync(string companyId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a shipping location - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// . - Model.Management.ShippingLocation CreateShippingLocation(string companyId, ShippingLocation shippingLocation = default, RequestOptions requestOptions = default); - - /// - /// Create a shipping location - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateShippingLocationAsync(string companyId, ShippingLocation shippingLocation = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an order - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the order. - /// - Additional request options. - /// . - Model.Management.TerminalOrder GetOrder(string companyId, string orderId, RequestOptions requestOptions = default); - - /// - /// Get an order - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the order. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetOrderAsync(string companyId, string orderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of billing entities - /// - /// - The unique identifier of the company account. - /// - The name of the billing entity. - /// - Additional request options. - /// . - Model.Management.BillingEntitiesResponse ListBillingEntities(string companyId, string name = default, RequestOptions requestOptions = default); - - /// - /// Get a list of billing entities - /// - /// - The unique identifier of the company account. - /// - The name of the billing entity. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListBillingEntitiesAsync(string companyId, string name = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of orders - /// - /// - The unique identifier of the company account. - /// - Your purchase order number. - /// - The order status. Possible values (not case-sensitive): Placed, Confirmed, Cancelled, Shipped, Delivered. - /// - The number of orders to skip. - /// - The number of orders to return. - /// - Additional request options. - /// . - Model.Management.TerminalOrdersResponse ListOrders(string companyId, string customerOrderReference = default, string status = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get a list of orders - /// - /// - The unique identifier of the company account. - /// - Your purchase order number. - /// - The order status. Possible values (not case-sensitive): Placed, Confirmed, Cancelled, Shipped, Delivered. - /// - The number of orders to skip. - /// - The number of orders to return. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListOrdersAsync(string companyId, string customerOrderReference = default, string status = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of shipping locations - /// - /// - The unique identifier of the company account. - /// - The name of the shipping location. - /// - The number of locations to skip. - /// - The number of locations to return. - /// - Additional request options. - /// . - Model.Management.ShippingLocationsResponse ListShippingLocations(string companyId, string name = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get a list of shipping locations - /// - /// - The unique identifier of the company account. - /// - The name of the shipping location. - /// - The number of locations to skip. - /// - The number of locations to return. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListShippingLocationsAsync(string companyId, string name = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of terminal models - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// . - Model.Management.TerminalModelsResponse ListTerminalModels(string companyId, RequestOptions requestOptions = default); - - /// - /// Get a list of terminal models - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListTerminalModelsAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of terminal products - /// - /// - The unique identifier of the company account. - /// - The country to return products for, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **US** - /// - The terminal model to return products for. Use the ID returned in the [GET `/terminalModels`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/companies/{companyId}/terminalModels) response. For example, **Verifone.M400** - /// - The number of products to skip. - /// - The number of products to return. - /// - Additional request options. - /// . - Model.Management.TerminalProductsResponse ListTerminalProducts(string companyId, string country, string terminalModelId = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get a list of terminal products - /// - /// - The unique identifier of the company account. - /// - The country to return products for, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **US** - /// - The terminal model to return products for. Use the ID returned in the [GET `/terminalModels`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/companies/{companyId}/terminalModels) response. For example, **Verifone.M400** - /// - The number of products to skip. - /// - The number of products to return. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListTerminalProductsAsync(string companyId, string country, string terminalModelId = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update an order - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the order. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalOrder UpdateOrder(string companyId, string orderId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default); - - /// - /// Update an order - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the order. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateOrderAsync(string companyId, string orderId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalOrdersCompanyLevelService API endpoints - /// - public class TerminalOrdersCompanyLevelService : AbstractService, ITerminalOrdersCompanyLevelService - { - private readonly string _baseUrl; - - public TerminalOrdersCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.TerminalOrder CancelOrder(string companyId, string orderId, RequestOptions requestOptions = default) - { - return CancelOrderAsync(companyId, orderId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CancelOrderAsync(string companyId, string orderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/terminalOrders/{orderId}/cancel"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalOrder CreateOrder(string companyId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default) - { - return CreateOrderAsync(companyId, terminalOrderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateOrderAsync(string companyId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/terminalOrders"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalOrderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ShippingLocation CreateShippingLocation(string companyId, ShippingLocation shippingLocation = default, RequestOptions requestOptions = default) - { - return CreateShippingLocationAsync(companyId, shippingLocation, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateShippingLocationAsync(string companyId, ShippingLocation shippingLocation = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/shippingLocations"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(shippingLocation.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalOrder GetOrder(string companyId, string orderId, RequestOptions requestOptions = default) - { - return GetOrderAsync(companyId, orderId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetOrderAsync(string companyId, string orderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/terminalOrders/{orderId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.BillingEntitiesResponse ListBillingEntities(string companyId, string name = default, RequestOptions requestOptions = default) - { - return ListBillingEntitiesAsync(companyId, name, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListBillingEntitiesAsync(string companyId, string name = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (name != null) queryParams.Add("name", name); - var endpoint = _baseUrl + $"/companies/{companyId}/billingEntities" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalOrdersResponse ListOrders(string companyId, string customerOrderReference = default, string status = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return ListOrdersAsync(companyId, customerOrderReference, status, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListOrdersAsync(string companyId, string customerOrderReference = default, string status = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (customerOrderReference != null) queryParams.Add("customerOrderReference", customerOrderReference); - if (status != null) queryParams.Add("status", status); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/companies/{companyId}/terminalOrders" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ShippingLocationsResponse ListShippingLocations(string companyId, string name = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return ListShippingLocationsAsync(companyId, name, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListShippingLocationsAsync(string companyId, string name = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (name != null) queryParams.Add("name", name); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/companies/{companyId}/shippingLocations" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalModelsResponse ListTerminalModels(string companyId, RequestOptions requestOptions = default) - { - return ListTerminalModelsAsync(companyId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListTerminalModelsAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/terminalModels"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalProductsResponse ListTerminalProducts(string companyId, string country, string terminalModelId = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return ListTerminalProductsAsync(companyId, country, terminalModelId, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListTerminalProductsAsync(string companyId, string country, string terminalModelId = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("country", country); - if (terminalModelId != null) queryParams.Add("terminalModelId", terminalModelId); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/companies/{companyId}/terminalProducts" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalOrder UpdateOrder(string companyId, string orderId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default) - { - return UpdateOrderAsync(companyId, orderId, terminalOrderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateOrderAsync(string companyId, string orderId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/terminalOrders/{orderId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalOrderRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalOrdersMerchantLevelService.cs b/Adyen/Service/Management/TerminalOrdersMerchantLevelService.cs deleted file mode 100644 index 814550116..000000000 --- a/Adyen/Service/Management/TerminalOrdersMerchantLevelService.cs +++ /dev/null @@ -1,387 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalOrdersMerchantLevelService Interface - /// - public interface ITerminalOrdersMerchantLevelService - { - /// - /// Cancel an order - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the order. - /// - Additional request options. - /// . - Model.Management.TerminalOrder CancelOrder(string merchantId, string orderId, RequestOptions requestOptions = default); - - /// - /// Cancel an order - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the order. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CancelOrderAsync(string merchantId, string orderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create an order - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalOrder CreateOrder(string merchantId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default); - - /// - /// Create an order - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateOrderAsync(string merchantId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a shipping location - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.ShippingLocation CreateShippingLocation(string merchantId, ShippingLocation shippingLocation = default, RequestOptions requestOptions = default); - - /// - /// Create a shipping location - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateShippingLocationAsync(string merchantId, ShippingLocation shippingLocation = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an order - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the order. - /// - Additional request options. - /// . - Model.Management.TerminalOrder GetOrder(string merchantId, string orderId, RequestOptions requestOptions = default); - - /// - /// Get an order - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the order. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetOrderAsync(string merchantId, string orderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of billing entities - /// - /// - The unique identifier of the merchant account. - /// - The name of the billing entity. - /// - Additional request options. - /// . - Model.Management.BillingEntitiesResponse ListBillingEntities(string merchantId, string name = default, RequestOptions requestOptions = default); - - /// - /// Get a list of billing entities - /// - /// - The unique identifier of the merchant account. - /// - The name of the billing entity. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListBillingEntitiesAsync(string merchantId, string name = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of orders - /// - /// - - /// - Your purchase order number. - /// - The order status. Possible values (not case-sensitive): Placed, Confirmed, Cancelled, Shipped, Delivered. - /// - The number of orders to skip. - /// - The number of orders to return. - /// - Additional request options. - /// . - Model.Management.TerminalOrdersResponse ListOrders(string merchantId, string customerOrderReference = default, string status = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get a list of orders - /// - /// - - /// - Your purchase order number. - /// - The order status. Possible values (not case-sensitive): Placed, Confirmed, Cancelled, Shipped, Delivered. - /// - The number of orders to skip. - /// - The number of orders to return. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListOrdersAsync(string merchantId, string customerOrderReference = default, string status = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of shipping locations - /// - /// - The unique identifier of the merchant account. - /// - The name of the shipping location. - /// - The number of locations to skip. - /// - The number of locations to return. - /// - Additional request options. - /// . - Model.Management.ShippingLocationsResponse ListShippingLocations(string merchantId, string name = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get a list of shipping locations - /// - /// - The unique identifier of the merchant account. - /// - The name of the shipping location. - /// - The number of locations to skip. - /// - The number of locations to return. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListShippingLocationsAsync(string merchantId, string name = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of terminal models - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// . - Model.Management.TerminalModelsResponse ListTerminalModels(string merchantId, RequestOptions requestOptions = default); - - /// - /// Get a list of terminal models - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListTerminalModelsAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of terminal products - /// - /// - The unique identifier of the merchant account. - /// - The country to return products for, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **US** - /// - The terminal model to return products for. Use the ID returned in the [GET `/terminalModels`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/merchants/{merchantId}/terminalModels) response. For example, **Verifone.M400** - /// - The number of products to skip. - /// - The number of products to return. - /// - Additional request options. - /// . - Model.Management.TerminalProductsResponse ListTerminalProducts(string merchantId, string country, string terminalModelId = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get a list of terminal products - /// - /// - The unique identifier of the merchant account. - /// - The country to return products for, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. For example, **US** - /// - The terminal model to return products for. Use the ID returned in the [GET `/terminalModels`](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/merchants/{merchantId}/terminalModels) response. For example, **Verifone.M400** - /// - The number of products to skip. - /// - The number of products to return. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListTerminalProductsAsync(string merchantId, string country, string terminalModelId = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update an order - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the order. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalOrder UpdateOrder(string merchantId, string orderId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default); - - /// - /// Update an order - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the order. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateOrderAsync(string merchantId, string orderId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalOrdersMerchantLevelService API endpoints - /// - public class TerminalOrdersMerchantLevelService : AbstractService, ITerminalOrdersMerchantLevelService - { - private readonly string _baseUrl; - - public TerminalOrdersMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.TerminalOrder CancelOrder(string merchantId, string orderId, RequestOptions requestOptions = default) - { - return CancelOrderAsync(merchantId, orderId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CancelOrderAsync(string merchantId, string orderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalOrders/{orderId}/cancel"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalOrder CreateOrder(string merchantId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default) - { - return CreateOrderAsync(merchantId, terminalOrderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateOrderAsync(string merchantId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalOrders"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalOrderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ShippingLocation CreateShippingLocation(string merchantId, ShippingLocation shippingLocation = default, RequestOptions requestOptions = default) - { - return CreateShippingLocationAsync(merchantId, shippingLocation, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateShippingLocationAsync(string merchantId, ShippingLocation shippingLocation = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/shippingLocations"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(shippingLocation.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalOrder GetOrder(string merchantId, string orderId, RequestOptions requestOptions = default) - { - return GetOrderAsync(merchantId, orderId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetOrderAsync(string merchantId, string orderId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalOrders/{orderId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.BillingEntitiesResponse ListBillingEntities(string merchantId, string name = default, RequestOptions requestOptions = default) - { - return ListBillingEntitiesAsync(merchantId, name, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListBillingEntitiesAsync(string merchantId, string name = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (name != null) queryParams.Add("name", name); - var endpoint = _baseUrl + $"/merchants/{merchantId}/billingEntities" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalOrdersResponse ListOrders(string merchantId, string customerOrderReference = default, string status = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return ListOrdersAsync(merchantId, customerOrderReference, status, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListOrdersAsync(string merchantId, string customerOrderReference = default, string status = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (customerOrderReference != null) queryParams.Add("customerOrderReference", customerOrderReference); - if (status != null) queryParams.Add("status", status); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalOrders" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ShippingLocationsResponse ListShippingLocations(string merchantId, string name = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return ListShippingLocationsAsync(merchantId, name, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListShippingLocationsAsync(string merchantId, string name = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (name != null) queryParams.Add("name", name); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/merchants/{merchantId}/shippingLocations" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalModelsResponse ListTerminalModels(string merchantId, RequestOptions requestOptions = default) - { - return ListTerminalModelsAsync(merchantId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListTerminalModelsAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalModels"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalProductsResponse ListTerminalProducts(string merchantId, string country, string terminalModelId = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default) - { - return ListTerminalProductsAsync(merchantId, country, terminalModelId, offset, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListTerminalProductsAsync(string merchantId, string country, string terminalModelId = default, int? offset = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("country", country); - if (terminalModelId != null) queryParams.Add("terminalModelId", terminalModelId); - if (offset != null) queryParams.Add("offset", offset.ToString()); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalProducts" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalOrder UpdateOrder(string merchantId, string orderId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default) - { - return UpdateOrderAsync(merchantId, orderId, terminalOrderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateOrderAsync(string merchantId, string orderId, TerminalOrderRequest terminalOrderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalOrders/{orderId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalOrderRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalSettingsCompanyLevelService.cs b/Adyen/Service/Management/TerminalSettingsCompanyLevelService.cs deleted file mode 100644 index 70215e735..000000000 --- a/Adyen/Service/Management/TerminalSettingsCompanyLevelService.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalSettingsCompanyLevelService Interface - /// - public interface ITerminalSettingsCompanyLevelService - { - /// - /// Get the terminal logo - /// - /// - The unique identifier of the company account. - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// . - Model.Management.Logo GetTerminalLogo(string companyId, string model, RequestOptions requestOptions = default); - - /// - /// Get the terminal logo - /// - /// - The unique identifier of the company account. - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalLogoAsync(string companyId, string model, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// . - Model.Management.TerminalSettings GetTerminalSettings(string companyId, RequestOptions requestOptions = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the company account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalSettingsAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update the terminal logo - /// - /// - The unique identifier of the company account. - /// - - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// . - Model.Management.Logo UpdateTerminalLogo(string companyId, string model, Logo logo = default, RequestOptions requestOptions = default); - - /// - /// Update the terminal logo - /// - /// - The unique identifier of the company account. - /// - - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalLogoAsync(string companyId, string model, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalSettings UpdateTerminalSettings(string companyId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalSettingsAsync(string companyId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalSettingsCompanyLevelService API endpoints - /// - public class TerminalSettingsCompanyLevelService : AbstractService, ITerminalSettingsCompanyLevelService - { - private readonly string _baseUrl; - - public TerminalSettingsCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.Logo GetTerminalLogo(string companyId, string model, RequestOptions requestOptions = default) - { - return GetTerminalLogoAsync(companyId, model, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalLogoAsync(string companyId, string model, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("model", model); - var endpoint = _baseUrl + $"/companies/{companyId}/terminalLogos" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings GetTerminalSettings(string companyId, RequestOptions requestOptions = default) - { - return GetTerminalSettingsAsync(companyId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalSettingsAsync(string companyId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Logo UpdateTerminalLogo(string companyId, string model, Logo logo = default, RequestOptions requestOptions = default) - { - return UpdateTerminalLogoAsync(companyId, model, logo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalLogoAsync(string companyId, string model, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("model", model); - var endpoint = _baseUrl + $"/companies/{companyId}/terminalLogos" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(logo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings UpdateTerminalSettings(string companyId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default) - { - return UpdateTerminalSettingsAsync(companyId, terminalSettings, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalSettingsAsync(string companyId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalSettings.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalSettingsMerchantLevelService.cs b/Adyen/Service/Management/TerminalSettingsMerchantLevelService.cs deleted file mode 100644 index f03b250b3..000000000 --- a/Adyen/Service/Management/TerminalSettingsMerchantLevelService.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalSettingsMerchantLevelService Interface - /// - public interface ITerminalSettingsMerchantLevelService - { - /// - /// Get the terminal logo - /// - /// - The unique identifier of the merchant account. - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// . - Model.Management.Logo GetTerminalLogo(string merchantId, string model, RequestOptions requestOptions = default); - - /// - /// Get the terminal logo - /// - /// - The unique identifier of the merchant account. - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalLogoAsync(string merchantId, string model, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// . - Model.Management.TerminalSettings GetTerminalSettings(string merchantId, RequestOptions requestOptions = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the merchant account. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalSettingsAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update the terminal logo - /// - /// - The unique identifier of the merchant account. - /// - - /// - The terminal model. Allowed values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// . - Model.Management.Logo UpdateTerminalLogo(string merchantId, string model, Logo logo = default, RequestOptions requestOptions = default); - - /// - /// Update the terminal logo - /// - /// - The unique identifier of the merchant account. - /// - - /// - The terminal model. Allowed values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalLogoAsync(string merchantId, string model, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalSettings UpdateTerminalSettings(string merchantId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalSettingsAsync(string merchantId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalSettingsMerchantLevelService API endpoints - /// - public class TerminalSettingsMerchantLevelService : AbstractService, ITerminalSettingsMerchantLevelService - { - private readonly string _baseUrl; - - public TerminalSettingsMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.Logo GetTerminalLogo(string merchantId, string model, RequestOptions requestOptions = default) - { - return GetTerminalLogoAsync(merchantId, model, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalLogoAsync(string merchantId, string model, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("model", model); - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalLogos" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings GetTerminalSettings(string merchantId, RequestOptions requestOptions = default) - { - return GetTerminalSettingsAsync(merchantId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalSettingsAsync(string merchantId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Logo UpdateTerminalLogo(string merchantId, string model, Logo logo = default, RequestOptions requestOptions = default) - { - return UpdateTerminalLogoAsync(merchantId, model, logo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalLogoAsync(string merchantId, string model, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("model", model); - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalLogos" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(logo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings UpdateTerminalSettings(string merchantId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default) - { - return UpdateTerminalSettingsAsync(merchantId, terminalSettings, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalSettingsAsync(string merchantId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalSettings.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalSettingsStoreLevelService.cs b/Adyen/Service/Management/TerminalSettingsStoreLevelService.cs deleted file mode 100644 index 8d894ba96..000000000 --- a/Adyen/Service/Management/TerminalSettingsStoreLevelService.cs +++ /dev/null @@ -1,309 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalSettingsStoreLevelService Interface - /// - public interface ITerminalSettingsStoreLevelService - { - /// - /// Get the terminal logo - /// - /// - The unique identifier of the merchant account. - /// - The reference that identifies the store. - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// . - Model.Management.Logo GetTerminalLogo(string merchantId, string reference, string model, RequestOptions requestOptions = default); - - /// - /// Get the terminal logo - /// - /// - The unique identifier of the merchant account. - /// - The reference that identifies the store. - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalLogoAsync(string merchantId, string reference, string model, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the terminal logo - /// - /// - The unique identifier of the store. - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// . - Model.Management.Logo GetTerminalLogoByStoreId(string storeId, string model, RequestOptions requestOptions = default); - - /// - /// Get the terminal logo - /// - /// - The unique identifier of the store. - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalLogoByStoreIdAsync(string storeId, string model, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the merchant account. - /// - The reference that identifies the store. - /// - Additional request options. - /// . - Model.Management.TerminalSettings GetTerminalSettings(string merchantId, string reference, RequestOptions requestOptions = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the merchant account. - /// - The reference that identifies the store. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalSettingsAsync(string merchantId, string reference, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the store. - /// - Additional request options. - /// . - Model.Management.TerminalSettings GetTerminalSettingsByStoreId(string storeId, RequestOptions requestOptions = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the store. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalSettingsByStoreIdAsync(string storeId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update the terminal logo - /// - /// - The unique identifier of the merchant account. - /// - The reference that identifies the store. - /// - - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T - /// - Additional request options. - /// . - Model.Management.Logo UpdateTerminalLogo(string merchantId, string reference, string model, Logo logo = default, RequestOptions requestOptions = default); - - /// - /// Update the terminal logo - /// - /// - The unique identifier of the merchant account. - /// - The reference that identifies the store. - /// - - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalLogoAsync(string merchantId, string reference, string model, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update the terminal logo - /// - /// - The unique identifier of the store. - /// - - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// . - Model.Management.Logo UpdateTerminalLogoByStoreId(string storeId, string model, Logo logo = default, RequestOptions requestOptions = default); - - /// - /// Update the terminal logo - /// - /// - The unique identifier of the store. - /// - - /// - The terminal model. Possible values: E355, VX675WIFIBT, VX680, VX690, VX700, VX820, M400, MX925, P400Plus, UX300, UX410, V200cPlus, V240mPlus, V400cPlus, V400m, e280, e285, e285p, S1E, S1EL, S1F2, S1L, S1U, S7T. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalLogoByStoreIdAsync(string storeId, string model, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the merchant account. - /// - The reference that identifies the store. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalSettings UpdateTerminalSettings(string merchantId, string reference, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the merchant account. - /// - The reference that identifies the store. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalSettingsAsync(string merchantId, string reference, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the store. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalSettings UpdateTerminalSettingsByStoreId(string storeId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the store. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalSettingsByStoreIdAsync(string storeId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalSettingsStoreLevelService API endpoints - /// - public class TerminalSettingsStoreLevelService : AbstractService, ITerminalSettingsStoreLevelService - { - private readonly string _baseUrl; - - public TerminalSettingsStoreLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.Logo GetTerminalLogo(string merchantId, string reference, string model, RequestOptions requestOptions = default) - { - return GetTerminalLogoAsync(merchantId, reference, model, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalLogoAsync(string merchantId, string reference, string model, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("model", model); - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{reference}/terminalLogos" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Logo GetTerminalLogoByStoreId(string storeId, string model, RequestOptions requestOptions = default) - { - return GetTerminalLogoByStoreIdAsync(storeId, model, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalLogoByStoreIdAsync(string storeId, string model, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("model", model); - var endpoint = _baseUrl + $"/stores/{storeId}/terminalLogos" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings GetTerminalSettings(string merchantId, string reference, RequestOptions requestOptions = default) - { - return GetTerminalSettingsAsync(merchantId, reference, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalSettingsAsync(string merchantId, string reference, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{reference}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings GetTerminalSettingsByStoreId(string storeId, RequestOptions requestOptions = default) - { - return GetTerminalSettingsByStoreIdAsync(storeId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalSettingsByStoreIdAsync(string storeId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/stores/{storeId}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Logo UpdateTerminalLogo(string merchantId, string reference, string model, Logo logo = default, RequestOptions requestOptions = default) - { - return UpdateTerminalLogoAsync(merchantId, reference, model, logo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalLogoAsync(string merchantId, string reference, string model, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("model", model); - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{reference}/terminalLogos" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(logo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Logo UpdateTerminalLogoByStoreId(string storeId, string model, Logo logo = default, RequestOptions requestOptions = default) - { - return UpdateTerminalLogoByStoreIdAsync(storeId, model, logo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalLogoByStoreIdAsync(string storeId, string model, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - queryParams.Add("model", model); - var endpoint = _baseUrl + $"/stores/{storeId}/terminalLogos" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(logo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings UpdateTerminalSettings(string merchantId, string reference, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default) - { - return UpdateTerminalSettingsAsync(merchantId, reference, terminalSettings, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalSettingsAsync(string merchantId, string reference, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{reference}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalSettings.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings UpdateTerminalSettingsByStoreId(string storeId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default) - { - return UpdateTerminalSettingsByStoreIdAsync(storeId, terminalSettings, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalSettingsByStoreIdAsync(string storeId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/stores/{storeId}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalSettings.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalSettingsTerminalLevelService.cs b/Adyen/Service/Management/TerminalSettingsTerminalLevelService.cs deleted file mode 100644 index 34f045f70..000000000 --- a/Adyen/Service/Management/TerminalSettingsTerminalLevelService.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalSettingsTerminalLevelService Interface - /// - public interface ITerminalSettingsTerminalLevelService - { - /// - /// Get the terminal logo - /// - /// - The unique identifier of the payment terminal. - /// - Additional request options. - /// . - Model.Management.Logo GetTerminalLogo(string terminalId, RequestOptions requestOptions = default); - - /// - /// Get the terminal logo - /// - /// - The unique identifier of the payment terminal. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalLogoAsync(string terminalId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the payment terminal. - /// - Additional request options. - /// . - Model.Management.TerminalSettings GetTerminalSettings(string terminalId, RequestOptions requestOptions = default); - - /// - /// Get terminal settings - /// - /// - The unique identifier of the payment terminal. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTerminalSettingsAsync(string terminalId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update the logo - /// - /// - The unique identifier of the payment terminal. - /// - - /// - Additional request options. - /// . - Model.Management.Logo UpdateLogo(string terminalId, Logo logo = default, RequestOptions requestOptions = default); - - /// - /// Update the logo - /// - /// - The unique identifier of the payment terminal. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateLogoAsync(string terminalId, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the payment terminal. - /// - - /// - Additional request options. - /// . - Model.Management.TerminalSettings UpdateTerminalSettings(string terminalId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default); - - /// - /// Update terminal settings - /// - /// - The unique identifier of the payment terminal. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateTerminalSettingsAsync(string terminalId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalSettingsTerminalLevelService API endpoints - /// - public class TerminalSettingsTerminalLevelService : AbstractService, ITerminalSettingsTerminalLevelService - { - private readonly string _baseUrl; - - public TerminalSettingsTerminalLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.Logo GetTerminalLogo(string terminalId, RequestOptions requestOptions = default) - { - return GetTerminalLogoAsync(terminalId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalLogoAsync(string terminalId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/terminals/{terminalId}/terminalLogos"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings GetTerminalSettings(string terminalId, RequestOptions requestOptions = default) - { - return GetTerminalSettingsAsync(terminalId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTerminalSettingsAsync(string terminalId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/terminals/{terminalId}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Logo UpdateLogo(string terminalId, Logo logo = default, RequestOptions requestOptions = default) - { - return UpdateLogoAsync(terminalId, logo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateLogoAsync(string terminalId, Logo logo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/terminals/{terminalId}/terminalLogos"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(logo.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TerminalSettings UpdateTerminalSettings(string terminalId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default) - { - return UpdateTerminalSettingsAsync(terminalId, terminalSettings, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateTerminalSettingsAsync(string terminalId, TerminalSettings terminalSettings = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/terminals/{terminalId}/terminalSettings"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(terminalSettings.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/TerminalsTerminalLevelService.cs b/Adyen/Service/Management/TerminalsTerminalLevelService.cs deleted file mode 100644 index bd7299662..000000000 --- a/Adyen/Service/Management/TerminalsTerminalLevelService.cs +++ /dev/null @@ -1,123 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// TerminalsTerminalLevelService Interface - /// - public interface ITerminalsTerminalLevelService - { - /// - /// Get a list of terminals - /// - /// - Returns terminals with an ID that contains the specified string. If present, other query parameters are ignored. - /// - Returns one or more terminals associated with the one-time passwords specified in the request. If this query parameter is used, other query parameters are ignored. - /// - Returns terminals located in the countries specified by their [two-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - /// - Returns terminals that belong to the merchant accounts specified by their unique merchant account ID. - /// - Returns terminals that are assigned to the [stores](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores) specified by their unique store ID. - /// - Returns terminals of the [models](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/companies/{companyId}/terminalModels) specified in the format *brand.model*. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 20 items on a page. - /// - Additional request options. - /// . - Model.Management.ListTerminalsResponse ListTerminals(string searchQuery = default, string otpQuery = default, string countries = default, string merchantIds = default, string storeIds = default, string brandModels = default, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// Get a list of terminals - /// - /// - Returns terminals with an ID that contains the specified string. If present, other query parameters are ignored. - /// - Returns one or more terminals associated with the one-time passwords specified in the request. If this query parameter is used, other query parameters are ignored. - /// - Returns terminals located in the countries specified by their [two-letter country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - /// - Returns terminals that belong to the merchant accounts specified by their unique merchant account ID. - /// - Returns terminals that are assigned to the [stores](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/stores) specified by their unique store ID. - /// - Returns terminals of the [models](https://docs.adyen.com/api-explorer/#/ManagementService/latest/get/companies/{companyId}/terminalModels) specified in the format *brand.model*. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 20 items on a page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListTerminalsAsync(string searchQuery = default, string otpQuery = default, string countries = default, string merchantIds = default, string storeIds = default, string brandModels = default, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Reassign a terminal - /// - /// - The unique identifier of the payment terminal. - /// - - /// - Additional request options. - void ReassignTerminal(string terminalId, TerminalReassignmentRequest terminalReassignmentRequest = default, RequestOptions requestOptions = default); - - /// - /// Reassign a terminal - /// - /// - The unique identifier of the payment terminal. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task ReassignTerminalAsync(string terminalId, TerminalReassignmentRequest terminalReassignmentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TerminalsTerminalLevelService API endpoints - /// - public class TerminalsTerminalLevelService : AbstractService, ITerminalsTerminalLevelService - { - private readonly string _baseUrl; - - public TerminalsTerminalLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.ListTerminalsResponse ListTerminals(string searchQuery = default, string otpQuery = default, string countries = default, string merchantIds = default, string storeIds = default, string brandModels = default, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListTerminalsAsync(searchQuery, otpQuery, countries, merchantIds, storeIds, brandModels, pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListTerminalsAsync(string searchQuery = default, string otpQuery = default, string countries = default, string merchantIds = default, string storeIds = default, string brandModels = default, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (searchQuery != null) queryParams.Add("searchQuery", searchQuery); - if (otpQuery != null) queryParams.Add("otpQuery", otpQuery); - if (countries != null) queryParams.Add("countries", countries); - if (merchantIds != null) queryParams.Add("merchantIds", merchantIds); - if (storeIds != null) queryParams.Add("storeIds", storeIds); - if (brandModels != null) queryParams.Add("brandModels", brandModels); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + "/terminals" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public void ReassignTerminal(string terminalId, TerminalReassignmentRequest terminalReassignmentRequest = default, RequestOptions requestOptions = default) - { - ReassignTerminalAsync(terminalId, terminalReassignmentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ReassignTerminalAsync(string terminalId, TerminalReassignmentRequest terminalReassignmentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/terminals/{terminalId}/reassign"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(terminalReassignmentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/UsersCompanyLevelService.cs b/Adyen/Service/Management/UsersCompanyLevelService.cs deleted file mode 100644 index 1cf5d3828..000000000 --- a/Adyen/Service/Management/UsersCompanyLevelService.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// UsersCompanyLevelService Interface - /// - public interface IUsersCompanyLevelService - { - /// - /// Create a new user - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// . - Model.Management.CreateCompanyUserResponse CreateNewUser(string companyId, CreateCompanyUserRequest createCompanyUserRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a new user - /// - /// - The unique identifier of the company account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateNewUserAsync(string companyId, CreateCompanyUserRequest createCompanyUserRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get user details - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the user. - /// - Additional request options. - /// . - Model.Management.CompanyUser GetUserDetails(string companyId, string userId, RequestOptions requestOptions = default); - - /// - /// Get user details - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the user. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetUserDetailsAsync(string companyId, string userId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of users - /// - /// - The unique identifier of the company account. - /// - The number of the page to return. - /// - The number of items to have on a page. Maximum value is **100**. The default is **10** items on a page. - /// - The partial or complete username to select all users that match. - /// - Additional request options. - /// . - Model.Management.ListCompanyUsersResponse ListUsers(string companyId, int? pageNumber = default, int? pageSize = default, string username = default, RequestOptions requestOptions = default); - - /// - /// Get a list of users - /// - /// - The unique identifier of the company account. - /// - The number of the page to return. - /// - The number of items to have on a page. Maximum value is **100**. The default is **10** items on a page. - /// - The partial or complete username to select all users that match. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListUsersAsync(string companyId, int? pageNumber = default, int? pageSize = default, string username = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update user details - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the user. - /// - - /// - Additional request options. - /// . - Model.Management.CompanyUser UpdateUserDetails(string companyId, string userId, UpdateCompanyUserRequest updateCompanyUserRequest = default, RequestOptions requestOptions = default); - - /// - /// Update user details - /// - /// - The unique identifier of the company account. - /// - The unique identifier of the user. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateUserDetailsAsync(string companyId, string userId, UpdateCompanyUserRequest updateCompanyUserRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the UsersCompanyLevelService API endpoints - /// - public class UsersCompanyLevelService : AbstractService, IUsersCompanyLevelService - { - private readonly string _baseUrl; - - public UsersCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.CreateCompanyUserResponse CreateNewUser(string companyId, CreateCompanyUserRequest createCompanyUserRequest = default, RequestOptions requestOptions = default) - { - return CreateNewUserAsync(companyId, createCompanyUserRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateNewUserAsync(string companyId, CreateCompanyUserRequest createCompanyUserRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/users"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createCompanyUserRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.CompanyUser GetUserDetails(string companyId, string userId, RequestOptions requestOptions = default) - { - return GetUserDetailsAsync(companyId, userId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetUserDetailsAsync(string companyId, string userId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/users/{userId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListCompanyUsersResponse ListUsers(string companyId, int? pageNumber = default, int? pageSize = default, string username = default, RequestOptions requestOptions = default) - { - return ListUsersAsync(companyId, pageNumber, pageSize, username, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListUsersAsync(string companyId, int? pageNumber = default, int? pageSize = default, string username = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - if (username != null) queryParams.Add("username", username); - var endpoint = _baseUrl + $"/companies/{companyId}/users" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.CompanyUser UpdateUserDetails(string companyId, string userId, UpdateCompanyUserRequest updateCompanyUserRequest = default, RequestOptions requestOptions = default) - { - return UpdateUserDetailsAsync(companyId, userId, updateCompanyUserRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateUserDetailsAsync(string companyId, string userId, UpdateCompanyUserRequest updateCompanyUserRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/users/{userId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateCompanyUserRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/UsersMerchantLevelService.cs b/Adyen/Service/Management/UsersMerchantLevelService.cs deleted file mode 100644 index 31213f25a..000000000 --- a/Adyen/Service/Management/UsersMerchantLevelService.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// UsersMerchantLevelService Interface - /// - public interface IUsersMerchantLevelService - { - /// - /// Create a new user - /// - /// - Unique identifier of the merchant. - /// - - /// - Additional request options. - /// . - Model.Management.CreateUserResponse CreateNewUser(string merchantId, CreateMerchantUserRequest createMerchantUserRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a new user - /// - /// - Unique identifier of the merchant. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateNewUserAsync(string merchantId, CreateMerchantUserRequest createMerchantUserRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get user details - /// - /// - Unique identifier of the merchant. - /// - Unique identifier of the user. - /// - Additional request options. - /// . - Model.Management.User GetUserDetails(string merchantId, string userId, RequestOptions requestOptions = default); - - /// - /// Get user details - /// - /// - Unique identifier of the merchant. - /// - Unique identifier of the user. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetUserDetailsAsync(string merchantId, string userId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of users - /// - /// - Unique identifier of the merchant. - /// - The number of the page to fetch. - /// - The number of items to have on a page. Maximum value is **100**. The default is **10** items on a page. - /// - The partial or complete username to select all users that match. - /// - Additional request options. - /// . - Model.Management.ListMerchantUsersResponse ListUsers(string merchantId, int? pageNumber = default, int? pageSize = default, string username = default, RequestOptions requestOptions = default); - - /// - /// Get a list of users - /// - /// - Unique identifier of the merchant. - /// - The number of the page to fetch. - /// - The number of items to have on a page. Maximum value is **100**. The default is **10** items on a page. - /// - The partial or complete username to select all users that match. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListUsersAsync(string merchantId, int? pageNumber = default, int? pageSize = default, string username = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a user - /// - /// - Unique identifier of the merchant. - /// - Unique identifier of the user. - /// - - /// - Additional request options. - /// . - Model.Management.User UpdateUser(string merchantId, string userId, UpdateMerchantUserRequest updateMerchantUserRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a user - /// - /// - Unique identifier of the merchant. - /// - Unique identifier of the user. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateUserAsync(string merchantId, string userId, UpdateMerchantUserRequest updateMerchantUserRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the UsersMerchantLevelService API endpoints - /// - public class UsersMerchantLevelService : AbstractService, IUsersMerchantLevelService - { - private readonly string _baseUrl; - - public UsersMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.CreateUserResponse CreateNewUser(string merchantId, CreateMerchantUserRequest createMerchantUserRequest = default, RequestOptions requestOptions = default) - { - return CreateNewUserAsync(merchantId, createMerchantUserRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateNewUserAsync(string merchantId, CreateMerchantUserRequest createMerchantUserRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/users"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createMerchantUserRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.User GetUserDetails(string merchantId, string userId, RequestOptions requestOptions = default) - { - return GetUserDetailsAsync(merchantId, userId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetUserDetailsAsync(string merchantId, string userId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/users/{userId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListMerchantUsersResponse ListUsers(string merchantId, int? pageNumber = default, int? pageSize = default, string username = default, RequestOptions requestOptions = default) - { - return ListUsersAsync(merchantId, pageNumber, pageSize, username, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListUsersAsync(string merchantId, int? pageNumber = default, int? pageSize = default, string username = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - if (username != null) queryParams.Add("username", username); - var endpoint = _baseUrl + $"/merchants/{merchantId}/users" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.User UpdateUser(string merchantId, string userId, UpdateMerchantUserRequest updateMerchantUserRequest = default, RequestOptions requestOptions = default) - { - return UpdateUserAsync(merchantId, userId, updateMerchantUserRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateUserAsync(string merchantId, string userId, UpdateMerchantUserRequest updateMerchantUserRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/users/{userId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateMerchantUserRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/WebhooksCompanyLevelService.cs b/Adyen/Service/Management/WebhooksCompanyLevelService.cs deleted file mode 100644 index 44907edb7..000000000 --- a/Adyen/Service/Management/WebhooksCompanyLevelService.cs +++ /dev/null @@ -1,266 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// WebhooksCompanyLevelService Interface - /// - public interface IWebhooksCompanyLevelService - { - /// - /// Generate an HMAC key - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - /// . - Model.Management.GenerateHmacKeyResponse GenerateHmacKey(string companyId, string webhookId, RequestOptions requestOptions = default); - - /// - /// Generate an HMAC key - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GenerateHmacKeyAsync(string companyId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a webhook - /// - /// - Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - /// . - Model.Management.Webhook GetWebhook(string companyId, string webhookId, RequestOptions requestOptions = default); - - /// - /// Get a webhook - /// - /// - Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetWebhookAsync(string companyId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// List all webhooks - /// - /// - Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// . - Model.Management.ListWebhooksResponse ListAllWebhooks(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// List all webhooks - /// - /// - Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListAllWebhooksAsync(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Remove a webhook - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - void RemoveWebhook(string companyId, string webhookId, RequestOptions requestOptions = default); - - /// - /// Remove a webhook - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task RemoveWebhookAsync(string companyId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Set up a webhook - /// - /// - Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). - /// - - /// - Additional request options. - /// . - Model.Management.Webhook SetUpWebhook(string companyId, CreateCompanyWebhookRequest createCompanyWebhookRequest = default, RequestOptions requestOptions = default); - - /// - /// Set up a webhook - /// - /// - Unique identifier of the [company account](https://docs.adyen.com/account/account-structure#company-account). - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task SetUpWebhookAsync(string companyId, CreateCompanyWebhookRequest createCompanyWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Test a webhook - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the webhook configuration. - /// - - /// - Additional request options. - /// . - Model.Management.TestWebhookResponse TestWebhook(string companyId, string webhookId, TestCompanyWebhookRequest testCompanyWebhookRequest = default, RequestOptions requestOptions = default); - - /// - /// Test a webhook - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the webhook configuration. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task TestWebhookAsync(string companyId, string webhookId, TestCompanyWebhookRequest testCompanyWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a webhook - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the webhook configuration. - /// - - /// - Additional request options. - /// . - Model.Management.Webhook UpdateWebhook(string companyId, string webhookId, UpdateCompanyWebhookRequest updateCompanyWebhookRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a webhook - /// - /// - The unique identifier of the company account. - /// - Unique identifier of the webhook configuration. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateWebhookAsync(string companyId, string webhookId, UpdateCompanyWebhookRequest updateCompanyWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the WebhooksCompanyLevelService API endpoints - /// - public class WebhooksCompanyLevelService : AbstractService, IWebhooksCompanyLevelService - { - private readonly string _baseUrl; - - public WebhooksCompanyLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.GenerateHmacKeyResponse GenerateHmacKey(string companyId, string webhookId, RequestOptions requestOptions = default) - { - return GenerateHmacKeyAsync(companyId, webhookId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GenerateHmacKeyAsync(string companyId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/webhooks/{webhookId}/generateHmac"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Webhook GetWebhook(string companyId, string webhookId, RequestOptions requestOptions = default) - { - return GetWebhookAsync(companyId, webhookId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetWebhookAsync(string companyId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/webhooks/{webhookId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListWebhooksResponse ListAllWebhooks(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListAllWebhooksAsync(companyId, pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListAllWebhooksAsync(string companyId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + $"/companies/{companyId}/webhooks" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public void RemoveWebhook(string companyId, string webhookId, RequestOptions requestOptions = default) - { - RemoveWebhookAsync(companyId, webhookId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RemoveWebhookAsync(string companyId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/webhooks/{webhookId}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Webhook SetUpWebhook(string companyId, CreateCompanyWebhookRequest createCompanyWebhookRequest = default, RequestOptions requestOptions = default) - { - return SetUpWebhookAsync(companyId, createCompanyWebhookRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SetUpWebhookAsync(string companyId, CreateCompanyWebhookRequest createCompanyWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/webhooks"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createCompanyWebhookRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TestWebhookResponse TestWebhook(string companyId, string webhookId, TestCompanyWebhookRequest testCompanyWebhookRequest = default, RequestOptions requestOptions = default) - { - return TestWebhookAsync(companyId, webhookId, testCompanyWebhookRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task TestWebhookAsync(string companyId, string webhookId, TestCompanyWebhookRequest testCompanyWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/webhooks/{webhookId}/test"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(testCompanyWebhookRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Webhook UpdateWebhook(string companyId, string webhookId, UpdateCompanyWebhookRequest updateCompanyWebhookRequest = default, RequestOptions requestOptions = default) - { - return UpdateWebhookAsync(companyId, webhookId, updateCompanyWebhookRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateWebhookAsync(string companyId, string webhookId, UpdateCompanyWebhookRequest updateCompanyWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/companies/{companyId}/webhooks/{webhookId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateCompanyWebhookRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Management/WebhooksMerchantLevelService.cs b/Adyen/Service/Management/WebhooksMerchantLevelService.cs deleted file mode 100644 index cf8867dbf..000000000 --- a/Adyen/Service/Management/WebhooksMerchantLevelService.cs +++ /dev/null @@ -1,266 +0,0 @@ -/* -* Management API -* -* -* The version of the OpenAPI document: 3 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Management; - -namespace Adyen.Service.Management -{ - /// - /// WebhooksMerchantLevelService Interface - /// - public interface IWebhooksMerchantLevelService - { - /// - /// Generate an HMAC key - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.GenerateHmacKeyResponse GenerateHmacKey(string merchantId, string webhookId, RequestOptions requestOptions = default); - - /// - /// Generate an HMAC key - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GenerateHmacKeyAsync(string merchantId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a webhook - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - /// . - Model.Management.Webhook GetWebhook(string merchantId, string webhookId, RequestOptions requestOptions = default); - - /// - /// Get a webhook - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetWebhookAsync(string merchantId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// List all webhooks - /// - /// - The unique identifier of the merchant account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// . - Model.Management.ListWebhooksResponse ListAllWebhooks(string merchantId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default); - - /// - /// List all webhooks - /// - /// - The unique identifier of the merchant account. - /// - The number of the page to fetch. - /// - The number of items to have on a page, maximum 100. The default is 10 items on a page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListAllWebhooksAsync(string merchantId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Remove a webhook - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - void RemoveWebhook(string merchantId, string webhookId, RequestOptions requestOptions = default); - - /// - /// Remove a webhook - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the webhook configuration. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task RemoveWebhookAsync(string merchantId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Set up a webhook - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.Management.Webhook SetUpWebhook(string merchantId, CreateMerchantWebhookRequest createMerchantWebhookRequest = default, RequestOptions requestOptions = default); - - /// - /// Set up a webhook - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task SetUpWebhookAsync(string merchantId, CreateMerchantWebhookRequest createMerchantWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Test a webhook - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the webhook configuration. - /// - - /// - Additional request options. - /// . - Model.Management.TestWebhookResponse TestWebhook(string merchantId, string webhookId, TestWebhookRequest testWebhookRequest = default, RequestOptions requestOptions = default); - - /// - /// Test a webhook - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the webhook configuration. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task TestWebhookAsync(string merchantId, string webhookId, TestWebhookRequest testWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a webhook - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the webhook configuration. - /// - - /// - Additional request options. - /// . - Model.Management.Webhook UpdateWebhook(string merchantId, string webhookId, UpdateMerchantWebhookRequest updateMerchantWebhookRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a webhook - /// - /// - The unique identifier of the merchant account. - /// - Unique identifier of the webhook configuration. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateWebhookAsync(string merchantId, string webhookId, UpdateMerchantWebhookRequest updateMerchantWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the WebhooksMerchantLevelService API endpoints - /// - public class WebhooksMerchantLevelService : AbstractService, IWebhooksMerchantLevelService - { - private readonly string _baseUrl; - - public WebhooksMerchantLevelService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-test.adyen.com/v3"); - } - - public Model.Management.GenerateHmacKeyResponse GenerateHmacKey(string merchantId, string webhookId, RequestOptions requestOptions = default) - { - return GenerateHmacKeyAsync(merchantId, webhookId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GenerateHmacKeyAsync(string merchantId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/webhooks/{webhookId}/generateHmac"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Webhook GetWebhook(string merchantId, string webhookId, RequestOptions requestOptions = default) - { - return GetWebhookAsync(merchantId, webhookId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetWebhookAsync(string merchantId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/webhooks/{webhookId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.ListWebhooksResponse ListAllWebhooks(string merchantId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default) - { - return ListAllWebhooksAsync(merchantId, pageNumber, pageSize, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListAllWebhooksAsync(string merchantId, int? pageNumber = default, int? pageSize = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (pageNumber != null) queryParams.Add("pageNumber", pageNumber.ToString()); - if (pageSize != null) queryParams.Add("pageSize", pageSize.ToString()); - var endpoint = _baseUrl + $"/merchants/{merchantId}/webhooks" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public void RemoveWebhook(string merchantId, string webhookId, RequestOptions requestOptions = default) - { - RemoveWebhookAsync(merchantId, webhookId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RemoveWebhookAsync(string merchantId, string webhookId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/webhooks/{webhookId}"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("DELETE"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Webhook SetUpWebhook(string merchantId, CreateMerchantWebhookRequest createMerchantWebhookRequest = default, RequestOptions requestOptions = default) - { - return SetUpWebhookAsync(merchantId, createMerchantWebhookRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SetUpWebhookAsync(string merchantId, CreateMerchantWebhookRequest createMerchantWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/webhooks"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createMerchantWebhookRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.TestWebhookResponse TestWebhook(string merchantId, string webhookId, TestWebhookRequest testWebhookRequest = default, RequestOptions requestOptions = default) - { - return TestWebhookAsync(merchantId, webhookId, testWebhookRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task TestWebhookAsync(string merchantId, string webhookId, TestWebhookRequest testWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/webhooks/{webhookId}/test"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(testWebhookRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Management.Webhook UpdateWebhook(string merchantId, string webhookId, UpdateMerchantWebhookRequest updateMerchantWebhookRequest = default, RequestOptions requestOptions = default) - { - return UpdateWebhookAsync(merchantId, webhookId, updateMerchantWebhookRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateWebhookAsync(string merchantId, string webhookId, UpdateMerchantWebhookRequest updateMerchantWebhookRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/webhooks/{webhookId}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateMerchantWebhookRequest.ToJson(), requestOptions, new HttpMethod("PATCH"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PaymentService.cs b/Adyen/Service/PaymentService.cs deleted file mode 100644 index e4191c398..000000000 --- a/Adyen/Service/PaymentService.cs +++ /dev/null @@ -1,422 +0,0 @@ -/* -* Adyen Payment API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Payment; - -namespace Adyen.Service -{ - /// - /// PaymentService Interface - /// - public interface IPaymentService - { - /// - /// Change the authorised amount - /// - /// - - /// - Additional request options. - /// . - Model.Payment.ModificationResult AdjustAuthorisation(AdjustAuthorisationRequest adjustAuthorisationRequest = default, RequestOptions requestOptions = default); - - /// - /// Change the authorised amount - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task AdjustAuthorisationAsync(AdjustAuthorisationRequest adjustAuthorisationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create an authorisation - /// - /// - - /// - Additional request options. - /// . - Model.Payment.PaymentResult Authorise(PaymentRequest paymentRequest = default, RequestOptions requestOptions = default); - - /// - /// Create an authorisation - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task AuthoriseAsync(PaymentRequest paymentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Complete a 3DS authorisation - /// - /// - - /// - Additional request options. - /// . - Model.Payment.PaymentResult Authorise3d(PaymentRequest3d paymentRequest3d = default, RequestOptions requestOptions = default); - - /// - /// Complete a 3DS authorisation - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task Authorise3dAsync(PaymentRequest3d paymentRequest3d = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Complete a 3DS2 authorisation - /// - /// - - /// - Additional request options. - /// . - Model.Payment.PaymentResult Authorise3ds2(PaymentRequest3ds2 paymentRequest3ds2 = default, RequestOptions requestOptions = default); - - /// - /// Complete a 3DS2 authorisation - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task Authorise3ds2Async(PaymentRequest3ds2 paymentRequest3ds2 = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Cancel an authorisation - /// - /// - - /// - Additional request options. - /// . - Model.Payment.ModificationResult Cancel(CancelRequest cancelRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel an authorisation - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CancelAsync(CancelRequest cancelRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Cancel or refund a payment - /// - /// - - /// - Additional request options. - /// . - Model.Payment.ModificationResult CancelOrRefund(CancelOrRefundRequest cancelOrRefundRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel or refund a payment - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CancelOrRefundAsync(CancelOrRefundRequest cancelOrRefundRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Capture an authorisation - /// - /// - - /// - Additional request options. - /// . - Model.Payment.ModificationResult Capture(CaptureRequest captureRequest = default, RequestOptions requestOptions = default); - - /// - /// Capture an authorisation - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CaptureAsync(CaptureRequest captureRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a donation - /// - /// - - /// - Additional request options. - /// . - [Obsolete("")] - Model.Payment.ModificationResult Donate(DonationRequest donationRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a donation - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("")] - Task DonateAsync(DonationRequest donationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the 3DS authentication result - /// - /// - - /// - Additional request options. - /// . - Model.Payment.AuthenticationResultResponse GetAuthenticationResult(AuthenticationResultRequest authenticationResultRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the 3DS authentication result - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAuthenticationResultAsync(AuthenticationResultRequest authenticationResultRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Refund a captured payment - /// - /// - - /// - Additional request options. - /// . - Model.Payment.ModificationResult Refund(RefundRequest refundRequest = default, RequestOptions requestOptions = default); - - /// - /// Refund a captured payment - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RefundAsync(RefundRequest refundRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the 3DS2 authentication result - /// - /// - - /// - Additional request options. - /// . - Model.Payment.ThreeDS2ResultResponse Retrieve3ds2Result(ThreeDS2ResultRequest threeDS2ResultRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the 3DS2 authentication result - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task Retrieve3ds2ResultAsync(ThreeDS2ResultRequest threeDS2ResultRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Cancel an authorisation using your reference - /// - /// - - /// - Additional request options. - /// . - Model.Payment.ModificationResult TechnicalCancel(TechnicalCancelRequest technicalCancelRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel an authorisation using your reference - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task TechnicalCancelAsync(TechnicalCancelRequest technicalCancelRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Cancel an in-person refund - /// - /// - - /// - Additional request options. - /// . - Model.Payment.ModificationResult VoidPendingRefund(VoidPendingRefundRequest voidPendingRefundRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel an in-person refund - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task VoidPendingRefundAsync(VoidPendingRefundRequest voidPendingRefundRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PaymentService API endpoints - /// - public class PaymentService : AbstractService, IPaymentService - { - private readonly string _baseUrl; - - public PaymentService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://pal-test.adyen.com/pal/servlet/Payment/v68"); - } - - public Model.Payment.ModificationResult AdjustAuthorisation(AdjustAuthorisationRequest adjustAuthorisationRequest = default, RequestOptions requestOptions = default) - { - return AdjustAuthorisationAsync(adjustAuthorisationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AdjustAuthorisationAsync(AdjustAuthorisationRequest adjustAuthorisationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/adjustAuthorisation"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(adjustAuthorisationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.PaymentResult Authorise(PaymentRequest paymentRequest = default, RequestOptions requestOptions = default) - { - return AuthoriseAsync(paymentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AuthoriseAsync(PaymentRequest paymentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/authorise"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.PaymentResult Authorise3d(PaymentRequest3d paymentRequest3d = default, RequestOptions requestOptions = default) - { - return Authorise3dAsync(paymentRequest3d, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task Authorise3dAsync(PaymentRequest3d paymentRequest3d = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/authorise3d"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentRequest3d.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.PaymentResult Authorise3ds2(PaymentRequest3ds2 paymentRequest3ds2 = default, RequestOptions requestOptions = default) - { - return Authorise3ds2Async(paymentRequest3ds2, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task Authorise3ds2Async(PaymentRequest3ds2 paymentRequest3ds2 = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/authorise3ds2"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(paymentRequest3ds2.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.ModificationResult Cancel(CancelRequest cancelRequest = default, RequestOptions requestOptions = default) - { - return CancelAsync(cancelRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CancelAsync(CancelRequest cancelRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/cancel"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(cancelRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.ModificationResult CancelOrRefund(CancelOrRefundRequest cancelOrRefundRequest = default, RequestOptions requestOptions = default) - { - return CancelOrRefundAsync(cancelOrRefundRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CancelOrRefundAsync(CancelOrRefundRequest cancelOrRefundRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/cancelOrRefund"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(cancelOrRefundRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.ModificationResult Capture(CaptureRequest captureRequest = default, RequestOptions requestOptions = default) - { - return CaptureAsync(captureRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CaptureAsync(CaptureRequest captureRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/capture"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(captureRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("")] - public Model.Payment.ModificationResult Donate(DonationRequest donationRequest = default, RequestOptions requestOptions = default) - { - return DonateAsync(donationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("")] - public async Task DonateAsync(DonationRequest donationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/donate"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(donationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.AuthenticationResultResponse GetAuthenticationResult(AuthenticationResultRequest authenticationResultRequest = default, RequestOptions requestOptions = default) - { - return GetAuthenticationResultAsync(authenticationResultRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAuthenticationResultAsync(AuthenticationResultRequest authenticationResultRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getAuthenticationResult"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(authenticationResultRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.ModificationResult Refund(RefundRequest refundRequest = default, RequestOptions requestOptions = default) - { - return RefundAsync(refundRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RefundAsync(RefundRequest refundRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/refund"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(refundRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.ThreeDS2ResultResponse Retrieve3ds2Result(ThreeDS2ResultRequest threeDS2ResultRequest = default, RequestOptions requestOptions = default) - { - return Retrieve3ds2ResultAsync(threeDS2ResultRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task Retrieve3ds2ResultAsync(ThreeDS2ResultRequest threeDS2ResultRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/retrieve3ds2Result"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(threeDS2ResultRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.ModificationResult TechnicalCancel(TechnicalCancelRequest technicalCancelRequest = default, RequestOptions requestOptions = default) - { - return TechnicalCancelAsync(technicalCancelRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task TechnicalCancelAsync(TechnicalCancelRequest technicalCancelRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/technicalCancel"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(technicalCancelRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payment.ModificationResult VoidPendingRefund(VoidPendingRefundRequest voidPendingRefundRequest = default, RequestOptions requestOptions = default) - { - return VoidPendingRefundAsync(voidPendingRefundRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task VoidPendingRefundAsync(VoidPendingRefundRequest voidPendingRefundRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/voidPendingRefund"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(voidPendingRefundRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PaymentsAppService.cs b/Adyen/Service/PaymentsAppService.cs deleted file mode 100644 index 1944da24c..000000000 --- a/Adyen/Service/PaymentsAppService.cs +++ /dev/null @@ -1,216 +0,0 @@ -/* -* Payments App API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.PaymentsApp; - -namespace Adyen.Service -{ - /// - /// PaymentsAppService Interface - /// - public interface IPaymentsAppService - { - /// - /// Create a boarding token - merchant level - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// . - Model.PaymentsApp.BoardingTokenResponse GeneratePaymentsAppBoardingTokenForMerchant(string merchantId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default); - - /// - /// Create a boarding token - merchant level - /// - /// - The unique identifier of the merchant account. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GeneratePaymentsAppBoardingTokenForMerchantAsync(string merchantId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create a boarding token - store level - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store. - /// - - /// - Additional request options. - /// . - Model.PaymentsApp.BoardingTokenResponse GeneratePaymentsAppBoardingTokenForStore(string merchantId, string storeId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default); - - /// - /// Create a boarding token - store level - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GeneratePaymentsAppBoardingTokenForStoreAsync(string merchantId, string storeId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of Payments Apps - merchant level - /// - /// - The unique identifier of the merchant account. - /// - The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDING** * **BOARDED** * **REVOKED** - /// - The number of items to return. - /// - The number of items to skip. - /// - Additional request options. - /// . - Model.PaymentsApp.PaymentsAppResponse ListPaymentsAppForMerchant(string merchantId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default); - - /// - /// Get a list of Payments Apps - merchant level - /// - /// - The unique identifier of the merchant account. - /// - The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDING** * **BOARDED** * **REVOKED** - /// - The number of items to return. - /// - The number of items to skip. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListPaymentsAppForMerchantAsync(string merchantId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of Payments Apps - store level - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store. - /// - The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDING** * **BOARDED** * **REVOKED** - /// - The number of items to return. - /// - The number of items to skip. - /// - Additional request options. - /// . - Model.PaymentsApp.PaymentsAppResponse ListPaymentsAppForStore(string merchantId, string storeId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default); - - /// - /// Get a list of Payments Apps - store level - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the store. - /// - The status of the Payments App. Comma-separated list of one or more values. If no value is provided, the list returns all statuses. Possible values: * **BOARDING** * **BOARDED** * **REVOKED** - /// - The number of items to return. - /// - The number of items to skip. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListPaymentsAppForStoreAsync(string merchantId, string storeId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Revoke Payments App instance authentication - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the Payments App instance on a device. - /// - Additional request options. - void RevokePaymentsApp(string merchantId, string installationId, RequestOptions requestOptions = default); - - /// - /// Revoke Payments App instance authentication - /// - /// - The unique identifier of the merchant account. - /// - The unique identifier of the Payments App instance on a device. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task RevokePaymentsAppAsync(string merchantId, string installationId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PaymentsAppService API endpoints - /// - public class PaymentsAppService : AbstractService, IPaymentsAppService - { - private readonly string _baseUrl; - - public PaymentsAppService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://management-live.adyen.com/v1"); - } - - public Model.PaymentsApp.BoardingTokenResponse GeneratePaymentsAppBoardingTokenForMerchant(string merchantId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default) - { - return GeneratePaymentsAppBoardingTokenForMerchantAsync(merchantId, boardingTokenRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GeneratePaymentsAppBoardingTokenForMerchantAsync(string merchantId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/generatePaymentsAppBoardingToken"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(boardingTokenRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PaymentsApp.BoardingTokenResponse GeneratePaymentsAppBoardingTokenForStore(string merchantId, string storeId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default) - { - return GeneratePaymentsAppBoardingTokenForStoreAsync(merchantId, storeId, boardingTokenRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GeneratePaymentsAppBoardingTokenForStoreAsync(string merchantId, string storeId, BoardingTokenRequest boardingTokenRequest, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(boardingTokenRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PaymentsApp.PaymentsAppResponse ListPaymentsAppForMerchant(string merchantId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default) - { - return ListPaymentsAppForMerchantAsync(merchantId, statuses, limit, offset, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListPaymentsAppForMerchantAsync(string merchantId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (statuses != null) queryParams.Add("statuses", statuses); - if (limit != null) queryParams.Add("limit", limit.ToString()); - if (offset != null) queryParams.Add("offset", offset.ToString()); - var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentsApps" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.PaymentsApp.PaymentsAppResponse ListPaymentsAppForStore(string merchantId, string storeId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default) - { - return ListPaymentsAppForStoreAsync(merchantId, storeId, statuses, limit, offset, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListPaymentsAppForStoreAsync(string merchantId, string storeId, string statuses = default, int? limit = default, long? offset = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (statuses != null) queryParams.Add("statuses", statuses); - if (limit != null) queryParams.Add("limit", limit.ToString()); - if (offset != null) queryParams.Add("offset", offset.ToString()); - var endpoint = _baseUrl + $"/merchants/{merchantId}/stores/{storeId}/paymentsApps" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public void RevokePaymentsApp(string merchantId, string installationId, RequestOptions requestOptions = default) - { - RevokePaymentsAppAsync(merchantId, installationId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RevokePaymentsAppAsync(string merchantId, string installationId, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/merchants/{merchantId}/paymentsApps/{installationId}/revoke"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Payout/InitializationService.cs b/Adyen/Service/Payout/InitializationService.cs deleted file mode 100644 index d2984a7d6..000000000 --- a/Adyen/Service/Payout/InitializationService.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Payout; - -namespace Adyen.Service.Payout -{ - /// - /// InitializationService Interface - /// - public interface IInitializationService - { - /// - /// Store payout details - /// - /// - - /// - Additional request options. - /// . - Model.Payout.StoreDetailResponse StoreDetail(StoreDetailRequest storeDetailRequest = default, RequestOptions requestOptions = default); - - /// - /// Store payout details - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task StoreDetailAsync(StoreDetailRequest storeDetailRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Store details and submit a payout - /// - /// - - /// - Additional request options. - /// . - Model.Payout.StoreDetailAndSubmitResponse StoreDetailAndSubmitThirdParty(StoreDetailAndSubmitRequest storeDetailAndSubmitRequest = default, RequestOptions requestOptions = default); - - /// - /// Store details and submit a payout - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task StoreDetailAndSubmitThirdPartyAsync(StoreDetailAndSubmitRequest storeDetailAndSubmitRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Submit a payout - /// - /// - - /// - Additional request options. - /// . - Model.Payout.SubmitResponse SubmitThirdParty(SubmitRequest submitRequest = default, RequestOptions requestOptions = default); - - /// - /// Submit a payout - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task SubmitThirdPartyAsync(SubmitRequest submitRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the InitializationService API endpoints - /// - public class InitializationService : AbstractService, IInitializationService - { - private readonly string _baseUrl; - - public InitializationService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://pal-test.adyen.com/pal/servlet/Payout/v68"); - } - - public Model.Payout.StoreDetailResponse StoreDetail(StoreDetailRequest storeDetailRequest = default, RequestOptions requestOptions = default) - { - return StoreDetailAsync(storeDetailRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task StoreDetailAsync(StoreDetailRequest storeDetailRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/storeDetail"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storeDetailRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payout.StoreDetailAndSubmitResponse StoreDetailAndSubmitThirdParty(StoreDetailAndSubmitRequest storeDetailAndSubmitRequest = default, RequestOptions requestOptions = default) - { - return StoreDetailAndSubmitThirdPartyAsync(storeDetailAndSubmitRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task StoreDetailAndSubmitThirdPartyAsync(StoreDetailAndSubmitRequest storeDetailAndSubmitRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/storeDetailAndSubmitThirdParty"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storeDetailAndSubmitRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payout.SubmitResponse SubmitThirdParty(SubmitRequest submitRequest = default, RequestOptions requestOptions = default) - { - return SubmitThirdPartyAsync(submitRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SubmitThirdPartyAsync(SubmitRequest submitRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/submitThirdParty"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(submitRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Payout/InstantPayoutsService.cs b/Adyen/Service/Payout/InstantPayoutsService.cs deleted file mode 100644 index 5f0ccc982..000000000 --- a/Adyen/Service/Payout/InstantPayoutsService.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Payout; - -namespace Adyen.Service.Payout -{ - /// - /// InstantPayoutsService Interface - /// - public interface IInstantPayoutsService - { - /// - /// Make an instant card payout - /// - /// - - /// - Additional request options. - /// . - Model.Payout.PayoutResponse Payout(PayoutRequest payoutRequest = default, RequestOptions requestOptions = default); - - /// - /// Make an instant card payout - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task PayoutAsync(PayoutRequest payoutRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the InstantPayoutsService API endpoints - /// - public class InstantPayoutsService : AbstractService, IInstantPayoutsService - { - private readonly string _baseUrl; - - public InstantPayoutsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://pal-test.adyen.com/pal/servlet/Payout/v68"); - } - - public Model.Payout.PayoutResponse Payout(PayoutRequest payoutRequest = default, RequestOptions requestOptions = default) - { - return PayoutAsync(payoutRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task PayoutAsync(PayoutRequest payoutRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/payout"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(payoutRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Payout/ReviewingService.cs b/Adyen/Service/Payout/ReviewingService.cs deleted file mode 100644 index b748df02f..000000000 --- a/Adyen/Service/Payout/ReviewingService.cs +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Adyen Payout API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Payout; - -namespace Adyen.Service.Payout -{ - /// - /// ReviewingService Interface - /// - public interface IReviewingService - { - /// - /// Confirm a payout - /// - /// - - /// - Additional request options. - /// . - Model.Payout.ModifyResponse ConfirmThirdParty(ModifyRequest modifyRequest = default, RequestOptions requestOptions = default); - - /// - /// Confirm a payout - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ConfirmThirdPartyAsync(ModifyRequest modifyRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Cancel a payout - /// - /// - - /// - Additional request options. - /// . - Model.Payout.ModifyResponse DeclineThirdParty(ModifyRequest modifyRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel a payout - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeclineThirdPartyAsync(ModifyRequest modifyRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the ReviewingService API endpoints - /// - public class ReviewingService : AbstractService, IReviewingService - { - private readonly string _baseUrl; - - public ReviewingService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://pal-test.adyen.com/pal/servlet/Payout/v68"); - } - - public Model.Payout.ModifyResponse ConfirmThirdParty(ModifyRequest modifyRequest = default, RequestOptions requestOptions = default) - { - return ConfirmThirdPartyAsync(modifyRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ConfirmThirdPartyAsync(ModifyRequest modifyRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/confirmThirdParty"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(modifyRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Payout.ModifyResponse DeclineThirdParty(ModifyRequest modifyRequest = default, RequestOptions requestOptions = default) - { - return DeclineThirdPartyAsync(modifyRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeclineThirdPartyAsync(ModifyRequest modifyRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/declineThirdParty"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(modifyRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PlatformsAccount/AccountHoldersService.cs b/Adyen/Service/PlatformsAccount/AccountHoldersService.cs deleted file mode 100644 index 947095844..000000000 --- a/Adyen/Service/PlatformsAccount/AccountHoldersService.cs +++ /dev/null @@ -1,302 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.PlatformsAccount; - -namespace Adyen.Service.PlatformsAccount -{ - /// - /// AccountHoldersService Interface - /// - public interface IAccountHoldersService - { - /// - /// Close an account holder - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.CloseAccountHolderResponse CloseAccountHolder(CloseAccountHolderRequest closeAccountHolderRequest = default, RequestOptions requestOptions = default); - - /// - /// Close an account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CloseAccountHolderAsync(CloseAccountHolderRequest closeAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Close stores - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GenericResponse CloseStores(CloseStoresRequest closeStoresRequest = default, RequestOptions requestOptions = default); - - /// - /// Close stores - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CloseStoresAsync(CloseStoresRequest closeStoresRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create an account holder - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.CreateAccountHolderResponse CreateAccountHolder(CreateAccountHolderRequest createAccountHolderRequest = default, RequestOptions requestOptions = default); - - /// - /// Create an account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateAccountHolderAsync(CreateAccountHolderRequest createAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get an account holder - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GetAccountHolderResponse GetAccountHolder(GetAccountHolderRequest getAccountHolderRequest = default, RequestOptions requestOptions = default); - - /// - /// Get an account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAccountHolderAsync(GetAccountHolderRequest getAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a tax form - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GetTaxFormResponse GetTaxForm(GetTaxFormRequest getTaxFormRequest = default, RequestOptions requestOptions = default); - - /// - /// Get a tax form - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTaxFormAsync(GetTaxFormRequest getTaxFormRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Suspend an account holder - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.SuspendAccountHolderResponse SuspendAccountHolder(SuspendAccountHolderRequest suspendAccountHolderRequest = default, RequestOptions requestOptions = default); - - /// - /// Suspend an account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task SuspendAccountHolderAsync(SuspendAccountHolderRequest suspendAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Unsuspend an account holder - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.UnSuspendAccountHolderResponse UnSuspendAccountHolder(UnSuspendAccountHolderRequest unSuspendAccountHolderRequest = default, RequestOptions requestOptions = default); - - /// - /// Unsuspend an account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UnSuspendAccountHolderAsync(UnSuspendAccountHolderRequest unSuspendAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update an account holder - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.UpdateAccountHolderResponse UpdateAccountHolder(UpdateAccountHolderRequest updateAccountHolderRequest = default, RequestOptions requestOptions = default); - - /// - /// Update an account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateAccountHolderAsync(UpdateAccountHolderRequest updateAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update payout or processing state - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GetAccountHolderStatusResponse UpdateAccountHolderState(UpdateAccountHolderStateRequest updateAccountHolderStateRequest = default, RequestOptions requestOptions = default); - - /// - /// Update payout or processing state - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateAccountHolderStateAsync(UpdateAccountHolderStateRequest updateAccountHolderStateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AccountHoldersService API endpoints - /// - public class AccountHoldersService : AbstractService, IAccountHoldersService - { - private readonly string _baseUrl; - - public AccountHoldersService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://cal-test.adyen.com/cal/services/Account/v6"); - } - - public Model.PlatformsAccount.CloseAccountHolderResponse CloseAccountHolder(CloseAccountHolderRequest closeAccountHolderRequest = default, RequestOptions requestOptions = default) - { - return CloseAccountHolderAsync(closeAccountHolderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CloseAccountHolderAsync(CloseAccountHolderRequest closeAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/closeAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(closeAccountHolderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GenericResponse CloseStores(CloseStoresRequest closeStoresRequest = default, RequestOptions requestOptions = default) - { - return CloseStoresAsync(closeStoresRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CloseStoresAsync(CloseStoresRequest closeStoresRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/closeStores"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(closeStoresRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.CreateAccountHolderResponse CreateAccountHolder(CreateAccountHolderRequest createAccountHolderRequest = default, RequestOptions requestOptions = default) - { - return CreateAccountHolderAsync(createAccountHolderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateAccountHolderAsync(CreateAccountHolderRequest createAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/createAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createAccountHolderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GetAccountHolderResponse GetAccountHolder(GetAccountHolderRequest getAccountHolderRequest = default, RequestOptions requestOptions = default) - { - return GetAccountHolderAsync(getAccountHolderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAccountHolderAsync(GetAccountHolderRequest getAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getAccountHolderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GetTaxFormResponse GetTaxForm(GetTaxFormRequest getTaxFormRequest = default, RequestOptions requestOptions = default) - { - return GetTaxFormAsync(getTaxFormRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTaxFormAsync(GetTaxFormRequest getTaxFormRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getTaxForm"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getTaxFormRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.SuspendAccountHolderResponse SuspendAccountHolder(SuspendAccountHolderRequest suspendAccountHolderRequest = default, RequestOptions requestOptions = default) - { - return SuspendAccountHolderAsync(suspendAccountHolderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SuspendAccountHolderAsync(SuspendAccountHolderRequest suspendAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/suspendAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(suspendAccountHolderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.UnSuspendAccountHolderResponse UnSuspendAccountHolder(UnSuspendAccountHolderRequest unSuspendAccountHolderRequest = default, RequestOptions requestOptions = default) - { - return UnSuspendAccountHolderAsync(unSuspendAccountHolderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UnSuspendAccountHolderAsync(UnSuspendAccountHolderRequest unSuspendAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/unSuspendAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(unSuspendAccountHolderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.UpdateAccountHolderResponse UpdateAccountHolder(UpdateAccountHolderRequest updateAccountHolderRequest = default, RequestOptions requestOptions = default) - { - return UpdateAccountHolderAsync(updateAccountHolderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateAccountHolderAsync(UpdateAccountHolderRequest updateAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/updateAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateAccountHolderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GetAccountHolderStatusResponse UpdateAccountHolderState(UpdateAccountHolderStateRequest updateAccountHolderStateRequest = default, RequestOptions requestOptions = default) - { - return UpdateAccountHolderStateAsync(updateAccountHolderStateRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateAccountHolderStateAsync(UpdateAccountHolderStateRequest updateAccountHolderStateRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/updateAccountHolderState"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateAccountHolderStateRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PlatformsAccount/AccountsService.cs b/Adyen/Service/PlatformsAccount/AccountsService.cs deleted file mode 100644 index 96d772086..000000000 --- a/Adyen/Service/PlatformsAccount/AccountsService.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.PlatformsAccount; - -namespace Adyen.Service.PlatformsAccount -{ - /// - /// AccountsService Interface - /// - public interface IAccountsService - { - /// - /// Close an account - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.CloseAccountResponse CloseAccount(CloseAccountRequest closeAccountRequest = default, RequestOptions requestOptions = default); - - /// - /// Close an account - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CloseAccountAsync(CloseAccountRequest closeAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Create an account - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.CreateAccountResponse CreateAccount(CreateAccountRequest createAccountRequest = default, RequestOptions requestOptions = default); - - /// - /// Create an account - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateAccountAsync(CreateAccountRequest createAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update an account - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.UpdateAccountResponse UpdateAccount(UpdateAccountRequest updateAccountRequest = default, RequestOptions requestOptions = default); - - /// - /// Update an account - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateAccountAsync(UpdateAccountRequest updateAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the AccountsService API endpoints - /// - public class AccountsService : AbstractService, IAccountsService - { - private readonly string _baseUrl; - - public AccountsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://cal-test.adyen.com/cal/services/Account/v6"); - } - - public Model.PlatformsAccount.CloseAccountResponse CloseAccount(CloseAccountRequest closeAccountRequest = default, RequestOptions requestOptions = default) - { - return CloseAccountAsync(closeAccountRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CloseAccountAsync(CloseAccountRequest closeAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/closeAccount"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(closeAccountRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.CreateAccountResponse CreateAccount(CreateAccountRequest createAccountRequest = default, RequestOptions requestOptions = default) - { - return CreateAccountAsync(createAccountRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateAccountAsync(CreateAccountRequest createAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/createAccount"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createAccountRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.UpdateAccountResponse UpdateAccount(UpdateAccountRequest updateAccountRequest = default, RequestOptions requestOptions = default) - { - return UpdateAccountAsync(updateAccountRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateAccountAsync(UpdateAccountRequest updateAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/updateAccount"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateAccountRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PlatformsAccount/VerificationService.cs b/Adyen/Service/PlatformsAccount/VerificationService.cs deleted file mode 100644 index 4467d3d5f..000000000 --- a/Adyen/Service/PlatformsAccount/VerificationService.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* -* Account API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.PlatformsAccount; - -namespace Adyen.Service.PlatformsAccount -{ - /// - /// VerificationService Interface - /// - public interface IVerificationService - { - /// - /// Trigger verification - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GenericResponse CheckAccountHolder(PerformVerificationRequest performVerificationRequest = default, RequestOptions requestOptions = default); - - /// - /// Trigger verification - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CheckAccountHolderAsync(PerformVerificationRequest performVerificationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete bank accounts - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GenericResponse DeleteBankAccounts(DeleteBankAccountRequest deleteBankAccountRequest = default, RequestOptions requestOptions = default); - - /// - /// Delete bank accounts - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteBankAccountsAsync(DeleteBankAccountRequest deleteBankAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete legal arrangements - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GenericResponse DeleteLegalArrangements(DeleteLegalArrangementRequest deleteLegalArrangementRequest = default, RequestOptions requestOptions = default); - - /// - /// Delete legal arrangements - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteLegalArrangementsAsync(DeleteLegalArrangementRequest deleteLegalArrangementRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete payout methods - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GenericResponse DeletePayoutMethods(DeletePayoutMethodRequest deletePayoutMethodRequest = default, RequestOptions requestOptions = default); - - /// - /// Delete payout methods - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeletePayoutMethodsAsync(DeletePayoutMethodRequest deletePayoutMethodRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete shareholders - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GenericResponse DeleteShareholders(DeleteShareholderRequest deleteShareholderRequest = default, RequestOptions requestOptions = default); - - /// - /// Delete shareholders - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteShareholdersAsync(DeleteShareholderRequest deleteShareholderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete signatories - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GenericResponse DeleteSignatories(DeleteSignatoriesRequest deleteSignatoriesRequest = default, RequestOptions requestOptions = default); - - /// - /// Delete signatories - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteSignatoriesAsync(DeleteSignatoriesRequest deleteSignatoriesRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get documents - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.GetUploadedDocumentsResponse GetUploadedDocuments(GetUploadedDocumentsRequest getUploadedDocumentsRequest = default, RequestOptions requestOptions = default); - - /// - /// Get documents - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetUploadedDocumentsAsync(GetUploadedDocumentsRequest getUploadedDocumentsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Upload a document - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsAccount.UpdateAccountHolderResponse UploadDocument(UploadDocumentRequest uploadDocumentRequest = default, RequestOptions requestOptions = default); - - /// - /// Upload a document - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UploadDocumentAsync(UploadDocumentRequest uploadDocumentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the VerificationService API endpoints - /// - public class VerificationService : AbstractService, IVerificationService - { - private readonly string _baseUrl; - - public VerificationService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://cal-test.adyen.com/cal/services/Account/v6"); - } - - public Model.PlatformsAccount.GenericResponse CheckAccountHolder(PerformVerificationRequest performVerificationRequest = default, RequestOptions requestOptions = default) - { - return CheckAccountHolderAsync(performVerificationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CheckAccountHolderAsync(PerformVerificationRequest performVerificationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/checkAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(performVerificationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GenericResponse DeleteBankAccounts(DeleteBankAccountRequest deleteBankAccountRequest = default, RequestOptions requestOptions = default) - { - return DeleteBankAccountsAsync(deleteBankAccountRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteBankAccountsAsync(DeleteBankAccountRequest deleteBankAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/deleteBankAccounts"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(deleteBankAccountRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GenericResponse DeleteLegalArrangements(DeleteLegalArrangementRequest deleteLegalArrangementRequest = default, RequestOptions requestOptions = default) - { - return DeleteLegalArrangementsAsync(deleteLegalArrangementRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteLegalArrangementsAsync(DeleteLegalArrangementRequest deleteLegalArrangementRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/deleteLegalArrangements"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(deleteLegalArrangementRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GenericResponse DeletePayoutMethods(DeletePayoutMethodRequest deletePayoutMethodRequest = default, RequestOptions requestOptions = default) - { - return DeletePayoutMethodsAsync(deletePayoutMethodRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeletePayoutMethodsAsync(DeletePayoutMethodRequest deletePayoutMethodRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/deletePayoutMethods"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(deletePayoutMethodRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GenericResponse DeleteShareholders(DeleteShareholderRequest deleteShareholderRequest = default, RequestOptions requestOptions = default) - { - return DeleteShareholdersAsync(deleteShareholderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteShareholdersAsync(DeleteShareholderRequest deleteShareholderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/deleteShareholders"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(deleteShareholderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GenericResponse DeleteSignatories(DeleteSignatoriesRequest deleteSignatoriesRequest = default, RequestOptions requestOptions = default) - { - return DeleteSignatoriesAsync(deleteSignatoriesRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteSignatoriesAsync(DeleteSignatoriesRequest deleteSignatoriesRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/deleteSignatories"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(deleteSignatoriesRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.GetUploadedDocumentsResponse GetUploadedDocuments(GetUploadedDocumentsRequest getUploadedDocumentsRequest = default, RequestOptions requestOptions = default) - { - return GetUploadedDocumentsAsync(getUploadedDocumentsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetUploadedDocumentsAsync(GetUploadedDocumentsRequest getUploadedDocumentsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getUploadedDocuments"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getUploadedDocumentsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsAccount.UpdateAccountHolderResponse UploadDocument(UploadDocumentRequest uploadDocumentRequest = default, RequestOptions requestOptions = default) - { - return UploadDocumentAsync(uploadDocumentRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UploadDocumentAsync(UploadDocumentRequest uploadDocumentRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/uploadDocument"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(uploadDocumentRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PlatformsFundService.cs b/Adyen/Service/PlatformsFundService.cs deleted file mode 100644 index 5150e14ae..000000000 --- a/Adyen/Service/PlatformsFundService.cs +++ /dev/null @@ -1,274 +0,0 @@ -/* -* Fund API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Constants; -using Adyen.Model; -using Adyen.Model.PlatformsFund; - -namespace Adyen.Service -{ - /// - /// DefaultService Interface - /// - public interface IPlatformsFundService - { - /// - /// Get the balances of an account holder - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsFund.AccountHolderBalanceResponse AccountHolderBalance(AccountHolderBalanceRequest accountHolderBalanceRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the balances of an account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task AccountHolderBalanceAsync(AccountHolderBalanceRequest accountHolderBalanceRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of transactions - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsFund.AccountHolderTransactionListResponse AccountHolderTransactionList(AccountHolderTransactionListRequest accountHolderTransactionListRequest = default, RequestOptions requestOptions = default); - - /// - /// Get a list of transactions - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task AccountHolderTransactionListAsync(AccountHolderTransactionListRequest accountHolderTransactionListRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Send a direct debit request - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsFund.DebitAccountHolderResponse DebitAccountHolder(DebitAccountHolderRequest debitAccountHolderRequest = default, RequestOptions requestOptions = default); - - /// - /// Send a direct debit request - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DebitAccountHolderAsync(DebitAccountHolderRequest debitAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Pay out from an account to the account holder - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsFund.PayoutAccountHolderResponse PayoutAccountHolder(PayoutAccountHolderRequest payoutAccountHolderRequest = default, RequestOptions requestOptions = default); - - /// - /// Pay out from an account to the account holder - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task PayoutAccountHolderAsync(PayoutAccountHolderRequest payoutAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Refund a funds transfer - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsFund.RefundFundsTransferResponse RefundFundsTransfer(RefundFundsTransferRequest refundFundsTransferRequest = default, RequestOptions requestOptions = default); - - /// - /// Refund a funds transfer - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RefundFundsTransferAsync(RefundFundsTransferRequest refundFundsTransferRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Refund all transactions of an account since the most recent payout - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsFund.RefundNotPaidOutTransfersResponse RefundNotPaidOutTransfers(RefundNotPaidOutTransfersRequest refundNotPaidOutTransfersRequest = default, RequestOptions requestOptions = default); - - /// - /// Refund all transactions of an account since the most recent payout - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task RefundNotPaidOutTransfersAsync(RefundNotPaidOutTransfersRequest refundNotPaidOutTransfersRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Designate a beneficiary account and transfer the benefactor's current balance - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsFund.SetupBeneficiaryResponse SetupBeneficiary(SetupBeneficiaryRequest setupBeneficiaryRequest = default, RequestOptions requestOptions = default); - - /// - /// Designate a beneficiary account and transfer the benefactor's current balance - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task SetupBeneficiaryAsync(SetupBeneficiaryRequest setupBeneficiaryRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Transfer funds between platform accounts - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsFund.TransferFundsResponse TransferFunds(TransferFundsRequest transferFundsRequest = default, RequestOptions requestOptions = default); - - /// - /// Transfer funds between platform accounts - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task TransferFundsAsync(TransferFundsRequest transferFundsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PlatformsFundService API endpoints - /// - public class PlatformsFundService : AbstractService, IPlatformsFundService - { - private readonly string _baseUrl; - - public PlatformsFundService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://cal-test.adyen.com/cal/services/Fund/v6"); - } - - public Model.PlatformsFund.AccountHolderBalanceResponse AccountHolderBalance(AccountHolderBalanceRequest accountHolderBalanceRequest = default, RequestOptions requestOptions = default) - { - return AccountHolderBalanceAsync(accountHolderBalanceRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AccountHolderBalanceAsync(AccountHolderBalanceRequest accountHolderBalanceRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/accountHolderBalance"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(accountHolderBalanceRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsFund.AccountHolderTransactionListResponse AccountHolderTransactionList(AccountHolderTransactionListRequest accountHolderTransactionListRequest = default, RequestOptions requestOptions = default) - { - return AccountHolderTransactionListAsync(accountHolderTransactionListRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task AccountHolderTransactionListAsync(AccountHolderTransactionListRequest accountHolderTransactionListRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/accountHolderTransactionList"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(accountHolderTransactionListRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsFund.DebitAccountHolderResponse DebitAccountHolder(DebitAccountHolderRequest debitAccountHolderRequest = default, RequestOptions requestOptions = default) - { - return DebitAccountHolderAsync(debitAccountHolderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DebitAccountHolderAsync(DebitAccountHolderRequest debitAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/debitAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(debitAccountHolderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsFund.PayoutAccountHolderResponse PayoutAccountHolder(PayoutAccountHolderRequest payoutAccountHolderRequest = default, RequestOptions requestOptions = default) - { - return PayoutAccountHolderAsync(payoutAccountHolderRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task PayoutAccountHolderAsync(PayoutAccountHolderRequest payoutAccountHolderRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/payoutAccountHolder"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(payoutAccountHolderRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsFund.RefundFundsTransferResponse RefundFundsTransfer(RefundFundsTransferRequest refundFundsTransferRequest = default, RequestOptions requestOptions = default) - { - return RefundFundsTransferAsync(refundFundsTransferRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RefundFundsTransferAsync(RefundFundsTransferRequest refundFundsTransferRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/refundFundsTransfer"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(refundFundsTransferRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsFund.RefundNotPaidOutTransfersResponse RefundNotPaidOutTransfers(RefundNotPaidOutTransfersRequest refundNotPaidOutTransfersRequest = default, RequestOptions requestOptions = default) - { - return RefundNotPaidOutTransfersAsync(refundNotPaidOutTransfersRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task RefundNotPaidOutTransfersAsync(RefundNotPaidOutTransfersRequest refundNotPaidOutTransfersRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/refundNotPaidOutTransfers"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(refundNotPaidOutTransfersRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsFund.SetupBeneficiaryResponse SetupBeneficiary(SetupBeneficiaryRequest setupBeneficiaryRequest = default, RequestOptions requestOptions = default) - { - return SetupBeneficiaryAsync(setupBeneficiaryRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task SetupBeneficiaryAsync(SetupBeneficiaryRequest setupBeneficiaryRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/setupBeneficiary"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(setupBeneficiaryRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsFund.TransferFundsResponse TransferFunds(TransferFundsRequest transferFundsRequest = default, RequestOptions requestOptions = default) - { - return TransferFundsAsync(transferFundsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task TransferFundsAsync(TransferFundsRequest transferFundsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/transferFunds"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(transferFundsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PlatformsHostedOnboardingPage/HostedOnboardingPageService.cs b/Adyen/Service/PlatformsHostedOnboardingPage/HostedOnboardingPageService.cs deleted file mode 100644 index 19f0a8d0c..000000000 --- a/Adyen/Service/PlatformsHostedOnboardingPage/HostedOnboardingPageService.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.PlatformsHostedOnboardingPage; - -namespace Adyen.Service.PlatformsHostedOnboardingPage -{ - /// - /// HostedOnboardingPageService Interface - /// - public interface IHostedOnboardingPageService - { - /// - /// Get a link to a Adyen-hosted onboarding page - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsHostedOnboardingPage.GetOnboardingUrlResponse GetOnboardingUrl(GetOnboardingUrlRequest getOnboardingUrlRequest = default, RequestOptions requestOptions = default); - - /// - /// Get a link to a Adyen-hosted onboarding page - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetOnboardingUrlAsync(GetOnboardingUrlRequest getOnboardingUrlRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the HostedOnboardingPageService API endpoints - /// - public class HostedOnboardingPageService : AbstractService, IHostedOnboardingPageService - { - private readonly string _baseUrl; - - public HostedOnboardingPageService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://cal-test.adyen.com/cal/services/Hop/v6"); - } - - public Model.PlatformsHostedOnboardingPage.GetOnboardingUrlResponse GetOnboardingUrl(GetOnboardingUrlRequest getOnboardingUrlRequest = default, RequestOptions requestOptions = default) - { - return GetOnboardingUrlAsync(getOnboardingUrlRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetOnboardingUrlAsync(GetOnboardingUrlRequest getOnboardingUrlRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getOnboardingUrl"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getOnboardingUrlRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PlatformsHostedOnboardingPage/PCIComplianceQuestionnairePageService.cs b/Adyen/Service/PlatformsHostedOnboardingPage/PCIComplianceQuestionnairePageService.cs deleted file mode 100644 index b41a064ef..000000000 --- a/Adyen/Service/PlatformsHostedOnboardingPage/PCIComplianceQuestionnairePageService.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Hosted onboarding API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.PlatformsHostedOnboardingPage; - -namespace Adyen.Service.PlatformsHostedOnboardingPage -{ - /// - /// PCIComplianceQuestionnairePageService Interface - /// - public interface IPCIComplianceQuestionnairePageService - { - /// - /// Get a link to a PCI compliance questionnaire - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsHostedOnboardingPage.GetPciUrlResponse GetPciQuestionnaireUrl(GetPciUrlRequest getPciUrlRequest = default, RequestOptions requestOptions = default); - - /// - /// Get a link to a PCI compliance questionnaire - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetPciQuestionnaireUrlAsync(GetPciUrlRequest getPciUrlRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PCIComplianceQuestionnairePageService API endpoints - /// - public class PCIComplianceQuestionnairePageService : AbstractService, IPCIComplianceQuestionnairePageService - { - private readonly string _baseUrl; - - public PCIComplianceQuestionnairePageService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://cal-test.adyen.com/cal/services/Hop/v6"); - } - - public Model.PlatformsHostedOnboardingPage.GetPciUrlResponse GetPciQuestionnaireUrl(GetPciUrlRequest getPciUrlRequest = default, RequestOptions requestOptions = default) - { - return GetPciQuestionnaireUrlAsync(getPciUrlRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetPciQuestionnaireUrlAsync(GetPciUrlRequest getPciUrlRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getPciQuestionnaireUrl"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getPciUrlRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PlatformsNotificationConfigurationService.cs b/Adyen/Service/PlatformsNotificationConfigurationService.cs deleted file mode 100644 index 013a66792..000000000 --- a/Adyen/Service/PlatformsNotificationConfigurationService.cs +++ /dev/null @@ -1,216 +0,0 @@ -/* -* Notification Configuration API -* -* -* The version of the OpenAPI document: 6 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Constants; -using Adyen.Model; -using Adyen.Model.PlatformsNotificationConfiguration; - -namespace Adyen.Service -{ - /// - /// DefaultService Interface - /// - public interface IPlatformsNotificationConfigurationService - { - /// - /// Subscribe to notifications - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsNotificationConfiguration.GetNotificationConfigurationResponse CreateNotificationConfiguration(CreateNotificationConfigurationRequest createNotificationConfigurationRequest = default, RequestOptions requestOptions = default); - - /// - /// Subscribe to notifications - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateNotificationConfigurationAsync(CreateNotificationConfigurationRequest createNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Delete a notification subscription configuration - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsNotificationConfiguration.GenericResponse DeleteNotificationConfigurations(DeleteNotificationConfigurationRequest deleteNotificationConfigurationRequest = default, RequestOptions requestOptions = default); - - /// - /// Delete a notification subscription configuration - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DeleteNotificationConfigurationsAsync(DeleteNotificationConfigurationRequest deleteNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a notification subscription configuration - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsNotificationConfiguration.GetNotificationConfigurationResponse GetNotificationConfiguration(GetNotificationConfigurationRequest getNotificationConfigurationRequest = default, RequestOptions requestOptions = default); - - /// - /// Get a notification subscription configuration - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetNotificationConfigurationAsync(GetNotificationConfigurationRequest getNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a list of notification subscription configurations - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsNotificationConfiguration.GetNotificationConfigurationListResponse GetNotificationConfigurationList(RequestOptions requestOptions = default); - - /// - /// Get a list of notification subscription configurations - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetNotificationConfigurationListAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Test a notification configuration - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsNotificationConfiguration.TestNotificationConfigurationResponse TestNotificationConfiguration(TestNotificationConfigurationRequest testNotificationConfigurationRequest = default, RequestOptions requestOptions = default); - - /// - /// Test a notification configuration - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task TestNotificationConfigurationAsync(TestNotificationConfigurationRequest testNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Update a notification subscription configuration - /// - /// - - /// - Additional request options. - /// . - Model.PlatformsNotificationConfiguration.GetNotificationConfigurationResponse UpdateNotificationConfiguration(UpdateNotificationConfigurationRequest updateNotificationConfigurationRequest = default, RequestOptions requestOptions = default); - - /// - /// Update a notification subscription configuration - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task UpdateNotificationConfigurationAsync(UpdateNotificationConfigurationRequest updateNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PlatformsNotificationConfigurationService API endpoints - /// - public class PlatformsNotificationConfigurationService : AbstractService, IPlatformsNotificationConfigurationService - { - private readonly string _baseUrl; - - public PlatformsNotificationConfigurationService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://cal-test.adyen.com/cal/services/Notification/v6"); - } - - public Model.PlatformsNotificationConfiguration.GetNotificationConfigurationResponse CreateNotificationConfiguration(CreateNotificationConfigurationRequest createNotificationConfigurationRequest = default, RequestOptions requestOptions = default) - { - return CreateNotificationConfigurationAsync(createNotificationConfigurationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateNotificationConfigurationAsync(CreateNotificationConfigurationRequest createNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/createNotificationConfiguration"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createNotificationConfigurationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsNotificationConfiguration.GenericResponse DeleteNotificationConfigurations(DeleteNotificationConfigurationRequest deleteNotificationConfigurationRequest = default, RequestOptions requestOptions = default) - { - return DeleteNotificationConfigurationsAsync(deleteNotificationConfigurationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DeleteNotificationConfigurationsAsync(DeleteNotificationConfigurationRequest deleteNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/deleteNotificationConfigurations"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(deleteNotificationConfigurationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsNotificationConfiguration.GetNotificationConfigurationResponse GetNotificationConfiguration(GetNotificationConfigurationRequest getNotificationConfigurationRequest = default, RequestOptions requestOptions = default) - { - return GetNotificationConfigurationAsync(getNotificationConfigurationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetNotificationConfigurationAsync(GetNotificationConfigurationRequest getNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getNotificationConfiguration"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getNotificationConfigurationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsNotificationConfiguration.GetNotificationConfigurationListResponse GetNotificationConfigurationList(RequestOptions requestOptions = default) - { - return GetNotificationConfigurationListAsync(requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetNotificationConfigurationListAsync(RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getNotificationConfigurationList"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsNotificationConfiguration.TestNotificationConfigurationResponse TestNotificationConfiguration(TestNotificationConfigurationRequest testNotificationConfigurationRequest = default, RequestOptions requestOptions = default) - { - return TestNotificationConfigurationAsync(testNotificationConfigurationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task TestNotificationConfigurationAsync(TestNotificationConfigurationRequest testNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/testNotificationConfiguration"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(testNotificationConfigurationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.PlatformsNotificationConfiguration.GetNotificationConfigurationResponse UpdateNotificationConfiguration(UpdateNotificationConfigurationRequest updateNotificationConfigurationRequest = default, RequestOptions requestOptions = default) - { - return UpdateNotificationConfigurationAsync(updateNotificationConfigurationRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task UpdateNotificationConfigurationAsync(UpdateNotificationConfigurationRequest updateNotificationConfigurationRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/updateNotificationConfiguration"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(updateNotificationConfigurationRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PosMobileService.cs b/Adyen/Service/PosMobileService.cs deleted file mode 100644 index eba474151..000000000 --- a/Adyen/Service/PosMobileService.cs +++ /dev/null @@ -1,70 +0,0 @@ -/* -* POS Mobile API -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.PosMobile; - -namespace Adyen.Service -{ - /// - /// PosMobileService Interface - /// - public interface IPosMobileService - { - /// - /// Create a communication session - /// - /// - - /// - Additional request options. - /// . - Model.PosMobile.CreateSessionResponse CreateCommunicationSession(CreateSessionRequest createSessionRequest = default, RequestOptions requestOptions = default); - - /// - /// Create a communication session - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreateCommunicationSessionAsync(CreateSessionRequest createSessionRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PosMobileService API endpoints - /// - public class PosMobileService : AbstractService, IPosMobileService - { - private readonly string _baseUrl; - - public PosMobileService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://checkout-test.adyen.com/checkout/possdk/v68"); - } - - public Model.PosMobile.CreateSessionResponse CreateCommunicationSession(CreateSessionRequest createSessionRequest = default, RequestOptions requestOptions = default) - { - return CreateCommunicationSessionAsync(createSessionRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreateCommunicationSessionAsync(CreateSessionRequest createSessionRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/sessions"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createSessionRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/PosTerminalManagementService.cs b/Adyen/Service/PosTerminalManagementService.cs deleted file mode 100644 index 67df2e936..000000000 --- a/Adyen/Service/PosTerminalManagementService.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* -* POS Terminal Management API -* -* -* The version of the OpenAPI document: 1 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.PosTerminalManagement; - -namespace Adyen.Service -{ - /// - /// PosTerminalManagementService Interface - /// - public interface IPosTerminalManagementService - { - /// - /// Assign terminals - /// - /// - - /// - Additional request options. - /// . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Model.PosTerminalManagement.AssignTerminalsResponse AssignTerminals(AssignTerminalsRequest assignTerminalsRequest = default, RequestOptions requestOptions = default); - - /// - /// Assign terminals - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Task AssignTerminalsAsync(AssignTerminalsRequest assignTerminalsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the account or store of a terminal - /// - /// - - /// - Additional request options. - /// . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Model.PosTerminalManagement.FindTerminalResponse FindTerminal(FindTerminalRequest findTerminalRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the account or store of a terminal - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Task FindTerminalAsync(FindTerminalRequest findTerminalRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the stores of an account - /// - /// - - /// - Additional request options. - /// . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Model.PosTerminalManagement.GetStoresUnderAccountResponse GetStoresUnderAccount(GetStoresUnderAccountRequest getStoresUnderAccountRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the stores of an account - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Task GetStoresUnderAccountAsync(GetStoresUnderAccountRequest getStoresUnderAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the details of a terminal - /// - /// - - /// - Additional request options. - /// . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Model.PosTerminalManagement.GetTerminalDetailsResponse GetTerminalDetails(GetTerminalDetailsRequest getTerminalDetailsRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the details of a terminal - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Task GetTerminalDetailsAsync(GetTerminalDetailsRequest getTerminalDetailsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get the list of terminals - /// - /// - - /// - Additional request options. - /// . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Model.PosTerminalManagement.GetTerminalsUnderAccountResponse GetTerminalsUnderAccount(GetTerminalsUnderAccountRequest getTerminalsUnderAccountRequest = default, RequestOptions requestOptions = default); - - /// - /// Get the list of terminals - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - Task GetTerminalsUnderAccountAsync(GetTerminalsUnderAccountRequest getTerminalsUnderAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the PosTerminalManagementService API endpoints - /// - public class PosTerminalManagementService : AbstractService, IPosTerminalManagementService - { - private readonly string _baseUrl; - - public PosTerminalManagementService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://postfmapi-test.adyen.com/postfmapi/terminal/v1"); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public Model.PosTerminalManagement.AssignTerminalsResponse AssignTerminals(AssignTerminalsRequest assignTerminalsRequest = default, RequestOptions requestOptions = default) - { - return AssignTerminalsAsync(assignTerminalsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public async Task AssignTerminalsAsync(AssignTerminalsRequest assignTerminalsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/assignTerminals"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(assignTerminalsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public Model.PosTerminalManagement.FindTerminalResponse FindTerminal(FindTerminalRequest findTerminalRequest = default, RequestOptions requestOptions = default) - { - return FindTerminalAsync(findTerminalRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public async Task FindTerminalAsync(FindTerminalRequest findTerminalRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/findTerminal"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(findTerminalRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public Model.PosTerminalManagement.GetStoresUnderAccountResponse GetStoresUnderAccount(GetStoresUnderAccountRequest getStoresUnderAccountRequest = default, RequestOptions requestOptions = default) - { - return GetStoresUnderAccountAsync(getStoresUnderAccountRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public async Task GetStoresUnderAccountAsync(GetStoresUnderAccountRequest getStoresUnderAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getStoresUnderAccount"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getStoresUnderAccountRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public Model.PosTerminalManagement.GetTerminalDetailsResponse GetTerminalDetails(GetTerminalDetailsRequest getTerminalDetailsRequest = default, RequestOptions requestOptions = default) - { - return GetTerminalDetailsAsync(getTerminalDetailsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public async Task GetTerminalDetailsAsync(GetTerminalDetailsRequest getTerminalDetailsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getTerminalDetails"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getTerminalDetailsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public Model.PosTerminalManagement.GetTerminalsUnderAccountResponse GetTerminalsUnderAccount(GetTerminalsUnderAccountRequest getTerminalsUnderAccountRequest = default, RequestOptions requestOptions = default) - { - return GetTerminalsUnderAccountAsync(getTerminalsUnderAccountRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since POS Terminal Management API v1. Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).")] - public async Task GetTerminalsUnderAccountAsync(GetTerminalsUnderAccountRequest getTerminalsUnderAccountRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/getTerminalsUnderAccount"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(getTerminalsUnderAccountRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/RecurringService.cs b/Adyen/Service/RecurringService.cs deleted file mode 100644 index 21fcdc603..000000000 --- a/Adyen/Service/RecurringService.cs +++ /dev/null @@ -1,215 +0,0 @@ -/* -* Adyen Recurring API (deprecated) -* -* -* The version of the OpenAPI document: 68 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Recurring; - -namespace Adyen.Service -{ - /// - /// RecurringService Interface - /// - public interface IRecurringService - { - /// - /// Create new permits linked to a recurring contract. - /// - /// - - /// - Additional request options. - /// . - Model.Recurring.CreatePermitResult CreatePermit(CreatePermitRequest createPermitRequest = default, RequestOptions requestOptions = default); - - /// - /// Create new permits linked to a recurring contract. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CreatePermitAsync(CreatePermitRequest createPermitRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Disable stored payment details - /// - /// - - /// - Additional request options. - /// . - Model.Recurring.DisableResult Disable(DisableRequest disableRequest = default, RequestOptions requestOptions = default); - - /// - /// Disable stored payment details - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DisableAsync(DisableRequest disableRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Disable an existing permit. - /// - /// - - /// - Additional request options. - /// . - Model.Recurring.DisablePermitResult DisablePermit(DisablePermitRequest disablePermitRequest = default, RequestOptions requestOptions = default); - - /// - /// Disable an existing permit. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task DisablePermitAsync(DisablePermitRequest disablePermitRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get stored payment details - /// - /// - - /// - Additional request options. - /// . - Model.Recurring.RecurringDetailsResult ListRecurringDetails(RecurringDetailsRequest recurringDetailsRequest = default, RequestOptions requestOptions = default); - - /// - /// Get stored payment details - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ListRecurringDetailsAsync(RecurringDetailsRequest recurringDetailsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Ask issuer to notify the shopper - /// - /// - - /// - Additional request options. - /// . - Model.Recurring.NotifyShopperResult NotifyShopper(NotifyShopperRequest notifyShopperRequest = default, RequestOptions requestOptions = default); - - /// - /// Ask issuer to notify the shopper - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task NotifyShopperAsync(NotifyShopperRequest notifyShopperRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Schedule running the Account Updater - /// - /// - - /// - Additional request options. - /// . - Model.Recurring.ScheduleAccountUpdaterResult ScheduleAccountUpdater(ScheduleAccountUpdaterRequest scheduleAccountUpdaterRequest = default, RequestOptions requestOptions = default); - - /// - /// Schedule running the Account Updater - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ScheduleAccountUpdaterAsync(ScheduleAccountUpdaterRequest scheduleAccountUpdaterRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the RecurringService API endpoints - /// - public class RecurringService : AbstractService, IRecurringService - { - private readonly string _baseUrl; - - public RecurringService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://pal-test.adyen.com/pal/servlet/Recurring/v68"); - } - - public Model.Recurring.CreatePermitResult CreatePermit(CreatePermitRequest createPermitRequest = default, RequestOptions requestOptions = default) - { - return CreatePermitAsync(createPermitRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CreatePermitAsync(CreatePermitRequest createPermitRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/createPermit"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(createPermitRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Recurring.DisableResult Disable(DisableRequest disableRequest = default, RequestOptions requestOptions = default) - { - return DisableAsync(disableRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DisableAsync(DisableRequest disableRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/disable"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(disableRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Recurring.DisablePermitResult DisablePermit(DisablePermitRequest disablePermitRequest = default, RequestOptions requestOptions = default) - { - return DisablePermitAsync(disablePermitRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task DisablePermitAsync(DisablePermitRequest disablePermitRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/disablePermit"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(disablePermitRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Recurring.RecurringDetailsResult ListRecurringDetails(RecurringDetailsRequest recurringDetailsRequest = default, RequestOptions requestOptions = default) - { - return ListRecurringDetailsAsync(recurringDetailsRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ListRecurringDetailsAsync(RecurringDetailsRequest recurringDetailsRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/listRecurringDetails"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(recurringDetailsRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Recurring.NotifyShopperResult NotifyShopper(NotifyShopperRequest notifyShopperRequest = default, RequestOptions requestOptions = default) - { - return NotifyShopperAsync(notifyShopperRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task NotifyShopperAsync(NotifyShopperRequest notifyShopperRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/notifyShopper"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(notifyShopperRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Recurring.ScheduleAccountUpdaterResult ScheduleAccountUpdater(ScheduleAccountUpdaterRequest scheduleAccountUpdaterRequest = default, RequestOptions requestOptions = default) - { - return ScheduleAccountUpdaterAsync(scheduleAccountUpdaterRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ScheduleAccountUpdaterAsync(ScheduleAccountUpdaterRequest scheduleAccountUpdaterRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/scheduleAccountUpdater"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(scheduleAccountUpdaterRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/StoredValueService.cs b/Adyen/Service/StoredValueService.cs deleted file mode 100644 index 574097af0..000000000 --- a/Adyen/Service/StoredValueService.cs +++ /dev/null @@ -1,215 +0,0 @@ -/* -* Adyen Stored Value API -* -* -* The version of the OpenAPI document: 46 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.StoredValue; - -namespace Adyen.Service -{ - /// - /// StoredValueService Interface - /// - public interface IStoredValueService - { - /// - /// Changes the status of the payment method. - /// - /// - - /// - Additional request options. - /// . - Model.StoredValue.StoredValueStatusChangeResponse ChangeStatus(StoredValueStatusChangeRequest storedValueStatusChangeRequest = default, RequestOptions requestOptions = default); - - /// - /// Changes the status of the payment method. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ChangeStatusAsync(StoredValueStatusChangeRequest storedValueStatusChangeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Checks the balance. - /// - /// - - /// - Additional request options. - /// . - Model.StoredValue.StoredValueBalanceCheckResponse CheckBalance(StoredValueBalanceCheckRequest storedValueBalanceCheckRequest = default, RequestOptions requestOptions = default); - - /// - /// Checks the balance. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task CheckBalanceAsync(StoredValueBalanceCheckRequest storedValueBalanceCheckRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Issues a new card. - /// - /// - - /// - Additional request options. - /// . - Model.StoredValue.StoredValueIssueResponse Issue(StoredValueIssueRequest storedValueIssueRequest = default, RequestOptions requestOptions = default); - - /// - /// Issues a new card. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task IssueAsync(StoredValueIssueRequest storedValueIssueRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Loads the payment method. - /// - /// - - /// - Additional request options. - /// . - Model.StoredValue.StoredValueLoadResponse Load(StoredValueLoadRequest storedValueLoadRequest = default, RequestOptions requestOptions = default); - - /// - /// Loads the payment method. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task LoadAsync(StoredValueLoadRequest storedValueLoadRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Merge the balance of two cards. - /// - /// - - /// - Additional request options. - /// . - Model.StoredValue.StoredValueBalanceMergeResponse MergeBalance(StoredValueBalanceMergeRequest storedValueBalanceMergeRequest = default, RequestOptions requestOptions = default); - - /// - /// Merge the balance of two cards. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task MergeBalanceAsync(StoredValueBalanceMergeRequest storedValueBalanceMergeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Voids a transaction. - /// - /// - - /// - Additional request options. - /// . - Model.StoredValue.StoredValueVoidResponse VoidTransaction(StoredValueVoidRequest storedValueVoidRequest = default, RequestOptions requestOptions = default); - - /// - /// Voids a transaction. - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task VoidTransactionAsync(StoredValueVoidRequest storedValueVoidRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the StoredValueService API endpoints - /// - public class StoredValueService : AbstractService, IStoredValueService - { - private readonly string _baseUrl; - - public StoredValueService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://pal-test.adyen.com/pal/servlet/StoredValue/v46"); - } - - public Model.StoredValue.StoredValueStatusChangeResponse ChangeStatus(StoredValueStatusChangeRequest storedValueStatusChangeRequest = default, RequestOptions requestOptions = default) - { - return ChangeStatusAsync(storedValueStatusChangeRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ChangeStatusAsync(StoredValueStatusChangeRequest storedValueStatusChangeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/changeStatus"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storedValueStatusChangeRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.StoredValue.StoredValueBalanceCheckResponse CheckBalance(StoredValueBalanceCheckRequest storedValueBalanceCheckRequest = default, RequestOptions requestOptions = default) - { - return CheckBalanceAsync(storedValueBalanceCheckRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CheckBalanceAsync(StoredValueBalanceCheckRequest storedValueBalanceCheckRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/checkBalance"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storedValueBalanceCheckRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.StoredValue.StoredValueIssueResponse Issue(StoredValueIssueRequest storedValueIssueRequest = default, RequestOptions requestOptions = default) - { - return IssueAsync(storedValueIssueRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task IssueAsync(StoredValueIssueRequest storedValueIssueRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/issue"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storedValueIssueRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.StoredValue.StoredValueLoadResponse Load(StoredValueLoadRequest storedValueLoadRequest = default, RequestOptions requestOptions = default) - { - return LoadAsync(storedValueLoadRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task LoadAsync(StoredValueLoadRequest storedValueLoadRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/load"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storedValueLoadRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.StoredValue.StoredValueBalanceMergeResponse MergeBalance(StoredValueBalanceMergeRequest storedValueBalanceMergeRequest = default, RequestOptions requestOptions = default) - { - return MergeBalanceAsync(storedValueBalanceMergeRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task MergeBalanceAsync(StoredValueBalanceMergeRequest storedValueBalanceMergeRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/mergeBalance"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storedValueBalanceMergeRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.StoredValue.StoredValueVoidResponse VoidTransaction(StoredValueVoidRequest storedValueVoidRequest = default, RequestOptions requestOptions = default) - { - return VoidTransactionAsync(storedValueVoidRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task VoidTransactionAsync(StoredValueVoidRequest storedValueVoidRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/voidTransaction"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(storedValueVoidRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Transfers/CapitalService.cs b/Adyen/Service/Transfers/CapitalService.cs deleted file mode 100644 index 27eb9e95e..000000000 --- a/Adyen/Service/Transfers/CapitalService.cs +++ /dev/null @@ -1,143 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Transfers; - -namespace Adyen.Service.Transfers -{ - /// - /// CapitalService Interface - /// - public interface ICapitalService - { - /// - /// Get a capital account - /// - /// - The counterparty account holder id. - /// - Additional request options. - /// . - [Obsolete("Deprecated since Transfers API v4. Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead.")] - Model.Transfers.CapitalGrants GetCapitalAccount(string counterpartyAccountHolderId = default, RequestOptions requestOptions = default); - - /// - /// Get a capital account - /// - /// - The counterparty account holder id. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since Transfers API v4. Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead.")] - Task GetCapitalAccountAsync(string counterpartyAccountHolderId = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get grant reference details - /// - /// - The unique identifier of the grant. - /// - Additional request options. - /// . - [Obsolete("Deprecated since Transfers API v4. Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead.")] - Model.Transfers.CapitalGrant GetGrantReferenceDetails(string id, RequestOptions requestOptions = default); - - /// - /// Get grant reference details - /// - /// - The unique identifier of the grant. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since Transfers API v4. Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead.")] - Task GetGrantReferenceDetailsAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Request a grant payout - /// - /// - - /// - Additional request options. - /// . - [Obsolete("Deprecated since Transfers API v4. Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead.")] - Model.Transfers.CapitalGrant RequestGrantPayout(CapitalGrantInfo capitalGrantInfo = default, RequestOptions requestOptions = default); - - /// - /// Request a grant payout - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - [Obsolete("Deprecated since Transfers API v4. Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead.")] - Task RequestGrantPayoutAsync(CapitalGrantInfo capitalGrantInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the CapitalService API endpoints - /// - public class CapitalService : AbstractService, ICapitalService - { - private readonly string _baseUrl; - - public CapitalService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/btl/v4"); - } - - [Obsolete("Deprecated since Transfers API v4. Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead.")] - public Model.Transfers.CapitalGrants GetCapitalAccount(string counterpartyAccountHolderId = default, RequestOptions requestOptions = default) - { - return GetCapitalAccountAsync(counterpartyAccountHolderId, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since Transfers API v4. Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants) instead.")] - public async Task GetCapitalAccountAsync(string counterpartyAccountHolderId = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (counterpartyAccountHolderId != null) queryParams.Add("counterpartyAccountHolderId", counterpartyAccountHolderId); - var endpoint = _baseUrl + "/grants" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("Deprecated since Transfers API v4. Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead.")] - public Model.Transfers.CapitalGrant GetGrantReferenceDetails(string id, RequestOptions requestOptions = default) - { - return GetGrantReferenceDetailsAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since Transfers API v4. Use the `/grants/{grantId}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grants/(grantId)) instead.")] - public async Task GetGrantReferenceDetailsAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/grants/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - [Obsolete("Deprecated since Transfers API v4. Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead.")] - public Model.Transfers.CapitalGrant RequestGrantPayout(CapitalGrantInfo capitalGrantInfo = default, RequestOptions requestOptions = default) - { - return RequestGrantPayoutAsync(capitalGrantInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - [Obsolete("Deprecated since Transfers API v4. Use the `/grants` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/post/grants) instead.")] - public async Task RequestGrantPayoutAsync(CapitalGrantInfo capitalGrantInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/grants"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(capitalGrantInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Transfers/TransactionsService.cs b/Adyen/Service/Transfers/TransactionsService.cs deleted file mode 100644 index d9856add0..000000000 --- a/Adyen/Service/Transfers/TransactionsService.cs +++ /dev/null @@ -1,123 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Transfers; - -namespace Adyen.Service.Transfers -{ - /// - /// TransactionsService Interface - /// - public interface ITransactionsService - { - /// - /// Get all transactions - /// - /// - The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. - /// - The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. - /// - The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. - /// - The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. - /// - The `cursor` returned in the links of the previous response. - /// - Only include transactions that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - Only include transactions that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// . - Model.Transfers.TransactionSearchResponse GetAllTransactions(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string paymentInstrumentId = default, string accountHolderId = default, string balanceAccountId = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get all transactions - /// - /// - The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. - /// - The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. - /// - The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. - /// - The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. - /// - The `cursor` returned in the links of the previous response. - /// - Only include transactions that have been created on or after this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - Only include transactions that have been created on or before this point in time. The value must be in ISO 8601 format. For example, **2021-05-30T15:07:40Z**. - /// - The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllTransactionsAsync(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string paymentInstrumentId = default, string accountHolderId = default, string balanceAccountId = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a transaction - /// - /// - The unique identifier of the transaction. - /// - Additional request options. - /// . - Model.Transfers.Transaction GetTransaction(string id, RequestOptions requestOptions = default); - - /// - /// Get a transaction - /// - /// - The unique identifier of the transaction. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTransactionAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TransactionsService API endpoints - /// - public class TransactionsService : AbstractService, ITransactionsService - { - private readonly string _baseUrl; - - public TransactionsService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/btl/v4"); - } - - public Model.Transfers.TransactionSearchResponse GetAllTransactions(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string paymentInstrumentId = default, string accountHolderId = default, string balanceAccountId = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default) - { - return GetAllTransactionsAsync(createdSince, createdUntil, balancePlatform, paymentInstrumentId, accountHolderId, balanceAccountId, cursor, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllTransactionsAsync(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string paymentInstrumentId = default, string accountHolderId = default, string balanceAccountId = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (balancePlatform != null) queryParams.Add("balancePlatform", balancePlatform); - if (paymentInstrumentId != null) queryParams.Add("paymentInstrumentId", paymentInstrumentId); - if (accountHolderId != null) queryParams.Add("accountHolderId", accountHolderId); - if (balanceAccountId != null) queryParams.Add("balanceAccountId", balanceAccountId); - if (cursor != null) queryParams.Add("cursor", cursor); - queryParams.Add("createdSince", createdSince.ToString("yyyy-MM-ddTHH:mm:ssZ")); - queryParams.Add("createdUntil", createdUntil.ToString("yyyy-MM-ddTHH:mm:ssZ")); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + "/transactions" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Transfers.Transaction GetTransaction(string id, RequestOptions requestOptions = default) - { - return GetTransactionAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTransactionAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transactions/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/Service/Transfers/TransfersService.cs b/Adyen/Service/Transfers/TransfersService.cs deleted file mode 100644 index 860a47fcb..000000000 --- a/Adyen/Service/Transfers/TransfersService.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Transfers API -* -* -* The version of the OpenAPI document: 4 -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/ - -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Adyen.Model.Transfers; - -namespace Adyen.Service.Transfers -{ - /// - /// TransfersService Interface - /// - public interface ITransfersService - { - /// - /// Approve initiated transfers - /// - /// - - /// - Additional request options. - void ApproveInitiatedTransfers(ApproveTransfersRequest approveTransfersRequest = default, RequestOptions requestOptions = default); - - /// - /// Approve initiated transfers - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task ApproveInitiatedTransfersAsync(ApproveTransfersRequest approveTransfersRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Cancel initiated transfers - /// - /// - - /// - Additional request options. - void CancelInitiatedTransfers(CancelTransfersRequest cancelTransfersRequest = default, RequestOptions requestOptions = default); - - /// - /// Cancel initiated transfers - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - Task CancelInitiatedTransfersAsync(CancelTransfersRequest cancelTransfersRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get all transfers - /// - /// - The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. - /// - The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. - /// - The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. - /// - The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. - /// - The reference you provided in the POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) request - /// - The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. - /// - Only include transfers that have been created on or after this point in time. The value must be in ISO 8601 format and not earlier than 6 months before the `createdUntil` date. For example, **2021-05-30T15:07:40Z**. - /// - Only include transfers that have been created on or before this point in time. The value must be in ISO 8601 format and not later than 6 months after the `createdSince` date. For example, **2021-05-30T15:07:40Z**. - /// - The `cursor` returned in the links of the previous response. - /// - The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// . - Model.Transfers.FindTransfersResponse GetAllTransfers(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string accountHolderId = default, string balanceAccountId = default, string paymentInstrumentId = default, string reference = default, string category = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default); - - /// - /// Get all transfers - /// - /// - The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `accountHolderId`. - /// - The unique identifier of the [account holder](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/accountHolders/{id}__queryParam_id). Required if you don't provide a `balanceAccountId` or `balancePlatform`. If you provide a `balanceAccountId`, the `accountHolderId` must be related to the `balanceAccountId`. - /// - The unique identifier of the [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balanceAccounts/{id}__queryParam_id). Required if you don't provide an `accountHolderId` or `balancePlatform`. If you provide an `accountHolderId`, the `balanceAccountId` must be related to the `accountHolderId`. - /// - The unique identifier of the [payment instrument](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/paymentInstruments/_id_). To use this parameter, you must also provide a `balanceAccountId`, `accountHolderId`, or `balancePlatform`. The `paymentInstrumentId` must be related to the `balanceAccountId` or `accountHolderId` that you provide. - /// - The reference you provided in the POST [/transfers](https://docs.adyen.com/api-explorer/transfers/latest/post/transfers) request - /// - The type of transfer. Possible values: - **bank**: Transfer to a [transfer instrument](https://docs.adyen.com/api-explorer/#/legalentity/latest/post/transferInstruments__resParam_id) or a bank account. - **internal**: Transfer to another [balance account](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/balanceAccounts__resParam_id) within your platform. - **issuedCard**: Transfer initiated by a Adyen-issued card. - **platformPayment**: Fund movements related to payments that are acquired for your users. - /// - Only include transfers that have been created on or after this point in time. The value must be in ISO 8601 format and not earlier than 6 months before the `createdUntil` date. For example, **2021-05-30T15:07:40Z**. - /// - Only include transfers that have been created on or before this point in time. The value must be in ISO 8601 format and not later than 6 months after the `createdSince` date. For example, **2021-05-30T15:07:40Z**. - /// - The `cursor` returned in the links of the previous response. - /// - The number of items returned per page, maximum of 100 items. By default, the response returns 10 items per page. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetAllTransfersAsync(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string accountHolderId = default, string balanceAccountId = default, string paymentInstrumentId = default, string reference = default, string category = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Get a transfer - /// - /// - Unique identifier of the transfer. - /// - Additional request options. - /// . - Model.Transfers.TransferData GetTransfer(string id, RequestOptions requestOptions = default); - - /// - /// Get a transfer - /// - /// - Unique identifier of the transfer. - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task GetTransferAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Return a transfer - /// - /// - The unique identifier of the transfer to be returned. - /// - - /// - Additional request options. - /// . - Model.Transfers.ReturnTransferResponse ReturnTransfer(string transferId, ReturnTransferRequest returnTransferRequest = default, RequestOptions requestOptions = default); - - /// - /// Return a transfer - /// - /// - The unique identifier of the transfer to be returned. - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task ReturnTransferAsync(string transferId, ReturnTransferRequest returnTransferRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - /// - /// Transfer funds - /// - /// - - /// - Additional request options. - /// . - Model.Transfers.Transfer TransferFunds(TransferInfo transferInfo = default, RequestOptions requestOptions = default); - - /// - /// Transfer funds - /// - /// - - /// - Additional request options. - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects. - /// Task of . - Task TransferFundsAsync(TransferInfo transferInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default); - - } - - /// - /// Represents a collection of functions to interact with the TransfersService API endpoints - /// - public class TransfersService : AbstractService, ITransfersService - { - private readonly string _baseUrl; - - public TransfersService(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("https://balanceplatform-api-test.adyen.com/btl/v4"); - } - - public void ApproveInitiatedTransfers(ApproveTransfersRequest approveTransfersRequest = default, RequestOptions requestOptions = default) - { - ApproveInitiatedTransfersAsync(approveTransfersRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ApproveInitiatedTransfersAsync(ApproveTransfersRequest approveTransfersRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/transfers/approve"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(approveTransfersRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public void CancelInitiatedTransfers(CancelTransfersRequest cancelTransfersRequest = default, RequestOptions requestOptions = default) - { - CancelInitiatedTransfersAsync(cancelTransfersRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task CancelInitiatedTransfersAsync(CancelTransfersRequest cancelTransfersRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/transfers/cancel"; - var resource = new ServiceResource(this, endpoint); - await resource.RequestAsync(cancelTransfersRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Transfers.FindTransfersResponse GetAllTransfers(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string accountHolderId = default, string balanceAccountId = default, string paymentInstrumentId = default, string reference = default, string category = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default) - { - return GetAllTransfersAsync(createdSince, createdUntil, balancePlatform, accountHolderId, balanceAccountId, paymentInstrumentId, reference, category, cursor, limit, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetAllTransfersAsync(DateTime createdSince, DateTime createdUntil, string balancePlatform = default, string accountHolderId = default, string balanceAccountId = default, string paymentInstrumentId = default, string reference = default, string category = default, string cursor = default, int? limit = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - // Build the query string - var queryParams = new Dictionary(); - if (balancePlatform != null) queryParams.Add("balancePlatform", balancePlatform); - if (accountHolderId != null) queryParams.Add("accountHolderId", accountHolderId); - if (balanceAccountId != null) queryParams.Add("balanceAccountId", balanceAccountId); - if (paymentInstrumentId != null) queryParams.Add("paymentInstrumentId", paymentInstrumentId); - if (reference != null) queryParams.Add("reference", reference); - if (category != null) queryParams.Add("category", category); - queryParams.Add("createdSince", createdSince.ToString("yyyy-MM-ddTHH:mm:ssZ")); - queryParams.Add("createdUntil", createdUntil.ToString("yyyy-MM-ddTHH:mm:ssZ")); - if (cursor != null) queryParams.Add("cursor", cursor); - if (limit != null) queryParams.Add("limit", limit.ToString()); - var endpoint = _baseUrl + "/transfers" + ToQueryString(queryParams); - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Transfers.TransferData GetTransfer(string id, RequestOptions requestOptions = default) - { - return GetTransferAsync(id, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task GetTransferAsync(string id, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transfers/{id}"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(null, requestOptions, new HttpMethod("GET"), cancellationToken).ConfigureAwait(false); - } - - public Model.Transfers.ReturnTransferResponse ReturnTransfer(string transferId, ReturnTransferRequest returnTransferRequest = default, RequestOptions requestOptions = default) - { - return ReturnTransferAsync(transferId, returnTransferRequest, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task ReturnTransferAsync(string transferId, ReturnTransferRequest returnTransferRequest = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + $"/transfers/{transferId}/returns"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(returnTransferRequest.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - - public Model.Transfers.Transfer TransferFunds(TransferInfo transferInfo = default, RequestOptions requestOptions = default) - { - return TransferFundsAsync(transferInfo, requestOptions).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - public async Task TransferFundsAsync(TransferInfo transferInfo = default, RequestOptions requestOptions = default, CancellationToken cancellationToken = default) - { - var endpoint = _baseUrl + "/transfers"; - var resource = new ServiceResource(this, endpoint); - return await resource.RequestAsync(transferInfo.ToJson(), requestOptions, new HttpMethod("POST"), cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/Adyen/ApiSerialization/Converter/JsonBase64Converter.cs b/Adyen/TerminalApi/ApiSerialization/Converter/JsonBase64Converter.cs similarity index 100% rename from Adyen/ApiSerialization/Converter/JsonBase64Converter.cs rename to Adyen/TerminalApi/ApiSerialization/Converter/JsonBase64Converter.cs diff --git a/Adyen/ApiSerialization/Converter/JsonConvertDeserializerWrapper.cs b/Adyen/TerminalApi/ApiSerialization/Converter/JsonConvertDeserializerWrapper.cs similarity index 100% rename from Adyen/ApiSerialization/Converter/JsonConvertDeserializerWrapper.cs rename to Adyen/TerminalApi/ApiSerialization/Converter/JsonConvertDeserializerWrapper.cs diff --git a/Adyen/ApiSerialization/Converter/JsonConvertSerializerWrapper.cs b/Adyen/TerminalApi/ApiSerialization/Converter/JsonConvertSerializerWrapper.cs similarity index 100% rename from Adyen/ApiSerialization/Converter/JsonConvertSerializerWrapper.cs rename to Adyen/TerminalApi/ApiSerialization/Converter/JsonConvertSerializerWrapper.cs diff --git a/Adyen/ApiSerialization/Converter/SaleToPoiMessageConverter.cs b/Adyen/TerminalApi/ApiSerialization/Converter/SaleToPoiMessageConverter.cs similarity index 100% rename from Adyen/ApiSerialization/Converter/SaleToPoiMessageConverter.cs rename to Adyen/TerminalApi/ApiSerialization/Converter/SaleToPoiMessageConverter.cs diff --git a/Adyen/ApiSerialization/Converter/SaleToPoiMessageSecuredConverter.cs b/Adyen/TerminalApi/ApiSerialization/Converter/SaleToPoiMessageSecuredConverter.cs similarity index 100% rename from Adyen/ApiSerialization/Converter/SaleToPoiMessageSecuredConverter.cs rename to Adyen/TerminalApi/ApiSerialization/Converter/SaleToPoiMessageSecuredConverter.cs diff --git a/Adyen/ApiSerialization/IMessagePayload.cs b/Adyen/TerminalApi/ApiSerialization/IMessagePayload.cs similarity index 100% rename from Adyen/ApiSerialization/IMessagePayload.cs rename to Adyen/TerminalApi/ApiSerialization/IMessagePayload.cs diff --git a/Adyen/ApiSerialization/IMessagePayloadSerializer.cs b/Adyen/TerminalApi/ApiSerialization/IMessagePayloadSerializer.cs similarity index 100% rename from Adyen/ApiSerialization/IMessagePayloadSerializer.cs rename to Adyen/TerminalApi/ApiSerialization/IMessagePayloadSerializer.cs diff --git a/Adyen/ApiSerialization/MessageHeaderSerializer.cs b/Adyen/TerminalApi/ApiSerialization/MessageHeaderSerializer.cs similarity index 100% rename from Adyen/ApiSerialization/MessageHeaderSerializer.cs rename to Adyen/TerminalApi/ApiSerialization/MessageHeaderSerializer.cs diff --git a/Adyen/ApiSerialization/MessagePayloadSerializer.cs b/Adyen/TerminalApi/ApiSerialization/MessagePayloadSerializer.cs similarity index 100% rename from Adyen/ApiSerialization/MessagePayloadSerializer.cs rename to Adyen/TerminalApi/ApiSerialization/MessagePayloadSerializer.cs diff --git a/Adyen/ApiSerialization/MessagePayloadSerializerFactory.cs b/Adyen/TerminalApi/ApiSerialization/MessagePayloadSerializerFactory.cs similarity index 100% rename from Adyen/ApiSerialization/MessagePayloadSerializerFactory.cs rename to Adyen/TerminalApi/ApiSerialization/MessagePayloadSerializerFactory.cs diff --git a/Adyen/ApiSerialization/OpenAPIDateConverter.cs b/Adyen/TerminalApi/ApiSerialization/OpenAPIDateConverter.cs similarity index 100% rename from Adyen/ApiSerialization/OpenAPIDateConverter.cs rename to Adyen/TerminalApi/ApiSerialization/OpenAPIDateConverter.cs diff --git a/Adyen/ApiSerialization/SaleToPoiMessageSecuredSerializer.cs b/Adyen/TerminalApi/ApiSerialization/SaleToPoiMessageSecuredSerializer.cs similarity index 100% rename from Adyen/ApiSerialization/SaleToPoiMessageSecuredSerializer.cs rename to Adyen/TerminalApi/ApiSerialization/SaleToPoiMessageSecuredSerializer.cs diff --git a/Adyen/ApiSerialization/SaleToPoiMessageSerializer.cs b/Adyen/TerminalApi/ApiSerialization/SaleToPoiMessageSerializer.cs similarity index 100% rename from Adyen/ApiSerialization/SaleToPoiMessageSerializer.cs rename to Adyen/TerminalApi/ApiSerialization/SaleToPoiMessageSerializer.cs diff --git a/Adyen/ApiSerialization/TypeHelper.cs b/Adyen/TerminalApi/ApiSerialization/TypeHelper.cs similarity index 100% rename from Adyen/ApiSerialization/TypeHelper.cs rename to Adyen/TerminalApi/ApiSerialization/TypeHelper.cs diff --git a/Adyen/BaseUrlConfig.cs b/Adyen/TerminalApi/BaseUrlConfig.cs similarity index 100% rename from Adyen/BaseUrlConfig.cs rename to Adyen/TerminalApi/BaseUrlConfig.cs diff --git a/Adyen/Client.cs b/Adyen/TerminalApi/Client.cs similarity index 97% rename from Adyen/Client.cs rename to Adyen/TerminalApi/Client.cs index 60a202ad9..4cc9717f1 100644 --- a/Adyen/Client.cs +++ b/Adyen/TerminalApi/Client.cs @@ -1,137 +1,137 @@ -using System; -using System.Net.Http; -using Adyen.Constants; -using Adyen.HttpClient; -using Adyen.HttpClient.Interfaces; -using Environment = Adyen.Model.Environment; - -namespace Adyen -{ - public class Client - { - public Config Config { get; set; } - - public string ApplicationName { get; set; } - - public delegate void CallbackLogHandler(string message); - - public event CallbackLogHandler LogCallback; - private static System.Net.Http.HttpClient _httpClient; - - [Obsolete("Providing username and password are obsolete, please use Config instead.")] - public Client(string username, string password, Environment environment, string liveEndpointUrlPrefix = null) - { - Config = new Config - { - Username = username, - Password = password, - Environment = environment - }; - SetEnvironment(environment, liveEndpointUrlPrefix, Config.TerminalApiRegion, Config.CloudApiEndPoint); - - HttpClient = new HttpClientWrapper(Config, GetHttpClient()); - } - - [Obsolete("Providing x-api-key is obsolete, please use Config instead.")] - public Client(string xapikey, Environment environment, string liveEndpointUrlPrefix = null) - { - Config = new Config - { - XApiKey = xapikey, - Environment = environment, - LiveEndpointUrlPrefix = liveEndpointUrlPrefix - }; - SetEnvironment(environment, Config.LiveEndpointUrlPrefix, Config.TerminalApiRegion, Config.CloudApiEndPoint); - HttpClient = new HttpClientWrapper(Config, GetHttpClient()); - } - - public Client(Config config) - { - Config = config; - SetEnvironment(config.Environment, config.LiveEndpointUrlPrefix, config.TerminalApiRegion, config.CloudApiEndPoint); - HttpClient = new HttpClientWrapper(config, GetHttpClient()); - } - - public Client(Config config, System.Net.Http.HttpClient httpClient) - { - Config = config; - SetEnvironment(config.Environment, config.LiveEndpointUrlPrefix, config.TerminalApiRegion, config.CloudApiEndPoint); - HttpClient = new HttpClientWrapper(config, httpClient); - } - - public Client(Config config, IHttpClientFactory factory, string clientName = null) - { - Config = config; - SetEnvironment(config.Environment, config.LiveEndpointUrlPrefix, config.TerminalApiRegion, config.CloudApiEndPoint); - HttpClient = clientName != null ? new HttpClientWrapper(config, factory.CreateClient(clientName)) : new HttpClientWrapper(Config, factory.CreateClient()); - } - - /// - /// Configures the environment. - /// - /// Specifies whether the is Test or Live. - /// The prefix for live endpoint URLs. Required for live configurations, see: https://docs.adyen.com/development-resources/live-endpoints". - /// Specifies the geographical region for the Terminal API integration, the passed is used to automatically determine this endpoint URL, see: https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/#live-endpoints. - /// Specifies the cloud endpoint for the Terminal API integration. This URL is where your SaleToPOIMessage(s) are sent. You can override this value for (mock) testing purposes. - public void SetEnvironment(Environment environment, string liveEndpointUrlPrefix = "", Region region = Region.EU, string cloudApiEndpoint = null) - { - Config.Environment = environment; - Config.LiveEndpointUrlPrefix = liveEndpointUrlPrefix; - Config.TerminalApiRegion = region; - Config.CloudApiEndPoint = cloudApiEndpoint; - Config.CloudApiEndPoint = GetCloudApiEndpoint(); - } - - /// - /// Retrieves the current terminal-api endpoint URL for sending the SaleToPoiMessage(s). - /// - /// The full terminal-api endpoint URL for the Cloud Terminal API integration. - /// Thrown if the specified is not part of . - public string GetCloudApiEndpoint() - { - // Check if the cloud API endpoint has already been set - if (Config.CloudApiEndPoint != null) - { - return Config.CloudApiEndPoint; - } - - // For LIVE environment, handle region mapping - if (Config.Environment == Environment.Live) - { - if (!RegionMapping.TERMINAL_API_ENDPOINTS_MAPPING.TryGetValue(Config.TerminalApiRegion, out string endpointUrl)) - { - throw new ArgumentOutOfRangeException($"Currently not supported: {Config.TerminalApiRegion}"); - } - return endpointUrl; - } - - // Default to test endpoint if the environment is TEST (default). - return ClientConfig.CloudApiEndPointTest; - } - - // Get a new HttpClient and set a timeout - private System.Net.Http.HttpClient GetHttpClient() - { - if (_httpClient == null) - { - _httpClient = new System.Net.Http.HttpClient(HttpClientExtensions.ConfigureHttpMessageHandler(Config)) - { - Timeout = TimeSpan.FromMilliseconds(Config.Timeout) - }; - } - return _httpClient; - } - - public IClient HttpClient { get; set; } - - public string LibraryVersion => ClientConfig.LibVersion; - - public void LogLine(string message) - { - if (LogCallback != null) - { - LogCallback(message); - } - } - } -} +using System; +using System.Net.Http; +using Adyen.Constants; +using Adyen.HttpClient; +using Adyen.HttpClient.Interfaces; +using Environment = Adyen.Model.Environment; + +namespace Adyen +{ + public class Client + { + public Config Config { get; set; } + + public string ApplicationName { get; set; } + + public delegate void CallbackLogHandler(string message); + + public event CallbackLogHandler LogCallback; + private static System.Net.Http.HttpClient _httpClient; + + [Obsolete("Providing username and password are obsolete, please use Config instead.")] + public Client(string username, string password, Environment environment, string liveEndpointUrlPrefix = null) + { + Config = new Config + { + Username = username, + Password = password, + Environment = environment + }; + SetEnvironment(environment, liveEndpointUrlPrefix, Config.TerminalApiRegion, Config.CloudApiEndPoint); + + HttpClient = new HttpClientWrapper(Config, GetHttpClient()); + } + + [Obsolete("Providing x-api-key is obsolete, please use Config instead.")] + public Client(string xapikey, Environment environment, string liveEndpointUrlPrefix = null) + { + Config = new Config + { + XApiKey = xapikey, + Environment = environment, + LiveEndpointUrlPrefix = liveEndpointUrlPrefix + }; + SetEnvironment(environment, Config.LiveEndpointUrlPrefix, Config.TerminalApiRegion, Config.CloudApiEndPoint); + HttpClient = new HttpClientWrapper(Config, GetHttpClient()); + } + + public Client(Config config) + { + Config = config; + SetEnvironment(config.Environment, config.LiveEndpointUrlPrefix, config.TerminalApiRegion, config.CloudApiEndPoint); + HttpClient = new HttpClientWrapper(config, GetHttpClient()); + } + + public Client(Config config, System.Net.Http.HttpClient httpClient) + { + Config = config; + SetEnvironment(config.Environment, config.LiveEndpointUrlPrefix, config.TerminalApiRegion, config.CloudApiEndPoint); + HttpClient = new HttpClientWrapper(config, httpClient); + } + + public Client(Config config, IHttpClientFactory factory, string clientName = null) + { + Config = config; + SetEnvironment(config.Environment, config.LiveEndpointUrlPrefix, config.TerminalApiRegion, config.CloudApiEndPoint); + HttpClient = clientName != null ? new HttpClientWrapper(config, factory.CreateClient(clientName)) : new HttpClientWrapper(Config, factory.CreateClient()); + } + + /// + /// Configures the environment. + /// + /// Specifies whether the is Test or Live. + /// The prefix for live endpoint URLs. Required for live configurations, see: https://docs.adyen.com/development-resources/live-endpoints". + /// Specifies the geographical region for the Terminal API integration, the passed is used to automatically determine this endpoint URL, see: https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/#live-endpoints. + /// Specifies the cloud endpoint for the Terminal API integration. This URL is where your SaleToPOIMessage(s) are sent. You can override this value for (mock) testing purposes. + public void SetEnvironment(Environment environment, string liveEndpointUrlPrefix = "", Region region = Region.EU, string cloudApiEndpoint = null) + { + Config.Environment = environment; + Config.LiveEndpointUrlPrefix = liveEndpointUrlPrefix; + Config.TerminalApiRegion = region; + Config.CloudApiEndPoint = cloudApiEndpoint; + Config.CloudApiEndPoint = GetCloudApiEndpoint(); + } + + /// + /// Retrieves the current terminal-api endpoint URL for sending the SaleToPoiMessage(s). + /// + /// The full terminal-api endpoint URL for the Cloud Terminal API integration. + /// Thrown if the specified is not part of . + public string GetCloudApiEndpoint() + { + // Check if the cloud API endpoint has already been set + if (Config.CloudApiEndPoint != null) + { + return Config.CloudApiEndPoint; + } + + // For LIVE environment, handle region mapping + if (Config.Environment == Environment.Live) + { + if (!RegionMapping.TERMINAL_API_ENDPOINTS_MAPPING.TryGetValue(Config.TerminalApiRegion, out string endpointUrl)) + { + throw new ArgumentOutOfRangeException($"Currently not supported: {Config.TerminalApiRegion}"); + } + return endpointUrl; + } + + // Default to test endpoint if the environment is TEST (default). + return ClientConfig.CloudApiEndPointTest; + } + + // Get a new HttpClient and set a timeout + private System.Net.Http.HttpClient GetHttpClient() + { + if (_httpClient == null) + { + _httpClient = new System.Net.Http.HttpClient(HttpClientExtensions.ConfigureHttpMessageHandler(Config)) + { + Timeout = TimeSpan.FromMilliseconds(Config.Timeout) + }; + } + return _httpClient; + } + + public IClient HttpClient { get; set; } + + public string LibraryVersion => ClientConfig.LibVersion; + + public void LogLine(string message) + { + if (LogCallback != null) + { + LogCallback(message); + } + } + } +} diff --git a/Adyen/Service/Resource/Terminal/TerminalApi.cs b/Adyen/TerminalApi/Clients/TerminalApi.cs similarity index 100% rename from Adyen/Service/Resource/Terminal/TerminalApi.cs rename to Adyen/TerminalApi/Clients/TerminalApi.cs diff --git a/Adyen/Service/Resource/Terminal/TerminalApiAsyncClient.cs b/Adyen/TerminalApi/Clients/TerminalApiAsyncClient.cs similarity index 100% rename from Adyen/Service/Resource/Terminal/TerminalApiAsyncClient.cs rename to Adyen/TerminalApi/Clients/TerminalApiAsyncClient.cs diff --git a/Adyen/Service/Resource/Terminal/TerminalApiLocal.cs b/Adyen/TerminalApi/Clients/TerminalApiLocal.cs similarity index 100% rename from Adyen/Service/Resource/Terminal/TerminalApiLocal.cs rename to Adyen/TerminalApi/Clients/TerminalApiLocal.cs diff --git a/Adyen/Service/Resource/Terminal/TerminalApiLocalClient.cs b/Adyen/TerminalApi/Clients/TerminalApiLocalClient.cs similarity index 100% rename from Adyen/Service/Resource/Terminal/TerminalApiLocalClient.cs rename to Adyen/TerminalApi/Clients/TerminalApiLocalClient.cs diff --git a/Adyen/Service/Resource/Terminal/TerminalApiSyncClient.cs b/Adyen/TerminalApi/Clients/TerminalApiSyncClient.cs similarity index 100% rename from Adyen/Service/Resource/Terminal/TerminalApiSyncClient.cs rename to Adyen/TerminalApi/Clients/TerminalApiSyncClient.cs diff --git a/Adyen/Config.cs b/Adyen/TerminalApi/Config.cs similarity index 94% rename from Adyen/Config.cs rename to Adyen/TerminalApi/Config.cs index 0f6ce4cf1..7daae70d9 100644 --- a/Adyen/Config.cs +++ b/Adyen/TerminalApi/Config.cs @@ -1,80 +1,81 @@ -using System; -using System.Net; -using Adyen.Constants; -using Environment = Adyen.Model.Environment; - -namespace Adyen -{ - public class Config - { - public string Username { get; set; } - public string Password { get; set; } - public bool HasPassword => !string.IsNullOrEmpty(Password); - - public Environment Environment { get; set; } - public string LiveEndpointUrlPrefix { get; set; } - public string ApplicationName { get; set; } - public IWebProxy Proxy { get; set; } - - /// - /// Your Adyen API key. - /// - public string XApiKey { get; set; } - public bool HasApiKey => !string.IsNullOrEmpty(XApiKey); - - /// - /// HttpConnection Timeout in milliseconds (e.g. the time required to send the request and receive the response). - /// In > NET6.0, we recommend configuring your own and pass it in the constructor. - /// The values shown here are defaults, if no is provided. - /// - public int Timeout { get; set; } = 60000; - - /// - /// Only The amount of time it should take to establish the TCP Connection. - /// This value is only used in when no default was passed in the constructor. - /// In > NET6.0, we recommend configuring your own and pass it in the constructor. - /// The values shown here are defaults, if no is provided. - /// - public TimeSpan ConnectTimeout { get; set; } = TimeSpan.FromSeconds(15); - - /// - /// Force reconnection to refresh DNS and avoid stale connections. - /// Once a connection exceeds the specified lifetime, it is no longer considered reusable and it is closed and removed from the pool. - /// This value is only used in when no default was passed in the constructor. - /// In > NET6.0, we recommend configuring your own and pass it in the constructor. - /// The values shown here are defaults, if no is provided. - /// - public TimeSpan PooledConnectionLifetime { get; set; } = TimeSpan.FromMinutes(5); - - /// - /// Close idle connections after the specified time. - /// This value is only used in when no default was passed in the constructor. - /// In > NET6.0, we recommend configuring your own and pass it in the constructor. - /// The values shown here are defaults, if no is provided. - /// - public TimeSpan PooledConnectionIdleTimeout { get; set; }= TimeSpan.FromMinutes(2); - - /// - /// Maximum number of concurrent TCP connections per server. - /// This value is only used in when no default was passed in the constructor. - /// In > NET6.0, we recommend configuring your own and pass it in the constructor. - /// The values shown here are defaults, if no is provided. - /// - public int MaxConnectionsPerServer { get; set; } = 2; - - /// - /// The url of the Cloud Terminal Api endpoint. - /// This value is populated when specifying the in . - /// - public string CloudApiEndPoint { get; set; } - - /// - /// The url of the Terminal Api endpoint, can be overriden if you want to send local terminal-api requests. - /// - public string LocalTerminalApiEndpoint { get; set; } - - public BaseUrlConfig BaseUrlConfig { get; set; } - - public Region TerminalApiRegion { get; set; } - } +using System; +using System.Net; +using Adyen.Constants; +using Environment = Adyen.Model.Environment; + +namespace Adyen +{ + public class Config + { + public string Username { get; set; } + public string Password { get; set; } + public bool HasPassword => !string.IsNullOrEmpty(Password); + + public Environment Environment { get; set; } + public string LiveEndpointUrlPrefix { get; set; } + public string ApplicationName { get; set; } + public IWebProxy Proxy { get; set; } + + /// + /// Your Adyen API key. + /// + public string XApiKey { get; set; } + + public bool HasApiKey => !string.IsNullOrEmpty(XApiKey); + + /// + /// HttpConnection Timeout in milliseconds (e.g. the time required to send the request and receive the response). + /// In > NET6.0, we recommend configuring your own and pass it in the constructor. + /// The values shown here are defaults, if no is provided. + /// + public int Timeout { get; set; } = 60000; + + /// + /// Only The amount of time it should take to establish the TCP Connection. + /// This value is only used in when no default was passed in the constructor. + /// In > NET6.0, we recommend configuring your own and pass it in the constructor. + /// The values shown here are defaults, if no is provided. + /// + public TimeSpan ConnectTimeout { get; set; } = TimeSpan.FromSeconds(15); + + /// + /// Force reconnection to refresh DNS and avoid stale connections. + /// Once a connection exceeds the specified lifetime, it is no longer considered reusable and it is closed and removed from the pool. + /// This value is only used in when no default was passed in the constructor. + /// In > NET6.0, we recommend configuring your own and pass it in the constructor. + /// The values shown here are defaults, if no is provided. + /// + public TimeSpan PooledConnectionLifetime { get; set; } = TimeSpan.FromMinutes(5); + + /// + /// Close idle connections after the specified time. + /// This value is only used in when no default was passed in the constructor. + /// In > NET6.0, we recommend configuring your own and pass it in the constructor. + /// The values shown here are defaults, if no is provided. + /// + public TimeSpan PooledConnectionIdleTimeout { get; set; } = TimeSpan.FromMinutes(2); + + /// + /// Maximum number of concurrent TCP connections per server. + /// This value is only used in when no default was passed in the constructor. + /// In > NET6.0, we recommend configuring your own and pass it in the constructor. + /// The values shown here are defaults, if no is provided. + /// + public int MaxConnectionsPerServer { get; set; } = 2; + + /// + /// The url of the Cloud Terminal Api endpoint. + /// This value is populated when specifying the in . + /// + public string CloudApiEndPoint { get; set; } + + /// + /// The url of the Terminal Api endpoint, can be overriden if you want to send local terminal-api requests. + /// + public string LocalTerminalApiEndpoint { get; set; } + + public BaseUrlConfig BaseUrlConfig { get; set; } + + public Region TerminalApiRegion { get; set; } + } } \ No newline at end of file diff --git a/Adyen/TerminalApi/Constants/ClientConfig.cs b/Adyen/TerminalApi/Constants/ClientConfig.cs new file mode 100644 index 000000000..1f5781057 --- /dev/null +++ b/Adyen/TerminalApi/Constants/ClientConfig.cs @@ -0,0 +1,34 @@ +namespace Adyen.Constants +{ + public class ClientConfig + { + //Test cloud api endpoints + public const string CloudApiEndPointTest = "https://terminal-api-test.adyen.com"; + + //Live cloud api endpoints + public const string CloudApiEndPointEULive = "https://terminal-api-live.adyen.com"; + public const string CloudApiEndPointAULive = "https://terminal-api-live-au.adyen.com"; + public const string CloudApiEndPointUSLive = "https://terminal-api-live-us.adyen.com"; + public const string CloudApiEndPointAPSELive = "https://terminal-api-live-apse.adyen.com"; + + public const string NexoProtocolVersion = "3.0"; + + /// + /// Moved to . + /// + [Obsolete("Use Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName instead.")] + public const string UserAgentSuffix = Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName + "/"; + + /// + /// Moved to . + /// + [Obsolete("Use Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName instead.")] + public const string LibName = Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName; + + /// + /// Moved to . + /// + [Obsolete("Use Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion instead.")] + public const string LibVersion = Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion; + } +} diff --git a/Adyen/Constants/Region.cs b/Adyen/TerminalApi/Constants/Region.cs similarity index 100% rename from Adyen/Constants/Region.cs rename to Adyen/TerminalApi/Constants/Region.cs diff --git a/Adyen/Model/Environment.cs b/Adyen/TerminalApi/Environment.cs similarity index 100% rename from Adyen/Model/Environment.cs rename to Adyen/TerminalApi/Environment.cs diff --git a/Adyen/Exceptions/DeserializationException.cs b/Adyen/TerminalApi/Exceptions/DeserializationException.cs similarity index 100% rename from Adyen/Exceptions/DeserializationException.cs rename to Adyen/TerminalApi/Exceptions/DeserializationException.cs diff --git a/Adyen/Exceptions/ExceptionMessages.cs b/Adyen/TerminalApi/Exceptions/ExceptionMessages.cs similarity index 100% rename from Adyen/Exceptions/ExceptionMessages.cs rename to Adyen/TerminalApi/Exceptions/ExceptionMessages.cs diff --git a/Adyen/HttpClient/HttpClientException.cs b/Adyen/TerminalApi/HttpClient/HttpClientException.cs similarity index 100% rename from Adyen/HttpClient/HttpClientException.cs rename to Adyen/TerminalApi/HttpClient/HttpClientException.cs diff --git a/Adyen/HttpClient/HttpClientExtension.cs b/Adyen/TerminalApi/HttpClient/HttpClientExtension.cs similarity index 100% rename from Adyen/HttpClient/HttpClientExtension.cs rename to Adyen/TerminalApi/HttpClient/HttpClientExtension.cs diff --git a/Adyen/HttpClient/HttpClientWrapper.cs b/Adyen/TerminalApi/HttpClient/HttpClientWrapper.cs similarity index 89% rename from Adyen/HttpClient/HttpClientWrapper.cs rename to Adyen/TerminalApi/HttpClient/HttpClientWrapper.cs index c393a1169..c7b16621e 100644 --- a/Adyen/HttpClient/HttpClientWrapper.cs +++ b/Adyen/TerminalApi/HttpClient/HttpClientWrapper.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using System.Web; using Adyen.Constants; +using Adyen.Core.Client.Extensions; using Adyen.HttpClient.Interfaces; using Adyen.Model; @@ -68,11 +69,11 @@ public HttpRequestMessage GetHttpRequestMessage(string endpoint, string requestB if (!string.IsNullOrWhiteSpace(_config.ApplicationName)) { - httpRequestMessage.Headers.Add("UserAgent", $"{_config.ApplicationName} {ClientConfig.UserAgentSuffix}{ClientConfig.LibVersion}"); + httpRequestMessage.Headers.Add("UserAgent", $"{_config.ApplicationName} {HttpRequestMessageExtensions.AdyenLibraryName}/{HttpRequestMessageExtensions.AdyenLibraryVersion}"); } else { - httpRequestMessage.Headers.Add("UserAgent", $"{ClientConfig.UserAgentSuffix}{ClientConfig.LibVersion}"); + httpRequestMessage.Headers.Add("UserAgent", $"{HttpRequestMessageExtensions.AdyenLibraryName}/{HttpRequestMessageExtensions.AdyenLibraryVersion}"); } if (!string.IsNullOrWhiteSpace(requestOptions?.IdempotencyKey)) @@ -94,8 +95,8 @@ public HttpRequestMessage GetHttpRequestMessage(string endpoint, string requestB } // Add library name and version to request for analysis - httpRequestMessage.Headers.Add(ApiConstants.AdyenLibraryName, ClientConfig.LibName); - httpRequestMessage.Headers.Add(ApiConstants.AdyenLibraryVersion, ClientConfig.LibVersion); + httpRequestMessage.Headers.Add("adyen-library-name", HttpRequestMessageExtensions.AdyenLibraryName); + httpRequestMessage.Headers.Add("adyen-library-version", HttpRequestMessageExtensions.AdyenLibraryVersion); return httpRequestMessage; } diff --git a/Adyen/HttpClient/Interfaces/IClient.cs b/Adyen/TerminalApi/HttpClient/Interfaces/IClient.cs similarity index 100% rename from Adyen/HttpClient/Interfaces/IClient.cs rename to Adyen/TerminalApi/HttpClient/Interfaces/IClient.cs diff --git a/Adyen/Model/Payment/AbstractOpenAPISchema.cs b/Adyen/TerminalApi/Model/Payment/AbstractOpenAPISchema.cs similarity index 100% rename from Adyen/Model/Payment/AbstractOpenAPISchema.cs rename to Adyen/TerminalApi/Model/Payment/AbstractOpenAPISchema.cs diff --git a/Adyen/Model/Payment/AccountInfo.cs b/Adyen/TerminalApi/Model/Payment/AccountInfo.cs similarity index 100% rename from Adyen/Model/Payment/AccountInfo.cs rename to Adyen/TerminalApi/Model/Payment/AccountInfo.cs diff --git a/Adyen/Model/Payment/AcctInfo.cs b/Adyen/TerminalApi/Model/Payment/AcctInfo.cs similarity index 100% rename from Adyen/Model/Payment/AcctInfo.cs rename to Adyen/TerminalApi/Model/Payment/AcctInfo.cs diff --git a/Adyen/Model/Payment/AdditionalData3DSecure.cs b/Adyen/TerminalApi/Model/Payment/AdditionalData3DSecure.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalData3DSecure.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalData3DSecure.cs diff --git a/Adyen/Model/Payment/AdditionalDataAirline.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataAirline.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataAirline.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataAirline.cs diff --git a/Adyen/Model/Payment/AdditionalDataCarRental.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataCarRental.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataCarRental.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataCarRental.cs diff --git a/Adyen/Model/Payment/AdditionalDataCommon.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataCommon.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataCommon.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataCommon.cs diff --git a/Adyen/Model/Payment/AdditionalDataLevel23.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataLevel23.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataLevel23.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataLevel23.cs diff --git a/Adyen/Model/Payment/AdditionalDataLodging.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataLodging.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataLodging.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataLodging.cs diff --git a/Adyen/Model/Payment/AdditionalDataModifications.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataModifications.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataModifications.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataModifications.cs diff --git a/Adyen/Model/Payment/AdditionalDataOpenInvoice.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataOpenInvoice.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataOpenInvoice.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataOpenInvoice.cs diff --git a/Adyen/Model/Payment/AdditionalDataOpi.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataOpi.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataOpi.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataOpi.cs diff --git a/Adyen/Model/Payment/AdditionalDataRatepay.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataRatepay.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataRatepay.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataRatepay.cs diff --git a/Adyen/Model/Payment/AdditionalDataRetry.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataRetry.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataRetry.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataRetry.cs diff --git a/Adyen/Model/Payment/AdditionalDataRisk.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataRisk.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataRisk.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataRisk.cs diff --git a/Adyen/Model/Payment/AdditionalDataRiskStandalone.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataRiskStandalone.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataRiskStandalone.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataRiskStandalone.cs diff --git a/Adyen/Model/Payment/AdditionalDataSubMerchant.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataSubMerchant.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataSubMerchant.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataSubMerchant.cs diff --git a/Adyen/Model/Payment/AdditionalDataTemporaryServices.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataTemporaryServices.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataTemporaryServices.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataTemporaryServices.cs diff --git a/Adyen/Model/Payment/AdditionalDataWallets.cs b/Adyen/TerminalApi/Model/Payment/AdditionalDataWallets.cs similarity index 100% rename from Adyen/Model/Payment/AdditionalDataWallets.cs rename to Adyen/TerminalApi/Model/Payment/AdditionalDataWallets.cs diff --git a/Adyen/Model/Payment/Address.cs b/Adyen/TerminalApi/Model/Payment/Address.cs similarity index 100% rename from Adyen/Model/Payment/Address.cs rename to Adyen/TerminalApi/Model/Payment/Address.cs diff --git a/Adyen/Model/Payment/AdjustAuthorisationRequest.cs b/Adyen/TerminalApi/Model/Payment/AdjustAuthorisationRequest.cs similarity index 100% rename from Adyen/Model/Payment/AdjustAuthorisationRequest.cs rename to Adyen/TerminalApi/Model/Payment/AdjustAuthorisationRequest.cs diff --git a/Adyen/Model/Payment/Amount.cs b/Adyen/TerminalApi/Model/Payment/Amount.cs similarity index 100% rename from Adyen/Model/Payment/Amount.cs rename to Adyen/TerminalApi/Model/Payment/Amount.cs diff --git a/Adyen/Model/Payment/ApplicationInfo.cs b/Adyen/TerminalApi/Model/Payment/ApplicationInfo.cs similarity index 100% rename from Adyen/Model/Payment/ApplicationInfo.cs rename to Adyen/TerminalApi/Model/Payment/ApplicationInfo.cs diff --git a/Adyen/Model/Payment/AuthenticationResultRequest.cs b/Adyen/TerminalApi/Model/Payment/AuthenticationResultRequest.cs similarity index 100% rename from Adyen/Model/Payment/AuthenticationResultRequest.cs rename to Adyen/TerminalApi/Model/Payment/AuthenticationResultRequest.cs diff --git a/Adyen/Model/Payment/AuthenticationResultResponse.cs b/Adyen/TerminalApi/Model/Payment/AuthenticationResultResponse.cs similarity index 100% rename from Adyen/Model/Payment/AuthenticationResultResponse.cs rename to Adyen/TerminalApi/Model/Payment/AuthenticationResultResponse.cs diff --git a/Adyen/Model/Payment/BankAccount.cs b/Adyen/TerminalApi/Model/Payment/BankAccount.cs similarity index 100% rename from Adyen/Model/Payment/BankAccount.cs rename to Adyen/TerminalApi/Model/Payment/BankAccount.cs diff --git a/Adyen/Model/Payment/BrowserInfo.cs b/Adyen/TerminalApi/Model/Payment/BrowserInfo.cs similarity index 100% rename from Adyen/Model/Payment/BrowserInfo.cs rename to Adyen/TerminalApi/Model/Payment/BrowserInfo.cs diff --git a/Adyen/Model/Payment/CancelOrRefundRequest.cs b/Adyen/TerminalApi/Model/Payment/CancelOrRefundRequest.cs similarity index 100% rename from Adyen/Model/Payment/CancelOrRefundRequest.cs rename to Adyen/TerminalApi/Model/Payment/CancelOrRefundRequest.cs diff --git a/Adyen/Model/Payment/CancelRequest.cs b/Adyen/TerminalApi/Model/Payment/CancelRequest.cs similarity index 100% rename from Adyen/Model/Payment/CancelRequest.cs rename to Adyen/TerminalApi/Model/Payment/CancelRequest.cs diff --git a/Adyen/Model/Payment/CaptureRequest.cs b/Adyen/TerminalApi/Model/Payment/CaptureRequest.cs similarity index 100% rename from Adyen/Model/Payment/CaptureRequest.cs rename to Adyen/TerminalApi/Model/Payment/CaptureRequest.cs diff --git a/Adyen/Model/Payment/Card.cs b/Adyen/TerminalApi/Model/Payment/Card.cs similarity index 100% rename from Adyen/Model/Payment/Card.cs rename to Adyen/TerminalApi/Model/Payment/Card.cs diff --git a/Adyen/Model/Payment/CommonField.cs b/Adyen/TerminalApi/Model/Payment/CommonField.cs similarity index 100% rename from Adyen/Model/Payment/CommonField.cs rename to Adyen/TerminalApi/Model/Payment/CommonField.cs diff --git a/Adyen/Model/Payment/DeviceRenderOptions.cs b/Adyen/TerminalApi/Model/Payment/DeviceRenderOptions.cs similarity index 100% rename from Adyen/Model/Payment/DeviceRenderOptions.cs rename to Adyen/TerminalApi/Model/Payment/DeviceRenderOptions.cs diff --git a/Adyen/Model/Payment/DonationRequest.cs b/Adyen/TerminalApi/Model/Payment/DonationRequest.cs similarity index 100% rename from Adyen/Model/Payment/DonationRequest.cs rename to Adyen/TerminalApi/Model/Payment/DonationRequest.cs diff --git a/Adyen/Model/Payment/ExternalPlatform.cs b/Adyen/TerminalApi/Model/Payment/ExternalPlatform.cs similarity index 100% rename from Adyen/Model/Payment/ExternalPlatform.cs rename to Adyen/TerminalApi/Model/Payment/ExternalPlatform.cs diff --git a/Adyen/Model/Payment/ForexQuote.cs b/Adyen/TerminalApi/Model/Payment/ForexQuote.cs similarity index 100% rename from Adyen/Model/Payment/ForexQuote.cs rename to Adyen/TerminalApi/Model/Payment/ForexQuote.cs diff --git a/Adyen/Model/Payment/FraudCheckResult.cs b/Adyen/TerminalApi/Model/Payment/FraudCheckResult.cs similarity index 100% rename from Adyen/Model/Payment/FraudCheckResult.cs rename to Adyen/TerminalApi/Model/Payment/FraudCheckResult.cs diff --git a/Adyen/Model/Payment/FraudCheckResultWrapper.cs b/Adyen/TerminalApi/Model/Payment/FraudCheckResultWrapper.cs similarity index 100% rename from Adyen/Model/Payment/FraudCheckResultWrapper.cs rename to Adyen/TerminalApi/Model/Payment/FraudCheckResultWrapper.cs diff --git a/Adyen/Model/Payment/FraudResult.cs b/Adyen/TerminalApi/Model/Payment/FraudResult.cs similarity index 100% rename from Adyen/Model/Payment/FraudResult.cs rename to Adyen/TerminalApi/Model/Payment/FraudResult.cs diff --git a/Adyen/Model/Payment/FundDestination.cs b/Adyen/TerminalApi/Model/Payment/FundDestination.cs similarity index 100% rename from Adyen/Model/Payment/FundDestination.cs rename to Adyen/TerminalApi/Model/Payment/FundDestination.cs diff --git a/Adyen/Model/Payment/FundSource.cs b/Adyen/TerminalApi/Model/Payment/FundSource.cs similarity index 100% rename from Adyen/Model/Payment/FundSource.cs rename to Adyen/TerminalApi/Model/Payment/FundSource.cs diff --git a/Adyen/Model/Payment/Installments.cs b/Adyen/TerminalApi/Model/Payment/Installments.cs similarity index 100% rename from Adyen/Model/Payment/Installments.cs rename to Adyen/TerminalApi/Model/Payment/Installments.cs diff --git a/Adyen/Model/Payment/Mandate.cs b/Adyen/TerminalApi/Model/Payment/Mandate.cs similarity index 100% rename from Adyen/Model/Payment/Mandate.cs rename to Adyen/TerminalApi/Model/Payment/Mandate.cs diff --git a/Adyen/Model/Payment/MerchantDevice.cs b/Adyen/TerminalApi/Model/Payment/MerchantDevice.cs similarity index 100% rename from Adyen/Model/Payment/MerchantDevice.cs rename to Adyen/TerminalApi/Model/Payment/MerchantDevice.cs diff --git a/Adyen/Model/Payment/MerchantRiskIndicator.cs b/Adyen/TerminalApi/Model/Payment/MerchantRiskIndicator.cs similarity index 100% rename from Adyen/Model/Payment/MerchantRiskIndicator.cs rename to Adyen/TerminalApi/Model/Payment/MerchantRiskIndicator.cs diff --git a/Adyen/Model/Payment/ModificationResult.cs b/Adyen/TerminalApi/Model/Payment/ModificationResult.cs similarity index 100% rename from Adyen/Model/Payment/ModificationResult.cs rename to Adyen/TerminalApi/Model/Payment/ModificationResult.cs diff --git a/Adyen/Model/Payment/Name.cs b/Adyen/TerminalApi/Model/Payment/Name.cs similarity index 100% rename from Adyen/Model/Payment/Name.cs rename to Adyen/TerminalApi/Model/Payment/Name.cs diff --git a/Adyen/Model/Payment/PaymentRequest.cs b/Adyen/TerminalApi/Model/Payment/PaymentRequest.cs similarity index 100% rename from Adyen/Model/Payment/PaymentRequest.cs rename to Adyen/TerminalApi/Model/Payment/PaymentRequest.cs diff --git a/Adyen/Model/Payment/PaymentRequest3d.cs b/Adyen/TerminalApi/Model/Payment/PaymentRequest3d.cs similarity index 100% rename from Adyen/Model/Payment/PaymentRequest3d.cs rename to Adyen/TerminalApi/Model/Payment/PaymentRequest3d.cs diff --git a/Adyen/Model/Payment/PaymentRequest3ds2.cs b/Adyen/TerminalApi/Model/Payment/PaymentRequest3ds2.cs similarity index 100% rename from Adyen/Model/Payment/PaymentRequest3ds2.cs rename to Adyen/TerminalApi/Model/Payment/PaymentRequest3ds2.cs diff --git a/Adyen/Model/Payment/PaymentResult.cs b/Adyen/TerminalApi/Model/Payment/PaymentResult.cs similarity index 100% rename from Adyen/Model/Payment/PaymentResult.cs rename to Adyen/TerminalApi/Model/Payment/PaymentResult.cs diff --git a/Adyen/Model/Payment/Phone.cs b/Adyen/TerminalApi/Model/Payment/Phone.cs similarity index 100% rename from Adyen/Model/Payment/Phone.cs rename to Adyen/TerminalApi/Model/Payment/Phone.cs diff --git a/Adyen/Model/Payment/PlatformChargebackLogic.cs b/Adyen/TerminalApi/Model/Payment/PlatformChargebackLogic.cs similarity index 100% rename from Adyen/Model/Payment/PlatformChargebackLogic.cs rename to Adyen/TerminalApi/Model/Payment/PlatformChargebackLogic.cs diff --git a/Adyen/Model/Payment/Recurring.cs b/Adyen/TerminalApi/Model/Payment/Recurring.cs similarity index 100% rename from Adyen/Model/Payment/Recurring.cs rename to Adyen/TerminalApi/Model/Payment/Recurring.cs diff --git a/Adyen/Model/Payment/RefundRequest.cs b/Adyen/TerminalApi/Model/Payment/RefundRequest.cs similarity index 100% rename from Adyen/Model/Payment/RefundRequest.cs rename to Adyen/TerminalApi/Model/Payment/RefundRequest.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalData3DSecure.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalData3DSecure.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalData3DSecure.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalData3DSecure.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataBillingAddress.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalDataBillingAddress.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataBillingAddress.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalDataCard.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataCard.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalDataCard.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataCard.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalDataCommon.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataCommon.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalDataCommon.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataCommon.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalDataDomesticError.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataDomesticError.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalDataDomesticError.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataDomesticError.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalDataInstallments.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataInstallments.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalDataInstallments.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataInstallments.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataNetworkTokens.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalDataNetworkTokens.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataNetworkTokens.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalDataOpi.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataOpi.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalDataOpi.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataOpi.cs diff --git a/Adyen/Model/Payment/ResponseAdditionalDataSepa.cs b/Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataSepa.cs similarity index 100% rename from Adyen/Model/Payment/ResponseAdditionalDataSepa.cs rename to Adyen/TerminalApi/Model/Payment/ResponseAdditionalDataSepa.cs diff --git a/Adyen/Model/Payment/SDKEphemPubKey.cs b/Adyen/TerminalApi/Model/Payment/SDKEphemPubKey.cs similarity index 100% rename from Adyen/Model/Payment/SDKEphemPubKey.cs rename to Adyen/TerminalApi/Model/Payment/SDKEphemPubKey.cs diff --git a/Adyen/Model/Payment/SecureRemoteCommerceCheckoutData.cs b/Adyen/TerminalApi/Model/Payment/SecureRemoteCommerceCheckoutData.cs similarity index 100% rename from Adyen/Model/Payment/SecureRemoteCommerceCheckoutData.cs rename to Adyen/TerminalApi/Model/Payment/SecureRemoteCommerceCheckoutData.cs diff --git a/Adyen/Model/Payment/ServiceError.cs b/Adyen/TerminalApi/Model/Payment/ServiceError.cs similarity index 100% rename from Adyen/Model/Payment/ServiceError.cs rename to Adyen/TerminalApi/Model/Payment/ServiceError.cs diff --git a/Adyen/Model/Payment/ShopperInteractionDevice.cs b/Adyen/TerminalApi/Model/Payment/ShopperInteractionDevice.cs similarity index 100% rename from Adyen/Model/Payment/ShopperInteractionDevice.cs rename to Adyen/TerminalApi/Model/Payment/ShopperInteractionDevice.cs diff --git a/Adyen/Model/Payment/Split.cs b/Adyen/TerminalApi/Model/Payment/Split.cs similarity index 100% rename from Adyen/Model/Payment/Split.cs rename to Adyen/TerminalApi/Model/Payment/Split.cs diff --git a/Adyen/Model/Payment/SplitAmount.cs b/Adyen/TerminalApi/Model/Payment/SplitAmount.cs similarity index 100% rename from Adyen/Model/Payment/SplitAmount.cs rename to Adyen/TerminalApi/Model/Payment/SplitAmount.cs diff --git a/Adyen/Model/Payment/SubMerchant.cs b/Adyen/TerminalApi/Model/Payment/SubMerchant.cs similarity index 100% rename from Adyen/Model/Payment/SubMerchant.cs rename to Adyen/TerminalApi/Model/Payment/SubMerchant.cs diff --git a/Adyen/Model/Payment/TechnicalCancelRequest.cs b/Adyen/TerminalApi/Model/Payment/TechnicalCancelRequest.cs similarity index 100% rename from Adyen/Model/Payment/TechnicalCancelRequest.cs rename to Adyen/TerminalApi/Model/Payment/TechnicalCancelRequest.cs diff --git a/Adyen/Model/Payment/ThreeDS1Result.cs b/Adyen/TerminalApi/Model/Payment/ThreeDS1Result.cs similarity index 100% rename from Adyen/Model/Payment/ThreeDS1Result.cs rename to Adyen/TerminalApi/Model/Payment/ThreeDS1Result.cs diff --git a/Adyen/Model/Payment/ThreeDS2RequestData.cs b/Adyen/TerminalApi/Model/Payment/ThreeDS2RequestData.cs similarity index 100% rename from Adyen/Model/Payment/ThreeDS2RequestData.cs rename to Adyen/TerminalApi/Model/Payment/ThreeDS2RequestData.cs diff --git a/Adyen/Model/Payment/ThreeDS2Result.cs b/Adyen/TerminalApi/Model/Payment/ThreeDS2Result.cs similarity index 100% rename from Adyen/Model/Payment/ThreeDS2Result.cs rename to Adyen/TerminalApi/Model/Payment/ThreeDS2Result.cs diff --git a/Adyen/Model/Payment/ThreeDS2ResultRequest.cs b/Adyen/TerminalApi/Model/Payment/ThreeDS2ResultRequest.cs similarity index 100% rename from Adyen/Model/Payment/ThreeDS2ResultRequest.cs rename to Adyen/TerminalApi/Model/Payment/ThreeDS2ResultRequest.cs diff --git a/Adyen/Model/Payment/ThreeDS2ResultResponse.cs b/Adyen/TerminalApi/Model/Payment/ThreeDS2ResultResponse.cs similarity index 100% rename from Adyen/Model/Payment/ThreeDS2ResultResponse.cs rename to Adyen/TerminalApi/Model/Payment/ThreeDS2ResultResponse.cs diff --git a/Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.cs b/Adyen/TerminalApi/Model/Payment/ThreeDSRequestorAuthenticationInfo.cs similarity index 100% rename from Adyen/Model/Payment/ThreeDSRequestorAuthenticationInfo.cs rename to Adyen/TerminalApi/Model/Payment/ThreeDSRequestorAuthenticationInfo.cs diff --git a/Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.cs b/Adyen/TerminalApi/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.cs similarity index 100% rename from Adyen/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.cs rename to Adyen/TerminalApi/Model/Payment/ThreeDSRequestorPriorAuthenticationInfo.cs diff --git a/Adyen/Model/Payment/ThreeDSecureData.cs b/Adyen/TerminalApi/Model/Payment/ThreeDSecureData.cs similarity index 100% rename from Adyen/Model/Payment/ThreeDSecureData.cs rename to Adyen/TerminalApi/Model/Payment/ThreeDSecureData.cs diff --git a/Adyen/Model/Payment/VoidPendingRefundRequest.cs b/Adyen/TerminalApi/Model/Payment/VoidPendingRefundRequest.cs similarity index 100% rename from Adyen/Model/Payment/VoidPendingRefundRequest.cs rename to Adyen/TerminalApi/Model/Payment/VoidPendingRefundRequest.cs diff --git a/Adyen/Model/TerminalApi/AbortRequest.cs b/Adyen/TerminalApi/Models/AbortRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/AbortRequest.cs rename to Adyen/TerminalApi/Models/AbortRequest.cs diff --git a/Adyen/Service/AbstractService.cs b/Adyen/TerminalApi/Models/AbstractService.cs similarity index 97% rename from Adyen/Service/AbstractService.cs rename to Adyen/TerminalApi/Models/AbstractService.cs index 517317c16..b749dd706 100644 --- a/Adyen/Service/AbstractService.cs +++ b/Adyen/TerminalApi/Models/AbstractService.cs @@ -1,132 +1,132 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using Adyen.Exceptions; -using Environment = Adyen.Model.Environment; - -namespace Adyen.Service -{ - public class AbstractService - { - public Client Client { get; set; } - - private const string PaymentPrefix = "pal-"; - private const string CheckoutPrefix = "checkout-"; - - protected AbstractService(Client client) - { - Client = client; - } - - /// - /// Build the query string - /// - /// Key, value pairs - /// URL encoded query string - private protected static string ToQueryString(IDictionary queryParams) - { - if (queryParams == null || queryParams.Count == 0) - { - return string.Empty; - } - - var queryString = string.Join("&", - queryParams.Select(kvp => $"{kvp.Key}={HttpUtility.UrlEncode(kvp.Value)}")); - - if (!string.IsNullOrEmpty(queryString)) - { - return "?" + queryString; - } - - return string.Empty; - } - - /// - /// The base URL creation for the environment - /// - /// String - /// baseURL - private protected string CreateBaseUrl(string url) - { - var config = Client.Config; - return config.Environment == Environment.Live - ? ConstructLiveUrl(config, - url) - : ConstructTestUrl(config, - url); - } - - /// - /// Allow users to override the baseUrl in a test environment - /// - /// Config - /// String - /// baseUrl - private static string ConstructTestUrl(Config config, string url) - { - if (config.BaseUrlConfig == null) return url.Replace("-live", "-test"); - - var baseUrl = config.BaseUrlConfig.BaseUrl; - if (url.Contains(PaymentPrefix) - && !string.IsNullOrEmpty(config.BaseUrlConfig.PaymentUrl)) - { - baseUrl = config.BaseUrlConfig.PaymentUrl; - } else if (url.Contains(CheckoutPrefix) - && !string.IsNullOrEmpty(config.BaseUrlConfig.CheckoutUrl)) - { - baseUrl = config.BaseUrlConfig.CheckoutUrl; - } - - var urlPath = new Uri(url).AbsolutePath; - var returnUrl = new Uri(baseUrl + urlPath).ToString(); - - return returnUrl; - } - - /// - /// Construct live baseUrl - /// - /// Config - /// String - /// baseUrl - /// - private static string ConstructLiveUrl(Config config, string url) - { - // Change base url for Live environment - if (url.Contains(PaymentPrefix)) - { - if (config.LiveEndpointUrlPrefix == default) - { - throw new InvalidOperationException(ExceptionMessages.MissingLiveEndpointUrlPrefix); - } - - url = url.Replace("https://pal-test.adyen.com/pal/servlet/", - "https://" + config.LiveEndpointUrlPrefix + "-pal-live.adyenpayments.com/pal/servlet/"); - } - else if (url.Contains(CheckoutPrefix)) - { - if (config.LiveEndpointUrlPrefix == default) - { - throw new InvalidOperationException(ExceptionMessages.MissingLiveEndpointUrlPrefix); - } - - if (url.Contains("possdk")) - { - url = url.Replace("https://checkout-test.adyen.com/", - "https://" + config.LiveEndpointUrlPrefix + "-checkout-live.adyenpayments.com/"); - } - else - { - url = url.Replace("https://checkout-test.adyen.com/", - "https://" + config.LiveEndpointUrlPrefix + "-checkout-live.adyenpayments.com/checkout/"); - } - } - - - // If no prefix is required just replace "test" -> "live" - url = url.Replace("-test", "-live"); - return url; - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using Adyen.Exceptions; +using Environment = Adyen.Model.Environment; + +namespace Adyen.Service +{ + public class AbstractService + { + public Client Client { get; set; } + + private const string PaymentPrefix = "pal-"; + private const string CheckoutPrefix = "checkout-"; + + protected AbstractService(Client client) + { + Client = client; + } + + /// + /// Build the query string + /// + /// Key, value pairs + /// URL encoded query string + private protected static string ToQueryString(IDictionary queryParams) + { + if (queryParams == null || queryParams.Count == 0) + { + return string.Empty; + } + + var queryString = string.Join("&", + queryParams.Select(kvp => $"{kvp.Key}={HttpUtility.UrlEncode(kvp.Value)}")); + + if (!string.IsNullOrEmpty(queryString)) + { + return "?" + queryString; + } + + return string.Empty; + } + + /// + /// The base URL creation for the environment + /// + /// String + /// baseURL + private protected string CreateBaseUrl(string url) + { + var config = Client.Config; + return config.Environment == Environment.Live + ? ConstructLiveUrl(config, + url) + : ConstructTestUrl(config, + url); + } + + /// + /// Allow users to override the baseUrl in a test environment + /// + /// Config + /// String + /// baseUrl + private static string ConstructTestUrl(Config config, string url) + { + if (config.BaseUrlConfig == null) return url.Replace("-live", "-test"); + + var baseUrl = config.BaseUrlConfig.BaseUrl; + if (url.Contains(PaymentPrefix) + && !string.IsNullOrEmpty(config.BaseUrlConfig.PaymentUrl)) + { + baseUrl = config.BaseUrlConfig.PaymentUrl; + } else if (url.Contains(CheckoutPrefix) + && !string.IsNullOrEmpty(config.BaseUrlConfig.CheckoutUrl)) + { + baseUrl = config.BaseUrlConfig.CheckoutUrl; + } + + var urlPath = new Uri(url).AbsolutePath; + var returnUrl = new Uri(baseUrl + urlPath).ToString(); + + return returnUrl; + } + + /// + /// Construct live baseUrl + /// + /// Config + /// String + /// baseUrl + /// + private static string ConstructLiveUrl(Config config, string url) + { + // Change base url for Live environment + if (url.Contains(PaymentPrefix)) + { + if (config.LiveEndpointUrlPrefix == default) + { + throw new InvalidOperationException(ExceptionMessages.MissingLiveEndpointUrlPrefix); + } + + url = url.Replace("https://pal-test.adyen.com/pal/servlet/", + "https://" + config.LiveEndpointUrlPrefix + "-pal-live.adyenpayments.com/pal/servlet/"); + } + else if (url.Contains(CheckoutPrefix)) + { + if (config.LiveEndpointUrlPrefix == default) + { + throw new InvalidOperationException(ExceptionMessages.MissingLiveEndpointUrlPrefix); + } + + if (url.Contains("possdk")) + { + url = url.Replace("https://checkout-test.adyen.com/", + "https://" + config.LiveEndpointUrlPrefix + "-checkout-live.adyenpayments.com/"); + } + else + { + url = url.Replace("https://checkout-test.adyen.com/", + "https://" + config.LiveEndpointUrlPrefix + "-checkout-live.adyenpayments.com/checkout/"); + } + } + + + // If no prefix is required just replace "test" -> "live" + url = url.Replace("-test", "-live"); + return url; + } + } } \ No newline at end of file diff --git a/Adyen/Model/TerminalApi/AccountType.cs b/Adyen/TerminalApi/Models/AccountType.cs similarity index 100% rename from Adyen/Model/TerminalApi/AccountType.cs rename to Adyen/TerminalApi/Models/AccountType.cs diff --git a/Adyen/Model/TerminalApi/AdminRequest.cs b/Adyen/TerminalApi/Models/AdminRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/AdminRequest.cs rename to Adyen/TerminalApi/Models/AdminRequest.cs diff --git a/Adyen/Model/TerminalApi/AdminResponse.cs b/Adyen/TerminalApi/Models/AdminResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/AdminResponse.cs rename to Adyen/TerminalApi/Models/AdminResponse.cs diff --git a/Adyen/Model/TerminalApi/AlgorithmIdentifier.cs b/Adyen/TerminalApi/Models/AlgorithmIdentifier.cs similarity index 100% rename from Adyen/Model/TerminalApi/AlgorithmIdentifier.cs rename to Adyen/TerminalApi/Models/AlgorithmIdentifier.cs diff --git a/Adyen/Model/TerminalApi/AlgorithmType.cs b/Adyen/TerminalApi/Models/AlgorithmType.cs similarity index 100% rename from Adyen/Model/TerminalApi/AlgorithmType.cs rename to Adyen/TerminalApi/Models/AlgorithmType.cs diff --git a/Adyen/Model/TerminalApi/AlignmentType.cs b/Adyen/TerminalApi/Models/AlignmentType.cs similarity index 100% rename from Adyen/Model/TerminalApi/AlignmentType.cs rename to Adyen/TerminalApi/Models/AlignmentType.cs diff --git a/Adyen/Model/TerminalApi/AllowedProduct.cs b/Adyen/TerminalApi/Models/AllowedProduct.cs similarity index 100% rename from Adyen/Model/TerminalApi/AllowedProduct.cs rename to Adyen/TerminalApi/Models/AllowedProduct.cs diff --git a/Adyen/Model/TerminalApi/Amount.cs b/Adyen/TerminalApi/Models/Amount.cs similarity index 100% rename from Adyen/Model/TerminalApi/Amount.cs rename to Adyen/TerminalApi/Models/Amount.cs diff --git a/Adyen/Model/TerminalApi/AmountsReq.cs b/Adyen/TerminalApi/Models/AmountsReq.cs similarity index 100% rename from Adyen/Model/TerminalApi/AmountsReq.cs rename to Adyen/TerminalApi/Models/AmountsReq.cs diff --git a/Adyen/Model/TerminalApi/AmountsResp.cs b/Adyen/TerminalApi/Models/AmountsResp.cs similarity index 100% rename from Adyen/Model/TerminalApi/AmountsResp.cs rename to Adyen/TerminalApi/Models/AmountsResp.cs diff --git a/Adyen/TerminalApi/Models/ApplicationInformation/ApplicationInfo.cs b/Adyen/TerminalApi/Models/ApplicationInformation/ApplicationInfo.cs new file mode 100644 index 000000000..3408fe322 --- /dev/null +++ b/Adyen/TerminalApi/Models/ApplicationInformation/ApplicationInfo.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text; +using Adyen.Constants; +using Newtonsoft.Json; + +namespace Adyen.Model.ApplicationInformation +{ + /// + /// ApplicationInfo + /// + [DataContract] + public class ApplicationInfo : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + public ApplicationInfo() + { + AdyenLibrary = new CommonField + { + Name = Adyen.Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryName, + Version = Core.Client.Extensions.HttpRequestMessageExtensions.AdyenLibraryVersion + }; + } + + /// + /// Gets or Sets AdyenLibrary + /// + [DataMember(Name = "adyenLibrary", EmitDefaultValue = false)] + public CommonField AdyenLibrary { get; private set; } + + /// + /// Gets or Sets AdyenPaymentSource + /// + [DataMember(Name = "adyenPaymentSource", EmitDefaultValue = false)] + public CommonField AdyenPaymentSource { get; set; } + + /// + /// Gets or Sets ExternalPlatform + /// + [DataMember(Name = "externalPlatform", EmitDefaultValue = false)] + public ExternalPlatform ExternalPlatform { get; set; } + + /// + /// Gets or Sets MerchantApplication + /// + [DataMember(Name = "merchantApplication", EmitDefaultValue = false)] + public CommonField MerchantApplication { get; set; } + + /// + /// Gets or Sets MerchantDevice + /// + [DataMember(Name = "merchantDevice", EmitDefaultValue = false)] + public MerchantDevice MerchantDevice { get; set; } + + /// + /// Gets or Sets ShopperInteractionDevice + /// + [DataMember(Name = "shopperInteractionDevice", EmitDefaultValue = false)] + public ShopperInteractionDevice ShopperInteractionDevice { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ApplicationInfo {\n"); + sb.Append(" AdyenLibrary: ").Append(AdyenLibrary).Append("\n"); + sb.Append(" AdyenPaymentSource: ").Append(AdyenPaymentSource).Append("\n"); + sb.Append(" ExternalPlatform: ").Append(ExternalPlatform).Append("\n"); + sb.Append(" MerchantApplication: ").Append(MerchantApplication).Append("\n"); + sb.Append(" MerchantDevice: ").Append(MerchantDevice).Append("\n"); + sb.Append(" ShopperInteractionDevice: ").Append(ShopperInteractionDevice).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return Equals(input as ApplicationInfo); + } + + /// + /// Returns true if ApplicationInfo instances are equal + /// + /// Instance of ApplicationInfo to be compared + /// Boolean + public bool Equals(ApplicationInfo input) + { + if (input == null) + return false; + + return + ( + AdyenLibrary == input.AdyenLibrary || + (AdyenLibrary != null && + AdyenLibrary.Equals(input.AdyenLibrary)) + ) && + ( + AdyenPaymentSource == input.AdyenPaymentSource || + (AdyenPaymentSource != null && + AdyenPaymentSource.Equals(input.AdyenPaymentSource)) + ) && + ( + ExternalPlatform == input.ExternalPlatform || + (ExternalPlatform != null && + ExternalPlatform.Equals(input.ExternalPlatform)) + ) && + ( + MerchantApplication == input.MerchantApplication || + (MerchantApplication != null && + MerchantApplication.Equals(input.MerchantApplication)) + ) && + ( + MerchantDevice == input.MerchantDevice || + (MerchantDevice != null && + MerchantDevice.Equals(input.MerchantDevice)) + ) && + ( + ShopperInteractionDevice == input.ShopperInteractionDevice || + (ShopperInteractionDevice != null && + ShopperInteractionDevice.Equals(input.ShopperInteractionDevice)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (AdyenLibrary != null) + hashCode = hashCode * 59 + AdyenLibrary.GetHashCode(); + if (AdyenPaymentSource != null) + hashCode = hashCode * 59 + AdyenPaymentSource.GetHashCode(); + if (ExternalPlatform != null) + hashCode = hashCode * 59 + ExternalPlatform.GetHashCode(); + if (MerchantApplication != null) + hashCode = hashCode * 59 + MerchantApplication.GetHashCode(); + if (MerchantDevice != null) + hashCode = hashCode * 59 + MerchantDevice.GetHashCode(); + if (ShopperInteractionDevice != null) + hashCode = hashCode * 59 + ShopperInteractionDevice.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} \ No newline at end of file diff --git a/Adyen/TerminalApi/Models/ApplicationInformation/CommonField.cs b/Adyen/TerminalApi/Models/ApplicationInformation/CommonField.cs new file mode 100644 index 000000000..1ff4bc3f1 --- /dev/null +++ b/Adyen/TerminalApi/Models/ApplicationInformation/CommonField.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; + +namespace Adyen.Model.ApplicationInformation +{ + /// + /// CommonField + /// + [DataContract] + public class CommonField : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Name of the field. For example, Name of External Platform.. + /// Version of the field. For example, Version of External Platform.. + public CommonField(string Name = default(string), string Version = default(string)) + { + this.Name = Name; + this.Version = Version; + } + + /// + /// Name of the field. For example, Name of External Platform. + /// + /// Name of the field. For example, Name of External Platform. + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Version of the field. For example, Version of External Platform. + /// + /// Version of the field. For example, Version of External Platform. + [DataMember(Name="version", EmitDefaultValue=false)] + public string Version { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CommonField {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return Equals(input as CommonField); + } + + /// + /// Returns true if CommonField instances are equal + /// + /// Instance of CommonField to be compared + /// Boolean + public bool Equals(CommonField input) + { + if (input == null) + return false; + + return + ( + Name == input.Name || + (Name != null && + Name.Equals(input.Name)) + ) && + ( + Version == input.Version || + (Version != null && + Version.Equals(input.Version)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + if (Version != null) + hashCode = hashCode * 59 + Version.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} \ No newline at end of file diff --git a/Adyen/TerminalApi/Models/ApplicationInformation/ExternalPlatform.cs b/Adyen/TerminalApi/Models/ApplicationInformation/ExternalPlatform.cs new file mode 100644 index 000000000..b97ac85ab --- /dev/null +++ b/Adyen/TerminalApi/Models/ApplicationInformation/ExternalPlatform.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; + +namespace Adyen.Model.ApplicationInformation +{ + /// + /// ExternalPlatform + /// + [DataContract] + public class ExternalPlatform : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// External platform integrator.. + /// Name of the field. For example, Name of External Platform.. + /// Version of the field. For example, Version of External Platform.. + public ExternalPlatform(string Integrator = default(string), string Name = default(string), string Version = default(string)) + { + this.Integrator = Integrator; + this.Name = Name; + this.Version = Version; + } + + /// + /// External platform integrator. + /// + /// External platform integrator. + [DataMember(Name="integrator", EmitDefaultValue=false)] + public string Integrator { get; set; } + + /// + /// Name of the field. For example, Name of External Platform. + /// + /// Name of the field. For example, Name of External Platform. + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Version of the field. For example, Version of External Platform. + /// + /// Version of the field. For example, Version of External Platform. + [DataMember(Name="version", EmitDefaultValue=false)] + public string Version { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ExternalPlatform {\n"); + sb.Append(" Integrator: ").Append(Integrator).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return Equals(input as ExternalPlatform); + } + + /// + /// Returns true if ExternalPlatform instances are equal + /// + /// Instance of ExternalPlatform to be compared + /// Boolean + public bool Equals(ExternalPlatform input) + { + if (input == null) + return false; + + return + ( + Integrator == input.Integrator || + (Integrator != null && + Integrator.Equals(input.Integrator)) + ) && + ( + Name == input.Name || + (Name != null && + Name.Equals(input.Name)) + ) && + ( + Version == input.Version || + (Version != null && + Version.Equals(input.Version)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Integrator != null) + hashCode = hashCode * 59 + Integrator.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + if (Version != null) + hashCode = hashCode * 59 + Version.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} \ No newline at end of file diff --git a/Adyen/TerminalApi/Models/ApplicationInformation/MerchantDevice.cs b/Adyen/TerminalApi/Models/ApplicationInformation/MerchantDevice.cs new file mode 100644 index 000000000..bbcd6ebd7 --- /dev/null +++ b/Adyen/TerminalApi/Models/ApplicationInformation/MerchantDevice.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; + +namespace Adyen.Model.ApplicationInformation +{ + /// + /// MerchantDevice + /// + [DataContract] + public class MerchantDevice : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Operating system running on the merchant device.. + /// Version of the operating system on the merchant device.. + /// Merchant device reference.. + public MerchantDevice(string Os = default(string), string OsVersion = default(string), string Reference = default(string)) + { + this.Os = Os; + this.OsVersion = OsVersion; + this.Reference = Reference; + } + + /// + /// Operating system running on the merchant device. + /// + /// Operating system running on the merchant device. + [DataMember(Name="os", EmitDefaultValue=false)] + public string Os { get; set; } + + /// + /// Version of the operating system on the merchant device. + /// + /// Version of the operating system on the merchant device. + [DataMember(Name="osVersion", EmitDefaultValue=false)] + public string OsVersion { get; set; } + + /// + /// Merchant device reference. + /// + /// Merchant device reference. + [DataMember(Name="reference", EmitDefaultValue=false)] + public string Reference { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MerchantDevice {\n"); + sb.Append(" Os: ").Append(Os).Append("\n"); + sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); + sb.Append(" Reference: ").Append(Reference).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return Equals(input as MerchantDevice); + } + + /// + /// Returns true if MerchantDevice instances are equal + /// + /// Instance of MerchantDevice to be compared + /// Boolean + public bool Equals(MerchantDevice input) + { + if (input == null) + return false; + + return + ( + Os == input.Os || + (Os != null && + Os.Equals(input.Os)) + ) && + ( + OsVersion == input.OsVersion || + (OsVersion != null && + OsVersion.Equals(input.OsVersion)) + ) && + ( + Reference == input.Reference || + (Reference != null && + Reference.Equals(input.Reference)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Os != null) + hashCode = hashCode * 59 + Os.GetHashCode(); + if (OsVersion != null) + hashCode = hashCode * 59 + OsVersion.GetHashCode(); + if (Reference != null) + hashCode = hashCode * 59 + Reference.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} \ No newline at end of file diff --git a/Adyen/TerminalApi/Models/ApplicationInformation/ShopperInteractionDevice.cs b/Adyen/TerminalApi/Models/ApplicationInformation/ShopperInteractionDevice.cs new file mode 100644 index 000000000..f301f54f0 --- /dev/null +++ b/Adyen/TerminalApi/Models/ApplicationInformation/ShopperInteractionDevice.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using System.Text; +using Newtonsoft.Json; + +namespace Adyen.Model.ApplicationInformation +{ + /// + /// ShopperInteractionDevice + /// + [DataContract] + public class ShopperInteractionDevice : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Locale on the shopper interaction device.. + /// Operating system running on the shopper interaction device.. + /// Version of the operating system on the shopper interaction device.. + public ShopperInteractionDevice(string Locale = default(string), string Os = default(string), string OsVersion = default(string)) + { + this.Locale = Locale; + this.Os = Os; + this.OsVersion = OsVersion; + } + + /// + /// Locale on the shopper interaction device. + /// + /// Locale on the shopper interaction device. + [DataMember(Name="locale", EmitDefaultValue=false)] + public string Locale { get; set; } + + /// + /// Operating system running on the shopper interaction device. + /// + /// Operating system running on the shopper interaction device. + [DataMember(Name="os", EmitDefaultValue=false)] + public string Os { get; set; } + + /// + /// Version of the operating system on the shopper interaction device. + /// + /// Version of the operating system on the shopper interaction device. + [DataMember(Name="osVersion", EmitDefaultValue=false)] + public string OsVersion { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ShopperInteractionDevice {\n"); + sb.Append(" Locale: ").Append(Locale).Append("\n"); + sb.Append(" Os: ").Append(Os).Append("\n"); + sb.Append(" OsVersion: ").Append(OsVersion).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return Equals(input as ShopperInteractionDevice); + } + + /// + /// Returns true if PaymentMethodsApplicationInfoShopperInteractionDevice instances are equal + /// + /// Instance of PaymentMethodsApplicationInfoShopperInteractionDevice to be compared + /// Boolean + public bool Equals(ShopperInteractionDevice input) + { + if (input == null) + return false; + + return + ( + Locale == input.Locale || + (Locale != null && + Locale.Equals(input.Locale)) + ) && + ( + Os == input.Os || + (Os != null && + Os.Equals(input.Os)) + ) && + ( + OsVersion == input.OsVersion || + (OsVersion != null && + OsVersion.Equals(input.OsVersion)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (Locale != null) + hashCode = hashCode * 59 + Locale.GetHashCode(); + if (Os != null) + hashCode = hashCode * 59 + Os.GetHashCode(); + if (OsVersion != null) + hashCode = hashCode * 59 + OsVersion.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} \ No newline at end of file diff --git a/Adyen/Model/TerminalApi/AreaSize.cs b/Adyen/TerminalApi/Models/AreaSize.cs similarity index 100% rename from Adyen/Model/TerminalApi/AreaSize.cs rename to Adyen/TerminalApi/Models/AreaSize.cs diff --git a/Adyen/Model/TerminalApi/AuthenticatedData.cs b/Adyen/TerminalApi/Models/AuthenticatedData.cs similarity index 100% rename from Adyen/Model/TerminalApi/AuthenticatedData.cs rename to Adyen/TerminalApi/Models/AuthenticatedData.cs diff --git a/Adyen/Model/TerminalApi/AuthenticationMethodType.cs b/Adyen/TerminalApi/Models/AuthenticationMethodType.cs similarity index 100% rename from Adyen/Model/TerminalApi/AuthenticationMethodType.cs rename to Adyen/TerminalApi/Models/AuthenticationMethodType.cs diff --git a/Adyen/Model/TerminalApi/BalanceInquiryRequest.cs b/Adyen/TerminalApi/Models/BalanceInquiryRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/BalanceInquiryRequest.cs rename to Adyen/TerminalApi/Models/BalanceInquiryRequest.cs diff --git a/Adyen/Model/TerminalApi/BalanceInquiryResponse.cs b/Adyen/TerminalApi/Models/BalanceInquiryResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/BalanceInquiryResponse.cs rename to Adyen/TerminalApi/Models/BalanceInquiryResponse.cs diff --git a/Adyen/Model/TerminalApi/BarcodeType.cs b/Adyen/TerminalApi/Models/BarcodeType.cs similarity index 100% rename from Adyen/Model/TerminalApi/BarcodeType.cs rename to Adyen/TerminalApi/Models/BarcodeType.cs diff --git a/Adyen/Model/TerminalApi/BatchRequest.cs b/Adyen/TerminalApi/Models/BatchRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/BatchRequest.cs rename to Adyen/TerminalApi/Models/BatchRequest.cs diff --git a/Adyen/Model/TerminalApi/BatchResponse.cs b/Adyen/TerminalApi/Models/BatchResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/BatchResponse.cs rename to Adyen/TerminalApi/Models/BatchResponse.cs diff --git a/Adyen/Model/TerminalApi/CapturedSignature.cs b/Adyen/TerminalApi/Models/CapturedSignature.cs similarity index 100% rename from Adyen/Model/TerminalApi/CapturedSignature.cs rename to Adyen/TerminalApi/Models/CapturedSignature.cs diff --git a/Adyen/Model/TerminalApi/CardAcquisitionRequest.cs b/Adyen/TerminalApi/Models/CardAcquisitionRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardAcquisitionRequest.cs rename to Adyen/TerminalApi/Models/CardAcquisitionRequest.cs diff --git a/Adyen/Model/TerminalApi/CardAcquisitionResponse.cs b/Adyen/TerminalApi/Models/CardAcquisitionResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardAcquisitionResponse.cs rename to Adyen/TerminalApi/Models/CardAcquisitionResponse.cs diff --git a/Adyen/Model/TerminalApi/CardAcquisitionTransaction.cs b/Adyen/TerminalApi/Models/CardAcquisitionTransaction.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardAcquisitionTransaction.cs rename to Adyen/TerminalApi/Models/CardAcquisitionTransaction.cs diff --git a/Adyen/Model/TerminalApi/CardData.cs b/Adyen/TerminalApi/Models/CardData.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardData.cs rename to Adyen/TerminalApi/Models/CardData.cs diff --git a/Adyen/Model/TerminalApi/CardReaderAPDURequest.cs b/Adyen/TerminalApi/Models/CardReaderAPDURequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardReaderAPDURequest.cs rename to Adyen/TerminalApi/Models/CardReaderAPDURequest.cs diff --git a/Adyen/Model/TerminalApi/CardReaderAPDUResponse.cs b/Adyen/TerminalApi/Models/CardReaderAPDUResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardReaderAPDUResponse.cs rename to Adyen/TerminalApi/Models/CardReaderAPDUResponse.cs diff --git a/Adyen/Model/TerminalApi/CardReaderInitRequest.cs b/Adyen/TerminalApi/Models/CardReaderInitRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardReaderInitRequest.cs rename to Adyen/TerminalApi/Models/CardReaderInitRequest.cs diff --git a/Adyen/Model/TerminalApi/CardReaderInitResponse.cs b/Adyen/TerminalApi/Models/CardReaderInitResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardReaderInitResponse.cs rename to Adyen/TerminalApi/Models/CardReaderInitResponse.cs diff --git a/Adyen/Model/TerminalApi/CardReaderPowerOffRequest.cs b/Adyen/TerminalApi/Models/CardReaderPowerOffRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardReaderPowerOffRequest.cs rename to Adyen/TerminalApi/Models/CardReaderPowerOffRequest.cs diff --git a/Adyen/Model/TerminalApi/CardReaderPowerOffResponse.cs b/Adyen/TerminalApi/Models/CardReaderPowerOffResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardReaderPowerOffResponse.cs rename to Adyen/TerminalApi/Models/CardReaderPowerOffResponse.cs diff --git a/Adyen/Model/TerminalApi/CardholderPIN.cs b/Adyen/TerminalApi/Models/CardholderPIN.cs similarity index 100% rename from Adyen/Model/TerminalApi/CardholderPIN.cs rename to Adyen/TerminalApi/Models/CardholderPIN.cs diff --git a/Adyen/Model/TerminalApi/CashHandlingDevice.cs b/Adyen/TerminalApi/Models/CashHandlingDevice.cs similarity index 100% rename from Adyen/Model/TerminalApi/CashHandlingDevice.cs rename to Adyen/TerminalApi/Models/CashHandlingDevice.cs diff --git a/Adyen/Model/TerminalApi/CharacterHeightType.cs b/Adyen/TerminalApi/Models/CharacterHeightType.cs similarity index 100% rename from Adyen/Model/TerminalApi/CharacterHeightType.cs rename to Adyen/TerminalApi/Models/CharacterHeightType.cs diff --git a/Adyen/Model/TerminalApi/CharacterStyleType.cs b/Adyen/TerminalApi/Models/CharacterStyleType.cs similarity index 100% rename from Adyen/Model/TerminalApi/CharacterStyleType.cs rename to Adyen/TerminalApi/Models/CharacterStyleType.cs diff --git a/Adyen/Model/TerminalApi/CharacterWidthType.cs b/Adyen/TerminalApi/Models/CharacterWidthType.cs similarity index 100% rename from Adyen/Model/TerminalApi/CharacterWidthType.cs rename to Adyen/TerminalApi/Models/CharacterWidthType.cs diff --git a/Adyen/Model/TerminalApi/CheckData.cs b/Adyen/TerminalApi/Models/CheckData.cs similarity index 100% rename from Adyen/Model/TerminalApi/CheckData.cs rename to Adyen/TerminalApi/Models/CheckData.cs diff --git a/Adyen/Model/TerminalApi/CheckTypeCodeType.cs b/Adyen/TerminalApi/Models/CheckTypeCodeType.cs similarity index 100% rename from Adyen/Model/TerminalApi/CheckTypeCodeType.cs rename to Adyen/TerminalApi/Models/CheckTypeCodeType.cs diff --git a/Adyen/Model/TerminalApi/CoinsOrBills.cs b/Adyen/TerminalApi/Models/CoinsOrBills.cs similarity index 100% rename from Adyen/Model/TerminalApi/CoinsOrBills.cs rename to Adyen/TerminalApi/Models/CoinsOrBills.cs diff --git a/Adyen/Model/TerminalApi/ColorType.cs b/Adyen/TerminalApi/Models/ColorType.cs similarity index 100% rename from Adyen/Model/TerminalApi/ColorType.cs rename to Adyen/TerminalApi/Models/ColorType.cs diff --git a/Adyen/Model/TerminalApi/ContentInformation.cs b/Adyen/TerminalApi/Models/ContentInformation.cs similarity index 100% rename from Adyen/Model/TerminalApi/ContentInformation.cs rename to Adyen/TerminalApi/Models/ContentInformation.cs diff --git a/Adyen/Model/TerminalApi/ContentType.cs b/Adyen/TerminalApi/Models/ContentType.cs similarity index 100% rename from Adyen/Model/TerminalApi/ContentType.cs rename to Adyen/TerminalApi/Models/ContentType.cs diff --git a/Adyen/Model/TerminalApi/CurrencyConversion.cs b/Adyen/TerminalApi/Models/CurrencyConversion.cs similarity index 100% rename from Adyen/Model/TerminalApi/CurrencyConversion.cs rename to Adyen/TerminalApi/Models/CurrencyConversion.cs diff --git a/Adyen/Model/TerminalApi/CustomerOrder.cs b/Adyen/TerminalApi/Models/CustomerOrder.cs similarity index 100% rename from Adyen/Model/TerminalApi/CustomerOrder.cs rename to Adyen/TerminalApi/Models/CustomerOrder.cs diff --git a/Adyen/Model/TerminalApi/CustomerOrderReqType.cs b/Adyen/TerminalApi/Models/CustomerOrderReqType.cs similarity index 100% rename from Adyen/Model/TerminalApi/CustomerOrderReqType.cs rename to Adyen/TerminalApi/Models/CustomerOrderReqType.cs diff --git a/Adyen/Model/TerminalApi/DeviceType.cs b/Adyen/TerminalApi/Models/DeviceType.cs similarity index 100% rename from Adyen/Model/TerminalApi/DeviceType.cs rename to Adyen/TerminalApi/Models/DeviceType.cs diff --git a/Adyen/Model/TerminalApi/DiagnosisRequest.cs b/Adyen/TerminalApi/Models/DiagnosisRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/DiagnosisRequest.cs rename to Adyen/TerminalApi/Models/DiagnosisRequest.cs diff --git a/Adyen/Model/TerminalApi/DiagnosisResponse.cs b/Adyen/TerminalApi/Models/DiagnosisResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/DiagnosisResponse.cs rename to Adyen/TerminalApi/Models/DiagnosisResponse.cs diff --git a/Adyen/Model/TerminalApi/DigestedData.cs b/Adyen/TerminalApi/Models/DigestedData.cs similarity index 100% rename from Adyen/Model/TerminalApi/DigestedData.cs rename to Adyen/TerminalApi/Models/DigestedData.cs diff --git a/Adyen/Model/TerminalApi/DisplayOutput.cs b/Adyen/TerminalApi/Models/DisplayOutput.cs similarity index 100% rename from Adyen/Model/TerminalApi/DisplayOutput.cs rename to Adyen/TerminalApi/Models/DisplayOutput.cs diff --git a/Adyen/Model/TerminalApi/DisplayRequest.cs b/Adyen/TerminalApi/Models/DisplayRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/DisplayRequest.cs rename to Adyen/TerminalApi/Models/DisplayRequest.cs diff --git a/Adyen/Model/TerminalApi/DisplayResponse.cs b/Adyen/TerminalApi/Models/DisplayResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/DisplayResponse.cs rename to Adyen/TerminalApi/Models/DisplayResponse.cs diff --git a/Adyen/Model/TerminalApi/DocumentQualifierType.cs b/Adyen/TerminalApi/Models/DocumentQualifierType.cs similarity index 100% rename from Adyen/Model/TerminalApi/DocumentQualifierType.cs rename to Adyen/TerminalApi/Models/DocumentQualifierType.cs diff --git a/Adyen/Model/TerminalApi/EnableServiceRequest.cs b/Adyen/TerminalApi/Models/EnableServiceRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/EnableServiceRequest.cs rename to Adyen/TerminalApi/Models/EnableServiceRequest.cs diff --git a/Adyen/Model/TerminalApi/EnableServiceResponse.cs b/Adyen/TerminalApi/Models/EnableServiceResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/EnableServiceResponse.cs rename to Adyen/TerminalApi/Models/EnableServiceResponse.cs diff --git a/Adyen/Model/TerminalApi/EncapsulatedContent.cs b/Adyen/TerminalApi/Models/EncapsulatedContent.cs similarity index 100% rename from Adyen/Model/TerminalApi/EncapsulatedContent.cs rename to Adyen/TerminalApi/Models/EncapsulatedContent.cs diff --git a/Adyen/Model/TerminalApi/EncryptedContent.cs b/Adyen/TerminalApi/Models/EncryptedContent.cs similarity index 100% rename from Adyen/Model/TerminalApi/EncryptedContent.cs rename to Adyen/TerminalApi/Models/EncryptedContent.cs diff --git a/Adyen/Model/TerminalApi/EntryModeType.cs b/Adyen/TerminalApi/Models/EntryModeType.cs similarity index 100% rename from Adyen/Model/TerminalApi/EntryModeType.cs rename to Adyen/TerminalApi/Models/EntryModeType.cs diff --git a/Adyen/Model/TerminalApi/EnvelopedData.cs b/Adyen/TerminalApi/Models/EnvelopedData.cs similarity index 100% rename from Adyen/Model/TerminalApi/EnvelopedData.cs rename to Adyen/TerminalApi/Models/EnvelopedData.cs diff --git a/Adyen/Model/TerminalApi/ErrorConditionType.cs b/Adyen/TerminalApi/Models/ErrorConditionType.cs similarity index 100% rename from Adyen/Model/TerminalApi/ErrorConditionType.cs rename to Adyen/TerminalApi/Models/ErrorConditionType.cs diff --git a/Adyen/Model/TerminalApi/EventNotification.cs b/Adyen/TerminalApi/Models/EventNotification.cs similarity index 100% rename from Adyen/Model/TerminalApi/EventNotification.cs rename to Adyen/TerminalApi/Models/EventNotification.cs diff --git a/Adyen/Model/TerminalApi/EventToNotifyType.cs b/Adyen/TerminalApi/Models/EventToNotifyType.cs similarity index 100% rename from Adyen/Model/TerminalApi/EventToNotifyType.cs rename to Adyen/TerminalApi/Models/EventToNotifyType.cs diff --git a/Adyen/Model/TerminalApi/ForceTypeModeType.cs b/Adyen/TerminalApi/Models/ForceTypeModeType.cs similarity index 100% rename from Adyen/Model/TerminalApi/ForceTypeModeType.cs rename to Adyen/TerminalApi/Models/ForceTypeModeType.cs diff --git a/Adyen/Model/TerminalApi/GenericProfileType.cs b/Adyen/TerminalApi/Models/GenericProfileType.cs similarity index 100% rename from Adyen/Model/TerminalApi/GenericProfileType.cs rename to Adyen/TerminalApi/Models/GenericProfileType.cs diff --git a/Adyen/Model/TerminalApi/GeographicCoordinates.cs b/Adyen/TerminalApi/Models/GeographicCoordinates.cs similarity index 100% rename from Adyen/Model/TerminalApi/GeographicCoordinates.cs rename to Adyen/TerminalApi/Models/GeographicCoordinates.cs diff --git a/Adyen/Model/TerminalApi/Geolocation.cs b/Adyen/TerminalApi/Models/Geolocation.cs similarity index 100% rename from Adyen/Model/TerminalApi/Geolocation.cs rename to Adyen/TerminalApi/Models/Geolocation.cs diff --git a/Adyen/Model/TerminalApi/GetTotalsRequest.cs b/Adyen/TerminalApi/Models/GetTotalsRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/GetTotalsRequest.cs rename to Adyen/TerminalApi/Models/GetTotalsRequest.cs diff --git a/Adyen/Model/TerminalApi/GetTotalsResponse.cs b/Adyen/TerminalApi/Models/GetTotalsResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/GetTotalsResponse.cs rename to Adyen/TerminalApi/Models/GetTotalsResponse.cs diff --git a/Adyen/Model/TerminalApi/GlobalStatusType.cs b/Adyen/TerminalApi/Models/GlobalStatusType.cs similarity index 100% rename from Adyen/Model/TerminalApi/GlobalStatusType.cs rename to Adyen/TerminalApi/Models/GlobalStatusType.cs diff --git a/Adyen/Model/TerminalApi/HostStatus.cs b/Adyen/TerminalApi/Models/HostStatus.cs similarity index 100% rename from Adyen/Model/TerminalApi/HostStatus.cs rename to Adyen/TerminalApi/Models/HostStatus.cs diff --git a/Adyen/Model/TerminalApi/ICCResetData.cs b/Adyen/TerminalApi/Models/ICCResetData.cs similarity index 100% rename from Adyen/Model/TerminalApi/ICCResetData.cs rename to Adyen/TerminalApi/Models/ICCResetData.cs diff --git a/Adyen/Model/TerminalApi/IdentificationSupportType.cs b/Adyen/TerminalApi/Models/IdentificationSupportType.cs similarity index 100% rename from Adyen/Model/TerminalApi/IdentificationSupportType.cs rename to Adyen/TerminalApi/Models/IdentificationSupportType.cs diff --git a/Adyen/Model/TerminalApi/IdentificationType.cs b/Adyen/TerminalApi/Models/IdentificationType.cs similarity index 100% rename from Adyen/Model/TerminalApi/IdentificationType.cs rename to Adyen/TerminalApi/Models/IdentificationType.cs diff --git a/Adyen/Model/TerminalApi/InfoQualifyType.cs b/Adyen/TerminalApi/Models/InfoQualifyType.cs similarity index 100% rename from Adyen/Model/TerminalApi/InfoQualifyType.cs rename to Adyen/TerminalApi/Models/InfoQualifyType.cs diff --git a/Adyen/Model/TerminalApi/Input.cs b/Adyen/TerminalApi/Models/Input.cs similarity index 100% rename from Adyen/Model/TerminalApi/Input.cs rename to Adyen/TerminalApi/Models/Input.cs diff --git a/Adyen/Model/TerminalApi/InputCommandType.cs b/Adyen/TerminalApi/Models/InputCommandType.cs similarity index 100% rename from Adyen/Model/TerminalApi/InputCommandType.cs rename to Adyen/TerminalApi/Models/InputCommandType.cs diff --git a/Adyen/Model/TerminalApi/InputData.cs b/Adyen/TerminalApi/Models/InputData.cs similarity index 100% rename from Adyen/Model/TerminalApi/InputData.cs rename to Adyen/TerminalApi/Models/InputData.cs diff --git a/Adyen/Model/TerminalApi/InputRequest.cs b/Adyen/TerminalApi/Models/InputRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/InputRequest.cs rename to Adyen/TerminalApi/Models/InputRequest.cs diff --git a/Adyen/Model/TerminalApi/InputResponse.cs b/Adyen/TerminalApi/Models/InputResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/InputResponse.cs rename to Adyen/TerminalApi/Models/InputResponse.cs diff --git a/Adyen/Model/TerminalApi/InputResult.cs b/Adyen/TerminalApi/Models/InputResult.cs similarity index 100% rename from Adyen/Model/TerminalApi/InputResult.cs rename to Adyen/TerminalApi/Models/InputResult.cs diff --git a/Adyen/Model/TerminalApi/InputUpdate.cs b/Adyen/TerminalApi/Models/InputUpdate.cs similarity index 100% rename from Adyen/Model/TerminalApi/InputUpdate.cs rename to Adyen/TerminalApi/Models/InputUpdate.cs diff --git a/Adyen/Model/TerminalApi/Instalment.cs b/Adyen/TerminalApi/Models/Instalment.cs similarity index 100% rename from Adyen/Model/TerminalApi/Instalment.cs rename to Adyen/TerminalApi/Models/Instalment.cs diff --git a/Adyen/Model/TerminalApi/IssuerAndSerialNumber.cs b/Adyen/TerminalApi/Models/IssuerAndSerialNumber.cs similarity index 100% rename from Adyen/Model/TerminalApi/IssuerAndSerialNumber.cs rename to Adyen/TerminalApi/Models/IssuerAndSerialNumber.cs diff --git a/Adyen/Model/TerminalApi/KEK.cs b/Adyen/TerminalApi/Models/KEK.cs similarity index 100% rename from Adyen/Model/TerminalApi/KEK.cs rename to Adyen/TerminalApi/Models/KEK.cs diff --git a/Adyen/Model/TerminalApi/KEKIdentifier.cs b/Adyen/TerminalApi/Models/KEKIdentifier.cs similarity index 100% rename from Adyen/Model/TerminalApi/KEKIdentifier.cs rename to Adyen/TerminalApi/Models/KEKIdentifier.cs diff --git a/Adyen/Model/TerminalApi/KeyTransport.cs b/Adyen/TerminalApi/Models/KeyTransport.cs similarity index 100% rename from Adyen/Model/TerminalApi/KeyTransport.cs rename to Adyen/TerminalApi/Models/KeyTransport.cs diff --git a/Adyen/Model/TerminalApi/LoginRequest.cs b/Adyen/TerminalApi/Models/LoginRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoginRequest.cs rename to Adyen/TerminalApi/Models/LoginRequest.cs diff --git a/Adyen/Model/TerminalApi/LoginResponse.cs b/Adyen/TerminalApi/Models/LoginResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoginResponse.cs rename to Adyen/TerminalApi/Models/LoginResponse.cs diff --git a/Adyen/Model/TerminalApi/LogoutRequest.cs b/Adyen/TerminalApi/Models/LogoutRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/LogoutRequest.cs rename to Adyen/TerminalApi/Models/LogoutRequest.cs diff --git a/Adyen/Model/TerminalApi/LogoutResponse.cs b/Adyen/TerminalApi/Models/LogoutResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/LogoutResponse.cs rename to Adyen/TerminalApi/Models/LogoutResponse.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyAccount.cs b/Adyen/TerminalApi/Models/LoyaltyAccount.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyAccount.cs rename to Adyen/TerminalApi/Models/LoyaltyAccount.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyAccountID.cs b/Adyen/TerminalApi/Models/LoyaltyAccountID.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyAccountID.cs rename to Adyen/TerminalApi/Models/LoyaltyAccountID.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyAccountReq.cs b/Adyen/TerminalApi/Models/LoyaltyAccountReq.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyAccountReq.cs rename to Adyen/TerminalApi/Models/LoyaltyAccountReq.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyAccountStatus.cs b/Adyen/TerminalApi/Models/LoyaltyAccountStatus.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyAccountStatus.cs rename to Adyen/TerminalApi/Models/LoyaltyAccountStatus.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyAcquirerData.cs b/Adyen/TerminalApi/Models/LoyaltyAcquirerData.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyAcquirerData.cs rename to Adyen/TerminalApi/Models/LoyaltyAcquirerData.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyAmount.cs b/Adyen/TerminalApi/Models/LoyaltyAmount.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyAmount.cs rename to Adyen/TerminalApi/Models/LoyaltyAmount.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyData.cs b/Adyen/TerminalApi/Models/LoyaltyData.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyData.cs rename to Adyen/TerminalApi/Models/LoyaltyData.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyHandlingType.cs b/Adyen/TerminalApi/Models/LoyaltyHandlingType.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyHandlingType.cs rename to Adyen/TerminalApi/Models/LoyaltyHandlingType.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyRequest.cs b/Adyen/TerminalApi/Models/LoyaltyRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyRequest.cs rename to Adyen/TerminalApi/Models/LoyaltyRequest.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyResponse.cs b/Adyen/TerminalApi/Models/LoyaltyResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyResponse.cs rename to Adyen/TerminalApi/Models/LoyaltyResponse.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyResult.cs b/Adyen/TerminalApi/Models/LoyaltyResult.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyResult.cs rename to Adyen/TerminalApi/Models/LoyaltyResult.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyTotals.cs b/Adyen/TerminalApi/Models/LoyaltyTotals.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyTotals.cs rename to Adyen/TerminalApi/Models/LoyaltyTotals.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyTransaction.cs b/Adyen/TerminalApi/Models/LoyaltyTransaction.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyTransaction.cs rename to Adyen/TerminalApi/Models/LoyaltyTransaction.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyTransactionType.cs b/Adyen/TerminalApi/Models/LoyaltyTransactionType.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyTransactionType.cs rename to Adyen/TerminalApi/Models/LoyaltyTransactionType.cs diff --git a/Adyen/Model/TerminalApi/LoyaltyUnitType.cs b/Adyen/TerminalApi/Models/LoyaltyUnitType.cs similarity index 100% rename from Adyen/Model/TerminalApi/LoyaltyUnitType.cs rename to Adyen/TerminalApi/Models/LoyaltyUnitType.cs diff --git a/Adyen/Model/TerminalApi/MenuEntry.cs b/Adyen/TerminalApi/Models/MenuEntry.cs similarity index 100% rename from Adyen/Model/TerminalApi/MenuEntry.cs rename to Adyen/TerminalApi/Models/MenuEntry.cs diff --git a/Adyen/Model/TerminalApi/MenuEntryTagType.cs b/Adyen/TerminalApi/Models/MenuEntryTagType.cs similarity index 100% rename from Adyen/Model/TerminalApi/MenuEntryTagType.cs rename to Adyen/TerminalApi/Models/MenuEntryTagType.cs diff --git a/Adyen/Model/TerminalApi/MessageCategoryType.cs b/Adyen/TerminalApi/Models/MessageCategoryType.cs similarity index 100% rename from Adyen/Model/TerminalApi/MessageCategoryType.cs rename to Adyen/TerminalApi/Models/MessageCategoryType.cs diff --git a/Adyen/Model/TerminalApi/MessageClassType.cs b/Adyen/TerminalApi/Models/MessageClassType.cs similarity index 100% rename from Adyen/Model/TerminalApi/MessageClassType.cs rename to Adyen/TerminalApi/Models/MessageClassType.cs diff --git a/Adyen/Model/TerminalApi/MessageHeader.cs b/Adyen/TerminalApi/Models/MessageHeader.cs similarity index 100% rename from Adyen/Model/TerminalApi/MessageHeader.cs rename to Adyen/TerminalApi/Models/MessageHeader.cs diff --git a/Adyen/Model/TerminalApi/MessageReference.cs b/Adyen/TerminalApi/Models/MessageReference.cs similarity index 100% rename from Adyen/Model/TerminalApi/MessageReference.cs rename to Adyen/TerminalApi/Models/MessageReference.cs diff --git a/Adyen/Model/TerminalApi/MessageType.cs b/Adyen/TerminalApi/Models/MessageType.cs similarity index 100% rename from Adyen/Model/TerminalApi/MessageType.cs rename to Adyen/TerminalApi/Models/MessageType.cs diff --git a/Adyen/Model/TerminalApi/MobileData.cs b/Adyen/TerminalApi/Models/MobileData.cs similarity index 100% rename from Adyen/Model/TerminalApi/MobileData.cs rename to Adyen/TerminalApi/Models/MobileData.cs diff --git a/Adyen/Model/TerminalApi/NamedKeyEncryptedData.cs b/Adyen/TerminalApi/Models/NamedKeyEncryptedData.cs similarity index 100% rename from Adyen/Model/TerminalApi/NamedKeyEncryptedData.cs rename to Adyen/TerminalApi/Models/NamedKeyEncryptedData.cs diff --git a/Adyen/Model/TerminalApi/OriginalPOITransaction.cs b/Adyen/TerminalApi/Models/OriginalPOITransaction.cs similarity index 100% rename from Adyen/Model/TerminalApi/OriginalPOITransaction.cs rename to Adyen/TerminalApi/Models/OriginalPOITransaction.cs diff --git a/Adyen/Model/TerminalApi/OutputBarcode.cs b/Adyen/TerminalApi/Models/OutputBarcode.cs similarity index 100% rename from Adyen/Model/TerminalApi/OutputBarcode.cs rename to Adyen/TerminalApi/Models/OutputBarcode.cs diff --git a/Adyen/Model/TerminalApi/OutputContent.cs b/Adyen/TerminalApi/Models/OutputContent.cs similarity index 100% rename from Adyen/Model/TerminalApi/OutputContent.cs rename to Adyen/TerminalApi/Models/OutputContent.cs diff --git a/Adyen/Model/TerminalApi/OutputFormatType.cs b/Adyen/TerminalApi/Models/OutputFormatType.cs similarity index 100% rename from Adyen/Model/TerminalApi/OutputFormatType.cs rename to Adyen/TerminalApi/Models/OutputFormatType.cs diff --git a/Adyen/Model/TerminalApi/OutputResult.cs b/Adyen/TerminalApi/Models/OutputResult.cs similarity index 100% rename from Adyen/Model/TerminalApi/OutputResult.cs rename to Adyen/TerminalApi/Models/OutputResult.cs diff --git a/Adyen/Model/TerminalApi/OutputText.cs b/Adyen/TerminalApi/Models/OutputText.cs similarity index 100% rename from Adyen/Model/TerminalApi/OutputText.cs rename to Adyen/TerminalApi/Models/OutputText.cs diff --git a/Adyen/Model/TerminalApi/PINFormatType.cs b/Adyen/TerminalApi/Models/PINFormatType.cs similarity index 100% rename from Adyen/Model/TerminalApi/PINFormatType.cs rename to Adyen/TerminalApi/Models/PINFormatType.cs diff --git a/Adyen/Model/TerminalApi/PINRequest.cs b/Adyen/TerminalApi/Models/PINRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/PINRequest.cs rename to Adyen/TerminalApi/Models/PINRequest.cs diff --git a/Adyen/Model/TerminalApi/PINRequestType.cs b/Adyen/TerminalApi/Models/PINRequestType.cs similarity index 100% rename from Adyen/Model/TerminalApi/PINRequestType.cs rename to Adyen/TerminalApi/Models/PINRequestType.cs diff --git a/Adyen/Model/TerminalApi/PINResponse.cs b/Adyen/TerminalApi/Models/PINResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/PINResponse.cs rename to Adyen/TerminalApi/Models/PINResponse.cs diff --git a/Adyen/Model/TerminalApi/POIData.cs b/Adyen/TerminalApi/Models/POIData.cs similarity index 100% rename from Adyen/Model/TerminalApi/POIData.cs rename to Adyen/TerminalApi/Models/POIData.cs diff --git a/Adyen/Model/TerminalApi/POIProfile.cs b/Adyen/TerminalApi/Models/POIProfile.cs similarity index 100% rename from Adyen/Model/TerminalApi/POIProfile.cs rename to Adyen/TerminalApi/Models/POIProfile.cs diff --git a/Adyen/Model/TerminalApi/POISoftware.cs b/Adyen/TerminalApi/Models/POISoftware.cs similarity index 100% rename from Adyen/Model/TerminalApi/POISoftware.cs rename to Adyen/TerminalApi/Models/POISoftware.cs diff --git a/Adyen/Model/TerminalApi/POIStatus.cs b/Adyen/TerminalApi/Models/POIStatus.cs similarity index 100% rename from Adyen/Model/TerminalApi/POIStatus.cs rename to Adyen/TerminalApi/Models/POIStatus.cs diff --git a/Adyen/Model/TerminalApi/POISystemData.cs b/Adyen/TerminalApi/Models/POISystemData.cs similarity index 100% rename from Adyen/Model/TerminalApi/POISystemData.cs rename to Adyen/TerminalApi/Models/POISystemData.cs diff --git a/Adyen/Model/TerminalApi/POITerminalData.cs b/Adyen/TerminalApi/Models/POITerminalData.cs similarity index 100% rename from Adyen/Model/TerminalApi/POITerminalData.cs rename to Adyen/TerminalApi/Models/POITerminalData.cs diff --git a/Adyen/Model/TerminalApi/Parameter.cs b/Adyen/TerminalApi/Models/Parameter.cs similarity index 100% rename from Adyen/Model/TerminalApi/Parameter.cs rename to Adyen/TerminalApi/Models/Parameter.cs diff --git a/Adyen/Model/TerminalApi/PaymentAccountReq.cs b/Adyen/TerminalApi/Models/PaymentAccountReq.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentAccountReq.cs rename to Adyen/TerminalApi/Models/PaymentAccountReq.cs diff --git a/Adyen/Model/TerminalApi/PaymentAccountStatus.cs b/Adyen/TerminalApi/Models/PaymentAccountStatus.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentAccountStatus.cs rename to Adyen/TerminalApi/Models/PaymentAccountStatus.cs diff --git a/Adyen/Model/TerminalApi/PaymentAcquirerData.cs b/Adyen/TerminalApi/Models/PaymentAcquirerData.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentAcquirerData.cs rename to Adyen/TerminalApi/Models/PaymentAcquirerData.cs diff --git a/Adyen/Model/TerminalApi/PaymentData.cs b/Adyen/TerminalApi/Models/PaymentData.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentData.cs rename to Adyen/TerminalApi/Models/PaymentData.cs diff --git a/Adyen/Model/TerminalApi/PaymentInstrumentData.cs b/Adyen/TerminalApi/Models/PaymentInstrumentData.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentInstrumentData.cs rename to Adyen/TerminalApi/Models/PaymentInstrumentData.cs diff --git a/Adyen/Model/TerminalApi/PaymentInstrumentType.cs b/Adyen/TerminalApi/Models/PaymentInstrumentType.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentInstrumentType.cs rename to Adyen/TerminalApi/Models/PaymentInstrumentType.cs diff --git a/Adyen/Model/TerminalApi/PaymentReceipt.cs b/Adyen/TerminalApi/Models/PaymentReceipt.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentReceipt.cs rename to Adyen/TerminalApi/Models/PaymentReceipt.cs diff --git a/Adyen/Model/TerminalApi/PaymentRequest.cs b/Adyen/TerminalApi/Models/PaymentRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentRequest.cs rename to Adyen/TerminalApi/Models/PaymentRequest.cs diff --git a/Adyen/Model/TerminalApi/PaymentResponse.cs b/Adyen/TerminalApi/Models/PaymentResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentResponse.cs rename to Adyen/TerminalApi/Models/PaymentResponse.cs diff --git a/Adyen/Model/TerminalApi/PaymentResult.cs b/Adyen/TerminalApi/Models/PaymentResult.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentResult.cs rename to Adyen/TerminalApi/Models/PaymentResult.cs diff --git a/Adyen/Model/TerminalApi/PaymentToken.cs b/Adyen/TerminalApi/Models/PaymentToken.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentToken.cs rename to Adyen/TerminalApi/Models/PaymentToken.cs diff --git a/Adyen/Model/TerminalApi/PaymentTotals.cs b/Adyen/TerminalApi/Models/PaymentTotals.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentTotals.cs rename to Adyen/TerminalApi/Models/PaymentTotals.cs diff --git a/Adyen/Model/TerminalApi/PaymentTransaction.cs b/Adyen/TerminalApi/Models/PaymentTransaction.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentTransaction.cs rename to Adyen/TerminalApi/Models/PaymentTransaction.cs diff --git a/Adyen/Model/TerminalApi/PaymentType.cs b/Adyen/TerminalApi/Models/PaymentType.cs similarity index 100% rename from Adyen/Model/TerminalApi/PaymentType.cs rename to Adyen/TerminalApi/Models/PaymentType.cs diff --git a/Adyen/Model/TerminalApi/PerformedTransaction.cs b/Adyen/TerminalApi/Models/PerformedTransaction.cs similarity index 100% rename from Adyen/Model/TerminalApi/PerformedTransaction.cs rename to Adyen/TerminalApi/Models/PerformedTransaction.cs diff --git a/Adyen/Model/TerminalApi/PeriodUnitType.cs b/Adyen/TerminalApi/Models/PeriodUnitType.cs similarity index 100% rename from Adyen/Model/TerminalApi/PeriodUnitType.cs rename to Adyen/TerminalApi/Models/PeriodUnitType.cs diff --git a/Adyen/Model/TerminalApi/PredefinedContent.cs b/Adyen/TerminalApi/Models/PredefinedContent.cs similarity index 100% rename from Adyen/Model/TerminalApi/PredefinedContent.cs rename to Adyen/TerminalApi/Models/PredefinedContent.cs diff --git a/Adyen/Model/TerminalApi/PrintOutput.cs b/Adyen/TerminalApi/Models/PrintOutput.cs similarity index 100% rename from Adyen/Model/TerminalApi/PrintOutput.cs rename to Adyen/TerminalApi/Models/PrintOutput.cs diff --git a/Adyen/Model/TerminalApi/PrintRequest.cs b/Adyen/TerminalApi/Models/PrintRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/PrintRequest.cs rename to Adyen/TerminalApi/Models/PrintRequest.cs diff --git a/Adyen/Model/TerminalApi/PrintResponse.cs b/Adyen/TerminalApi/Models/PrintResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/PrintResponse.cs rename to Adyen/TerminalApi/Models/PrintResponse.cs diff --git a/Adyen/Model/TerminalApi/PrinterStatusType.cs b/Adyen/TerminalApi/Models/PrinterStatusType.cs similarity index 100% rename from Adyen/Model/TerminalApi/PrinterStatusType.cs rename to Adyen/TerminalApi/Models/PrinterStatusType.cs diff --git a/Adyen/Model/TerminalApi/Rebates.cs b/Adyen/TerminalApi/Models/Rebates.cs similarity index 100% rename from Adyen/Model/TerminalApi/Rebates.cs rename to Adyen/TerminalApi/Models/Rebates.cs diff --git a/Adyen/Model/TerminalApi/RecipientIdentifier.cs b/Adyen/TerminalApi/Models/RecipientIdentifier.cs similarity index 100% rename from Adyen/Model/TerminalApi/RecipientIdentifier.cs rename to Adyen/TerminalApi/Models/RecipientIdentifier.cs diff --git a/Adyen/Model/TerminalApi/ReconciliationRequest.cs b/Adyen/TerminalApi/Models/ReconciliationRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/ReconciliationRequest.cs rename to Adyen/TerminalApi/Models/ReconciliationRequest.cs diff --git a/Adyen/Model/TerminalApi/ReconciliationResponse.cs b/Adyen/TerminalApi/Models/ReconciliationResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/ReconciliationResponse.cs rename to Adyen/TerminalApi/Models/ReconciliationResponse.cs diff --git a/Adyen/Model/TerminalApi/ReconciliationType.cs b/Adyen/TerminalApi/Models/ReconciliationType.cs similarity index 100% rename from Adyen/Model/TerminalApi/ReconciliationType.cs rename to Adyen/TerminalApi/Models/ReconciliationType.cs diff --git a/Adyen/Model/TerminalApi/RelativeDistinguishedName.cs b/Adyen/TerminalApi/Models/RelativeDistinguishedName.cs similarity index 100% rename from Adyen/Model/TerminalApi/RelativeDistinguishedName.cs rename to Adyen/TerminalApi/Models/RelativeDistinguishedName.cs diff --git a/Adyen/Model/TerminalApi/RepeatedMessageResponse.cs b/Adyen/TerminalApi/Models/RepeatedMessageResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/RepeatedMessageResponse.cs rename to Adyen/TerminalApi/Models/RepeatedMessageResponse.cs diff --git a/Adyen/Model/TerminalApi/RepeatedResponseMessageBody.cs b/Adyen/TerminalApi/Models/RepeatedResponseMessageBody.cs similarity index 100% rename from Adyen/Model/TerminalApi/RepeatedResponseMessageBody.cs rename to Adyen/TerminalApi/Models/RepeatedResponseMessageBody.cs diff --git a/Adyen/Model/TerminalApi/Message/SaleToPOIRequest.cs b/Adyen/TerminalApi/Models/Requests/SaleToPOIRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/Message/SaleToPOIRequest.cs rename to Adyen/TerminalApi/Models/Requests/SaleToPOIRequest.cs diff --git a/Adyen/Model/TerminalApi/Message/SaleToPoiRequestSecured.cs b/Adyen/TerminalApi/Models/Requests/SaleToPoiRequestSecured.cs similarity index 100% rename from Adyen/Model/TerminalApi/Message/SaleToPoiRequestSecured.cs rename to Adyen/TerminalApi/Models/Requests/SaleToPoiRequestSecured.cs diff --git a/Adyen/Model/TerminalApi/Message/SaleToPoiResponseSecured.cs b/Adyen/TerminalApi/Models/Requests/SaleToPoiResponseSecured.cs similarity index 100% rename from Adyen/Model/TerminalApi/Message/SaleToPoiResponseSecured.cs rename to Adyen/TerminalApi/Models/Requests/SaleToPoiResponseSecured.cs diff --git a/Adyen/Model/TerminalApi/Response.cs b/Adyen/TerminalApi/Models/Response.cs similarity index 100% rename from Adyen/Model/TerminalApi/Response.cs rename to Adyen/TerminalApi/Models/Response.cs diff --git a/Adyen/Model/TerminalApi/ResponseModeType.cs b/Adyen/TerminalApi/Models/ResponseModeType.cs similarity index 100% rename from Adyen/Model/TerminalApi/ResponseModeType.cs rename to Adyen/TerminalApi/Models/ResponseModeType.cs diff --git a/Adyen/Model/TerminalApi/ResultType.cs b/Adyen/TerminalApi/Models/ResultType.cs similarity index 100% rename from Adyen/Model/TerminalApi/ResultType.cs rename to Adyen/TerminalApi/Models/ResultType.cs diff --git a/Adyen/Model/TerminalApi/ReversalReasonType.cs b/Adyen/TerminalApi/Models/ReversalReasonType.cs similarity index 100% rename from Adyen/Model/TerminalApi/ReversalReasonType.cs rename to Adyen/TerminalApi/Models/ReversalReasonType.cs diff --git a/Adyen/Model/TerminalApi/ReversalRequest.cs b/Adyen/TerminalApi/Models/ReversalRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/ReversalRequest.cs rename to Adyen/TerminalApi/Models/ReversalRequest.cs diff --git a/Adyen/Model/TerminalApi/ReversalResponse.cs b/Adyen/TerminalApi/Models/ReversalResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/ReversalResponse.cs rename to Adyen/TerminalApi/Models/ReversalResponse.cs diff --git a/Adyen/Model/TerminalApi/SaleData.cs b/Adyen/TerminalApi/Models/SaleData.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleData.cs rename to Adyen/TerminalApi/Models/SaleData.cs diff --git a/Adyen/Model/TerminalApi/SaleItem.cs b/Adyen/TerminalApi/Models/SaleItem.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleItem.cs rename to Adyen/TerminalApi/Models/SaleItem.cs diff --git a/Adyen/Model/TerminalApi/SaleItemRebate.cs b/Adyen/TerminalApi/Models/SaleItemRebate.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleItemRebate.cs rename to Adyen/TerminalApi/Models/SaleItemRebate.cs diff --git a/Adyen/Model/TerminalApi/SaleProfile.cs b/Adyen/TerminalApi/Models/SaleProfile.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleProfile.cs rename to Adyen/TerminalApi/Models/SaleProfile.cs diff --git a/Adyen/Model/TerminalApi/SaleSoftware.cs b/Adyen/TerminalApi/Models/SaleSoftware.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleSoftware.cs rename to Adyen/TerminalApi/Models/SaleSoftware.cs diff --git a/Adyen/Model/TerminalApi/SaleTerminalData.cs b/Adyen/TerminalApi/Models/SaleTerminalData.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleTerminalData.cs rename to Adyen/TerminalApi/Models/SaleTerminalData.cs diff --git a/Adyen/Model/Terminal/SaleToAcquirerData.cs b/Adyen/TerminalApi/Models/SaleToAcquirerData.cs similarity index 99% rename from Adyen/Model/Terminal/SaleToAcquirerData.cs rename to Adyen/TerminalApi/Models/SaleToAcquirerData.cs index 160feed02..246b09233 100644 --- a/Adyen/Model/Terminal/SaleToAcquirerData.cs +++ b/Adyen/TerminalApi/Models/SaleToAcquirerData.cs @@ -137,6 +137,7 @@ public override string ToString() sb.Append(" RecurringDetailName: ").Append(RecurringDetailName).Append("\n"); sb.Append(" RecurringTokenService: ").Append(RecurringTokenService).Append("\n"); sb.Append(" Store: ").Append(Store).Append("\n"); + sb.Append(" Ssc: ").Append(Ssc).Append("\n"); sb.Append(" MerchantAccount: ").Append(MerchantAccount).Append("\n"); sb.Append(" Currency: ").Append(Currency).Append("\n"); sb.Append(" ApplicationInfo: ").Append(ApplicationInfo).Append("\n"); diff --git a/Adyen/Model/TerminalApi/SaleToIssuerData.cs b/Adyen/TerminalApi/Models/SaleToIssuerData.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleToIssuerData.cs rename to Adyen/TerminalApi/Models/SaleToIssuerData.cs diff --git a/Adyen/Model/TerminalApi/SaleToPOIMessage.cs b/Adyen/TerminalApi/Models/SaleToPOIMessage.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleToPOIMessage.cs rename to Adyen/TerminalApi/Models/SaleToPOIMessage.cs diff --git a/Adyen/Model/TerminalApi/SaleToPOIResponse.cs b/Adyen/TerminalApi/Models/SaleToPOIResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/SaleToPOIResponse.cs rename to Adyen/TerminalApi/Models/SaleToPOIResponse.cs diff --git a/Adyen/Model/TerminalApi/SensitiveCardData.cs b/Adyen/TerminalApi/Models/SensitiveCardData.cs similarity index 100% rename from Adyen/Model/TerminalApi/SensitiveCardData.cs rename to Adyen/TerminalApi/Models/SensitiveCardData.cs diff --git a/Adyen/Model/TerminalApi/SensitiveMobileData.cs b/Adyen/TerminalApi/Models/SensitiveMobileData.cs similarity index 100% rename from Adyen/Model/TerminalApi/SensitiveMobileData.cs rename to Adyen/TerminalApi/Models/SensitiveMobileData.cs diff --git a/Adyen/Model/TerminalApi/SignaturePoint.cs b/Adyen/TerminalApi/Models/SignaturePoint.cs similarity index 100% rename from Adyen/Model/TerminalApi/SignaturePoint.cs rename to Adyen/TerminalApi/Models/SignaturePoint.cs diff --git a/Adyen/Model/TerminalApi/SignedData.cs b/Adyen/TerminalApi/Models/SignedData.cs similarity index 100% rename from Adyen/Model/TerminalApi/SignedData.cs rename to Adyen/TerminalApi/Models/SignedData.cs diff --git a/Adyen/Model/TerminalApi/Signer.cs b/Adyen/TerminalApi/Models/Signer.cs similarity index 100% rename from Adyen/Model/TerminalApi/Signer.cs rename to Adyen/TerminalApi/Models/Signer.cs diff --git a/Adyen/Model/TerminalApi/SignerIdentifier.cs b/Adyen/TerminalApi/Models/SignerIdentifier.cs similarity index 100% rename from Adyen/Model/TerminalApi/SignerIdentifier.cs rename to Adyen/TerminalApi/Models/SignerIdentifier.cs diff --git a/Adyen/Model/TerminalApi/SoundActionType.cs b/Adyen/TerminalApi/Models/SoundActionType.cs similarity index 100% rename from Adyen/Model/TerminalApi/SoundActionType.cs rename to Adyen/TerminalApi/Models/SoundActionType.cs diff --git a/Adyen/Model/TerminalApi/SoundContent.cs b/Adyen/TerminalApi/Models/SoundContent.cs similarity index 100% rename from Adyen/Model/TerminalApi/SoundContent.cs rename to Adyen/TerminalApi/Models/SoundContent.cs diff --git a/Adyen/Model/TerminalApi/SoundFormatType.cs b/Adyen/TerminalApi/Models/SoundFormatType.cs similarity index 100% rename from Adyen/Model/TerminalApi/SoundFormatType.cs rename to Adyen/TerminalApi/Models/SoundFormatType.cs diff --git a/Adyen/Model/TerminalApi/SoundRequest.cs b/Adyen/TerminalApi/Models/SoundRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/SoundRequest.cs rename to Adyen/TerminalApi/Models/SoundRequest.cs diff --git a/Adyen/Model/TerminalApi/SoundResponse.cs b/Adyen/TerminalApi/Models/SoundResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/SoundResponse.cs rename to Adyen/TerminalApi/Models/SoundResponse.cs diff --git a/Adyen/Model/Terminal/Split.cs b/Adyen/TerminalApi/Models/Split.cs similarity index 100% rename from Adyen/Model/Terminal/Split.cs rename to Adyen/TerminalApi/Models/Split.cs diff --git a/Adyen/Model/Terminal/SplitItem.cs b/Adyen/TerminalApi/Models/SplitItem.cs similarity index 100% rename from Adyen/Model/Terminal/SplitItem.cs rename to Adyen/TerminalApi/Models/SplitItem.cs diff --git a/Adyen/Model/Terminal/SplitItemType.cs b/Adyen/TerminalApi/Models/SplitItemType.cs similarity index 100% rename from Adyen/Model/Terminal/SplitItemType.cs rename to Adyen/TerminalApi/Models/SplitItemType.cs diff --git a/Adyen/Model/TerminalApi/SponsoredMerchant.cs b/Adyen/TerminalApi/Models/SponsoredMerchant.cs similarity index 100% rename from Adyen/Model/TerminalApi/SponsoredMerchant.cs rename to Adyen/TerminalApi/Models/SponsoredMerchant.cs diff --git a/Adyen/Model/TerminalApi/StoredValueAccountID.cs b/Adyen/TerminalApi/Models/StoredValueAccountID.cs similarity index 100% rename from Adyen/Model/TerminalApi/StoredValueAccountID.cs rename to Adyen/TerminalApi/Models/StoredValueAccountID.cs diff --git a/Adyen/Model/TerminalApi/StoredValueAccountStatus.cs b/Adyen/TerminalApi/Models/StoredValueAccountStatus.cs similarity index 100% rename from Adyen/Model/TerminalApi/StoredValueAccountStatus.cs rename to Adyen/TerminalApi/Models/StoredValueAccountStatus.cs diff --git a/Adyen/Model/TerminalApi/StoredValueAccountType.cs b/Adyen/TerminalApi/Models/StoredValueAccountType.cs similarity index 100% rename from Adyen/Model/TerminalApi/StoredValueAccountType.cs rename to Adyen/TerminalApi/Models/StoredValueAccountType.cs diff --git a/Adyen/Model/TerminalApi/StoredValueData.cs b/Adyen/TerminalApi/Models/StoredValueData.cs similarity index 100% rename from Adyen/Model/TerminalApi/StoredValueData.cs rename to Adyen/TerminalApi/Models/StoredValueData.cs diff --git a/Adyen/Model/TerminalApi/StoredValueRequest.cs b/Adyen/TerminalApi/Models/StoredValueRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/StoredValueRequest.cs rename to Adyen/TerminalApi/Models/StoredValueRequest.cs diff --git a/Adyen/Model/TerminalApi/StoredValueResponse.cs b/Adyen/TerminalApi/Models/StoredValueResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/StoredValueResponse.cs rename to Adyen/TerminalApi/Models/StoredValueResponse.cs diff --git a/Adyen/Model/TerminalApi/StoredValueResult.cs b/Adyen/TerminalApi/Models/StoredValueResult.cs similarity index 100% rename from Adyen/Model/TerminalApi/StoredValueResult.cs rename to Adyen/TerminalApi/Models/StoredValueResult.cs diff --git a/Adyen/Model/TerminalApi/StoredValueTransactionType.cs b/Adyen/TerminalApi/Models/StoredValueTransactionType.cs similarity index 100% rename from Adyen/Model/TerminalApi/StoredValueTransactionType.cs rename to Adyen/TerminalApi/Models/StoredValueTransactionType.cs diff --git a/Adyen/Model/TerminalApi/TerminalEnvironmentType.cs b/Adyen/TerminalApi/Models/TerminalEnvironmentType.cs similarity index 100% rename from Adyen/Model/TerminalApi/TerminalEnvironmentType.cs rename to Adyen/TerminalApi/Models/TerminalEnvironmentType.cs diff --git a/Adyen/Model/TerminalApi/TokenRequestedType.cs b/Adyen/TerminalApi/Models/TokenRequestedType.cs similarity index 100% rename from Adyen/Model/TerminalApi/TokenRequestedType.cs rename to Adyen/TerminalApi/Models/TokenRequestedType.cs diff --git a/Adyen/Model/TerminalApi/TotalDetailsType.cs b/Adyen/TerminalApi/Models/TotalDetailsType.cs similarity index 100% rename from Adyen/Model/TerminalApi/TotalDetailsType.cs rename to Adyen/TerminalApi/Models/TotalDetailsType.cs diff --git a/Adyen/Model/TerminalApi/TotalFilter.cs b/Adyen/TerminalApi/Models/TotalFilter.cs similarity index 100% rename from Adyen/Model/TerminalApi/TotalFilter.cs rename to Adyen/TerminalApi/Models/TotalFilter.cs diff --git a/Adyen/Model/TerminalApi/TrackData.cs b/Adyen/TerminalApi/Models/TrackData.cs similarity index 100% rename from Adyen/Model/TerminalApi/TrackData.cs rename to Adyen/TerminalApi/Models/TrackData.cs diff --git a/Adyen/Model/TerminalApi/TrackFormatType.cs b/Adyen/TerminalApi/Models/TrackFormatType.cs similarity index 100% rename from Adyen/Model/TerminalApi/TrackFormatType.cs rename to Adyen/TerminalApi/Models/TrackFormatType.cs diff --git a/Adyen/Model/TerminalApi/TransactionActionType.cs b/Adyen/TerminalApi/Models/TransactionActionType.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransactionActionType.cs rename to Adyen/TerminalApi/Models/TransactionActionType.cs diff --git a/Adyen/Model/TerminalApi/TransactionConditions.cs b/Adyen/TerminalApi/Models/TransactionConditions.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransactionConditions.cs rename to Adyen/TerminalApi/Models/TransactionConditions.cs diff --git a/Adyen/Model/TerminalApi/TransactionIdentification.cs b/Adyen/TerminalApi/Models/TransactionIdentification.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransactionIdentification.cs rename to Adyen/TerminalApi/Models/TransactionIdentification.cs diff --git a/Adyen/Model/TerminalApi/TransactionStatusRequest.cs b/Adyen/TerminalApi/Models/TransactionStatusRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransactionStatusRequest.cs rename to Adyen/TerminalApi/Models/TransactionStatusRequest.cs diff --git a/Adyen/Model/TerminalApi/TransactionStatusResponse.cs b/Adyen/TerminalApi/Models/TransactionStatusResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransactionStatusResponse.cs rename to Adyen/TerminalApi/Models/TransactionStatusResponse.cs diff --git a/Adyen/Model/TerminalApi/TransactionToPerform.cs b/Adyen/TerminalApi/Models/TransactionToPerform.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransactionToPerform.cs rename to Adyen/TerminalApi/Models/TransactionToPerform.cs diff --git a/Adyen/Model/TerminalApi/TransactionTotals.cs b/Adyen/TerminalApi/Models/TransactionTotals.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransactionTotals.cs rename to Adyen/TerminalApi/Models/TransactionTotals.cs diff --git a/Adyen/Model/TerminalApi/TransactionType.cs b/Adyen/TerminalApi/Models/TransactionType.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransactionType.cs rename to Adyen/TerminalApi/Models/TransactionType.cs diff --git a/Adyen/Model/TerminalApi/TransmitRequest.cs b/Adyen/TerminalApi/Models/TransmitRequest.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransmitRequest.cs rename to Adyen/TerminalApi/Models/TransmitRequest.cs diff --git a/Adyen/Model/TerminalApi/TransmitResponse.cs b/Adyen/TerminalApi/Models/TransmitResponse.cs similarity index 100% rename from Adyen/Model/TerminalApi/TransmitResponse.cs rename to Adyen/TerminalApi/Models/TransmitResponse.cs diff --git a/Adyen/Model/TerminalApi/UTMCoordinates.cs b/Adyen/TerminalApi/Models/UTMCoordinates.cs similarity index 100% rename from Adyen/Model/TerminalApi/UTMCoordinates.cs rename to Adyen/TerminalApi/Models/UTMCoordinates.cs diff --git a/Adyen/Model/TerminalApi/UnitOfMeasureType.cs b/Adyen/TerminalApi/Models/UnitOfMeasureType.cs similarity index 100% rename from Adyen/Model/TerminalApi/UnitOfMeasureType.cs rename to Adyen/TerminalApi/Models/UnitOfMeasureType.cs diff --git a/Adyen/Model/TerminalApi/VersionType.cs b/Adyen/TerminalApi/Models/VersionType.cs similarity index 100% rename from Adyen/Model/TerminalApi/VersionType.cs rename to Adyen/TerminalApi/Models/VersionType.cs diff --git a/Adyen/Model/RequestOptions.cs b/Adyen/TerminalApi/RequestOptions.cs similarity index 100% rename from Adyen/Model/RequestOptions.cs rename to Adyen/TerminalApi/RequestOptions.cs diff --git a/Adyen/Security/AesEncryptor.cs b/Adyen/TerminalApi/Security/AesEncryptor.cs similarity index 100% rename from Adyen/Security/AesEncryptor.cs rename to Adyen/TerminalApi/Security/AesEncryptor.cs diff --git a/Adyen/Security/EncryptionCredentialDetails.cs b/Adyen/TerminalApi/Security/EncryptionCredentialDetails.cs similarity index 100% rename from Adyen/Security/EncryptionCredentialDetails.cs rename to Adyen/TerminalApi/Security/EncryptionCredentialDetails.cs diff --git a/Adyen/Security/EncryptionDerivedKey.cs b/Adyen/TerminalApi/Security/EncryptionDerivedKey.cs similarity index 100% rename from Adyen/Security/EncryptionDerivedKey.cs rename to Adyen/TerminalApi/Security/EncryptionDerivedKey.cs diff --git a/Adyen/Security/EncryptionDerivedKeyGenerator.cs b/Adyen/TerminalApi/Security/EncryptionDerivedKeyGenerator.cs similarity index 100% rename from Adyen/Security/EncryptionDerivedKeyGenerator.cs rename to Adyen/TerminalApi/Security/EncryptionDerivedKeyGenerator.cs diff --git a/Adyen/Security/Exceptions/NexoCryptoException.cs b/Adyen/TerminalApi/Security/Exceptions/NexoCryptoException.cs similarity index 100% rename from Adyen/Security/Exceptions/NexoCryptoException.cs rename to Adyen/TerminalApi/Security/Exceptions/NexoCryptoException.cs diff --git a/Adyen/Security/Extension/ArrayExtension.cs b/Adyen/TerminalApi/Security/Extension/ArrayExtension.cs similarity index 100% rename from Adyen/Security/Extension/ArrayExtension.cs rename to Adyen/TerminalApi/Security/Extension/ArrayExtension.cs diff --git a/Adyen/Security/HmacSha256Wrapper.cs b/Adyen/TerminalApi/Security/HmacSha256Wrapper.cs similarity index 100% rename from Adyen/Security/HmacSha256Wrapper.cs rename to Adyen/TerminalApi/Security/HmacSha256Wrapper.cs diff --git a/Adyen/Security/IvModGenerator.cs b/Adyen/TerminalApi/Security/IvModGenerator.cs similarity index 100% rename from Adyen/Security/IvModGenerator.cs rename to Adyen/TerminalApi/Security/IvModGenerator.cs diff --git a/Adyen/Security/SaleToPoiMessageSecured.cs b/Adyen/TerminalApi/Security/SaleToPoiMessageSecured.cs similarity index 100% rename from Adyen/Security/SaleToPoiMessageSecured.cs rename to Adyen/TerminalApi/Security/SaleToPoiMessageSecured.cs diff --git a/Adyen/Security/SaleToPoiMessageSecuredEncryptor.cs b/Adyen/TerminalApi/Security/SaleToPoiMessageSecuredEncryptor.cs similarity index 100% rename from Adyen/Security/SaleToPoiMessageSecuredEncryptor.cs rename to Adyen/TerminalApi/Security/SaleToPoiMessageSecuredEncryptor.cs diff --git a/Adyen/Security/SecurityTrailer.cs b/Adyen/TerminalApi/Security/SecurityTrailer.cs similarity index 100% rename from Adyen/Security/SecurityTrailer.cs rename to Adyen/TerminalApi/Security/SecurityTrailer.cs diff --git a/Adyen/Security/TerminalCommonNameValidator.cs b/Adyen/TerminalApi/Security/TerminalCommonNameValidator.cs similarity index 100% rename from Adyen/Security/TerminalCommonNameValidator.cs rename to Adyen/TerminalApi/Security/TerminalCommonNameValidator.cs diff --git a/Adyen/Service/ServiceResource.cs b/Adyen/TerminalApi/Services/ServiceResource.cs similarity index 97% rename from Adyen/Service/ServiceResource.cs rename to Adyen/TerminalApi/Services/ServiceResource.cs index d5ffc3384..fce890f9a 100644 --- a/Adyen/Service/ServiceResource.cs +++ b/Adyen/TerminalApi/Services/ServiceResource.cs @@ -1,46 +1,46 @@ -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -using Newtonsoft.Json; - -namespace Adyen.Service -{ - public class ServiceResource - { - private readonly AbstractService _abstractService; - protected string Endpoint; - - public ServiceResource(AbstractService abstractService, string endpoint) - { - _abstractService = abstractService; - Endpoint = endpoint; - } - - public string Request(string json, RequestOptions requestOptions = null, HttpMethod httpMethod = null) - { - var clientInterface = _abstractService.Client.HttpClient; - return clientInterface.Request(Endpoint, json, requestOptions, httpMethod); - } - - public T Request(string json, RequestOptions requestOptions = null, HttpMethod httpMethod = null) - { - var clientInterface = _abstractService.Client.HttpClient; - var jsonResponse = clientInterface.Request(Endpoint, json, requestOptions, httpMethod); - return JsonConvert.DeserializeObject(jsonResponse); - } - - public async Task RequestAsync(string json, RequestOptions requestOptions = null, HttpMethod httpMethod = null, CancellationToken cancellationToken = default) - { - var clientInterface = _abstractService.Client.HttpClient; - return await clientInterface.RequestAsync(Endpoint, json, requestOptions, httpMethod, cancellationToken).ConfigureAwait(false); - } - - public async Task RequestAsync(string json, RequestOptions requestOptions = null, HttpMethod httpMethod = null, CancellationToken cancellationToken = default) - { - var clientInterface = _abstractService.Client.HttpClient; - var jsonResponse = await clientInterface.RequestAsync(Endpoint, json, requestOptions, httpMethod, cancellationToken).ConfigureAwait(false); - return JsonConvert.DeserializeObject(jsonResponse); - } - } +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Adyen.Model; +using Newtonsoft.Json; + +namespace Adyen.Service +{ + public class ServiceResource + { + private readonly AbstractService _abstractService; + protected string Endpoint; + + public ServiceResource(AbstractService abstractService, string endpoint) + { + _abstractService = abstractService; + Endpoint = endpoint; + } + + public string Request(string json, RequestOptions requestOptions = null, HttpMethod httpMethod = null) + { + var clientInterface = _abstractService.Client.HttpClient; + return clientInterface.Request(Endpoint, json, requestOptions, httpMethod); + } + + public T Request(string json, RequestOptions requestOptions = null, HttpMethod httpMethod = null) + { + var clientInterface = _abstractService.Client.HttpClient; + var jsonResponse = clientInterface.Request(Endpoint, json, requestOptions, httpMethod); + return JsonConvert.DeserializeObject(jsonResponse); + } + + public async Task RequestAsync(string json, RequestOptions requestOptions = null, HttpMethod httpMethod = null, CancellationToken cancellationToken = default) + { + var clientInterface = _abstractService.Client.HttpClient; + return await clientInterface.RequestAsync(Endpoint, json, requestOptions, httpMethod, cancellationToken).ConfigureAwait(false); + } + + public async Task RequestAsync(string json, RequestOptions requestOptions = null, HttpMethod httpMethod = null, CancellationToken cancellationToken = default) + { + var clientInterface = _abstractService.Client.HttpClient; + var jsonResponse = await clientInterface.RequestAsync(Endpoint, json, requestOptions, httpMethod, cancellationToken).ConfigureAwait(false); + return JsonConvert.DeserializeObject(jsonResponse); + } + } } \ No newline at end of file diff --git a/Adyen/Service/TerminalApiAsyncService.cs b/Adyen/TerminalApi/Services/TerminalApiAsyncService.cs similarity index 100% rename from Adyen/Service/TerminalApiAsyncService.cs rename to Adyen/TerminalApi/Services/TerminalApiAsyncService.cs diff --git a/Adyen/Service/TerminalApiLocalService.cs b/Adyen/TerminalApi/Services/TerminalApiLocalService.cs similarity index 97% rename from Adyen/Service/TerminalApiLocalService.cs rename to Adyen/TerminalApi/Services/TerminalApiLocalService.cs index b21b955a4..b1ce906db 100644 --- a/Adyen/Service/TerminalApiLocalService.cs +++ b/Adyen/TerminalApi/Services/TerminalApiLocalService.cs @@ -38,7 +38,7 @@ public interface ITerminalApiLocalService /// /// Example: /// handler = new HttpClientHandler { ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) => true }; - /// var httpClient = new (, new (handler)); + /// var httpClient = new (, new (handler)); /// var terminalApiLocalService = new (httpClient, , , ); /// /// . @@ -52,7 +52,7 @@ public interface ITerminalApiLocalService /// /// Example: /// handler = new HttpClientHandler { ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) => true }; - /// var httpClient = new (, new (handler)); + /// var httpClient = new (, new (handler)); /// var terminalApiLocalService = new (httpClient, , , ); /// /// . diff --git a/Adyen/Service/TerminalApiSyncService.cs b/Adyen/TerminalApi/Services/TerminalApiSyncService.cs similarity index 100% rename from Adyen/Service/TerminalApiSyncService.cs rename to Adyen/TerminalApi/Services/TerminalApiSyncService.cs diff --git a/Adyen/Service/TerminalCloudApi.cs b/Adyen/TerminalApi/Services/TerminalCloudApi.cs similarity index 100% rename from Adyen/Service/TerminalCloudApi.cs rename to Adyen/TerminalApi/Services/TerminalCloudApi.cs diff --git a/Adyen/Service/TerminalLocalApi.cs b/Adyen/TerminalApi/Services/TerminalLocalApi.cs similarity index 100% rename from Adyen/Service/TerminalLocalApi.cs rename to Adyen/TerminalApi/Services/TerminalLocalApi.cs diff --git a/Adyen/Service/TerminalLocalApiUnencrypted.cs b/Adyen/TerminalApi/Services/TerminalLocalApiUnencrypted.cs similarity index 100% rename from Adyen/Service/TerminalLocalApiUnencrypted.cs rename to Adyen/TerminalApi/Services/TerminalLocalApiUnencrypted.cs diff --git a/Adyen/Util/TerminalApi/AdditionalResponse.cs b/Adyen/TerminalApi/Utilities/AdditionalResponse.cs similarity index 100% rename from Adyen/Util/TerminalApi/AdditionalResponse.cs rename to Adyen/TerminalApi/Utilities/AdditionalResponse.cs diff --git a/Adyen/Util/TerminalApi/CardAcquisitionUtil.cs b/Adyen/TerminalApi/Utilities/CardAcquisitionUtil.cs similarity index 100% rename from Adyen/Util/TerminalApi/CardAcquisitionUtil.cs rename to Adyen/TerminalApi/Utilities/CardAcquisitionUtil.cs diff --git a/Adyen/Util/ByteArrayConverter.cs b/Adyen/Util/ByteArrayConverter.cs deleted file mode 100644 index e10849389..000000000 --- a/Adyen/Util/ByteArrayConverter.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Text; -using Newtonsoft.Json; - -namespace Adyen.Util -{ - internal class ByteArrayConverter : JsonConverter - { - public override bool CanConvert(Type objectType) - { - return objectType == typeof(byte[]); - } - - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if (reader.TokenType == JsonToken.Null) - return null; - return Encoding.UTF8.GetBytes((string)reader.Value); - } - - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - byte[] bytes = (byte[])value; - writer.WriteValue(Encoding.UTF8.GetString(bytes)); - } - - } -} \ No newline at end of file diff --git a/Adyen/Util/HMACValidator.cs b/Adyen/Util/HMACValidator.cs deleted file mode 100644 index b3da7fc34..000000000 --- a/Adyen/Util/HMACValidator.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security.Cryptography; -using System.Text; -using Adyen.Model.Notification; - -namespace Adyen.Util -{ - public class HmacValidator - { - private const string HmacSignature = "hmacSignature"; - - // Computes the Base64 encoded signature using the HMAC algorithm with the HMACSHA256 hashing function. - public string CalculateHmac(string payload, string hmacKey) - { - byte[] key = PackH(hmacKey); - byte[] data = Encoding.UTF8.GetBytes(payload); - - try - { - using (HMACSHA256 hmac = new HMACSHA256(key)) - { - // Compute the hmac on input data bytes - byte[] rawHmac = hmac.ComputeHash(data); - - // Base64-encode the hmac - return Convert.ToBase64String(rawHmac); - } - } - catch (Exception e) - { - throw new Exception("Failed to generate HMAC : " + e.Message); - } - } - - public string CalculateHmac(NotificationRequestItem notificationRequestItem, string hmacKey) - { - var notificationRequestItemData = GetDataToSign(notificationRequestItem); - return CalculateHmac(notificationRequestItemData, hmacKey); - } - - private byte[] PackH(string hex) - { - if ((hex.Length % 2) == 1) - { - hex += '0'; - } - - byte[] bytes = new byte[hex.Length / 2]; - for (int i = 0; i < hex.Length; i += 2) - { - bytes[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16); - } - - return bytes; - } - - public string GetDataToSign(NotificationRequestItem notificationRequestItem) - { - var amount = notificationRequestItem.Amount; - var signedDataList = new List - { - notificationRequestItem.PspReference, - notificationRequestItem.OriginalReference, - notificationRequestItem.MerchantAccountCode, - notificationRequestItem.MerchantReference, - Convert.ToString(amount.Value), - amount.Currency, - notificationRequestItem.EventCode, - notificationRequestItem.Success.ToString().ToLower() - }; - return String.Join(":", signedDataList); - } - - /// - /// Validates a regular webhook with the given . - /// - /// . - /// The HMAC key, retrieved from the Adyen Customer Area. - /// A return value indicates the HMAC validation succeeded. - public bool IsValidHmac(NotificationRequestItem notificationRequestItem, string hmacKey) - { - if (notificationRequestItem.AdditionalData == null) - { - return false; - } - - if (!notificationRequestItem.AdditionalData.ContainsKey(HmacSignature)) - { - return false; - } - var expectedSign = CalculateHmac(notificationRequestItem, hmacKey); - var merchantSign = notificationRequestItem.AdditionalData[HmacSignature]; - return string.Equals(expectedSign, merchantSign); - } - - - /// - /// Validates a balance platform and management webhook payload with the given and . - /// - /// The HMAC signature, retrieved from the request header. - /// The HMAC key, retrieved from the Adyen Customer Area. - /// The webhook payload. - /// A return value indicates the HMAC validation succeeded. - public bool IsValidWebhook(string hmacSignature, string hmacKey, string payload) - { - var calculatedSign = CalculateHmac(payload, hmacKey); - return TimeSafeEquals(Encoding.UTF8.GetBytes(hmacSignature), Encoding.UTF8.GetBytes(calculatedSign)); - } - - /// - /// This method compares two bytestrings in constant time based on length of shortest bytestring to prevent timing attacks. - /// - /// True if different. - private static bool TimeSafeEquals(byte[] a, byte[] b) - { - uint diff = (uint)a.Length ^ (uint)b.Length; - for (int i = 0; i < a.Length && i < b.Length; i++) { diff |= (uint)(a[i] ^ b[i]); } - return diff == 0; - } - } -} - diff --git a/Adyen/Util/JsonOperation.cs b/Adyen/Util/JsonOperation.cs deleted file mode 100644 index cfee35d6f..000000000 --- a/Adyen/Util/JsonOperation.cs +++ /dev/null @@ -1,32 +0,0 @@ -using Newtonsoft.Json; - -namespace Adyen.Util -{ - public class JsonOperation - { - /// - /// Deserialize to an object T - /// - /// - /// - /// - public static T Deserialize(string response) - { - var jsonSettings = new JsonSerializerSettings(); - jsonSettings.Converters.Add(new ByteArrayConverter()); - - return JsonConvert.DeserializeObject(response, jsonSettings); - } - - public static string SerializeRequest(object request) - { - var jsonSettings = new JsonSerializerSettings - { - NullValueHandling = NullValueHandling.Ignore, - DefaultValueHandling = DefaultValueHandling.Include, - }; - jsonSettings.Converters.Add(new ByteArrayConverter()); - return JsonConvert.SerializeObject(request, Formatting.None, jsonSettings); - } - } -} diff --git a/Adyen/Util/Util.cs b/Adyen/Util/Util.cs deleted file mode 100644 index 710fd1a85..000000000 --- a/Adyen/Util/Util.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace Adyen.Util -{ - public class Util - { - public static string CalculateSessionValidity() - { - //+1day - var dateTime=DateTime.Now.AddDays(1); - return String.Format("{0:s}", dateTime); - - } - } -} diff --git a/Adyen/Webhooks/BalancePlatformWebhookHandler.cs b/Adyen/Webhooks/BalancePlatformWebhookHandler.cs deleted file mode 100644 index c8c2cdd52..000000000 --- a/Adyen/Webhooks/BalancePlatformWebhookHandler.cs +++ /dev/null @@ -1,256 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Runtime.Serialization; -using Adyen.Model.AcsWebhooks; -using Adyen.Model.ReportWebhooks; -using Adyen.Model.ConfigurationWebhooks; -using Adyen.Model.NegativeBalanceWarningWebhooks; -using Adyen.Model.TransactionWebhooks; -using Adyen.Model.TransferWebhooks; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Adyen.Webhooks -{ - public class BalancePlatformWebhookHandler - { - /// - /// Deserializes to a generic banking webhook from the . Use this either to catch the - /// webhook type if unknown or if the explicit type is not required. - /// - /// The json payload of the webhook. - /// The parsed webhook packaged in a dynamic object. - /// Throws when json is invalid. - public dynamic GetGenericBalancePlatformWebhook(string jsonPayload) - { - if (GetAuthenticationNotificationRequest(jsonPayload, out AuthenticationNotificationRequest authenticationNotificationRequest)) - { - return authenticationNotificationRequest; - } - - if (GetAccountHolderNotificationRequest(jsonPayload, out AccountHolderNotificationRequest accountHolderNotificationRequest)) - { - return accountHolderNotificationRequest; - } - - if (GetBalanceAccountNotificationRequest(jsonPayload, out BalanceAccountNotificationRequest balanceAccountNotificationRequest)) - { - return balanceAccountNotificationRequest; - } - - if (GetCardOrderNotificationRequest(jsonPayload, out CardOrderNotificationRequest cardOrderNotificationRequest)) - { - return cardOrderNotificationRequest; - } - - if (GetNegativeBalanceCompensationWarningNotificationRequest(jsonPayload, out NegativeBalanceCompensationWarningNotificationRequest negativeBalanceCompensationWarningNotificationRequest)) - { - return negativeBalanceCompensationWarningNotificationRequest; - } - - if (GetPaymentNotificationRequest(jsonPayload, out PaymentNotificationRequest paymentNotificationRequest)) - { - return paymentNotificationRequest; - } - - if (GetSweepConfigurationNotificationRequest(jsonPayload, out SweepConfigurationNotificationRequest sweepConfigurationNotificationRequest)) - { - return sweepConfigurationNotificationRequest; - } - - if (GetReportNotificationRequest(jsonPayload, out ReportNotificationRequest reportNotificationRequest)) - { - return reportNotificationRequest; - } - if (GetTransferNotificationRequest(jsonPayload, out TransferNotificationRequest transferNotificationRequest)) - { - return transferNotificationRequest; - } - if (GetTransactionNotificationRequestV4(jsonPayload, out TransactionNotificationRequestV4 transactionNotificationRequestV4)) - { - return transactionNotificationRequestV4; - } - throw new JsonReaderException("Could not parse webhook"); - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAuthenticationNotificationRequest(string jsonPayload, out AuthenticationNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountHolderNotificationRequest(string jsonPayload, out AccountHolderNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetBalanceAccountNotificationRequest(string jsonPayload, out BalanceAccountNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetCardOrderNotificationRequest(string jsonPayload, out CardOrderNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetPaymentNotificationRequest(string jsonPayload, out PaymentNotificationRequest result) // This class-name is confusing as it's referring to a paymentInstrument -> Rename to PaymentInstrumentNotificationRequest? - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetSweepConfigurationNotificationRequest(string jsonPayload, out SweepConfigurationNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook.> - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetReportNotificationRequest(string jsonPayload, out ReportNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetTransferNotificationRequest(string jsonPayload, out TransferNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetTransactionNotificationRequestV4(string jsonPayload, out TransactionNotificationRequestV4 result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetNegativeBalanceCompensationWarningNotificationRequest(string jsonPayload, out NegativeBalanceCompensationWarningNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Check if the JSON pyload contains TypeEnum value. - /// - /// The string JSON payload. - /// The TypeEnum of the class. - /// True if the enum is present. - private static bool ContainsValue(string jsonPayload) where T : struct, IConvertible - { - // Retrieve type from payload - JToken typeToken = JObject.Parse(jsonPayload).GetValue("type"); - string type = typeToken?.Value(); - - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T) - .GetTypeInfo() - .DeclaredMembers; - - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - list.Add(val); - } - - return list.Contains(type); - } - } -} diff --git a/Adyen/Webhooks/ClassicPlatformWebhookHandler.cs b/Adyen/Webhooks/ClassicPlatformWebhookHandler.cs deleted file mode 100644 index f488adab7..000000000 --- a/Adyen/Webhooks/ClassicPlatformWebhookHandler.cs +++ /dev/null @@ -1,386 +0,0 @@ -using Adyen.Model.PlatformsWebhooks; -using Newtonsoft.Json; - -namespace Adyen.Webhooks -{ - public class ClassicPlatformWebhookHandler - { - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountCreateNotification(string jsonPayload, out AccountCreateNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_CREATED".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountCloseNotification(string jsonPayload, out AccountCloseNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_CLOSED".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountFundsBelowThresholdNotification(string jsonPayload, out AccountFundsBelowThresholdNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_FUNDS_BELOW_THRESHOLD".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountHolderCreateNotification(string jsonPayload, out AccountHolderCreateNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_HOLDER_CREATED".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountHolderPayoutNotification(string jsonPayload, out AccountHolderPayoutNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_HOLDER_PAYOUT".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountHolderStatusChangeNotification(string jsonPayload, out AccountHolderStatusChangeNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_HOLDER_STATUS_CHANGE".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountHolderUpcomingDeadlineNotification(string jsonPayload, out AccountHolderUpcomingDeadlineNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_HOLDER_UPCOMING_DEADLINE".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountHolderUpdateNotification(string jsonPayload, out AccountHolderUpdateNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_HOLDER_UPDATED".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountHolderVerificationNotification(string jsonPayload, out AccountHolderVerificationNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_HOLDER_VERIFICATION".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetAccountUpdateNotification(string jsonPayload, out AccountUpdateNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "ACCOUNT_UPDATED".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetBeneficiarySetupNotification(string jsonPayload, out BeneficiarySetupNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "BENEFICIARY_SETUP".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetCompensateNegativeBalanceNotification(string jsonPayload, out CompensateNegativeBalanceNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "COMPENSATE_NEGATIVE_BALANCE".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetDirectDebitInitiatedNotification(string jsonPayload, out DirectDebitInitiatedNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "DIRECT_DEBIT_INITIATED".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetPaymentFailureNotification(string jsonPayload, out PaymentFailureNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "PAYMENT_FAILURE".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetRefundFundsTransferNotification(string jsonPayload, out RefundFundsTransferNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "REFUND_FUNDS_TRANSFER".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetReportAvailableNotification(string jsonPayload, out ReportAvailableNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "REPORT_AVAILABLE".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetScheduledRefundsNotification(string jsonPayload, out ScheduledRefundsNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "SCHEDULED_REFUNDS".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetTransferFundsNotification(string jsonPayload, out TransferFundsNotification result) - { - result = null; - try - { - result = JsonConvert.DeserializeObject(jsonPayload); - return "TRANSFER_FUNDS".Equals(result.EventType); - } - catch (JsonSerializationException) - { - return false; - } - } - } -} \ No newline at end of file diff --git a/Adyen/Webhooks/ManagementWebhookHandler.cs b/Adyen/Webhooks/ManagementWebhookHandler.cs deleted file mode 100644 index fbc8b1ee8..000000000 --- a/Adyen/Webhooks/ManagementWebhookHandler.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Adyen.Model.ManagementWebhooks; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; - -namespace Adyen.Webhooks -{ - public class ManagementWebhookHandler - { - /// - /// Deserializes to a generic management webhook from the . Use this either to catch the - /// webhook type if unknown or if the explicit type is not required. - /// - /// The json payload of the webhook. - /// The parsed webhook packaged in a dynamic object. - /// Throws when json is invalid. - public dynamic GetGenericManagementWebhook(string jsonPayload) - { - if (GetMerchantCreatedNotificationRequest(jsonPayload, out var merchantCreatedNotificationRequest)) - { - return merchantCreatedNotificationRequest; - } - - if (GetMerchantUpdatedNotificationRequest(jsonPayload, out var merchantUpdatedNotificationRequest)) - { - return merchantUpdatedNotificationRequest; - } - - if (GetPaymentMethodCreatedNotificationRequest(jsonPayload, out var paymentMethodCreatedNotificationRequest)) - { - return paymentMethodCreatedNotificationRequest; - } - - if (GetPaymentMethodRequestRemovedNotificationRequest(jsonPayload, out var PaymentMethodRequestRemovedNotificationRequest)) - { - return PaymentMethodRequestRemovedNotificationRequest; - } - - if (GetPaymentMethodScheduledForRemovalNotificationRequest(jsonPayload, out var PaymentMethodScheduledForRemovalNotificationRequest)) - { - return PaymentMethodScheduledForRemovalNotificationRequest; - } - - throw new JsonReaderException("Could not parse webhook"); - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetMerchantCreatedNotificationRequest(string jsonPayload, out MerchantCreatedNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetMerchantUpdatedNotificationRequest(string jsonPayload, out MerchantUpdatedNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetPaymentMethodCreatedNotificationRequest(string jsonPayload, out PaymentMethodCreatedNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetPaymentMethodRequestRemovedNotificationRequest(string jsonPayload, out PaymentMethodRequestRemovedNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - /// - /// Deserializes from the . - /// - /// The json payload of the webhook. - /// . - /// A return value indicates whether the deserialization succeeded. - /// Throws when json is invalid. - public bool GetPaymentMethodScheduledForRemovalNotificationRequest(string jsonPayload, out PaymentMethodScheduledForRemovalNotificationRequest result) - { - result = null; - if (!ContainsValue(jsonPayload)) return false; - result = JsonConvert.DeserializeObject(jsonPayload); - return true; - } - - // Check if the contains TypeEnum value - private static bool ContainsValue(string jsonPayload) where T : struct, IConvertible - { - // Retrieve type from payload - JToken typeToken = JObject.Parse(jsonPayload).GetValue("type"); - string type = typeToken?.Value(); - - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T) - .GetTypeInfo() - .DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - list.Add(val); - } - - return list.Contains(type); - } - } -} \ No newline at end of file diff --git a/Adyen/Webhooks/WebhookHandler.cs b/Adyen/Webhooks/WebhookHandler.cs deleted file mode 100644 index 690c3cbff..000000000 --- a/Adyen/Webhooks/WebhookHandler.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Adyen.Model.Notification; -using Adyen.Util; - -namespace Adyen.Webhooks -{ - public class WebhookHandler - { - public NotificationRequest HandleNotificationRequest(string jsonRequest) - { - return JsonOperation.Deserialize(jsonRequest); - } - } -} diff --git a/templates-v7/csharp/AssemblyInfo.mustache b/templates-v7/csharp/AssemblyInfo.mustache new file mode 100644 index 000000000..d5d937dc1 --- /dev/null +++ b/templates-v7/csharp/AssemblyInfo.mustache @@ -0,0 +1,40 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("{{packageTitle}}")] +[assembly: AssemblyDescription("{{packageDescription}}")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("{{packageCompany}}")] +[assembly: AssemblyProduct("{{packageProductName}}")] +[assembly: AssemblyCopyright("{{packageCopyright}}")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("{{packageVersion}}")] +[assembly: AssemblyFileVersion("{{packageVersion}}")] +{{^supportsAsync}} +// Settings which don't support asynchronous operations rely on non-public constructors +// This is due to how RestSharp requires the type constraint `where T : new()` in places it probably shouldn't. +[assembly: InternalsVisibleTo("RestSharp")] +[assembly: InternalsVisibleTo("NewtonSoft.Json")] +[assembly: InternalsVisibleTo("JsonSubTypes")] +{{/supportsAsync}} diff --git a/templates-v7/csharp/NullConditionalParameter.mustache b/templates-v7/csharp/NullConditionalParameter.mustache new file mode 100644 index 000000000..d8ad92666 --- /dev/null +++ b/templates-v7/csharp/NullConditionalParameter.mustache @@ -0,0 +1 @@ +{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}{{/isNullable}} \ No newline at end of file diff --git a/templates-v7/csharp/NullConditionalProperty.mustache b/templates-v7/csharp/NullConditionalProperty.mustache new file mode 100644 index 000000000..7dcafa803 --- /dev/null +++ b/templates-v7/csharp/NullConditionalProperty.mustache @@ -0,0 +1 @@ +{{#lambda.first}}{{#isNullable}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} \ No newline at end of file diff --git a/templates-v7/csharp/OpenAPIDateConverter.mustache b/templates-v7/csharp/OpenAPIDateConverter.mustache new file mode 100644 index 000000000..d79051025 --- /dev/null +++ b/templates-v7/csharp/OpenAPIDateConverter.mustache @@ -0,0 +1,21 @@ +{{>partial_header}} +using Newtonsoft.Json.Converters; + +namespace {{packageName}}.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateConverter : IsoDateTimeConverter + { + /// + /// Initializes a new instance of the class. + /// + public OpenAPIDateConverter() + { + // full-date = date-fullyear "-" date-month "-" date-mday + DateTimeFormat = "yyyy-MM-dd"; + } + } +} diff --git a/templates-v7/csharp/ValidateRegex.mustache b/templates-v7/csharp/ValidateRegex.mustache new file mode 100644 index 000000000..d05be8a97 --- /dev/null +++ b/templates-v7/csharp/ValidateRegex.mustache @@ -0,0 +1,6 @@ +// {{{name}}} ({{{dataType}}}) pattern. +Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); +if (!regex{{{name}}}.Match(this.{{{name}}}{{#isUuid}}.ToString(){{/isUuid}}).Success) +{ + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); +} \ No newline at end of file diff --git a/templates-v7/csharp/auth/OAuthAuthenticator.mustache b/templates-v7/csharp/auth/OAuthAuthenticator.mustache new file mode 100644 index 000000000..4a2a3fa85 --- /dev/null +++ b/templates-v7/csharp/auth/OAuthAuthenticator.mustache @@ -0,0 +1,136 @@ +{{>partial_header}} + +using System; +using System.Threading.Tasks; +using Newtonsoft.Json; +using RestSharp; +using RestSharp.Authenticators; + +namespace {{packageName}}.{{clientPackage}}.Auth +{ + /// + /// An authenticator for OAuth2 authentication flows + /// + public class OAuthAuthenticator : IAuthenticator + { + private TokenResponse{{nrt?}} _token; + + /// + /// Returns the current authentication token. Can return null if there is no authentication token, or it has expired. + /// + public string{{nrt?}} Token + { + get + { + if (_token == null) return null; + if (_token.ExpiresIn == null) return _token.AccessToken; + if (_token.ExpiresAt < DateTime.Now) return null; + + return _token.AccessToken; + } + } + + readonly string _tokenUrl; + readonly string _clientId; + readonly string _clientSecret; + readonly string{{nrt?}} _scope; + readonly string _grantType; + readonly JsonSerializerSettings _serializerSettings; + readonly IReadableConfiguration _configuration; + + /// + /// Initialize the OAuth2 Authenticator + /// + public OAuthAuthenticator( + string tokenUrl, + string clientId, + string clientSecret, + string{{nrt?}} scope, + OAuthFlow? flow, + JsonSerializerSettings serializerSettings, + IReadableConfiguration configuration) + { + _tokenUrl = tokenUrl; + _clientId = clientId; + _clientSecret = clientSecret; + _scope = scope; + _serializerSettings = serializerSettings; + _configuration = configuration; + + switch (flow) + { + /*case OAuthFlow.ACCESS_CODE: + _grantType = "authorization_code"; + break; + case OAuthFlow.IMPLICIT: + _grantType = "implicit"; + break; + case OAuthFlow.PASSWORD: + _grantType = "password"; + break;*/ + case OAuthFlow.APPLICATION: + _grantType = "client_credentials"; + break; + default: + break; + } + } + + /// + /// Creates an authentication parameter from an access token. + /// + /// An authentication parameter. + protected async ValueTask GetAuthenticationParameter() + { + var token = string.IsNullOrEmpty(Token) ? await GetToken().ConfigureAwait(false) : Token; + return new HeaderParameter(KnownHeaders.Authorization, token); + } + + /// + /// Gets the token from the OAuth2 server. + /// + /// An authentication token. + async Task GetToken() + { + var client = new RestClient(_tokenUrl, configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(_serializerSettings, _configuration))); + + var request = new RestRequest(); + if (!string.IsNullOrWhiteSpace(_token?.RefreshToken)) + { + request.AddParameter("grant_type", "refresh_token") + .AddParameter("refresh_token", _token.RefreshToken); + } + else + { + request + .AddParameter("grant_type", _grantType) + .AddParameter("client_id", _clientId) + .AddParameter("client_secret", _clientSecret); + } + if (!string.IsNullOrEmpty(_scope)) + { + request.AddParameter("scope", _scope); + } + _token = await client.PostAsync(request).ConfigureAwait(false); + // RFC6749 - token_type is case insensitive. + // RFC6750 - In Authorization header Bearer should be capitalized. + // Fix the capitalization irrespective of token_type casing. + switch (_token?.TokenType?.ToLower()) + { + case "bearer": + return $"Bearer {_token.AccessToken}"; + default: + return $"{_token?.TokenType} {_token?.AccessToken}"; + } + } + + /// + /// Retrieves the authentication token (creating a new one if necessary) and adds it to the current request + /// + /// + /// + /// + public async ValueTask Authenticate(IRestClient client, RestRequest request) + => request.AddOrUpdateParameter(await GetAuthenticationParameter().ConfigureAwait(false)); + } +} diff --git a/templates-v7/csharp/auth/OAuthFlow.mustache b/templates-v7/csharp/auth/OAuthFlow.mustache new file mode 100644 index 000000000..0578a2d16 --- /dev/null +++ b/templates-v7/csharp/auth/OAuthFlow.mustache @@ -0,0 +1,19 @@ +{{>partial_header}} + +namespace {{packageName}}.{{clientPackage}}.Auth +{ + /// + /// Available flows for OAuth2 authentication + /// + public enum OAuthFlow + { + /// Authorization code flow + ACCESS_CODE, + /// Implicit flow + IMPLICIT, + /// Password flow + PASSWORD, + /// Client credentials flow + APPLICATION + } +} \ No newline at end of file diff --git a/templates-v7/csharp/auth/TokenResponse.mustache b/templates-v7/csharp/auth/TokenResponse.mustache new file mode 100644 index 000000000..fc90d0c51 --- /dev/null +++ b/templates-v7/csharp/auth/TokenResponse.mustache @@ -0,0 +1,24 @@ +{{>partial_header}} + +using System; +using Newtonsoft.Json; + +namespace {{packageName}}.{{clientPackage}}.Auth +{ + class TokenResponse + { + [JsonProperty("token_type")] + public string TokenType { get; set; } + [JsonProperty("access_token")] + public string AccessToken { get; set; } + [JsonProperty("expires_in")] + public int? ExpiresIn { get; set; } + [JsonProperty("created")] + public DateTime? Created { get; set; } + + [JsonProperty("refresh_token")] + public string{{nrt?}} RefreshToken { get; set; } + + public DateTime? ExpiresAt => ExpiresIn == null ? null : Created?.AddSeconds(ExpiresIn.Value); + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/ApiException.mustache b/templates-v7/csharp/libraries/generichost/ApiException.mustache new file mode 100644 index 000000000..df9992b69 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ApiException.mustache @@ -0,0 +1,47 @@ +// +{{>partial_header}} + +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; + +namespace {{packageName}}.{{corePackageName}}.{{clientPackage}} +{ + /// + /// API Exception + /// + {{>visibility}} class ApiException : Exception + { + /// + /// The reason the api request failed + /// + public string{{nrt?}} ReasonPhrase { get; } + + /// + /// The HttpStatusCode + /// + public System.Net.HttpStatusCode StatusCode { get; } + + /// + /// The raw data returned by the api + /// + public string RawContent { get; } + + /// + /// Construct the ApiException from parts of the response + /// + /// + /// + /// + public ApiException(string{{nrt?}} reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent) : base(reasonPhrase ?? rawContent) + { + ReasonPhrase = reasonPhrase; + + StatusCode = statusCode; + + RawContent = rawContent; + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/ApiFactory.mustache b/templates-v7/csharp/libraries/generichost/ApiFactory.mustache new file mode 100644 index 000000000..873c8b355 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ApiFactory.mustache @@ -0,0 +1,48 @@ +using System; +using Microsoft.Extensions.DependencyInjection; + +namespace {{packageName}}.{{corePackageName}}.{{clientPackage}} +{ + /// + /// The factory interface for creating the services that can communicate with the {{packageName}} APIs. + /// + {{>visibility}} interface {{interfacePrefix}}ApiFactory + { + /// + /// A method to create an IApi of type IResult + /// + /// + /// + IResult Create() where IResult : {{interfacePrefix}}{{packageName}}ApiService; + } + + /// + /// The implementation of . + /// + {{>visibility}} class ApiFactory : {{interfacePrefix}}ApiFactory + { + /// + /// The service provider + /// + public IServiceProvider Services { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiFactory(IServiceProvider services) + { + Services = services; + } + + /// + /// A method to create an IApi of type IResult + /// + /// + /// + public IResult Create() where IResult : {{interfacePrefix}}{{packageName}}ApiService + { + return Services.GetRequiredService(); + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/ApiKeyToken.mustache b/templates-v7/csharp/libraries/generichost/ApiKeyToken.mustache new file mode 100644 index 000000000..efc32707b --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ApiKeyToken.mustache @@ -0,0 +1,53 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using {{packageName}}.{{corePackageName}}.Auth; +using {{packageName}}.{{corePackageName}}.{{clientPackage}}; + +namespace {{packageName}}.{{apiName}}.{{clientPackage}} +{ + /// + /// The `ADYEN_API_KEY` is an Adyen API authentication token that must be included in the HTTP request header and allows your application to securely communicate with the Adyen APIs. + /// Guide on how to obtain the `ADYEN_API_KEY` + /// 1. For Digital/ECOM & In-Person Payments, visit: https://docs.adyen.com/development-resources/api-credentials/#generate-api-key to get your API Key. + /// 2. For Platforms & Financial Services, visit: https://docs.adyen.com/adyen-for-platforms-model to get started. + /// + {{>visibility}} class ApiKeyToken : TokenBase + { + /// + /// The `ADYEN_API_KEY`. + /// + private readonly string _apiKeyValue; + + /// + /// The name of the header. + /// + public ClientUtils.ApiKeyHeader Header { get; } + + /// + /// Constructs the ApiKeyToken object with the API key value provided. + /// This can then be accessed using . + /// + /// Your Adyen API Key value. + /// The header name, retrieved from + /// Your prefix, default: empty. + public ApiKeyToken(string value, ClientUtils.ApiKeyHeader header, string prefix = "") : base() + { + Header = header; + _apiKeyValue = $"{prefix}{value}"; + } + + /// + /// Adds the token the HttpRequestMessage headers. + /// + /// . + public virtual void AddTokenToHttpRequestMessageHeader(global::System.Net.Http.HttpRequestMessage request) + { + request.Headers.Add(ClientUtils.ApiKeyHeaderToString(Header), _apiKeyValue); + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/ApiResponseEventArgs.mustache b/templates-v7/csharp/libraries/generichost/ApiResponseEventArgs.mustache new file mode 100644 index 000000000..a3de3f0d0 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ApiResponseEventArgs.mustache @@ -0,0 +1,24 @@ +using System; + +namespace {{packageName}}.{{corePackageName}}.{{clientPackage}} +{ + /// + /// Useful for tracking server health + /// + {{>visibility}} class ApiResponseEventArgs : EventArgs + { + /// + /// The ApiResponse. + /// + public ApiResponse ApiResponse { get; } + + /// + /// The ApiResponseEventArgs. + /// + /// + public ApiResponseEventArgs(ApiResponse apiResponse) + { + ApiResponse = apiResponse; + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/ApiResponse`1.mustache b/templates-v7/csharp/libraries/generichost/ApiResponse`1.mustache new file mode 100644 index 000000000..b78cbf1f4 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ApiResponse`1.mustache @@ -0,0 +1,202 @@ +// +{{#nrt}} +#nullable enable +{{/nrt}} +using System; +{{^netStandard}} +using System.Diagnostics.CodeAnalysis; +{{/netStandard}} +using System.Net; + +namespace {{packageName}}.{{corePackageName}}.{{clientPackage}} +{ + /// + /// Provides a non-generic contract for the ApiResponse wrapper. + /// + {{>visibility}} partial interface IApiResponse + { + /// + /// The IsSuccessStatusCode from the api response + /// + bool IsSuccessStatusCode { get; } + + /// + /// Gets the status code (HTTP status code) + /// + /// The status code. + HttpStatusCode StatusCode { get; } + + /// + /// The raw content of this response. + /// + string RawContent { get; } + + /// + /// The raw binary stream (only set for binary responses) + /// + System.IO.Stream{{nrt?}} ContentStream { get; } + + /// + /// The DateTime when the request was retrieved. + /// + DateTime DownloadedAt { get; } + + /// + /// The headers contained in the api response + /// + System.Net.Http.Headers.HttpResponseHeaders Headers { get; } + + /// + /// The path used when making the request. + /// + string Path { get; } + + /// + /// The reason phrase contained in the api response + /// + string{{nrt?}} ReasonPhrase { get; } + + /// + /// The DateTime when the request was sent. + /// + DateTime RequestedAt { get; } + + /// + /// The Uri used when making the request. + /// + Uri{{nrt?}} RequestUri { get; } + } + + /// + /// API Response + /// + {{>visibility}} partial class ApiResponse : IApiResponse + { + /// + /// Gets the status code (HTTP status code). + /// + /// The status code. + public HttpStatusCode StatusCode { get; } + + /// + /// The raw data. + /// + public string RawContent { get; protected set; } + + /// + /// The raw binary stream (only set for binary responses). + /// + public System.IO.Stream{{nrt?}} ContentStream { get; protected set; } + + /// + /// The IsSuccessStatusCode from the api response. + /// + public bool IsSuccessStatusCode { get; } + + /// + /// The reason phrase contained in the api response. + /// + public string{{nrt?}} ReasonPhrase { get; } + + /// + /// The headers contained in the api response. + /// + public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } + + /// + /// The DateTime when the request was retrieved. + /// + public DateTime DownloadedAt { get; } = DateTime.UtcNow; + + /// + /// The DateTime when the request was sent. + /// + public DateTime RequestedAt { get; } + + /// + /// The path used when making the request. + /// + public string Path { get; } + + /// + /// The Uri used when making the request. + /// + public Uri{{nrt?}} RequestUri { get; } + + /// + /// The + /// + protected System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + /// + /// Construct the response using an HttpResponseMessage + /// + /// . + /// . + /// The raw data. + /// The path used when making the request. + /// The DateTime.UtcNow when the request was retrieved. + /// + public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) + { + StatusCode = httpResponseMessage.StatusCode; + Headers = httpResponseMessage.Headers; + IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; + ReasonPhrase = httpResponseMessage.ReasonPhrase; + RawContent = rawContent; + Path = path; + RequestUri = httpRequestMessage.RequestUri; + RequestedAt = requestedAt; + _jsonSerializerOptions = jsonSerializerOptions; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + /// + /// Construct the response using an HttpResponseMessage. + /// + /// . + /// . + /// The raw binary stream (only set for binary responses). + /// The path used when making the request. + /// The DateTime.UtcNow when the request was retrieved. + /// + public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, System.IO.Stream contentStream, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) + { + StatusCode = httpResponseMessage.StatusCode; + Headers = httpResponseMessage.Headers; + IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; + ReasonPhrase = httpResponseMessage.ReasonPhrase; + ContentStream = contentStream; + RawContent = string.Empty; + Path = path; + RequestUri = httpRequestMessage.RequestUri; + RequestedAt = requestedAt; + _jsonSerializerOptions = jsonSerializerOptions; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + } + {{#x-http-statuses-with-return}} + + /// + /// An interface for responses of type {{TType}}. + /// + /// + {{>visibility}} interface I{{.}} : IApiResponse + { + /// + /// Deserializes the response if the response is {{.}}. + /// + /// + TType {{.}}(); + + /// + /// Returns true if the response is {{.}} and the deserialized response is not null. + /// + /// + /// + bool TryDeserialize{{.}}Response({{#net60OrLater}}[NotNullWhen(true)]{{/net60OrLater}}out TType{{nrt?}} result); + } + {{/x-http-statuses-with-return}} +} diff --git a/templates-v7/csharp/libraries/generichost/ApiTestsBase.mustache b/templates-v7/csharp/libraries/generichost/ApiTestsBase.mustache new file mode 100644 index 000000000..789de490e --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ApiTestsBase.mustache @@ -0,0 +1,66 @@ +{{>partial_header}} +using System; +using System.Collections.Generic; +using System.Security.Cryptography; +using Microsoft.Extensions.Hosting; +using {{packageName}}.{{clientPackage}};{{#hasImport}} +using {{packageName}}.{{modelPackage}};{{/hasImport}} +using {{packageName}}.Extensions; + + +{{>testInstructions}} + + + +namespace {{packageName}}.Test.{{apiPackage}} +{ + /// + /// Base class for API tests + /// + public class ApiTestsBase + { + protected readonly IHost _host; + + public ApiTestsBase(string[] args) + { + _host = CreateHostBuilder(args).Build(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) + .Configure{{apiName}}((context, services, options) => + { + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + string apiKeyTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}(apiKeyTokenValue{{-index}}, ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + string bearerTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}(bearerTokenValue{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + string basicTokenUsername{{-index}} = context.Configuration[""] ?? throw new Exception("Username not found."); + string basicTokenPassword{{-index}} = context.Configuration[""] ?? throw new Exception("Password not found."); + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}(basicTokenUsername{{-index}}, basicTokenPassword{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, new List(), HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + string oauthTokenValue{{-index}} = context.Configuration[""] ?? throw new Exception("Token not found."); + OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}(oauthTokenValue{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken{{-index}}); + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} + }); + } +} diff --git a/templates-v7/csharp/libraries/generichost/AsModel.mustache b/templates-v7/csharp/libraries/generichost/AsModel.mustache new file mode 100644 index 000000000..f98d3ad57 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/AsModel.mustache @@ -0,0 +1,3 @@ +return Is{{vendorExtensions.x-http-status}} + ? {{#isBinary}}ContentStream{{/isBinary}}{{^isBinary}}System.Text.Json.JsonSerializer.Deserialize<{{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}>(RawContent, _jsonSerializerOptions){{/isBinary}} + : {{#net60OrLater}}null{{/net60OrLater}}{{^net60OrLater}}default{{/net60OrLater}}; diff --git a/templates-v7/csharp/libraries/generichost/BearerToken.mustache b/templates-v7/csharp/libraries/generichost/BearerToken.mustache new file mode 100644 index 000000000..1dd463bcd --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/BearerToken.mustache @@ -0,0 +1,41 @@ +\// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A token constructed from a token from a bearer token. + /// + {{>visibility}} class BearerToken : TokenBase + { + private string _raw; + + /// + /// Constructs a BearerToken object. + /// + /// + /// + public BearerToken(string value, TimeSpan? timeout = null) : base(timeout) + { + _raw = value; + } + + /// + /// Places the token in the header. + /// + /// + /// + public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string headerName) + { + request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw); + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/ClientUtils.mustache b/templates-v7/csharp/libraries/generichost/ClientUtils.mustache new file mode 100644 index 000000000..c11ae8da7 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ClientUtils.mustache @@ -0,0 +1,385 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.IO; +using System.Linq; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using System.Text.RegularExpressions;{{#useCompareNetObjects}} +using KellermanSoftware.CompareNetObjects;{{/useCompareNetObjects}} +using {{packageName}}; +using {{packageName}}.{{corePackageName}}.Options; +{{#models}} +{{#-first}} +using {{packageName}}.{{modelPackage}}; +{{/-first}} +{{/models}} +using Models = {{packageName}}.{{modelPackage}}; +using System.Runtime.CompilerServices; + +namespace {{packageName}}.{{apiName}}.{{clientPackage}} +{ + /// + /// Utility functions providing some benefit to API client consumers. + /// + {{>visibility}} static {{#net70OrLater}}partial {{/net70OrLater}}class ClientUtils + { + {{#useCompareNetObjects}} + /// + /// An instance of CompareLogic. + /// + public static CompareLogic compareLogic; + + /// + /// Static constructor to initialise compareLogic. + /// + static ClientUtils() + { + {{#equatable}} + ComparisonConfig comparisonConfig = new{{^net70OrLater}} ComparisonConfig{{/net70OrLater}}(); + comparisonConfig.UseHashCodeIdentifier = true; + {{/equatable}} + compareLogic = new{{^net70OrLater}} CompareLogic{{/net70OrLater}}({{#equatable}}comparisonConfig{{/equatable}}); + } + {{/useCompareNetObjects}} + /// + /// A delegate for events. + /// + /// + /// + /// + /// + public delegate void EventHandler(object sender, T e) where T : EventArgs; + + /// + /// Returns true when deserialization succeeds. + /// + /// + /// + /// + /// + /// + public static bool TryDeserialize(string json, JsonSerializerOptions options, {{#net60OrLater}}[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result) + { + try + { + result = JsonSerializer.Deserialize(json, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; + } + } + + /// + /// Returns true when deserialization succeeds. + /// + /// + /// + /// + /// + /// + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, {{#net60OrLater}}[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] {{/net60OrLater}}out T{{#nrt}}{{#net60OrLater}}?{{/net60OrLater}}{{/nrt}} result) + { + try + { + result = JsonSerializer.Deserialize(ref reader, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; + } + } + + /// + /// The format to use for DateTime serialization. + /// + public const string ISO8601_DATETIME_FORMAT = "o"; + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// The DateTime serialization format. + /// Formatted string. + public static string{{nrt?}} ParameterToString(object{{nrt?}} obj, string{{nrt?}} format = ISO8601_DATETIME_FORMAT) + { + if (obj is DateTime dateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTime.ToString(format); + if (obj is DateTimeOffset dateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTimeOffset.ToString(format); + {{#net60OrLater}} + if (obj is DateOnly dateOnly) + return dateOnly.ToString(format); + {{/net60OrLater}} + if (obj is bool boolean) + return boolean ? "true" : "false"; + {{#models}} + {{#model}} + {{#isEnum}} + if (obj is Models.{{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}) + {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} + return {{classname}}ValueConverter{{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; + {{/isEnum}} + {{^isEnum}} + {{#vars}} + {{#items.isEnum}} + {{#items}} + {{^complexType}} + if (obj is Models.{{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}) + {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} + return {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; + {{/complexType}} + {{/items}} + {{/items.isEnum}} + {{#isEnum}} + {{^complexType}} + if (obj is Models.{{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}) + {{! below has #isNumeric as a work around but should probably have ^isString instead https://github.com/OpenAPITools/openapi-generator/issues/15038}} + return Models.{{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{{datatypeWithEnum}}}{{/lambda.camelcase_sanitize_param}}){{#isNumeric}}.ToString(){{/isNumeric}}; + {{/complexType}} + {{/isEnum}} + {{/vars}} + {{/isEnum}} + {{/model}} + {{/models}} + if (obj is ICollection collection) + { + List entries = new{{^net70OrLater}} List{{/net70OrLater}}(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry)); + return string.Join(",", entries); + } + + return Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture); + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// string to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + + /// + /// Encode string in base64 format. + /// + /// string to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Convert stream to byte array + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream inputStream) + { + using (var ms = new MemoryStream()) + { + inputStream.CopyTo(ms); + return ms.ToArray(); + } + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON type exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public static string{{nrt?}} SelectHeaderContentType(string[] contentTypes) + { + if (contentTypes.Length == 0) + return null; + + foreach (var contentType in contentTypes) + { + if (IsJsonMime(contentType)) + return contentType; + } + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// Select the Accept header's value from the given accepts array: + /// if JSON exists in the given array, use it; + /// otherwise use all of them (joining into a string) + /// + /// The accepts array to select from. + /// The Accept header to use. + public static string{{nrt?}} SelectHeaderAccept(string[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return string.Join(",", accepts); + } + + /// + /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. + /// + {{#net70OrLater}} + [GeneratedRegex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$")] + private static partial Regex JsonRegex(); + {{/net70OrLater}} + {{^net70OrLater}} + private static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + {{/net70OrLater}} + + /// + /// Check if the given MIME is a JSON MIME. + /// JSON MIME examples: + /// application/json + /// application/json; charset=UTF8 + /// APPLICATION/JSON + /// application/vnd.company+json + /// + /// MIME + /// Returns True if MIME type is json. + public static bool IsJsonMime(string mime) + { + if (string.IsNullOrWhiteSpace(mime)) return false; + + return {{#net70OrLater}}JsonRegex(){{/net70OrLater}}{{^net70OrLater}}JsonRegex{{/net70OrLater}}.IsMatch(mime) || mime.Equals("application/json-patch+json"); + } + + /// + /// Get the discriminator + /// + /// + /// + /// + /// + public static string{{nrt?}} GetDiscriminator(Utf8JsonReader utf8JsonReader, string discriminator) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string{{nrt?}} jsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + if (jsonPropertyName != null && jsonPropertyName.Equals(discriminator)) + return utf8JsonReader.GetString(); + } + } + + throw new JsonException("The specified discriminator was not found."); + } + + {{#hasApiKeyMethods}} + /// + /// An enum of headers. + /// + public enum ApiKeyHeader + { + {{#apiKeyMethods}} + /// + /// The {{keyParamName}} header. + /// + {{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}{{^-last}},{{/-last}} + {{/apiKeyMethods}} + } + + /// + /// Converts an ApiKeyHeader to a string. + /// + /// + /// as a string value. + /// + {{>visibility}} static string ApiKeyHeaderToString(ApiKeyHeader value) + { + {{#net80OrLater}} + return value switch + { + {{#apiKeyMethods}} + ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}} => "{{keyParamName}}", + {{/apiKeyMethods}} + _ => throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)), + }; + {{/net80OrLater}} + {{^net80OrLater}} + switch(value) + { + {{#apiKeyMethods}} + case ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}: + return "{{keyParamName}}"; + {{/apiKeyMethods}} + default: + throw new System.ComponentModel.InvalidEnumArgumentException(nameof(value), (int)value, typeof(ApiKeyHeader)); + } + {{/net80OrLater}} + } + + {{/hasApiKeyMethods}} + } +} diff --git a/templates-v7/csharp/libraries/generichost/CookieContainer.mustache b/templates-v7/csharp/libraries/generichost/CookieContainer.mustache new file mode 100644 index 000000000..f96d4fb41 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/CookieContainer.mustache @@ -0,0 +1,22 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System.Linq; +using System.Collections.Generic; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A class containing a CookieContainer + /// + {{>visibility}} sealed class CookieContainer + { + /// + /// The collection of tokens + /// + public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/DateFormats.mustache b/templates-v7/csharp/libraries/generichost/DateFormats.mustache new file mode 100644 index 000000000..920ecda88 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/DateFormats.mustache @@ -0,0 +1,2 @@ + "yyyy'-'MM'-'dd", + "yyyyMMdd" diff --git a/templates-v7/csharp/libraries/generichost/DateOnlyJsonConverter.mustache b/templates-v7/csharp/libraries/generichost/DateOnlyJsonConverter.mustache new file mode 100644 index 000000000..1441421aa --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/DateOnlyJsonConverter.mustache @@ -0,0 +1,52 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateOnlyJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { +{{>DateFormats}} + + }; + + /// + /// Returns a DateOnly from the Json object + /// + /// + /// + /// + /// + public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in Formats) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateOnly to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateOnly dateOnlyValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateOnlyValue.ToString("{{{dateFormat}}}", CultureInfo.InvariantCulture)); + } +} diff --git a/templates-v7/csharp/libraries/generichost/DateOnlyNullableJsonConverter.mustache b/templates-v7/csharp/libraries/generichost/DateOnlyNullableJsonConverter.mustache new file mode 100644 index 000000000..53fdfbee7 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/DateOnlyNullableJsonConverter.mustache @@ -0,0 +1,57 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateOnlyNullableJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { +{{>DateFormats}} + + }; + + /// + /// Returns a DateOnly from the Json object + /// + /// + /// + /// + /// + public override DateOnly? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in Formats) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateOnly to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateOnly? dateOnlyValue, JsonSerializerOptions options) + { + if (dateOnlyValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateOnlyValue.Value.ToString("{{{dateFormat}}}", CultureInfo.InvariantCulture)); + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/DateTimeFormats.mustache b/templates-v7/csharp/libraries/generichost/DateTimeFormats.mustache new file mode 100644 index 000000000..85ed99a2c --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/DateTimeFormats.mustache @@ -0,0 +1,22 @@ + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + {{^supportsDateOnly}} + "yyyy'-'MM'-'dd", + {{/supportsDateOnly}} + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + {{^supportsDateOnly}} + "yyyyMMdd" + {{/supportsDateOnly}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/DateTimeJsonConverter.mustache b/templates-v7/csharp/libraries/generichost/DateTimeJsonConverter.mustache new file mode 100644 index 000000000..bf5059fca --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/DateTimeJsonConverter.mustache @@ -0,0 +1,52 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for {{#supportsDateOnly}}'date-time'{{/supportsDateOnly}}{{^supportsDateOnly}}'date' and 'date-time'{{/supportsDateOnly}} openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateTimeJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { +{{>DateTimeFormats}} + + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in Formats) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString("{{{dateTimeFormat}}}", CultureInfo.InvariantCulture)); + } +} diff --git a/templates-v7/csharp/libraries/generichost/DateTimeNullableJsonConverter.mustache b/templates-v7/csharp/libraries/generichost/DateTimeNullableJsonConverter.mustache new file mode 100644 index 000000000..bbc036490 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/DateTimeNullableJsonConverter.mustache @@ -0,0 +1,57 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for {{#supportsDateOnly}}'date-time'{{/supportsDateOnly}}{{^supportsDateOnly}}'date' and 'date-time'{{/supportsDateOnly}} openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateTimeNullableJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { +{{>DateTimeFormats}} + + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in Formats) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + return null; + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) + { + if (dateTimeValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateTimeValue.Value.ToString("{{{dateTimeFormat}}}", CultureInfo.InvariantCulture)); + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/DependencyInjectionTests.mustache b/templates-v7/csharp/libraries/generichost/DependencyInjectionTests.mustache new file mode 100644 index 000000000..6085b51e5 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/DependencyInjectionTests.mustache @@ -0,0 +1,211 @@ +{{>partial_header}} +using System; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; +using System.Collections.Generic; +using System.Security.Cryptography; +using {{packageName}}.{{clientPackage}}; +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.Extensions; +using Xunit; + +namespace {{packageName}}.Test.{{apiPackage}} +{ + /// + /// Tests the dependency injection. + /// + public class DependencyInjectionTest + { + private readonly IHost _hostUsingConfigureWithoutAClient = + Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).Configure{{apiName}}((context, services, options) => + { + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken{{-index}}); + + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} + }) + .Build(); + + private readonly IHost _hostUsingConfigureWithAClient = + Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).Configure{{apiName}}((context, services, options) => + { + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + OAuthToken oauthToken = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken); + + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} + options.Add{{apiName}}HttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS)); + }) + .Build(); + + private readonly IHost _hostUsingAddWithoutAClient = + Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).ConfigureServices((host, services) => + { + services.Add{{apiName}}(options => + { + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken{{-index}}); + + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} + }); + }) + .Build(); + + private readonly IHost _hostUsingAddWithAClient = + Host.CreateDefaultBuilder({{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}Array.Empty(){{/net80OrLater}}).ConfigureServices((host, services) => + { + services.Add{{apiName}}(options => + { + {{#lambda.trimTrailingWithNewLine}} + {{#apiKeyMethods}} + ApiKeyToken apiKeyToken{{-index}} = new{{^net70OrLater}} ApiKeyToken{{/net70OrLater}}("", ClientUtils.ApiKeyHeader.{{#lambda.titlecase}}{{#lambda.alphabet_or_underscore}}{{keyParamName}}{{/lambda.alphabet_or_underscore}}{{/lambda.titlecase}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(apiKeyToken{{-index}}); + + {{/apiKeyMethods}} + {{#httpBearerMethods}} + BearerToken bearerToken{{-index}} = new{{^net70OrLater}} BearerToken{{/net70OrLater}}("", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(bearerToken{{-index}}); + + {{/httpBearerMethods}} + {{#httpBasicMethods}} + BasicToken basicToken{{-index}} = new{{^net70OrLater}} BasicToken{{/net70OrLater}}("", "", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(basicToken{{-index}}); + + {{/httpBasicMethods}} + {{#httpSignatureMethods}} + HttpSigningConfiguration config{{-index}} = new{{^net70OrLater}} HttpSigningConfiguration{{/net70OrLater}}("", "", null, {{#net80OrLater}}[]{{/net80OrLater}}{{^net80OrLater}}new List(){{/net80OrLater}}, HashAlgorithmName.SHA256, "", 0); + HttpSignatureToken httpSignatureToken{{-index}} = new{{^net70OrLater}} HttpSignatureToken{{/net70OrLater}}(config{{-index}}, timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(httpSignatureToken{{-index}}); + + {{/httpSignatureMethods}} + {{#oauthMethods}} + OAuthToken oauthToken{{-index}} = new{{^net70OrLater}} OAuthToken{{/net70OrLater}}("token", timeout: TimeSpan.FromSeconds(1)); + options.AddTokens(oauthToken{{-index}}); + + {{/oauthMethods}} + {{/lambda.trimTrailingWithNewLine}} + options.Add{{apiName}}HttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS)); + }); + }) + .Build(); + + /// + /// Test dependency injection when using the configure method + /// + [Fact] + public void ConfigureApiWithAClientTest() + { + {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} + + {{/-last}}{{/apis}}{{/apiInfo}} + } + + /// + /// Test dependency injection when using the configure method + /// + [Fact] + public void ConfigureApiWithoutAClientTest() + { + {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} + + {{/-last}}{{/apis}}{{/apiInfo}} + } + + /// + /// Test dependency injection when using the add method + /// + [Fact] + public void AddApiWithAClientTest() + { + {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} + + {{/-last}}{{/apis}}{{/apiInfo}} + } + + /// + /// Test dependency injection when using the add method + /// + [Fact] + public void AddApiWithoutAClientTest() + { + {{#apiInfo}}{{#apis}}var {{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + Assert.True({{#lambda.camel_case}}{{classname}}{{/lambda.camel_case}}.HttpClient.BaseAddress != null);{{^-last}} + + {{/-last}}{{/apis}}{{/apiInfo}} + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/EnumValueDataType.mustache b/templates-v7/csharp/libraries/generichost/EnumValueDataType.mustache new file mode 100644 index 000000000..e92e67b36 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/EnumValueDataType.mustache @@ -0,0 +1 @@ +{{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}{{^isNumeric}}string{{/isNumeric}}{{/isString}}{{#isNumeric}}{{#isLong}}long{{/isLong}}{{#isFloat}}float{{/isFloat}}{{#isDouble}}double{{/isDouble}}{{#isDecimal}}decimal{{/isDecimal}}{{^isLong}}{{^isFloat}}{{^isDouble}}{{^isDecimal}}int{{/isDecimal}}{{/isDouble}}{{/isFloat}}{{/isLong}}{{/isNumeric}}{{/-first}}{{/enumVars}}{{/allowableValues}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/ExceptionEventArgs.mustache b/templates-v7/csharp/libraries/generichost/ExceptionEventArgs.mustache new file mode 100644 index 000000000..b74fcfa0a --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ExceptionEventArgs.mustache @@ -0,0 +1,24 @@ +using System; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Useful for tracking server health + /// + {{>visibility}} class ExceptionEventArgs : EventArgs + { + /// + /// The ApiResponse + /// + public Exception Exception { get; } + + /// + /// The ExceptionEventArgs + /// + /// + public ExceptionEventArgs(Exception exception) + { + Exception = exception; + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/HmacKeyToken.mustache b/templates-v7/csharp/libraries/generichost/HmacKeyToken.mustache new file mode 100644 index 000000000..8a24aecef --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/HmacKeyToken.mustache @@ -0,0 +1,36 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using {{packageName}}.{{corePackageName}}.Auth; +using {{packageName}}.{{corePackageName}}.{{clientPackage}}; + +namespace {{packageName}}.{{apiName}}.{{clientPackage}} +{ + /// + /// The `ADYEN_HMAC_KEY` is used to verify the incoming HMAC signature from incoming webhooks. + /// To protect your server from unauthorised webhook events, Adyen recommends that you use Hash-based message authentication code HMAC signatures for our webhooks. + /// Each webhook event will include a signature calculated using a secret `ADYEN_HMAC_KEY` key and the payload from the webhook. + /// By verifying this signature, you confirm that the webhook was sent by Adyen, and was not modified during transmission. + /// + {{>visibility}} class HmacKeyToken : TokenBase + { + /// + /// The `ADYEN_HMAC_KEY`, can be configured in . + /// + public string? AdyenHmacKey { get; } + + /// + /// Constructs the HmacKeyToken object with the ADYEN_HMAC_KEY value provided. + /// This can then be accessed using . + /// + /// Your `ADYEN_HMAC_KEY`, configured in . + public HmacKeyToken(string hmacKey) : base() + { + AdyenHmacKey = hmacKey; + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/HostConfiguration.mustache b/templates-v7/csharp/libraries/generichost/HostConfiguration.mustache new file mode 100644 index 000000000..b1387180c --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/HostConfiguration.mustache @@ -0,0 +1,178 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.{{apiPackage}}; +using {{packageName}}.{{apiName}}.{{clientPackage}}; +{{#models}} +{{#-first}} +using {{packageName}}.{{modelPackage}}; +{{/-first}} +{{/models}} +using {{packageName}}.{{corePackageName}}; +using {{packageName}}.{{corePackageName}}.Auth; +using {{packageName}}.{{corePackageName}}.Client; +using {{packageName}}.{{corePackageName}}.Options; +using {{packageName}}.{{corePackageName}}.Converters; + +namespace {{packageName}}.{{apiName}}.{{clientPackage}} +{ + /// + /// Provides hosting configuration for {{apiName}} + /// + {{>visibility}} class HostConfiguration + { + private readonly IServiceCollection _services; + private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + private readonly AdyenOptions _adyenOptions = new AdyenOptions(); + + /// + /// The base path of the API, it includes the http(s)-scheme, the host domain name, and the base path. + /// This value can change when `ConfigureAdyenOptions` is called in ). The new value will be based on the .. + /// + public static string BASE_URL = "{{{basePath}}}"; + + /// + /// Instantiates the HostConfiguration (custom JsonConverters, Events, HttpClient) with the necessary dependencies to communicate with the API. + /// + /// + public HostConfiguration(IServiceCollection services) + { + _services = services; + if (_jsonOptions.Converters.FirstOrDefault(x => x.GetType() == typeof(JsonStringEnumConverter)) == null) + _jsonOptions.Converters.Add(new JsonStringEnumConverter()); + if (_jsonOptions.Converters.FirstOrDefault(x => x.GetType() == typeof(DateTimeJsonConverter)) == null) + _jsonOptions.Converters.Add(new DateTimeJsonConverter()); + if (_jsonOptions.Converters.FirstOrDefault(x => x.GetType() == typeof(DateTimeNullableJsonConverter)) == null) + _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); + if (_jsonOptions.Converters.FirstOrDefault(x => x.GetType() == typeof(ByteArrayConverter)) == null) + _jsonOptions.Converters.Add(new ByteArrayConverter()); + {{#supportsDateOnly}} + if (_jsonOptions.Converters.FirstOrDefault(x => x.GetType() == typeof(DateOnlyJsonConverter)) == null) + _jsonOptions.Converters.Add(new DateOnlyJsonConverter()); + if (_jsonOptions.Converters.FirstOrDefault(x => x.GetType() == typeof(DateOnlyNullableJsonConverter)) == null) + _jsonOptions.Converters.Add(new DateOnlyNullableJsonConverter()); + {{/supportsDateOnly}} + {{#models}} + {{#model}} + {{#isEnum}} + _jsonOptions.Converters.Add(new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter()); + _jsonOptions.Converters.Add(new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableJsonConverter()); + {{/isEnum}} + {{^isEnum}} + _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); + {{/isEnum}} + {{/model}} + {{/models}} + JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new{{^net60OrLater}} JsonSerializerOptionsProvider{{/net60OrLater}}(_jsonOptions); + _services.AddSingleton(jsonSerializerOptionsProvider); + {{#useSourceGeneration}} + + {{#models}} + {{#-first}} + _jsonOptions.TypeInfoResolver = System.Text.Json.Serialization.Metadata.JsonTypeInfoResolver.Combine( + {{/-first}} + {{/models}} + {{#lambda.joinLinesWithComma}} + {{#models}} + {{#model}} + new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}SerializationContext(){{#-last}},{{/-last}} + {{/model}} + {{/models}} + {{/lambda.joinLinesWithComma}} + {{#models}} + {{#-last}} + + new System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver() + ); + {{/-last}} + {{/models}} + + {{/useSourceGeneration}} + _services.AddSingleton<{{interfacePrefix}}ApiFactory, ApiFactory>();{{#apiInfo}}{{#apis}} + _services.AddSingleton<{{classname}}Events>();{{/apis}}{{/apiInfo}} + } + + /// + /// Configures the and . + /// + /// Configures the . + /// Configures the . + /// . + public HostConfiguration Add{{apiName}}HttpClients(Action{{nrt?}} httpClientOptions = null, Action{{nrt?}} httpClientBuilderOptions = null) + { + Action httpClientAction = httpClient => + { + // Configure HttpClient set by the user. + httpClientOptions?.Invoke(httpClient); + + // Set BaseAddress if it's not set. + if (httpClient.BaseAddress == null) + httpClient.BaseAddress = new Uri(UrlBuilderExtensions.ConstructHostUrl(_adyenOptions, BASE_URL)); + }; + + List builders = new List(); + + {{#models}} + {{#model.vendorExtensions.x-has-at-least-one-webhook-root}} + _services.AddSingleton<{{packageName}}.{{apiName}}.Handlers.{{interfacePrefix}}{{apiName}}Handler, {{packageName}}.{{apiName}}.Handlers.{{apiName}}Handler>(); + {{/model.vendorExtensions.x-has-at-least-one-webhook-root}} + {{/models}} + {{#apiInfo}}{{#apis}}builders.Add(_services.AddHttpClient<{{interfacePrefix}}{{classname}}, {{classname}}>(httpClientAction)); + {{/apis}}{{/apiInfo}} + if (httpClientBuilderOptions != null) + foreach (IHttpClientBuilder builder in builders) + httpClientBuilderOptions(builder); + + return this; + } + + /// + /// Configures the . + /// + /// Configures the . + /// . + public HostConfiguration ConfigureJsonOptions(Action jsonSerializerOptions) + { + jsonSerializerOptions(_jsonOptions); + + return this; + } + + /// + /// Configures the (e.g. Environment, LiveEndpointPrefix). + /// + /// Configures the . + /// . + public HostConfiguration ConfigureAdyenOptions(Action adyenOptions) + { + adyenOptions(_adyenOptions); + {{#hasApiKeyMethods}} + _services.AddSingleton>( + new TokenProvider( + new ApiKeyToken(_adyenOptions.AdyenApiKey, ClientUtils.ApiKeyHeader.X_API_Key, "") + ) + ); + {{/hasApiKeyMethods}} + + {{#models}} + {{#model.vendorExtensions.x-has-at-least-one-webhook-root}} + _services.AddSingleton>( + new TokenProvider( + new HmacKeyToken(_adyenOptions.AdyenHmacKey) + ) + ); + {{/model.vendorExtensions.x-has-at-least-one-webhook-root}} + {{/models}} + return this; + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/HttpSigningConfiguration.mustache b/templates-v7/csharp/libraries/generichost/HttpSigningConfiguration.mustache new file mode 100644 index 000000000..8b69a8c0b --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/HttpSigningConfiguration.mustache @@ -0,0 +1,679 @@ +// +{{>partial_header}} + +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; +using System.Security; +using System.Security.Cryptography; +using System.Text; +using System.Web; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Class for HttpSigning auth related parameter and methods + /// + {{>visibility}} class HttpSigningConfiguration + { + /// + /// Create an instance + /// + public HttpSigningConfiguration(string keyId, string keyFilePath, SecureString{{nrt?}} keyPassPhrase, List httpSigningHeader, HashAlgorithmName hashAlgorithm, string signingAlgorithm, int signatureValidityPeriod) + { + KeyId = keyId; + KeyFilePath = keyFilePath; + KeyPassPhrase = keyPassPhrase; + HttpSigningHeader = httpSigningHeader; + HashAlgorithm = hashAlgorithm; + SigningAlgorithm = signingAlgorithm; + SignatureValidityPeriod = signatureValidityPeriod; + } + + /// + ///Gets the Api keyId + /// + public string KeyId { get; set; } + + /// + /// Gets the Key file path + /// + public string KeyFilePath { get; set; } + + /// + /// Gets the key pass phrase for password protected key + /// + public SecureString{{nrt?}} KeyPassPhrase { get; set; } + + /// + /// Gets the HTTP signing header + /// + public List HttpSigningHeader { get; set; } + + /// + /// Gets the hash algorithm sha256 or sha512 + /// + public HashAlgorithmName HashAlgorithm { get; set; } = HashAlgorithmName.SHA256; + + /// + /// Gets the signing algorithm + /// + public string SigningAlgorithm { get; set; } + + /// + /// Gets the Signature validity period in seconds + /// + public int SignatureValidityPeriod { get; set; } + + private enum PrivateKeyType + { + None = 0, + RSA = 1, + ECDSA = 2, + } + + /// + /// Gets the Headers for HttpSigning + /// + /// + /// + /// + internal Dictionary GetHttpSignedHeader(global::System.Net.Http.HttpRequestMessage request, string requestBody, System.Threading.CancellationToken cancellationToken = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}) + { + if (request.RequestUri == null) + throw new NullReferenceException("The request URI was null"); + + const string HEADER_REQUEST_TARGET = "(request-target)"; + + // The time when the HTTP signature expires. The API server should reject HTTP requests that have expired. + const string HEADER_EXPIRES = "(expires)"; + + //The 'Date' header. + const string HEADER_DATE = "Date"; + + //The 'Host' header. + const string HEADER_HOST = "Host"; + + //The time when the HTTP signature was generated. + const string HEADER_CREATED = "(created)"; + + //When the 'Digest' header is included in the HTTP signature, the client automatically + //computes the digest of the HTTP request body, per RFC 3230. + const string HEADER_DIGEST = "Digest"; + + //The 'Authorization' header is automatically generated by the client. It includes + //the list of signed headers and a base64-encoded signature. + const string HEADER_AUTHORIZATION = "Authorization"; + + //Hash table to store singed headers + var HttpSignedRequestHeader = new Dictionary(); + + var httpSignatureHeader = new Dictionary(); + + if (HttpSigningHeader.Count == 0) + HttpSigningHeader.Add("(created)"); + + var dateTime = DateTime.Now; + string digest = String.Empty; + + if (HashAlgorithm == HashAlgorithmName.SHA256) + { + var bodyDigest = GetStringHash(HashAlgorithm, requestBody); + digest = string.Format("SHA-256={0}", Convert.ToBase64String(bodyDigest)); + } + else if (HashAlgorithm == HashAlgorithmName.SHA512) + { + var bodyDigest = GetStringHash(HashAlgorithm, requestBody); + digest = string.Format("SHA-512={0}", Convert.ToBase64String(bodyDigest)); + } + else + throw new Exception(string.Format("{0} not supported", HashAlgorithm)); + + foreach (var header in HttpSigningHeader) + if (header.Equals(HEADER_REQUEST_TARGET)) + httpSignatureHeader.Add(header.ToLower(), request.RequestUri.ToString()); + else if (header.Equals(HEADER_EXPIRES)) + { + var expireDateTime = dateTime.AddSeconds(SignatureValidityPeriod); + httpSignatureHeader.Add(header.ToLower(), GetUnixTime(expireDateTime).ToString()); + } + else if (header.Equals(HEADER_DATE)) + { + var utcDateTime = dateTime.ToString("r").ToString(); + httpSignatureHeader.Add(header.ToLower(), utcDateTime); + HttpSignedRequestHeader.Add(HEADER_DATE, utcDateTime); + } + else if (header.Equals(HEADER_HOST)) + { + httpSignatureHeader.Add(header.ToLower(), request.RequestUri.ToString()); + HttpSignedRequestHeader.Add(HEADER_HOST, request.RequestUri.ToString()); + } + else if (header.Equals(HEADER_CREATED)) + httpSignatureHeader.Add(header.ToLower(), GetUnixTime(dateTime).ToString()); + else if (header.Equals(HEADER_DIGEST)) + { + HttpSignedRequestHeader.Add(HEADER_DIGEST, digest); + httpSignatureHeader.Add(header.ToLower(), digest); + } + else + { + bool isHeaderFound = false; + foreach (var item in request.Headers) + { + if (string.Equals(item.Key, header, StringComparison.OrdinalIgnoreCase)) + { + httpSignatureHeader.Add(header.ToLower(), item.Value.ToString()); + isHeaderFound = true; + break; + } + } + + if (!isHeaderFound) + throw new Exception(string.Format("Cannot sign HTTP request.Request does not contain the {0} header.",header)); + } + + var headersKeysString = String.Join(" ", httpSignatureHeader.Keys); + var headerValuesList = new List(); + + foreach (var keyVal in httpSignatureHeader) + headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); + + //Concatenate headers value separated by new line + var headerValuesString = string.Join("\n", headerValuesList); + var signatureStringHash = GetStringHash(HashAlgorithm, headerValuesString); + string{{nrt?}} headerSignatureStr = null; + var keyType = GetKeyType(KeyFilePath); + + if (keyType == PrivateKeyType.RSA) + headerSignatureStr = GetRSASignature(signatureStringHash); + + else if (keyType == PrivateKeyType.ECDSA) + headerSignatureStr = GetECDSASignature(signatureStringHash); + + var cryptographicScheme = "hs2019"; + var authorizationHeaderValue = string.Format("Signature keyId=\"{0}\",algorithm=\"{1}\"", + KeyId, cryptographicScheme); + + if (httpSignatureHeader.ContainsKey(HEADER_CREATED)) + authorizationHeaderValue += string.Format(",created={0}", httpSignatureHeader[HEADER_CREATED]); + + if (httpSignatureHeader.ContainsKey(HEADER_EXPIRES)) + authorizationHeaderValue += string.Format(",expires={0}", httpSignatureHeader[HEADER_EXPIRES]); + + authorizationHeaderValue += string.Format(",headers=\"{0}\",signature=\"{1}\"", headersKeysString, headerSignatureStr); + + HttpSignedRequestHeader.Add(HEADER_AUTHORIZATION, authorizationHeaderValue); + + return HttpSignedRequestHeader; + } + + private byte[] GetStringHash(HashAlgorithmName hashAlgorithmName, string stringToBeHashed) + { + HashAlgorithm{{nrt?}} hashAlgorithm = null; + + if (hashAlgorithmName == HashAlgorithmName.SHA1) + hashAlgorithm = SHA1.Create(); + + if (hashAlgorithmName == HashAlgorithmName.SHA256) + hashAlgorithm = SHA256.Create(); + + if (hashAlgorithmName == HashAlgorithmName.SHA512) + hashAlgorithm = SHA512.Create(); + + if (hashAlgorithmName == HashAlgorithmName.MD5) + hashAlgorithm = MD5.Create(); + + if (hashAlgorithm == null) + throw new NullReferenceException($"{ nameof(hashAlgorithm) } was null."); + + byte[] bytes = Encoding.UTF8.GetBytes(stringToBeHashed); + byte[] stringHash = hashAlgorithm.ComputeHash(bytes); + return stringHash; + } + + private int GetUnixTime(DateTime date2) + { + DateTime date1 = new DateTime(1970, 01, 01); + TimeSpan timeSpan = date2 - date1; + return (int)timeSpan.TotalSeconds; + } + + private string GetRSASignature(byte[] stringToSign) + { + if (KeyPassPhrase == null) + throw new NullReferenceException($"{ nameof(KeyPassPhrase) } was null."); + + RSA{{nrt?}} rsa = GetRSAProviderFromPemFile(KeyFilePath, KeyPassPhrase); + + if (rsa == null) + return string.Empty; + else if (SigningAlgorithm == "RSASSA-PSS") + { + var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pss); + return Convert.ToBase64String(signedbytes); + } + else if (SigningAlgorithm == "PKCS1-v15") + { + var signedbytes = rsa.SignHash(stringToSign, HashAlgorithm, RSASignaturePadding.Pkcs1); + return Convert.ToBase64String(signedbytes); + } + + return string.Empty; + } + + /// + /// Gets the ECDSA signature + /// + /// + /// + private string GetECDSASignature(byte[] dataToSign) + { + {{#net60OrLater}} + if (!File.Exists(KeyFilePath)) + throw new Exception("key file path does not exist."); + + var ecKeyHeader = "-----BEGIN EC PRIVATE KEY-----"; + var ecKeyFooter = "-----END EC PRIVATE KEY-----"; + var keyStr = File.ReadAllText(KeyFilePath); + var ecKeyBase64String = keyStr.Replace(ecKeyHeader, "").Replace(ecKeyFooter, "").Trim(); + var keyBytes = System.Convert.FromBase64String(ecKeyBase64String); + var ecdsa = ECDsa.Create(); + + var byteCount = 0; + if (KeyPassPhrase != null) + { + IntPtr unmanagedString = IntPtr.Zero; + try + { + // convert secure string to byte array + unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(KeyPassPhrase); + + string ptrToStringUni = Marshal.PtrToStringUni(unmanagedString) ?? throw new NullReferenceException(); + + ecdsa.ImportEncryptedPkcs8PrivateKey(Encoding.UTF8.GetBytes(ptrToStringUni), keyBytes, out byteCount); + } + finally + { + if (unmanagedString != IntPtr.Zero) + Marshal.ZeroFreeBSTR(unmanagedString); + } + } + else + ecdsa.ImportPkcs8PrivateKey(keyBytes, out byteCount); + + var signedBytes = ecdsa.SignHash(dataToSign); + var derBytes = ConvertToECDSAANS1Format(signedBytes); + var signedString = System.Convert.ToBase64String(derBytes); + + return signedString; + {{/net60OrLater}} + {{^net60OrLater}} + throw new Exception("ECDSA signing is supported only on NETCOREAPP3_0 and above"); + {{/net60OrLater}} + } + + private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) + { + var derBytes = new List(); + byte derLength = 68; //default length for ECDSA code signing bit 0x44 + byte rbytesLength = 32; //R length 0x20 + byte sbytesLength = 32; //S length 0x20 + var rBytes = new List(); + var sBytes = new List(); + for (int i = 0; i < 32; i++) + rBytes.Add(signedBytes[i]); + + for (int i = 32; i < 64; i++) + sBytes.Add(signedBytes[i]); + + if (rBytes[0] > 0x7F) + { + derLength++; + rbytesLength++; + var tempBytes = new List(); + tempBytes.AddRange(rBytes); + rBytes.Clear(); + rBytes.Add(0x00); + rBytes.AddRange(tempBytes); + } + + if (sBytes[0] > 0x7F) + { + derLength++; + sbytesLength++; + var tempBytes = new List(); + tempBytes.AddRange(sBytes); + sBytes.Clear(); + sBytes.Add(0x00); + sBytes.AddRange(tempBytes); + + } + + derBytes.Add(48); //start of the sequence 0x30 + derBytes.Add(derLength); //total length r length, type and r bytes + + derBytes.Add(2); //tag for integer + derBytes.Add(rbytesLength); //length of r + derBytes.AddRange(rBytes); + + derBytes.Add(2); //tag for integer + derBytes.Add(sbytesLength); //length of s + derBytes.AddRange(sBytes); + return derBytes.ToArray(); + } + + private RSACryptoServiceProvider{{nrt?}} GetRSAProviderFromPemFile(String pemfile, SecureString{{nrt?}} keyPassPhrase = null) + { + const String pempubheader = "-----BEGIN PUBLIC KEY-----"; + const String pempubfooter = "-----END PUBLIC KEY-----"; + bool isPrivateKeyFile = true; + byte[]{{nrt?}} pemkey = null; + + if (!File.Exists(pemfile)) + throw new Exception("private key file does not exist."); + + string pemstr = File.ReadAllText(pemfile).Trim(); + + if (pemstr.StartsWith(pempubheader) && pemstr.EndsWith(pempubfooter)) + isPrivateKeyFile = false; + + if (isPrivateKeyFile) + { + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); + + if (pemkey == null) + return null; + + return DecodeRSAPrivateKey(pemkey); + } + return null; + } + + private byte[]{{nrt?}} ConvertPrivateKeyToBytes(String instr, SecureString{{nrt?}} keyPassPhrase = null) + { + const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; + const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; + String pemstr = instr.Trim(); + byte[] binkey; + + if (!pemstr.StartsWith(pemprivheader) || !pemstr.EndsWith(pemprivfooter)) + return null; + + StringBuilder sb = new StringBuilder(pemstr); + sb.Replace(pemprivheader, ""); + sb.Replace(pemprivfooter, ""); + String pvkstr = sb.ToString().Trim(); + + try + { // if there are no PEM encryption info lines, this is an UNencrypted PEM private key + binkey = Convert.FromBase64String(pvkstr); + return binkey; + } + catch (global::System.FormatException) + { + StringReader str = new StringReader(pvkstr); + + //-------- read PEM encryption info. lines and extract salt ----- + if (!str.ReadLine(){{nrt!}}.StartsWith("Proc-Type: 4,ENCRYPTED")) // TODO: what do we do here if ReadLine is null? + return null; + + String saltline = str.ReadLine(){{nrt!}}; // TODO: what do we do here if ReadLine is null? + if (!saltline.StartsWith("DEK-Info: DES-EDE3-CBC,")) + return null; + + String saltstr = saltline.Substring(saltline.IndexOf(",") + 1).Trim(); + byte[] salt = new byte[saltstr.Length / 2]; + for (int i = 0; i < salt.Length; i++) + salt[i] = Convert.ToByte(saltstr.Substring(i * 2, 2), 16); + + if (!(str.ReadLine() == "")) + return null; + + //------ remaining b64 data is encrypted RSA key ---- + String encryptedstr = str.ReadToEnd(); + + try + { //should have b64 encrypted RSA key now + binkey = Convert.FromBase64String(encryptedstr); + } + catch (global::System.FormatException) + { //data is not in base64 format + return null; + } + + // TODO: what do we do here if keyPassPhrase is null? + byte[] deskey = GetEncryptedKey(salt, keyPassPhrase{{nrt!}}, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + if (deskey == null) + return null; + + //------ Decrypt the encrypted 3des-encrypted RSA private key ------ + byte[]{{nrt?}} rsakey = DecryptKey(binkey, deskey, salt); //OpenSSL uses salt value in PEM header also as 3DES IV + + return rsakey; + } + } + + private RSACryptoServiceProvider{{nrt?}} DecodeRSAPrivateKey(byte[] privkey) + { + byte[] MODULUS, E, D, P, Q, DP, DQ, IQ; + + // --------- Set up stream to decode the asn.1 encoded RSA private key ------ + MemoryStream mem = new MemoryStream(privkey); + BinaryReader binr = new BinaryReader(mem); //wrap Memory Stream with BinaryReader for easy reading + byte bt = 0; + ushort twobytes = 0; + int elems = 0; + try + { + twobytes = binr.ReadUInt16(); + if (twobytes == 0x8130) //data read as little endian order (actual data order for Sequence is 30 81) + binr.ReadByte(); //advance 1 byte + else if (twobytes == 0x8230) + binr.ReadInt16(); //advance 2 bytes + else + return null; + + twobytes = binr.ReadUInt16(); + if (twobytes != 0x0102) //version number + return null; + + bt = binr.ReadByte(); + if (bt != 0x00) + return null; + + //------ all private key components are Integer sequences ---- + elems = GetIntegerSize(binr); + MODULUS = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + E = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + D = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + P = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + Q = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + DP = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + DQ = binr.ReadBytes(elems); + + elems = GetIntegerSize(binr); + IQ = binr.ReadBytes(elems); + + // ------- create RSACryptoServiceProvider instance and initialize with public key ----- + RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(); + RSAParameters RSAparams = new RSAParameters(); + RSAparams.Modulus = MODULUS; + RSAparams.Exponent = E; + RSAparams.D = D; + RSAparams.P = P; + RSAparams.Q = Q; + RSAparams.DP = DP; + RSAparams.DQ = DQ; + RSAparams.InverseQ = IQ; + RSA.ImportParameters(RSAparams); + return RSA; + } + catch (Exception) + { + return null; + } + finally + { + binr.Close(); + } + } + + private int GetIntegerSize(BinaryReader binr) + { + byte bt = 0; + byte lowbyte = 0x00; + byte highbyte = 0x00; + int count = 0; + bt = binr.ReadByte(); + if (bt != 0x02) //expect integer + return 0; + + bt = binr.ReadByte(); + + if (bt == 0x81) + count = binr.ReadByte(); // data size in next byte + else if (bt == 0x82) + { + highbyte = binr.ReadByte(); // data size in next 2 bytes + lowbyte = binr.ReadByte(); + byte[] modint = { lowbyte, highbyte, 0x00, 0x00 }; + count = BitConverter.ToInt32(modint, 0); + } + else + count = bt; // we already have the data size + + while (binr.ReadByte() == 0x00) + //remove high order zeros in data + count -= 1; + + binr.BaseStream.Seek(-1, SeekOrigin.Current); + + //last ReadByte wasn't a removed zero, so back up a byte + return count; + } + + private byte[] GetEncryptedKey(byte[] salt, SecureString secpswd, int count, int miter) + { + IntPtr unmanagedPswd = IntPtr.Zero; + int HASHLENGTH = 16; //MD5 bytes + byte[] keymaterial = new byte[HASHLENGTH * miter]; //to store concatenated Mi hashed results + + byte[] psbytes = new byte[secpswd.Length]; + unmanagedPswd = Marshal.SecureStringToGlobalAllocAnsi(secpswd); + Marshal.Copy(unmanagedPswd, psbytes, 0, psbytes.Length); + Marshal.ZeroFreeGlobalAllocAnsi(unmanagedPswd); + + // --- concatenate salt and pswd bytes into fixed data array --- + byte[] data00 = new byte[psbytes.Length + salt.Length]; + Array.Copy(psbytes, data00, psbytes.Length); //copy the pswd bytes + Array.Copy(salt, 0, data00, psbytes.Length, salt.Length); //concatenate the salt bytes + + // ---- do multi-hashing and concatenate results D1, D2 ... into keymaterial bytes ---- + MD5 md5 = MD5.Create(); + byte[]{{nrt?}} result = null; + byte[] hashtarget = new byte[HASHLENGTH + data00.Length]; //fixed length initial hashtarget + + for (int j = 0; j < miter; j++) + { + // ---- Now hash consecutively for count times ------ + if (j == 0) + result = data00; //initialize + else + { + Array.Copy(result{{nrt!}}, hashtarget, result{{nrt!}}.Length); // TODO: what do we do if result is null here? + Array.Copy(data00, 0, hashtarget, result.Length, data00.Length); + result = hashtarget; + } + + for (int i = 0; i < count; i++) + result = md5.ComputeHash(result); + + Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length); //concatenate to keymaterial + } + byte[] deskey = new byte[24]; + Array.Copy(keymaterial, deskey, deskey.Length); + + Array.Clear(psbytes, 0, psbytes.Length); + Array.Clear(data00, 0, data00.Length); + Array.Clear(result{{nrt!}}, 0, result{{nrt!}}.Length); // TODO: what do we do if result is null here? + Array.Clear(hashtarget, 0, hashtarget.Length); + Array.Clear(keymaterial, 0, keymaterial.Length); + return deskey; + } + + private byte[]{{nrt?}} DecryptKey(byte[] cipherData, byte[] desKey, byte[] IV) + { + MemoryStream memst = new MemoryStream(); + TripleDES alg = TripleDES.Create(); + alg.Key = desKey; + alg.IV = IV; + try + { + CryptoStream cs = new CryptoStream(memst, alg.CreateDecryptor(), CryptoStreamMode.Write); + cs.Write(cipherData, 0, cipherData.Length); + cs.Close(); + } + catch (Exception) + { + return null; + } + byte[] decryptedData = memst.ToArray(); + return decryptedData; + } + + /// + /// Detect the key type from the pem file. + /// + /// key file path in pem format + /// + private PrivateKeyType GetKeyType(string keyFilePath) + { + if (!File.Exists(keyFilePath)) + throw new Exception("Key file path does not exist."); + + var ecPrivateKeyHeader = "BEGIN EC PRIVATE KEY"; + var ecPrivateKeyFooter = "END EC PRIVATE KEY"; + var rsaPrivateKeyHeader = "BEGIN RSA PRIVATE KEY"; + var rsaPrivateFooter = "END RSA PRIVATE KEY"; + //var pkcs8Header = "BEGIN PRIVATE KEY"; + //var pkcs8Footer = "END PRIVATE KEY"; + var keyType = PrivateKeyType.None; + var key = File.ReadAllLines(keyFilePath); + + if (key[0].ToString().Contains(rsaPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(rsaPrivateFooter)) + keyType = PrivateKeyType.RSA; + else if (key[0].ToString().Contains(ecPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) + keyType = PrivateKeyType.ECDSA; + + else if (key[0].ToString().Contains(ecPrivateKeyHeader) && key[key.Length - 1].ToString().Contains(ecPrivateKeyFooter)) + { + /* this type of key can hold many type different types of private key, but here due lack of pem header + Considering this as EC key + */ + //TODO :- update the key based on oid + keyType = PrivateKeyType.ECDSA; + } + else + throw new Exception("Either the key is invalid or key is not supported"); + + return keyType; + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/HttpSigningToken.mustache b/templates-v7/csharp/libraries/generichost/HttpSigningToken.mustache new file mode 100644 index 000000000..881682e89 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/HttpSigningToken.mustache @@ -0,0 +1,45 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A token constructed from an HttpSigningConfiguration + /// + {{>visibility}} class HttpSignatureToken : TokenBase + { + private HttpSigningConfiguration _configuration; + + /// + /// Constructs an HttpSignatureToken object. + /// + /// + /// + public HttpSignatureToken(HttpSigningConfiguration configuration, TimeSpan? timeout = null) : base(timeout) + { + _configuration = configuration; + } + + /// + /// Places the token in the header. + /// + /// + /// + /// + public void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string requestBody, CancellationToken cancellationToken = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}) + { + var signedHeaders = _configuration.GetHttpSignedHeader(request, requestBody, cancellationToken); + + foreach (var signedHeader in signedHeaders) + request.Headers.Add(signedHeader.Key, signedHeader.Value); + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/IApi.mustache b/templates-v7/csharp/libraries/generichost/IApi.mustache new file mode 100644 index 000000000..a2fc6d1ea --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/IApi.mustache @@ -0,0 +1,13 @@ +namespace {{packageName}}.{{apiPackage}} +{ + /// + /// Interface for interacting with any {{packageName}} API using . + /// + {{>visibility}} interface {{interfacePrefix}}{{packageName}}ApiService + { + /// + /// The object, best practice: instantiate and manage object using the . + /// + System.Net.Http.HttpClient HttpClient { get; } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/IHostBuilderExtensions.mustache b/templates-v7/csharp/libraries/generichost/IHostBuilderExtensions.mustache new file mode 100644 index 000000000..b3df192b6 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/IHostBuilderExtensions.mustache @@ -0,0 +1,41 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using {{packageName}}.{{apiName}}; +using {{packageName}}.{{apiName}}.{{clientPackage}}; + +namespace {{packageName}}.{{apiName}}.Extensions +{ + /// + /// Extension methods for IHostBuilder. + /// + {{>visibility}} static class HostBuilderExtensions + { + /// + /// Add the {{apiName}} API services to the . + /// You can optionally configure the and . + /// + /// . + /// Configures the , , and . + /// Configures the . + /// Configures the . + public static IHostBuilder Configure{{apiName}}(this IHostBuilder hostBuilder, Action hostConfigurationOptions, Action? httpClientOptions = null, Action? httpClientBuilderOptions = null) + { + hostBuilder.ConfigureServices((context, services) => + { + HostConfiguration hostConfiguration = new HostConfiguration(services); + + hostConfigurationOptions(context, services, hostConfiguration); + + hostConfiguration.Add{{apiName}}HttpClients(httpClientOptions, httpClientBuilderOptions); + }); + + return hostBuilder; + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/IHttpClientBuilderExtensions.mustache b/templates-v7/csharp/libraries/generichost/IHttpClientBuilderExtensions.mustache new file mode 100644 index 000000000..053c0226a --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/IHttpClientBuilderExtensions.mustache @@ -0,0 +1,75 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection;{{#supportsRetry}} +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly;{{/supportsRetry}} + +namespace {{packageName}}.Extensions +{ + /// + /// Extension methods for IHttpClientBuilder + /// + {{>visibility}} static class IHttpClientBuilderExtensions + { + {{#supportsRetry}} + /// + /// Adds a Polly retry policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) + { + client.AddPolicyHandler(RetryPolicy(retries)); + + return client; + } + + /// + /// Adds a Polly timeout policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) + { + client.AddPolicyHandler(TimeoutPolicy(timeout)); + + return client; + } + + /// + /// Adds a Polly circuit breaker to your clients. + /// + /// + /// + /// + /// + public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + { + client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); + + return client; + } + + private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) + => HttpPolicyExtensions + .HandleTransientHttpError() + .Or() + .RetryAsync(retries); + + private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) + => Policy.TimeoutAsync(timeout); + + private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( + PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); + {{/supportsRetry}} + } +} diff --git a/templates-v7/csharp/libraries/generichost/IServiceCollectionExtensions.mustache b/templates-v7/csharp/libraries/generichost/IServiceCollectionExtensions.mustache new file mode 100644 index 000000000..fb32d770a --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/IServiceCollectionExtensions.mustache @@ -0,0 +1,33 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Linq; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.{{corePackageName}}.Auth; +using {{packageName}}.{{apiName}}.{{clientPackage}}; + +namespace {{packageName}}.{{apiName}}.Extensions +{ + /// + /// Extension methods for . + /// + {{>visibility}} static class ServiceCollectionExtensions + { + /// + /// Add the {{packageName}} {{apiName}} API services to your . + /// + /// . + /// Configures the . + /// Configures the . + /// Configures the . + public static void Add{{apiName}}Services(this IServiceCollection services, Action hostConfigurationOptions, Action? httpClientOptions = null, Action? httpClientBuilderOptions = null) + { + HostConfiguration hostConfiguration = new{{^net70OrLater}} HostConfiguration{{/net70OrLater}}(services); + hostConfigurationOptions(hostConfiguration); + hostConfiguration.Add{{apiName}}HttpClients(httpClientOptions, httpClientBuilderOptions); + } + } +} diff --git a/templates-v7/csharp/libraries/generichost/ImplementsIEquatable.mustache b/templates-v7/csharp/libraries/generichost/ImplementsIEquatable.mustache new file mode 100644 index 000000000..dd576dd0f --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ImplementsIEquatable.mustache @@ -0,0 +1 @@ +{{#equatable}}{{#readOnlyVars}}{{#-first}}IEquatable<{{classname}}{{nrt?}}> {{/-first}}{{/readOnlyVars}}{{/equatable}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/ImplementsValidatable.mustache b/templates-v7/csharp/libraries/generichost/ImplementsValidatable.mustache new file mode 100644 index 000000000..7c3f0e02a --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ImplementsValidatable.mustache @@ -0,0 +1 @@ +{{#validatable}}IValidatableObject {{/validatable}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/JsonConverter.mustache b/templates-v7/csharp/libraries/generichost/JsonConverter.mustache new file mode 100644 index 000000000..391e00e66 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/JsonConverter.mustache @@ -0,0 +1,661 @@ + /// + /// A Json converter for type + /// + {{>visibility}} class {{classname}}JsonConverter : JsonConverter<{{classname}}> + { + {{#allVars}} + {{#isDateTime}} + /// + /// The format to use to serialize {{name}}. + /// + public static string {{name}}Format { get; set; } = "{{{dateTimeFormat}}}"; + + {{/isDateTime}} + {{#isDate}} + /// + /// The format to use to serialize {{name}}. + /// + public static string {{name}}Format { get; set; } = "{{{dateFormat}}}"; + + {{/isDate}} + {{/allVars}} + /// + /// Deserializes json to . + /// + /// . + /// . + /// The , initialized from . + /// . + /// + public override {{classname}} Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + {{#allVars}} + Option<{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + {{/-last}} + {{/allVars}} + {{#discriminator}} + {{#children}} + {{#-first}} + string{{nrt?}} discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "{{discriminator.propertyBaseName}}"); + + {{/-first}} + if (discriminator != null && discriminator.Equals("{{name}}")) + return JsonSerializer.Deserialize<{{{classname}}}>(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + {{/children}} + {{/discriminator}} + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{#mappedModels}} + {{#model}} + {{^vendorExtensions.x-duplicated-data-type}} + {{classname}}{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} = null; + {{#-last}} + + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/model}} + {{/mappedModels}} + Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; + while (utf8JsonReaderDiscriminator.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) + { + string{{nrt?}} jsonPropertyName = utf8JsonReaderDiscriminator.GetString(); + utf8JsonReaderDiscriminator.Read(); + if (jsonPropertyName{{nrt?}}.Equals("{{propertyBaseName}}"){{#nrt}} ?? false{{/nrt}}) + { + string{{nrt?}} discriminator = utf8JsonReaderDiscriminator.GetString(); + {{#mappedModels}} + if (discriminator{{nrt?}}.Equals("{{mappingName}}"){{#nrt}} ?? false{{/nrt}}) + { + Utf8JsonReader utf8JsonReader{{model.classname}} = utf8JsonReader; + {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} = JsonSerializer.Deserialize<{{{model.classname}}}>(ref utf8JsonReader{{model.classname}}, jsonSerializerOptions); + } + {{/mappedModels}} + } + } + } + + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + Utf8JsonReader utf8JsonReaderOneOf = utf8JsonReader; + while (utf8JsonReaderOneOf.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderOneOf.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderOneOf.CurrentDepth) + break; + + if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) + { + {{#oneOf}} + Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; + ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{^-last}} + + {{/-last}} + {{/oneOf}} + } + } + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + Utf8JsonReader utf8JsonReaderAnyOf = utf8JsonReader; + while (utf8JsonReaderAnyOf.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) + break; + + if (utf8JsonReaderAnyOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderAnyOf.CurrentDepth - 1) + { + {{#anyOf}} + Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; + ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{^-last}} + + {{/-last}} + {{/anyOf}} + } + } + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + + {{/composedSchemas}} + {{/model.discriminator}} + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string{{nrt?}} jsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (jsonPropertyName) + { + {{#allVars}} + case "{{baseName}}": + {{#isString}} + {{^isMap}} + {{^isEnum}} + {{^isUuid}} + {{#isDecimal}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDecimal()); + {{/isDecimal}} + {{^isDecimal}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetString(){{^isNullable}}{{nrt!}}{{/isNullable}}); + {{/isDecimal}} + {{/isUuid}} + {{/isEnum}} + {{/isMap}} + {{/isString}} + {{#isBoolean}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.TokenType == JsonTokenType.Null ? (bool?)null : utf8JsonReader.GetBoolean()); + {{/isBoolean}} + {{#isNumeric}} + {{^isEnum}} + {{#isDouble}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.TokenType == JsonTokenType.Null ? (double?)null : utf8JsonReader.GetDouble()); + {{/isDouble}} + {{#isDecimal}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.TokenType == JsonTokenType.Null ? (decimal?)null : utf8JsonReader.GetDecimal()); + {{/isDecimal}} + {{#isFloat}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.TokenType == JsonTokenType.Null ? (float?)null : (float)utf8JsonReader.GetDouble()); + {{/isFloat}} + {{#isLong}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.TokenType == JsonTokenType.Null ? ({{#vendorExtensions.x-unsigned}}u{{/vendorExtensions.x-unsigned}}long?)null : utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int64()); + {{/isLong}} + {{^isLong}} + {{^isFloat}} + {{^isDecimal}} + {{^isDouble}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.TokenType == JsonTokenType.Null ? ({{#vendorExtensions.x-unsigned}}u{{/vendorExtensions.x-unsigned}}int?)null : utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); + {{/isDouble}} + {{/isDecimal}} + {{/isFloat}} + {{/isLong}} + {{/isEnum}} + {{/isNumeric}} + {{#isDate}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{#supportsDateOnly}}DateOnly{{/supportsDateOnly}}{{^supportsDateOnly}}DateTime{{/supportsDateOnly}}{{#isNullable}}?{{/isNullable}}>(ref utf8JsonReader, jsonSerializerOptions)); + {{/isDate}} + {{#isDateTime}} + {{! Fix: Added support for DateTimeOffset, when `useDateTimeOffset=true` }} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + {{/isDateTime}} + {{#isEnum}} + {{^isMap}} + {{#isNumeric}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.TokenType == JsonTokenType.Null ? ({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}?)null : ({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}})utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); + {{/isNumeric}} + {{^isNumeric}} + string{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = utf8JsonReader.GetString(); + {{^isInnerEnum}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{{datatypeWithEnum}}}ValueConverter.FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); + {{/isInnerEnum}} + {{#isInnerEnum}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{classname}}.{{{datatypeWithEnum}}}.FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); + {{/isInnerEnum}} + {{/isNumeric}} + {{/isMap}} + {{/isEnum}} + {{#isUuid}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.TokenType == JsonTokenType.Null ? (Guid?)null : utf8JsonReader.GetGuid()); + {{/isUuid}} + {{^isUuid}} + {{^isEnum}} + {{^isString}} + {{^isBoolean}} + {{^isNumeric}} + {{^isDate}} + {{^isDateTime}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref utf8JsonReader, jsonSerializerOptions){{^isNullable}}{{nrt!}}{{/isNullable}}); + {{/isDateTime}} + {{/isDate}} + {{/isNumeric}} + {{/isBoolean}} + {{/isString}} + {{/isEnum}} + {{/isUuid}} + break; + {{/allVars}} + default: + break; + } + } + } + + {{! Required fields }} + {{#allVars}} + {{#required}} + if (!{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet) + throw new ArgumentException("Property is required for class {{classname}}.", nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}})); + + {{/required}} + {{/allVars}} + {{^vendorExtensions.x-duplicated-data-type}} + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{^model.composedSchemas.anyOf}} + {{#mappedModels}} + if ({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} != null) + return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); + + {{#-last}} + throw new JsonException(); + {{/-last}} + {{/mappedModels}} + {{/model.composedSchemas.anyOf}} + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} + {{^composedSchemas.oneOf}} + {{^required}} + {{#model.composedSchemas.anyOf}} + Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null + ? default + : new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{/model.composedSchemas.anyOf}} + {{#-last}} + + {{/-last}} + {{/required}} + return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue{{#required}}.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/required}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); + {{/composedSchemas.oneOf}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}?.Type != null) + return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}ParsedValue{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); + + {{/vendorExtensions.x-duplicated-data-type}} + {{#-last}} + throw new JsonException(); + {{/-last}} + {{/oneOf}} + {{/composedSchemas}} + {{/model.discriminator}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} + } + + /// + /// Serializes a . + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) + { + {{#lambda.trimLineBreaks}} + {{#lambda.copyText}} + {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} + {{/lambda.copyText}} + {{#discriminator}} + {{#children}} + if ({{#lambda.paste}}{{/lambda.paste}} is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){ + JsonSerializer.Serialize<{{{classname}}}>(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); + return; + } + + {{/children}} + {{/discriminator}} + {{! start | support oneOf without discriminator.mapping property - WriteProperties }} + {{^model.discriminator}} + {{#composedSchemas.oneOf}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + {{/composedSchemas.oneOf}} + {{/model.discriminator}} + {{! end | oneOf support without discriminator.mapping property - WriteProperties }} + {{! start | support oneOf without discriminator.mapping property- WriteStartObject }} + {{^model.discriminator}}{{#oneOf}}{{#-first}}/* {{/-first}}{{/oneOf}}{{/model.discriminator}} + writer.WriteStartObject(); + {{^model.discriminator}}{{#oneOf}}{{#-first}} */{{/-first}}{{/oneOf}}{{/model.discriminator}} + {{! end | support oneOf without discriminator.mapping property - WriteStartObject }} + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + {{#isPrimitiveType}} + {{#isString}} + writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); + {{/isString}} + {{#isBoolean}} + writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isBoolean}} + {{#isNumeric}} + writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isNumeric}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + { + {{baseType}}JsonConverter {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}} = ({{baseType}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.GetType())); + {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}}.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + {{/isPrimitiveType}} + + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#anyOf}} + if ({{#lambda.joinWithAmpersand}}{{^required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet {{/required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null{{/lambda.joinWithAmpersand}}) + {{#isPrimitiveType}} + {{#isString}} + writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); + {{/isString}} + {{#isBoolean}} + writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isBoolean}} + {{#isNumeric}} + writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isNumeric}} + {{#isEnum}} + { + {{datatypeWithEnum}}JsonConverter {{#lambda.camelcase}}{{datatypeWithEnum}}{{/lambda.camelcase}}JsonConverter = ({{datatypeWithEnum}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}.GetType())); + {{#lambda.camelcase}}{{datatypeWithEnum}}{{/lambda.camelcase}}JsonConverter.Write{{^isEnumRef}}Properties{{/isEnumRef}}(writer, {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}, jsonSerializerOptions); + } + {{/isEnum}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + { + {{datatypeWithEnum}}JsonConverter {{#lambda.camelcase}}{{datatypeWithEnum}}{{/lambda.camelcase}}JsonConverter = ({{datatypeWithEnum}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}.GetType())); + {{#lambda.camelcase}}{{datatypeWithEnum}}{{/lambda.camelcase}}JsonConverter.Write{{^isEnumRef}}Properties{{/isEnumRef}}(writer, {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}, jsonSerializerOptions); + } + {{/isPrimitiveType}} + + {{/anyOf}} + {{/composedSchemas}} + {{/model.discriminator}} + WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); + {{! start | support oneOf without discriminator.mapping property- WriteEndObject }} + {{^model.discriminator}}{{#oneOf}}{{#-first}}/* {{/-first}}{{/oneOf}}{{/model.discriminator}} + writer.WriteEndObject(); + {{^model.discriminator}}{{#oneOf}}{{#-first}} */{{/-first}}{{/oneOf}}{{/model.discriminator}} + {{! end | support oneOf without discriminator.mapping property - WriteEndObject }} + {{/lambda.trimLineBreaks}} + } + + /// + /// Serializes the properties of . + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) + { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} + + {{#allVars}} + {{#isDiscriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + writer.WriteString("{{baseName}}", {{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{/isEnum}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}.ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}{{/required}}){{/isEnum}}); + + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/isDiscriminator}} + {{^isDiscriminator}} + {{#isString}} + {{^isMap}} + {{^isEnum}} + {{^isUuid}} + {{#lambda.copyText}} + {{#isDecimal}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.ToString()); + {{/isDecimal}} + {{^isDecimal}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); + {{/isDecimal}} + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}}{{! prevent indent}} + {{/lambda.indent3}} + {{/isUuid}} + {{/isEnum}} + {{/isMap}} + {{/isString}} + {{#isBoolean}} + {{#lambda.copyText}} + writer.WriteBoolean("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}}{{! prevent indent}} + {{/lambda.indent3}} + {{/isBoolean}} + {{^isEnum}} + {{#isNumeric}} + {{#lambda.copyText}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}}{{! prevent indent}} + {{/lambda.indent3}} + {{/isNumeric}} + {{/isEnum}} + {{#isDate}} + {{#lambda.copyText}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}}{{! prevent indent}} + {{/lambda.indent3}} + {{/isDate}} + {{#isDateTime}} + {{#lambda.copyText}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}}{{! prevent indent}} + {{/lambda.indent3}} + {{/isDateTime}} + {{#isEnum}} + {{#isNumeric}} + {{#lambda.copyText}} + writer.WriteNumber("{{baseName}}", {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}})); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}}{{! prevent indent}} + {{/lambda.indent3}} + {{/isNumeric}} + {{^isMap}} + {{^isNumeric}} + {{#isInnerEnum}} + {{#isNullable}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); + else + writer.WriteNull("{{baseName}}"); + + {{/isNullable}} + {{^isNullable}} + if ({{^required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}._{{name}}Option.IsSet && {{/required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) {{! - }} + { + string? {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); + } + + {{/isNullable}} + {{/isInnerEnum}} + {{^isInnerEnum}} + {{#lambda.copyText}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} + {{/lambda.copyText}} + {{#required}} + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) + writer.WriteNull("{{baseName}}"); + else + { + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.Value); + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + {{#isString}} + if ({{#lambda.paste}}{{/lambda.paste}}RawValue != null){{! we cant use name here because enumVar also has a name property, so use the paste lambda instead }} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); + else + writer.WriteNull("{{baseName}}"); + {{/isString}} + {{^isString}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); + {{/isString}} + {{/-first}} + {{/enumVars}} + {{/allowableValues}} + } + {{/isNullable}} + {{^isNullable}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + {{^isNumeric}} + writer.WriteString("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); + {{/isNumeric}} + {{#isNumeric}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{#lambda.paste}}{{/lambda.paste}}{{/lambda.camelcase_sanitize_param}}RawValue); + {{/isNumeric}} + {{/-first}} + {{/enumVars}} + {{/allowableValues}} + {{/isNullable}} + + {{/required}} + {{^required}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}._{{name}}Option.IsSet) + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}._{{name}}Option{{nrt!}}.Value != null) + { + var {{#lambda.paste}}{{/lambda.paste}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}._{{name}}Option.Value{{nrt!}}.Value); + writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + { + var {{#lambda.paste}}{{/lambda.paste}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{nrt!}}.Value); + writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); + } + {{/isNullable}} + {{/required}} + {{/isInnerEnum}} + {{/isNumeric}} + {{/isMap}} + {{/isEnum}} + {{#isUuid}} + {{#lambda.copyText}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}}{{! prevent indent}} + {{/lambda.indent3}} + {{/isUuid}} + {{^isUuid}} + {{^isEnum}} + {{^isString}} + {{^isBoolean}} + {{^isNumeric}} + {{^isDate}} + {{^isDateTime}} + {{#required}} + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + {{/isNullable}} + {{/required}} + {{^required}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}._{{name}}Option.IsSet) + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}._{{name}}Option.Value != null) + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + {{/isNullable}} + {{/required}} + {{/isDateTime}} + {{/isDate}} + {{/isNumeric}} + {{/isBoolean}} + {{/isString}} + {{/isEnum}} + {{/isUuid}} + {{/isDiscriminator}} + {{/allVars}} + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} + } + } \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/JsonSerializerOptionsProvider.mustache b/templates-v7/csharp/libraries/generichost/JsonSerializerOptionsProvider.mustache new file mode 100644 index 000000000..7e5cf9cb8 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/JsonSerializerOptionsProvider.mustache @@ -0,0 +1,29 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System.Text.Json; + +namespace {{packageName}}.{{apiName}}.{{clientPackage}} +{ + /// + /// Provides the JsonSerializerOptions. + /// + {{>visibility}} class JsonSerializerOptionsProvider + { + /// + /// The JsonSerializerOptions. + /// + public JsonSerializerOptions Options { get; } + + /// + /// Instantiates a JsonSerializerOptionsProvider to access the JsonSerializerOptions. + /// + public JsonSerializerOptionsProvider(JsonSerializerOptions options) + { + Options = options; + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/ModelBaseSignature.mustache b/templates-v7/csharp/libraries/generichost/ModelBaseSignature.mustache new file mode 100644 index 000000000..909a68e35 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ModelBaseSignature.mustache @@ -0,0 +1 @@ +{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{parent}}{{/lambda.camelcase_sanitize_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#isInherited}}{{^isNew}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/isNew}}{{#isNew}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{^required}}.Value{{/required}}){{/isEnum}}{{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.ToString(){{/isEnum}}{{/isNew}} {{/isInherited}}{{/isDiscriminator}}{{/allVars}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/ModelSignature.mustache b/templates-v7/csharp/libraries/generichost/ModelSignature.mustache new file mode 100644 index 000000000..09a41b278 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ModelSignature.mustache @@ -0,0 +1 @@ +{{#model.allVars}}{{^isDiscriminator}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}{{#defaultValue}}{{^isEnum}} = {{^required}}default{{/required}}{{#required}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{.}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/required}}{{/isEnum}}{{#isEnum}} = default{{/isEnum}}{{/defaultValue}}{{^defaultValue}}{{#lambda.first}}{{#isNullable}} = default {{/isNullable}}{{^required}} = default {{/required}}{{/lambda.first}}{{/defaultValue}} {{/isDiscriminator}}{{/model.allVars}} diff --git a/templates-v7/csharp/libraries/generichost/OAuthToken.mustache b/templates-v7/csharp/libraries/generichost/OAuthToken.mustache new file mode 100644 index 000000000..23b3cab91 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/OAuthToken.mustache @@ -0,0 +1,41 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A token constructed with OAuth. + /// + {{>visibility}} class OAuthToken : TokenBase + { + private string _raw; + + /// + /// Consturcts an OAuthToken object. + /// + /// + /// + public OAuthToken(string value, TimeSpan? timeout = null) : base(timeout) + { + _raw = value; + } + + /// + /// Places the token in the header. + /// + /// + /// + public virtual void UseInHeader(global::System.Net.Http.HttpRequestMessage request, string headerName) + { + request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw); + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/OnDeserializationError.mustache b/templates-v7/csharp/libraries/generichost/OnDeserializationError.mustache new file mode 100644 index 000000000..ff83a5076 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/OnDeserializationError.mustache @@ -0,0 +1,2 @@ +if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/OperationSignature.mustache b/templates-v7/csharp/libraries/generichost/OperationSignature.mustache new file mode 100644 index 000000000..049717717 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/OperationSignature.mustache @@ -0,0 +1 @@ +{{#pathParams}}{{{dataType}}}{{>NullConditionalParameter}} {{paramName}}, {{/pathParams}}{{#queryParams}}{{#required}}{{{dataType}}}{{>NullConditionalParameter}} {{paramName}}, {{/required}}{{/queryParams}}{{#bodyParams}}{{{dataType}}}{{>NullConditionalParameter}} {{paramName}}, {{/bodyParams}}{{#queryParams}}{{^required}}Option<{{{dataType}}}{{>NullConditionalParameter}}> {{paramName}}{{#notRequiredOrIsNullable}} = default{{/notRequiredOrIsNullable}}, {{/required}}{{/queryParams}} RequestOptions? requestOptions = default, System.Threading.CancellationToken cancellationToken = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/Option.mustache b/templates-v7/csharp/libraries/generichost/Option.mustache new file mode 100644 index 000000000..8b33bdb51 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/Option.mustache @@ -0,0 +1,48 @@ +// +{{>partial_header}} + +{{#nrt}} +#nullable enable + +{{/nrt}} + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + internal bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/OptionProperty.mustache b/templates-v7/csharp/libraries/generichost/OptionProperty.mustache new file mode 100644 index 000000000..d75041887 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/OptionProperty.mustache @@ -0,0 +1 @@ +new Option<{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>( \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/README.client.mustache b/templates-v7/csharp/libraries/generichost/README.client.mustache new file mode 100644 index 000000000..247cbe399 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/README.client.mustache @@ -0,0 +1,140 @@ +# Created with Openapi Generator + + +## Creating the library +Create a config.yaml file similar to what is below, then run the following powershell command to generate the library `java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar" generate -c config.yaml` + +```yaml +generatorName: csharp +inputSpec: {{inputSpec}} +outputDir: out + +# https://openapi-generator.tech/docs/generators/csharp +additionalProperties: + packageGuid: '{{packageGuid}}' + +# https://openapi-generator.tech/docs/integrations/#github-integration +# gitHost: +# gitUserId: +# gitRepoId: + +# https://openapi-generator.tech/docs/globals +# globalProperties: + +# https://openapi-generator.tech/docs/customization/#inline-schema-naming +# inlineSchemaOptions: + +# https://openapi-generator.tech/docs/customization/#name-mapping +# modelNameMappings: +# nameMappings: + +# https://openapi-generator.tech/docs/customization/#openapi-normalizer +# openapiNormalizer: + +# templateDir: https://openapi-generator.tech/docs/templating/#modifying-templates + +# releaseNote: +``` + + +## Using the library in your project + +```cs +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.Api; +using {{packageName}}.Client; +using {{packageName}}.Model; +using Org.OpenAPITools.Extensions; + +namespace YourProject +{ + public class Program + { + public static async Task Main(string[] args) + { + var host = CreateHostBuilder(args).Build(); + {{#apiInfo}} + {{#apis}} + {{#-first}} + var api = host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + {{#operations}} + {{#-first}} + {{#operation}} + {{#-first}} + {{interfacePrefix}}{{operationId}}ApiResponse apiResponse = await api.{{operationId}}Async("todo"); + {{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}} model = apiResponse.Ok(); + {{/-first}} + {{/operation}} + {{/-first}} + {{/operations}} + {{/-first}} + {{/apis}} + {{/apiInfo}} + } + + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) + .Configure{{apiName}}((context, services, options) => + { + {{#authMethods}} + {{#-first}} + // The type of token here depends on the api security specifications + // Available token types are ApiKeyToken, BearerToken, HttpSigningToken, and OAuthToken. + BearerToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, BearerToken>(); + + {{/-first}} + {{/authMethods}} + options.ConfigureJsonOptions((jsonOptions) => + { + // your custom converters if any + }); + + options.Add{{apiName}}HttpClients(client => + { + // client configuration + }, builder => + { + builder + .AddRetryPolicy(2) + .AddTimeoutPolicy(TimeSpan.FromSeconds(5)) + .AddCircuitBreakerPolicy(10, TimeSpan.FromSeconds(30)); + // add whatever middleware you prefer + } + ); + }); + } +} +``` + +## Questions + +- What about HttpRequest failures and retries? + Configure Polly in the IHttpClientBuilder +- How are tokens used? + Tokens are provided by a TokenProvider class. The default is RateLimitProvider which will perform client side rate limiting. + Other providers can be used with the UseProvider method. +- Does an HttpRequest throw an error when the server response is not Ok? + It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. + StatusCode and ReasonPhrase will contain information about the error. + If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. +- How do I validate requests and process responses? + Use the provided On and After partial methods in the api classes. + +## Api Information +- appName: {{appName}} +- appVersion: {{appVersion}} +- appDescription: {{appDescription}} + +## Build +This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. + +- SDK version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Generator version: {{generatorVersion}} +- Build package: {{generatorClass}} diff --git a/templates-v7/csharp/libraries/generichost/SourceGenerationContext.mustache b/templates-v7/csharp/libraries/generichost/SourceGenerationContext.mustache new file mode 100644 index 000000000..b1798c98e --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/SourceGenerationContext.mustache @@ -0,0 +1,9 @@ +{{#useSourceGeneration}} + + /// + /// The {{classname}}SerializationContext + /// + [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata | JsonSourceGenerationMode.Serialization)] + [JsonSerializable(typeof({{classname}}))] + {{>visibility}} partial class {{classname}}SerializationContext : JsonSerializerContext { } +{{/useSourceGeneration}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/TokenBase.mustache b/templates-v7/csharp/libraries/generichost/TokenBase.mustache new file mode 100644 index 000000000..05f06b4a7 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/TokenBase.mustache @@ -0,0 +1,73 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// The base for all tokens. + /// + {{>visibility}} abstract class TokenBase + { + private DateTime _nextAvailable = DateTime.UtcNow; + private object _nextAvailableLock = new object(); + private readonly System.Timers.Timer _timer = new System.Timers.Timer(); + + + internal TimeSpan? Timeout { get; set; } + internal delegate void TokenBecameAvailableEventHandler(object sender); + internal event TokenBecameAvailableEventHandler{{nrt?}} TokenBecameAvailable; + + + /// + /// Initialize a TokenBase object. + /// + /// + internal TokenBase(TimeSpan? timeout = null) + { + Timeout = timeout; + + if (Timeout != null) + StartTimer(Timeout.Value); + } + + + /// + /// Starts the token's timer + /// + /// + internal void StartTimer(TimeSpan timeout) + { + Timeout = timeout; + _timer.Interval = Timeout.Value.TotalMilliseconds; + _timer.Elapsed += OnTimer; + _timer.AutoReset = true; + _timer.Start(); + } + + /// + /// Returns true while the token is rate limited. + /// + public bool IsRateLimited => _nextAvailable > DateTime.UtcNow; + + /// + /// Triggered when the server returns status code TooManyRequests + /// Once triggered the local timeout will be extended an arbitrary length of time. + /// + public void BeginRateLimit() + { + lock(_nextAvailableLock) + _nextAvailable = DateTime.UtcNow.AddSeconds(5); + } + + private void OnTimer(object{{nrt?}} sender, System.Timers.ElapsedEventArgs e) + { + if (TokenBecameAvailable != null && !IsRateLimited) + TokenBecameAvailable.Invoke(this); + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/TokenContainer.mustache b/templates-v7/csharp/libraries/generichost/TokenContainer.mustache new file mode 100644 index 000000000..24c84a551 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/TokenContainer.mustache @@ -0,0 +1,39 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System.Linq; +using System.Collections.Generic; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A container for a collection of tokens. + /// + /// + {{>visibility}} sealed class TokenContainer where TTokenBase : TokenBase + { + /// + /// The collection of tokens + /// + public List Tokens { get; } = new List(); + + /// + /// Instantiates a TokenContainer + /// + public TokenContainer() + { + } + + /// + /// Instantiates a TokenContainer + /// + /// + public TokenContainer(global::System.Collections.Generic.IEnumerable tokens) + { + Tokens = tokens.ToList(); + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/TokenProvider.mustache b/templates-v7/csharp/libraries/generichost/TokenProvider.mustache new file mode 100644 index 000000000..9fc5f3ea0 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/TokenProvider.mustache @@ -0,0 +1,39 @@ +// +{{>partial_header}} + +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Linq; +using System.Collections.Generic; +using {{packageName}}.{{clientPackage}}; + +namespace {{packageName}} +{ + /// + /// A class which will provide tokens. + /// + {{>visibility}} abstract class TokenProvider where TTokenBase : TokenBase + { + /// + /// The array of tokens. + /// + protected TTokenBase[] _tokens; + + internal abstract System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}}); + + /// + /// Instantiates a TokenProvider. + /// + /// + public TokenProvider(IEnumerable tokens) + { + _tokens = tokens.ToArray(); + + if (_tokens.Length == 0) + throw new ArgumentException("You did not provide any tokens."); + } + } +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/ValidateRegex.mustache b/templates-v7/csharp/libraries/generichost/ValidateRegex.mustache new file mode 100644 index 000000000..8918b8cf4 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/ValidateRegex.mustache @@ -0,0 +1,7 @@ +// {{{name}}} ({{{dataType}}}) pattern +Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); +{{#lambda.copy}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} != null && {{/lambda.copy}} +if ({{#lambda.first}}{{^required}}{{#lambda.paste}}{{/lambda.paste}} {{/required}}{{#isNullable}}{{#lambda.paste}}{{/lambda.paste}}{{/isNullable}}{{/lambda.first}}!regex{{{name}}}.Match(this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}}{{#isUuid}}.ToString(){{#lambda.first}}{{^required}}{{nrt!}} {{/required}}{{#isNullable}}! {{/isNullable}}{{/lambda.first}}{{/isUuid}}).Success) +{ + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); +} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/WebhookHandler.mustache b/templates-v7/csharp/libraries/generichost/WebhookHandler.mustache new file mode 100644 index 000000000..3a35bdd49 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/WebhookHandler.mustache @@ -0,0 +1,88 @@ +{{#lambda.trimLineBreaks}} +// +{{>partial_header}} + +{{#nrt}} +#nullable enable + +{{/nrt}} +using Microsoft.Extensions.Logging; +using System.Text.Json; +using {{packageName}}.{{corePackageName}}.Auth; +using {{packageName}}.{{apiName}}.Client; +using {{packageName}}.{{modelPackage}}; + +namespace {{packageName}}.{{apiName}}.Handlers +{ + /// + /// Interface for deserializing {{apiName}} webhooks or verify its HMAC signature. + /// + {{>visibility}} interface {{interfacePrefix}}{{apiName}}Handler + { + /// + /// Returns the to deserialize the json payload from the webhook. This is initialized in the . + /// + {{packageName}}.{{apiName}}.{{clientPackage}}.JsonSerializerOptionsProvider JsonSerializerOptionsProvider { get; } + {{#models}} + {{#model.vendorExtensions.x-webhook-root}} + + /// + /// Uses to attempt to deserialize . + /// + /// The full webhook payload. + /// + {{model.name}}? Deserialize{{model.name}}(string json); + {{/model.vendorExtensions.x-webhook-root}} + {{/models}} + + /// + /// Verifies the HMAC signature of the webhook json payload. + /// + /// The full webhook payload. + /// The signature from the webhook. + /// True if the HMAC signature is valid + bool IsValidHmacSignature(string json, string hmacSignature); + } + + /// + /// Handler utility function used to deserialize {{apiName}} or verify the HMAC signature of the webhook. + /// + {{>visibility}} partial class {{apiName}}Handler : {{interfacePrefix}}{{apiName}}Handler + { + /// + /// The `ADYEN_HMAC_KEY` configured in . + /// + private readonly string? _adyenHmacKey; + + /// + public {{packageName}}.{{apiName}}.{{clientPackage}}.JsonSerializerOptionsProvider JsonSerializerOptionsProvider { get; } + + /// + /// Initializes the handler utility for deserializing {{apiName}} or verify its HMAC signature. + /// + /// . + /// which contains the HMACKey configured in . + public {{apiName}}Handler({{packageName}}.{{apiName}}.{{clientPackage}}.JsonSerializerOptionsProvider jsonSerializerOptionsProvider, ITokenProvider hmacKeyProvider = null) + { + JsonSerializerOptionsProvider = jsonSerializerOptionsProvider; + } + + {{#models}} + {{#model.vendorExtensions.x-webhook-root}} + /// + public {{model.name}}? Deserialize{{model.name}}(string json) + { + return JsonSerializer.Deserialize<{{model.name}}>(json, JsonSerializerOptionsProvider.Options); + } + + {{/model.vendorExtensions.x-webhook-root}} + {{/models}} + + /// + public bool IsValidHmacSignature(string json, string hmacSignature) + { + return {{packageName}}.{{corePackageName}}.Utilities.HmacValidatorUtility.IsHmacSignatureValid(hmacSignature, _adyenHmacKey, json); + } + } +} +{{/lambda.trimLineBreaks}} diff --git a/templates-v7/csharp/libraries/generichost/WriteProperty.mustache b/templates-v7/csharp/libraries/generichost/WriteProperty.mustache new file mode 100644 index 000000000..8fe669906 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/WriteProperty.mustache @@ -0,0 +1,10 @@ +{{#required}} +{{>WritePropertyHelper}} + +{{/required}} +{{^required}} +if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}._{{name}}Option.IsSet) + {{#lambda.indent1}} + {{>WritePropertyHelper}}{{! prevent indent}} + {{/lambda.indent1}} +{{/required}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/WritePropertyHelper.mustache b/templates-v7/csharp/libraries/generichost/WritePropertyHelper.mustache new file mode 100644 index 000000000..04270093a --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/WritePropertyHelper.mustache @@ -0,0 +1,10 @@ +{{#isNullable}} +if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{^required}}_{{/required}}{{name}}{{^required}}Option.Value{{/required}} != null) + {{#lambda.paste}}{{/lambda.paste}} +else + writer.WriteNull("{{baseName}}"); +{{/isNullable}} +{{^isNullable}} +{{#lambda.paste}} +{{/lambda.paste}} +{{/isNullable}} \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/api.mustache b/templates-v7/csharp/libraries/generichost/api.mustache new file mode 100644 index 000000000..67264bf5a --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/api.mustache @@ -0,0 +1,653 @@ +{{#lambda.trimLineBreaks}} +// +{{>partial_header}} + +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Collections.Generic; +{{#net80OrLater}} +{{#lambda.uniqueLines}} +{{#operations}} +{{#operation}} +{{#vendorExtensions.x-set-cookie}} +using System.Linq; +{{/vendorExtensions.x-set-cookie}} +{{/operation}} +{{/operations}} +{{/lambda.uniqueLines}} +{{/net80OrLater}} +using System.Net; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text.Json; +using {{packageName}}.{{corePackageName}}; +using {{packageName}}.{{corePackageName}}.Auth; +using {{packageName}}.{{corePackageName}}.Client; +using {{packageName}}.{{corePackageName}}.Client.Extensions; +using {{packageName}}.{{apiName}}.{{clientPackage}}; +{{#hasImport}} +using {{packageName}}.{{modelPackage}}; +{{/hasImport}} +{{^netStandard}} +using System.Diagnostics.CodeAnalysis; +{{/netStandard}} + +namespace {{packageName}}.{{apiPackage}} +{ + {{#operations}} + /// + /// Represents a collection of functions to interact with the API endpoints. + /// This class is registered as transient. + /// + {{>visibility}} interface {{interfacePrefix}}{{classname}} : {{interfacePrefix}}{{packageName}}ApiService + { + /// + /// The class containing the events. + /// + {{classname}}Events Events { get; } + + {{#operation}} + /// + /// {{summary}} + /// + /// + /// {{notes}} + /// + /// Thrown when fails to make API call. + {{#allParams}} + /// {{{description}}}{{#isHeaderParam}} - Pass this header parameter using .{{/isHeaderParam}}{{#isDeprecated}} (deprecated){{/isDeprecated}} + {{/allParams}} + /// . + /// . + /// of . + {{#isDeprecated}} + [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] + {{/isDeprecated}} + Task<{{interfacePrefix}}{{operationId}}ApiResponse> {{operationId}}Async({{>OperationSignature}}); + + {{/operation}} + } + {{#operation}} + {{^vendorExtensions.x-duplicates}} + {{#responses}} + {{#-first}} + + /// + /// The , wraps . + /// + {{>visibility}} interface {{interfacePrefix}}{{operationId}}ApiResponse : {{#lambda.joinWithComma}}{{packageName}}.{{corePackageName}}.{{clientPackage}}.{{interfacePrefix}}ApiResponse {{#responses}}{{#dataType}}{{interfacePrefix}}{{vendorExtensions.x-http-status}}<{{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}> {{/dataType}}{{/responses}}{{/lambda.joinWithComma}} + { + {{#responses}} + {{#vendorExtensions.x-http-status-is-default}} + /// + /// Returns true if the response is the default response type. + /// + /// + bool Is{{vendorExtensions.x-http-status}} { get; } + {{/vendorExtensions.x-http-status-is-default}} + {{^vendorExtensions.x-http-status-is-default}} + /// + /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}}. + /// + /// + bool Is{{vendorExtensions.x-http-status}} { get; } + {{/vendorExtensions.x-http-status-is-default}} + {{^-last}} + + {{/-last}} + {{/responses}} + } + {{/-first}} + {{/responses}} + {{/vendorExtensions.x-duplicates}} + {{/operation}} + + /// + /// Represents a collection of functions to interact with the API endpoints. + /// + {{>visibility}} class {{classname}}Events + { + {{#lambda.trimTrailingWithNewLine}} + {{#operation}} + /// + /// The event raised after the server response. + /// + public event EventHandler{{nrt?}} On{{operationId}}; + + /// + /// The event raised after an error querying the server. + /// + public event EventHandler{{nrt?}} OnError{{operationId}}; + + internal void ExecuteOn{{operationId}}({{#vendorExtensions.x-duplicates}}{{.}}{{/vendorExtensions.x-duplicates}}{{^vendorExtensions.x-duplicates}}{{classname}}{{/vendorExtensions.x-duplicates}}.{{operationId}}ApiResponse apiResponse) + { + On{{operationId}}?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnError{{operationId}}(Exception exception) + { + OnError{{operationId}}?.Invoke(this, new ExceptionEventArgs(exception)); + } + + {{/operation}} + {{/lambda.trimTrailingWithNewLine}} + } + + /// + /// Represents a collection of functions to interact with the API endpoints. + /// + {{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{classname}} + { + private JsonSerializerOptions _jsonSerializerOptions; + + /// + /// The logger factory. + /// + public ILoggerFactory LoggerFactory { get; } + + /// + /// The logger. + /// + public ILogger<{{classname}}> Logger { get; } + + /// + /// The HttpClient. + /// + public System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The class containing the events. + /// + public {{classname}}Events Events { get; }{{#hasApiKeyMethods}} + + /// + /// A token provider of type . + /// + public ITokenProvider ApiKeyProvider { get; }{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + + /// + /// A token provider of type . + /// + public ITokenProvider BearerTokenProvider { get; }{{/hasHttpBearerMethods}}{{#hasHttpSignatureMethods}} + + /// + /// A token provider of type . + /// + public ITokenProvider HttpSignatureTokenProvider { get; }{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + + /// + /// A token provider of type . + /// + public ITokenProvider OauthTokenProvider { get; }{{/hasOAuthMethods}} + + {{#net80OrLater}} + {{#lambda.unique}} + {{#operation}} + {{#vendorExtensions.x-set-cookie}} + /// + /// The token cookie container. + /// + public {{packageName}}.{{corePackageName}}.Auth.CookieContainer CookieContainer { get; } + + {{/vendorExtensions.x-set-cookie}} + {{/operation}} + {{/lambda.unique}} + {{/net80OrLater}} + /// + /// Initializes a new instance of the class. + /// + public {{classname}}(ILogger<{{classname}}> logger, ILoggerFactory loggerFactory, System.Net.Http.HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, {{classname}}Events {{#lambda.camelcase_sanitize_param}}{{classname}}Events{{/lambda.camelcase_sanitize_param}}{{#hasApiKeyMethods}}, + ITokenProvider apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}}, + ITokenProvider bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpSignatureMethods}}, + ITokenProvider httpSignatureTokenProvider{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}}, + ITokenProvider oauthTokenProvider{{/hasOAuthMethods}}{{#net80OrLater}}{{#operation}}{{#lambda.uniqueLines}}{{#vendorExtensions.x-set-cookie}}, + {{packageName}}.{{clientPackage}}.CookieContainer cookieContainer{{/vendorExtensions.x-set-cookie}}{{/lambda.uniqueLines}}{{/operation}}{{/net80OrLater}}) + { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; + LoggerFactory = loggerFactory; + Logger = logger == null ? LoggerFactory.CreateLogger<{{classname}}>() : logger; + HttpClient = httpClient; + Events = {{#lambda.camelcase_sanitize_param}}{{classname}}Events{{/lambda.camelcase_sanitize_param}};{{#hasApiKeyMethods}} + ApiKeyProvider = apiKeyProvider;{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}} + BearerTokenProvider = bearerTokenProvider;{{/hasHttpBearerMethods}}{{#hasHttpSignatureMethods}} + HttpSignatureTokenProvider = httpSignatureTokenProvider;{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} + OauthTokenProvider = oauthTokenProvider;{{/hasOAuthMethods}}{{#net80OrLater}}{{#operation}}{{#lambda.uniqueLines}}{{#vendorExtensions.x-set-cookie}} + CookieContainer = cookieContainer;{{/vendorExtensions.x-set-cookie}}{{/lambda.uniqueLines}}{{/operation}}{{/net80OrLater}} + } + + {{#operation}} + /// + /// {{summary}} {{notes}} + /// + /// Thrown when fails to make API call. + {{#allParams}} + /// {{{description}}}{{#isBodyParam}}{{/isBodyParam}}{{^required}} ({{#defaultValue}}default to {{.}}{{/defaultValue}}){{/required}}{{#isHeaderParam}} Pass this header parameter in .{{/isHeaderParam}} + {{/allParams}} + /// . + /// . + /// of - If 200 OK response, wraps the when `TryDeserializeOk(...)` is called. + public async Task<{{interfacePrefix}}{{operationId}}ApiResponse> {{operationId}}Async({{>OperationSignature}}) + { + {{#lambda.trimLineBreaks}} + UriBuilder uriBuilder = new UriBuilder(); + + try + { + using (HttpRequestMessage httpRequestMessage = new HttpRequestMessage()) + { + {{^servers}} + uriBuilder.Host = HttpClient.BaseAddress{{nrt!}}.Host; + uriBuilder.Port = HttpClient.BaseAddress.Port; + uriBuilder.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilder.Path = HttpClient.BaseAddress.AbsolutePath == "/" + ? "{{{path}}}" + : string.Concat(HttpClient.BaseAddress.AbsolutePath, "{{{path}}}"); + {{/servers}} + {{#servers}} + {{#-first}} + Uri url = httpRequestMessage.RequestUri = new Uri("{{url}}"); + uriBuilder.Host = url.Authority; + uriBuilder.Scheme = url.Scheme; + uriBuilder.Path = url.AbsolutePath; + {{/-first}} + {{/servers}} + {{#constantParams}} + {{#isPathParam}} + // Set client side default value of Path Param "{{baseName}}". + uriBuilder.Path = uriBuilder.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString(ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}}))); // Constant path parameter + {{/isPathParam}} + {{/constantParams}} + {{#pathParams}} + uriBuilder.Path = uriBuilder.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString({{paramName}}.ToString())); + {{#-last}} + + {{/-last}} + {{/pathParams}} + {{#queryParams}} + {{#-first}} + + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); + {{/-first}} + {{/queryParams}} + {{^queryParams}} + {{#authMethods}} + {{#isApiKey}} + {{#isKeyInQuery}} + + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); + {{/isKeyInQuery}} + {{/isApiKey}} + {{/authMethods}} + {{/queryParams}} + {{#queryParams}} + {{#required}} + {{#-first}} + + {{/-first}} + parseQueryString["{{baseName}}"] = ClientUtils.ParameterToString({{paramName}}); + {{/required}} + {{/queryParams}} + + {{#constantParams}} + {{#isQueryParam}} + // Set client side default value of Query Param "{{baseName}}". + parseQueryString["{{baseName}}"] = ClientUtils.ParameterToString({{#_enum}}"{{{.}}}"{{/_enum}}); // Constant query parameter + {{/isQueryParam}} + {{/constantParams}} + {{#queryParams}} + {{^required}} + if ({{paramName}}.IsSet) + parseQueryString["{{baseName}}"] = ClientUtils.ParameterToString({{paramName}}.Value); + + {{/required}} + {{#-last}} + uriBuilder.Query = parseQueryString.ToString(); + + {{/-last}} + {{/queryParams}} + // Adds headers to the HttpRequestMessage header, these can be set in the RequestOptions (Idempotency-Key etc.) + requestOptions?.AddHeadersToHttpRequestMessage(httpRequestMessage); + {{#formParams}} + {{#-first}} + MultipartContent multipartContent = new MultipartContent(); + + httpRequestMessage.Content = multipartContent; + + List> formParameters = new List>(); + + multipartContent.Add(new FormUrlEncodedContent(formParameters));{{/-first}}{{^isFile}}{{#required}} + + formParameters.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}}))); + + {{/required}} + {{^required}} + if ({{paramName}}.IsSet) + formParameters.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}}.Value))); + + {{/required}} + {{/isFile}} + {{#isFile}} + {{#required}} + multipartContent.Add(new StreamContent({{paramName}})); + + {{/required}} + {{^required}} + if ({{paramName}}.IsSet) + multipartContent.Add(new StreamContent({{paramName}}.Value)); + + {{/required}} + {{/isFile}} + {{/formParams}} + {{#bodyParam}} + httpRequestMessage.Content = ({{paramName}} as object) is System.IO.Stream stream + ? httpRequestMessage.Content = new StreamContent(stream) + : httpRequestMessage.Content = new StringContent(JsonSerializer.Serialize({{paramName}}, _jsonSerializerOptions)); + {{/bodyParam}} + {{#authMethods}} + + {{#isApiKey}} + {{! Only use API Keys that are appended to the HTTP-headers }} + {{^isKeyInCookie}} + {{#isKeyInHeader}} + // Add authorization token to the HttpRequestMessage header + ApiKeyProvider.Get().AddTokenToHttpRequestMessageHeader(httpRequestMessage); + + {{/isKeyInHeader}} + {{/isKeyInCookie}} + {{/isApiKey}} + {{/authMethods}} + httpRequestMessage.RequestUri = uriBuilder.Uri; + {{#authMethods}} + {{#isBasicBearer}} + // Not supported, you'll have to add the BearerToken class and fetch is similar to the ApiKeyProvider. + BearerToken bearerToken{{-index}} = (BearerToken) await BearerTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); + bearerToken{{-index}}.UseInHeader(httpRequestMessage, "{{keyParamName}}"); + {{/isBasicBearer}} + {{#isOAuth}} + // Not supported (yet), you'll have to add the BearerToken class and fetch is similar to the ApiKeyProvider. + OAuthToken oauthToken{{-index}} = (OAuthToken) await OauthTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); + oauthToken{{-index}}.UseInHeader(httpRequestMessage, "{{keyParamName}}"); + {{/isOAuth}} + {{#isHttpSignature}} + + HttpSignatureToken httpSignatureToken{{-index}} = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false); + + if (httpRequestMessage.Content != null) { + string requestBody = await httpRequestMessage.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); + + httpSignatureToken{{-index}}.UseInHeader(httpRequestMessage, requestBody, cancellationToken); + } + {{/isHttpSignature}} + {{/authMethods}} + {{#consumes}} + {{#-first}} + + {{=<% %>=}} + string[] contentTypes = new string[] {<%/-first%> + <%={{ }}=%> + "{{{mediaType}}}"{{^-last}},{{/-last}}{{#-last}} + }; + {{/-last}} + {{/consumes}} + {{#consumes}} + {{#-first}} + + httpRequestMessage.AddUserAgentToHeaders(); + httpRequestMessage.AddLibraryNameToHeader(); + httpRequestMessage.AddLibraryVersionToHeader(); + + string{{nrt?}} contentType = ClientUtils.SelectHeaderContentType(contentTypes); + + if (contentType != null && httpRequestMessage.Content != null) + httpRequestMessage.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); + + {{/-first}} + {{/consumes}} + {{#produces}} + {{#-first}} + + {{=<% %>=}} + string[] accepts = new string[] {<%/-first%> + <%={{ }}=%> + "{{{mediaType}}}"{{^-last}},{{/-last}}{{#-last}} + }; + {{/-last}} + {{/produces}} + {{#produces}} + {{#-first}} + + string{{nrt?}} accept = ClientUtils.SelectHeaderAccept(accepts); + + if (accept != null) + httpRequestMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); + {{/-first}} + {{/produces}} + {{#net60OrLater}} + + httpRequestMessage.Method = HttpMethod.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}}; + {{/net60OrLater}} + {{^net60OrLater}} + httpRequestMessage.Method = new HttpMethod("{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}"); + {{/net60OrLater}} + + DateTime requestedAt = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessage = await HttpClient.SendAsync(httpRequestMessage, cancellationToken).ConfigureAwait(false)) + { + ILogger<{{#vendorExtensions.x-duplicates}}{{.}}.{{/vendorExtensions.x-duplicates}}{{operationId}}ApiResponse> apiResponseLogger = LoggerFactory.CreateLogger<{{#vendorExtensions.x-duplicates}}{{.}}.{{/vendorExtensions.x-duplicates}}{{operationId}}ApiResponse>(); + {{#vendorExtensions.x-duplicates}}{{.}}.{{/vendorExtensions.x-duplicates}}{{operationId}}ApiResponse apiResponse; + + switch ((int)httpResponseMessage.StatusCode) { + {{#responses}} + {{#isBinary}} + case ({{code}}): + {{/isBinary}} + {{/responses}} + {{#responses}} + {{#isBinary}} + {{#-first}} + { + byte[] responseBytesArray = await httpResponseMessage.Content.ReadAsByteArrayAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); + System.IO.Stream responseContentStream = new System.IO.MemoryStream(responseBytesArray); + apiResponse = new{{^net60OrLater}} {{operationId}}ApiResponse{{/net60OrLater}}(apiResponseLogger, httpRequestMessage, httpResponseMessage, responseContentStream, "{{{path}}}", requestedAt, _jsonSerializerOptions); + + break; + } + {{/-first}} + {{/isBinary}} + {{/responses}} + default: { + string responseContent = await httpResponseMessage.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false); + apiResponse = new{{^net60OrLater}} {{operationId}}ApiResponse{{/net60OrLater}}(apiResponseLogger, httpRequestMessage, httpResponseMessage, responseContent, "{{{path}}}", requestedAt, _jsonSerializerOptions); + + break; + } + } + + Events.ExecuteOn{{operationId}}(apiResponse); + {{#net80OrLater}} + {{#responses}} + {{#vendorExtensions.x-set-cookie}} + if (httpResponseMessage.StatusCode == (HttpStatusCode) {{code}} && httpResponseMessage.Headers.TryGetValues("Set-Cookie", out var cookieHeaders)) + { + foreach(string cookieHeader in cookieHeaders) + { + IList setCookieHeaderValues = Microsoft.Net.Http.Headers.SetCookieHeaderValue.ParseList(cookieHeaders.ToArray()); + + foreach(Microsoft.Net.Http.Headers.SetCookieHeaderValue setCookieHeaderValue in setCookieHeaderValues) + { + Cookie cookie = new Cookie(setCookieHeaderValue.Name.ToString(), setCookieHeaderValue.Value.ToString()) + { + HttpOnly = setCookieHeaderValue.HttpOnly + }; + + if (setCookieHeaderValue.Expires.HasValue) + cookie.Expires = setCookieHeaderValue.Expires.Value.UtcDateTime; + + if (setCookieHeaderValue.Path.HasValue) + cookie.Path = setCookieHeaderValue.Path.Value; + + if (setCookieHeaderValue.Domain.HasValue) + cookie.Domain = setCookieHeaderValue.Domain.Value; + + CookieContainer.Value.Add(new Uri($"{uriBuilder.Scheme}://{uriBuilder.Host}"), cookie); + } + } + } + + {{/vendorExtensions.x-set-cookie}} + {{/responses}} + {{/net80OrLater}} + return apiResponse; + } + } + } + catch(Exception exception) + { + Events.ExecuteOnError{{operationId}}(exception); + throw; + } + {{/lambda.trimLineBreaks}} + } + {{^vendorExtensions.x-duplicates}} + {{#responses}} + {{#-first}} + + /// + /// The . + /// + {{>visibility}} partial class {{operationId}}ApiResponse : {{packageName}}.{{corePackageName}}.{{clientPackage}}.ApiResponse, {{interfacePrefix}}{{operationId}}ApiResponse + { + /// + /// The logger for . + /// + public ILogger<{{operationId}}ApiResponse> Logger { get; } + + /// + /// The . + /// + /// . + /// . + /// . + /// The raw data. + /// The path used when making the request. + /// The DateTime.UtcNow when the request was retrieved. + /// + public {{operationId}}ApiResponse(ILogger<{{operationId}}ApiResponse> logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + /// + /// The . + /// + /// . + /// . + /// . + /// The raw binary stream (only set for binary responses). + /// The path used when making the request. + /// The DateTime.UtcNow when the request was retrieved. + /// + public {{operationId}}ApiResponse(ILogger<{{operationId}}ApiResponse> logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, System.IO.Stream contentStream, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, contentStream, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + {{#responses}} + + {{#vendorExtensions.x-http-status-is-default}} + /// + /// Returns true if the response is the default response type. + /// + /// + public bool Is{{vendorExtensions.x-http-status}} => {{#vendorExtensions.x-only-default}}true{{/vendorExtensions.x-only-default}}{{^vendorExtensions.x-only-default}}{{#lambda.joinConditions}}{{#responses}}{{^vendorExtensions.x-http-status-is-default}}!Is{{vendorExtensions.x-http-status}} {{/vendorExtensions.x-http-status-is-default}}{{/responses}}{{/lambda.joinConditions}}{{/vendorExtensions.x-only-default}}; + {{/vendorExtensions.x-http-status-is-default}} + {{^vendorExtensions.x-http-status-is-default}} + /// + /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}}. + /// + /// + {{#vendorExtensions.x-http-status-range}} + public bool Is{{vendorExtensions.x-http-status}} + { + get + { + int statusCode = (int)StatusCode; + return {{vendorExtensions.x-http-status-range}}00 >= statusCode && {{vendorExtensions.x-http-status-range}}99 <= statusCode; + } + } + {{/vendorExtensions.x-http-status-range}} + {{^vendorExtensions.x-http-status-range}} + public bool Is{{vendorExtensions.x-http-status}} => {{code}} == (int)StatusCode; + {{/vendorExtensions.x-http-status-range}} + {{/vendorExtensions.x-http-status-is-default}} + {{#dataType}} + + /// + /// Deserializes the response if the response is {{code}} {{vendorExtensions.x-http-status}}. + /// + /// + public {{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{vendorExtensions.x-http-status}}() + { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent4}} + {{>AsModel}}{{! prevent indent}} + {{/lambda.indent4}} + {{/lambda.trimTrailingWithNewLine}} + } + + /// + /// Returns true if the response is {{code}} {{vendorExtensions.x-http-status}} and the deserialized response is not null. + /// + /// + /// + public bool TryDeserialize{{vendorExtensions.x-http-status}}Response({{#net60OrLater}}[NotNullWhen(true)]{{/net60OrLater}}out {{#isModel}}{{^containerType}}{{packageName}}.{{modelPackage}}.{{/containerType}}{{/isModel}}{{{dataType}}}{{#nrt}}?{{/nrt}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} result) + { + result = null; + + try + { + result = {{vendorExtensions.x-http-status}}(); + } + catch (Exception exception) + { + OnDeserializationError(exception, (HttpStatusCode){{#vendorExtensions.x-http-status-range}}{{.}}{{/vendorExtensions.x-http-status-range}}{{^vendorExtensions.x-http-status-range}}{{code}}{{/vendorExtensions.x-http-status-range}}); + } + + return result != null; + } + {{/dataType}} + {{#-last}} + + private void OnDeserializationError(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent4}} + {{>OnDeserializationError}}{{! prevent indent}} + {{/lambda.indent4}} + {{/lambda.trimTrailingWithNewLine}} + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + {{/-last}} + {{/responses}} + } + + {{/-first}} + {{/responses}} + {{/vendorExtensions.x-duplicates}} + {{/operation}} + } + {{/operations}} +} +{{/lambda.trimLineBreaks}} diff --git a/templates-v7/csharp/libraries/generichost/api_doc.mustache b/templates-v7/csharp/libraries/generichost/api_doc.mustache new file mode 100644 index 000000000..feb36ebc0 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/api_doc.mustache @@ -0,0 +1,91 @@ +## {{packageName}}.{{apiPackage}}.{{classname}}{{#description}} +{{.}}{{/description}} + +#### API Base-Path: **{{{basePath}}}** + + +#### Authorization: {{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}{{#isApiKey}}{{^isKeyInCookie}}{{#isKeyInHeader}}{{{name}}}{{/isKeyInHeader}}{{/isKeyInCookie}}{{/isApiKey}}{{/authMethods}} + + +#### Initialization + + +```csharp +using {{packageName}}.{{corePackageName}}.Options; +using {{packageName}}.{{apiName}}.Extensions; +using {{packageName}}.{{apiName}}.Services; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; + +IHost host = Host.CreateDefaultBuilder() + .Configure{{apiName}}((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + // Set your ADYEN_API_KEY or use get it from your environment using context.Configuration["ADYEN_API_KEY"]. + options.AdyenApiKey = context.Configuration["ADYEN_API_KEY"]; + + // Set your environment, e.g. `Test` or `Live`. + options.Environment = AdyenEnvironment.Test; + + // For the Live environment, additionally include your LiveEndpointUrlPrefix. + options.LiveEndpointUrlPrefix = "your-live-endpoint-url-prefix"; + }); + }) + .Build(); + + // You can inject this service in your constructor. + {{interfacePrefix}}{{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} = host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); +``` + +| Method | HTTP request | Description | +|--------|--------------|-------------| +{{#operations}} +{{#operation}} +| [**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} | +{{/operation}} +{{/operations}} + +{{#operations}} +{{#operation}} + +### **{{httpMethod}}** **{{{path}}}** + +{{{summary}}} + +#### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +| Name | Type | Description | +|------|------|-------------| +{{/-last}} +{{/allParams}} +{{#allParams}} +| **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{#isPrimitiveType}}[{{dataType}}]{{/isPrimitiveType}}{{^isPrimitiveType}}{{^isFile}}**{{dataType}}**{{/isFile}}{{/isPrimitiveType}} | {{description}} | +{{/allParams}} + +#### Example usage + +```csharp +using {{packageName}}.{{modelPackage}}; +using {{packageName}}.{{apiName}}.Services; + +// Example `{{classname}}.{{operationId}}` usage: +// Provide the following values: {{#allParams}}{{^isHeaderParam}}{{paramName}}{{^-last}}, {{/-last}}{{/isHeaderParam}}{{#isHeaderParam}}[HeaderParameter] {{paramName}}{{^-last}}, {{/-last}}{{/isHeaderParam}}{{/allParams}} +{{#returnType}}{{^isVoid}}{{interfacePrefix}}{{returnType}} response = {{/isVoid}}{{/returnType}}await {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{operationId}}Async( + {{#pathParams}}{{{dataType}}}{{>NullConditionalParameter}} {{paramName}}, {{/pathParams}}{{#queryParams}}{{#required}}{{{dataType}}}{{>NullConditionalParameter}} {{paramName}}, {{/required}}{{/queryParams}}{{#bodyParams}}{{{dataType}}}{{>NullConditionalParameter}} {{paramName}}, {{/bodyParams}}{{#queryParams}}{{^required}}Option<{{{dataType}}}{{>NullConditionalParameter}}> {{paramName}}{{#notRequiredOrIsNullable}} = default{{/notRequiredOrIsNullable}}, {{/required}}{{/queryParams}} + RequestOptions requestOptions = default, + CancellationToken cancellationToken = default); + +if (response.TryDeserializeOkResponse(out {{returnType}} result)) +{ + // Handle result, if 200 OK response +} + +``` + +#### Return type +{{#returnType}}{{#returnTypeIsPrimitive}}[{{{returnType}}}]{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[{{returnType}}](){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} + + +{{/operation}} +{{/operations}} diff --git a/templates-v7/csharp/libraries/generichost/api_test.mustache b/templates-v7/csharp/libraries/generichost/api_test.mustache new file mode 100644 index 000000000..d54244957 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/api_test.mustache @@ -0,0 +1,71 @@ +{{>partial_header}} +using {{packageName}}.Core.Options;{{#hasImport}} +using {{packageName}}.{{modelPackage}};{{/hasImport}} +using {{packageName}}.{{apiName}}.{{clientPackageName}}; +using {{packageName}}.{{apiName}}.Extensions; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Text.Json; + +{{>testInstructions}} + + +namespace {{packageName}}.Test.{{apiPackage}} +{ + /// + /// Class for testing {{classname}} + /// + [TestClass] + public sealed class {{classname}}Test + { + private readonly JsonSerializerOptionsProvider _jsonSerializerOptionsProvider; + + public {{classname}}Test() + { + IHost host = Host.CreateDefaultBuilder() + .Configure{{classname}}((context, services, config) => + { + config.ConfigureAdyenOptions(options => + { + options.Environment = AdyenEnvironment.Test; + }); + }) + .Build(); + + _jsonSerializerOptionsProvider = host.Services.GetRequiredService(); + } + {{#operations}} + {{#operation}} + + /// + /// Test {{operationId}}. + /// + public async Task Given_Deserialize_When_{{operationId}}_Successfully_Deserializes() + { + // Arrange + // TODO: Insert your example code from open-api here + var client = TestUtilities.GetTestFileContent("mocks/posmobile/create-session.json"); + + {{#allParams}} + {{^required}}Client.Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} = default{{nrt!}}; + {{/allParams}} + {{#responses}} + {{#-first}} + {{#dataType}} + + // Act + // TODO: Prefill the ResponseType + // IDEALLY: We insert the SERVICE and then we call it using the right parameters (this gets tricky with query params* but very doable!) + var response = JsonSerializer.Deserialize<{{name}}Response}>(json, _jsonSerializerOptionsProvider); + + // Assert + Assert.IsNotNull(response); + {{/dataType}} + {{/-first}} + {{/responses}} + } + {{/operation}} + {{/operations}} + } +} diff --git a/templates-v7/csharp/libraries/generichost/model.mustache b/templates-v7/csharp/libraries/generichost/model.mustache new file mode 100644 index 000000000..fa07a7053 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/model.mustache @@ -0,0 +1,56 @@ +// +{{>partial_header}} + +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +{{^useGenericHost}} +using System.Runtime.Serialization; +{{/useGenericHost}} +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +{{#validatable}} +using System.ComponentModel.DataAnnotations; +{{/validatable}} +{{#useCompareNetObjects}} +using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; +{{/useCompareNetObjects}} +{{#useGenericHost}} +{{#useSourceGeneration}} +using System.Text.Json.Serialization.Metadata; +{{/useSourceGeneration}} +using {{packageName}}.{{corePackageName}}; +using {{packageName}}.{{apiName}}.{{clientPackage}}; +{{/useGenericHost}} +{{#models}} +{{#lambda.trimTrailingWithNewLine}} +{{#model}} + +namespace {{packageName}}.{{modelPackage}} +{ +{{#isEnum}} +{{>modelEnum}} + +{{/isEnum}} +{{^isEnum}} +{{>modelGeneric}} + + +{{>JsonConverter}} + +{{/isEnum}} +{{>SourceGenerationContext}} + +{{/model}} +{{/lambda.trimTrailingWithNewLine}} +{{/models}} +} diff --git a/templates-v7/csharp/libraries/generichost/modelGeneric.mustache b/templates-v7/csharp/libraries/generichost/modelGeneric.mustache new file mode 100644 index 000000000..00f340413 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/modelGeneric.mustache @@ -0,0 +1,413 @@ + /// + /// {{{description}}}{{^description}}{{classname}}{{/description}}. + /// + {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}}{{#readOnlyVars}}{{#-first}} : .{{/-first}}{{/readOnlyVars}}{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{>ImplementsIEquatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} + { + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + /// + /// Initializes a new instance of the class. + /// + /// + {{#composedSchemas.anyOf}} + /// + {{/composedSchemas.anyOf}} + {{#allVars}} + {{^isDiscriminator}} + /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{/isDiscriminator}} + {{/allVars}} + {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{{dataType}}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{#model.composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{baseType}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/model.composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{parent}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} + { + {{#composedSchemas.anyOf}} + {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/composedSchemas.anyOf}} + {{name}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{#allVars}} + {{^isDiscriminator}} + {{^isInherited}} + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isInherited}} + {{#isInherited}} + {{#isNew}} + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isNew}} + {{/isInherited}} + {{/isDiscriminator}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + {{name}} = {{^isEnum}}this.GetType().Name{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), this.GetType().Name){{/isEnum}}; + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{/allVars}} + OnCreated(); + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + {{^composedSchemas.oneOf}} + /// + /// Initializes a new instance of the class. + /// + {{#composedSchemas.anyOf}} + /// + {{/composedSchemas.anyOf}} + {{#allVars}} + {{^isDiscriminator}} + /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{/isDiscriminator}} + {{/allVars}} + {{^composedSchemas.anyOf}} + [JsonConstructor] + {{/composedSchemas.anyOf}} + {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{datatypeWithEnum}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} + { + {{#composedSchemas.anyOf}} + {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/composedSchemas.anyOf}} + {{#allVars}} + {{^isDiscriminator}} + {{^isInherited}} + {{^required}}_{{/required}}{{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isInherited}} + {{#isInherited}} + {{#isNew}} + {{^required}}_{{/required}}{{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isNew}} + {{/isInherited}} + {{/isDiscriminator}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + {{name}} = {{^isEnum}}this.GetType().Name{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), this.GetType().Name){{/isEnum}}; + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{/allVars}} + OnCreated(); + } + + {{#allVars}} + {{^isDiscriminator}} + {{#-first}} + /// + /// Best practice: Use the constructor to initialize your objects to understand which parameters are required/optional. + /// + {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}() + { + } + {{/-first}} + {{/isDiscriminator}} + {{/allVars}} + + {{/composedSchemas.oneOf}} + partial void OnCreated(); + + {{#vars}} + {{#items.isEnum}} + {{#items}} + {{^complexType}} +{{>modelInnerEnum}} + + {{/complexType}} + {{/items}} + {{/items.isEnum}} + {{#isEnum}} + {{^complexType}} +{{>modelInnerEnum}} + + {{/complexType}} + {{/isEnum}} + {{^isDiscriminator}} + {{#isEnum}} + {{^required}} + /// + /// This is used to track if an optional field is set. If set, will be populated. + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> _{{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{{description}}}{{^description}}.{{/description}} + /// + {{#description}} + /// {{.}} + {{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + [JsonPropertyName("{{baseName}}")] + {{#deprecated}} + [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] + {{/deprecated}} + public {{#isNew}}new {{/isNew}}{{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this._{{name}}Option; } {{^isReadOnly}}set { this._{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + + {{/isEnum}} + {{/isDiscriminator}} + {{/vars}} + {{#composedSchemas.anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{^required}} + /// + /// This is used to track if an optional field is set. If set, will be populated. + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> _{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{{description}}}{{^description}}.{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + {{#deprecated}} + [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] + {{/deprecated}} + public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this._{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option; } {{^isReadOnly}}set { this._{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.anyOf}} + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + /// + /// {{{description}}}{{^description}}.{{/description}}. + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + {{#deprecated}} + [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] + {{/deprecated}} + public {{{dataType}}}{{>NullConditionalProperty}} {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} + + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + {{#allVars}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + /// + /// The discriminator. + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}{{datatypeWithEnum}} {{name}} { get; } + + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{^vendorExtensions.x-is-base-or-new-discriminator}} + {{^isEnum}} + {{#isInherited}} + {{#isNew}} + {{^required}} + /// + /// This is used to track if an optional field is set. If set, will be populated. + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> _{{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{{description}}}{{^description}}.{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + [JsonPropertyName("{{baseName}}")] + {{#deprecated}} + [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] + {{/deprecated}} + public new {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this._{{name}}Option } {{^isReadOnly}}set { this._{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + + {{/isNew}} + {{/isInherited}} + {{^isInherited}} + {{^required}} + /// + /// This is used to track if an optional field is set. If set, will be populated. + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> _{{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{description}}{{^description}}.{{/description}} + /// {{#description}} + /// {{{description}}}{{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + [JsonPropertyName("{{baseName}}")] + {{#deprecated}} + [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] + {{/deprecated}} + public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this._{{name}}Option; } {{^isReadOnly}}set { this._{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + + {{/isInherited}} + {{/isEnum}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{/allVars}} + {{#isAdditionalPropertiesTrue}} + {{^parentModel}} + /// + /// Gets or sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; } = new Dictionary(); + + {{/parentModel}} + {{/isAdditionalPropertiesTrue}} + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class {{classname}} {\n"); + {{#composedSchemas.oneOf}} + if (this.{{name}} != null) + sb.Append({{name}}.ToString().Replace("\n", "\n ")); + {{/composedSchemas.oneOf}} + {{#parent}} + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + {{/parent}} + {{#vars}} + {{^isDiscriminator}} + sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); + {{/isDiscriminator}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + {{^parentModel}} + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + {{/parentModel}} + {{/isAdditionalPropertiesTrue}} + sb.Append("}\n"); + return sb.ToString(); + } + {{#equatable}} + {{#readOnlyVars}} + {{#-first}} + + /// + /// Returns true if objects are equal. + /// + /// Object to be compared + /// Boolean + public override bool Equals(object{{nrt?}} input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + return this.Equals(input as {{classname}}); + {{/useCompareNetObjects}} + } + + /// + /// Returns true if {{classname}} instances are equal. + /// + /// Instance of {{classname}} to be compared + /// Boolean + public bool Equals({{classname}}{{nrt?}} input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + if (input == null) + return false; + + return {{#parent}}base.Equals(input) && {{/parent}}{{#readOnlyVars}}{{^isInherited}}{{^isContainer}} + ( + {{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}} + ({{name}} != null && + {{name}}.Equals(input.{{name}})) + {{/vendorExtensions.x-is-value-type}} + {{#vendorExtensions.x-is-value-type}} + {{name}}.Equals(input.{{name}}) + {{/vendorExtensions.x-is-value-type}} + ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} + ( + {{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}}{{name}} != null && + input.{{name}} != null && + {{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(input.{{name}}) + ){{^-last}} && {{/-last}}{{/isContainer}}{{/isInherited}}{{/readOnlyVars}}{{^readOnlyVars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/readOnlyVars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} + {{#isAdditionalPropertiesTrue}} + {{^parentModel}} + && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any()); + {{/parentModel}} + {{/isAdditionalPropertiesTrue}} + {{/useCompareNetObjects}} + } + + /// + /// Gets the hash code. + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + {{#parent}} + int hashCode = base.GetHashCode(); + {{/parent}} + {{^parent}} + int hashCode = 41; + {{/parent}} + {{#readOnlyVars}} + {{#required}} + {{^isNullable}} + hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + {{/isNullable}} + {{/required}} + {{/readOnlyVars}} + {{#readOnlyVars}} + {{#lambda.copy}} + if ({{name}} != null) + hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + + {{/lambda.copy}} + {{#isNullable}} + {{#lambda.pasteOnce}} + {{/lambda.pasteOnce}} + {{/isNullable}} + {{^required}} + {{#lambda.pasteOnce}} + {{/lambda.pasteOnce}} + {{/required}} + {{/readOnlyVars}} + {{#isAdditionalPropertiesTrue}} + {{^parentModel}} + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + {{/parentModel}} + {{/isAdditionalPropertiesTrue}} + + return hashCode; + } + } + {{/-first}} + {{/readOnlyVars}} + {{/equatable}} +{{#validatable}} +{{^parentModel}} + +{{>validatable}} + +{{/parentModel}} +{{/validatable}} + } \ No newline at end of file diff --git a/templates-v7/csharp/libraries/generichost/modelInnerEnum.mustache b/templates-v7/csharp/libraries/generichost/modelInnerEnum.mustache new file mode 100644 index 000000000..572d0f136 --- /dev/null +++ b/templates-v7/csharp/libraries/generichost/modelInnerEnum.mustache @@ -0,0 +1,116 @@ + {{^isContainer}} + /// + /// {{{description}}}{{^description}}Defines {{{name}}}.{{/description}} + /// + {{#description}} + /// {{.}} + {{/description}} + {{#isString}} + {{#useGenericHost}} + [JsonConverter(typeof({{datatypeWithEnum}}JsonConverter))] + {{/useGenericHost}} + {{/isString}} + {{>visibility}} class {{datatypeWithEnum}} : IEnum + { + /// + /// Returns the value of the {{datatypeWithEnum}}. + /// + public string? Value { get; set; } + + {{#allowableValues}} + {{#enumVars}} + /// + /// {{datatypeWithEnum}}.{{name}} - {{value}} + /// + public static readonly {{datatypeWithEnum}} {{name}} = new("{{value}}"); + {{^-last}} + + {{/-last}} + {{/enumVars}} + {{/allowableValues}} + + private {{datatypeWithEnum}}(string? value) + { + Value = value; + } + + /// + /// Converts a string to a implicitly. + /// + /// The string value to convert. Defaults to null. + /// A new instance initialized with the string value. + public static implicit operator {{datatypeWithEnum}}?(string? value) => value == null ? null : new {{datatypeWithEnum}}(value); + + /// + /// Converts a instance to a string implicitly. + /// + /// The instance. Default to null. + /// String value of the instance./// + public static implicit operator string?({{datatypeWithEnum}}? option) => option?.Value; + + public static bool operator ==({{datatypeWithEnum}}? left, {{datatypeWithEnum}}? right) => string.Equals(left?.Value, right?.Value, StringComparison.OrdinalIgnoreCase); + + public static bool operator !=({{datatypeWithEnum}}? left, {{datatypeWithEnum}}? right) => !string.Equals(left?.Value, right?.Value, StringComparison.OrdinalIgnoreCase); + + public override bool Equals(object? obj) => obj is {{datatypeWithEnum}} other && string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase); + + public override int GetHashCode() => Value?.GetHashCode() ?? 0; + + public override string ToString() => Value ?? string.Empty; + + {{#useGenericHost}} + /// + /// Returns a . + /// + /// + /// or null. + public static {{datatypeWithEnum}}? FromStringOrDefault(string value) + { + return value switch { + {{#allowableValues}}{{#enumVars}}{{#isString}}"{{{value}}}"{{/isString}} => {{datatypeWithEnum}}.{{name}}, + {{/enumVars}}{{/allowableValues}}_ => null, + }; + } + + /// + /// Converts the to the json value. + /// + /// + /// String value of the enum. + {{#isString}} + /// + {{/isString}} + public static {{>EnumValueDataType}}?{{#lambda.first}}{{#nrt}}{{/nrt}}{{/lambda.first}} ToJsonValue({{datatypeWithEnum}}? value) + { + if (value == null) + return null; + + {{#allowableValues}} + {{#enumVars}} + if (value == {{datatypeWithEnum}}.{{name}}) + return {{#isString}}"{{{value}}}"{{/isString}}; + + {{/enumVars}} + {{/allowableValues}} + return null; + } + + /// + /// JsonConverter for writing {{datatypeWithEnum}}. + /// + public class {{datatypeWithEnum}}JsonConverter : JsonConverter<{{datatypeWithEnum}}> + { + public override {{datatypeWithEnum}}? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions jsonOptions) + { + string value = reader.GetString(); + return value == null ? null : {{datatypeWithEnum}}.FromStringOrDefault(value) ?? new {{datatypeWithEnum}}(value); + } + + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}} value, JsonSerializerOptions jsonOptions) + { + writer.WriteStringValue({{datatypeWithEnum}}.ToJsonValue(value)); + } + } + {{/useGenericHost}} + } + {{/isContainer}} \ No newline at end of file diff --git a/templates-v7/csharp/partial_header.mustache b/templates-v7/csharp/partial_header.mustache new file mode 100644 index 000000000..377ccfabb --- /dev/null +++ b/templates-v7/csharp/partial_header.mustache @@ -0,0 +1,18 @@ +/* + {{#appName}} + * {{{.}}} + * + {{/appName}} + {{#appDescription}} + * {{{.}}} + * + {{/appDescription}} + {{#version}} + * The version of the OpenAPI document: {{{.}}} + {{/version}} + {{#infoEmail}} + * Contact: {{{.}}} + {{/infoEmail}} + * NOTE: This class is auto-generated using a modified version (https://github.com/Adyen/adyen-sdk-automation) of the OpenAPI Generator: https://github.com/openapitools/openapi-generator.git. + * Do not edit this class manually. + */ diff --git a/templates-v7/csharp/validatable.mustache b/templates-v7/csharp/validatable.mustache new file mode 100644 index 000000000..14fbc18c4 --- /dev/null +++ b/templates-v7/csharp/validatable.mustache @@ -0,0 +1,141 @@ +{{#discriminator}} + /// + /// To validate all properties of the instance. + /// + /// . + /// . + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance. + /// + /// . + /// . + protected IEnumerable BaseValidate(ValidationContext validationContext) + { +{{/discriminator}} +{{^discriminator}} + {{#parent}} + /// + /// To validate all properties of the instance. + /// + /// . + /// . + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance. + /// + /// . + /// . + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + {{/parent}} + {{^parent}} + /// + /// To validate all properties of the instance. + /// + /// . + /// . + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + {{/parent}} +{{/discriminator}} + {{#parent}} + {{^isArray}} + {{^isMap}} + foreach (var x in {{#discriminator}}base.{{/discriminator}}BaseValidate(validationContext)) + { + yield return x; + } + {{/isMap}} + {{/isArray}} + {{/parent}} + {{#vars}} + {{#hasValidation}} + {{^isEnum}} + {{^isDateTime}} + {{^isDate}} + {{^isTime}} + {{#maxLength}} + // {{{name}}} ({{{dataType}}}) maxLength + if (this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}}) + { + yield return new ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); + } + + {{/maxLength}} + {{#minLength}} + // {{{name}}} ({{{dataType}}}) minLength + if (this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}}) + { + yield return new ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); + } + + {{/minLength}} + {{/isTime}} + {{/isDate}} + {{/isDateTime}} + {{#maximum}} + // {{{name}}} ({{{dataType}}}) maximum + if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} {{#exclusiveMaximum}}<={{/exclusiveMaximum}}{{^exclusiveMaximum}}>{{/exclusiveMaximum}} ({{{dataType}}}){{maximum}}) + { + yield return new ValidationResult("Invalid value for {{{name}}}, must be a value less than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.", new [] { "{{{name}}}" }); + } + + {{/maximum}} + {{#minimum}} + // {{{name}}} ({{{dataType}}}) minimum + if ({{#useGenericHost}}{{^required}}this.{{{name}}}Option.IsSet && {{/required}}{{/useGenericHost}}this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} {{#exclusiveMaximum}}>={{/exclusiveMaximum}}{{^exclusiveMaximum}}<{{/exclusiveMaximum}} ({{{dataType}}}){{minimum}}) + { + yield return new ValidationResult("Invalid value for {{{name}}}, must be a value greater than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.", new [] { "{{{name}}}" }); + } + + {{/minimum}} + {{#pattern}} + {{^isByteArray}} + {{#vendorExtensions.x-is-value-type}} + {{#isNullable}} + if (this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} != null){ + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent4}} + {{>ValidateRegex}}{{! prevent indent}} + {{/lambda.indent4}} + + {{/lambda.trimTrailingWithNewLine}} + } + + {{/isNullable}} + {{^isNullable}} + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent3}} + {{>ValidateRegex}}{{! prevent indent}} + {{/lambda.indent3}} + + {{/lambda.trimTrailingWithNewLine}} + {{/isNullable}} + {{/vendorExtensions.x-is-value-type}} + {{^vendorExtensions.x-is-value-type}} + if (this.{{{name}}}{{#useGenericHost}}{{^required}}Option.Value{{/required}}{{/useGenericHost}} != null) { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.indent4}} + {{>ValidateRegex}}{{! prevent indent}} + {{/lambda.indent4}} + + {{/lambda.trimTrailingWithNewLine}} + } + + {{/vendorExtensions.x-is-value-type}} + {{/isByteArray}} + {{/pattern}} + {{/isEnum}} + {{/hasValidation}} + {{/vars}} + yield break; + } \ No newline at end of file diff --git a/templates-v7/csharp/visibility.mustache b/templates-v7/csharp/visibility.mustache new file mode 100644 index 000000000..a1d1f4163 --- /dev/null +++ b/templates-v7/csharp/visibility.mustache @@ -0,0 +1 @@ +{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} \ No newline at end of file diff --git a/templates/csharp/AbstractOpenAPISchema.mustache b/templates/csharp/AbstractOpenAPISchema.mustache deleted file mode 100644 index ab90f174c..000000000 --- a/templates/csharp/AbstractOpenAPISchema.mustache +++ /dev/null @@ -1,71 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace {{packageName}}.{{modelPackage}} -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - {{>visibility}} abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - - // Check if the contains TypeEnum value - protected static bool ContainsValue(string type) where T : struct, IConvertible - { - // Search for type in .TypeEnum - List list = new List(); - var members = typeof(T).GetTypeInfo().DeclaredMembers; - foreach (var member in members) - { - var val = member?.GetCustomAttribute(false)?.Value; - if (!string.IsNullOrEmpty(val)) - { - list.Add(val); - } - } - - return list.Contains(type); - } - } -} diff --git a/templates/csharp/api-single.mustache b/templates/csharp/api-single.mustache deleted file mode 100644 index da60553d0..000000000 --- a/templates/csharp/api-single.mustache +++ /dev/null @@ -1,87 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Constants; -using Adyen.Model; -{{#hasImport}}using Adyen.{{modelPackage}}; -{{/hasImport}} - -namespace {{packageName}}.Service -{ -{{#operations}} - /// - /// {{classname}} Interface - /// - public interface I{{customApi}}Service - { - {{#operation}} -{{>method_documentation}} - {{#returnType}} - /// . - {{/returnType}} - {{#isDeprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/isDeprecated}} - {{#returnType}}{{modelPackage}}.{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}({{>api_parameters}}); - - {{#supportsAsync}} -{{>method_documentation}} - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects.{{#returnType}} - /// Task of .{{/returnType}} - {{#isDeprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/isDeprecated}} - {{#returnType}}Task<{{modelPackage}}.{{{.}}}>{{/returnType}}{{^returnType}}Task{{/returnType}} {{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}Async({{>api_parameters_async}}); - - {{/supportsAsync}} - {{/operation}} - } - {{/operations}} - - {{#operations}} - /// - /// Represents a collection of functions to interact with the {{customApi}}Service API endpoints - /// - {{>visibility}} class {{customApi}}Service : AbstractService, I{{customApi}}Service - { - private readonly string _baseUrl; - - public {{customApi}}Service(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("{{{basePath}}}"); - } - {{#operation}} - - {{#isDeprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/isDeprecated}} - public {{#returnType}}{{modelPackage}}.{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}({{>api_parameters}}) - { - {{#returnType}}return {{/returnType}}{{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}Async({{>api_invoke}}).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - {{#supportsAsync}} - {{#isDeprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/isDeprecated}} - {{#returnType}}public async Task<{{modelPackage}}.{{{.}}}>{{/returnType}}{{^returnType}}public async Task{{/returnType}} {{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}Async({{>api_parameters_async}}) - { - {{#hasQueryParams}} - // Build the query string - var queryParams = new Dictionary(); - {{#queryParams}} - {{^required}}if ({{paramName}} != null) {{/required}}queryParams.Add("{{baseName}}", {{paramName}}{{^isString}}{{^isDateTime}}.Value.ToString(){{/isDateTime}}{{#isDateTime}}.ToString("yyyy-MM-ddTHH:mm:ssZ"){{/isDateTime}}{{/isString}}); - {{/queryParams}} - {{/hasQueryParams}} - var endpoint = _baseUrl + {{#hasPathParams}}${{/hasPathParams}}"{{{path}}}"{{#hasQueryParams}} + ToQueryString(queryParams){{/hasQueryParams}}; - var resource = new ServiceResource(this, endpoint); - {{#returnType}}return {{/returnType}}await resource.RequestAsync{{#returnType}}<{{modelPackage}}.{{returnType}}>{{/returnType}}({{#bodyParam}}{{paramName}}.ToJson(){{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, requestOptions, new HttpMethod("{{httpMethod}}"), cancellationToken).ConfigureAwait(false); - } - {{/supportsAsync}} - {{/operation}} - } - {{/operations}} -} \ No newline at end of file diff --git a/templates/csharp/api.mustache b/templates/csharp/api.mustache deleted file mode 100644 index 27ff0eb4d..000000000 --- a/templates/csharp/api.mustache +++ /dev/null @@ -1,86 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections.Generic; -using System.Net.Http; -using System.Threading; -using System.Threading.Tasks; -using Adyen.Model; -{{#hasImport}}using Adyen.{{modelPackage}}; -{{/hasImport}} - -namespace {{packageName}}.{{apiPackage}} -{ -{{#operations}} - /// - /// {{classname}} Interface - /// - public interface I{{classname}} - { - {{#operation}} -{{>method_documentation}} - {{#returnType}} - /// . - {{/returnType}} - {{#isDeprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/isDeprecated}} - {{#returnType}}{{modelPackage}}.{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}({{>api_parameters}}); - - {{#supportsAsync}} -{{>method_documentation}} - /// A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects.{{#returnType}} - /// Task of .{{/returnType}} - {{#isDeprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/isDeprecated}} - {{#returnType}}Task<{{modelPackage}}.{{{.}}}>{{/returnType}}{{^returnType}}Task{{/returnType}} {{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}Async({{>api_parameters_async}}); - - {{/supportsAsync}} - {{/operation}} - } - {{/operations}} - - {{#operations}} - /// - /// Represents a collection of functions to interact with the {{classname}} API endpoints - /// - {{>visibility}} class {{classname}} : AbstractService, I{{classname}} - { - private readonly string _baseUrl; - - public {{classname}}(Client client) : base(client) - { - _baseUrl = CreateBaseUrl("{{{basePath}}}"); - } - {{#operation}} - - {{#isDeprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/isDeprecated}} - public {{#returnType}}{{modelPackage}}.{{{.}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}({{>api_parameters}}) - { - {{#returnType}}return {{/returnType}}{{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}Async({{>api_invoke}}).ConfigureAwait(false).GetAwaiter().GetResult(); - } - - {{#supportsAsync}} - {{#isDeprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/isDeprecated}} - {{#returnType}}public async Task<{{modelPackage}}.{{{.}}}>{{/returnType}}{{^returnType}}public async Task{{/returnType}} {{#lambda.pascalcase}}{{vendorExtensions.x-methodName}}{{/lambda.pascalcase}}Async({{>api_parameters_async}}) - { - {{#hasQueryParams}} - // Build the query string - var queryParams = new Dictionary(); - {{#queryParams}} - {{^required}}if ({{paramName}} != null) {{/required}}queryParams.Add("{{baseName}}", {{paramName}}{{^isString}}{{^isDateTime}}.ToString(){{/isDateTime}}{{#isDateTime}}{{^required}}.Value{{/required}}.ToString("yyyy-MM-ddTHH:mm:ssZ"){{/isDateTime}}{{/isString}}); - {{/queryParams}} - {{/hasQueryParams}} - var endpoint = _baseUrl + {{#hasPathParams}}${{/hasPathParams}}"{{{path}}}"{{#hasQueryParams}} + ToQueryString(queryParams){{/hasQueryParams}}; - var resource = new ServiceResource(this, endpoint); - {{#returnType}}return {{/returnType}}await resource.RequestAsync{{#returnType}}<{{modelPackage}}.{{returnType}}>{{/returnType}}({{#bodyParam}}{{paramName}}.ToJson(){{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, requestOptions, new HttpMethod("{{httpMethod}}"), cancellationToken).ConfigureAwait(false); - } - {{/supportsAsync}} - {{/operation}} - } - {{/operations}} -} \ No newline at end of file diff --git a/templates/csharp/api_invoke.mustache b/templates/csharp/api_invoke.mustache deleted file mode 100644 index 45815fc53..000000000 --- a/templates/csharp/api_invoke.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#requiredParams}}{{#isPathParam}}{{paramName}}, {{/isPathParam}}{{#isBodyParam}}{{paramName}}, {{/isBodyParam}}{{#isQueryParam}}{{paramName}}, {{/isQueryParam}}{{/requiredParams}}{{#optionalParams}}{{#isPathParam}}{{paramName}}, {{/isPathParam}}{{#isBodyParam}}{{paramName}}, {{/isBodyParam}}{{#isQueryParam}}{{paramName}}, {{/isQueryParam}}{{/optionalParams}}requestOptions \ No newline at end of file diff --git a/templates/csharp/api_parameter_ordering.mustache b/templates/csharp/api_parameter_ordering.mustache deleted file mode 100644 index 593846f25..000000000 --- a/templates/csharp/api_parameter_ordering.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isPathParam}}{{{dataType}}} {{paramName}} = default, {{/isPathParam}}{{#isBodyParam}}{{{dataType}}} {{paramName}} = default, {{/isBodyParam}}{{#isQueryParam}}{{{dataType}}} {{paramName}} = default, {{/isQueryParam}} \ No newline at end of file diff --git a/templates/csharp/api_parameter_ordering_required.mustache b/templates/csharp/api_parameter_ordering_required.mustache deleted file mode 100644 index 0c1ecfea1..000000000 --- a/templates/csharp/api_parameter_ordering_required.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isPathParam}}{{{dataType}}} {{paramName}}, {{/isPathParam}}{{#isBodyParam}}{{{dataType}}} {{paramName}}, {{/isBodyParam}}{{#isQueryParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}} \ No newline at end of file diff --git a/templates/csharp/api_parameters.mustache b/templates/csharp/api_parameters.mustache deleted file mode 100644 index 3ca742884..000000000 --- a/templates/csharp/api_parameters.mustache +++ /dev/null @@ -1,2 +0,0 @@ -{{! Path and body are required, followed by optional query string and request options }} -{{#requiredParams}}{{>api_parameter_ordering_required}}{{/requiredParams}}{{#optionalParams}}{{>api_parameter_ordering}}{{/optionalParams}}RequestOptions requestOptions = default \ No newline at end of file diff --git a/templates/csharp/api_parameters_async.mustache b/templates/csharp/api_parameters_async.mustache deleted file mode 100644 index 4287dc8b4..000000000 --- a/templates/csharp/api_parameters_async.mustache +++ /dev/null @@ -1,2 +0,0 @@ -{{! Path and body are required, followed by optional query string and request options }} -{{#requiredParams}}{{>api_parameter_ordering_required}}{{/requiredParams}}{{#optionalParams}}{{>api_parameter_ordering}}{{/optionalParams}}RequestOptions requestOptions = default, CancellationToken cancellationToken = default \ No newline at end of file diff --git a/templates/csharp/config.yaml b/templates/csharp/config.yaml deleted file mode 100644 index 829b2714b..000000000 --- a/templates/csharp/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -templateDir: ./templates/csharp -files: - api-single.mustache: - folder: api - templateType: API - destinationFilename: Single.cs \ No newline at end of file diff --git a/templates/csharp/method_documentation.mustache b/templates/csharp/method_documentation.mustache deleted file mode 100644 index 537b3924e..000000000 --- a/templates/csharp/method_documentation.mustache +++ /dev/null @@ -1,13 +0,0 @@ - /// - /// {{{summary}}} - /// - {{#pathParams}} - /// - {{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/pathParams}} - {{#bodyParams}} - /// - {{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/bodyParams}} - {{#queryParams}} - /// - {{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/queryParams}} - /// - Additional request options. \ No newline at end of file diff --git a/templates/csharp/model.mustache b/templates/csharp/model.mustache deleted file mode 100644 index 51a2ad036..000000000 --- a/templates/csharp/model.mustache +++ /dev/null @@ -1,49 +0,0 @@ -{{>partial_header}} -{{#models}} -{{#model}} -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -{{#vendorExtensions.x-com-visible}} -using System.Runtime.InteropServices; -{{/vendorExtensions.x-com-visible}} -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -{{#discriminator}} -using JsonSubTypes; -{{/discriminator}} -{{/model}} -{{/models}} -{{#validatable}} -using System.ComponentModel.DataAnnotations; -{{/validatable}} -using OpenAPIDateConverter = Adyen.ApiSerialization.OpenAPIDateConverter; -{{#useCompareNetObjects}} -using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; -{{/useCompareNetObjects}} -{{#models}} -{{#model}} -{{#oneOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/oneOf}} -{{#anyOf}} -{{#-first}} -using System.Reflection; -{{/-first}} -{{/anyOf}} - -namespace {{packageName}}.{{modelPackage}} -{ -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#anyOf}}{{#-first}}{{>modelAnyOf}}{{/-first}}{{/anyOf}}{{^oneOf}}{{^anyOf}}{{>modelGeneric}}{{/anyOf}}{{/oneOf}}{{/isEnum}} -{{/model}} -{{/models}} -} diff --git a/templates/csharp/modelGeneric.mustache b/templates/csharp/modelGeneric.mustache deleted file mode 100644 index ffeedcb6e..000000000 --- a/templates/csharp/modelGeneric.mustache +++ /dev/null @@ -1,384 +0,0 @@ - /// - /// {{description}}{{^description}}{{classname}}{{/description}} - /// - {{#vendorExtensions.x-cls-compliant}} - [CLSCompliant({{{vendorExtensions.x-cls-compliant}}})] - {{/vendorExtensions.x-cls-compliant}} - {{#vendorExtensions.x-com-visible}} - [ComVisible({{{vendorExtensions.x-com-visible}}})] - {{/vendorExtensions.x-com-visible}} - [DataContract(Name = "{{{name}}}")] - {{#discriminator}} - [JsonConverter(typeof(JsonSubtypes), "{{{discriminatorName}}}")] - {{#mappedModels}} - [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] - {{/mappedModels}} - {{/discriminator}} - {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} - { - {{#vars}} - {{#items.isEnum}} - {{#items}} - {{^complexType}} -{{>modelInnerEnum}} - {{/complexType}} - {{/items}} - {{/items.isEnum}} - {{#isEnum}} - {{^complexType}} -{{>modelInnerEnum}} - {{/complexType}} - {{/isEnum}} - {{#isEnum}} - - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{^conditionalSerialization}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = false{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}false{{/required}}{{^required}}{{#isBoolean}}false{{/isBoolean}}{{^isBoolean}}{{#isNullable}}false{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#deprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } - {{#isReadOnly}} - - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{#isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = false{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}false{{/required}}{{^required}}{{#isBoolean}}false{{/isBoolean}}{{^isBoolean}}{{#isNullable}}false{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#deprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } - - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return false; - } - {{/isReadOnly}} - - {{^isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = false{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}false{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#deprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} - { - get{ return _{{name}};} - set - { - _{{name}} = value; - _flag{{name}} = true; - } - } - private {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} _{{name}}; - private bool _flag{{name}}; - - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return _flag{{name}}; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{/isEnum}} - {{/vars}} - {{#hasRequired}} - {{^hasOnlyReadOnly}} - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - {{^isAdditionalPropertiesTrue}} - protected {{classname}}() { } - {{/isAdditionalPropertiesTrue}} - {{#isAdditionalPropertiesTrue}} - protected {{classname}}() - { - this.AdditionalProperties = new Dictionary(); - } - {{/isAdditionalPropertiesTrue}} - {{/hasOnlyReadOnly}} - {{/hasRequired}} - /// - /// Initializes a new instance of the class. - /// - {{#readWriteVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. - {{/readWriteVars}} - {{#hasOnlyReadOnly}} - [JsonConstructorAttribute] - {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isNumeric}}?{{/isNumeric}}{{#isBoolean}}{{^isNullable}}?{{/isNullable}}{{/isBoolean}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{#defaultValue}}{{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isNumeric}}?{{/isNumeric}}{{#isBoolean}}{{^isNullable}}?{{/isNullable}}{{/isBoolean}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} - { - {{#vars}} - {{^isInherited}} - {{^isReadOnly}} - {{#required}} - {{^conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{/required}} - {{/isReadOnly}} - {{/isInherited}} - {{/vars}} - {{#vars}} - {{^isInherited}} - {{^isReadOnly}} - {{^required}} - {{#defaultValue}} - {{^conditionalSerialization}} - {{^vendorExtensions.x-csharp-value-type}} - // use default value if no "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" provided - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} ?? {{{defaultValue}}}; - {{/vendorExtensions.x-csharp-value-type}} - {{#vendorExtensions.x-csharp-value-type}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/vendorExtensions.x-csharp-value-type}} - {{/conditionalSerialization}} - {{/defaultValue}} - {{^defaultValue}} - {{^conditionalSerialization}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/conditionalSerialization}} - {{#conditionalSerialization}} - this._{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - if (this.{{name}} != null) - { - this._flag{{name}} = true; - } - {{/conditionalSerialization}} - {{/defaultValue}} - {{/required}} - {{/isReadOnly}} - {{/isInherited}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - this.AdditionalProperties = new Dictionary(); - {{/isAdditionalPropertiesTrue}} - } - - {{#vars}} - {{^isInherited}} - {{^isEnum}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{^conditionalSerialization}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = false{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}false{{/required}}{{^required}}{{#isBoolean}}false{{/isBoolean}}{{^isBoolean}}{{#isNullable}}false{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/isDate}} - {{#deprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/deprecated}} - public {{{dataType}}}{{#isNumeric}}?{{/isNumeric}}{{#isBoolean}}{{^isNullable}}?{{/isNullable}}{{/isBoolean}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } - - {{/conditionalSerialization}} - {{#conditionalSerialization}} - {{#isReadOnly}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = false{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}false{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/isDate}} - {{#deprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/deprecated}} - public {{{dataType}}} {{name}} { get; private set; } - - {{/isReadOnly}} - {{^isReadOnly}} - {{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))] - {{/isDate}} - [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = false{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}false{{/required}}{{^required}}{{#isBoolean}}false{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] - {{#deprecated}} - [Obsolete("{{#vendorExtensions.x-deprecatedInVersion}}Deprecated since {{#appName}}{{{.}}}{{/appName}} v{{#vendorExtensions.x-deprecatedInVersion}}{{.}}{{/vendorExtensions.x-deprecatedInVersion}}.{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}} {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}")] - {{/deprecated}} - public {{{dataType}}} {{name}} - { - get{ return _{{name}};} - set - { - _{{name}} = value; - _flag{{name}} = true; - } - } - private {{{dataType}}} _{{name}}; - private bool _flag{{name}}; - - /// - /// Returns false as {{name}} should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerialize{{name}}() - { - return _flag{{name}}; - } - {{/isReadOnly}} - {{/conditionalSerialization}} - {{/isEnum}} - {{/isInherited}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public IDictionary AdditionalProperties { get; set; } - - {{/isAdditionalPropertiesTrue}} - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class {{classname}} {\n"); - {{#parent}} - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - {{/parent}} - {{#vars}} - sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); - {{/vars}} - {{#isAdditionalPropertiesTrue}} - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - {{/isAdditionalPropertiesTrue}} - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public {{#parent}}{{^isArray}}{{^isMap}}override {{/isMap}}{{/isArray}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - return this.Equals(input as {{classname}}); - {{/useCompareNetObjects}} - } - - /// - /// Returns true if {{classname}} instances are equal - /// - /// Instance of {{classname}} to be compared - /// Boolean - public bool Equals({{classname}} input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - if (input == null) - { - return false; - } - return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}} - ( - this.{{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}} - (this.{{name}} != null && - this.{{name}}.Equals(input.{{name}})) - {{/vendorExtensions.x-is-value-type}} - {{#vendorExtensions.x-is-value-type}} - this.{{name}}.Equals(input.{{name}}) - {{/vendorExtensions.x-is-value-type}} - ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} - ( - this.{{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}}this.{{name}} != null && - input.{{name}} != null && - {{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}}) - ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} - {{#isAdditionalPropertiesTrue}} - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); - {{/isAdditionalPropertiesTrue}} - {{/useCompareNetObjects}} - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - {{#parent}} - int hashCode = base.GetHashCode(); - {{/parent}} - {{^parent}} - int hashCode = 41; - {{/parent}} - {{#vars}} - {{^vendorExtensions.x-is-value-type}} - if (this.{{name}} != null) - { - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); - } - {{/vendorExtensions.x-is-value-type}} - {{#vendorExtensions.x-is-value-type}} - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); - {{/vendorExtensions.x-is-value-type}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - {{/isAdditionalPropertiesTrue}} - return hashCode; - } - } -{{#validatable}} -{{>validatable}} -{{/validatable}} - } diff --git a/templates/csharp/modelOneOf.mustache b/templates/csharp/modelOneOf.mustache deleted file mode 100644 index 66721caf6..000000000 --- a/templates/csharp/modelOneOf.mustache +++ /dev/null @@ -1,286 +0,0 @@ -{{#model}} - /// - /// {{description}}{{^description}}{{classname}}{{/description}} - /// - {{#vendorExtensions.x-cls-compliant}} - [CLSCompliant({{{.}}})] - {{/vendorExtensions.x-cls-compliant}} - {{#vendorExtensions.x-com-visible}} - [ComVisible({{{.}}})] - {{/vendorExtensions.x-com-visible}} - [JsonConverter(typeof({{classname}}JsonConverter))] - [DataContract(Name = "{{{name}}}")] - {{>visibility}} partial class {{classname}} : AbstractOpenAPISchema, {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}, IValidatableObject{{/validatable}} - { - {{#isNullable}} - /// - /// Initializes a new instance of the class. - /// - public {{classname}}() - { - this.IsNullable = true; - this.SchemaType= "oneOf"; - } - - {{/isNullable}} - {{#composedSchemas.oneOf}} - {{^isNull}} - /// - /// Initializes a new instance of the class - /// with the class - /// - /// An instance of {{dataType}}. - public {{classname}}({{{dataType}}} actualInstance) - { - this.IsNullable = {{#model.isNullable}}true{{/model.isNullable}}{{^model.isNullable}}false{{/model.isNullable}}; - this.SchemaType= "oneOf"; - this.ActualInstance = actualInstance{{^model.isNullable}}{{^isPrimitiveType}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isPrimitiveType}}{{#isPrimitiveType}}{{#isArray}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isArray}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isFreeFormObject}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isFreeFormObject}}{{/isPrimitiveType}}{{#isPrimitiveType}}{{#isString}} ?? throw new ArgumentException("Invalid instance found. Must not be null."){{/isString}}{{/isPrimitiveType}}{{/model.isNullable}}; - } - - {{/isNull}} - {{/composedSchemas.oneOf}} - - private Object _actualInstance; - - /// - /// Gets or Sets ActualInstance - /// - public override Object ActualInstance - { - get - { - return _actualInstance; - } - set - { - {{#oneOf}} - {{^-first}}else {{/-first}}if (value.GetType() == typeof({{{.}}})) - { - this._actualInstance = value; - } - {{/oneOf}} - else - { - throw new ArgumentException("Invalid instance found. Must be the following types:{{#oneOf}} {{{.}}}{{^-last}},{{/-last}}{{/oneOf}}"); - } - } - } - {{#composedSchemas.oneOf}} - {{^isNull}} - - /// - /// Get the actual instance of `{{dataType}}`. If the actual instance is not `{{dataType}}`, - /// the InvalidClassException will be thrown - /// - /// An instance of {{dataType}} - public {{{dataType}}} Get{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}}{{#isArray}}{{#lambda.titlecase}}{{{dataFormat}}}{{/lambda.titlecase}}{{/isArray}}() - { - return ({{{dataType}}})this.ActualInstance; - } - {{/isNull}} - {{/composedSchemas.oneOf}} - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class {{classname}} {\n"); - sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this.ActualInstance, {{classname}}.SerializerSettings); - } - - /// - /// Converts the JSON string into an instance of {{classname}} - /// - /// JSON string - /// An instance of {{classname}} - public static {{classname}} FromJson(string jsonString) - { - {{classname}} new{{classname}} = null; - - if (string.IsNullOrEmpty(jsonString)) - { - return new{{classname}}; - } - {{#useOneOfDiscriminatorLookup}} - {{#discriminator}} - - try - { - var discriminatorObj = JObject.Parse(jsonString)["{{{propertyBaseName}}}"]; - string discriminatorValue = discriminatorObj == null ?string.Empty :discriminatorObj.ToString(); - switch (discriminatorValue) - { - {{#mappedModels}} - case "{{{mappingName}}}": - new{{classname}} = new {{classname}}(JsonConvert.DeserializeObject<{{{modelName}}}>(jsonString, {{classname}}.AdditionalPropertiesSerializerSettings)); - return new{{classname}}; - {{/mappedModels}} - default: - System.Diagnostics.Debug.WriteLine(string.Format("Failed to lookup discriminator value `{0}` for {{classname}}. Possible values:{{#mappedModels}} {{{mappingName}}}{{/mappedModels}}", discriminatorValue)); - break; - } - } - catch (Exception ex) - { - System.Diagnostics.Debug.WriteLine(string.Format("Failed to parse the json data : `{0}` {1}", jsonString, ex.ToString())); - } - - {{/discriminator}} - {{/useOneOfDiscriminatorLookup}} - int match = 0; - List matchedTypes = new List(); - JToken typeToken = JObject.Parse(jsonString).GetValue("type"); - string type = typeToken?.Value(); - // Throw exception if jsonString does not contain type param - if (type == null) - { - throw new InvalidDataException("JsonString does not contain required enum type for deserialization."); - } - try - { - {{#oneOf}} - // Check if the jsonString type enum matches the {{{.}}} type enums - if (ContainsValue<{{{.}}}.TypeEnum>(type)) - { - new{{classname}} = new {{classname}}(JsonConvert.DeserializeObject<{{{.}}}>(jsonString, {{classname}}.SerializerSettings)); - matchedTypes.Add("{{{.}}}"); - match++; - } - {{/oneOf}} - } - catch (Exception ex) - { - if (!(ex is JsonSerializationException)) - { - throw new InvalidDataException(string.Format("Failed to deserialize `{0}` into target: {1}", jsonString, ex.ToString())); - } - } - - if (match != 1) - { - throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined. MatchedTypes are: " + matchedTypes); - } - - // deserialization is considered successful at this point if no exception has been thrown. - return new{{classname}}; - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - return this.Equals(input as {{classname}}); - {{/useCompareNetObjects}} - } - - /// - /// Returns true if {{classname}} instances are equal - /// - /// Instance of {{classname}} to be compared - /// Boolean - public bool Equals({{classname}} input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - {{/useCompareNetObjects}} - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } - - {{#validatable}} - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - {{/validatable}} - } - - /// - /// Custom JSON converter for {{classname}} - /// - public class {{classname}}JsonConverter : JsonConverter - { - /// - /// To write the JSON string - /// - /// JSON writer - /// Object to be converted into a JSON string - /// JSON Serializer - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) - { - writer.WriteRawValue((string)(typeof({{classname}}).GetMethod("ToJson").Invoke(value, null))); - } - - /// - /// To convert a JSON string into an object - /// - /// JSON reader - /// Object type - /// Existing value - /// JSON Serializer - /// The object converted from the JSON string - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) - { - if(reader.TokenType != JsonToken.Null) - { - return {{classname}}.FromJson(JObject.Load(reader).ToString(Formatting.None)); - } - return null; - } - - /// - /// Check if the object can be converted - /// - /// Object type - /// True if the object can be converted - public override bool CanConvert(Type objectType) - { - return false; - } - } -{{/model}} diff --git a/templates/csharp/partial_header.mustache b/templates/csharp/partial_header.mustache deleted file mode 100644 index a4c7dd929..000000000 --- a/templates/csharp/partial_header.mustache +++ /dev/null @@ -1,12 +0,0 @@ -/* -{{#appName}} -* {{{.}}} -* -{{/appName}} -* -* {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} -* -* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). -* https://openapi-generator.tech -* Do not edit the class manually. -*/